From 534593fc732d419c75bbad6a84b26916e761b436 Mon Sep 17 00:00:00 2001 From: Gav Date: Tue, 1 Nov 2022 23:39:15 +0100 Subject: [PATCH 001/182] Add ProcessXcmMessage struct --- Cargo.lock | 574 +++++++++++++-------- Cargo.toml | 244 +++++++++ xcm/xcm-builder/Cargo.toml | 2 + xcm/xcm-builder/src/lib.rs | 3 + xcm/xcm-builder/src/process_xcm_message.rs | 69 +++ 5 files changed, 682 insertions(+), 210 deletions(-) create mode 100644 xcm/xcm-builder/src/process_xcm_message.rs diff --git a/Cargo.lock b/Cargo.lock index 765c025ff027..42358b08a15b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -426,7 +426,6 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "array-bytes", "async-trait", @@ -463,7 +462,6 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -483,7 +481,6 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "beefy-primitives", "sp-api", @@ -493,7 +490,6 @@ dependencies = [ [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", "scale-info", @@ -616,7 +612,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.6", ] [[package]] @@ -891,8 +887,24 @@ checksum = "6bf8832993da70a4c6d13c581f4463c2bdda27b9bf1c5498dc4365543abe6d6f" dependencies = [ "atty", "bitflags", - "clap_derive", - "clap_lex", + "clap_derive 3.2.18", + "clap_lex 0.2.4", + "indexmap", + "once_cell", + "strsim", + "termcolor", +] + +[[package]] +name = "clap" +version = "4.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335867764ed2de42325fafe6d18b8af74ba97ee0c590fa016f157535b42ab04b" +dependencies = [ + "atty", + "bitflags", + "clap_derive 4.0.18", + "clap_lex 0.3.0", "once_cell", "strsim", "termcolor", @@ -911,6 +923,28 @@ dependencies = [ "syn", ] +[[package]] +name = "clap_derive" +version = "4.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a1b0f6422af32d5da0c58e2703320f379216ee70198241c84173a8c5ac28f3" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" +dependencies = [ + "os_str_bytes", +] + [[package]] name = "clap_lex" version = "0.3.0" @@ -1618,8 +1652,8 @@ dependencies = [ "curve25519-dalek 3.2.0", "hashbrown", "hex", - "rand_core 0.6.3", - "sha2 0.9.8", + "rand_core 0.6.4", + "sha2 0.9.9", "zeroize", ] @@ -2013,7 +2047,6 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", ] @@ -2030,14 +2063,13 @@ dependencies = [ [[package]] name = "fragile" -version = "1.2.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support", "frame-system", @@ -2060,12 +2092,11 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "Inflector", "array-bytes", "chrono", - "clap", + "clap 4.0.18", "comfy-table", "frame-benchmarking", "frame-support", @@ -2112,7 +2143,6 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2123,7 +2153,6 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2139,7 +2168,6 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support", "frame-system", @@ -2168,7 +2196,6 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "bitflags", "frame-metadata", @@ -2200,7 +2227,6 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "Inflector", "cfg-expr", @@ -2214,7 +2240,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2226,7 +2251,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "proc-macro2", "quote", @@ -2236,7 +2260,6 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2259,7 +2282,6 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support", "frame-system", @@ -2270,7 +2292,6 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support", "log", @@ -2288,7 +2309,6 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -2303,7 +2323,6 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", "sp-api", @@ -2312,7 +2331,6 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support", "parity-scale-codec", @@ -2483,7 +2501,6 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "chrono", "frame-election-provider-support", @@ -3517,7 +3534,7 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "lru", + "lru 0.8.0", "prost", "prost-build", "prost-codec", @@ -3546,7 +3563,7 @@ dependencies = [ "prost", "prost-build", "rand 0.8.5", - "sha2 0.10.2", + "sha2 0.10.6", "smallvec", "thiserror", "uint", @@ -4137,6 +4154,33 @@ dependencies = [ "syn", ] +[[package]] +name = "mockall" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e4a1c770583dac7ab5e2f6c139153b783a53a1bbee9729613f193e59828326" +dependencies = [ + "cfg-if 1.0.0", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "832663583d5fa284ca8810bf7015e46c9fff9622d3cf34bd1eea5003fec06dd0" +dependencies = [ + "cfg-if 1.0.0", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "multiaddr" version = "0.14.0" @@ -4178,7 +4222,7 @@ dependencies = [ "core2", "digest 0.10.3", "multihash-derive", - "sha2 0.10.2", + "sha2 0.10.6", "sha3", "unsigned-varint", ] @@ -4393,6 +4437,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" + [[package]] name = "ntapi" version = "0.3.6" @@ -4611,7 +4661,6 @@ checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4625,7 +4674,6 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support", "frame-system", @@ -4641,7 +4689,6 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support", "frame-system", @@ -4656,7 +4703,6 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4680,7 +4726,6 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4700,7 +4745,6 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-election-provider-support", "frame-support", @@ -4719,7 +4763,6 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4734,7 +4777,6 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "beefy-primitives", "frame-support", @@ -4750,7 +4792,6 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "array-bytes", "beefy-merkle-tree", @@ -4773,7 +4814,6 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4791,7 +4831,6 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4810,7 +4849,6 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4827,7 +4865,6 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "assert_matches", "frame-benchmarking", @@ -4844,7 +4881,6 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4862,7 +4898,6 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4886,7 +4921,6 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4899,7 +4933,6 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4917,7 +4950,6 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4935,7 +4967,6 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4950,7 +4981,6 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4973,7 +5003,6 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4989,7 +5018,6 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5009,7 +5037,6 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5026,7 +5053,6 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5043,7 +5069,6 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5061,7 +5086,6 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "anyhow", "jsonrpsee", @@ -5077,7 +5101,6 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5093,7 +5116,6 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support", "frame-system", @@ -5110,7 +5132,6 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5130,7 +5151,6 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", "sp-api", @@ -5140,7 +5160,6 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support", "frame-system", @@ -5157,7 +5176,6 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5180,7 +5198,6 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5197,7 +5214,6 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5212,7 +5228,6 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5230,7 +5245,6 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5245,7 +5259,6 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5263,7 +5276,6 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5274,12 +5286,12 @@ 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#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support", "frame-system", @@ -5300,7 +5312,6 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5316,7 +5327,6 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support", "frame-system", @@ -5330,7 +5340,6 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5353,7 +5362,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5364,7 +5372,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "log", "sp-arithmetic", @@ -5390,7 +5397,6 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support", "frame-system", @@ -5404,7 +5410,6 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5422,7 +5427,6 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5441,7 +5445,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-support", "frame-system", @@ -5457,7 +5460,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5473,7 +5475,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5485,7 +5486,6 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5499,10 +5499,23 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-uniques" +version = "4.0.0-dev" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5518,7 +5531,6 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5533,7 +5545,6 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6008,7 +6019,7 @@ dependencies = [ name = "polkadot-cli" version = "0.9.31" dependencies = [ - "clap", + "clap 3.2.22", "frame-benchmarking-cli", "futures", "log", @@ -7259,7 +7270,7 @@ version = "0.9.31" dependencies = [ "assert_matches", "async-trait", - "clap", + "clap 3.2.22", "color-eyre", "futures", "futures-timer", @@ -7406,7 +7417,7 @@ dependencies = [ name = "polkadot-voter-bags" version = "0.9.31" dependencies = [ - "clap", + "clap 3.2.22", "generate-bags", "kusama-runtime", "polkadot-runtime", @@ -7611,7 +7622,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" dependencies = [ "dtoa", - "itoa", + "itoa 1.0.3", "parking_lot 0.12.1", "prometheus-client-derive-text-encode", ] @@ -7989,7 +8000,7 @@ checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" name = "remote-ext-tests-bags-list" version = "0.9.31" dependencies = [ - "clap", + "clap 3.2.22", "frame-system", "kusama-runtime", "kusama-runtime-constants", @@ -8007,9 +8018,8 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ - "env_logger 0.9.0", + "env_logger", "log", "parity-scale-codec", "serde", @@ -8333,7 +8343,7 @@ dependencies = [ name = "ryu" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9613b5a66ab9ba26415184cfc41156594925a9cf3a2057e57f31ff145f6568" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "same-file" @@ -8347,7 +8357,6 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "log", "sp-core", @@ -8358,7 +8367,6 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "futures", @@ -8385,7 +8393,6 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "futures", "futures-timer", @@ -8408,7 +8415,6 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8424,7 +8430,6 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "impl-trait-for-tuples", "memmap2", @@ -8441,7 +8446,6 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8452,11 +8456,10 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "array-bytes", "chrono", - "clap", + "clap 4.0.18", "fdlimit", "futures", "libp2p", @@ -8492,7 +8495,6 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "fnv", "futures", @@ -8520,7 +8522,6 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "hash-db", "kvdb", @@ -8545,7 +8546,6 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "futures", @@ -8569,7 +8569,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "fork-tree", @@ -8610,7 +8609,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "futures", "jsonrpsee", @@ -8632,7 +8630,6 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8645,7 +8642,6 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "futures", @@ -8669,7 +8665,6 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "lazy_static", "lru", @@ -8696,7 +8691,6 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "environmental", "parity-scale-codec", @@ -8712,7 +8706,6 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "log", "parity-scale-codec", @@ -8727,7 +8720,6 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "cfg-if", "libc", @@ -8747,7 +8739,6 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "ahash", "array-bytes", @@ -8788,7 +8779,6 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "finality-grandpa", "futures", @@ -8809,7 +8799,6 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "ansi_term", "futures", @@ -8826,7 +8815,6 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "array-bytes", "async-trait", @@ -8841,7 +8829,6 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "array-bytes", "async-trait", @@ -8888,7 +8875,6 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "cid", "futures", @@ -8908,7 +8894,6 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "bitflags", @@ -8934,7 +8919,6 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "ahash", "futures", @@ -8952,7 +8936,6 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "array-bytes", "futures", @@ -8973,14 +8956,13 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "array-bytes", "fork-tree", "futures", "libp2p", "log", - "lru", + "lru 0.7.8", "mockall", "parity-scale-codec", "prost", @@ -9003,7 +8985,6 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "array-bytes", "futures", @@ -9022,7 +9003,6 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "array-bytes", "bytes", @@ -9052,7 +9032,6 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "futures", "libp2p", @@ -9065,7 +9044,6 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9074,7 +9052,6 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "futures", "hash-db", @@ -9104,7 +9081,6 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "futures", "jsonrpsee", @@ -9127,7 +9103,6 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "futures", "jsonrpsee", @@ -9140,7 +9115,6 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "futures", "hex", @@ -9159,7 +9133,6 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "directories", @@ -9230,7 +9203,6 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "log", "parity-scale-codec", @@ -9244,7 +9216,6 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9263,7 +9234,6 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "futures", "libc", @@ -9282,7 +9252,6 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "chrono", "futures", @@ -9300,7 +9269,6 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "ansi_term", "atty", @@ -9331,7 +9299,6 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9342,7 +9309,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "futures", @@ -9369,7 +9335,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "futures", @@ -9383,7 +9348,6 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "futures", "futures-timer", @@ -9698,11 +9662,11 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.0" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f935e31cf406e8c0e96c2815a5516181b7004ae8c5f296293221e9b1e356bd" +checksum = "e2904bea16a1ae962b483322a1c7b81d976029203aea1f461e51cd7705db7ba9" dependencies = [ - "digest 0.10.3", + "digest 0.10.5", "keccak", ] @@ -9864,7 +9828,6 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "hash-db", "log", @@ -9882,7 +9845,6 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "blake2", "proc-macro-crate", @@ -9894,7 +9856,6 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", "scale-info", @@ -9907,7 +9868,6 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "integer-sqrt", "num-traits", @@ -9922,7 +9882,6 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", "scale-info", @@ -9935,7 +9894,6 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "parity-scale-codec", @@ -9947,7 +9905,6 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", "sp-api", @@ -9959,7 +9916,6 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "futures", "log", @@ -9977,7 +9933,6 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "futures", @@ -9996,7 +9951,6 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "merlin", @@ -10019,7 +9973,6 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10033,7 +9986,6 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10046,7 +9998,6 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "array-bytes", "base58", @@ -10092,12 +10043,11 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "blake2", "byteorder", - "digest 0.10.3", - "sha2 0.10.2", + "digest 0.10.5", + "sha2 0.10.6", "sha3", "sp-std", "twox-hash", @@ -10106,7 +10056,6 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "proc-macro2", "quote", @@ -10117,7 +10066,6 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10126,7 +10074,6 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "proc-macro2", "quote", @@ -10136,7 +10083,6 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "environmental", "parity-scale-codec", @@ -10147,7 +10093,6 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "finality-grandpa", "log", @@ -10165,7 +10110,6 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10179,7 +10123,6 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "bytes", "futures", @@ -10205,7 +10148,6 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "lazy_static", "sp-core", @@ -10216,7 +10158,6 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "futures", @@ -10233,7 +10174,6 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "thiserror", "zstd", @@ -10242,7 +10182,6 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "log", "parity-scale-codec", @@ -10259,7 +10198,6 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10273,7 +10211,6 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "sp-api", "sp-core", @@ -10283,7 +10220,6 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "backtrace", "lazy_static", @@ -10293,7 +10229,6 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "rustc-hash", "serde", @@ -10303,7 +10238,6 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "either", "hash256-std-hasher", @@ -10326,7 +10260,6 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10344,7 +10277,6 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "Inflector", "proc-macro-crate", @@ -10356,7 +10288,6 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "log", "parity-scale-codec", @@ -10370,7 +10301,6 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10384,7 +10314,6 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10395,7 +10324,6 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "hash-db", "log", @@ -10417,12 +10345,10 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10435,7 +10361,6 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "log", "sp-core", @@ -10448,7 +10373,6 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "futures-timer", @@ -10464,7 +10388,6 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", "sp-std", @@ -10476,7 +10399,6 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "sp-api", "sp-runtime", @@ -10485,7 +10407,6 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "log", @@ -10501,7 +10422,6 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "ahash", "hash-db", @@ -10524,7 +10444,6 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10541,7 +10460,6 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10552,7 +10470,6 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "impl-trait-for-tuples", "log", @@ -10565,7 +10482,6 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10620,7 +10536,7 @@ name = "staking-miner" version = "0.9.31" dependencies = [ "assert_cmd", - "clap", + "clap 3.2.22", "exitcode", "frame-election-provider-support", "frame-support", @@ -10780,7 +10696,6 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "platforms", ] @@ -10788,7 +10703,6 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -10809,7 +10723,6 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "futures-util", "hyper", @@ -10822,7 +10735,6 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "async-trait", "jsonrpsee", @@ -10835,7 +10747,6 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "jsonrpsee", "log", @@ -10856,7 +10767,6 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "array-bytes", "async-trait", @@ -10882,7 +10792,6 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "futures", "substrate-test-utils-derive", @@ -10892,7 +10801,6 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10903,7 +10811,6 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ "ansi_term", "build-helper", @@ -11057,7 +10964,7 @@ dependencies = [ name = "test-parachain-adder-collator" version = "0.9.31" dependencies = [ - "clap", + "clap 3.2.22", "futures", "futures-timer", "log", @@ -11104,7 +11011,7 @@ dependencies = [ name = "test-parachain-undying-collator" version = "0.9.31" dependencies = [ - "clap", + "clap 3.2.22", "futures", "futures-timer", "log", @@ -11610,10 +11517,8 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#a6da808575fe403ab2bd7f6cd009896cdc6fd71a" dependencies = [ - "clap", - "frame-try-runtime", + "clap 4.0.18", "log", "parity-scale-codec", "remote-externalities", @@ -12634,6 +12539,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", "xcm", "xcm-executor", ] @@ -12828,3 +12734,251 @@ dependencies = [ "cc", "libc", ] + +[[patch.unused]] +name = "chain-spec-builder" +version = "2.0.0" + +[[patch.unused]] +name = "frame-election-solution-type-fuzzer" +version = "2.0.0-alpha.5" + +[[patch.unused]] +name = "frame-support-test-compile-pass" +version = "4.0.0-dev" + +[[patch.unused]] +name = "kitchensink-runtime" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-bench" +version = "0.9.0-dev" + +[[patch.unused]] +name = "node-cli" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-executor" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-inspect" +version = "0.9.0-dev" + +[[patch.unused]] +name = "node-primitives" +version = "2.0.0" + +[[patch.unused]] +name = "node-rpc" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-runtime-generate-bags" +version = "3.0.0" + +[[patch.unused]] +name = "node-template" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-template-runtime" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-testing" +version = "3.0.0-dev" + +[[patch.unused]] +name = "pallet-alliance" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-asset-tx-payment" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-atomic-swap" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-aura" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-bags-list-fuzzer" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts-primitives" +version = "6.0.0" + +[[patch.unused]] +name = "pallet-contracts-proc-macro" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-basic" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-offchain-worker" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-parallel" +version = "3.0.0-dev" + +[[patch.unused]] +name = "pallet-lottery" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-message-queue" +version = "0.9.29" + +[[patch.unused]] +name = "pallet-nicks" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-node-authorization" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-nomination-pools-test-staking" +version = "1.0.0" + +[[patch.unused]] +name = "pallet-randomness-collective-flip" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-remark" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-root-offences" +version = "1.0.0" + +[[patch.unused]] +name = "pallet-scored-pool" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-state-trie-migration" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-template" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-transaction-storage" +version = "4.0.0-dev" + +[[patch.unused]] +name = "sc-consensus-aura" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-consensus-manual-seal" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-consensus-pow" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-consensus-uncles" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-network-test" +version = "0.8.0" + +[[patch.unused]] +name = "sc-runtime-test" +version = "2.0.0" + +[[patch.unused]] +name = "sc-service-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-api-test" +version = "2.0.1" + +[[patch.unused]] +name = "sp-application-crypto-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-arithmetic-fuzzer" +version = "2.0.0" + +[[patch.unused]] +name = "sp-consensus-aura" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-consensus-pow" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-npos-elections-fuzzer" +version = "2.0.0-alpha.5" + +[[patch.unused]] +name = "sp-runtime-interface-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-runtime-interface-test-wasm" +version = "2.0.0" + +[[patch.unused]] +name = "sp-runtime-interface-test-wasm-deprecated" +version = "2.0.0" + +[[patch.unused]] +name = "sp-serializer" +version = "4.0.0-dev" + +[[patch.unused]] +name = "sp-test-primitives" +version = "2.0.0" + +[[patch.unused]] +name = "subkey" +version = "2.0.2" + +[[patch.unused]] +name = "substrate-frame-cli" +version = "4.0.0-dev" + +[[patch.unused]] +name = "substrate-frame-rpc-support" +version = "3.0.0" + +[[patch.unused]] +name = "substrate-test-runtime" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-runtime-client" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-runtime-transaction-pool" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-utils-test-crate" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index d6ff78d801e2..848108e6798d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -197,6 +197,250 @@ try-runtime = [ "polkadot-cli/try-runtime" ] fast-runtime = [ "polkadot-cli/fast-runtime" ] runtime-metrics = [ "polkadot-cli/runtime-metrics" ] pyroscope = ["polkadot-cli/pyroscope"] +[patch."https://github.com/paritytech/substrate"] +node-template ={path = "/Users/gav/Core/substrate/bin/node-template/node" } +frame-benchmarking ={path = "/Users/gav/Core/substrate/frame/benchmarking" } +frame-support ={path = "/Users/gav/Core/substrate/frame/support" } +frame-support-procedural ={path = "/Users/gav/Core/substrate/frame/support/procedural" } +frame-support-procedural-tools ={path = "/Users/gav/Core/substrate/frame/support/procedural/tools" } +frame-support-procedural-tools-derive ={path = "/Users/gav/Core/substrate/frame/support/procedural/tools/derive" } +sp-api ={path = "/Users/gav/Core/substrate/primitives/api" } +sp-api-proc-macro ={path = "/Users/gav/Core/substrate/primitives/api/proc-macro" } +sp-core ={path = "/Users/gav/Core/substrate/primitives/core" } +sp-core-hashing ={path = "/Users/gav/Core/substrate/primitives/core/hashing" } +sp-std ={path = "/Users/gav/Core/substrate/primitives/std" } +sp-debug-derive ={path = "/Users/gav/Core/substrate/primitives/debug-derive" } +sp-externalities ={path = "/Users/gav/Core/substrate/primitives/externalities" } +sp-storage ={path = "/Users/gav/Core/substrate/primitives/storage" } +sp-runtime-interface ={path = "/Users/gav/Core/substrate/primitives/runtime-interface" } +sp-runtime-interface-proc-macro ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/proc-macro" } +sp-tracing ={path = "/Users/gav/Core/substrate/primitives/tracing" } +sp-wasm-interface ={path = "/Users/gav/Core/substrate/primitives/wasm-interface" } +sp-io ={path = "/Users/gav/Core/substrate/primitives/io" } +sp-keystore ={path = "/Users/gav/Core/substrate/primitives/keystore" } +sp-state-machine ={path = "/Users/gav/Core/substrate/primitives/state-machine" } +sp-panic-handler ={path = "/Users/gav/Core/substrate/primitives/panic-handler" } +sp-trie ={path = "/Users/gav/Core/substrate/primitives/trie" } +sp-runtime ={path = "/Users/gav/Core/substrate/primitives/runtime" } +sp-application-crypto ={path = "/Users/gav/Core/substrate/primitives/application-crypto" } +sp-arithmetic ={path = "/Users/gav/Core/substrate/primitives/arithmetic" } +sp-weights ={path = "/Users/gav/Core/substrate/primitives/weights" } +substrate-test-runtime-client ={path = "/Users/gav/Core/substrate/test-utils/runtime/client" } +sc-block-builder ={path = "/Users/gav/Core/substrate/client/block-builder" } +sc-client-api ={path = "/Users/gav/Core/substrate/client/api" } +substrate-prometheus-endpoint ={path = "/Users/gav/Core/substrate/utils/prometheus" } +sc-executor ={path = "/Users/gav/Core/substrate/client/executor" } +sc-executor-common ={path = "/Users/gav/Core/substrate/client/executor/common" } +sc-allocator ={path = "/Users/gav/Core/substrate/client/allocator" } +sp-maybe-compressed-blob ={path = "/Users/gav/Core/substrate/primitives/maybe-compressed-blob" } +sp-sandbox ={path = "/Users/gav/Core/substrate/primitives/sandbox" } +sc-executor-wasmi ={path = "/Users/gav/Core/substrate/client/executor/wasmi" } +sc-executor-wasmtime ={path = "/Users/gav/Core/substrate/client/executor/wasmtime" } +sc-runtime-test ={path = "/Users/gav/Core/substrate/client/executor/runtime-test" } +sp-tasks ={path = "/Users/gav/Core/substrate/primitives/tasks" } +substrate-wasm-builder ={path = "/Users/gav/Core/substrate/utils/wasm-builder" } +sp-core-hashing-proc-macro ={path = "/Users/gav/Core/substrate/primitives/core/hashing/proc-macro" } +sp-version ={path = "/Users/gav/Core/substrate/primitives/version" } +sp-version-proc-macro ={path = "/Users/gav/Core/substrate/primitives/version/proc-macro" } +sc-tracing ={path = "/Users/gav/Core/substrate/client/tracing" } +sc-rpc-server ={path = "/Users/gav/Core/substrate/client/rpc-servers" } +sc-tracing-proc-macro ={path = "/Users/gav/Core/substrate/client/tracing/proc-macro" } +sp-blockchain ={path = "/Users/gav/Core/substrate/primitives/blockchain" } +sp-consensus ={path = "/Users/gav/Core/substrate/primitives/consensus/common" } +sp-inherents ={path = "/Users/gav/Core/substrate/primitives/inherents" } +sp-test-primitives ={path = "/Users/gav/Core/substrate/primitives/test-primitives" } +sp-database ={path = "/Users/gav/Core/substrate/primitives/database" } +sp-rpc ={path = "/Users/gav/Core/substrate/primitives/rpc" } +substrate-test-runtime ={path = "/Users/gav/Core/substrate/test-utils/runtime" } +beefy-merkle-tree ={path = "/Users/gav/Core/substrate/frame/beefy-mmr/primitives" } +beefy-primitives ={path = "/Users/gav/Core/substrate/primitives/beefy" } +sp-mmr-primitives ={path = "/Users/gav/Core/substrate/primitives/merkle-mountain-range" } +frame-system ={path = "/Users/gav/Core/substrate/frame/system" } +frame-system-rpc-runtime-api ={path = "/Users/gav/Core/substrate/frame/system/rpc/runtime-api" } +pallet-babe ={path = "/Users/gav/Core/substrate/frame/babe" } +pallet-authorship ={path = "/Users/gav/Core/substrate/frame/authorship" } +sp-authorship ={path = "/Users/gav/Core/substrate/primitives/authorship" } +pallet-session ={path = "/Users/gav/Core/substrate/frame/session" } +pallet-timestamp ={path = "/Users/gav/Core/substrate/frame/timestamp" } +sp-timestamp ={path = "/Users/gav/Core/substrate/primitives/timestamp" } +sp-session ={path = "/Users/gav/Core/substrate/primitives/session" } +sp-staking ={path = "/Users/gav/Core/substrate/primitives/staking" } +sp-consensus-babe ={path = "/Users/gav/Core/substrate/primitives/consensus/babe" } +sp-consensus-slots ={path = "/Users/gav/Core/substrate/primitives/consensus/slots" } +sp-consensus-vrf ={path = "/Users/gav/Core/substrate/primitives/consensus/vrf" } +frame-election-provider-support ={path = "/Users/gav/Core/substrate/frame/election-provider-support" } +frame-election-provider-solution-type ={path = "/Users/gav/Core/substrate/frame/election-provider-support/solution-type" } +sp-npos-elections ={path = "/Users/gav/Core/substrate/primitives/npos-elections" } +substrate-test-utils ={path = "/Users/gav/Core/substrate/test-utils" } +substrate-test-utils-derive ={path = "/Users/gav/Core/substrate/test-utils/derive" } +sc-service ={path = "/Users/gav/Core/substrate/client/service" } +sc-chain-spec ={path = "/Users/gav/Core/substrate/client/chain-spec" } +sc-chain-spec-derive ={path = "/Users/gav/Core/substrate/client/chain-spec/derive" } +sc-network-common ={path = "/Users/gav/Core/substrate/client/network/common" } +sc-consensus ={path = "/Users/gav/Core/substrate/client/consensus/common" } +sc-utils ={path = "/Users/gav/Core/substrate/client/utils" } +sc-peerset ={path = "/Users/gav/Core/substrate/client/peerset" } +sp-finality-grandpa ={path = "/Users/gav/Core/substrate/primitives/finality-grandpa" } +sc-telemetry ={path = "/Users/gav/Core/substrate/client/telemetry" } +sc-client-db ={path = "/Users/gav/Core/substrate/client/db" } +sc-state-db ={path = "/Users/gav/Core/substrate/client/state-db" } +kitchensink-runtime ={path = "/Users/gav/Core/substrate/bin/node/runtime" } +frame-executive ={path = "/Users/gav/Core/substrate/frame/executive" } +frame-try-runtime ={path = "/Users/gav/Core/substrate/frame/try-runtime" } +pallet-balances ={path = "/Users/gav/Core/substrate/frame/balances" } +pallet-transaction-payment ={path = "/Users/gav/Core/substrate/frame/transaction-payment" } +frame-system-benchmarking ={path = "/Users/gav/Core/substrate/frame/system/benchmarking" } +node-primitives ={path = "/Users/gav/Core/substrate/bin/node/primitives" } +pallet-alliance ={path = "/Users/gav/Core/substrate/frame/alliance" } +pallet-collective ={path = "/Users/gav/Core/substrate/frame/collective" } +pallet-identity ={path = "/Users/gav/Core/substrate/frame/identity" } +pallet-asset-tx-payment ={path = "/Users/gav/Core/substrate/frame/transaction-payment/asset-tx-payment" } +pallet-assets ={path = "/Users/gav/Core/substrate/frame/assets" } +pallet-authority-discovery ={path = "/Users/gav/Core/substrate/frame/authority-discovery" } +sp-authority-discovery ={path = "/Users/gav/Core/substrate/primitives/authority-discovery" } +pallet-bags-list ={path = "/Users/gav/Core/substrate/frame/bags-list" } +pallet-bounties ={path = "/Users/gav/Core/substrate/frame/bounties" } +pallet-treasury ={path = "/Users/gav/Core/substrate/frame/treasury" } +pallet-child-bounties ={path = "/Users/gav/Core/substrate/frame/child-bounties" } +pallet-contracts ={path = "/Users/gav/Core/substrate/frame/contracts" } +pallet-contracts-primitives ={path = "/Users/gav/Core/substrate/frame/contracts/primitives" } +pallet-contracts-proc-macro ={path = "/Users/gav/Core/substrate/frame/contracts/proc-macro" } +pallet-randomness-collective-flip ={path = "/Users/gav/Core/substrate/frame/randomness-collective-flip" } +pallet-utility ={path = "/Users/gav/Core/substrate/frame/utility" } +pallet-conviction-voting ={path = "/Users/gav/Core/substrate/frame/conviction-voting" } +pallet-scheduler ={path = "/Users/gav/Core/substrate/frame/scheduler" } +pallet-preimage ={path = "/Users/gav/Core/substrate/frame/preimage" } +pallet-democracy ={path = "/Users/gav/Core/substrate/frame/democracy" } +pallet-election-provider-multi-phase ={path = "/Users/gav/Core/substrate/frame/election-provider-multi-phase" } +pallet-election-provider-support-benchmarking ={path = "/Users/gav/Core/substrate/frame/election-provider-support/benchmarking" } +pallet-elections-phragmen ={path = "/Users/gav/Core/substrate/frame/elections-phragmen" } +pallet-fast-unstake ={path = "/Users/gav/Core/substrate/frame/fast-unstake" } +pallet-staking ={path = "/Users/gav/Core/substrate/frame/staking" } +pallet-staking-reward-curve ={path = "/Users/gav/Core/substrate/frame/staking/reward-curve" } +pallet-gilt ={path = "/Users/gav/Core/substrate/frame/gilt" } +pallet-grandpa ={path = "/Users/gav/Core/substrate/frame/grandpa" } +pallet-offences ={path = "/Users/gav/Core/substrate/frame/offences" } +sp-keyring ={path = "/Users/gav/Core/substrate/primitives/keyring" } +pallet-im-online ={path = "/Users/gav/Core/substrate/frame/im-online" } +pallet-indices ={path = "/Users/gav/Core/substrate/frame/indices" } +pallet-lottery ={path = "/Users/gav/Core/substrate/frame/lottery" } +frame-support-test ={path = "/Users/gav/Core/substrate/frame/support/test" } +frame-support-test-pallet ={path = "/Users/gav/Core/substrate/frame/support/test/pallet" } +pallet-membership ={path = "/Users/gav/Core/substrate/frame/membership" } +pallet-message-queue ={path = "/Users/gav/Core/substrate/frame/message-queue" } +pallet-mmr ={path = "/Users/gav/Core/substrate/frame/merkle-mountain-range" } +pallet-multisig ={path = "/Users/gav/Core/substrate/frame/multisig" } +pallet-nomination-pools ={path = "/Users/gav/Core/substrate/frame/nomination-pools" } +pallet-nomination-pools-benchmarking ={path = "/Users/gav/Core/substrate/frame/nomination-pools/benchmarking" } +pallet-nomination-pools-runtime-api ={path = "/Users/gav/Core/substrate/frame/nomination-pools/runtime-api" } +pallet-offences-benchmarking ={path = "/Users/gav/Core/substrate/frame/offences/benchmarking" } +pallet-proxy ={path = "/Users/gav/Core/substrate/frame/proxy" } +pallet-ranked-collective ={path = "/Users/gav/Core/substrate/frame/ranked-collective" } +pallet-recovery ={path = "/Users/gav/Core/substrate/frame/recovery" } +pallet-referenda ={path = "/Users/gav/Core/substrate/frame/referenda" } +pallet-remark ={path = "/Users/gav/Core/substrate/frame/remark" } +pallet-session-benchmarking ={path = "/Users/gav/Core/substrate/frame/session/benchmarking" } +pallet-society ={path = "/Users/gav/Core/substrate/frame/society" } +pallet-state-trie-migration ={path = "/Users/gav/Core/substrate/frame/state-trie-migration" } +remote-externalities ={path = "/Users/gav/Core/substrate/utils/frame/remote-externalities" } +substrate-rpc-client ={path = "/Users/gav/Core/substrate/utils/frame/rpc/client" } +sc-rpc-api ={path = "/Users/gav/Core/substrate/client/rpc-api" } +sc-transaction-pool-api ={path = "/Users/gav/Core/substrate/client/transaction-pool/api" } +substrate-state-trie-migration-rpc ={path = "/Users/gav/Core/substrate/utils/frame/rpc/state-trie-migration-rpc" } +pallet-sudo ={path = "/Users/gav/Core/substrate/frame/sudo" } +pallet-tips ={path = "/Users/gav/Core/substrate/frame/tips" } +pallet-transaction-payment-rpc-runtime-api ={path = "/Users/gav/Core/substrate/frame/transaction-payment/rpc/runtime-api" } +pallet-transaction-storage ={path = "/Users/gav/Core/substrate/frame/transaction-storage" } +sp-transaction-storage-proof ={path = "/Users/gav/Core/substrate/primitives/transaction-storage-proof" } +pallet-uniques ={path = "/Users/gav/Core/substrate/frame/uniques" } +pallet-vesting ={path = "/Users/gav/Core/substrate/frame/vesting" } +pallet-whitelist ={path = "/Users/gav/Core/substrate/frame/whitelist" } +sp-block-builder ={path = "/Users/gav/Core/substrate/primitives/block-builder" } +sp-offchain ={path = "/Users/gav/Core/substrate/primitives/offchain" } +sp-transaction-pool ={path = "/Users/gav/Core/substrate/primitives/transaction-pool" } +sc-informant ={path = "/Users/gav/Core/substrate/client/informant" } +sc-keystore ={path = "/Users/gav/Core/substrate/client/keystore" } +sc-network ={path = "/Users/gav/Core/substrate/client/network" } +fork-tree ={path = "/Users/gav/Core/substrate/utils/fork-tree" } +sc-network-light ={path = "/Users/gav/Core/substrate/client/network/light" } +sc-network-sync ={path = "/Users/gav/Core/substrate/client/network/sync" } +sc-network-bitswap ={path = "/Users/gav/Core/substrate/client/network/bitswap" } +sc-network-transactions ={path = "/Users/gav/Core/substrate/client/network/transactions" } +sc-offchain ={path = "/Users/gav/Core/substrate/client/offchain" } +sc-transaction-pool ={path = "/Users/gav/Core/substrate/client/transaction-pool" } +substrate-test-runtime-transaction-pool ={path = "/Users/gav/Core/substrate/test-utils/runtime/transaction-pool" } +sc-rpc ={path = "/Users/gav/Core/substrate/client/rpc" } +sc-rpc-spec-v2 ={path = "/Users/gav/Core/substrate/client/rpc-spec-v2" } +sc-sysinfo ={path = "/Users/gav/Core/substrate/client/sysinfo" } +sp-consensus-aura ={path = "/Users/gav/Core/substrate/primitives/consensus/aura" } +substrate-test-client ={path = "/Users/gav/Core/substrate/test-utils/client" } +sp-runtime-interface-test-wasm ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/test-wasm" } +sp-serializer ={path = "/Users/gav/Core/substrate/primitives/serializer" } +frame-benchmarking-cli ={path = "/Users/gav/Core/substrate/utils/frame/benchmarking-cli" } +sc-cli ={path = "/Users/gav/Core/substrate/client/cli" } +node-template-runtime ={path = "/Users/gav/Core/substrate/bin/node-template/runtime" } +pallet-aura ={path = "/Users/gav/Core/substrate/frame/aura" } +pallet-template ={path = "/Users/gav/Core/substrate/bin/node-template/pallets/template" } +pallet-transaction-payment-rpc ={path = "/Users/gav/Core/substrate/frame/transaction-payment/rpc" } +sc-basic-authorship ={path = "/Users/gav/Core/substrate/client/basic-authorship" } +sc-proposer-metrics ={path = "/Users/gav/Core/substrate/client/proposer-metrics" } +sc-consensus-aura ={path = "/Users/gav/Core/substrate/client/consensus/aura" } +sc-consensus-slots ={path = "/Users/gav/Core/substrate/client/consensus/slots" } +sc-network-test ={path = "/Users/gav/Core/substrate/client/network/test" } +sc-finality-grandpa ={path = "/Users/gav/Core/substrate/client/finality-grandpa" } +sc-network-gossip ={path = "/Users/gav/Core/substrate/client/network-gossip" } +substrate-frame-rpc-system ={path = "/Users/gav/Core/substrate/utils/frame/rpc/system" } +try-runtime-cli ={path = "/Users/gav/Core/substrate/utils/frame/try-runtime/cli" } +substrate-build-script-utils ={path = "/Users/gav/Core/substrate/utils/build-script-utils" } +node-bench ={path = "/Users/gav/Core/substrate/bin/node/bench" } +node-testing ={path = "/Users/gav/Core/substrate/bin/node/testing" } +node-executor ={path = "/Users/gav/Core/substrate/bin/node/executor" } +node-cli ={path = "/Users/gav/Core/substrate/bin/node/cli" } +node-inspect ={path = "/Users/gav/Core/substrate/bin/node/inspect" } +node-rpc ={path = "/Users/gav/Core/substrate/bin/node/rpc" } +pallet-mmr-rpc ={path = "/Users/gav/Core/substrate/frame/merkle-mountain-range/rpc" } +sc-consensus-babe ={path = "/Users/gav/Core/substrate/client/consensus/babe" } +sc-consensus-epochs ={path = "/Users/gav/Core/substrate/client/consensus/epochs" } +sc-consensus-babe-rpc ={path = "/Users/gav/Core/substrate/client/consensus/babe/rpc" } +sc-finality-grandpa-rpc ={path = "/Users/gav/Core/substrate/client/finality-grandpa/rpc" } +sc-sync-state-rpc ={path = "/Users/gav/Core/substrate/client/sync-state-rpc" } +sc-authority-discovery ={path = "/Users/gav/Core/substrate/client/authority-discovery" } +sc-consensus-uncles ={path = "/Users/gav/Core/substrate/client/consensus/uncles" } +sc-service-test ={path = "/Users/gav/Core/substrate/client/service/test" } +substrate-frame-cli ={path = "/Users/gav/Core/substrate/utils/frame/frame-utilities-cli" } +chain-spec-builder ={path = "/Users/gav/Core/substrate/bin/utils/chain-spec-builder" } +subkey ={path = "/Users/gav/Core/substrate/bin/utils/subkey" } +beefy-gadget ={path = "/Users/gav/Core/substrate/client/beefy" } +beefy-gadget-rpc ={path = "/Users/gav/Core/substrate/client/beefy/rpc" } +sc-consensus-manual-seal ={path = "/Users/gav/Core/substrate/client/consensus/manual-seal" } +sc-consensus-pow ={path = "/Users/gav/Core/substrate/client/consensus/pow" } +sp-consensus-pow ={path = "/Users/gav/Core/substrate/primitives/consensus/pow" } +pallet-atomic-swap ={path = "/Users/gav/Core/substrate/frame/atomic-swap" } +pallet-bags-list-fuzzer ={path = "/Users/gav/Core/substrate/frame/bags-list/fuzzer" } +pallet-bags-list-remote-tests ={path = "/Users/gav/Core/substrate/frame/bags-list/remote-tests" } +pallet-beefy ={path = "/Users/gav/Core/substrate/frame/beefy" } +pallet-beefy-mmr ={path = "/Users/gav/Core/substrate/frame/beefy-mmr" } +frame-election-solution-type-fuzzer ={path = "/Users/gav/Core/substrate/frame/election-provider-support/solution-type/fuzzer" } +pallet-example-basic ={path = "/Users/gav/Core/substrate/frame/examples/basic" } +pallet-example-offchain-worker ={path = "/Users/gav/Core/substrate/frame/examples/offchain-worker" } +pallet-example-parallel ={path = "/Users/gav/Core/substrate/frame/examples/parallel" } +pallet-nicks ={path = "/Users/gav/Core/substrate/frame/nicks" } +pallet-node-authorization ={path = "/Users/gav/Core/substrate/frame/node-authorization" } +pallet-nomination-pools-test-staking ={path = "/Users/gav/Core/substrate/frame/nomination-pools/test-staking" } +pallet-scored-pool ={path = "/Users/gav/Core/substrate/frame/scored-pool" } +pallet-staking-reward-fn ={path = "/Users/gav/Core/substrate/frame/staking/reward-fn" } +pallet-root-offences ={path = "/Users/gav/Core/substrate/frame/root-offences" } +frame-support-test-compile-pass ={path = "/Users/gav/Core/substrate/frame/support/test/compile_pass" } +sp-api-test ={path = "/Users/gav/Core/substrate/primitives/api/test" } +sp-application-crypto-test ={path = "/Users/gav/Core/substrate/primitives/application-crypto/test" } +sp-arithmetic-fuzzer ={path = "/Users/gav/Core/substrate/primitives/arithmetic/fuzzer" } +sp-npos-elections-fuzzer ={path = "/Users/gav/Core/substrate/primitives/npos-elections/fuzzer" } +sp-runtime-interface-test ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/test" } +sp-runtime-interface-test-wasm-deprecated ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/test-wasm-deprecated" } +substrate-test-utils-test-crate ={path = "/Users/gav/Core/substrate/test-utils/test-crate" } +substrate-frame-rpc-support ={path = "/Users/gav/Core/substrate/utils/frame/rpc/support" } +generate-bags ={path = "/Users/gav/Core/substrate/utils/frame/generate-bags" } +node-runtime-generate-bags ={path = "/Users/gav/Core/substrate/utils/frame/generate-bags/node-runtime" } # Configuration for building a .deb package - for use with `cargo-deb` [package.metadata.deb] diff --git a/xcm/xcm-builder/Cargo.toml b/xcm/xcm-builder/Cargo.toml index 3b3f97fd823c..152b2eaf8b40 100644 --- a/xcm/xcm-builder/Cargo.toml +++ b/xcm/xcm-builder/Cargo.toml @@ -14,6 +14,7 @@ sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", d sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-weights = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -43,6 +44,7 @@ std = [ "sp-arithmetic/std", "sp-io/std", "sp-runtime/std", + "sp-weights/std", "frame-support/std", "polkadot-parachain/std", "pallet-transaction-payment/std", diff --git a/xcm/xcm-builder/src/lib.rs b/xcm/xcm-builder/src/lib.rs index e3473d55d5eb..a1bba7014a34 100644 --- a/xcm/xcm-builder/src/lib.rs +++ b/xcm/xcm-builder/src/lib.rs @@ -48,6 +48,9 @@ pub use barriers::{ AllowUnpaidExecutionFrom, IsChildSystemParachain, TakeWeightCredit, }; +mod process_xcm_message; +pub use process_xcm_message::ProcessXcmMessage; + mod currency_adapter; pub use currency_adapter::CurrencyAdapter; diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs new file mode 100644 index 000000000000..0e6acfe11cf3 --- /dev/null +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -0,0 +1,69 @@ +// Copyright 2020 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 . + +//! Implementation of `ProcessMessage` for an `ExecuteXcm` implementation. + +use sp_std::{fmt::Debug, marker::PhantomData}; +use sp_io::hashing::blake2_256; +use sp_weights::Weight; +use parity_scale_codec::{Decode, FullCodec, MaxEncodedLen}; +use scale_info::TypeInfo; +use frame_support::{ensure, traits::{ProcessMessage, ProcessMessageError}}; +use xcm::prelude::*; + +pub struct ProcessXcmMessage(PhantomData<(MessageOrigin, XcmExecutor, Call)>); +impl< + MessageOrigin: Into + FullCodec + MaxEncodedLen + Clone + Eq + PartialEq + TypeInfo + Debug, + XcmExecutor: ExecuteXcm, + Call, +> ProcessMessage for ProcessXcmMessage { + type Origin = MessageOrigin; + + /// Process the given message, using no more than `weight_limit` in weight to do so. + fn process_message( + message: &[u8], + origin: Self::Origin, + weight_limit: Weight, + ) -> Result<(bool, Weight), ProcessMessageError> { + let hash = blake2_256(message); + let versioned_message = VersionedXcm::::decode(&mut &message[..]) + .map_err(|_| ProcessMessageError::Corrupt)?; + let message = Xcm::::try_from(versioned_message) + .map_err(|_| ProcessMessageError::Unsupported)?; + let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; + let weight = Weight::from_ref_time(pre.weight_of()); + ensure!(weight.all_lte(weight_limit), ProcessMessageError::Overweight(weight)); + match XcmExecutor::execute(origin.into(), pre, hash, 0) { + Outcome::Complete(w) => { + Ok((true, Weight::from_ref_time(w))) + }, + Outcome::Incomplete(w, _) => { + Ok((false, Weight::from_ref_time(w))) + }, + Outcome::Error(_) => { + Err(ProcessMessageError::Unsupported) + } + } + } +} + +#[cfg(test)] +mod tests { + #[test] + fn process_message_works() { + + } +} \ No newline at end of file From 825878094c34f6c1cb2796817dd67cdfffe5cdd9 Mon Sep 17 00:00:00 2001 From: Gav Date: Fri, 11 Nov 2022 16:32:16 +0100 Subject: [PATCH 002/182] Migrate away from weights in host config --- Cargo.lock | 23 +- Cargo.toml | 244 ------ node/service/src/chain_spec.rs | 2 - roadmap/implementers-guide/src/runtime/ump.md | 32 +- .../implementers-guide/src/types/runtime.md | 5 - runtime/parachains/Cargo.toml | 1 + runtime/parachains/src/configuration.rs | 39 +- .../src/configuration/benchmarking.rs | 2 - .../parachains/src/configuration/migration.rs | 167 ++-- runtime/parachains/src/configuration/tests.rs | 12 - runtime/parachains/src/inclusion/mod.rs | 174 +++- runtime/parachains/src/initializer.rs | 7 +- runtime/parachains/src/lib.rs | 3 +- runtime/parachains/src/mock.rs | 107 ++- runtime/parachains/src/paras_inherent/mod.rs | 6 +- runtime/parachains/src/runtime_api_impl/v2.rs | 20 +- runtime/parachains/src/ump.rs | 761 ------------------ runtime/parachains/src/ump/benchmarking.rs | 5 +- runtime/parachains/src/ump/tests.rs | 187 +---- xcm/xcm-builder/src/process_xcm_message.rs | 42 +- 20 files changed, 370 insertions(+), 1469 deletions(-) delete mode 100644 runtime/parachains/src/ump.rs diff --git a/Cargo.lock b/Cargo.lock index 42358b08a15b..725a37887e03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5066,6 +5066,24 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-message-queue" +version = "0.9.29" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", +] + [[package]] name = "pallet-mmr" version = "4.0.0-dev" @@ -7053,6 +7071,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -12839,10 +12858,6 @@ version = "3.0.0-dev" name = "pallet-lottery" version = "4.0.0-dev" -[[patch.unused]] -name = "pallet-message-queue" -version = "0.9.29" - [[patch.unused]] name = "pallet-nicks" version = "4.0.0-dev" diff --git a/Cargo.toml b/Cargo.toml index 848108e6798d..d6ff78d801e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -197,250 +197,6 @@ try-runtime = [ "polkadot-cli/try-runtime" ] fast-runtime = [ "polkadot-cli/fast-runtime" ] runtime-metrics = [ "polkadot-cli/runtime-metrics" ] pyroscope = ["polkadot-cli/pyroscope"] -[patch."https://github.com/paritytech/substrate"] -node-template ={path = "/Users/gav/Core/substrate/bin/node-template/node" } -frame-benchmarking ={path = "/Users/gav/Core/substrate/frame/benchmarking" } -frame-support ={path = "/Users/gav/Core/substrate/frame/support" } -frame-support-procedural ={path = "/Users/gav/Core/substrate/frame/support/procedural" } -frame-support-procedural-tools ={path = "/Users/gav/Core/substrate/frame/support/procedural/tools" } -frame-support-procedural-tools-derive ={path = "/Users/gav/Core/substrate/frame/support/procedural/tools/derive" } -sp-api ={path = "/Users/gav/Core/substrate/primitives/api" } -sp-api-proc-macro ={path = "/Users/gav/Core/substrate/primitives/api/proc-macro" } -sp-core ={path = "/Users/gav/Core/substrate/primitives/core" } -sp-core-hashing ={path = "/Users/gav/Core/substrate/primitives/core/hashing" } -sp-std ={path = "/Users/gav/Core/substrate/primitives/std" } -sp-debug-derive ={path = "/Users/gav/Core/substrate/primitives/debug-derive" } -sp-externalities ={path = "/Users/gav/Core/substrate/primitives/externalities" } -sp-storage ={path = "/Users/gav/Core/substrate/primitives/storage" } -sp-runtime-interface ={path = "/Users/gav/Core/substrate/primitives/runtime-interface" } -sp-runtime-interface-proc-macro ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/proc-macro" } -sp-tracing ={path = "/Users/gav/Core/substrate/primitives/tracing" } -sp-wasm-interface ={path = "/Users/gav/Core/substrate/primitives/wasm-interface" } -sp-io ={path = "/Users/gav/Core/substrate/primitives/io" } -sp-keystore ={path = "/Users/gav/Core/substrate/primitives/keystore" } -sp-state-machine ={path = "/Users/gav/Core/substrate/primitives/state-machine" } -sp-panic-handler ={path = "/Users/gav/Core/substrate/primitives/panic-handler" } -sp-trie ={path = "/Users/gav/Core/substrate/primitives/trie" } -sp-runtime ={path = "/Users/gav/Core/substrate/primitives/runtime" } -sp-application-crypto ={path = "/Users/gav/Core/substrate/primitives/application-crypto" } -sp-arithmetic ={path = "/Users/gav/Core/substrate/primitives/arithmetic" } -sp-weights ={path = "/Users/gav/Core/substrate/primitives/weights" } -substrate-test-runtime-client ={path = "/Users/gav/Core/substrate/test-utils/runtime/client" } -sc-block-builder ={path = "/Users/gav/Core/substrate/client/block-builder" } -sc-client-api ={path = "/Users/gav/Core/substrate/client/api" } -substrate-prometheus-endpoint ={path = "/Users/gav/Core/substrate/utils/prometheus" } -sc-executor ={path = "/Users/gav/Core/substrate/client/executor" } -sc-executor-common ={path = "/Users/gav/Core/substrate/client/executor/common" } -sc-allocator ={path = "/Users/gav/Core/substrate/client/allocator" } -sp-maybe-compressed-blob ={path = "/Users/gav/Core/substrate/primitives/maybe-compressed-blob" } -sp-sandbox ={path = "/Users/gav/Core/substrate/primitives/sandbox" } -sc-executor-wasmi ={path = "/Users/gav/Core/substrate/client/executor/wasmi" } -sc-executor-wasmtime ={path = "/Users/gav/Core/substrate/client/executor/wasmtime" } -sc-runtime-test ={path = "/Users/gav/Core/substrate/client/executor/runtime-test" } -sp-tasks ={path = "/Users/gav/Core/substrate/primitives/tasks" } -substrate-wasm-builder ={path = "/Users/gav/Core/substrate/utils/wasm-builder" } -sp-core-hashing-proc-macro ={path = "/Users/gav/Core/substrate/primitives/core/hashing/proc-macro" } -sp-version ={path = "/Users/gav/Core/substrate/primitives/version" } -sp-version-proc-macro ={path = "/Users/gav/Core/substrate/primitives/version/proc-macro" } -sc-tracing ={path = "/Users/gav/Core/substrate/client/tracing" } -sc-rpc-server ={path = "/Users/gav/Core/substrate/client/rpc-servers" } -sc-tracing-proc-macro ={path = "/Users/gav/Core/substrate/client/tracing/proc-macro" } -sp-blockchain ={path = "/Users/gav/Core/substrate/primitives/blockchain" } -sp-consensus ={path = "/Users/gav/Core/substrate/primitives/consensus/common" } -sp-inherents ={path = "/Users/gav/Core/substrate/primitives/inherents" } -sp-test-primitives ={path = "/Users/gav/Core/substrate/primitives/test-primitives" } -sp-database ={path = "/Users/gav/Core/substrate/primitives/database" } -sp-rpc ={path = "/Users/gav/Core/substrate/primitives/rpc" } -substrate-test-runtime ={path = "/Users/gav/Core/substrate/test-utils/runtime" } -beefy-merkle-tree ={path = "/Users/gav/Core/substrate/frame/beefy-mmr/primitives" } -beefy-primitives ={path = "/Users/gav/Core/substrate/primitives/beefy" } -sp-mmr-primitives ={path = "/Users/gav/Core/substrate/primitives/merkle-mountain-range" } -frame-system ={path = "/Users/gav/Core/substrate/frame/system" } -frame-system-rpc-runtime-api ={path = "/Users/gav/Core/substrate/frame/system/rpc/runtime-api" } -pallet-babe ={path = "/Users/gav/Core/substrate/frame/babe" } -pallet-authorship ={path = "/Users/gav/Core/substrate/frame/authorship" } -sp-authorship ={path = "/Users/gav/Core/substrate/primitives/authorship" } -pallet-session ={path = "/Users/gav/Core/substrate/frame/session" } -pallet-timestamp ={path = "/Users/gav/Core/substrate/frame/timestamp" } -sp-timestamp ={path = "/Users/gav/Core/substrate/primitives/timestamp" } -sp-session ={path = "/Users/gav/Core/substrate/primitives/session" } -sp-staking ={path = "/Users/gav/Core/substrate/primitives/staking" } -sp-consensus-babe ={path = "/Users/gav/Core/substrate/primitives/consensus/babe" } -sp-consensus-slots ={path = "/Users/gav/Core/substrate/primitives/consensus/slots" } -sp-consensus-vrf ={path = "/Users/gav/Core/substrate/primitives/consensus/vrf" } -frame-election-provider-support ={path = "/Users/gav/Core/substrate/frame/election-provider-support" } -frame-election-provider-solution-type ={path = "/Users/gav/Core/substrate/frame/election-provider-support/solution-type" } -sp-npos-elections ={path = "/Users/gav/Core/substrate/primitives/npos-elections" } -substrate-test-utils ={path = "/Users/gav/Core/substrate/test-utils" } -substrate-test-utils-derive ={path = "/Users/gav/Core/substrate/test-utils/derive" } -sc-service ={path = "/Users/gav/Core/substrate/client/service" } -sc-chain-spec ={path = "/Users/gav/Core/substrate/client/chain-spec" } -sc-chain-spec-derive ={path = "/Users/gav/Core/substrate/client/chain-spec/derive" } -sc-network-common ={path = "/Users/gav/Core/substrate/client/network/common" } -sc-consensus ={path = "/Users/gav/Core/substrate/client/consensus/common" } -sc-utils ={path = "/Users/gav/Core/substrate/client/utils" } -sc-peerset ={path = "/Users/gav/Core/substrate/client/peerset" } -sp-finality-grandpa ={path = "/Users/gav/Core/substrate/primitives/finality-grandpa" } -sc-telemetry ={path = "/Users/gav/Core/substrate/client/telemetry" } -sc-client-db ={path = "/Users/gav/Core/substrate/client/db" } -sc-state-db ={path = "/Users/gav/Core/substrate/client/state-db" } -kitchensink-runtime ={path = "/Users/gav/Core/substrate/bin/node/runtime" } -frame-executive ={path = "/Users/gav/Core/substrate/frame/executive" } -frame-try-runtime ={path = "/Users/gav/Core/substrate/frame/try-runtime" } -pallet-balances ={path = "/Users/gav/Core/substrate/frame/balances" } -pallet-transaction-payment ={path = "/Users/gav/Core/substrate/frame/transaction-payment" } -frame-system-benchmarking ={path = "/Users/gav/Core/substrate/frame/system/benchmarking" } -node-primitives ={path = "/Users/gav/Core/substrate/bin/node/primitives" } -pallet-alliance ={path = "/Users/gav/Core/substrate/frame/alliance" } -pallet-collective ={path = "/Users/gav/Core/substrate/frame/collective" } -pallet-identity ={path = "/Users/gav/Core/substrate/frame/identity" } -pallet-asset-tx-payment ={path = "/Users/gav/Core/substrate/frame/transaction-payment/asset-tx-payment" } -pallet-assets ={path = "/Users/gav/Core/substrate/frame/assets" } -pallet-authority-discovery ={path = "/Users/gav/Core/substrate/frame/authority-discovery" } -sp-authority-discovery ={path = "/Users/gav/Core/substrate/primitives/authority-discovery" } -pallet-bags-list ={path = "/Users/gav/Core/substrate/frame/bags-list" } -pallet-bounties ={path = "/Users/gav/Core/substrate/frame/bounties" } -pallet-treasury ={path = "/Users/gav/Core/substrate/frame/treasury" } -pallet-child-bounties ={path = "/Users/gav/Core/substrate/frame/child-bounties" } -pallet-contracts ={path = "/Users/gav/Core/substrate/frame/contracts" } -pallet-contracts-primitives ={path = "/Users/gav/Core/substrate/frame/contracts/primitives" } -pallet-contracts-proc-macro ={path = "/Users/gav/Core/substrate/frame/contracts/proc-macro" } -pallet-randomness-collective-flip ={path = "/Users/gav/Core/substrate/frame/randomness-collective-flip" } -pallet-utility ={path = "/Users/gav/Core/substrate/frame/utility" } -pallet-conviction-voting ={path = "/Users/gav/Core/substrate/frame/conviction-voting" } -pallet-scheduler ={path = "/Users/gav/Core/substrate/frame/scheduler" } -pallet-preimage ={path = "/Users/gav/Core/substrate/frame/preimage" } -pallet-democracy ={path = "/Users/gav/Core/substrate/frame/democracy" } -pallet-election-provider-multi-phase ={path = "/Users/gav/Core/substrate/frame/election-provider-multi-phase" } -pallet-election-provider-support-benchmarking ={path = "/Users/gav/Core/substrate/frame/election-provider-support/benchmarking" } -pallet-elections-phragmen ={path = "/Users/gav/Core/substrate/frame/elections-phragmen" } -pallet-fast-unstake ={path = "/Users/gav/Core/substrate/frame/fast-unstake" } -pallet-staking ={path = "/Users/gav/Core/substrate/frame/staking" } -pallet-staking-reward-curve ={path = "/Users/gav/Core/substrate/frame/staking/reward-curve" } -pallet-gilt ={path = "/Users/gav/Core/substrate/frame/gilt" } -pallet-grandpa ={path = "/Users/gav/Core/substrate/frame/grandpa" } -pallet-offences ={path = "/Users/gav/Core/substrate/frame/offences" } -sp-keyring ={path = "/Users/gav/Core/substrate/primitives/keyring" } -pallet-im-online ={path = "/Users/gav/Core/substrate/frame/im-online" } -pallet-indices ={path = "/Users/gav/Core/substrate/frame/indices" } -pallet-lottery ={path = "/Users/gav/Core/substrate/frame/lottery" } -frame-support-test ={path = "/Users/gav/Core/substrate/frame/support/test" } -frame-support-test-pallet ={path = "/Users/gav/Core/substrate/frame/support/test/pallet" } -pallet-membership ={path = "/Users/gav/Core/substrate/frame/membership" } -pallet-message-queue ={path = "/Users/gav/Core/substrate/frame/message-queue" } -pallet-mmr ={path = "/Users/gav/Core/substrate/frame/merkle-mountain-range" } -pallet-multisig ={path = "/Users/gav/Core/substrate/frame/multisig" } -pallet-nomination-pools ={path = "/Users/gav/Core/substrate/frame/nomination-pools" } -pallet-nomination-pools-benchmarking ={path = "/Users/gav/Core/substrate/frame/nomination-pools/benchmarking" } -pallet-nomination-pools-runtime-api ={path = "/Users/gav/Core/substrate/frame/nomination-pools/runtime-api" } -pallet-offences-benchmarking ={path = "/Users/gav/Core/substrate/frame/offences/benchmarking" } -pallet-proxy ={path = "/Users/gav/Core/substrate/frame/proxy" } -pallet-ranked-collective ={path = "/Users/gav/Core/substrate/frame/ranked-collective" } -pallet-recovery ={path = "/Users/gav/Core/substrate/frame/recovery" } -pallet-referenda ={path = "/Users/gav/Core/substrate/frame/referenda" } -pallet-remark ={path = "/Users/gav/Core/substrate/frame/remark" } -pallet-session-benchmarking ={path = "/Users/gav/Core/substrate/frame/session/benchmarking" } -pallet-society ={path = "/Users/gav/Core/substrate/frame/society" } -pallet-state-trie-migration ={path = "/Users/gav/Core/substrate/frame/state-trie-migration" } -remote-externalities ={path = "/Users/gav/Core/substrate/utils/frame/remote-externalities" } -substrate-rpc-client ={path = "/Users/gav/Core/substrate/utils/frame/rpc/client" } -sc-rpc-api ={path = "/Users/gav/Core/substrate/client/rpc-api" } -sc-transaction-pool-api ={path = "/Users/gav/Core/substrate/client/transaction-pool/api" } -substrate-state-trie-migration-rpc ={path = "/Users/gav/Core/substrate/utils/frame/rpc/state-trie-migration-rpc" } -pallet-sudo ={path = "/Users/gav/Core/substrate/frame/sudo" } -pallet-tips ={path = "/Users/gav/Core/substrate/frame/tips" } -pallet-transaction-payment-rpc-runtime-api ={path = "/Users/gav/Core/substrate/frame/transaction-payment/rpc/runtime-api" } -pallet-transaction-storage ={path = "/Users/gav/Core/substrate/frame/transaction-storage" } -sp-transaction-storage-proof ={path = "/Users/gav/Core/substrate/primitives/transaction-storage-proof" } -pallet-uniques ={path = "/Users/gav/Core/substrate/frame/uniques" } -pallet-vesting ={path = "/Users/gav/Core/substrate/frame/vesting" } -pallet-whitelist ={path = "/Users/gav/Core/substrate/frame/whitelist" } -sp-block-builder ={path = "/Users/gav/Core/substrate/primitives/block-builder" } -sp-offchain ={path = "/Users/gav/Core/substrate/primitives/offchain" } -sp-transaction-pool ={path = "/Users/gav/Core/substrate/primitives/transaction-pool" } -sc-informant ={path = "/Users/gav/Core/substrate/client/informant" } -sc-keystore ={path = "/Users/gav/Core/substrate/client/keystore" } -sc-network ={path = "/Users/gav/Core/substrate/client/network" } -fork-tree ={path = "/Users/gav/Core/substrate/utils/fork-tree" } -sc-network-light ={path = "/Users/gav/Core/substrate/client/network/light" } -sc-network-sync ={path = "/Users/gav/Core/substrate/client/network/sync" } -sc-network-bitswap ={path = "/Users/gav/Core/substrate/client/network/bitswap" } -sc-network-transactions ={path = "/Users/gav/Core/substrate/client/network/transactions" } -sc-offchain ={path = "/Users/gav/Core/substrate/client/offchain" } -sc-transaction-pool ={path = "/Users/gav/Core/substrate/client/transaction-pool" } -substrate-test-runtime-transaction-pool ={path = "/Users/gav/Core/substrate/test-utils/runtime/transaction-pool" } -sc-rpc ={path = "/Users/gav/Core/substrate/client/rpc" } -sc-rpc-spec-v2 ={path = "/Users/gav/Core/substrate/client/rpc-spec-v2" } -sc-sysinfo ={path = "/Users/gav/Core/substrate/client/sysinfo" } -sp-consensus-aura ={path = "/Users/gav/Core/substrate/primitives/consensus/aura" } -substrate-test-client ={path = "/Users/gav/Core/substrate/test-utils/client" } -sp-runtime-interface-test-wasm ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/test-wasm" } -sp-serializer ={path = "/Users/gav/Core/substrate/primitives/serializer" } -frame-benchmarking-cli ={path = "/Users/gav/Core/substrate/utils/frame/benchmarking-cli" } -sc-cli ={path = "/Users/gav/Core/substrate/client/cli" } -node-template-runtime ={path = "/Users/gav/Core/substrate/bin/node-template/runtime" } -pallet-aura ={path = "/Users/gav/Core/substrate/frame/aura" } -pallet-template ={path = "/Users/gav/Core/substrate/bin/node-template/pallets/template" } -pallet-transaction-payment-rpc ={path = "/Users/gav/Core/substrate/frame/transaction-payment/rpc" } -sc-basic-authorship ={path = "/Users/gav/Core/substrate/client/basic-authorship" } -sc-proposer-metrics ={path = "/Users/gav/Core/substrate/client/proposer-metrics" } -sc-consensus-aura ={path = "/Users/gav/Core/substrate/client/consensus/aura" } -sc-consensus-slots ={path = "/Users/gav/Core/substrate/client/consensus/slots" } -sc-network-test ={path = "/Users/gav/Core/substrate/client/network/test" } -sc-finality-grandpa ={path = "/Users/gav/Core/substrate/client/finality-grandpa" } -sc-network-gossip ={path = "/Users/gav/Core/substrate/client/network-gossip" } -substrate-frame-rpc-system ={path = "/Users/gav/Core/substrate/utils/frame/rpc/system" } -try-runtime-cli ={path = "/Users/gav/Core/substrate/utils/frame/try-runtime/cli" } -substrate-build-script-utils ={path = "/Users/gav/Core/substrate/utils/build-script-utils" } -node-bench ={path = "/Users/gav/Core/substrate/bin/node/bench" } -node-testing ={path = "/Users/gav/Core/substrate/bin/node/testing" } -node-executor ={path = "/Users/gav/Core/substrate/bin/node/executor" } -node-cli ={path = "/Users/gav/Core/substrate/bin/node/cli" } -node-inspect ={path = "/Users/gav/Core/substrate/bin/node/inspect" } -node-rpc ={path = "/Users/gav/Core/substrate/bin/node/rpc" } -pallet-mmr-rpc ={path = "/Users/gav/Core/substrate/frame/merkle-mountain-range/rpc" } -sc-consensus-babe ={path = "/Users/gav/Core/substrate/client/consensus/babe" } -sc-consensus-epochs ={path = "/Users/gav/Core/substrate/client/consensus/epochs" } -sc-consensus-babe-rpc ={path = "/Users/gav/Core/substrate/client/consensus/babe/rpc" } -sc-finality-grandpa-rpc ={path = "/Users/gav/Core/substrate/client/finality-grandpa/rpc" } -sc-sync-state-rpc ={path = "/Users/gav/Core/substrate/client/sync-state-rpc" } -sc-authority-discovery ={path = "/Users/gav/Core/substrate/client/authority-discovery" } -sc-consensus-uncles ={path = "/Users/gav/Core/substrate/client/consensus/uncles" } -sc-service-test ={path = "/Users/gav/Core/substrate/client/service/test" } -substrate-frame-cli ={path = "/Users/gav/Core/substrate/utils/frame/frame-utilities-cli" } -chain-spec-builder ={path = "/Users/gav/Core/substrate/bin/utils/chain-spec-builder" } -subkey ={path = "/Users/gav/Core/substrate/bin/utils/subkey" } -beefy-gadget ={path = "/Users/gav/Core/substrate/client/beefy" } -beefy-gadget-rpc ={path = "/Users/gav/Core/substrate/client/beefy/rpc" } -sc-consensus-manual-seal ={path = "/Users/gav/Core/substrate/client/consensus/manual-seal" } -sc-consensus-pow ={path = "/Users/gav/Core/substrate/client/consensus/pow" } -sp-consensus-pow ={path = "/Users/gav/Core/substrate/primitives/consensus/pow" } -pallet-atomic-swap ={path = "/Users/gav/Core/substrate/frame/atomic-swap" } -pallet-bags-list-fuzzer ={path = "/Users/gav/Core/substrate/frame/bags-list/fuzzer" } -pallet-bags-list-remote-tests ={path = "/Users/gav/Core/substrate/frame/bags-list/remote-tests" } -pallet-beefy ={path = "/Users/gav/Core/substrate/frame/beefy" } -pallet-beefy-mmr ={path = "/Users/gav/Core/substrate/frame/beefy-mmr" } -frame-election-solution-type-fuzzer ={path = "/Users/gav/Core/substrate/frame/election-provider-support/solution-type/fuzzer" } -pallet-example-basic ={path = "/Users/gav/Core/substrate/frame/examples/basic" } -pallet-example-offchain-worker ={path = "/Users/gav/Core/substrate/frame/examples/offchain-worker" } -pallet-example-parallel ={path = "/Users/gav/Core/substrate/frame/examples/parallel" } -pallet-nicks ={path = "/Users/gav/Core/substrate/frame/nicks" } -pallet-node-authorization ={path = "/Users/gav/Core/substrate/frame/node-authorization" } -pallet-nomination-pools-test-staking ={path = "/Users/gav/Core/substrate/frame/nomination-pools/test-staking" } -pallet-scored-pool ={path = "/Users/gav/Core/substrate/frame/scored-pool" } -pallet-staking-reward-fn ={path = "/Users/gav/Core/substrate/frame/staking/reward-fn" } -pallet-root-offences ={path = "/Users/gav/Core/substrate/frame/root-offences" } -frame-support-test-compile-pass ={path = "/Users/gav/Core/substrate/frame/support/test/compile_pass" } -sp-api-test ={path = "/Users/gav/Core/substrate/primitives/api/test" } -sp-application-crypto-test ={path = "/Users/gav/Core/substrate/primitives/application-crypto/test" } -sp-arithmetic-fuzzer ={path = "/Users/gav/Core/substrate/primitives/arithmetic/fuzzer" } -sp-npos-elections-fuzzer ={path = "/Users/gav/Core/substrate/primitives/npos-elections/fuzzer" } -sp-runtime-interface-test ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/test" } -sp-runtime-interface-test-wasm-deprecated ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/test-wasm-deprecated" } -substrate-test-utils-test-crate ={path = "/Users/gav/Core/substrate/test-utils/test-crate" } -substrate-frame-rpc-support ={path = "/Users/gav/Core/substrate/utils/frame/rpc/support" } -generate-bags ={path = "/Users/gav/Core/substrate/utils/frame/generate-bags" } -node-runtime-generate-bags ={path = "/Users/gav/Core/substrate/utils/frame/generate-bags/node-runtime" } # Configuration for building a .deb package - for use with `cargo-deb` [package.metadata.deb] diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index e2c0a7bfdf94..b8080641771a 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -190,8 +190,6 @@ fn default_parachains_host_configuration( max_upward_queue_count: 8, max_upward_queue_size: 1024 * 1024, max_downward_message_size: 1024 * 1024, - ump_service_total_weight: Weight::from_ref_time(100_000_000_000) - .set_proof_size(MAX_POV_SIZE as u64), max_upward_message_size: 50 * 1024, max_upward_message_num_per_candidate: 5, hrmp_sender_deposit: 0, diff --git a/roadmap/implementers-guide/src/runtime/ump.md b/roadmap/implementers-guide/src/runtime/ump.md index 79e06e5ed0af..0d5109ec165a 100644 --- a/roadmap/implementers-guide/src/runtime/ump.md +++ b/roadmap/implementers-guide/src/runtime/ump.md @@ -52,36 +52,18 @@ Candidate Acceptance Function: * `check_upward_messages(P: ParaId, Vec`): 1. Checks that there are at most `config.max_upward_message_num_per_candidate` messages. 1. Checks that no message exceeds `config.max_upward_message_size`. - 1. Verify that `RelayDispatchQueueSize` for `P` has enough capacity for the messages + 1. Verify that queuing up the messages could not result in exceeding the queue's footprint + according to the config items. The queue's current footprint is provided in well_known_keys + in order to facilitate oraclisation on to the para. Candidate Enactment: * `receive_upward_messages(P: ParaId, Vec)`: 1. Process each upward message `M` in order: - 1. Append the message to `RelayDispatchQueues` for `P` - 1. Increment the size and the count in `RelayDispatchQueueSize` for `P`. - 1. Ensure that `P` is present in `NeedsDispatch`. - -The following routine is meant to execute pending entries in upward message queues. This function doesn't fail, even if -dispatching any of individual upward messages returns an error. - -`process_pending_upward_messages()`: - 1. Initialize a cumulative weight counter `T` to 0 - 1. Iterate over items in `NeedsDispatch` cyclically, starting with `NextDispatchRoundStartWith`. If the item specified is `None` start from the beginning. For each `P` encountered: - 1. Dequeue the first upward message `D` from `RelayDispatchQueues` for `P` - 1. Decrement the size of the message from `RelayDispatchQueueSize` for `P` - 1. Delegate processing of the message to the runtime. The weight consumed is added to `T`. - 1. If `T >= config.ump_service_total_weight`, set `NextDispatchRoundStartWith` to `P` and finish processing. - 1. If `RelayDispatchQueues` for `P` became empty, remove `P` from `NeedsDispatch`. - 1. If `NeedsDispatch` became empty then finish processing and set `NextDispatchRoundStartWith` to `None`. - > NOTE that in practice we would need to approach the weight calculation more thoroughly, i.e. incorporate all operations - > that could take place on the course of handling these upward messages. + 1. Place in the dispatch queue according to its para ID (or handle it immediately). ## Session Change -1. For each `P` in `outgoing_paras` (generated by `Paras::on_new_session`): - 1. Remove `RelayDispatchQueueSize` of `P`. - 1. Remove `RelayDispatchQueues` of `P`. - 1. Remove `P` if it exists in `NeedsDispatch`. - 1. If `P` is in `NextDispatchRoundStartWith`, then reset it to `None` - - Note that if we don't remove the open/close requests since they are going to die out naturally at the end of the session. +1. Nothing specific needs to be done, however the channel's dispatch queue may possibly be "swept" +which would prevent the dispatch queue from automatically being serviced. This is a consideration +for the chain and specific behaviour is not defined. diff --git a/roadmap/implementers-guide/src/types/runtime.md b/roadmap/implementers-guide/src/types/runtime.md index d3d00d5163b3..74e9f6ad575b 100644 --- a/roadmap/implementers-guide/src/types/runtime.md +++ b/roadmap/implementers-guide/src/types/runtime.md @@ -65,11 +65,6 @@ struct HostConfiguration { /// no further messages may be added to it. If it exceeds this then the queue may contain only /// a single message. pub max_upward_queue_size: u32, - /// The amount of weight we wish to devote to the processing the dispatchable upward messages - /// stage. - /// - /// NOTE that this is a soft limit and could be exceeded. - pub ump_service_total_weight: Weight, /// The maximum size of an upward message that can be sent by a candidate. /// /// This parameter affects the upper bound of size of `CandidateCommitments`. diff --git a/runtime/parachains/Cargo.toml b/runtime/parachains/Cargo.toml index cb8b989ccdda..e0685f98a8b8 100644 --- a/runtime/parachains/Cargo.toml +++ b/runtime/parachains/Cargo.toml @@ -58,6 +58,7 @@ sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master thousands = "0.2.0" assert_matches = "1" serde_json = "1.0.85" +pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = ["std"] diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index 2ebaff1b8282..719da3b9b9e7 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::*; 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}; @@ -126,11 +126,6 @@ pub struct HostConfiguration { /// decide to do with its PoV so this value in practice will be picked as a fraction of the PoV /// size. pub max_downward_message_size: u32, - /// The amount of weight we wish to devote to the processing the dispatchable upward messages - /// stage. - /// - /// NOTE that this is a soft limit and could be exceeded. - pub ump_service_total_weight: Weight, /// The maximum number of outbound HRMP channels a parachain is allowed to open. pub hrmp_max_parachain_outbound_channels: u32, /// The maximum number of outbound HRMP channels a parathread is allowed to open. @@ -210,9 +205,6 @@ pub struct HostConfiguration { pub needed_approvals: u32, /// The number of samples to do of the `RelayVRFModulo` approval assignment criterion. pub relay_vrf_modulo_samples: u32, - /// The maximum amount of weight any individual upward message may consume. Messages above this - /// weight go into the overweight queue and may only be serviced explicitly. - pub ump_max_individual_weight: Weight, /// This flag controls whether PVF pre-checking is enabled. /// /// If the flag is false, the behavior should be exactly the same as prior. Specifically, the @@ -272,7 +264,6 @@ impl> Default for HostConfiguration> Default for HostConfiguration crate::ump::MAX_UPWARD_MESSAGE_SIZE_BOUND { + if self.max_upward_message_size > crate::inclusion::MAX_UPWARD_MESSAGE_SIZE_BOUND { return Err(MaxUpwardMessageSizeExceeded { max_message_size: self.max_upward_message_size, }) @@ -858,18 +847,6 @@ pub mod pallet { }) } - /// Sets the soft limit for the phase of dispatching dispatchable upward messages. - #[pallet::weight(( - T::WeightInfo::set_config_with_weight(), - DispatchClass::Operational, - ))] - pub fn set_ump_service_total_weight(origin: OriginFor, new: Weight) -> DispatchResult { - ensure_root(origin)?; - Self::schedule_config_update(|config| { - config.ump_service_total_weight = new; - }) - } - /// Sets the maximum size of an upward message that can be sent by a candidate. #[pallet::weight(( T::WeightInfo::set_config_with_u32(), @@ -1044,18 +1021,6 @@ pub mod pallet { }) } - /// Sets the maximum amount of weight any individual upward message may consume. - #[pallet::weight(( - T::WeightInfo::set_config_with_weight(), - DispatchClass::Operational, - ))] - pub fn set_ump_max_individual_weight(origin: OriginFor, new: Weight) -> DispatchResult { - ensure_root(origin)?; - Self::schedule_config_update(|config| { - config.ump_max_individual_weight = new; - }) - } - /// Enable or disable PVF pre-checking. Consult the field documentation prior executing. #[pallet::weight(( // Using u32 here is a little bit of cheating, but that should be fine. diff --git a/runtime/parachains/src/configuration/benchmarking.rs b/runtime/parachains/src/configuration/benchmarking.rs index 71e0c03e696b..4e2813bafeeb 100644 --- a/runtime/parachains/src/configuration/benchmarking.rs +++ b/runtime/parachains/src/configuration/benchmarking.rs @@ -26,8 +26,6 @@ benchmarks! { set_config_with_option_u32 {}: set_max_validators(RawOrigin::Root, Some(10)) - set_config_with_weight {}: set_ump_service_total_weight(RawOrigin::Root, Weight::from_ref_time(3_000_000)) - set_hrmp_open_request_ttl {}: { Err(BenchmarkError::Override( BenchmarkResult::from_weight(T::BlockWeights::get().max_block) diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs index d87c98f6ae78..d02f01fff796 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -16,12 +16,8 @@ //! A module that is responsible for migration of storage. -use crate::configuration::{self, Config, Pallet, Store, MAX_POV_SIZE}; -use frame_support::{ - pallet_prelude::*, - traits::StorageVersion, - weights::{OldWeight, Weight}, -}; +use crate::configuration::{self, Config, Pallet, Store}; +use frame_support::{pallet_prelude::*, traits::StorageVersion, weights::Weight}; use frame_system::pallet_prelude::BlockNumberFor; /// The current storage version. @@ -29,15 +25,16 @@ use frame_system::pallet_prelude::BlockNumberFor; /// v0-v1: /// v1-v2: /// v2-v3: -pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(3); +/// v3-v4: (remove weights) +pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(4); -pub mod v3 { +pub mod v4 { use super::*; use frame_support::traits::OnRuntimeUpgrade; use primitives::v2::{Balance, SessionIndex}; // Copied over from configuration.rs @ de9e147695b9f1be8bd44e07861a31e483c8343a and removed - // all the comments, and changed the Weight struct to OldWeight + // all the comments, and changed the Weight struct to Weight #[derive(parity_scale_codec::Encode, parity_scale_codec::Decode, Debug)] pub struct OldHostConfiguration { pub max_code_size: u32, @@ -51,7 +48,7 @@ pub mod v3 { pub validation_upgrade_delay: BlockNumber, pub max_pov_size: u32, pub max_downward_message_size: u32, - pub ump_service_total_weight: OldWeight, + pub ump_service_total_weight: Weight, pub hrmp_max_parachain_outbound_channels: u32, pub hrmp_max_parathread_outbound_channels: u32, pub hrmp_sender_deposit: Balance, @@ -79,7 +76,7 @@ pub mod v3 { pub zeroth_delay_tranche_width: u32, pub needed_approvals: u32, pub relay_vrf_modulo_samples: u32, - pub ump_max_individual_weight: OldWeight, + pub ump_max_individual_weight: Weight, pub pvf_checking_enabled: bool, pub pvf_voting_ttl: SessionIndex, pub minimum_validation_upgrade_delay: BlockNumber, @@ -114,7 +111,7 @@ pub mod v3 { max_upward_queue_count: Default::default(), max_upward_queue_size: Default::default(), max_downward_message_size: Default::default(), - ump_service_total_weight: OldWeight(Default::default()), + ump_service_total_weight: Weight::zero(), max_upward_message_size: Default::default(), max_upward_message_num_per_candidate: Default::default(), hrmp_sender_deposit: Default::default(), @@ -127,9 +124,7 @@ pub mod v3 { hrmp_max_parachain_outbound_channels: Default::default(), 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, - ), + ump_max_individual_weight: Weight::zero(), pvf_checking_enabled: false, pvf_voting_ttl: 2u32.into(), minimum_validation_upgrade_delay: 2.into(), @@ -137,32 +132,32 @@ pub mod v3 { } } - pub struct MigrateToV3(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateToV3 { + pub struct MigrateToV4(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for MigrateToV4 { fn on_runtime_upgrade() -> Weight { - if StorageVersion::get::>() == 2 { - let weight_consumed = migrate_to_v3::(); + if StorageVersion::get::>() == 3 { + let weight_consumed = migrate_to_v4::(); - log::info!(target: configuration::LOG_TARGET, "MigrateToV3 executed successfully"); + log::info!(target: configuration::LOG_TARGET, "MigrateToV4 executed successfully"); STORAGE_VERSION.put::>(); weight_consumed } else { - log::warn!(target: configuration::LOG_TARGET, "MigrateToV3 should be removed."); + log::warn!(target: configuration::LOG_TARGET, "MigrateToV4 should be removed."); T::DbWeight::get().reads(1) } } } } -fn migrate_to_v3() -> Weight { +fn migrate_to_v4() -> Weight { // Unusual formatting is justified: // - make it easier to verify that fields assign what they supposed to assign. // - this code is transient and will be removed after all migrations are done. // - this code is important enough to optimize for legibility sacrificing consistency. #[rustfmt::skip] let translate = - |pre: v3::OldHostConfiguration>| -> + |pre: v4::OldHostConfiguration>| -> configuration::HostConfiguration> { super::HostConfiguration { @@ -207,9 +202,6 @@ relay_vrf_modulo_samples : pre.relay_vrf_modulo_samples, pvf_checking_enabled : pre.pvf_checking_enabled, pvf_voting_ttl : pre.pvf_voting_ttl, minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, - -ump_service_total_weight: Weight::from_ref_time(pre.ump_service_total_weight.0).set_proof_size(MAX_POV_SIZE as u64), -ump_max_individual_weight: Weight::from_ref_time(pre.ump_max_individual_weight.0).set_proof_size(MAX_POV_SIZE as u64), } }; @@ -234,31 +226,31 @@ mod tests { use crate::mock::{new_test_ext, Test}; #[test] - fn v2_deserialized_from_actual_data() { + fn v3_deserialized_from_actual_data() { // Fetched at Kusama 14,703,780 (0x3b2c305d01bd4adf1973d32a2d55ca1260a55eea8dfb3168e317c57f2841fdf1) // // This exceeds the maximal line width length, but that's fine, since this is not code and // doesn't need to be read and also leaving it as one line allows to easily copy it. let raw_config = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c8000000e87648170000001e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c8000000060000005802000002000000580200000200000059000000000000001e0000002800000000c817a804000000000200000014000000"]; - let v2 = - v3::OldHostConfiguration::::decode(&mut &raw_config[..]) + let v3 = + v4::OldHostConfiguration::::decode(&mut &raw_config[..]) .unwrap(); // We check only a sample of the values here. If we missed any fields or messed up data types // that would skew all the fields coming after. - assert_eq!(v2.max_code_size, 10_485_760); - assert_eq!(v2.validation_upgrade_cooldown, 3600); - assert_eq!(v2.max_pov_size, 5_242_880); - assert_eq!(v2.hrmp_channel_max_message_size, 102_400); - assert_eq!(v2.dispute_max_spam_slots, 2); - assert_eq!(v2.n_delay_tranches, 89); - assert_eq!(v2.ump_max_individual_weight, OldWeight(20_000_000_000)); - assert_eq!(v2.minimum_validation_upgrade_delay, 20); + assert_eq!(v3.max_code_size, 10_485_760); + assert_eq!(v3.validation_upgrade_cooldown, 3600); + assert_eq!(v3.max_pov_size, 5_242_880); + assert_eq!(v3.hrmp_channel_max_message_size, 102_400); + assert_eq!(v3.dispute_max_spam_slots, 2); + assert_eq!(v3.n_delay_tranches, 89); + assert_eq!(v3.ump_max_individual_weight, Weight::zero()); + assert_eq!(v3.minimum_validation_upgrade_delay, 20); } #[test] - fn test_migrate_to_v3() { + fn test_migrate_to_v4() { // Host configuration has lots of fields. However, in this migration we add only a couple of // fields. The most important part to check are a couple of the last fields. We also pick // extra fields to check arbitrarily, e.g. depending on their position (i.e. the middle) and @@ -267,8 +259,8 @@ mod tests { // We specify only the picked fields and the rest should be provided by the `Default` // implementation. That implementation is copied over between the two types and should work // fine. - let v2 = v3::OldHostConfiguration:: { - ump_max_individual_weight: OldWeight(0x71616e6f6e0au64), + let v3 = v4::OldHostConfiguration:: { + ump_max_individual_weight: Weight::from_ref_time(0x71616e6f6e0au64), needed_approvals: 69, thread_availability_period: 55, hrmp_recipient_deposit: 1337, @@ -279,64 +271,59 @@ mod tests { }; new_test_ext(Default::default()).execute_with(|| { - // Implant the v2 version in the state. + // Implant the v3 version in the state. frame_support::storage::unhashed::put_raw( &configuration::ActiveConfig::::hashed_key(), - &v2.encode(), + &v3.encode(), ); - migrate_to_v3::(); + migrate_to_v4::(); - let v3 = configuration::ActiveConfig::::get(); + let v4 = configuration::ActiveConfig::::get(); #[rustfmt::skip] { - assert_eq!(v2.max_code_size , v3.max_code_size); - assert_eq!(v2.max_head_data_size , v3.max_head_data_size); - assert_eq!(v2.max_upward_queue_count , v3.max_upward_queue_count); - assert_eq!(v2.max_upward_queue_size , v3.max_upward_queue_size); - assert_eq!(v2.max_upward_message_size , v3.max_upward_message_size); - assert_eq!(v2.max_upward_message_num_per_candidate , v3.max_upward_message_num_per_candidate); - assert_eq!(v2.hrmp_max_message_num_per_candidate , v3.hrmp_max_message_num_per_candidate); - assert_eq!(v2.validation_upgrade_cooldown , v3.validation_upgrade_cooldown); - assert_eq!(v2.validation_upgrade_delay , v3.validation_upgrade_delay); - assert_eq!(v2.max_pov_size , v3.max_pov_size); - assert_eq!(v2.max_downward_message_size , v3.max_downward_message_size); - assert_eq!(v2.hrmp_max_parachain_outbound_channels , v3.hrmp_max_parachain_outbound_channels); - assert_eq!(v2.hrmp_max_parathread_outbound_channels , v3.hrmp_max_parathread_outbound_channels); - assert_eq!(v2.hrmp_sender_deposit , v3.hrmp_sender_deposit); - assert_eq!(v2.hrmp_recipient_deposit , v3.hrmp_recipient_deposit); - assert_eq!(v2.hrmp_channel_max_capacity , v3.hrmp_channel_max_capacity); - assert_eq!(v2.hrmp_channel_max_total_size , v3.hrmp_channel_max_total_size); - assert_eq!(v2.hrmp_max_parachain_inbound_channels , v3.hrmp_max_parachain_inbound_channels); - assert_eq!(v2.hrmp_max_parathread_inbound_channels , v3.hrmp_max_parathread_inbound_channels); - assert_eq!(v2.hrmp_channel_max_message_size , v3.hrmp_channel_max_message_size); - assert_eq!(v2.code_retention_period , v3.code_retention_period); - assert_eq!(v2.parathread_cores , v3.parathread_cores); - assert_eq!(v2.parathread_retries , v3.parathread_retries); - assert_eq!(v2.group_rotation_frequency , v3.group_rotation_frequency); - assert_eq!(v2.chain_availability_period , v3.chain_availability_period); - assert_eq!(v2.thread_availability_period , v3.thread_availability_period); - assert_eq!(v2.scheduling_lookahead , v3.scheduling_lookahead); - assert_eq!(v2.max_validators_per_core , v3.max_validators_per_core); - assert_eq!(v2.max_validators , v3.max_validators); - assert_eq!(v2.dispute_period , v3.dispute_period); - assert_eq!(v2.dispute_post_conclusion_acceptance_period, v3.dispute_post_conclusion_acceptance_period); - assert_eq!(v2.dispute_max_spam_slots , v3.dispute_max_spam_slots); - assert_eq!(v2.dispute_conclusion_by_time_out_period , v3.dispute_conclusion_by_time_out_period); - assert_eq!(v2.no_show_slots , v3.no_show_slots); - assert_eq!(v2.n_delay_tranches , v3.n_delay_tranches); - assert_eq!(v2.zeroth_delay_tranche_width , v3.zeroth_delay_tranche_width); - assert_eq!(v2.needed_approvals , v3.needed_approvals); - assert_eq!(v2.relay_vrf_modulo_samples , v3.relay_vrf_modulo_samples); - assert_eq!(v2.pvf_checking_enabled , v3.pvf_checking_enabled); - assert_eq!(v2.pvf_voting_ttl , v3.pvf_voting_ttl); - assert_eq!(v2.minimum_validation_upgrade_delay , v3.minimum_validation_upgrade_delay); - - assert_eq!(v2.ump_service_total_weight, OldWeight(v3.ump_service_total_weight.ref_time())); - assert_eq!(v2.ump_max_individual_weight, OldWeight(v3.ump_max_individual_weight.ref_time())); - assert_eq!(v3.ump_service_total_weight.proof_size(), MAX_POV_SIZE as u64); - assert_eq!(v3.ump_max_individual_weight.proof_size(), MAX_POV_SIZE as u64); + assert_eq!(v3.max_code_size , v4.max_code_size); + assert_eq!(v3.max_head_data_size , v4.max_head_data_size); + assert_eq!(v3.max_upward_queue_count , v4.max_upward_queue_count); + assert_eq!(v3.max_upward_queue_size , v4.max_upward_queue_size); + assert_eq!(v3.max_upward_message_size , v4.max_upward_message_size); + assert_eq!(v3.max_upward_message_num_per_candidate , v4.max_upward_message_num_per_candidate); + assert_eq!(v3.hrmp_max_message_num_per_candidate , v4.hrmp_max_message_num_per_candidate); + assert_eq!(v3.validation_upgrade_cooldown , v4.validation_upgrade_cooldown); + assert_eq!(v3.validation_upgrade_delay , v4.validation_upgrade_delay); + assert_eq!(v3.max_pov_size , v4.max_pov_size); + assert_eq!(v3.max_downward_message_size , v4.max_downward_message_size); + assert_eq!(v3.hrmp_max_parachain_outbound_channels , v4.hrmp_max_parachain_outbound_channels); + assert_eq!(v3.hrmp_max_parathread_outbound_channels , v4.hrmp_max_parathread_outbound_channels); + assert_eq!(v3.hrmp_sender_deposit , v4.hrmp_sender_deposit); + assert_eq!(v3.hrmp_recipient_deposit , v4.hrmp_recipient_deposit); + assert_eq!(v3.hrmp_channel_max_capacity , v4.hrmp_channel_max_capacity); + assert_eq!(v3.hrmp_channel_max_total_size , v4.hrmp_channel_max_total_size); + assert_eq!(v3.hrmp_max_parachain_inbound_channels , v4.hrmp_max_parachain_inbound_channels); + assert_eq!(v3.hrmp_max_parathread_inbound_channels , v4.hrmp_max_parathread_inbound_channels); + assert_eq!(v3.hrmp_channel_max_message_size , v4.hrmp_channel_max_message_size); + assert_eq!(v3.code_retention_period , v4.code_retention_period); + assert_eq!(v3.parathread_cores , v4.parathread_cores); + assert_eq!(v3.parathread_retries , v4.parathread_retries); + assert_eq!(v3.group_rotation_frequency , v4.group_rotation_frequency); + assert_eq!(v3.chain_availability_period , v4.chain_availability_period); + assert_eq!(v3.thread_availability_period , v4.thread_availability_period); + assert_eq!(v3.scheduling_lookahead , v4.scheduling_lookahead); + assert_eq!(v3.max_validators_per_core , v4.max_validators_per_core); + assert_eq!(v3.max_validators , v4.max_validators); + assert_eq!(v3.dispute_period , v4.dispute_period); + assert_eq!(v3.dispute_post_conclusion_acceptance_period, v4.dispute_post_conclusion_acceptance_period); + assert_eq!(v3.dispute_max_spam_slots , v4.dispute_max_spam_slots); + assert_eq!(v3.dispute_conclusion_by_time_out_period , v4.dispute_conclusion_by_time_out_period); + assert_eq!(v3.no_show_slots , v4.no_show_slots); + assert_eq!(v3.n_delay_tranches , v4.n_delay_tranches); + assert_eq!(v3.zeroth_delay_tranche_width , v4.zeroth_delay_tranche_width); + assert_eq!(v3.needed_approvals , v4.needed_approvals); + assert_eq!(v3.relay_vrf_modulo_samples , v4.relay_vrf_modulo_samples); + assert_eq!(v3.pvf_checking_enabled , v4.pvf_checking_enabled); + assert_eq!(v3.pvf_voting_ttl , v4.pvf_voting_ttl); + assert_eq!(v3.minimum_validation_upgrade_delay , v4.minimum_validation_upgrade_delay); }; // ; makes this a statement. `rustfmt::skip` cannot be put on an expression. }); } diff --git a/runtime/parachains/src/configuration/tests.rs b/runtime/parachains/src/configuration/tests.rs index 6f2faf6cb204..28e71c2fa4ae 100644 --- a/runtime/parachains/src/configuration/tests.rs +++ b/runtime/parachains/src/configuration/tests.rs @@ -319,7 +319,6 @@ fn setting_pending_config_members() { max_upward_queue_count: 1337, max_upward_queue_size: 228, max_downward_message_size: 2048, - ump_service_total_weight: Weight::from_ref_time(20000), max_upward_message_size: 448, max_upward_message_num_per_candidate: 5, hrmp_sender_deposit: 22, @@ -332,7 +331,6 @@ fn setting_pending_config_members() { hrmp_max_parachain_outbound_channels: 10, hrmp_max_parathread_outbound_channels: 20, hrmp_max_message_num_per_candidate: 20, - ump_max_individual_weight: Weight::from_ref_time(909), pvf_checking_enabled: true, pvf_voting_ttl: 3, minimum_validation_upgrade_delay: 20, @@ -442,11 +440,6 @@ fn setting_pending_config_members() { new_config.max_downward_message_size, ) .unwrap(); - Configuration::set_ump_service_total_weight( - RuntimeOrigin::root(), - new_config.ump_service_total_weight, - ) - .unwrap(); Configuration::set_max_upward_message_size( RuntimeOrigin::root(), new_config.max_upward_message_size, @@ -507,11 +500,6 @@ fn setting_pending_config_members() { new_config.hrmp_max_message_num_per_candidate, ) .unwrap(); - Configuration::set_ump_max_individual_weight( - RuntimeOrigin::root(), - new_config.ump_max_individual_weight, - ) - .unwrap(); Configuration::set_pvf_checking_enabled( RuntimeOrigin::root(), new_config.pvf_checking_enabled, diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index f74a8cfd3f8d..15911b048eec 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -21,27 +21,40 @@ //! to included. use crate::{ - configuration, disputes, dmp, hrmp, paras, paras_inherent::DisputedBitfield, - scheduler::CoreAssignment, shared, ump, + configuration::{self, HostConfiguration}, + disputes, dmp, hrmp, paras, + paras_inherent::DisputedBitfield, + scheduler::CoreAssignment, + shared, }; use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec}; -use frame_support::pallet_prelude::*; +use frame_support::{ + pallet_prelude::*, + traits::{EnqueueMessage, Footprint}, + BoundedSlice, +}; use parity_scale_codec::{Decode, Encode}; use primitives::v2::{ - AvailabilityBitfield, BackedCandidate, CandidateCommitments, CandidateDescriptor, - CandidateHash, CandidateReceipt, CommittedCandidateReceipt, CoreIndex, GroupIndex, Hash, - HeadData, Id as ParaId, SigningContext, UncheckedSignedAvailabilityBitfields, ValidatorId, - ValidatorIndex, ValidityAttestation, + well_known_keys, AvailabilityBitfield, BackedCandidate, CandidateCommitments, + CandidateDescriptor, CandidateHash, CandidateReceipt, CommittedCandidateReceipt, CoreIndex, + GroupIndex, Hash, HeadData, Id as ParaId, SigningContext, UncheckedSignedAvailabilityBitfields, + UpwardMessage, ValidatorId, ValidatorIndex, ValidityAttestation, }; use scale_info::TypeInfo; use sp_runtime::{traits::One, DispatchError}; -use sp_std::{collections::btree_set::BTreeSet, prelude::*}; +use sp_std::{collections::btree_set::BTreeSet, fmt, prelude::*}; pub use pallet::*; #[cfg(test)] pub(crate) mod tests; +/// Maximum value that `config.max_upward_message_size` can be set to +/// +/// This is used for benchmarking sanely bounding relevant storate items. It is expected from the `configurations` +/// pallet to check these values before setting. +pub const MAX_UPWARD_MESSAGE_SIZE_BOUND: u32 = 50 * 1024; + /// A bitfield signed by a validator indicating that it is keeping its piece of the erasure-coding /// for any backed candidates referred to by a `1` bit available. /// @@ -194,13 +207,15 @@ pub mod pallet { + shared::Config + paras::Config + dmp::Config - + ump::Config + hrmp::Config + configuration::Config { type RuntimeEvent: From> + IsType<::RuntimeEvent>; type DisputesHandler: disputes::DisputesHandler; type RewardValidators: RewardValidators; + + /// The system message queue. + type MessageQueue: EnqueueMessage; } #[pallet::event] @@ -212,6 +227,8 @@ pub mod pallet { CandidateIncluded(CandidateReceipt, HeadData, CoreIndex, GroupIndex), /// A candidate timed out. `[candidate, head_data]` CandidateTimedOut(CandidateReceipt, HeadData, CoreIndex), + /// Some upward messages have been received and will be processed. + UpwardMessagesReceived { from: ParaId, count: u32 }, } #[pallet::error] @@ -300,6 +317,53 @@ pub mod pallet { const LOG_TARGET: &str = "runtime::inclusion"; +#[derive(derive_more::From, Debug)] +enum AcceptanceCheckErr { + HeadDataTooLarge, + PrematureCodeUpgrade, + NewCodeTooLarge, + ProcessedDownwardMessages(dmp::ProcessedDownwardMessagesAcceptanceErr), + UpwardMessages(UmpAcceptanceCheckErr), + HrmpWatermark(hrmp::HrmpWatermarkAcceptanceErr), + OutboundHrmp(hrmp::OutboundHrmpAcceptanceErr), +} + +/// An error returned by [`check_upward_messages`] that indicates a violation of one of acceptance +/// criteria rules. +pub enum UmpAcceptanceCheckErr { + MoreMessagesThanPermitted { sent: u32, permitted: u32 }, + MessageSize { idx: u32, msg_size: u32, max_size: u32 }, + CapacityExceeded { count: u32, limit: u32 }, + TotalSizeExceeded { total_size: u32, limit: u32 }, +} + +impl fmt::Debug for UmpAcceptanceCheckErr { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + match *self { + UmpAcceptanceCheckErr::MoreMessagesThanPermitted { sent, permitted } => write!( + fmt, + "more upward messages than permitted by config ({} > {})", + sent, permitted, + ), + UmpAcceptanceCheckErr::MessageSize { idx, msg_size, max_size } => write!( + fmt, + "upward message idx {} larger than permitted by config ({} > {})", + idx, msg_size, max_size, + ), + UmpAcceptanceCheckErr::CapacityExceeded { count, limit } => write!( + fmt, + "the ump queue would have more items than permitted by config ({} > {})", + count, limit, + ), + UmpAcceptanceCheckErr::TotalSizeExceeded { total_size, limit } => write!( + fmt, + "the ump queue would have grown past the max size permitted by config ({} > {})", + total_size, limit, + ), + } + } +} + impl Pallet { /// Block initialization logic, called by initializer. pub(crate) fn initializer_initialize(_now: T::BlockNumber) -> Weight { @@ -765,10 +829,8 @@ impl Pallet { receipt.descriptor.para_id, commitments.processed_downward_messages, ); - weight += >::receive_upward_messages( - receipt.descriptor.para_id, - commitments.upward_messages, - ); + weight += + Self::receive_upward_messages(receipt.descriptor.para_id, commitments.upward_messages); weight += >::prune_hrmp( receipt.descriptor.para_id, T::BlockNumber::from(commitments.hrmp_watermark), @@ -793,6 +855,79 @@ impl Pallet { ) } + /// Check that all the upward messages sent by a candidate pass the acceptance criteria. Returns + /// false, if any of the messages doesn't pass. + pub(crate) fn check_upward_messages( + config: &HostConfiguration, + para: ParaId, + upward_messages: &[UpwardMessage], + ) -> Result<(), UmpAcceptanceCheckErr> { + if upward_messages.len() as u32 > config.max_upward_message_num_per_candidate { + return Err(UmpAcceptanceCheckErr::MoreMessagesThanPermitted { + sent: upward_messages.len() as u32, + permitted: config.max_upward_message_num_per_candidate, + }) + } + + let fp = T::MessageQueue::footprint(para); + let (mut para_queue_count, mut para_queue_size) = (fp.count, fp.size); + + for (idx, msg) in upward_messages.into_iter().enumerate() { + let msg_size = msg.len() as u32; + if msg_size > config.max_upward_message_size { + return Err(UmpAcceptanceCheckErr::MessageSize { + idx: idx as u32, + msg_size, + max_size: config.max_upward_message_size, + }) + } + para_queue_count += 1; + para_queue_size += msg_size; + } + + // make sure that the queue is not overfilled. + // we do it here only once since returning false invalidates the whole relay-chain block. + if para_queue_count > config.max_upward_queue_count { + return Err(UmpAcceptanceCheckErr::CapacityExceeded { + count: para_queue_count, + limit: config.max_upward_queue_count, + }) + } + if para_queue_size > config.max_upward_queue_size { + return Err(UmpAcceptanceCheckErr::TotalSizeExceeded { + total_size: para_queue_size, + limit: config.max_upward_queue_size, + }) + } + + Ok(()) + } + + /// Enqueues `upward_messages` from a `para`'s accepted candidate block. + pub(crate) fn receive_upward_messages( + para: ParaId, + upward_messages: Vec, + ) -> Weight { + if !upward_messages.is_empty() { + let count = upward_messages.len() as u32; + Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); + } + let messages = upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); + T::MessageQueue::enqueue_messages(messages, para); + + let Footprint { count, size } = T::MessageQueue::footprint(para); + // TODO: Consider placing the remaining capacity into the well known key, rather than the + // amount used. This is way more useful for the parachain. + // TODO: Consider doing this at the end of the block, after any messages might have been + // executed, to report more accurate numbers to the para. + let key = well_known_keys::relay_dispatch_queue_size(para); + (count, size).using_encoded(|d| sp_io::storage::set(&key, d)); + + // TODO: calculate worst-case enqueue (largest possible message with the most recent page + // being almost full) and return. + Weight::zero() + } + /// Cleans up all paras pending availability that the predicate returns true for. /// /// The predicate accepts the index of the core and the block number the core has been occupied @@ -906,17 +1041,6 @@ const fn availability_threshold(n_validators: usize) -> usize { threshold } -#[derive(derive_more::From, Debug)] -enum AcceptanceCheckErr { - HeadDataTooLarge, - PrematureCodeUpgrade, - NewCodeTooLarge, - ProcessedDownwardMessages(dmp::ProcessedDownwardMessagesAcceptanceErr), - UpwardMessages(ump::AcceptanceCheckErr), - HrmpWatermark(hrmp::HrmpWatermarkAcceptanceErr), - OutboundHrmp(hrmp::OutboundHrmpAcceptanceErr), -} - impl AcceptanceCheckErr { /// Returns the same error so that it can be threaded through a needle of `DispatchError` and /// ultimately returned from a `Dispatchable`. @@ -1063,7 +1187,7 @@ impl CandidateCheckContext { // check if the candidate passes the messaging acceptance criteria >::check_processed_downward_messages(para_id, processed_downward_messages)?; - >::check_upward_messages(&self.config, para_id, upward_messages)?; + Pallet::::check_upward_messages(&self.config, para_id, upward_messages)?; >::check_hrmp_watermark(para_id, self.relay_parent_number, hrmp_watermark)?; >::check_outbound_hrmp(&self.config, para_id, horizontal_messages)?; diff --git a/runtime/parachains/src/initializer.rs b/runtime/parachains/src/initializer.rs index eaa4510fafcf..f6539a8500b0 100644 --- a/runtime/parachains/src/initializer.rs +++ b/runtime/parachains/src/initializer.rs @@ -22,7 +22,7 @@ use crate::{ configuration::{self, HostConfiguration}, disputes::{self, DisputesHandler as _, SlashingHandler as _}, - dmp, hrmp, inclusion, paras, scheduler, session_info, shared, ump, + dmp, hrmp, inclusion, paras, scheduler, session_info, shared, }; use frame_support::{ traits::{OneSessionHandler, Randomness}, @@ -114,7 +114,6 @@ pub mod pallet { + session_info::Config + disputes::Config + dmp::Config - + ump::Config + hrmp::Config { /// A randomness beacon. @@ -169,7 +168,6 @@ pub mod pallet { T::DisputesHandler::initializer_initialize(now) + T::SlashingHandler::initializer_initialize(now) + dmp::Pallet::::initializer_initialize(now) + - ump::Pallet::::initializer_initialize(now) + hrmp::Pallet::::initializer_initialize(now); HasInitialized::::set(Some(())); @@ -180,7 +178,6 @@ pub mod pallet { fn on_finalize(now: T::BlockNumber) { // reverse initialization order. hrmp::Pallet::::initializer_finalize(); - ump::Pallet::::initializer_finalize(); dmp::Pallet::::initializer_finalize(); T::SlashingHandler::initializer_finalize(); T::DisputesHandler::initializer_finalize(); @@ -268,7 +265,7 @@ impl Pallet { T::DisputesHandler::initializer_on_new_session(¬ification); T::SlashingHandler::initializer_on_new_session(session_index); dmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); - ump::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); + // ump::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); hrmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); } diff --git a/runtime/parachains/src/lib.rs b/runtime/parachains/src/lib.rs index 3d73a4049ed4..834eb0354dd4 100644 --- a/runtime/parachains/src/lib.rs +++ b/runtime/parachains/src/lib.rs @@ -37,7 +37,6 @@ pub mod reward_points; pub mod scheduler; pub mod session_info; pub mod shared; -pub mod ump; pub mod runtime_api_impl; @@ -47,6 +46,8 @@ mod util; mod builder; #[cfg(test)] mod mock; +#[cfg(test)] +mod ump_tests; pub use origin::{ensure_parachain, Origin}; pub use paras::ParaLifecycle; diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 3e6ed79a77c2..ff3bf59b1327 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -18,14 +18,15 @@ use crate::{ configuration, disputes, dmp, hrmp, inclusion, initializer, origin, paras, paras_inherent, - scheduler, session_info, shared, - ump::{self, MessageId, UmpSink}, - ParaId, + scheduler, session_info, shared, ParaId, }; use frame_support::{ parameter_types, - traits::{GenesisBuild, KeyOwnerProofSystem, ValidatorSet, ValidatorSetWithIdentification}, + traits::{ + GenesisBuild, KeyOwnerProofSystem, ProcessMessage, ProcessMessageError, ValidatorSet, + ValidatorSetWithIdentification, + }, weights::Weight, }; use frame_support_test::TestRandomness; @@ -34,7 +35,7 @@ use primitives::v2::{ AuthorityDiscoveryId, Balance, BlockNumber, CandidateHash, Header, Moment, SessionIndex, UpwardMessage, ValidatorIndex, }; -use sp_core::H256; +use sp_core::{ConstU32, H256}; use sp_io::TestExternalities; use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup}, @@ -54,6 +55,7 @@ frame_support::construct_runtime!( { System: frame_system, Balances: pallet_balances, + MessageQueue: pallet_message_queue, Paras: paras, Configuration: configuration, ParasShared: shared, @@ -62,7 +64,6 @@ frame_support::construct_runtime!( Scheduler: scheduler, Initializer: initializer, Dmp: dmp, - Ump: ump, Hrmp: hrmp, ParachainsOrigin: origin, SessionInfo: session_info, @@ -145,25 +146,18 @@ impl pallet_babe::Config for Test { // session module is the trigger type EpochChangeTrigger = pallet_babe::ExternalTrigger; - type DisabledValidators = (); - type KeyOwnerProof = >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type KeyOwnerProofSystem = (); - type HandleEquivocation = (); - type WeightInfo = (); - type MaxAuthorities = MaxAuthorities; } @@ -227,14 +221,6 @@ parameter_types! { pub const FirstMessageFactorPercent: u64 = 100; } -impl crate::ump::Config for Test { - type RuntimeEvent = RuntimeEvent; - type UmpSink = TestUmpSink; - type FirstMessageFactorPercent = FirstMessageFactorPercent; - type ExecuteOverweightOrigin = frame_system::EnsureRoot; - type WeightInfo = crate::ump::TestWeightInfo; -} - impl crate::hrmp::Config for Test { type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; @@ -293,10 +279,43 @@ impl crate::disputes::SlashingHandler for Test { impl crate::scheduler::Config for Test {} +pub struct TestWeightInfo; +impl pallet_message_queue::WeightInfo for TestWeightInfo { + fn service_page_base() -> Weight { + Weight::zero() + } + fn service_queue_base() -> Weight { + Weight::zero() + } + fn service_page_process_message() -> Weight { + Weight::zero() + } + fn bump_service_head() -> Weight { + Weight::zero() + } + fn service_page_item() -> Weight { + Weight::zero() + } + fn ready_ring_unknit() -> Weight { + Weight::zero() + } +} + +impl pallet_message_queue::Config for Test { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = TestWeightInfo; + type MessageProcessor = TestProcessMessage; + type Size = u32; + type HeapSize = ConstU32<65536>; + type MaxStale = ConstU32<8>; + type ServiceWeight = (); +} + impl crate::inclusion::Config for Test { type RuntimeEvent = RuntimeEvent; type DisputesHandler = Disputes; type RewardValidators = TestRewardValidators; + type MessageQueue = MessageQueue; } impl crate::paras_inherent::Config for Test { @@ -386,26 +405,26 @@ pub fn take_processed() -> Vec<(ParaId, UpwardMessage)> { /// /// A message's weight is defined by the first 4 bytes of its data, which we decode into a /// `u32`. -pub struct TestUmpSink; -impl UmpSink for TestUmpSink { - fn process_upward_message( - actual_origin: ParaId, - actual_msg: &[u8], - max_weight: Weight, - ) -> Result { - let weight = match u32::decode(&mut &actual_msg[..]) { - Ok(w) => Weight::from_ref_time(w as u64), - Err(_) => return Ok(Weight::zero()), // same as the real `UmpSink` +pub struct TestProcessMessage; +impl ProcessMessage for TestProcessMessage { + type Origin = ParaId; + fn process_message( + message: &[u8], + origin: ParaId, + weight_limit: Weight, + ) -> Result<(bool, Weight), ProcessMessageError> { + let weight = match u32::decode(&mut &message[..]) { + Ok(w) => Weight::from_parts(w as u64, w as u64), + Err(_) => return Err(ProcessMessageError::Corrupt), // same as the real `ProcessMessage` }; - if weight.any_gt(max_weight) { - let id = sp_io::hashing::blake2_256(actual_msg); - return Err((id, weight)) + if weight.any_gt(weight_limit) { + return Err(ProcessMessageError::Overweight(weight)) } PROCESSED.with(|opt_hook| { - opt_hook.borrow_mut().push((actual_origin, actual_msg.to_owned())); + opt_hook.borrow_mut().push((origin, message.to_owned())); }); - Ok(weight) + Ok((true, weight)) } } @@ -464,3 +483,19 @@ pub fn assert_last_event(generic_event: RuntimeEvent) { let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; assert_eq!(event, &system_event); } + +pub fn assert_last_events(generic_events: E) +where + E: DoubleEndedIterator + ExactSizeIterator, +{ + for (i, (got, want)) in frame_system::Pallet::::events() + .into_iter() + .rev() + .map(|e| e.event) + .zip(generic_events.rev().map(::RuntimeEvent::from)) + .rev() + .enumerate() + { + assert_eq!((i, got), (i, want)); + } +} diff --git a/runtime/parachains/src/paras_inherent/mod.rs b/runtime/parachains/src/paras_inherent/mod.rs index 188a8f677979..0bcfedfdca08 100644 --- a/runtime/parachains/src/paras_inherent/mod.rs +++ b/runtime/parachains/src/paras_inherent/mod.rs @@ -29,7 +29,7 @@ use crate::{ initializer, metrics::METRICS, scheduler::{self, CoreAssignment, FreedReason}, - shared, ump, ParaId, + shared, ParaId, }; use bitvec::prelude::BitVec; use frame_support::{ @@ -534,10 +534,6 @@ impl Pallet { // Note which of the scheduled cores were actually occupied by a backed candidate. >::occupied(&occupied); - // Give some time slice to dispatch pending upward messages. - // this is max config.ump_service_total_weight - let _ump_weight = >::process_pending_upward_messages(); - METRICS.on_after_filter(total_consumed_weight.ref_time()); Ok(Some(total_consumed_weight).into()) diff --git a/runtime/parachains/src/runtime_api_impl/v2.rs b/runtime/parachains/src/runtime_api_impl/v2.rs index 77ea96742b54..fa877468ab75 100644 --- a/runtime/parachains/src/runtime_api_impl/v2.rs +++ b/runtime/parachains/src/runtime_api_impl/v2.rs @@ -330,14 +330,18 @@ where >::read_events_no_consensus() .into_iter() .filter_map(|record| extract_event(record.event)) - .map(|event| match event { - RawEvent::::CandidateBacked(c, h, core, group) => - CandidateEvent::CandidateBacked(c, h, core, group), - RawEvent::::CandidateIncluded(c, h, core, group) => - CandidateEvent::CandidateIncluded(c, h, core, group), - RawEvent::::CandidateTimedOut(c, h, core) => - CandidateEvent::CandidateTimedOut(c, h, core), - RawEvent::::__Ignore(_, _) => unreachable!("__Ignore cannot be used"), + .filter_map(|event| { + Some(match event { + RawEvent::::CandidateBacked(c, h, core, group) => + CandidateEvent::CandidateBacked(c, h, core, group), + RawEvent::::CandidateIncluded(c, h, core, group) => + CandidateEvent::CandidateIncluded(c, h, core, group), + RawEvent::::CandidateTimedOut(c, h, core) => + CandidateEvent::CandidateTimedOut(c, h, core), + // Not needed for candidate events. + RawEvent::::UpwardMessagesReceived { .. } => return None, + RawEvent::::__Ignore(_, _) => unreachable!("__Ignore cannot be used"), + }) }) .collect() } diff --git a/runtime/parachains/src/ump.rs b/runtime/parachains/src/ump.rs deleted file mode 100644 index 5aa7b17d923c..000000000000 --- a/runtime/parachains/src/ump.rs +++ /dev/null @@ -1,761 +0,0 @@ -// Copyright 2020 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 crate::{ - configuration::{self, HostConfiguration}, - initializer, -}; -use frame_support::{pallet_prelude::*, traits::EnsureOrigin}; -use frame_system::pallet_prelude::*; -use primitives::v2::{Id as ParaId, UpwardMessage}; -use sp_std::{collections::btree_map::BTreeMap, fmt, marker::PhantomData, mem, prelude::*}; -use xcm::latest::Outcome; - -pub use pallet::*; - -/// Maximum value that `config.max_upward_message_size` can be set to -/// -/// This is used for benchmarking sanely bounding relevant storate items. It is expected from the `configurations` -/// pallet to check these values before setting. -pub const MAX_UPWARD_MESSAGE_SIZE_BOUND: u32 = 50 * 1024; - -#[cfg(feature = "runtime-benchmarks")] -mod benchmarking; - -#[cfg(test)] -pub(crate) mod tests; - -/// All upward messages coming from parachains will be funneled into an implementation of this trait. -/// -/// The message is opaque from the perspective of UMP. The message size can range from 0 to -/// `config.max_upward_message_size`. -/// -/// It's up to the implementation of this trait to decide what to do with a message as long as it -/// returns the amount of weight consumed in the process of handling. Ignoring a message is a valid -/// strategy. -/// -/// There are no guarantees on how much time it takes for the message sent by a candidate to end up -/// in the sink after the candidate was enacted. That typically depends on the UMP traffic, the sizes -/// of upward messages and the configuration of UMP. -/// -/// It is possible that by the time the message is sank the origin parachain was offboarded. It is -/// up to the implementer to check that if it cares. -pub trait UmpSink { - /// Process an incoming upward message and return the amount of weight it consumed, or `None` if - /// it did not begin processing a message since it would otherwise exceed `max_weight`. - /// - /// See the trait docs for more details. - fn process_upward_message( - origin: ParaId, - msg: &[u8], - max_weight: Weight, - ) -> Result; -} - -/// An implementation of a sink that just swallows the message without consuming any weight. Returns -/// `Some(0)` indicating that no messages existed for it to process. -impl UmpSink for () { - fn process_upward_message( - _: ParaId, - _: &[u8], - _: Weight, - ) -> Result { - Ok(Weight::zero()) - } -} - -/// Simple type used to identify messages for the purpose of reporting events. Secure if and only -/// if the message content is unique. -pub type MessageId = [u8; 32]; - -/// Index used to identify overweight messages. -pub type OverweightIndex = u64; - -/// A specific implementation of a `UmpSink` where messages are in the XCM format -/// and will be forwarded to the XCM Executor. -pub struct XcmSink(PhantomData<(XcmExecutor, Config)>); - -/// Returns a [`MessageId`] for the given upward message payload. -fn upward_message_id(data: &[u8]) -> MessageId { - sp_io::hashing::blake2_256(data) -} - -impl, C: Config> UmpSink - for XcmSink -{ - fn process_upward_message( - origin: ParaId, - mut data: &[u8], - max_weight: Weight, - ) -> Result { - use parity_scale_codec::DecodeLimit; - use xcm::{ - latest::{Error as XcmError, Junction, Xcm}, - VersionedXcm, - }; - - let id = upward_message_id(&data[..]); - let maybe_msg_and_weight = VersionedXcm::::decode_all_with_depth_limit( - xcm::MAX_XCM_DECODE_DEPTH, - &mut data, - ) - .map(|xcm| { - ( - Xcm::::try_from(xcm), - // NOTE: We are overestimating slightly here. - // The benchmark is timing this whole function with different message sizes and a NOOP extrinsic to - // measure the size-dependent weight. But as we use the weight funtion **in** the benchmarked funtion we - // are taking call and control-flow overhead into account twice. - ::WeightInfo::process_upward_message(data.len() as u32), - ) - }); - match maybe_msg_and_weight { - Err(_) => { - Pallet::::deposit_event(Event::InvalidFormat(id)); - Ok(Weight::zero()) - }, - Ok((Err(()), weight_used)) => { - Pallet::::deposit_event(Event::UnsupportedVersion(id)); - Ok(weight_used) - }, - Ok((Ok(xcm_message), weight_used)) => { - let xcm_junction = Junction::Parachain(origin.into()); - let outcome = - XcmExecutor::execute_xcm(xcm_junction, xcm_message, max_weight.ref_time()); - match outcome { - Outcome::Error(XcmError::WeightLimitReached(required)) => - Err((id, Weight::from_ref_time(required))), - outcome => { - let outcome_weight = Weight::from_ref_time(outcome.weight_used()); - Pallet::::deposit_event(Event::ExecutedUpward(id, outcome)); - Ok(weight_used.saturating_add(outcome_weight)) - }, - } - }, - } - } -} - -/// An error returned by [`check_upward_messages`] that indicates a violation of one of acceptance -/// criteria rules. -pub enum AcceptanceCheckErr { - MoreMessagesThanPermitted { sent: u32, permitted: u32 }, - MessageSize { idx: u32, msg_size: u32, max_size: u32 }, - CapacityExceeded { count: u32, limit: u32 }, - TotalSizeExceeded { total_size: u32, limit: u32 }, -} - -impl fmt::Debug for AcceptanceCheckErr { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - match *self { - AcceptanceCheckErr::MoreMessagesThanPermitted { sent, permitted } => write!( - fmt, - "more upward messages than permitted by config ({} > {})", - sent, permitted, - ), - AcceptanceCheckErr::MessageSize { idx, msg_size, max_size } => write!( - fmt, - "upward message idx {} larger than permitted by config ({} > {})", - idx, msg_size, max_size, - ), - AcceptanceCheckErr::CapacityExceeded { count, limit } => write!( - fmt, - "the ump queue would have more items than permitted by config ({} > {})", - count, limit, - ), - AcceptanceCheckErr::TotalSizeExceeded { total_size, limit } => write!( - fmt, - "the ump queue would have grown past the max size permitted by config ({} > {})", - total_size, limit, - ), - } - } -} - -/// Weight information of this pallet. -pub trait WeightInfo { - fn service_overweight() -> Weight; - fn process_upward_message(s: u32) -> Weight; - fn clean_ump_after_outgoing() -> Weight; -} - -/// fallback implementation -pub struct TestWeightInfo; -impl WeightInfo for TestWeightInfo { - fn service_overweight() -> Weight { - Weight::MAX - } - - fn process_upward_message(_msg_size: u32) -> Weight { - Weight::MAX - } - - fn clean_ump_after_outgoing() -> Weight { - Weight::MAX - } -} - -#[frame_support::pallet] -pub mod pallet { - use super::*; - - #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] - #[pallet::without_storage_info] - pub struct Pallet(_); - - #[pallet::config] - pub trait Config: frame_system::Config + configuration::Config { - /// The aggregate event. - type RuntimeEvent: From + IsType<::RuntimeEvent>; - - /// A place where all received upward messages are funneled. - type UmpSink: UmpSink; - - /// The factor by which the weight limit it multiplied for the first UMP message to execute with. - /// - /// An amount less than 100 keeps more available weight in the queue for messages after the first, and potentially - /// stalls the queue in doing so. More than 100 will provide additional weight for the first message only. - /// - /// Generally you'll want this to be a bit more - 150 or 200 would be good values. - type FirstMessageFactorPercent: Get; - - /// Origin which is allowed to execute overweight messages. - type ExecuteOverweightOrigin: EnsureOrigin; - - /// Weight information for extrinsics in this pallet. - type WeightInfo: WeightInfo; - } - - #[pallet::event] - #[pallet::generate_deposit(pub(super) fn deposit_event)] - pub enum Event { - /// Upward message is invalid XCM. - /// \[ id \] - InvalidFormat(MessageId), - /// Upward message is unsupported version of XCM. - /// \[ id \] - UnsupportedVersion(MessageId), - /// Upward message executed with the given outcome. - /// \[ id, outcome \] - ExecutedUpward(MessageId, Outcome), - /// The weight limit for handling upward messages was reached. - /// \[ id, remaining, required \] - WeightExhausted(MessageId, Weight, Weight), - /// Some upward messages have been received and will be processed. - /// \[ para, count, size \] - UpwardMessagesReceived(ParaId, u32, u32), - /// The weight budget was exceeded for an individual upward message. - /// - /// This message can be later dispatched manually using `service_overweight` dispatchable - /// using the assigned `overweight_index`. - /// - /// \[ para, id, overweight_index, required \] - OverweightEnqueued(ParaId, MessageId, OverweightIndex, Weight), - /// Upward message from the overweight queue was executed with the given actual weight - /// used. - /// - /// \[ overweight_index, used \] - OverweightServiced(OverweightIndex, Weight), - } - - #[pallet::error] - pub enum Error { - /// The message index given is unknown. - UnknownMessageIndex, - /// The amount of weight given is possibly not enough for executing the message. - WeightOverLimit, - } - - /// The messages waiting to be handled by the relay-chain originating from a certain parachain. - /// - /// Note that some upward messages might have been already processed by the inclusion logic. E.g. - /// channel management messages. - /// - /// The messages are processed in FIFO order. - #[pallet::storage] - pub type RelayDispatchQueues = - StorageMap<_, Twox64Concat, ParaId, Vec, ValueQuery>; - - /// Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`. - /// - /// First item in the tuple is the count of messages and second - /// is the total length (in bytes) of the message payloads. - /// - /// Note that this is an auxiliary mapping: it's possible to tell the byte size and the number of - /// messages only looking at `RelayDispatchQueues`. This mapping is separate to avoid the cost of - /// loading the whole message queue if only the total size and count are required. - /// - /// Invariant: - /// - The set of keys should exactly match the set of keys of `RelayDispatchQueues`. - // NOTE that this field is used by parachains via merkle storage proofs, therefore changing - // the format will require migration of parachains. - #[pallet::storage] - pub type RelayDispatchQueueSize = - StorageMap<_, Twox64Concat, ParaId, (u32, u32), ValueQuery>; - - /// The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry. - /// - /// Invariant: - /// - The set of items from this vector should be exactly the set of the keys in - /// `RelayDispatchQueues` and `RelayDispatchQueueSize`. - #[pallet::storage] - pub type NeedsDispatch = StorageValue<_, Vec, ValueQuery>; - - /// This is the para that gets will get dispatched first during the next upward dispatchable queue - /// execution round. - /// - /// Invariant: - /// - If `Some(para)`, then `para` must be present in `NeedsDispatch`. - #[pallet::storage] - pub type NextDispatchRoundStartWith = StorageValue<_, ParaId>; - - /// The messages that exceeded max individual message weight budget. - /// - /// These messages stay there until manually dispatched. - #[pallet::storage] - pub type Overweight = - StorageMap<_, Twox64Concat, OverweightIndex, (ParaId, Vec), OptionQuery>; - - /// The number of overweight messages ever recorded in `Overweight` (and thus the lowest free - /// index). - #[pallet::storage] - pub type OverweightCount = StorageValue<_, OverweightIndex, ValueQuery>; - - #[pallet::call] - impl Pallet { - /// Service a single overweight upward message. - /// - /// - `origin`: Must pass `ExecuteOverweightOrigin`. - /// - `index`: The index of the overweight message to service. - /// - `weight_limit`: The amount of weight that message execution may take. - /// - /// Errors: - /// - `UnknownMessageIndex`: Message of `index` is unknown. - /// - `WeightOverLimit`: Message execution may use greater than `weight_limit`. - /// - /// Events: - /// - `OverweightServiced`: On success. - #[pallet::weight(weight_limit.saturating_add(::WeightInfo::service_overweight()))] - pub fn service_overweight( - origin: OriginFor, - index: OverweightIndex, - weight_limit: Weight, - ) -> DispatchResultWithPostInfo { - T::ExecuteOverweightOrigin::ensure_origin(origin)?; - - let (sender, data) = - Overweight::::get(index).ok_or(Error::::UnknownMessageIndex)?; - let used = T::UmpSink::process_upward_message(sender, &data[..], weight_limit) - .map_err(|_| Error::::WeightOverLimit)?; - Overweight::::remove(index); - Self::deposit_event(Event::OverweightServiced(index, used)); - Ok(Some(used.saturating_add(::WeightInfo::service_overweight())).into()) - } - } -} - -/// Routines related to the upward message passing. -impl Pallet { - /// Block initialization logic, called by initializer. - pub(crate) fn initializer_initialize(_now: T::BlockNumber) -> Weight { - Weight::zero() - } - - /// Block finalization logic, called by initializer. - pub(crate) fn initializer_finalize() {} - - /// Called by the initializer to note that a new session has started. - pub(crate) fn initializer_on_new_session( - _notification: &initializer::SessionChangeNotification, - outgoing_paras: &[ParaId], - ) -> Weight { - Self::perform_outgoing_para_cleanup(outgoing_paras) - } - - /// Iterate over all paras that were noted for offboarding and remove all the data - /// associated with them. - fn perform_outgoing_para_cleanup(outgoing: &[ParaId]) -> Weight { - let mut weight: Weight = Weight::zero(); - for outgoing_para in outgoing { - weight = weight.saturating_add(Self::clean_ump_after_outgoing(outgoing_para)); - } - weight - } - - /// Remove all relevant storage items for an outgoing parachain. - pub(crate) fn clean_ump_after_outgoing(outgoing_para: &ParaId) -> Weight { - ::RelayDispatchQueueSize::remove(outgoing_para); - ::RelayDispatchQueues::remove(outgoing_para); - - // Remove the outgoing para from the `NeedsDispatch` list and from - // `NextDispatchRoundStartWith`. - // - // That's needed for maintaining invariant that `NextDispatchRoundStartWith` points to an - // existing item in `NeedsDispatch`. - ::NeedsDispatch::mutate(|v| { - if let Ok(i) = v.binary_search(outgoing_para) { - v.remove(i); - } - }); - ::NextDispatchRoundStartWith::mutate(|v| { - *v = v.filter(|p| p == outgoing_para) - }); - - ::WeightInfo::clean_ump_after_outgoing() - } - - /// Check that all the upward messages sent by a candidate pass the acceptance criteria. Returns - /// false, if any of the messages doesn't pass. - pub(crate) fn check_upward_messages( - config: &HostConfiguration, - para: ParaId, - upward_messages: &[UpwardMessage], - ) -> Result<(), AcceptanceCheckErr> { - if upward_messages.len() as u32 > config.max_upward_message_num_per_candidate { - return Err(AcceptanceCheckErr::MoreMessagesThanPermitted { - sent: upward_messages.len() as u32, - permitted: config.max_upward_message_num_per_candidate, - }) - } - - let (mut para_queue_count, mut para_queue_size) = - ::RelayDispatchQueueSize::get(¶); - - for (idx, msg) in upward_messages.into_iter().enumerate() { - let msg_size = msg.len() as u32; - if msg_size > config.max_upward_message_size { - return Err(AcceptanceCheckErr::MessageSize { - idx: idx as u32, - msg_size, - max_size: config.max_upward_message_size, - }) - } - para_queue_count += 1; - para_queue_size += msg_size; - } - - // make sure that the queue is not overfilled. - // we do it here only once since returning false invalidates the whole relay-chain block. - if para_queue_count > config.max_upward_queue_count { - return Err(AcceptanceCheckErr::CapacityExceeded { - count: para_queue_count, - limit: config.max_upward_queue_count, - }) - } - if para_queue_size > config.max_upward_queue_size { - return Err(AcceptanceCheckErr::TotalSizeExceeded { - total_size: para_queue_size, - limit: config.max_upward_queue_size, - }) - } - - Ok(()) - } - - /// Enqueues `upward_messages` from a `para`'s accepted candidate block. - pub(crate) fn receive_upward_messages( - para: ParaId, - upward_messages: Vec, - ) -> Weight { - let mut weight = Weight::zero(); - - if !upward_messages.is_empty() { - let (extra_count, extra_size) = upward_messages - .iter() - .fold((0, 0), |(cnt, size), d| (cnt + 1, size + d.len() as u32)); - - ::RelayDispatchQueues::mutate(¶, |v| { - v.extend(upward_messages.into_iter()) - }); - - ::RelayDispatchQueueSize::mutate( - ¶, - |(ref mut cnt, ref mut size)| { - *cnt += extra_count; - *size += extra_size; - }, - ); - - ::NeedsDispatch::mutate(|v| { - if let Err(i) = v.binary_search(¶) { - v.insert(i, para); - } - }); - - // NOTE: The actual computation is not accounted for. It should be benchmarked. - weight += T::DbWeight::get().reads_writes(3, 3); - - Self::deposit_event(Event::UpwardMessagesReceived(para, extra_count, extra_size)); - } - - weight - } - - /// Devote some time into dispatching pending upward messages. - pub(crate) fn process_pending_upward_messages() -> Weight { - let mut weight_used = Weight::zero(); - - let config = >::config(); - let mut cursor = NeedsDispatchCursor::new::(); - let mut queue_cache = QueueCache::new(); - - while let Some(dispatchee) = cursor.peek() { - if weight_used.any_gte(config.ump_service_total_weight) { - // Then check whether we've reached or overshoot the - // preferred weight for the dispatching stage. - // - // if so - bail. - break - } - let max_weight = if weight_used == Weight::zero() { - // we increase the amount of weight that we're allowed to use on the first message to try to prevent - // the possibility of blockage of the queue. - config - .ump_service_total_weight - .saturating_mul(T::FirstMessageFactorPercent::get()) / - 100 - } else { - config.ump_service_total_weight - weight_used - }; - - // attempt to process the next message from the queue of the dispatchee; if not beyond - // our remaining weight limit, then consume it. - let maybe_next = queue_cache.peek_front::(dispatchee); - if let Some(upward_message) = maybe_next { - match T::UmpSink::process_upward_message(dispatchee, upward_message, max_weight) { - Ok(used) => { - weight_used += used; - let _ = queue_cache.consume_front::(dispatchee); - }, - Err((id, required)) => { - if required.any_gt(config.ump_max_individual_weight) { - // overweight - add to overweight queue and continue with message - // execution consuming the message. - let upward_message = queue_cache.consume_front::(dispatchee).expect( - "`consume_front` should return the same msg as `peek_front`;\ - if we get into this branch then `peek_front` returned `Some`;\ - thus `upward_message` cannot be `None`; qed", - ); - let index = Self::stash_overweight(dispatchee, upward_message); - Self::deposit_event(Event::OverweightEnqueued( - dispatchee, id, index, required, - )); - } else { - // we process messages in order and don't drop them if we run out of weight, - // so need to break here without calling `consume_front`. - Self::deposit_event(Event::WeightExhausted(id, max_weight, required)); - break - } - }, - } - } - - if queue_cache.is_empty::(dispatchee) { - // the queue is empty now - this para doesn't need attention anymore. - cursor.remove(); - } else { - cursor.advance(); - } - } - - cursor.flush::(); - queue_cache.flush::(); - - weight_used - } - - /// Puts a given upward message into the list of overweight messages allowing it to be executed - /// later. - fn stash_overweight(sender: ParaId, upward_message: Vec) -> OverweightIndex { - let index = ::OverweightCount::mutate(|count| { - let index = *count; - *count += 1; - index - }); - - ::Overweight::insert(index, (sender, upward_message)); - index - } -} - -/// To avoid constant fetching, deserializing and serialization the queues are cached. -/// -/// After an item dequeued from a queue for the first time, the queue is stored in this struct -/// rather than being serialized and persisted. -/// -/// This implementation works best when: -/// -/// 1. when the queues are shallow -/// 2. the dispatcher makes more than one cycle -/// -/// if the queues are deep and there are many we would load and keep the queues for a long time, -/// thus increasing the peak memory consumption of the wasm runtime. Under such conditions persisting -/// queues might play better since it's unlikely that they are going to be requested once more. -/// -/// On the other hand, the situation when deep queues exist and it takes more than one dispatcher -/// cycle to traverse the queues is already sub-optimal and better be avoided. -/// -/// This struct is not supposed to be dropped but rather to be consumed by [`flush`]. -struct QueueCache(BTreeMap); - -struct QueueCacheEntry { - queue: Vec, - total_size: u32, - consumed_count: usize, - consumed_size: usize, -} - -impl QueueCache { - fn new() -> Self { - Self(BTreeMap::new()) - } - - fn ensure_cached(&mut self, para: ParaId) -> &mut QueueCacheEntry { - self.0.entry(para).or_insert_with(|| { - let queue = RelayDispatchQueues::::get(¶); - let (_, total_size) = RelayDispatchQueueSize::::get(¶); - QueueCacheEntry { queue, total_size, consumed_count: 0, consumed_size: 0 } - }) - } - - /// Returns the message at the front of `para`'s queue, or `None` if the queue is empty. - /// - /// Does not mutate the queue. - fn peek_front(&mut self, para: ParaId) -> Option<&UpwardMessage> { - let entry = self.ensure_cached::(para); - entry.queue.get(entry.consumed_count) - } - - /// Attempts to remove one message from the front of `para`'s queue. If the queue is empty, then - /// does nothing. - fn consume_front(&mut self, para: ParaId) -> Option { - let cache_entry = self.ensure_cached::(para); - - match cache_entry.queue.get_mut(cache_entry.consumed_count) { - Some(msg) => { - cache_entry.consumed_count += 1; - cache_entry.consumed_size += msg.len(); - - Some(mem::take(msg)) - }, - None => None, - } - } - - /// Returns if the queue for the given para is empty. - /// - /// That is, if this returns `true` then the next call to [`peek_front`] will return `None`. - /// - /// Does not mutate the queue. - fn is_empty(&mut self, para: ParaId) -> bool { - let cache_entry = self.ensure_cached::(para); - cache_entry.consumed_count >= cache_entry.queue.len() - } - - /// Flushes the updated queues into the storage. - fn flush(self) { - // NOTE we use an explicit method here instead of Drop impl because it has unwanted semantics - // within runtime. It is dangerous to use because of double-panics and flushing on a panic - // is not necessary as well. - for (para, entry) in self.0 { - if entry.consumed_count >= entry.queue.len() { - // remove the entries altogether. - RelayDispatchQueues::::remove(¶); - RelayDispatchQueueSize::::remove(¶); - } else if entry.consumed_count > 0 { - RelayDispatchQueues::::insert(¶, &entry.queue[entry.consumed_count..]); - let count = (entry.queue.len() - entry.consumed_count) as u32; - let size = entry.total_size.saturating_sub(entry.consumed_size as u32); - RelayDispatchQueueSize::::insert(¶, (count, size)); - } - } - } -} - -/// A cursor that iterates over all entries in `NeedsDispatch`. -/// -/// This cursor will start with the para indicated by `NextDispatchRoundStartWith` storage entry. -/// This cursor is cyclic meaning that after reaching the end it will jump to the beginning. Unlike -/// an iterator, this cursor allows removing items during the iteration. -/// -/// Each iteration cycle *must be* concluded with a call to either `advance` or `remove`. -/// -/// This struct is not supposed to be dropped but rather to be consumed by [`flush`]. -#[derive(Debug)] -struct NeedsDispatchCursor { - needs_dispatch: Vec, - index: usize, -} - -impl NeedsDispatchCursor { - fn new() -> Self { - let needs_dispatch: Vec = as Store>::NeedsDispatch::get(); - let start_with = as Store>::NextDispatchRoundStartWith::get(); - - let initial_index = match start_with { - Some(para) => match needs_dispatch.binary_search(¶) { - Ok(found_index) => found_index, - Err(_supposed_index) => { - // well that's weird because we maintain an invariant that - // `NextDispatchRoundStartWith` must point into one of the items in - // `NeedsDispatch`. - // - // let's select 0 as the starting index as a safe bet. - debug_assert!(false); - 0 - }, - }, - None => 0, - }; - - Self { needs_dispatch, index: initial_index } - } - - /// Returns the item the cursor points to. - fn peek(&self) -> Option { - self.needs_dispatch.get(self.index).cloned() - } - - /// Moves the cursor to the next item. - fn advance(&mut self) { - if self.needs_dispatch.is_empty() { - return - } - self.index = (self.index + 1) % self.needs_dispatch.len(); - } - - /// Removes the item under the cursor. - fn remove(&mut self) { - if self.needs_dispatch.is_empty() { - return - } - let _ = self.needs_dispatch.remove(self.index); - - // we might've removed the last element and that doesn't necessarily mean that `needs_dispatch` - // became empty. Reposition the cursor in this case to the beginning. - if self.needs_dispatch.get(self.index).is_none() { - self.index = 0; - } - } - - /// Flushes the dispatcher state into the persistent storage. - fn flush(self) { - let next_one = self.peek(); - as Store>::NextDispatchRoundStartWith::set(next_one); - as Store>::NeedsDispatch::put(self.needs_dispatch); - } -} diff --git a/runtime/parachains/src/ump/benchmarking.rs b/runtime/parachains/src/ump/benchmarking.rs index a257da79b373..759e75d6c4b3 100644 --- a/runtime/parachains/src/ump/benchmarking.rs +++ b/runtime/parachains/src/ump/benchmarking.rs @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . - +/* use super::{Pallet as Ump, *}; use frame_system::RawOrigin; use xcm::prelude::*; @@ -107,7 +107,7 @@ frame_benchmarking::benchmarks! { service_overweight { let host_conf = configuration::ActiveConfig::::get(); - let weight = host_conf.ump_max_individual_weight + host_conf.ump_max_individual_weight + Weight::from_ref_time(1000000); + let weight = Weight::from_ref_time(1000000); let para = ParaId::from(1978); // The message's weight does not really matter here, as we add service_overweight's // max_weight parameter to the extrinsic's weight in the weight calculation. @@ -137,3 +137,4 @@ frame_benchmarking::impl_benchmark_test_suite!( crate::mock::new_test_ext(crate::ump::tests::GenesisConfigBuilder::default().build()), crate::mock::Test ); +*/ \ No newline at end of file diff --git a/runtime/parachains/src/ump/tests.rs b/runtime/parachains/src/ump/tests.rs index 23c5159eab0f..9a41a4d29ea9 100644 --- a/runtime/parachains/src/ump/tests.rs +++ b/runtime/parachains/src/ump/tests.rs @@ -27,8 +27,6 @@ pub(super) struct GenesisConfigBuilder { max_upward_message_num_per_candidate: u32, max_upward_queue_count: u32, max_upward_queue_size: u32, - ump_service_total_weight: Weight, - ump_max_individual_weight: Weight, } impl Default for GenesisConfigBuilder { @@ -38,8 +36,6 @@ impl Default for GenesisConfigBuilder { max_upward_message_num_per_candidate: 2, max_upward_queue_count: 4, max_upward_queue_size: 64, - ump_service_total_weight: Weight::from_ref_time(1000).set_proof_size(1000), - ump_max_individual_weight: Weight::from_ref_time(100).set_proof_size(100), } } } @@ -53,8 +49,6 @@ impl GenesisConfigBuilder { config.max_upward_message_num_per_candidate = self.max_upward_message_num_per_candidate; config.max_upward_queue_count = self.max_upward_queue_count; config.max_upward_queue_size = self.max_upward_queue_size; - config.ump_service_total_weight = self.ump_service_total_weight; - config.ump_max_individual_weight = self.ump_max_individual_weight; genesis } } @@ -76,7 +70,7 @@ fn queue_upward_msg(para: ParaId, msg: UpwardMessage) { assert!(Ump::check_upward_messages(&Configuration::config(), para, &msgs).is_ok()); let _ = Ump::receive_upward_messages(para, msgs); } - +/* fn assert_storage_consistency_exhaustive() { // check that empty queues don't clutter the storage. for (_para, queue) in ::RelayDispatchQueues::iter() { @@ -154,19 +148,13 @@ fn dispatch_resume_after_exceeding_dispatch_stage_weight() { let c_msg_2 = (100u32, "c_msg_2").encode(); let q_msg = (500u32, "q_msg").encode(); - new_test_ext( - GenesisConfigBuilder { - ump_service_total_weight: Weight::from_ref_time(500).set_proof_size(500), - ..Default::default() - } - .build(), - ) - .execute_with(|| { + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { queue_upward_msg(q, q_msg.clone()); queue_upward_msg(c, c_msg_1.clone()); queue_upward_msg(a, a_msg_1.clone()); queue_upward_msg(a, a_msg_2.clone()); + //ump_service_total_weight: Weight::from_ref_time(500).set_proof_size(500), assert_storage_consistency_exhaustive(); // we expect only two first messages to fit in the first iteration. @@ -194,171 +182,4 @@ fn dispatch_resume_after_exceeding_dispatch_stage_weight() { }); } -#[test] -fn dispatch_keeps_message_after_weight_exhausted() { - let a = ParaId::from(128); - - let a_msg_1 = (300u32, "a_msg_1").encode(); - let a_msg_2 = (300u32, "a_msg_2").encode(); - - new_test_ext( - GenesisConfigBuilder { - ump_service_total_weight: Weight::from_ref_time(500).set_proof_size(500), - ump_max_individual_weight: Weight::from_ref_time(300).set_proof_size(300), - ..Default::default() - } - .build(), - ) - .execute_with(|| { - queue_upward_msg(a, a_msg_1.clone()); - queue_upward_msg(a, a_msg_2.clone()); - - assert_storage_consistency_exhaustive(); - - // we expect only one message to fit in the first iteration. - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(a, a_msg_1)]); - assert_storage_consistency_exhaustive(); - - // second iteration should process the remaining message. - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(a, a_msg_2)]); - assert_storage_consistency_exhaustive(); - - // finally, make sure that the queue is empty. - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![]); - assert_storage_consistency_exhaustive(); - }); -} - -#[test] -fn dispatch_correctly_handle_remove_of_latest() { - let a = ParaId::from(1991); - let b = ParaId::from(1999); - - let a_msg_1 = (300u32, "a_msg_1").encode(); - let a_msg_2 = (300u32, "a_msg_2").encode(); - let b_msg_1 = (300u32, "b_msg_1").encode(); - - new_test_ext( - GenesisConfigBuilder { - ump_service_total_weight: Weight::from_ref_time(900).set_proof_size(900), - ..Default::default() - } - .build(), - ) - .execute_with(|| { - // We want to test here an edge case, where we remove the queue with the highest - // para id (i.e. last in the `needs_dispatch` order). - // - // If the last entry was removed we should proceed execution, assuming we still have - // weight available. - - queue_upward_msg(a, a_msg_1.clone()); - queue_upward_msg(a, a_msg_2.clone()); - queue_upward_msg(b, b_msg_1.clone()); - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(a, a_msg_1), (b, b_msg_1), (a, a_msg_2)]); - }); -} - -#[test] -fn verify_relay_dispatch_queue_size_is_externally_accessible() { - // Make sure that the relay dispatch queue size storage entry is accessible via well known - // keys and is decodable into a (u32, u32). - - use parity_scale_codec::Decode as _; - use primitives::v2::well_known_keys; - - let a = ParaId::from(228); - let msg = vec![1, 2, 3]; - - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - queue_upward_msg(a, msg); - - let raw_queue_size = sp_io::storage::get(&well_known_keys::relay_dispatch_queue_size(a)) - .expect( - "enqueing a message should create the dispatch queue\ - and it should be accessible via the well known keys", - ); - let (cnt, size) = <(u32, u32)>::decode(&mut &raw_queue_size[..]) - .expect("the dispatch queue size should be decodable into (u32, u32)"); - - assert_eq!(cnt, 1); - assert_eq!(size, 3); - }); -} - -#[test] -fn service_overweight_unknown() { - // This test just makes sure that 0 is not a valid index and we can use it not worrying in - // the next test. - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - assert_noop!( - Ump::service_overweight(RuntimeOrigin::root(), 0, Weight::from_ref_time(1000)), - Error::::UnknownMessageIndex - ); - }); -} - -#[test] -fn overweight_queue_works() { - let para_a = ParaId::from(2021); - - let a_msg_1 = (301u32, "a_msg_1").encode(); - let a_msg_2 = (500u32, "a_msg_2").encode(); - let a_msg_3 = (500u32, "a_msg_3").encode(); - - new_test_ext( - GenesisConfigBuilder { - ump_service_total_weight: Weight::from_ref_time(900).set_proof_size(900), - ump_max_individual_weight: Weight::from_ref_time(300).set_proof_size(300), - ..Default::default() - } - .build(), - ) - .execute_with(|| { - // HACK: Start with the block number 1. This is needed because should an event be - // emitted during the genesis block they will be implicitly wiped. - System::set_block_number(1); - - // This one is overweight. However, the weight is plenty and we can afford to execute - // this message, thus expect it. - queue_upward_msg(para_a, a_msg_1.clone()); - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(para_a, a_msg_1)]); - - // This is overweight and this message cannot fit into the total weight budget. - queue_upward_msg(para_a, a_msg_2.clone()); - queue_upward_msg(para_a, a_msg_3.clone()); - Ump::process_pending_upward_messages(); - assert_last_event( - Event::OverweightEnqueued( - para_a, - upward_message_id(&a_msg_3[..]), - 0, - Weight::from_ref_time(500), - ) - .into(), - ); - - // Now verify that if we wanted to service this overweight message with less than enough - // weight it will fail. - assert_noop!( - Ump::service_overweight(RuntimeOrigin::root(), 0, Weight::from_ref_time(499)), - Error::::WeightOverLimit - ); - - // ... and if we try to service it with just enough weight it will succeed as well. - assert_ok!(Ump::service_overweight(RuntimeOrigin::root(), 0, Weight::from_ref_time(500))); - assert_last_event(Event::OverweightServiced(0, Weight::from_ref_time(500)).into()); - - // ... and if we try to service a message with index that doesn't exist it will error - // out. - assert_noop!( - Ump::service_overweight(RuntimeOrigin::root(), 1, Weight::from_ref_time(1000)), - Error::::UnknownMessageIndex - ); - }); -} +*/ \ No newline at end of file diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index 0e6acfe11cf3..2c506fb95428 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -16,20 +16,26 @@ //! Implementation of `ProcessMessage` for an `ExecuteXcm` implementation. -use sp_std::{fmt::Debug, marker::PhantomData}; -use sp_io::hashing::blake2_256; -use sp_weights::Weight; +use frame_support::{ + ensure, + traits::{ProcessMessage, ProcessMessageError}, +}; use parity_scale_codec::{Decode, FullCodec, MaxEncodedLen}; use scale_info::TypeInfo; -use frame_support::{ensure, traits::{ProcessMessage, ProcessMessageError}}; +use sp_io::hashing::blake2_256; +use sp_std::{fmt::Debug, marker::PhantomData}; +use sp_weights::Weight; use xcm::prelude::*; -pub struct ProcessXcmMessage(PhantomData<(MessageOrigin, XcmExecutor, Call)>); +pub struct ProcessXcmMessage( + PhantomData<(MessageOrigin, XcmExecutor, Call)>, +); impl< - MessageOrigin: Into + FullCodec + MaxEncodedLen + Clone + Eq + PartialEq + TypeInfo + Debug, - XcmExecutor: ExecuteXcm, - Call, -> ProcessMessage for ProcessXcmMessage { + MessageOrigin: Into + FullCodec + MaxEncodedLen + Clone + Eq + PartialEq + TypeInfo + Debug, + XcmExecutor: ExecuteXcm, + Call, + > ProcessMessage for ProcessXcmMessage +{ type Origin = MessageOrigin; /// Process the given message, using no more than `weight_limit` in weight to do so. @@ -47,15 +53,9 @@ impl< let weight = Weight::from_ref_time(pre.weight_of()); ensure!(weight.all_lte(weight_limit), ProcessMessageError::Overweight(weight)); match XcmExecutor::execute(origin.into(), pre, hash, 0) { - Outcome::Complete(w) => { - Ok((true, Weight::from_ref_time(w))) - }, - Outcome::Incomplete(w, _) => { - Ok((false, Weight::from_ref_time(w))) - }, - Outcome::Error(_) => { - Err(ProcessMessageError::Unsupported) - } + Outcome::Complete(w) => Ok((true, Weight::from_ref_time(w))), + Outcome::Incomplete(w, _) => Ok((false, Weight::from_ref_time(w))), + Outcome::Error(_) => Err(ProcessMessageError::Unsupported), } } } @@ -63,7 +63,5 @@ impl< #[cfg(test)] mod tests { #[test] - fn process_message_works() { - - } -} \ No newline at end of file + fn process_message_works() {} +} From de6da2cb91ca8016b23174e4376c0a6b6eaf06af Mon Sep 17 00:00:00 2001 From: Gav Date: Fri, 11 Nov 2022 16:54:05 +0100 Subject: [PATCH 003/182] New well-known key to report UMPQ capacity --- primitives/src/v2/mod.rs | 12 ++++++++++++ runtime/parachains/src/inclusion/mod.rs | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/primitives/src/v2/mod.rs b/primitives/src/v2/mod.rs index ea1f4fcca0b9..5b01e09d1178 100644 --- a/primitives/src/v2/mod.rs +++ b/primitives/src/v2/mod.rs @@ -235,6 +235,7 @@ pub mod well_known_keys { /// /// - `count: u32`, the number of messages currently in the queue for given para, /// - `total_size: u32`, the total size of all messages in the queue. + #[deprecated = "Use `relay_dispatch_queue_remaining_capacity` instead"] pub fn relay_dispatch_queue_size(para_id: Id) -> Vec { let prefix = hex!["f5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e"]; @@ -249,6 +250,17 @@ pub mod well_known_keys { }) } + /// The upward message dispatch queue remaining capacity for the given para id. + /// + /// The storage entry stores a tuple of two values: + /// + /// - `count: u32`, the number of additional messages which may be enqueued for the given para, + /// - `total_size: u32`, the total size of additional messages which may be enqueued for the + /// given para. + pub fn relay_dispatch_queue_remaining_capacity(para_id: Id) -> Vec { + (b":relay_dispatch_queue_remaining_capacity", para_id).encode() + } + /// The HRMP channel for the given identifier. /// /// The storage entry should be accessed as an `AbridgedHrmpChannel` encoded value. diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 15911b048eec..41387848982c 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -830,7 +830,7 @@ impl Pallet { commitments.processed_downward_messages, ); weight += - Self::receive_upward_messages(receipt.descriptor.para_id, commitments.upward_messages); + Self::receive_upward_messages(&config, receipt.descriptor.para_id, commitments.upward_messages); weight += >::prune_hrmp( receipt.descriptor.para_id, T::BlockNumber::from(commitments.hrmp_watermark), @@ -905,6 +905,7 @@ impl Pallet { /// Enqueues `upward_messages` from a `para`'s accepted candidate block. pub(crate) fn receive_upward_messages( + config: &HostConfiguration, para: ParaId, upward_messages: Vec, ) -> Weight { @@ -923,6 +924,11 @@ impl Pallet { let key = well_known_keys::relay_dispatch_queue_size(para); (count, size).using_encoded(|d| sp_io::storage::set(&key, d)); + let key = well_known_keys::relay_dispatch_queue_remaining_capacity(para); + let remaining_count = config.max_upward_queue_count.saturating_sub(count); + let remaining_size = config.max_upward_queue_size.saturating_sub(size); + (remaining_count, remaining_size).using_encoded(|d| sp_io::storage::set(&key, d)); + // TODO: calculate worst-case enqueue (largest possible message with the most recent page // being almost full) and return. Weight::zero() From c30a4fd71bd4d3d4cbde336620777a188c9a04a7 Mon Sep 17 00:00:00 2001 From: Gav Date: Fri, 11 Nov 2022 17:09:34 +0100 Subject: [PATCH 004/182] Add missing file --- runtime/parachains/src/inclusion/mod.rs | 7 +- runtime/parachains/src/ump_tests.rs | 309 ++++++++++++++++++++++++ 2 files changed, 314 insertions(+), 2 deletions(-) create mode 100644 runtime/parachains/src/ump_tests.rs diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 41387848982c..88737a8e105b 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -829,8 +829,11 @@ impl Pallet { receipt.descriptor.para_id, commitments.processed_downward_messages, ); - weight += - Self::receive_upward_messages(&config, receipt.descriptor.para_id, commitments.upward_messages); + weight += Self::receive_upward_messages( + &config, + receipt.descriptor.para_id, + commitments.upward_messages, + ); weight += >::prune_hrmp( receipt.descriptor.para_id, T::BlockNumber::from(commitments.hrmp_watermark), diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs new file mode 100644 index 000000000000..c7aec0f0d006 --- /dev/null +++ b/runtime/parachains/src/ump_tests.rs @@ -0,0 +1,309 @@ +// Copyright 2020 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 crate::mock::{ + assert_last_event, assert_last_events, new_test_ext, take_processed, Configuration, + MessageQueue, MockGenesisConfig, ParaInclusion, System, Test, +}; +use frame_support::{ + assert_noop, assert_ok, + pallet_prelude::*, + traits::{ExecuteOverweightError, ServiceQueues}, + weights::Weight, +}; +use primitives::v2::{Id as ParaId, UpwardMessage}; +use sp_runtime::traits::{Bounded, Hash}; +use sp_std::prelude::*; + +pub(super) struct GenesisConfigBuilder { + max_upward_message_size: u32, + max_upward_message_num_per_candidate: u32, + max_upward_queue_count: u32, + max_upward_queue_size: u32, +} + +impl Default for GenesisConfigBuilder { + fn default() -> Self { + Self { + max_upward_message_size: 16, + max_upward_message_num_per_candidate: 2, + max_upward_queue_count: 4, + max_upward_queue_size: 64, + } + } +} + +impl GenesisConfigBuilder { + pub(super) fn build(self) -> crate::mock::MockGenesisConfig { + let mut genesis = default_genesis_config(); + let config = &mut genesis.configuration.config; + + config.max_upward_message_size = self.max_upward_message_size; + config.max_upward_message_num_per_candidate = self.max_upward_message_num_per_candidate; + config.max_upward_queue_count = self.max_upward_queue_count; + config.max_upward_queue_size = self.max_upward_queue_size; + genesis + } +} + +fn default_genesis_config() -> MockGenesisConfig { + MockGenesisConfig { + configuration: crate::configuration::GenesisConfig { + config: crate::configuration::HostConfiguration { + max_downward_message_size: 1024, + ..Default::default() + }, + }, + ..Default::default() + } +} + +fn queue_upward_msg(para: ParaId, msg: UpwardMessage) { + let msgs = vec![msg]; + assert!(ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs).is_ok()); + let _ = ParaInclusion::receive_upward_messages(para, msgs); +} + +#[test] +fn dispatch_empty() { + new_test_ext(default_genesis_config()).execute_with(|| { + // make sure that the case with empty queues is handled properly + MessageQueue::service_queues(Weight::max_value()); + }); +} + +#[test] +fn dispatch_single_message() { + let a = ParaId::from(228); + let msg = 1000u32.encode(); + + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + queue_upward_msg(a, msg.clone()); + MessageQueue::service_queues(Weight::max_value()); + assert_eq!(take_processed(), vec![(a, msg)]); + }); +} + +#[test] +fn dispatch_resume_after_exceeding_dispatch_stage_weight() { + let a = ParaId::from(128); + let c = ParaId::from(228); + let q = ParaId::from(911); + + let a_msg_1 = (200u32, "a_msg_1").encode(); + let a_msg_2 = (100u32, "a_msg_2").encode(); + let c_msg_1 = (300u32, "c_msg_1").encode(); + let c_msg_2 = (100u32, "c_msg_2").encode(); + let q_msg = (500u32, "q_msg").encode(); + + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + queue_upward_msg(q, q_msg.clone()); + queue_upward_msg(c, c_msg_1.clone()); + queue_upward_msg(a, a_msg_1.clone()); + queue_upward_msg(a, a_msg_2.clone()); + + // we expect only two first messages to fit in the first iteration. + MessageQueue::service_queues(Weight::from_parts(500, 500)); + assert_eq!(take_processed(), vec![(q, q_msg)]); + queue_upward_msg(c, c_msg_2.clone()); + // second iteration should process the second message. + MessageQueue::service_queues(Weight::from_parts(500, 500)); + assert_eq!(take_processed(), vec![(c, c_msg_1), (c, c_msg_2)]); + // 3rd iteration. + MessageQueue::service_queues(Weight::from_parts(500, 500)); + assert_eq!(take_processed(), vec![(a, a_msg_1), (a, a_msg_2)]); + // finally, make sure that the queue is empty. + MessageQueue::service_queues(Weight::from_parts(500, 500)); + assert_eq!(take_processed(), vec![]); + }); +} + +#[test] +fn dispatch_keeps_message_after_weight_exhausted() { + let a = ParaId::from(128); + + let a_msg_1 = (300u32, "a_msg_1").encode(); + let a_msg_2 = (300u32, "a_msg_2").encode(); + + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + queue_upward_msg(a, a_msg_1.clone()); + queue_upward_msg(a, a_msg_2.clone()); + + // we expect only one message to fit in the first iteration. + MessageQueue::service_queues(Weight::from_parts(500, 500)); + assert_eq!(take_processed(), vec![(a, a_msg_1)]); + // second iteration should process the remaining message. + MessageQueue::service_queues(Weight::from_parts(500, 500)); + assert_eq!(take_processed(), vec![(a, a_msg_2)]); + // finally, make sure that the queue is empty. + MessageQueue::service_queues(Weight::from_parts(500, 500)); + assert_eq!(take_processed(), vec![]); + }); +} + +#[test] +fn dispatch_correctly_handle_remove_of_latest() { + let a = ParaId::from(1991); + let b = ParaId::from(1999); + + let a_msg_1 = (300u32, "a_msg_1").encode(); + let a_msg_2 = (300u32, "a_msg_2").encode(); + let b_msg_1 = (300u32, "b_msg_1").encode(); + + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + // We want to test here an edge case, where we remove the queue with the highest + // para id (i.e. last in the `needs_dispatch` order). + // + // If the last entry was removed we should proceed execution, assuming we still have + // weight available. + + queue_upward_msg(a, a_msg_1.clone()); + queue_upward_msg(a, a_msg_2.clone()); + queue_upward_msg(b, b_msg_1.clone()); + MessageQueue::service_queues(Weight::from_parts(900, 900)); + assert_eq!(take_processed(), vec![(a, a_msg_1), (a, a_msg_2), (b, b_msg_1)]); + }); +} + +#[test] +fn verify_relay_dispatch_queue_size_is_externally_accessible() { + // Make sure that the relay dispatch queue size storage entry is accessible via well known + // keys and is decodable into a (u32, u32). + + use parity_scale_codec::Decode as _; + use primitives::v2::well_known_keys; + + let a = ParaId::from(228); + let msg = vec![1, 2, 3]; + + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + queue_upward_msg(a, msg); + + let raw_queue_size = sp_io::storage::get(&well_known_keys::relay_dispatch_queue_size(a)) + .expect( + "enqueing a message should create the dispatch queue\ + and it should be accessible via the well known keys", + ); + let (cnt, size) = <(u32, u32)>::decode(&mut &raw_queue_size[..]) + .expect("the dispatch queue size should be decodable into (u32, u32)"); + + assert_eq!(cnt, 1); + assert_eq!(size, 3); + }); +} + +#[test] +fn service_overweight_unknown() { + // This test just makes sure that 0 is not a valid index and we can use it not worrying in + // the next test. + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + assert_noop!( + ::execute_overweight( + Weight::from_ref_time(1000), + (0u32.into(), 0, 0) + ), + ExecuteOverweightError::NotFound, + ); + }); +} + +#[test] +fn overweight_queue_works() { + let para_a = ParaId::from(2021); + + let a_msg_1 = (301u32, "a_msg_1").encode(); + let a_msg_2 = (501u32, "a_msg_2").encode(); + let a_msg_3 = (501u32, "a_msg_3").encode(); + + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + // HACK: Start with the block number 1. This is needed because should an event be + // emitted during the genesis block they will be implicitly wiped. + System::set_block_number(1); + + // This one is overweight. However, the weight is plenty and we can afford to execute + // this message, thus expect it. + queue_upward_msg(para_a, a_msg_1.clone()); + queue_upward_msg(para_a, a_msg_2.clone()); + queue_upward_msg(para_a, a_msg_3.clone()); + + MessageQueue::service_queues(Weight::from_parts(500, 500)); + let hash_1 = <::Hashing as Hash>::hash(&a_msg_1[..]); + let hash_2 = <::Hashing as Hash>::hash(&a_msg_2[..]); + let hash_3 = <::Hashing as Hash>::hash(&a_msg_3[..]); + assert_last_events( + [ + pallet_message_queue::Event::::Processed { + hash: hash_1.clone(), + origin: para_a, + weight_used: Weight::from_parts(301, 301), + success: true, + } + .into(), + pallet_message_queue::Event::::OverweightEnqueued { + hash: hash_2.clone(), + origin: para_a, + page_index: 0, + message_index: 1, + } + .into(), + pallet_message_queue::Event::::OverweightEnqueued { + hash: hash_3.clone(), + origin: para_a, + page_index: 0, + message_index: 2, + } + .into(), + ] + .into_iter(), + ); + assert_eq!(take_processed(), vec![(para_a, a_msg_1)]); + + // Now verify that if we wanted to service this overweight message with less than enough + // weight it will fail. + assert_noop!( + ::execute_overweight( + Weight::from_parts(500, 500), + (para_a, 0, 2) + ), + ExecuteOverweightError::InsufficientWeight, + ); + + // ... and if we try to service it with just enough weight it will succeed as well. + assert_ok!(::execute_overweight( + Weight::from_parts(501, 501), + (para_a, 0, 2) + )); + assert_last_event( + pallet_message_queue::Event::::Processed { + hash: hash_3, + origin: para_a, + weight_used: Weight::from_parts(501, 501), + success: true, + } + .into(), + ); + + // ... and if we try to service a message with index that doesn't exist it will error + // out. + assert_noop!( + ::execute_overweight( + Weight::from_parts(501, 501), + (para_a, 0, 2) + ), + ExecuteOverweightError::NotFound, + ); + }); +} From 89ab8b9074d43fcf3a7e9ff0d2d3d21b40a323fb Mon Sep 17 00:00:00 2001 From: Gav Date: Fri, 11 Nov 2022 17:17:58 +0100 Subject: [PATCH 005/182] Fixes --- Cargo.lock | 600 ++++++++++-------------- Cargo.toml | 244 ++++++++++ runtime/parachains/src/inclusion/mod.rs | 1 + runtime/parachains/src/ump_tests.rs | 3 +- 4 files changed, 493 insertions(+), 355 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 725a37887e03..7a4c33c2b4ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,7 +42,7 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cipher", "cpufeatures", "opaque-debug 0.3.0", @@ -130,6 +130,15 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + [[package]] name = "arrayvec" version = "0.5.2" @@ -264,7 +273,7 @@ checksum = "83137067e3a2a6a06d67168e49e68a0957d215410473a740cea95a2425c0b7c6" dependencies = [ "async-io", "blocking", - "cfg-if", + "cfg-if 1.0.0", "event-listener", "futures-lite", "libc", @@ -377,7 +386,7 @@ checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" dependencies = [ "addr2line", "cc", - "cfg-if", + "cfg-if 1.0.0", "libc", "miniz_oxide", "object 0.27.1", @@ -558,6 +567,16 @@ dependencies = [ "digest 0.10.3", ] +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq", +] + [[package]] name = "blake2b_simd" version = "1.0.0" @@ -589,7 +608,7 @@ dependencies = [ "arrayref", "arrayvec 0.7.2", "cc", - "cfg-if", + "cfg-if 1.0.0", "constant_time_eq", "digest 0.10.3", ] @@ -612,7 +631,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.4", ] [[package]] @@ -787,6 +806,12 @@ dependencies = [ "smallvec", ] +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + [[package]] name = "cfg-if" version = "1.0.0" @@ -805,7 +830,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cipher", "cpufeatures", "zeroize", @@ -861,11 +886,11 @@ dependencies = [ [[package]] name = "ckb-merkle-mountain-range" -version = "0.5.2" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ccb671c5921be8a84686e6212ca184cb1d7c51cadcdbfcbd1cc3f042f5dfb8" +checksum = "4f061f97d64fd1822664bdfb722f7ae5469a97b77567390f7442be5b5dc82a5b" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", ] [[package]] @@ -887,24 +912,8 @@ checksum = "6bf8832993da70a4c6d13c581f4463c2bdda27b9bf1c5498dc4365543abe6d6f" dependencies = [ "atty", "bitflags", - "clap_derive 3.2.18", - "clap_lex 0.2.4", - "indexmap", - "once_cell", - "strsim", - "termcolor", -] - -[[package]] -name = "clap" -version = "4.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335867764ed2de42325fafe6d18b8af74ba97ee0c590fa016f157535b42ab04b" -dependencies = [ - "atty", - "bitflags", - "clap_derive 4.0.18", - "clap_lex 0.3.0", + "clap_derive", + "clap_lex", "once_cell", "strsim", "termcolor", @@ -923,28 +932,6 @@ dependencies = [ "syn", ] -[[package]] -name = "clap_derive" -version = "4.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a1b0f6422af32d5da0c58e2703320f379216ee70198241c84173a8c5ac28f3" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "clap_lex" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" -dependencies = [ - "os_str_bytes", -] - [[package]] name = "clap_lex" version = "0.3.0" @@ -966,16 +953,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - [[package]] name = "color-eyre" version = "0.6.1" @@ -1011,9 +988,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" [[package]] name = "constant_time_eq" @@ -1058,7 +1035,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "931ab2a3e6330a07900b8e7ca4e106cdcbb93f2b9a52df55e54ee53d8305b55d" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1174,7 +1151,7 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "738c290dfaea84fc1ca15ad9c168d083b05a714e1efddd8edaab678dc28d2836" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1183,7 +1160,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", ] @@ -1193,7 +1170,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-epoch", "crossbeam-utils", ] @@ -1204,7 +1181,7 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", "lazy_static", "memoffset", @@ -1217,7 +1194,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", ] @@ -1227,7 +1204,7 @@ version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ff1f980957787286a554052d03c7aee98d99cc32e09f6d45f0a814133c87978" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "once_cell", ] @@ -1239,9 +1216,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.9" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" dependencies = [ "generic-array 0.14.4", "rand_core 0.6.3", @@ -1337,50 +1314,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "cxx" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b7d4e43b25d3c994662706a1d4fcfc32aaa6afd287502c111b237093bb23f3a" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f8829ddc213e2c1368e51a2564c552b65a8cb6a28f31e576270ac81d5e5827" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e72537424b474af1460806647c41d4b6d35d09ef7fe031c5c2fa5766047cc56a" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "309e4fb93eed90e1e14bea0da16b209f81813ba9fc7830c20ed151dd7bc0a4d7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "data-encoding" version = "2.3.2" @@ -1418,12 +1351,11 @@ dependencies = [ [[package]] name = "der" -version = "0.6.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" dependencies = [ "const-oid", - "zeroize", ] [[package]] @@ -1506,7 +1438,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "dirs-sys-next", ] @@ -1610,9 +1542,9 @@ checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "ecdsa" -version = "0.14.8" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" dependencies = [ "der", "elliptic-curve", @@ -1652,8 +1584,8 @@ dependencies = [ "curve25519-dalek 3.2.0", "hashbrown", "hex", - "rand_core 0.6.4", - "sha2 0.9.9", + "rand_core 0.6.3", + "sha2 0.9.8", "zeroize", ] @@ -1665,14 +1597,13 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.12.3" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", "ff", "generic-array 0.14.4", "group", @@ -1688,7 +1619,7 @@ version = "0.8.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1913,7 +1844,7 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc04871e5ae3aa2952d552dae6b291b3099723bf779a8054281c1366a54613ef" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "log", "serde", @@ -1925,9 +1856,9 @@ dependencies = [ [[package]] name = "ff" -version = "0.12.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" dependencies = [ "rand_core 0.6.3", "subtle", @@ -1949,7 +1880,7 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e94a7bbaa59354bc20dd75b67f23e2797b4490e9d6928203fb105c79e448c86c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall", "windows-sys 0.36.1", @@ -2007,7 +1938,7 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crc32fast", "libc", "libz-sys", @@ -2063,9 +1994,9 @@ dependencies = [ [[package]] name = "fragile" -version = "2.0.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" +checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "frame-benchmarking" @@ -2096,7 +2027,7 @@ dependencies = [ "Inflector", "array-bytes", "chrono", - "clap 4.0.18", + "clap", "comfy-table", "frame-benchmarking", "frame-support", @@ -2132,7 +2063,6 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-std", "sp-storage", "sp-trie", "tempfile", @@ -2187,7 +2117,7 @@ version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "parity-scale-codec", "scale-info", "serde", @@ -2547,7 +2477,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", @@ -2560,7 +2490,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "wasi 0.10.0+wasi-snapshot-preview1", ] @@ -2633,9 +2563,9 @@ dependencies = [ [[package]] name = "group" -version = "0.12.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" dependencies = [ "ff", "rand_core 0.6.3", @@ -2746,15 +2676,6 @@ dependencies = [ "digest 0.9.0", ] -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.3", -] - [[package]] name = "hmac-drbg" version = "0.3.0" @@ -2981,7 +2902,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -3208,14 +3129,14 @@ dependencies = [ [[package]] name = "k256" -version = "0.11.6" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "ecdsa", "elliptic-curve", - "sha2 0.10.2", + "sec1", ] [[package]] @@ -3430,7 +3351,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afe203d669ec979b7128619bae5a63b7b42e9203c1b29146079ee05e2f604b52" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "winapi", ] @@ -3534,7 +3455,7 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "lru 0.8.0", + "lru 0.8.1", "prost", "prost-build", "prost-codec", @@ -3563,7 +3484,7 @@ dependencies = [ "prost", "prost-build", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.2", "smallvec", "thiserror", "uint", @@ -3848,15 +3769,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "link-cplusplus" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" -dependencies = [ - "cc", -] - [[package]] name = "linked-hash-map" version = "0.5.4" @@ -3903,11 +3815,20 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "serde", "value-bag", ] +[[package]] +name = "lru" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +dependencies = [ + "hashbrown", +] + [[package]] name = "lru" version = "0.8.1" @@ -4050,7 +3971,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce95ae042940bad7e312857b929ee3d11b8f799a80cb7b9c7ec5125516906395" dependencies = [ - "lru", + "lru 0.8.1", ] [[package]] @@ -4133,7 +4054,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2be9a9090bc1cac2930688fa9478092a64c6a92ddc6ae0692d46b37d9cab709" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "downcast", "fragile", "lazy_static", @@ -4147,33 +4068,6 @@ name = "mockall_derive" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86d702a0530a0141cf4ed147cf5ec7be6f2c187d4e37fcbefc39cf34116bfe8f" -dependencies = [ - "cfg-if", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "mockall" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e4a1c770583dac7ab5e2f6c139153b783a53a1bbee9729613f193e59828326" -dependencies = [ - "cfg-if 1.0.0", - "downcast", - "fragile", - "lazy_static", - "mockall_derive", - "predicates", - "predicates-tree", -] - -[[package]] -name = "mockall_derive" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "832663583d5fa284ca8810bf7015e46c9fff9622d3cf34bd1eea5003fec06dd0" dependencies = [ "cfg-if 1.0.0", "proc-macro2", @@ -4222,7 +4116,7 @@ dependencies = [ "core2", "digest 0.10.3", "multihash-derive", - "sha2 0.10.6", + "sha2 0.10.2", "sha3", "unsigned-varint", ] @@ -4271,7 +4165,7 @@ dependencies = [ "matrixmultiply", "nalgebra-macros", "num-complex", - "num-rational", + "num-rational 0.4.1", "num-traits", "rand 0.8.5", "rand_distr", @@ -4397,7 +4291,7 @@ checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" dependencies = [ "bitflags", "cc", - "cfg-if", + "cfg-if 1.0.0", "libc", "memoffset", ] @@ -4409,11 +4303,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f17df307904acd05aa8e32e97bb20f2a0df1728bbc2d771ae8f9a90463441e9" dependencies = [ "bitflags", - "cfg-if", + "cfg-if 1.0.0", "libc", "memoffset", ] +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -4437,12 +4337,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" -[[package]] -name = "num-bigint" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" - [[package]] name = "ntapi" version = "0.3.6" @@ -4452,6 +4346,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-bigint" version = "0.4.3" @@ -4492,6 +4397,18 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + [[package]] name = "num-rational" version = "0.4.1" @@ -4499,7 +4416,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", - "num-bigint", + "num-bigint 0.4.3", "num-integer", "num-traits", ] @@ -4570,7 +4487,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" dependencies = [ "bitflags", - "cfg-if", + "cfg-if 1.0.0", "foreign-types", "libc", "once_cell", @@ -5105,7 +5022,6 @@ dependencies = [ name = "pallet-mmr-rpc" version = "3.0.0" dependencies = [ - "anyhow", "jsonrpsee", "parity-scale-codec", "serde", @@ -5398,7 +5314,6 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4a5a9dea00c9b4e4d34ff56368451aa4dac09d77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5487,7 +5402,6 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-weights", ] [[package]] @@ -5498,7 +5412,6 @@ dependencies = [ "parity-scale-codec", "sp-api", "sp-runtime", - "sp-weights", ] [[package]] @@ -5517,20 +5430,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-uniques" -version = "4.0.0-dev" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-utility" version = "4.0.0-dev" @@ -5621,6 +5520,25 @@ dependencies = [ "xcm-executor", ] +[[package]] +name = "parity-db" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c8fdb726a43661fa54b43e7114e6b88b2289cae388eb3ad766d9d1754d83fce" +dependencies = [ + "blake2-rfc", + "crc32fast", + "fs2", + "hex", + "libc", + "log", + "lz4", + "memmap2", + "parking_lot 0.12.1", + "rand 0.8.5", + "snap", +] + [[package]] name = "parity-db" version = "0.4.2" @@ -5679,7 +5597,7 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "hashbrown", "impl-trait-for-tuples", "parity-util-mem-derive", @@ -5702,6 +5620,15 @@ dependencies = [ "synstructure", ] +[[package]] +name = "parity-wasm" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ad52817c4d343339b3bc2e26861bd21478eda0b7509acf83505727000512ac" +dependencies = [ + "byteorder", +] + [[package]] name = "parity-wasm" version = "0.45.0" @@ -5741,7 +5668,7 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "instant", "libc", "redox_syscall", @@ -5755,7 +5682,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall", "smallvec", @@ -5891,12 +5818,13 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkcs8" -version = "0.9.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" dependencies = [ "der", "spki", + "zeroize", ] [[package]] @@ -5984,7 +5912,7 @@ dependencies = [ "fatality", "futures", "futures-timer", - "lru", + "lru 0.8.1", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -6014,7 +5942,7 @@ dependencies = [ "futures", "futures-timer", "log", - "lru", + "lru 0.8.1", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -6037,7 +5965,7 @@ dependencies = [ name = "polkadot-cli" version = "0.9.31" dependencies = [ - "clap 3.2.22", + "clap", "frame-benchmarking-cli", "futures", "log", @@ -6154,7 +6082,7 @@ dependencies = [ "futures-timer", "indexmap", "lazy_static", - "lru", + "lru 0.8.1", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -6274,7 +6202,7 @@ dependencies = [ "futures-timer", "kvdb", "kvdb-memorydb", - "lru", + "lru 0.8.1", "merlin", "parity-scale-codec", "parking_lot 0.12.1", @@ -6444,7 +6372,7 @@ dependencies = [ "futures-timer", "kvdb", "kvdb-memorydb", - "lru", + "lru 0.8.1", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6732,8 +6660,8 @@ dependencies = [ "kvdb-shared-tests", "lazy_static", "log", - "lru", - "parity-db", + "lru 0.8.1", + "parity-db 0.4.2", "parity-scale-codec", "parity-util-mem", "parking_lot 0.11.2", @@ -6766,7 +6694,7 @@ dependencies = [ "femme", "futures", "futures-timer", - "lru", + "lru 0.8.1", "orchestra", "parity-util-mem", "parking_lot 0.12.1", @@ -7123,12 +7051,12 @@ dependencies = [ "kvdb", "kvdb-rocksdb", "log", - "lru", + "lru 0.8.1", "pallet-babe", "pallet-im-online", "pallet-staking", "pallet-transaction-payment-rpc-runtime-api", - "parity-db", + "parity-db 0.4.2", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", @@ -7289,7 +7217,7 @@ version = "0.9.31" dependencies = [ "assert_matches", "async-trait", - "clap 3.2.22", + "clap", "color-eyre", "futures", "futures-timer", @@ -7436,7 +7364,7 @@ dependencies = [ name = "polkadot-voter-bags" version = "0.9.31" dependencies = [ - "clap 3.2.22", + "clap", "generate-bags", "kusama-runtime", "polkadot-runtime", @@ -7450,7 +7378,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "log", "wepoll-ffi", @@ -7474,7 +7402,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "opaque-debug 0.3.0", "universal-hash", @@ -7487,7 +7415,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55f35f865aa964be21fcde114cbd1cfbd9bf8a471460ed965b0f84f96c711401" dependencies = [ "backtrace", - "cfg-if", + "cfg-if 1.0.0", "findshlibs", "lazy_static", "libc", @@ -7626,7 +7554,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f64969ffd5dd8f39bd57a68ac53c163a095ed9d0fb707146da1b27025a3504" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "fnv", "lazy_static", "memchr", @@ -7641,7 +7569,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" dependencies = [ "dtoa", - "itoa 1.0.3", + "itoa", "parking_lot 0.12.1", "prometheus-client-derive-text-encode", ] @@ -8019,7 +7947,7 @@ checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" name = "remote-ext-tests-bags-list" version = "0.9.31" dependencies = [ - "clap 3.2.22", + "clap", "frame-system", "kusama-runtime", "kusama-runtime-constants", @@ -8038,7 +7966,7 @@ dependencies = [ name = "remote-externalities" version = "0.10.0-dev" dependencies = [ - "env_logger", + "env_logger 0.9.0", "log", "parity-scale-codec", "serde", @@ -8108,12 +8036,12 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.3.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" dependencies = [ "crypto-bigint", - "hmac 0.12.1", + "hmac 0.11.0", "zeroize", ] @@ -8362,7 +8290,7 @@ dependencies = [ name = "ryu" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "3c9613b5a66ab9ba26415184cfc41156594925a9cf3a2057e57f31ff145f6568" [[package]] name = "same-file" @@ -8478,7 +8406,7 @@ version = "0.10.0-dev" dependencies = [ "array-bytes", "chrono", - "clap 4.0.18", + "clap", "fdlimit", "futures", "libp2p", @@ -8548,7 +8476,7 @@ dependencies = [ "kvdb-rocksdb", "linked-hash-map", "log", - "parity-db", + "parity-db 0.3.17", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", @@ -8594,11 +8522,12 @@ dependencies = [ "futures", "log", "merlin", - "num-bigint", - "num-rational", + "num-bigint 0.2.6", + "num-rational 0.2.4", "num-traits", "parity-scale-codec", "parking_lot 0.12.1", + "rand 0.7.3", "sc-client-api", "sc-consensus", "sc-consensus-epochs", @@ -8686,7 +8615,7 @@ name = "sc-executor" version = "0.10.0-dev" dependencies = [ "lazy_static", - "lru", + "lru 0.7.8", "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", @@ -8740,12 +8669,12 @@ dependencies = [ name = "sc-executor-wasmtime" version = "0.10.0-dev" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "log", "once_cell", "parity-scale-codec", - "parity-wasm", + "parity-wasm 0.45.0", "rustix", "sc-allocator", "sc-executor-common", @@ -8865,7 +8794,7 @@ dependencies = [ "linked-hash-map", "linked_hash_set", "log", - "lru", + "lru 0.7.8", "parity-scale-codec", "parking_lot 0.12.1", "pin-project", @@ -8944,7 +8873,7 @@ dependencies = [ "futures-timer", "libp2p", "log", - "lru", + "lru 0.7.8", "sc-network-common", "sc-peerset", "sp-runtime", @@ -9383,7 +9312,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c46be926081c9f4dd5dd9b6f1d3e3229f2360bc6502dd8836f84a93b7c75e99a" dependencies = [ "bitvec", - "cfg-if", + "cfg-if 1.0.0", "derive_more", "parity-scale-codec", "scale-info-derive", @@ -9436,12 +9365,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "scratch" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" - [[package]] name = "sct" version = "0.7.0" @@ -9454,11 +9377,10 @@ dependencies = [ [[package]] name = "sec1" -version = "0.3.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" dependencies = [ - "base16ct", "der", "generic-array 0.14.4", "pkcs8", @@ -9626,7 +9548,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", @@ -9638,7 +9560,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.10.3", ] @@ -9662,7 +9584,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" dependencies = [ "block-buffer 0.9.0", - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", @@ -9674,18 +9596,18 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.10.3", ] [[package]] name = "sha3" -version = "0.10.5" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2904bea16a1ae962b483322a1c7b81d976029203aea1f461e51cd7705db7ba9" +checksum = "31f935e31cf406e8c0e96c2815a5516181b7004ae8c5f296293221e9b1e356bd" dependencies = [ - "digest 0.10.5", + "digest 0.10.3", "keccak", ] @@ -9737,11 +9659,11 @@ dependencies = [ [[package]] name = "signature" -version = "1.6.4" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" dependencies = [ - "digest 0.10.3", + "digest 0.9.0", "rand_core 0.6.3", ] @@ -9938,7 +9860,7 @@ version = "4.0.0-dev" dependencies = [ "futures", "log", - "lru", + "lru 0.7.8", "parity-scale-codec", "parking_lot 0.12.1", "sp-api", @@ -10065,8 +9987,8 @@ version = "4.0.0" dependencies = [ "blake2", "byteorder", - "digest 0.10.5", - "sha2 0.10.6", + "digest 0.10.3", + "sha2 0.10.2", "sha3", "sp-std", "twox-hash", @@ -10211,7 +10133,6 @@ dependencies = [ "sp-debug-derive", "sp-runtime", "sp-std", - "thiserror", ] [[package]] @@ -10446,7 +10367,7 @@ dependencies = [ "hash-db", "hashbrown", "lazy_static", - "lru", + "lru 0.7.8", "memory-db", "nohash-hasher", "parity-scale-codec", @@ -10466,7 +10387,7 @@ version = "5.0.0" dependencies = [ "impl-serde", "parity-scale-codec", - "parity-wasm", + "parity-wasm 0.45.0", "scale-info", "serde", "sp-core-hashing-proc-macro", @@ -10521,9 +10442,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spki" -version = "0.6.0" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" dependencies = [ "base64ct", "der", @@ -10555,7 +10476,7 @@ name = "staking-miner" version = "0.9.31" dependencies = [ "assert_cmd", - "clap 3.2.22", + "clap", "exitcode", "frame-election-provider-support", "frame-support", @@ -10840,7 +10761,7 @@ dependencies = [ "tempfile", "toml", "walkdir", - "wasm-opt", + "wasm-gc-api", ] [[package]] @@ -10943,7 +10864,7 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "fastrand", "libc", "redox_syscall", @@ -10983,7 +10904,7 @@ dependencies = [ name = "test-parachain-adder-collator" version = "0.9.31" dependencies = [ - "clap 3.2.22", + "clap", "futures", "futures-timer", "log", @@ -11030,7 +10951,7 @@ dependencies = [ name = "test-parachain-undying-collator" version = "0.9.31" dependencies = [ - "clap 3.2.22", + "clap", "futures", "futures-timer", "log", @@ -11341,7 +11262,7 @@ version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "pin-project-lite 0.2.7", "tracing-attributes", "tracing-core", @@ -11491,7 +11412,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" dependencies = [ "async-trait", - "cfg-if", + "cfg-if 1.0.0", "data-encoding", "enum-as-inner", "futures-channel", @@ -11514,7 +11435,7 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "futures-util", "ipconfig", "lazy_static", @@ -11537,7 +11458,8 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" name = "try-runtime-cli" version = "0.10.0-dev" dependencies = [ - "clap 4.0.18", + "clap", + "frame-try-runtime", "log", "parity-scale-codec", "remote-externalities", @@ -11605,7 +11527,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "digest 0.10.3", "rand 0.8.5", "static_assertions", @@ -11827,7 +11749,7 @@ version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "serde", "serde_json", "wasm-bindgen-macro", @@ -11854,7 +11776,7 @@ version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "wasm-bindgen", "web-sys", @@ -11890,53 +11812,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] -name = "wasm-instrument" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa1dafb3e60065305741e83db35c6c2584bb3725b692b5b66148a38d72ace6cd" -dependencies = [ - "parity-wasm", -] - -[[package]] -name = "wasm-opt" -version = "0.110.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68e8037b4daf711393f4be2056246d12d975651b14d581520ad5d1f19219cec" -dependencies = [ - "anyhow", - "libc", - "strum", - "strum_macros", - "tempfile", - "thiserror", - "wasm-opt-cxx-sys", - "wasm-opt-sys", -] - -[[package]] -name = "wasm-opt-cxx-sys" -version = "0.110.2" +name = "wasm-gc-api" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91adbad477e97bba3fbd21dd7bfb594e7ad5ceb9169ab1c93ab9cb0ada636b6f" +checksum = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9" dependencies = [ - "anyhow", - "cxx", - "cxx-build", - "wasm-opt-sys", + "log", + "parity-wasm 0.32.0", + "rustc-demangle", ] [[package]] -name = "wasm-opt-sys" -version = "0.110.2" +name = "wasm-instrument" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4fa5a322a4e6ac22fd141f498d56afbdbf9df5debeac32380d2dcaa3e06941" +checksum = "aa1dafb3e60065305741e83db35c6c2584bb3725b692b5b66148a38d72ace6cd" dependencies = [ - "anyhow", - "cc", - "cxx", - "cxx-build", - "regex", + "parity-wasm 0.45.0", ] [[package]] @@ -11960,7 +11852,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc13b3c219ca9aafeec59150d80d89851df02e0061bc357b4d66fc55a8d38787" dependencies = [ - "parity-wasm", + "parity-wasm 0.45.0", "wasmi-validation", "wasmi_core", ] @@ -11971,7 +11863,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" dependencies = [ - "parity-wasm", + "parity-wasm 0.45.0", ] [[package]] @@ -11983,7 +11875,7 @@ dependencies = [ "downcast-rs", "libm", "memory_units", - "num-rational", + "num-rational 0.4.1", "num-traits", ] @@ -12004,7 +11896,7 @@ checksum = "8a10dc9784d8c3a33c970e3939180424955f08af2e7f20368ec02685a0e8f065" dependencies = [ "anyhow", "bincode", - "cfg-if", + "cfg-if 1.0.0", "indexmap", "libc", "log", @@ -12030,7 +11922,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee4dbdc6daf68528cad1275ac91e3f51848ce9824385facc94c759f529decdf8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -12102,7 +11994,7 @@ dependencies = [ "addr2line", "anyhow", "bincode", - "cfg-if", + "cfg-if 1.0.0", "cpp_demangle", "gimli", "log", @@ -12137,7 +12029,7 @@ checksum = "ae79e0515160bd5abee5df50a16c4eb8db9f71b530fc988ae1d9ce34dcb8dd01" dependencies = [ "anyhow", "cc", - "cfg-if", + "cfg-if 1.0.0", "indexmap", "libc", "log", @@ -12887,15 +12779,15 @@ name = "pallet-scored-pool" version = "4.0.0-dev" [[patch.unused]] -name = "pallet-state-trie-migration" +name = "pallet-template" version = "4.0.0-dev" [[patch.unused]] -name = "pallet-template" +name = "pallet-transaction-storage" version = "4.0.0-dev" [[patch.unused]] -name = "pallet-transaction-storage" +name = "pallet-uniques" version = "4.0.0-dev" [[patch.unused]] diff --git a/Cargo.toml b/Cargo.toml index d6ff78d801e2..848108e6798d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -197,6 +197,250 @@ try-runtime = [ "polkadot-cli/try-runtime" ] fast-runtime = [ "polkadot-cli/fast-runtime" ] runtime-metrics = [ "polkadot-cli/runtime-metrics" ] pyroscope = ["polkadot-cli/pyroscope"] +[patch."https://github.com/paritytech/substrate"] +node-template ={path = "/Users/gav/Core/substrate/bin/node-template/node" } +frame-benchmarking ={path = "/Users/gav/Core/substrate/frame/benchmarking" } +frame-support ={path = "/Users/gav/Core/substrate/frame/support" } +frame-support-procedural ={path = "/Users/gav/Core/substrate/frame/support/procedural" } +frame-support-procedural-tools ={path = "/Users/gav/Core/substrate/frame/support/procedural/tools" } +frame-support-procedural-tools-derive ={path = "/Users/gav/Core/substrate/frame/support/procedural/tools/derive" } +sp-api ={path = "/Users/gav/Core/substrate/primitives/api" } +sp-api-proc-macro ={path = "/Users/gav/Core/substrate/primitives/api/proc-macro" } +sp-core ={path = "/Users/gav/Core/substrate/primitives/core" } +sp-core-hashing ={path = "/Users/gav/Core/substrate/primitives/core/hashing" } +sp-std ={path = "/Users/gav/Core/substrate/primitives/std" } +sp-debug-derive ={path = "/Users/gav/Core/substrate/primitives/debug-derive" } +sp-externalities ={path = "/Users/gav/Core/substrate/primitives/externalities" } +sp-storage ={path = "/Users/gav/Core/substrate/primitives/storage" } +sp-runtime-interface ={path = "/Users/gav/Core/substrate/primitives/runtime-interface" } +sp-runtime-interface-proc-macro ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/proc-macro" } +sp-tracing ={path = "/Users/gav/Core/substrate/primitives/tracing" } +sp-wasm-interface ={path = "/Users/gav/Core/substrate/primitives/wasm-interface" } +sp-io ={path = "/Users/gav/Core/substrate/primitives/io" } +sp-keystore ={path = "/Users/gav/Core/substrate/primitives/keystore" } +sp-state-machine ={path = "/Users/gav/Core/substrate/primitives/state-machine" } +sp-panic-handler ={path = "/Users/gav/Core/substrate/primitives/panic-handler" } +sp-trie ={path = "/Users/gav/Core/substrate/primitives/trie" } +sp-runtime ={path = "/Users/gav/Core/substrate/primitives/runtime" } +sp-application-crypto ={path = "/Users/gav/Core/substrate/primitives/application-crypto" } +sp-arithmetic ={path = "/Users/gav/Core/substrate/primitives/arithmetic" } +sp-weights ={path = "/Users/gav/Core/substrate/primitives/weights" } +substrate-test-runtime-client ={path = "/Users/gav/Core/substrate/test-utils/runtime/client" } +sc-block-builder ={path = "/Users/gav/Core/substrate/client/block-builder" } +sc-client-api ={path = "/Users/gav/Core/substrate/client/api" } +substrate-prometheus-endpoint ={path = "/Users/gav/Core/substrate/utils/prometheus" } +sc-executor ={path = "/Users/gav/Core/substrate/client/executor" } +sc-executor-common ={path = "/Users/gav/Core/substrate/client/executor/common" } +sc-allocator ={path = "/Users/gav/Core/substrate/client/allocator" } +sp-maybe-compressed-blob ={path = "/Users/gav/Core/substrate/primitives/maybe-compressed-blob" } +sp-sandbox ={path = "/Users/gav/Core/substrate/primitives/sandbox" } +sc-executor-wasmi ={path = "/Users/gav/Core/substrate/client/executor/wasmi" } +sc-executor-wasmtime ={path = "/Users/gav/Core/substrate/client/executor/wasmtime" } +sc-runtime-test ={path = "/Users/gav/Core/substrate/client/executor/runtime-test" } +sp-tasks ={path = "/Users/gav/Core/substrate/primitives/tasks" } +substrate-wasm-builder ={path = "/Users/gav/Core/substrate/utils/wasm-builder" } +sp-core-hashing-proc-macro ={path = "/Users/gav/Core/substrate/primitives/core/hashing/proc-macro" } +sp-version ={path = "/Users/gav/Core/substrate/primitives/version" } +sp-version-proc-macro ={path = "/Users/gav/Core/substrate/primitives/version/proc-macro" } +sc-tracing ={path = "/Users/gav/Core/substrate/client/tracing" } +sc-rpc-server ={path = "/Users/gav/Core/substrate/client/rpc-servers" } +sc-tracing-proc-macro ={path = "/Users/gav/Core/substrate/client/tracing/proc-macro" } +sp-blockchain ={path = "/Users/gav/Core/substrate/primitives/blockchain" } +sp-consensus ={path = "/Users/gav/Core/substrate/primitives/consensus/common" } +sp-inherents ={path = "/Users/gav/Core/substrate/primitives/inherents" } +sp-test-primitives ={path = "/Users/gav/Core/substrate/primitives/test-primitives" } +sp-database ={path = "/Users/gav/Core/substrate/primitives/database" } +sp-rpc ={path = "/Users/gav/Core/substrate/primitives/rpc" } +substrate-test-runtime ={path = "/Users/gav/Core/substrate/test-utils/runtime" } +beefy-merkle-tree ={path = "/Users/gav/Core/substrate/frame/beefy-mmr/primitives" } +beefy-primitives ={path = "/Users/gav/Core/substrate/primitives/beefy" } +sp-mmr-primitives ={path = "/Users/gav/Core/substrate/primitives/merkle-mountain-range" } +frame-system ={path = "/Users/gav/Core/substrate/frame/system" } +frame-system-rpc-runtime-api ={path = "/Users/gav/Core/substrate/frame/system/rpc/runtime-api" } +pallet-babe ={path = "/Users/gav/Core/substrate/frame/babe" } +pallet-authorship ={path = "/Users/gav/Core/substrate/frame/authorship" } +sp-authorship ={path = "/Users/gav/Core/substrate/primitives/authorship" } +pallet-session ={path = "/Users/gav/Core/substrate/frame/session" } +pallet-timestamp ={path = "/Users/gav/Core/substrate/frame/timestamp" } +sp-timestamp ={path = "/Users/gav/Core/substrate/primitives/timestamp" } +sp-session ={path = "/Users/gav/Core/substrate/primitives/session" } +sp-staking ={path = "/Users/gav/Core/substrate/primitives/staking" } +sp-consensus-babe ={path = "/Users/gav/Core/substrate/primitives/consensus/babe" } +sp-consensus-slots ={path = "/Users/gav/Core/substrate/primitives/consensus/slots" } +sp-consensus-vrf ={path = "/Users/gav/Core/substrate/primitives/consensus/vrf" } +frame-election-provider-support ={path = "/Users/gav/Core/substrate/frame/election-provider-support" } +frame-election-provider-solution-type ={path = "/Users/gav/Core/substrate/frame/election-provider-support/solution-type" } +sp-npos-elections ={path = "/Users/gav/Core/substrate/primitives/npos-elections" } +substrate-test-utils ={path = "/Users/gav/Core/substrate/test-utils" } +substrate-test-utils-derive ={path = "/Users/gav/Core/substrate/test-utils/derive" } +sc-service ={path = "/Users/gav/Core/substrate/client/service" } +sc-chain-spec ={path = "/Users/gav/Core/substrate/client/chain-spec" } +sc-chain-spec-derive ={path = "/Users/gav/Core/substrate/client/chain-spec/derive" } +sc-network-common ={path = "/Users/gav/Core/substrate/client/network/common" } +sc-consensus ={path = "/Users/gav/Core/substrate/client/consensus/common" } +sc-utils ={path = "/Users/gav/Core/substrate/client/utils" } +sc-peerset ={path = "/Users/gav/Core/substrate/client/peerset" } +sp-finality-grandpa ={path = "/Users/gav/Core/substrate/primitives/finality-grandpa" } +sc-telemetry ={path = "/Users/gav/Core/substrate/client/telemetry" } +sc-client-db ={path = "/Users/gav/Core/substrate/client/db" } +sc-state-db ={path = "/Users/gav/Core/substrate/client/state-db" } +kitchensink-runtime ={path = "/Users/gav/Core/substrate/bin/node/runtime" } +frame-executive ={path = "/Users/gav/Core/substrate/frame/executive" } +frame-try-runtime ={path = "/Users/gav/Core/substrate/frame/try-runtime" } +pallet-balances ={path = "/Users/gav/Core/substrate/frame/balances" } +pallet-transaction-payment ={path = "/Users/gav/Core/substrate/frame/transaction-payment" } +frame-system-benchmarking ={path = "/Users/gav/Core/substrate/frame/system/benchmarking" } +node-primitives ={path = "/Users/gav/Core/substrate/bin/node/primitives" } +pallet-alliance ={path = "/Users/gav/Core/substrate/frame/alliance" } +pallet-collective ={path = "/Users/gav/Core/substrate/frame/collective" } +pallet-identity ={path = "/Users/gav/Core/substrate/frame/identity" } +pallet-asset-tx-payment ={path = "/Users/gav/Core/substrate/frame/transaction-payment/asset-tx-payment" } +pallet-assets ={path = "/Users/gav/Core/substrate/frame/assets" } +pallet-authority-discovery ={path = "/Users/gav/Core/substrate/frame/authority-discovery" } +sp-authority-discovery ={path = "/Users/gav/Core/substrate/primitives/authority-discovery" } +pallet-bags-list ={path = "/Users/gav/Core/substrate/frame/bags-list" } +pallet-bounties ={path = "/Users/gav/Core/substrate/frame/bounties" } +pallet-treasury ={path = "/Users/gav/Core/substrate/frame/treasury" } +pallet-child-bounties ={path = "/Users/gav/Core/substrate/frame/child-bounties" } +pallet-contracts ={path = "/Users/gav/Core/substrate/frame/contracts" } +pallet-contracts-primitives ={path = "/Users/gav/Core/substrate/frame/contracts/primitives" } +pallet-contracts-proc-macro ={path = "/Users/gav/Core/substrate/frame/contracts/proc-macro" } +pallet-randomness-collective-flip ={path = "/Users/gav/Core/substrate/frame/randomness-collective-flip" } +pallet-utility ={path = "/Users/gav/Core/substrate/frame/utility" } +pallet-conviction-voting ={path = "/Users/gav/Core/substrate/frame/conviction-voting" } +pallet-scheduler ={path = "/Users/gav/Core/substrate/frame/scheduler" } +pallet-preimage ={path = "/Users/gav/Core/substrate/frame/preimage" } +pallet-democracy ={path = "/Users/gav/Core/substrate/frame/democracy" } +pallet-election-provider-multi-phase ={path = "/Users/gav/Core/substrate/frame/election-provider-multi-phase" } +pallet-election-provider-support-benchmarking ={path = "/Users/gav/Core/substrate/frame/election-provider-support/benchmarking" } +pallet-elections-phragmen ={path = "/Users/gav/Core/substrate/frame/elections-phragmen" } +pallet-fast-unstake ={path = "/Users/gav/Core/substrate/frame/fast-unstake" } +pallet-staking ={path = "/Users/gav/Core/substrate/frame/staking" } +pallet-staking-reward-curve ={path = "/Users/gav/Core/substrate/frame/staking/reward-curve" } +pallet-gilt ={path = "/Users/gav/Core/substrate/frame/gilt" } +pallet-grandpa ={path = "/Users/gav/Core/substrate/frame/grandpa" } +pallet-offences ={path = "/Users/gav/Core/substrate/frame/offences" } +sp-keyring ={path = "/Users/gav/Core/substrate/primitives/keyring" } +pallet-im-online ={path = "/Users/gav/Core/substrate/frame/im-online" } +pallet-indices ={path = "/Users/gav/Core/substrate/frame/indices" } +pallet-lottery ={path = "/Users/gav/Core/substrate/frame/lottery" } +frame-support-test ={path = "/Users/gav/Core/substrate/frame/support/test" } +frame-support-test-pallet ={path = "/Users/gav/Core/substrate/frame/support/test/pallet" } +pallet-membership ={path = "/Users/gav/Core/substrate/frame/membership" } +pallet-message-queue ={path = "/Users/gav/Core/substrate/frame/message-queue" } +pallet-mmr ={path = "/Users/gav/Core/substrate/frame/merkle-mountain-range" } +pallet-multisig ={path = "/Users/gav/Core/substrate/frame/multisig" } +pallet-nomination-pools ={path = "/Users/gav/Core/substrate/frame/nomination-pools" } +pallet-nomination-pools-benchmarking ={path = "/Users/gav/Core/substrate/frame/nomination-pools/benchmarking" } +pallet-nomination-pools-runtime-api ={path = "/Users/gav/Core/substrate/frame/nomination-pools/runtime-api" } +pallet-offences-benchmarking ={path = "/Users/gav/Core/substrate/frame/offences/benchmarking" } +pallet-proxy ={path = "/Users/gav/Core/substrate/frame/proxy" } +pallet-ranked-collective ={path = "/Users/gav/Core/substrate/frame/ranked-collective" } +pallet-recovery ={path = "/Users/gav/Core/substrate/frame/recovery" } +pallet-referenda ={path = "/Users/gav/Core/substrate/frame/referenda" } +pallet-remark ={path = "/Users/gav/Core/substrate/frame/remark" } +pallet-session-benchmarking ={path = "/Users/gav/Core/substrate/frame/session/benchmarking" } +pallet-society ={path = "/Users/gav/Core/substrate/frame/society" } +pallet-state-trie-migration ={path = "/Users/gav/Core/substrate/frame/state-trie-migration" } +remote-externalities ={path = "/Users/gav/Core/substrate/utils/frame/remote-externalities" } +substrate-rpc-client ={path = "/Users/gav/Core/substrate/utils/frame/rpc/client" } +sc-rpc-api ={path = "/Users/gav/Core/substrate/client/rpc-api" } +sc-transaction-pool-api ={path = "/Users/gav/Core/substrate/client/transaction-pool/api" } +substrate-state-trie-migration-rpc ={path = "/Users/gav/Core/substrate/utils/frame/rpc/state-trie-migration-rpc" } +pallet-sudo ={path = "/Users/gav/Core/substrate/frame/sudo" } +pallet-tips ={path = "/Users/gav/Core/substrate/frame/tips" } +pallet-transaction-payment-rpc-runtime-api ={path = "/Users/gav/Core/substrate/frame/transaction-payment/rpc/runtime-api" } +pallet-transaction-storage ={path = "/Users/gav/Core/substrate/frame/transaction-storage" } +sp-transaction-storage-proof ={path = "/Users/gav/Core/substrate/primitives/transaction-storage-proof" } +pallet-uniques ={path = "/Users/gav/Core/substrate/frame/uniques" } +pallet-vesting ={path = "/Users/gav/Core/substrate/frame/vesting" } +pallet-whitelist ={path = "/Users/gav/Core/substrate/frame/whitelist" } +sp-block-builder ={path = "/Users/gav/Core/substrate/primitives/block-builder" } +sp-offchain ={path = "/Users/gav/Core/substrate/primitives/offchain" } +sp-transaction-pool ={path = "/Users/gav/Core/substrate/primitives/transaction-pool" } +sc-informant ={path = "/Users/gav/Core/substrate/client/informant" } +sc-keystore ={path = "/Users/gav/Core/substrate/client/keystore" } +sc-network ={path = "/Users/gav/Core/substrate/client/network" } +fork-tree ={path = "/Users/gav/Core/substrate/utils/fork-tree" } +sc-network-light ={path = "/Users/gav/Core/substrate/client/network/light" } +sc-network-sync ={path = "/Users/gav/Core/substrate/client/network/sync" } +sc-network-bitswap ={path = "/Users/gav/Core/substrate/client/network/bitswap" } +sc-network-transactions ={path = "/Users/gav/Core/substrate/client/network/transactions" } +sc-offchain ={path = "/Users/gav/Core/substrate/client/offchain" } +sc-transaction-pool ={path = "/Users/gav/Core/substrate/client/transaction-pool" } +substrate-test-runtime-transaction-pool ={path = "/Users/gav/Core/substrate/test-utils/runtime/transaction-pool" } +sc-rpc ={path = "/Users/gav/Core/substrate/client/rpc" } +sc-rpc-spec-v2 ={path = "/Users/gav/Core/substrate/client/rpc-spec-v2" } +sc-sysinfo ={path = "/Users/gav/Core/substrate/client/sysinfo" } +sp-consensus-aura ={path = "/Users/gav/Core/substrate/primitives/consensus/aura" } +substrate-test-client ={path = "/Users/gav/Core/substrate/test-utils/client" } +sp-runtime-interface-test-wasm ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/test-wasm" } +sp-serializer ={path = "/Users/gav/Core/substrate/primitives/serializer" } +frame-benchmarking-cli ={path = "/Users/gav/Core/substrate/utils/frame/benchmarking-cli" } +sc-cli ={path = "/Users/gav/Core/substrate/client/cli" } +node-template-runtime ={path = "/Users/gav/Core/substrate/bin/node-template/runtime" } +pallet-aura ={path = "/Users/gav/Core/substrate/frame/aura" } +pallet-template ={path = "/Users/gav/Core/substrate/bin/node-template/pallets/template" } +pallet-transaction-payment-rpc ={path = "/Users/gav/Core/substrate/frame/transaction-payment/rpc" } +sc-basic-authorship ={path = "/Users/gav/Core/substrate/client/basic-authorship" } +sc-proposer-metrics ={path = "/Users/gav/Core/substrate/client/proposer-metrics" } +sc-consensus-aura ={path = "/Users/gav/Core/substrate/client/consensus/aura" } +sc-consensus-slots ={path = "/Users/gav/Core/substrate/client/consensus/slots" } +sc-network-test ={path = "/Users/gav/Core/substrate/client/network/test" } +sc-finality-grandpa ={path = "/Users/gav/Core/substrate/client/finality-grandpa" } +sc-network-gossip ={path = "/Users/gav/Core/substrate/client/network-gossip" } +substrate-frame-rpc-system ={path = "/Users/gav/Core/substrate/utils/frame/rpc/system" } +try-runtime-cli ={path = "/Users/gav/Core/substrate/utils/frame/try-runtime/cli" } +substrate-build-script-utils ={path = "/Users/gav/Core/substrate/utils/build-script-utils" } +node-bench ={path = "/Users/gav/Core/substrate/bin/node/bench" } +node-testing ={path = "/Users/gav/Core/substrate/bin/node/testing" } +node-executor ={path = "/Users/gav/Core/substrate/bin/node/executor" } +node-cli ={path = "/Users/gav/Core/substrate/bin/node/cli" } +node-inspect ={path = "/Users/gav/Core/substrate/bin/node/inspect" } +node-rpc ={path = "/Users/gav/Core/substrate/bin/node/rpc" } +pallet-mmr-rpc ={path = "/Users/gav/Core/substrate/frame/merkle-mountain-range/rpc" } +sc-consensus-babe ={path = "/Users/gav/Core/substrate/client/consensus/babe" } +sc-consensus-epochs ={path = "/Users/gav/Core/substrate/client/consensus/epochs" } +sc-consensus-babe-rpc ={path = "/Users/gav/Core/substrate/client/consensus/babe/rpc" } +sc-finality-grandpa-rpc ={path = "/Users/gav/Core/substrate/client/finality-grandpa/rpc" } +sc-sync-state-rpc ={path = "/Users/gav/Core/substrate/client/sync-state-rpc" } +sc-authority-discovery ={path = "/Users/gav/Core/substrate/client/authority-discovery" } +sc-consensus-uncles ={path = "/Users/gav/Core/substrate/client/consensus/uncles" } +sc-service-test ={path = "/Users/gav/Core/substrate/client/service/test" } +substrate-frame-cli ={path = "/Users/gav/Core/substrate/utils/frame/frame-utilities-cli" } +chain-spec-builder ={path = "/Users/gav/Core/substrate/bin/utils/chain-spec-builder" } +subkey ={path = "/Users/gav/Core/substrate/bin/utils/subkey" } +beefy-gadget ={path = "/Users/gav/Core/substrate/client/beefy" } +beefy-gadget-rpc ={path = "/Users/gav/Core/substrate/client/beefy/rpc" } +sc-consensus-manual-seal ={path = "/Users/gav/Core/substrate/client/consensus/manual-seal" } +sc-consensus-pow ={path = "/Users/gav/Core/substrate/client/consensus/pow" } +sp-consensus-pow ={path = "/Users/gav/Core/substrate/primitives/consensus/pow" } +pallet-atomic-swap ={path = "/Users/gav/Core/substrate/frame/atomic-swap" } +pallet-bags-list-fuzzer ={path = "/Users/gav/Core/substrate/frame/bags-list/fuzzer" } +pallet-bags-list-remote-tests ={path = "/Users/gav/Core/substrate/frame/bags-list/remote-tests" } +pallet-beefy ={path = "/Users/gav/Core/substrate/frame/beefy" } +pallet-beefy-mmr ={path = "/Users/gav/Core/substrate/frame/beefy-mmr" } +frame-election-solution-type-fuzzer ={path = "/Users/gav/Core/substrate/frame/election-provider-support/solution-type/fuzzer" } +pallet-example-basic ={path = "/Users/gav/Core/substrate/frame/examples/basic" } +pallet-example-offchain-worker ={path = "/Users/gav/Core/substrate/frame/examples/offchain-worker" } +pallet-example-parallel ={path = "/Users/gav/Core/substrate/frame/examples/parallel" } +pallet-nicks ={path = "/Users/gav/Core/substrate/frame/nicks" } +pallet-node-authorization ={path = "/Users/gav/Core/substrate/frame/node-authorization" } +pallet-nomination-pools-test-staking ={path = "/Users/gav/Core/substrate/frame/nomination-pools/test-staking" } +pallet-scored-pool ={path = "/Users/gav/Core/substrate/frame/scored-pool" } +pallet-staking-reward-fn ={path = "/Users/gav/Core/substrate/frame/staking/reward-fn" } +pallet-root-offences ={path = "/Users/gav/Core/substrate/frame/root-offences" } +frame-support-test-compile-pass ={path = "/Users/gav/Core/substrate/frame/support/test/compile_pass" } +sp-api-test ={path = "/Users/gav/Core/substrate/primitives/api/test" } +sp-application-crypto-test ={path = "/Users/gav/Core/substrate/primitives/application-crypto/test" } +sp-arithmetic-fuzzer ={path = "/Users/gav/Core/substrate/primitives/arithmetic/fuzzer" } +sp-npos-elections-fuzzer ={path = "/Users/gav/Core/substrate/primitives/npos-elections/fuzzer" } +sp-runtime-interface-test ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/test" } +sp-runtime-interface-test-wasm-deprecated ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/test-wasm-deprecated" } +substrate-test-utils-test-crate ={path = "/Users/gav/Core/substrate/test-utils/test-crate" } +substrate-frame-rpc-support ={path = "/Users/gav/Core/substrate/utils/frame/rpc/support" } +generate-bags ={path = "/Users/gav/Core/substrate/utils/frame/generate-bags" } +node-runtime-generate-bags ={path = "/Users/gav/Core/substrate/utils/frame/generate-bags/node-runtime" } # Configuration for building a .deb package - for use with `cargo-deb` [package.metadata.deb] diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 88737a8e105b..de4ab780452b 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -924,6 +924,7 @@ impl Pallet { // amount used. This is way more useful for the parachain. // TODO: Consider doing this at the end of the block, after any messages might have been // executed, to report more accurate numbers to the para. + #[allow(deprecated)] let key = well_known_keys::relay_dispatch_queue_size(para); (count, size).using_encoded(|d| sp_io::storage::set(&key, d)); diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index c7aec0f0d006..55dc8e0c6d3c 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -74,7 +74,7 @@ fn default_genesis_config() -> MockGenesisConfig { fn queue_upward_msg(para: ParaId, msg: UpwardMessage) { let msgs = vec![msg]; assert!(ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs).is_ok()); - let _ = ParaInclusion::receive_upward_messages(para, msgs); + let _ = ParaInclusion::receive_upward_messages(&Configuration::config(), para, msgs); } #[test] @@ -192,6 +192,7 @@ fn verify_relay_dispatch_queue_size_is_externally_accessible() { new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { queue_upward_msg(a, msg); + #[allow(deprecated)] let raw_queue_size = sp_io::storage::get(&well_known_keys::relay_dispatch_queue_size(a)) .expect( "enqueing a message should create the dispatch queue\ From 34b8a40aa2cfa941a4ac868b221b55e1584e9424 Mon Sep 17 00:00:00 2001 From: Gav Date: Fri, 11 Nov 2022 17:18:26 +0100 Subject: [PATCH 006/182] Remove original UMP files --- runtime/parachains/src/ump/benchmarking.rs | 140 ---------------- runtime/parachains/src/ump/tests.rs | 185 --------------------- 2 files changed, 325 deletions(-) delete mode 100644 runtime/parachains/src/ump/benchmarking.rs delete mode 100644 runtime/parachains/src/ump/tests.rs diff --git a/runtime/parachains/src/ump/benchmarking.rs b/runtime/parachains/src/ump/benchmarking.rs deleted file mode 100644 index 759e75d6c4b3..000000000000 --- a/runtime/parachains/src/ump/benchmarking.rs +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . -/* -use super::{Pallet as Ump, *}; -use frame_system::RawOrigin; -use xcm::prelude::*; - -fn assert_last_event_type(generic_event: ::RuntimeEvent) { - let events = frame_system::Pallet::::events(); - let system_event: ::RuntimeEvent = generic_event.into(); - // compare to the last event record - let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; - assert_eq!(sp_std::mem::discriminant(event), sp_std::mem::discriminant(&system_event)); -} - -fn queue_upward_msg( - host_conf: &HostConfiguration, - para: ParaId, - msg: UpwardMessage, -) { - let len = msg.len() as u32; - let msgs = vec![msg]; - Ump::::check_upward_messages(host_conf, para, &msgs).unwrap(); - let _ = Ump::::receive_upward_messages(para, msgs); - assert_last_event_type::(Event::UpwardMessagesReceived(para, 1, len).into()); -} - -// Create a message with at least `size` bytes encoded length -fn create_message_min_size(size: u32) -> Vec { - // Create a message with an empty remark call to determine the encoding overhead - let msg_size_empty_transact = VersionedXcm::::from(Xcm::(vec![Transact { - origin_type: OriginKind::SovereignAccount, - require_weight_at_most: Weight::MAX.ref_time(), - call: frame_system::Call::::remark_with_event { remark: vec![] }.encode().into(), - }])) - .encode() - .len(); - - // Create a message with a remark call of just the size required to make the whole encoded message the requested size - let size = size.saturating_sub(msg_size_empty_transact as u32) as usize; - let mut remark = Vec::new(); - remark.resize(size, 0u8); - let msg = VersionedXcm::::from(Xcm::(vec![Transact { - origin_type: OriginKind::SovereignAccount, - require_weight_at_most: Weight::MAX.ref_time(), - call: frame_system::Call::::remark_with_event { remark }.encode().into(), - }])) - .encode(); - - assert!(msg.len() >= size); - msg -} - -fn create_message_overweight() -> Vec { - let max_block_weight = T::BlockWeights::get().max_block; - // We use a `set_code` Call because it - let call = frame_system::Call::::set_code { code: vec![] }; - VersionedXcm::::from(Xcm::(vec![Transact { - origin_type: OriginKind::Superuser, - require_weight_at_most: max_block_weight.ref_time(), - call: call.encode().into(), - }])) - .encode() -} - -frame_benchmarking::benchmarks! { - // NOTE: We are overestimating slightly here. - // The benchmark is timing this whole function with different message sizes and a NOOP extrinsic to - // measure the size-dependent weight. But as we use the weight function **in** the benchmarked function we - // are taking call and control-flow overhead into account twice. - process_upward_message { - let s in 0..MAX_UPWARD_MESSAGE_SIZE_BOUND; - let para = ParaId::from(1978); - let data = create_message_min_size::(s); - }: { - assert!(T::UmpSink::process_upward_message(para, &data[..], Weight::MAX).is_ok()); - } - - clean_ump_after_outgoing { - // max number of queued messages. - let count = configuration::ActiveConfig::::get().max_upward_queue_count; - let host_conf = configuration::ActiveConfig::::get(); - let msg = create_message_min_size::(0); - // Start with the block number 1. This is needed because should an event be - // emitted during the genesis block they will be implicitly wiped. - frame_system::Pallet::::set_block_number(1u32.into()); - // fill the queue, each message has it's own para-id. - for id in 0..count { - queue_upward_msg::(&host_conf, ParaId::from(id), msg.clone()); - } - }: { - Ump::::clean_ump_after_outgoing(&ParaId::from(0)); - } - - service_overweight { - let host_conf = configuration::ActiveConfig::::get(); - let weight = Weight::from_ref_time(1000000); - let para = ParaId::from(1978); - // The message's weight does not really matter here, as we add service_overweight's - // max_weight parameter to the extrinsic's weight in the weight calculation. - // The size of the message influences decoding time, so we create a min-sized message here - // and take the decoding weight into account by adding it to the extrinsic execution weight - // in the process_upward_message function. - let msg = create_message_overweight::(); - - // This just makes sure that 0 is not a valid index and we can use it later on. - let _ = Ump::::service_overweight(RawOrigin::Root.into(), 0, Weight::from_ref_time(1000).set_proof_size(u64::MAX)); - // Start with the block number 1. This is needed because should an event be - // emitted during the genesis block they will be implicitly wiped. - frame_system::Pallet::::set_block_number(1u32.into()); - queue_upward_msg::(&host_conf, para, msg.clone()); - Ump::::process_pending_upward_messages(); - assert_last_event_type::( - Event::OverweightEnqueued(para, upward_message_id(&msg), 0, Weight::zero()).into() - ); - }: _(RawOrigin::Root, 0, Weight::MAX) - verify { - assert_last_event_type::(Event::OverweightServiced(0, Weight::zero()).into()); - } -} - -frame_benchmarking::impl_benchmark_test_suite!( - Ump, - crate::mock::new_test_ext(crate::ump::tests::GenesisConfigBuilder::default().build()), - crate::mock::Test -); -*/ \ No newline at end of file diff --git a/runtime/parachains/src/ump/tests.rs b/runtime/parachains/src/ump/tests.rs deleted file mode 100644 index 9a41a4d29ea9..000000000000 --- a/runtime/parachains/src/ump/tests.rs +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright 2020 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 super::*; -use crate::mock::{ - assert_last_event, new_test_ext, take_processed, Configuration, MockGenesisConfig, - RuntimeOrigin, System, Test, Ump, -}; -use frame_support::{assert_noop, assert_ok, weights::Weight}; -use std::collections::HashSet; - -pub(super) struct GenesisConfigBuilder { - max_upward_message_size: u32, - max_upward_message_num_per_candidate: u32, - max_upward_queue_count: u32, - max_upward_queue_size: u32, -} - -impl Default for GenesisConfigBuilder { - fn default() -> Self { - Self { - max_upward_message_size: 16, - max_upward_message_num_per_candidate: 2, - max_upward_queue_count: 4, - max_upward_queue_size: 64, - } - } -} - -impl GenesisConfigBuilder { - pub(super) fn build(self) -> crate::mock::MockGenesisConfig { - let mut genesis = default_genesis_config(); - let config = &mut genesis.configuration.config; - - config.max_upward_message_size = self.max_upward_message_size; - config.max_upward_message_num_per_candidate = self.max_upward_message_num_per_candidate; - config.max_upward_queue_count = self.max_upward_queue_count; - config.max_upward_queue_size = self.max_upward_queue_size; - genesis - } -} - -fn default_genesis_config() -> MockGenesisConfig { - MockGenesisConfig { - configuration: crate::configuration::GenesisConfig { - config: crate::configuration::HostConfiguration { - max_downward_message_size: 1024, - ..Default::default() - }, - }, - ..Default::default() - } -} - -fn queue_upward_msg(para: ParaId, msg: UpwardMessage) { - let msgs = vec![msg]; - assert!(Ump::check_upward_messages(&Configuration::config(), para, &msgs).is_ok()); - let _ = Ump::receive_upward_messages(para, msgs); -} -/* -fn assert_storage_consistency_exhaustive() { - // check that empty queues don't clutter the storage. - for (_para, queue) in ::RelayDispatchQueues::iter() { - assert!(!queue.is_empty()); - } - - // actually count the counts and sizes in queues and compare them to the bookkept version. - for (para, queue) in ::RelayDispatchQueues::iter() { - let (expected_count, expected_size) = ::RelayDispatchQueueSize::get(para); - let (actual_count, actual_size) = queue - .into_iter() - .fold((0, 0), |(acc_count, acc_size), x| (acc_count + 1, acc_size + x.len() as u32)); - - assert_eq!(expected_count, actual_count); - assert_eq!(expected_size, actual_size); - } - - // since we wipe the empty queues the sets of paras in queue contents, queue sizes and - // need dispatch set should all be equal. - let queue_contents_set = ::RelayDispatchQueues::iter() - .map(|(k, _)| k) - .collect::>(); - let queue_sizes_set = ::RelayDispatchQueueSize::iter() - .map(|(k, _)| k) - .collect::>(); - let needs_dispatch_set = - ::NeedsDispatch::get().into_iter().collect::>(); - assert_eq!(queue_contents_set, queue_sizes_set); - assert_eq!(queue_contents_set, needs_dispatch_set); - - // `NextDispatchRoundStartWith` should point into a para that is tracked. - if let Some(para) = ::NextDispatchRoundStartWith::get() { - assert!(queue_contents_set.contains(¶)); - } - - // `NeedsDispatch` is always sorted. - assert!(::NeedsDispatch::get().windows(2).all(|xs| xs[0] <= xs[1])); -} - -#[test] -fn dispatch_empty() { - new_test_ext(default_genesis_config()).execute_with(|| { - assert_storage_consistency_exhaustive(); - - // make sure that the case with empty queues is handled properly - Ump::process_pending_upward_messages(); - - assert_storage_consistency_exhaustive(); - }); -} - -#[test] -fn dispatch_single_message() { - let a = ParaId::from(228); - let msg = 1000u32.encode(); - - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - queue_upward_msg(a, msg.clone()); - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(a, msg)]); - - assert_storage_consistency_exhaustive(); - }); -} - -#[test] -fn dispatch_resume_after_exceeding_dispatch_stage_weight() { - let a = ParaId::from(128); - let c = ParaId::from(228); - let q = ParaId::from(911); - - let a_msg_1 = (200u32, "a_msg_1").encode(); - let a_msg_2 = (100u32, "a_msg_2").encode(); - let c_msg_1 = (300u32, "c_msg_1").encode(); - let c_msg_2 = (100u32, "c_msg_2").encode(); - let q_msg = (500u32, "q_msg").encode(); - - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - queue_upward_msg(q, q_msg.clone()); - queue_upward_msg(c, c_msg_1.clone()); - queue_upward_msg(a, a_msg_1.clone()); - queue_upward_msg(a, a_msg_2.clone()); - - //ump_service_total_weight: Weight::from_ref_time(500).set_proof_size(500), - assert_storage_consistency_exhaustive(); - - // we expect only two first messages to fit in the first iteration. - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(a, a_msg_1), (c, c_msg_1)]); - assert_storage_consistency_exhaustive(); - - queue_upward_msg(c, c_msg_2.clone()); - assert_storage_consistency_exhaustive(); - - // second iteration should process the second message. - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(q, q_msg)]); - assert_storage_consistency_exhaustive(); - - // 3rd iteration. - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(a, a_msg_2), (c, c_msg_2)]); - assert_storage_consistency_exhaustive(); - - // finally, make sure that the queue is empty. - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![]); - assert_storage_consistency_exhaustive(); - }); -} - -*/ \ No newline at end of file From c7fcf41c3420bd0fbc994b5894bbba4be800420e Mon Sep 17 00:00:00 2001 From: Gav Date: Fri, 11 Nov 2022 18:42:54 +0100 Subject: [PATCH 007/182] Docs --- Cargo.toml | 244 ------------------------ runtime/parachains/src/inclusion/mod.rs | 8 +- runtime/parachains/src/ump_tests.rs | 7 +- 3 files changed, 7 insertions(+), 252 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 848108e6798d..d6ff78d801e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -197,250 +197,6 @@ try-runtime = [ "polkadot-cli/try-runtime" ] fast-runtime = [ "polkadot-cli/fast-runtime" ] runtime-metrics = [ "polkadot-cli/runtime-metrics" ] pyroscope = ["polkadot-cli/pyroscope"] -[patch."https://github.com/paritytech/substrate"] -node-template ={path = "/Users/gav/Core/substrate/bin/node-template/node" } -frame-benchmarking ={path = "/Users/gav/Core/substrate/frame/benchmarking" } -frame-support ={path = "/Users/gav/Core/substrate/frame/support" } -frame-support-procedural ={path = "/Users/gav/Core/substrate/frame/support/procedural" } -frame-support-procedural-tools ={path = "/Users/gav/Core/substrate/frame/support/procedural/tools" } -frame-support-procedural-tools-derive ={path = "/Users/gav/Core/substrate/frame/support/procedural/tools/derive" } -sp-api ={path = "/Users/gav/Core/substrate/primitives/api" } -sp-api-proc-macro ={path = "/Users/gav/Core/substrate/primitives/api/proc-macro" } -sp-core ={path = "/Users/gav/Core/substrate/primitives/core" } -sp-core-hashing ={path = "/Users/gav/Core/substrate/primitives/core/hashing" } -sp-std ={path = "/Users/gav/Core/substrate/primitives/std" } -sp-debug-derive ={path = "/Users/gav/Core/substrate/primitives/debug-derive" } -sp-externalities ={path = "/Users/gav/Core/substrate/primitives/externalities" } -sp-storage ={path = "/Users/gav/Core/substrate/primitives/storage" } -sp-runtime-interface ={path = "/Users/gav/Core/substrate/primitives/runtime-interface" } -sp-runtime-interface-proc-macro ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/proc-macro" } -sp-tracing ={path = "/Users/gav/Core/substrate/primitives/tracing" } -sp-wasm-interface ={path = "/Users/gav/Core/substrate/primitives/wasm-interface" } -sp-io ={path = "/Users/gav/Core/substrate/primitives/io" } -sp-keystore ={path = "/Users/gav/Core/substrate/primitives/keystore" } -sp-state-machine ={path = "/Users/gav/Core/substrate/primitives/state-machine" } -sp-panic-handler ={path = "/Users/gav/Core/substrate/primitives/panic-handler" } -sp-trie ={path = "/Users/gav/Core/substrate/primitives/trie" } -sp-runtime ={path = "/Users/gav/Core/substrate/primitives/runtime" } -sp-application-crypto ={path = "/Users/gav/Core/substrate/primitives/application-crypto" } -sp-arithmetic ={path = "/Users/gav/Core/substrate/primitives/arithmetic" } -sp-weights ={path = "/Users/gav/Core/substrate/primitives/weights" } -substrate-test-runtime-client ={path = "/Users/gav/Core/substrate/test-utils/runtime/client" } -sc-block-builder ={path = "/Users/gav/Core/substrate/client/block-builder" } -sc-client-api ={path = "/Users/gav/Core/substrate/client/api" } -substrate-prometheus-endpoint ={path = "/Users/gav/Core/substrate/utils/prometheus" } -sc-executor ={path = "/Users/gav/Core/substrate/client/executor" } -sc-executor-common ={path = "/Users/gav/Core/substrate/client/executor/common" } -sc-allocator ={path = "/Users/gav/Core/substrate/client/allocator" } -sp-maybe-compressed-blob ={path = "/Users/gav/Core/substrate/primitives/maybe-compressed-blob" } -sp-sandbox ={path = "/Users/gav/Core/substrate/primitives/sandbox" } -sc-executor-wasmi ={path = "/Users/gav/Core/substrate/client/executor/wasmi" } -sc-executor-wasmtime ={path = "/Users/gav/Core/substrate/client/executor/wasmtime" } -sc-runtime-test ={path = "/Users/gav/Core/substrate/client/executor/runtime-test" } -sp-tasks ={path = "/Users/gav/Core/substrate/primitives/tasks" } -substrate-wasm-builder ={path = "/Users/gav/Core/substrate/utils/wasm-builder" } -sp-core-hashing-proc-macro ={path = "/Users/gav/Core/substrate/primitives/core/hashing/proc-macro" } -sp-version ={path = "/Users/gav/Core/substrate/primitives/version" } -sp-version-proc-macro ={path = "/Users/gav/Core/substrate/primitives/version/proc-macro" } -sc-tracing ={path = "/Users/gav/Core/substrate/client/tracing" } -sc-rpc-server ={path = "/Users/gav/Core/substrate/client/rpc-servers" } -sc-tracing-proc-macro ={path = "/Users/gav/Core/substrate/client/tracing/proc-macro" } -sp-blockchain ={path = "/Users/gav/Core/substrate/primitives/blockchain" } -sp-consensus ={path = "/Users/gav/Core/substrate/primitives/consensus/common" } -sp-inherents ={path = "/Users/gav/Core/substrate/primitives/inherents" } -sp-test-primitives ={path = "/Users/gav/Core/substrate/primitives/test-primitives" } -sp-database ={path = "/Users/gav/Core/substrate/primitives/database" } -sp-rpc ={path = "/Users/gav/Core/substrate/primitives/rpc" } -substrate-test-runtime ={path = "/Users/gav/Core/substrate/test-utils/runtime" } -beefy-merkle-tree ={path = "/Users/gav/Core/substrate/frame/beefy-mmr/primitives" } -beefy-primitives ={path = "/Users/gav/Core/substrate/primitives/beefy" } -sp-mmr-primitives ={path = "/Users/gav/Core/substrate/primitives/merkle-mountain-range" } -frame-system ={path = "/Users/gav/Core/substrate/frame/system" } -frame-system-rpc-runtime-api ={path = "/Users/gav/Core/substrate/frame/system/rpc/runtime-api" } -pallet-babe ={path = "/Users/gav/Core/substrate/frame/babe" } -pallet-authorship ={path = "/Users/gav/Core/substrate/frame/authorship" } -sp-authorship ={path = "/Users/gav/Core/substrate/primitives/authorship" } -pallet-session ={path = "/Users/gav/Core/substrate/frame/session" } -pallet-timestamp ={path = "/Users/gav/Core/substrate/frame/timestamp" } -sp-timestamp ={path = "/Users/gav/Core/substrate/primitives/timestamp" } -sp-session ={path = "/Users/gav/Core/substrate/primitives/session" } -sp-staking ={path = "/Users/gav/Core/substrate/primitives/staking" } -sp-consensus-babe ={path = "/Users/gav/Core/substrate/primitives/consensus/babe" } -sp-consensus-slots ={path = "/Users/gav/Core/substrate/primitives/consensus/slots" } -sp-consensus-vrf ={path = "/Users/gav/Core/substrate/primitives/consensus/vrf" } -frame-election-provider-support ={path = "/Users/gav/Core/substrate/frame/election-provider-support" } -frame-election-provider-solution-type ={path = "/Users/gav/Core/substrate/frame/election-provider-support/solution-type" } -sp-npos-elections ={path = "/Users/gav/Core/substrate/primitives/npos-elections" } -substrate-test-utils ={path = "/Users/gav/Core/substrate/test-utils" } -substrate-test-utils-derive ={path = "/Users/gav/Core/substrate/test-utils/derive" } -sc-service ={path = "/Users/gav/Core/substrate/client/service" } -sc-chain-spec ={path = "/Users/gav/Core/substrate/client/chain-spec" } -sc-chain-spec-derive ={path = "/Users/gav/Core/substrate/client/chain-spec/derive" } -sc-network-common ={path = "/Users/gav/Core/substrate/client/network/common" } -sc-consensus ={path = "/Users/gav/Core/substrate/client/consensus/common" } -sc-utils ={path = "/Users/gav/Core/substrate/client/utils" } -sc-peerset ={path = "/Users/gav/Core/substrate/client/peerset" } -sp-finality-grandpa ={path = "/Users/gav/Core/substrate/primitives/finality-grandpa" } -sc-telemetry ={path = "/Users/gav/Core/substrate/client/telemetry" } -sc-client-db ={path = "/Users/gav/Core/substrate/client/db" } -sc-state-db ={path = "/Users/gav/Core/substrate/client/state-db" } -kitchensink-runtime ={path = "/Users/gav/Core/substrate/bin/node/runtime" } -frame-executive ={path = "/Users/gav/Core/substrate/frame/executive" } -frame-try-runtime ={path = "/Users/gav/Core/substrate/frame/try-runtime" } -pallet-balances ={path = "/Users/gav/Core/substrate/frame/balances" } -pallet-transaction-payment ={path = "/Users/gav/Core/substrate/frame/transaction-payment" } -frame-system-benchmarking ={path = "/Users/gav/Core/substrate/frame/system/benchmarking" } -node-primitives ={path = "/Users/gav/Core/substrate/bin/node/primitives" } -pallet-alliance ={path = "/Users/gav/Core/substrate/frame/alliance" } -pallet-collective ={path = "/Users/gav/Core/substrate/frame/collective" } -pallet-identity ={path = "/Users/gav/Core/substrate/frame/identity" } -pallet-asset-tx-payment ={path = "/Users/gav/Core/substrate/frame/transaction-payment/asset-tx-payment" } -pallet-assets ={path = "/Users/gav/Core/substrate/frame/assets" } -pallet-authority-discovery ={path = "/Users/gav/Core/substrate/frame/authority-discovery" } -sp-authority-discovery ={path = "/Users/gav/Core/substrate/primitives/authority-discovery" } -pallet-bags-list ={path = "/Users/gav/Core/substrate/frame/bags-list" } -pallet-bounties ={path = "/Users/gav/Core/substrate/frame/bounties" } -pallet-treasury ={path = "/Users/gav/Core/substrate/frame/treasury" } -pallet-child-bounties ={path = "/Users/gav/Core/substrate/frame/child-bounties" } -pallet-contracts ={path = "/Users/gav/Core/substrate/frame/contracts" } -pallet-contracts-primitives ={path = "/Users/gav/Core/substrate/frame/contracts/primitives" } -pallet-contracts-proc-macro ={path = "/Users/gav/Core/substrate/frame/contracts/proc-macro" } -pallet-randomness-collective-flip ={path = "/Users/gav/Core/substrate/frame/randomness-collective-flip" } -pallet-utility ={path = "/Users/gav/Core/substrate/frame/utility" } -pallet-conviction-voting ={path = "/Users/gav/Core/substrate/frame/conviction-voting" } -pallet-scheduler ={path = "/Users/gav/Core/substrate/frame/scheduler" } -pallet-preimage ={path = "/Users/gav/Core/substrate/frame/preimage" } -pallet-democracy ={path = "/Users/gav/Core/substrate/frame/democracy" } -pallet-election-provider-multi-phase ={path = "/Users/gav/Core/substrate/frame/election-provider-multi-phase" } -pallet-election-provider-support-benchmarking ={path = "/Users/gav/Core/substrate/frame/election-provider-support/benchmarking" } -pallet-elections-phragmen ={path = "/Users/gav/Core/substrate/frame/elections-phragmen" } -pallet-fast-unstake ={path = "/Users/gav/Core/substrate/frame/fast-unstake" } -pallet-staking ={path = "/Users/gav/Core/substrate/frame/staking" } -pallet-staking-reward-curve ={path = "/Users/gav/Core/substrate/frame/staking/reward-curve" } -pallet-gilt ={path = "/Users/gav/Core/substrate/frame/gilt" } -pallet-grandpa ={path = "/Users/gav/Core/substrate/frame/grandpa" } -pallet-offences ={path = "/Users/gav/Core/substrate/frame/offences" } -sp-keyring ={path = "/Users/gav/Core/substrate/primitives/keyring" } -pallet-im-online ={path = "/Users/gav/Core/substrate/frame/im-online" } -pallet-indices ={path = "/Users/gav/Core/substrate/frame/indices" } -pallet-lottery ={path = "/Users/gav/Core/substrate/frame/lottery" } -frame-support-test ={path = "/Users/gav/Core/substrate/frame/support/test" } -frame-support-test-pallet ={path = "/Users/gav/Core/substrate/frame/support/test/pallet" } -pallet-membership ={path = "/Users/gav/Core/substrate/frame/membership" } -pallet-message-queue ={path = "/Users/gav/Core/substrate/frame/message-queue" } -pallet-mmr ={path = "/Users/gav/Core/substrate/frame/merkle-mountain-range" } -pallet-multisig ={path = "/Users/gav/Core/substrate/frame/multisig" } -pallet-nomination-pools ={path = "/Users/gav/Core/substrate/frame/nomination-pools" } -pallet-nomination-pools-benchmarking ={path = "/Users/gav/Core/substrate/frame/nomination-pools/benchmarking" } -pallet-nomination-pools-runtime-api ={path = "/Users/gav/Core/substrate/frame/nomination-pools/runtime-api" } -pallet-offences-benchmarking ={path = "/Users/gav/Core/substrate/frame/offences/benchmarking" } -pallet-proxy ={path = "/Users/gav/Core/substrate/frame/proxy" } -pallet-ranked-collective ={path = "/Users/gav/Core/substrate/frame/ranked-collective" } -pallet-recovery ={path = "/Users/gav/Core/substrate/frame/recovery" } -pallet-referenda ={path = "/Users/gav/Core/substrate/frame/referenda" } -pallet-remark ={path = "/Users/gav/Core/substrate/frame/remark" } -pallet-session-benchmarking ={path = "/Users/gav/Core/substrate/frame/session/benchmarking" } -pallet-society ={path = "/Users/gav/Core/substrate/frame/society" } -pallet-state-trie-migration ={path = "/Users/gav/Core/substrate/frame/state-trie-migration" } -remote-externalities ={path = "/Users/gav/Core/substrate/utils/frame/remote-externalities" } -substrate-rpc-client ={path = "/Users/gav/Core/substrate/utils/frame/rpc/client" } -sc-rpc-api ={path = "/Users/gav/Core/substrate/client/rpc-api" } -sc-transaction-pool-api ={path = "/Users/gav/Core/substrate/client/transaction-pool/api" } -substrate-state-trie-migration-rpc ={path = "/Users/gav/Core/substrate/utils/frame/rpc/state-trie-migration-rpc" } -pallet-sudo ={path = "/Users/gav/Core/substrate/frame/sudo" } -pallet-tips ={path = "/Users/gav/Core/substrate/frame/tips" } -pallet-transaction-payment-rpc-runtime-api ={path = "/Users/gav/Core/substrate/frame/transaction-payment/rpc/runtime-api" } -pallet-transaction-storage ={path = "/Users/gav/Core/substrate/frame/transaction-storage" } -sp-transaction-storage-proof ={path = "/Users/gav/Core/substrate/primitives/transaction-storage-proof" } -pallet-uniques ={path = "/Users/gav/Core/substrate/frame/uniques" } -pallet-vesting ={path = "/Users/gav/Core/substrate/frame/vesting" } -pallet-whitelist ={path = "/Users/gav/Core/substrate/frame/whitelist" } -sp-block-builder ={path = "/Users/gav/Core/substrate/primitives/block-builder" } -sp-offchain ={path = "/Users/gav/Core/substrate/primitives/offchain" } -sp-transaction-pool ={path = "/Users/gav/Core/substrate/primitives/transaction-pool" } -sc-informant ={path = "/Users/gav/Core/substrate/client/informant" } -sc-keystore ={path = "/Users/gav/Core/substrate/client/keystore" } -sc-network ={path = "/Users/gav/Core/substrate/client/network" } -fork-tree ={path = "/Users/gav/Core/substrate/utils/fork-tree" } -sc-network-light ={path = "/Users/gav/Core/substrate/client/network/light" } -sc-network-sync ={path = "/Users/gav/Core/substrate/client/network/sync" } -sc-network-bitswap ={path = "/Users/gav/Core/substrate/client/network/bitswap" } -sc-network-transactions ={path = "/Users/gav/Core/substrate/client/network/transactions" } -sc-offchain ={path = "/Users/gav/Core/substrate/client/offchain" } -sc-transaction-pool ={path = "/Users/gav/Core/substrate/client/transaction-pool" } -substrate-test-runtime-transaction-pool ={path = "/Users/gav/Core/substrate/test-utils/runtime/transaction-pool" } -sc-rpc ={path = "/Users/gav/Core/substrate/client/rpc" } -sc-rpc-spec-v2 ={path = "/Users/gav/Core/substrate/client/rpc-spec-v2" } -sc-sysinfo ={path = "/Users/gav/Core/substrate/client/sysinfo" } -sp-consensus-aura ={path = "/Users/gav/Core/substrate/primitives/consensus/aura" } -substrate-test-client ={path = "/Users/gav/Core/substrate/test-utils/client" } -sp-runtime-interface-test-wasm ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/test-wasm" } -sp-serializer ={path = "/Users/gav/Core/substrate/primitives/serializer" } -frame-benchmarking-cli ={path = "/Users/gav/Core/substrate/utils/frame/benchmarking-cli" } -sc-cli ={path = "/Users/gav/Core/substrate/client/cli" } -node-template-runtime ={path = "/Users/gav/Core/substrate/bin/node-template/runtime" } -pallet-aura ={path = "/Users/gav/Core/substrate/frame/aura" } -pallet-template ={path = "/Users/gav/Core/substrate/bin/node-template/pallets/template" } -pallet-transaction-payment-rpc ={path = "/Users/gav/Core/substrate/frame/transaction-payment/rpc" } -sc-basic-authorship ={path = "/Users/gav/Core/substrate/client/basic-authorship" } -sc-proposer-metrics ={path = "/Users/gav/Core/substrate/client/proposer-metrics" } -sc-consensus-aura ={path = "/Users/gav/Core/substrate/client/consensus/aura" } -sc-consensus-slots ={path = "/Users/gav/Core/substrate/client/consensus/slots" } -sc-network-test ={path = "/Users/gav/Core/substrate/client/network/test" } -sc-finality-grandpa ={path = "/Users/gav/Core/substrate/client/finality-grandpa" } -sc-network-gossip ={path = "/Users/gav/Core/substrate/client/network-gossip" } -substrate-frame-rpc-system ={path = "/Users/gav/Core/substrate/utils/frame/rpc/system" } -try-runtime-cli ={path = "/Users/gav/Core/substrate/utils/frame/try-runtime/cli" } -substrate-build-script-utils ={path = "/Users/gav/Core/substrate/utils/build-script-utils" } -node-bench ={path = "/Users/gav/Core/substrate/bin/node/bench" } -node-testing ={path = "/Users/gav/Core/substrate/bin/node/testing" } -node-executor ={path = "/Users/gav/Core/substrate/bin/node/executor" } -node-cli ={path = "/Users/gav/Core/substrate/bin/node/cli" } -node-inspect ={path = "/Users/gav/Core/substrate/bin/node/inspect" } -node-rpc ={path = "/Users/gav/Core/substrate/bin/node/rpc" } -pallet-mmr-rpc ={path = "/Users/gav/Core/substrate/frame/merkle-mountain-range/rpc" } -sc-consensus-babe ={path = "/Users/gav/Core/substrate/client/consensus/babe" } -sc-consensus-epochs ={path = "/Users/gav/Core/substrate/client/consensus/epochs" } -sc-consensus-babe-rpc ={path = "/Users/gav/Core/substrate/client/consensus/babe/rpc" } -sc-finality-grandpa-rpc ={path = "/Users/gav/Core/substrate/client/finality-grandpa/rpc" } -sc-sync-state-rpc ={path = "/Users/gav/Core/substrate/client/sync-state-rpc" } -sc-authority-discovery ={path = "/Users/gav/Core/substrate/client/authority-discovery" } -sc-consensus-uncles ={path = "/Users/gav/Core/substrate/client/consensus/uncles" } -sc-service-test ={path = "/Users/gav/Core/substrate/client/service/test" } -substrate-frame-cli ={path = "/Users/gav/Core/substrate/utils/frame/frame-utilities-cli" } -chain-spec-builder ={path = "/Users/gav/Core/substrate/bin/utils/chain-spec-builder" } -subkey ={path = "/Users/gav/Core/substrate/bin/utils/subkey" } -beefy-gadget ={path = "/Users/gav/Core/substrate/client/beefy" } -beefy-gadget-rpc ={path = "/Users/gav/Core/substrate/client/beefy/rpc" } -sc-consensus-manual-seal ={path = "/Users/gav/Core/substrate/client/consensus/manual-seal" } -sc-consensus-pow ={path = "/Users/gav/Core/substrate/client/consensus/pow" } -sp-consensus-pow ={path = "/Users/gav/Core/substrate/primitives/consensus/pow" } -pallet-atomic-swap ={path = "/Users/gav/Core/substrate/frame/atomic-swap" } -pallet-bags-list-fuzzer ={path = "/Users/gav/Core/substrate/frame/bags-list/fuzzer" } -pallet-bags-list-remote-tests ={path = "/Users/gav/Core/substrate/frame/bags-list/remote-tests" } -pallet-beefy ={path = "/Users/gav/Core/substrate/frame/beefy" } -pallet-beefy-mmr ={path = "/Users/gav/Core/substrate/frame/beefy-mmr" } -frame-election-solution-type-fuzzer ={path = "/Users/gav/Core/substrate/frame/election-provider-support/solution-type/fuzzer" } -pallet-example-basic ={path = "/Users/gav/Core/substrate/frame/examples/basic" } -pallet-example-offchain-worker ={path = "/Users/gav/Core/substrate/frame/examples/offchain-worker" } -pallet-example-parallel ={path = "/Users/gav/Core/substrate/frame/examples/parallel" } -pallet-nicks ={path = "/Users/gav/Core/substrate/frame/nicks" } -pallet-node-authorization ={path = "/Users/gav/Core/substrate/frame/node-authorization" } -pallet-nomination-pools-test-staking ={path = "/Users/gav/Core/substrate/frame/nomination-pools/test-staking" } -pallet-scored-pool ={path = "/Users/gav/Core/substrate/frame/scored-pool" } -pallet-staking-reward-fn ={path = "/Users/gav/Core/substrate/frame/staking/reward-fn" } -pallet-root-offences ={path = "/Users/gav/Core/substrate/frame/root-offences" } -frame-support-test-compile-pass ={path = "/Users/gav/Core/substrate/frame/support/test/compile_pass" } -sp-api-test ={path = "/Users/gav/Core/substrate/primitives/api/test" } -sp-application-crypto-test ={path = "/Users/gav/Core/substrate/primitives/application-crypto/test" } -sp-arithmetic-fuzzer ={path = "/Users/gav/Core/substrate/primitives/arithmetic/fuzzer" } -sp-npos-elections-fuzzer ={path = "/Users/gav/Core/substrate/primitives/npos-elections/fuzzer" } -sp-runtime-interface-test ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/test" } -sp-runtime-interface-test-wasm-deprecated ={path = "/Users/gav/Core/substrate/primitives/runtime-interface/test-wasm-deprecated" } -substrate-test-utils-test-crate ={path = "/Users/gav/Core/substrate/test-utils/test-crate" } -substrate-frame-rpc-support ={path = "/Users/gav/Core/substrate/utils/frame/rpc/support" } -generate-bags ={path = "/Users/gav/Core/substrate/utils/frame/generate-bags" } -node-runtime-generate-bags ={path = "/Users/gav/Core/substrate/utils/frame/generate-bags/node-runtime" } # Configuration for building a .deb package - for use with `cargo-deb` [package.metadata.deb] diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index de4ab780452b..d5d7e4ce28a5 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -920,10 +920,10 @@ impl Pallet { T::MessageQueue::enqueue_messages(messages, para); let Footprint { count, size } = T::MessageQueue::footprint(para); - // TODO: Consider placing the remaining capacity into the well known key, rather than the - // amount used. This is way more useful for the parachain. - // TODO: Consider doing this at the end of the block, after any messages might have been + // TODO: Do this at the end of the block, after any messages might have been // executed, to report more accurate numbers to the para. + + // TODO: Remove all usages of `relay_dispatch_queue_size` #[allow(deprecated)] let key = well_known_keys::relay_dispatch_queue_size(para); (count, size).using_encoded(|d| sp_io::storage::set(&key, d)); @@ -933,7 +933,7 @@ impl Pallet { let remaining_size = config.max_upward_queue_size.saturating_sub(size); (remaining_count, remaining_size).using_encoded(|d| sp_io::storage::set(&key, d)); - // TODO: calculate worst-case enqueue (largest possible message with the most recent page + // TODO: Calculate worst-case enqueue (largest possible message with the most recent page // being almost full) and return. Weight::zero() } diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 55dc8e0c6d3c..08828f21ed14 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -193,11 +193,10 @@ fn verify_relay_dispatch_queue_size_is_externally_accessible() { queue_upward_msg(a, msg); #[allow(deprecated)] - let raw_queue_size = sp_io::storage::get(&well_known_keys::relay_dispatch_queue_size(a)) - .expect( - "enqueing a message should create the dispatch queue\ + let raw_queue_size = sp_io::storage::get(&well_known_keys::relay_dispatch_queue_size(a)).expect( + "enqueing a message should create the dispatch queue\ and it should be accessible via the well known keys", - ); + ); let (cnt, size) = <(u32, u32)>::decode(&mut &raw_queue_size[..]) .expect("the dispatch queue size should be decodable into (u32, u32)"); From b074ec3acb5fac9840445c49a5ef0791542e6473 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Mon, 14 Nov 2022 14:00:22 +0000 Subject: [PATCH 008/182] Update runtime/parachains/src/inclusion/mod.rs Co-authored-by: asynchronous rob --- runtime/parachains/src/inclusion/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index d5d7e4ce28a5..cc3faa624782 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -51,7 +51,7 @@ pub(crate) mod tests; /// Maximum value that `config.max_upward_message_size` can be set to /// -/// This is used for benchmarking sanely bounding relevant storate items. It is expected from the `configurations` +/// This is used for benchmarking sanely bounding relevant storage items. It is expected from the `configuration` /// pallet to check these values before setting. pub const MAX_UPWARD_MESSAGE_SIZE_BOUND: u32 = 50 * 1024; From aa4b7e5e38d0a6f38e36380a81f975e0b949cda4 Mon Sep 17 00:00:00 2001 From: Gav Date: Mon, 14 Nov 2022 16:37:06 +0100 Subject: [PATCH 009/182] Add benchmarking --- runtime/parachains/Cargo.toml | 2 +- .../parachains/src/inclusion/benchmarking.rs | 39 ++++++++++++++++ runtime/parachains/src/inclusion/mod.rs | 44 ++++++++++++++----- 3 files changed, 73 insertions(+), 12 deletions(-) create mode 100644 runtime/parachains/src/inclusion/benchmarking.rs diff --git a/runtime/parachains/Cargo.toml b/runtime/parachains/Cargo.toml index e0685f98a8b8..f06842e296ee 100644 --- a/runtime/parachains/Cargo.toml +++ b/runtime/parachains/Cargo.toml @@ -58,7 +58,7 @@ sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master thousands = "0.2.0" assert_matches = "1" serde_json = "1.0.85" -pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master" } +#pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = ["std"] diff --git a/runtime/parachains/src/inclusion/benchmarking.rs b/runtime/parachains/src/inclusion/benchmarking.rs new file mode 100644 index 000000000000..7aeb2f9d7b72 --- /dev/null +++ b/runtime/parachains/src/inclusion/benchmarking.rs @@ -0,0 +1,39 @@ +// Copyright 2020 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 super::*; +use frame_benchmarking::{benchmarks, BenchmarkError, BenchmarkResult}; +use frame_system::RawOrigin; +use sp_runtime::traits::One; + +benchmarks! { + receive_upward_messages { + receive_upward_messages(config, para, vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND]; 1]) + + let config = configuration::ActiveConfig::::get(); + let para = 42; // not especially important. + + let i in 1..1000; + + let upward_messages = vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND]; i]; + }: receive_upward_messages(config, para, upward_messages) + + impl_benchmark_test_suite!( + Pallet, + crate::mock::new_test_ext(Default::default()), + crate::mock::Test + ); +} diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index d5d7e4ce28a5..f82301cfa111 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -49,6 +49,26 @@ pub use pallet::*; #[cfg(test)] pub(crate) mod tests; +#[cfg(feature = "runtime-benchmarks")] +mod benchmarking; + +pub trait WeightInfo { + fn receive_upward_messages(i: u32) -> Weight; +} + +pub struct TestWeightInfo; +impl WeightInfo for TestWeightInfo { + fn receive_upward_messages(_: u32) -> Weight { + Weight::MAX + } +} + +impl WeightInfo for () { + fn receive_upward_messages(_: u32) -> Weight { + Weight::zero() + } +} + /// Maximum value that `config.max_upward_message_size` can be set to /// /// This is used for benchmarking sanely bounding relevant storate items. It is expected from the `configurations` @@ -371,7 +391,9 @@ impl Pallet { } /// Block finalization logic, called by initializer. - pub(crate) fn initializer_finalize() {} + pub(crate) fn initializer_finalize() { + Self::publish_ump_status(); + } /// Handle an incoming session change. pub(crate) fn initializer_on_new_session( @@ -915,15 +937,19 @@ impl Pallet { if !upward_messages.is_empty() { let count = upward_messages.len() as u32; Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); + let messages = upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); + T::MessageQueue::enqueue_messages(messages, para); } - let messages = upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); - T::MessageQueue::enqueue_messages(messages, para); - let Footprint { count, size } = T::MessageQueue::footprint(para); - // TODO: Do this at the end of the block, after any messages might have been - // executed, to report more accurate numbers to the para. + // TODO: Calculate worst-case enqueue (largest possible message with the most recent page + // being almost full) and return. + Weight::zero() + } - // TODO: Remove all usages of `relay_dispatch_queue_size` + /// Places the current status of UMP queues into the well-known-keys for other chains to see. + fn publish_ump_status() { + let Footprint { count, size } = T::MessageQueue::footprint(para); + // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` #[allow(deprecated)] let key = well_known_keys::relay_dispatch_queue_size(para); (count, size).using_encoded(|d| sp_io::storage::set(&key, d)); @@ -932,10 +958,6 @@ impl Pallet { let remaining_count = config.max_upward_queue_count.saturating_sub(count); let remaining_size = config.max_upward_queue_size.saturating_sub(size); (remaining_count, remaining_size).using_encoded(|d| sp_io::storage::set(&key, d)); - - // TODO: Calculate worst-case enqueue (largest possible message with the most recent page - // being almost full) and return. - Weight::zero() } /// Cleans up all paras pending availability that the predicate returns true for. From 92ca0c4465bf34e4e5c6537d2d4c0306cebbd534 Mon Sep 17 00:00:00 2001 From: Gav Date: Mon, 14 Nov 2022 17:21:03 +0100 Subject: [PATCH 010/182] Benchmarks --- Cargo.lock | 489 +++++++++--------- runtime/parachains/Cargo.toml | 2 +- .../parachains/src/inclusion/benchmarking.rs | 16 +- runtime/parachains/src/inclusion/mod.rs | 16 +- runtime/parachains/src/mock.rs | 10 + 5 files changed, 279 insertions(+), 254 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7a4c33c2b4ec..30f789cf4b45 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,7 +42,7 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cipher", "cpufeatures", "opaque-debug 0.3.0", @@ -130,15 +130,6 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" -[[package]] -name = "arrayvec" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" -dependencies = [ - "nodrop", -] - [[package]] name = "arrayvec" version = "0.5.2" @@ -273,7 +264,7 @@ checksum = "83137067e3a2a6a06d67168e49e68a0957d215410473a740cea95a2425c0b7c6" dependencies = [ "async-io", "blocking", - "cfg-if 1.0.0", + "cfg-if", "event-listener", "futures-lite", "libc", @@ -386,7 +377,7 @@ checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object 0.27.1", @@ -567,16 +558,6 @@ dependencies = [ "digest 0.10.3", ] -[[package]] -name = "blake2-rfc" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" -dependencies = [ - "arrayvec 0.4.12", - "constant_time_eq", -] - [[package]] name = "blake2b_simd" version = "1.0.0" @@ -608,7 +589,7 @@ dependencies = [ "arrayref", "arrayvec 0.7.2", "cc", - "cfg-if 1.0.0", + "cfg-if", "constant_time_eq", "digest 0.10.3", ] @@ -806,12 +787,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -830,7 +805,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cipher", "cpufeatures", "zeroize", @@ -886,11 +861,11 @@ dependencies = [ [[package]] name = "ckb-merkle-mountain-range" -version = "0.3.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f061f97d64fd1822664bdfb722f7ae5469a97b77567390f7442be5b5dc82a5b" +checksum = "56ccb671c5921be8a84686e6212ca184cb1d7c51cadcdbfcbd1cc3f042f5dfb8" dependencies = [ - "cfg-if 0.1.10", + "cfg-if", ] [[package]] @@ -953,6 +928,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + [[package]] name = "color-eyre" version = "0.6.1" @@ -988,9 +973,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.7.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "constant_time_eq" @@ -1035,7 +1020,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "931ab2a3e6330a07900b8e7ca4e106cdcbb93f2b9a52df55e54ee53d8305b55d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1151,7 +1136,7 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "738c290dfaea84fc1ca15ad9c168d083b05a714e1efddd8edaab678dc28d2836" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1160,7 +1145,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] @@ -1170,7 +1155,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] @@ -1181,7 +1166,7 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", "lazy_static", "memoffset", @@ -1194,7 +1179,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] @@ -1204,7 +1189,7 @@ version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ff1f980957787286a554052d03c7aee98d99cc32e09f6d45f0a814133c87978" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", ] @@ -1216,9 +1201,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.3.2" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array 0.14.4", "rand_core 0.6.3", @@ -1314,6 +1299,50 @@ dependencies = [ "zeroize", ] +[[package]] +name = "cxx" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97abf9f0eca9e52b7f81b945524e76710e6cb2366aead23b7d4fbf72e281f888" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cc32cc5fea1d894b77d269ddb9f192110069a8a9c1f1d441195fba90553dea3" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca220e4794c934dc6b1207c3b42856ad4c302f2df1712e9f8d2eec5afaacf1f" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b846f081361125bfc8dc9d3940c84e1fd83ba54bbca7b17cd29483c828be0704" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "data-encoding" version = "2.3.2" @@ -1351,11 +1380,12 @@ dependencies = [ [[package]] name = "der" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" dependencies = [ "const-oid", + "zeroize", ] [[package]] @@ -1438,7 +1468,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "dirs-sys-next", ] @@ -1542,9 +1572,9 @@ checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "ecdsa" -version = "0.13.4" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -1597,13 +1627,14 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.11.12" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ "base16ct", "crypto-bigint", "der", + "digest 0.10.3", "ff", "generic-array 0.14.4", "group", @@ -1619,7 +1650,7 @@ version = "0.8.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1844,7 +1875,7 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc04871e5ae3aa2952d552dae6b291b3099723bf779a8054281c1366a54613ef" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "log", "serde", @@ -1856,9 +1887,9 @@ dependencies = [ [[package]] name = "ff" -version = "0.11.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ "rand_core 0.6.3", "subtle", @@ -1880,7 +1911,7 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e94a7bbaa59354bc20dd75b67f23e2797b4490e9d6928203fb105c79e448c86c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall", "windows-sys 0.36.1", @@ -1938,7 +1969,7 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crc32fast", "libc", "libz-sys", @@ -2063,6 +2094,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-state-machine", + "sp-std", "sp-storage", "sp-trie", "tempfile", @@ -2117,7 +2149,7 @@ version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "parity-scale-codec", "scale-info", "serde", @@ -2477,7 +2509,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", @@ -2490,7 +2522,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.10.0+wasi-snapshot-preview1", ] @@ -2563,9 +2595,9 @@ dependencies = [ [[package]] name = "group" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", "rand_core 0.6.3", @@ -2676,6 +2708,15 @@ dependencies = [ "digest 0.9.0", ] +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.3", +] + [[package]] name = "hmac-drbg" version = "0.3.0" @@ -2902,7 +2943,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -3129,14 +3170,14 @@ dependencies = [ [[package]] name = "k256" -version = "0.10.4" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", - "sec1", + "sha2 0.10.2", ] [[package]] @@ -3351,7 +3392,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afe203d669ec979b7128619bae5a63b7b42e9203c1b29146079ee05e2f604b52" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "winapi", ] @@ -3455,7 +3496,7 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "lru 0.8.1", + "lru", "prost", "prost-build", "prost-codec", @@ -3769,6 +3810,15 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "link-cplusplus" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" +dependencies = [ + "cc", +] + [[package]] name = "linked-hash-map" version = "0.5.4" @@ -3815,20 +3865,11 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "serde", "value-bag", ] -[[package]] -name = "lru" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" -dependencies = [ - "hashbrown", -] - [[package]] name = "lru" version = "0.8.1" @@ -3971,7 +4012,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce95ae042940bad7e312857b929ee3d11b8f799a80cb7b9c7ec5125516906395" dependencies = [ - "lru 0.8.1", + "lru", ] [[package]] @@ -4054,7 +4095,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2be9a9090bc1cac2930688fa9478092a64c6a92ddc6ae0692d46b37d9cab709" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "downcast", "fragile", "lazy_static", @@ -4069,7 +4110,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86d702a0530a0141cf4ed147cf5ec7be6f2c187d4e37fcbefc39cf34116bfe8f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "proc-macro2", "quote", "syn", @@ -4165,7 +4206,7 @@ dependencies = [ "matrixmultiply", "nalgebra-macros", "num-complex", - "num-rational 0.4.1", + "num-rational", "num-traits", "rand 0.8.5", "rand_distr", @@ -4291,7 +4332,7 @@ checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" dependencies = [ "bitflags", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "memoffset", ] @@ -4303,17 +4344,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f17df307904acd05aa8e32e97bb20f2a0df1728bbc2d771ae8f9a90463441e9" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "libc", "memoffset", ] -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - [[package]] name = "nohash-hasher" version = "0.2.0" @@ -4346,17 +4381,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "num-bigint" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-bigint" version = "0.4.3" @@ -4397,18 +4421,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-rational" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" -dependencies = [ - "autocfg", - "num-bigint 0.2.6", - "num-integer", - "num-traits", -] - [[package]] name = "num-rational" version = "0.4.1" @@ -4416,7 +4428,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", - "num-bigint 0.4.3", + "num-bigint", "num-integer", "num-traits", ] @@ -4487,7 +4499,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -5022,6 +5034,7 @@ dependencies = [ name = "pallet-mmr-rpc" version = "3.0.0" dependencies = [ + "anyhow", "jsonrpsee", "parity-scale-codec", "serde", @@ -5402,6 +5415,7 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", + "sp-weights", ] [[package]] @@ -5412,6 +5426,7 @@ dependencies = [ "parity-scale-codec", "sp-api", "sp-runtime", + "sp-weights", ] [[package]] @@ -5520,25 +5535,6 @@ dependencies = [ "xcm-executor", ] -[[package]] -name = "parity-db" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8fdb726a43661fa54b43e7114e6b88b2289cae388eb3ad766d9d1754d83fce" -dependencies = [ - "blake2-rfc", - "crc32fast", - "fs2", - "hex", - "libc", - "log", - "lz4", - "memmap2", - "parking_lot 0.12.1", - "rand 0.8.5", - "snap", -] - [[package]] name = "parity-db" version = "0.4.2" @@ -5597,7 +5593,7 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "hashbrown", "impl-trait-for-tuples", "parity-util-mem-derive", @@ -5620,15 +5616,6 @@ dependencies = [ "synstructure", ] -[[package]] -name = "parity-wasm" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ad52817c4d343339b3bc2e26861bd21478eda0b7509acf83505727000512ac" -dependencies = [ - "byteorder", -] - [[package]] name = "parity-wasm" version = "0.45.0" @@ -5668,7 +5655,7 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "instant", "libc", "redox_syscall", @@ -5682,7 +5669,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall", "smallvec", @@ -5818,13 +5805,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkcs8" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ "der", "spki", - "zeroize", ] [[package]] @@ -5912,7 +5898,7 @@ dependencies = [ "fatality", "futures", "futures-timer", - "lru 0.8.1", + "lru", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -5942,7 +5928,7 @@ dependencies = [ "futures", "futures-timer", "log", - "lru 0.8.1", + "lru", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -6082,7 +6068,7 @@ dependencies = [ "futures-timer", "indexmap", "lazy_static", - "lru 0.8.1", + "lru", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -6202,7 +6188,7 @@ dependencies = [ "futures-timer", "kvdb", "kvdb-memorydb", - "lru 0.8.1", + "lru", "merlin", "parity-scale-codec", "parking_lot 0.12.1", @@ -6372,7 +6358,7 @@ dependencies = [ "futures-timer", "kvdb", "kvdb-memorydb", - "lru 0.8.1", + "lru", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6660,8 +6646,8 @@ dependencies = [ "kvdb-shared-tests", "lazy_static", "log", - "lru 0.8.1", - "parity-db 0.4.2", + "lru", + "parity-db", "parity-scale-codec", "parity-util-mem", "parking_lot 0.11.2", @@ -6694,7 +6680,7 @@ dependencies = [ "femme", "futures", "futures-timer", - "lru 0.8.1", + "lru", "orchestra", "parity-util-mem", "parking_lot 0.12.1", @@ -7051,12 +7037,12 @@ dependencies = [ "kvdb", "kvdb-rocksdb", "log", - "lru 0.8.1", + "lru", "pallet-babe", "pallet-im-online", "pallet-staking", "pallet-transaction-payment-rpc-runtime-api", - "parity-db 0.4.2", + "parity-db", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", @@ -7378,7 +7364,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "log", "wepoll-ffi", @@ -7402,7 +7388,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "opaque-debug 0.3.0", "universal-hash", @@ -7415,7 +7401,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55f35f865aa964be21fcde114cbd1cfbd9bf8a471460ed965b0f84f96c711401" dependencies = [ "backtrace", - "cfg-if 1.0.0", + "cfg-if", "findshlibs", "lazy_static", "libc", @@ -7554,7 +7540,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f64969ffd5dd8f39bd57a68ac53c163a095ed9d0fb707146da1b27025a3504" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fnv", "lazy_static", "memchr", @@ -8036,12 +8022,12 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.1.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint", - "hmac 0.11.0", + "hmac 0.12.1", "zeroize", ] @@ -8476,7 +8462,7 @@ dependencies = [ "kvdb-rocksdb", "linked-hash-map", "log", - "parity-db 0.3.17", + "parity-db", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", @@ -8522,12 +8508,11 @@ dependencies = [ "futures", "log", "merlin", - "num-bigint 0.2.6", - "num-rational 0.2.4", + "num-bigint", + "num-rational", "num-traits", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.7.3", "sc-client-api", "sc-consensus", "sc-consensus-epochs", @@ -8615,7 +8600,7 @@ name = "sc-executor" version = "0.10.0-dev" dependencies = [ "lazy_static", - "lru 0.7.8", + "lru", "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", @@ -8628,7 +8613,6 @@ dependencies = [ "sp-io", "sp-panic-handler", "sp-runtime-interface", - "sp-tasks", "sp-trie", "sp-version", "sp-wasm-interface", @@ -8669,12 +8653,12 @@ dependencies = [ name = "sc-executor-wasmtime" version = "0.10.0-dev" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "log", "once_cell", "parity-scale-codec", - "parity-wasm 0.45.0", + "parity-wasm", "rustix", "sc-allocator", "sc-executor-common", @@ -8794,7 +8778,7 @@ dependencies = [ "linked-hash-map", "linked_hash_set", "log", - "lru 0.7.8", + "lru", "parity-scale-codec", "parking_lot 0.12.1", "pin-project", @@ -8873,7 +8857,7 @@ dependencies = [ "futures-timer", "libp2p", "log", - "lru 0.7.8", + "lru", "sc-network-common", "sc-peerset", "sp-runtime", @@ -8910,7 +8894,7 @@ dependencies = [ "futures", "libp2p", "log", - "lru 0.7.8", + "lru", "mockall", "parity-scale-codec", "prost", @@ -9312,7 +9296,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c46be926081c9f4dd5dd9b6f1d3e3229f2360bc6502dd8836f84a93b7c75e99a" dependencies = [ "bitvec", - "cfg-if 1.0.0", + "cfg-if", "derive_more", "parity-scale-codec", "scale-info-derive", @@ -9365,6 +9349,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "scratch" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" + [[package]] name = "sct" version = "0.7.0" @@ -9377,10 +9367,11 @@ dependencies = [ [[package]] name = "sec1" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ + "base16ct", "der", "generic-array 0.14.4", "pkcs8", @@ -9548,7 +9539,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", @@ -9560,7 +9551,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.10.3", ] @@ -9584,7 +9575,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", @@ -9596,7 +9587,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.10.3", ] @@ -9659,11 +9650,11 @@ dependencies = [ [[package]] name = "signature" -version = "1.4.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.9.0", + "digest 0.10.3", "rand_core 0.6.3", ] @@ -9860,7 +9851,7 @@ version = "4.0.0-dev" dependencies = [ "futures", "log", - "lru 0.7.8", + "lru", "parity-scale-codec", "parking_lot 0.12.1", "sp-api", @@ -9957,7 +9948,6 @@ dependencies = [ "merlin", "num-traits", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", "primitive-types", "rand 0.7.3", @@ -10133,6 +10123,7 @@ dependencies = [ "sp-debug-derive", "sp-runtime", "sp-std", + "thiserror", ] [[package]] @@ -10298,18 +10289,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-tasks" -version = "4.0.0-dev" -dependencies = [ - "log", - "sp-core", - "sp-externalities", - "sp-io", - "sp-runtime-interface", - "sp-std", -] - [[package]] name = "sp-timestamp" version = "4.0.0-dev" @@ -10367,7 +10346,7 @@ dependencies = [ "hash-db", "hashbrown", "lazy_static", - "lru 0.7.8", + "lru", "memory-db", "nohash-hasher", "parity-scale-codec", @@ -10387,7 +10366,7 @@ version = "5.0.0" dependencies = [ "impl-serde", "parity-scale-codec", - "parity-wasm 0.45.0", + "parity-wasm", "scale-info", "serde", "sp-core-hashing-proc-macro", @@ -10442,9 +10421,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spki" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", "der", @@ -10452,9 +10431,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.29.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0837b5d62f42082c9d56cd946495ae273a3c68083b637b9153341d5e465146d" +checksum = "37a9821878e1f13aba383aa40a86fb1b33c7265774ec91e32563cb1dd1577496" dependencies = [ "Inflector", "num-format", @@ -10761,7 +10740,7 @@ dependencies = [ "tempfile", "toml", "walkdir", - "wasm-gc-api", + "wasm-opt", ] [[package]] @@ -10864,7 +10843,7 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "libc", "redox_syscall", @@ -11262,7 +11241,7 @@ version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "pin-project-lite 0.2.7", "tracing-attributes", "tracing-core", @@ -11412,7 +11391,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" dependencies = [ "async-trait", - "cfg-if 1.0.0", + "cfg-if", "data-encoding", "enum-as-inner", "futures-channel", @@ -11435,7 +11414,7 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "futures-util", "ipconfig", "lazy_static", @@ -11527,7 +11506,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "digest 0.10.3", "rand 0.8.5", "static_assertions", @@ -11749,7 +11728,7 @@ version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "serde", "serde_json", "wasm-bindgen-macro", @@ -11776,7 +11755,7 @@ version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -11812,23 +11791,53 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] -name = "wasm-gc-api" -version = "0.1.11" +name = "wasm-instrument" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9" +checksum = "aa1dafb3e60065305741e83db35c6c2584bb3725b692b5b66148a38d72ace6cd" dependencies = [ - "log", - "parity-wasm 0.32.0", - "rustc-demangle", + "parity-wasm", ] [[package]] -name = "wasm-instrument" -version = "0.3.0" +name = "wasm-opt" +version = "0.110.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa1dafb3e60065305741e83db35c6c2584bb3725b692b5b66148a38d72ace6cd" +checksum = "b68e8037b4daf711393f4be2056246d12d975651b14d581520ad5d1f19219cec" dependencies = [ - "parity-wasm 0.45.0", + "anyhow", + "libc", + "strum", + "strum_macros", + "tempfile", + "thiserror", + "wasm-opt-cxx-sys", + "wasm-opt-sys", +] + +[[package]] +name = "wasm-opt-cxx-sys" +version = "0.110.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91adbad477e97bba3fbd21dd7bfb594e7ad5ceb9169ab1c93ab9cb0ada636b6f" +dependencies = [ + "anyhow", + "cxx", + "cxx-build", + "wasm-opt-sys", +] + +[[package]] +name = "wasm-opt-sys" +version = "0.110.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec4fa5a322a4e6ac22fd141f498d56afbdbf9df5debeac32380d2dcaa3e06941" +dependencies = [ + "anyhow", + "cc", + "cxx", + "cxx-build", + "regex", ] [[package]] @@ -11852,7 +11861,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc13b3c219ca9aafeec59150d80d89851df02e0061bc357b4d66fc55a8d38787" dependencies = [ - "parity-wasm 0.45.0", + "parity-wasm", "wasmi-validation", "wasmi_core", ] @@ -11863,7 +11872,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" dependencies = [ - "parity-wasm 0.45.0", + "parity-wasm", ] [[package]] @@ -11875,7 +11884,7 @@ dependencies = [ "downcast-rs", "libm", "memory_units", - "num-rational 0.4.1", + "num-rational", "num-traits", ] @@ -11896,7 +11905,7 @@ checksum = "8a10dc9784d8c3a33c970e3939180424955f08af2e7f20368ec02685a0e8f065" dependencies = [ "anyhow", "bincode", - "cfg-if 1.0.0", + "cfg-if", "indexmap", "libc", "log", @@ -11922,7 +11931,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee4dbdc6daf68528cad1275ac91e3f51848ce9824385facc94c759f529decdf8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -11994,7 +12003,7 @@ dependencies = [ "addr2line", "anyhow", "bincode", - "cfg-if 1.0.0", + "cfg-if", "cpp_demangle", "gimli", "log", @@ -12029,7 +12038,7 @@ checksum = "ae79e0515160bd5abee5df50a16c4eb8db9f71b530fc988ae1d9ce34dcb8dd01" dependencies = [ "anyhow", "cc", - "cfg-if 1.0.0", + "cfg-if", "indexmap", "libc", "log", @@ -12742,10 +12751,6 @@ version = "4.0.0-dev" name = "pallet-example-offchain-worker" version = "4.0.0-dev" -[[patch.unused]] -name = "pallet-example-parallel" -version = "3.0.0-dev" - [[patch.unused]] name = "pallet-lottery" version = "4.0.0-dev" @@ -12758,6 +12763,10 @@ version = "4.0.0-dev" name = "pallet-node-authorization" version = "4.0.0-dev" +[[patch.unused]] +name = "pallet-nomination-pools-fuzzer" +version = "2.0.0" + [[patch.unused]] name = "pallet-nomination-pools-test-staking" version = "1.0.0" @@ -12772,7 +12781,11 @@ version = "4.0.0-dev" [[patch.unused]] name = "pallet-root-offences" -version = "1.0.0" +version = "1.0.0-dev" + +[[patch.unused]] +name = "pallet-root-testing" +version = "1.0.0-dev" [[patch.unused]] name = "pallet-scored-pool" diff --git a/runtime/parachains/Cargo.toml b/runtime/parachains/Cargo.toml index f06842e296ee..e0685f98a8b8 100644 --- a/runtime/parachains/Cargo.toml +++ b/runtime/parachains/Cargo.toml @@ -58,7 +58,7 @@ sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master thousands = "0.2.0" assert_matches = "1" serde_json = "1.0.85" -#pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = ["std"] diff --git a/runtime/parachains/src/inclusion/benchmarking.rs b/runtime/parachains/src/inclusion/benchmarking.rs index 7aeb2f9d7b72..e49b04254ec1 100644 --- a/runtime/parachains/src/inclusion/benchmarking.rs +++ b/runtime/parachains/src/inclusion/benchmarking.rs @@ -15,21 +15,17 @@ // along with Polkadot. If not, see . use super::*; -use frame_benchmarking::{benchmarks, BenchmarkError, BenchmarkResult}; -use frame_system::RawOrigin; -use sp_runtime::traits::One; +use frame_benchmarking::benchmarks; benchmarks! { receive_upward_messages { - receive_upward_messages(config, para, vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND]; 1]) + let i in 1 .. 1000; let config = configuration::ActiveConfig::::get(); - let para = 42; // not especially important. - - let i in 1..1000; - - let upward_messages = vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND]; i]; - }: receive_upward_messages(config, para, upward_messages) + let para = 42u32.into(); // not especially important. + let upward_messages = vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND as usize]; i as usize]; + Pallet::::receive_upward_messages(&config, para, vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND as usize]; 1]); + }: { Pallet::::receive_upward_messages(&config, para, upward_messages) } impl_benchmark_test_suite!( Pallet, diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 4e9e2a7b63ac..dd58ae44b853 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -230,6 +230,7 @@ pub mod pallet { + hrmp::Config + configuration::Config { + type WeightInfo: WeightInfo; type RuntimeEvent: From> + IsType<::RuntimeEvent>; type DisputesHandler: disputes::DisputesHandler; type RewardValidators: RewardValidators; @@ -391,9 +392,7 @@ impl Pallet { } /// Block finalization logic, called by initializer. - pub(crate) fn initializer_finalize() { - Self::publish_ump_status(); - } + pub(crate) fn initializer_finalize() {} /// Handle an incoming session change. pub(crate) fn initializer_on_new_session( @@ -937,17 +936,24 @@ impl Pallet { if !upward_messages.is_empty() { let count = upward_messages.len() as u32; Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); - let messages = upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); + let messages = + upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); T::MessageQueue::enqueue_messages(messages, para); } + // TODO: This should be done by the message queue itself (as per a config item mapping + // origin to an optional well-known key and maximum size/items) after enqueuing and# + // servicing. This ensures that the WKKs are updated after both enqueuing and servicing + // unlike in here where it's only after enqueuing. + Self::publish_ump_status(config, para); + // TODO: Calculate worst-case enqueue (largest possible message with the most recent page // being almost full) and return. Weight::zero() } /// Places the current status of UMP queues into the well-known-keys for other chains to see. - fn publish_ump_status() { + fn publish_ump_status(config: &HostConfiguration, para: ParaId) { let Footprint { count, size } = T::MessageQueue::footprint(para); // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` #[allow(deprecated)] diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index ff3bf59b1327..c219357179e1 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -299,6 +299,15 @@ impl pallet_message_queue::WeightInfo for TestWeightInfo { fn ready_ring_unknit() -> Weight { Weight::zero() } + fn reap_page() -> Weight { + Weight::zero() + } + fn execute_overweight() -> Weight { + Weight::zero() + } + fn process_message_payload(_: u32) -> Weight { + Weight::zero() + } } impl pallet_message_queue::Config for Test { @@ -312,6 +321,7 @@ impl pallet_message_queue::Config for Test { } impl crate::inclusion::Config for Test { + type WeightInfo = (); type RuntimeEvent = RuntimeEvent; type DisputesHandler = Disputes; type RewardValidators = TestRewardValidators; From 99b4a5f71cbebd617bdaef2db1ba3c0273f03a2a Mon Sep 17 00:00:00 2001 From: Gav Date: Tue, 15 Nov 2022 19:19:27 +0100 Subject: [PATCH 011/182] Mock example of using the QueueChangeHandler to update the WKK --- Cargo.lock | 236 +++--------------------- runtime/parachains/src/inclusion/mod.rs | 51 +++-- runtime/parachains/src/mock.rs | 1 + 3 files changed, 50 insertions(+), 238 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 59a5e081603f..617b1b84a4ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -426,7 +426,6 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "array-bytes", "async-trait", @@ -463,7 +462,6 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -483,7 +481,6 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "beefy-primitives", "sp-api", @@ -493,7 +490,6 @@ dependencies = [ [[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", @@ -977,9 +973,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" +checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" [[package]] name = "constant_time_eq" @@ -1305,9 +1301,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.81" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97abf9f0eca9e52b7f81b945524e76710e6cb2366aead23b7d4fbf72e281f888" +checksum = "6b7d4e43b25d3c994662706a1d4fcfc32aaa6afd287502c111b237093bb23f3a" dependencies = [ "cc", "cxxbridge-flags", @@ -1317,9 +1313,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.81" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc32cc5fea1d894b77d269ddb9f192110069a8a9c1f1d441195fba90553dea3" +checksum = "84f8829ddc213e2c1368e51a2564c552b65a8cb6a28f31e576270ac81d5e5827" dependencies = [ "cc", "codespan-reporting", @@ -1332,15 +1328,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.81" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca220e4794c934dc6b1207c3b42856ad4c302f2df1712e9f8d2eec5afaacf1f" +checksum = "e72537424b474af1460806647c41d4b6d35d09ef7fe031c5c2fa5766047cc56a" [[package]] name = "cxxbridge-macro" -version = "1.0.81" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b846f081361125bfc8dc9d3940c84e1fd83ba54bbca7b17cd29483c828be0704" +checksum = "309e4fb93eed90e1e14bea0da16b209f81813ba9fc7830c20ed151dd7bc0a4d7" dependencies = [ "proc-macro2", "quote", @@ -2013,7 +2009,6 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "parity-scale-codec", ] @@ -2037,7 +2032,6 @@ checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support", "frame-system", @@ -2060,7 +2054,6 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "Inflector", "array-bytes", @@ -2112,7 +2105,6 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2123,7 +2115,6 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2139,7 +2130,6 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support", "frame-system", @@ -2168,7 +2158,6 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "bitflags", "frame-metadata", @@ -2200,7 +2189,6 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "Inflector", "cfg-expr", @@ -2214,7 +2202,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2226,7 +2213,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "proc-macro2", "quote", @@ -2236,7 +2222,6 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2259,7 +2244,6 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support", "frame-system", @@ -2270,7 +2254,6 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support", "log", @@ -2288,7 +2271,6 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -2303,7 +2285,6 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "parity-scale-codec", "sp-api", @@ -2312,7 +2293,6 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support", "parity-scale-codec", @@ -2483,7 +2463,6 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "chrono", "frame-election-provider-support", @@ -4611,7 +4590,6 @@ checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -4625,7 +4603,6 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support", "frame-system", @@ -4641,7 +4618,6 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support", "frame-system", @@ -4656,7 +4632,6 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -4680,7 +4655,6 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4700,7 +4674,6 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-election-provider-support", "frame-support", @@ -4719,7 +4692,6 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -4734,7 +4706,6 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "beefy-primitives", "frame-support", @@ -4750,7 +4721,6 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "array-bytes", "beefy-merkle-tree", @@ -4773,7 +4743,6 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -4791,7 +4760,6 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -4810,7 +4778,6 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -4827,7 +4794,6 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "assert_matches", "frame-benchmarking", @@ -4844,7 +4810,6 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -4862,7 +4827,6 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4886,7 +4850,6 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4899,7 +4862,6 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -4917,7 +4879,6 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4935,7 +4896,6 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -4950,7 +4910,6 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -4973,7 +4932,6 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4989,7 +4947,6 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5009,7 +4966,6 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5026,7 +4982,6 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5061,7 +5016,6 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5079,7 +5033,6 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "anyhow", "jsonrpsee", @@ -5095,7 +5048,6 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5111,7 +5063,6 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support", "frame-system", @@ -5128,7 +5079,6 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5148,7 +5098,6 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "parity-scale-codec", "sp-api", @@ -5158,7 +5107,6 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support", "frame-system", @@ -5175,7 +5123,6 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5198,7 +5145,6 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5215,7 +5161,6 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5230,7 +5175,6 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5248,7 +5192,6 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5263,7 +5206,6 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5281,7 +5223,6 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5298,7 +5239,6 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support", "frame-system", @@ -5319,7 +5259,6 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5335,7 +5274,6 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support", "frame-system", @@ -5349,7 +5287,6 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5372,7 +5309,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5383,7 +5319,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "log", "sp-arithmetic", @@ -5392,7 +5327,6 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5409,7 +5343,6 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support", "frame-system", @@ -5423,7 +5356,6 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5441,7 +5373,6 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5460,7 +5391,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-support", "frame-system", @@ -5476,7 +5406,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5492,7 +5421,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5504,7 +5432,6 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5521,7 +5448,6 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5537,7 +5463,6 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -5552,7 +5477,6 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-benchmarking", "frame-support", @@ -8027,7 +7951,6 @@ dependencies = [ [[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", @@ -8367,7 +8290,6 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "log", "sp-core", @@ -8378,7 +8300,6 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "futures", @@ -8405,7 +8326,6 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "futures", "futures-timer", @@ -8428,7 +8348,6 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8444,7 +8363,6 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "impl-trait-for-tuples", "memmap2", @@ -8461,7 +8379,6 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8472,7 +8389,6 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "array-bytes", "chrono", @@ -8512,7 +8428,6 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "fnv", "futures", @@ -8540,7 +8455,6 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "hash-db", "kvdb", @@ -8565,7 +8479,6 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "futures", @@ -8589,7 +8502,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "fork-tree", @@ -8630,7 +8542,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "futures", "jsonrpsee", @@ -8652,7 +8563,6 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8665,7 +8575,6 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "futures", @@ -8689,7 +8598,6 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "lazy_static", "lru", @@ -8715,7 +8623,6 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "environmental", "parity-scale-codec", @@ -8731,7 +8638,6 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "log", "parity-scale-codec", @@ -8746,7 +8652,6 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "cfg-if", "libc", @@ -8766,7 +8671,6 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "ahash", "array-bytes", @@ -8807,7 +8711,6 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "finality-grandpa", "futures", @@ -8828,7 +8731,6 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "ansi_term", "futures", @@ -8845,7 +8747,6 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "array-bytes", "async-trait", @@ -8860,7 +8761,6 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "array-bytes", "async-trait", @@ -8907,7 +8807,6 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "cid", "futures", @@ -8927,7 +8826,6 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "bitflags", @@ -8953,7 +8851,6 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "ahash", "futures", @@ -8971,7 +8868,6 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "array-bytes", "futures", @@ -8992,7 +8888,6 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "array-bytes", "fork-tree", @@ -9022,7 +8917,6 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "array-bytes", "futures", @@ -9041,7 +8935,6 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "array-bytes", "bytes", @@ -9071,7 +8964,6 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "futures", "libp2p", @@ -9084,7 +8976,6 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9093,7 +8984,6 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "futures", "hash-db", @@ -9123,7 +9013,6 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "futures", "jsonrpsee", @@ -9146,7 +9035,6 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "futures", "jsonrpsee", @@ -9159,7 +9047,6 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "futures", "hex", @@ -9178,7 +9065,6 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "directories", @@ -9249,7 +9135,6 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "log", "parity-scale-codec", @@ -9263,7 +9148,6 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9282,7 +9166,6 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "futures", "libc", @@ -9301,7 +9184,6 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "chrono", "futures", @@ -9319,7 +9201,6 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "ansi_term", "atty", @@ -9350,7 +9231,6 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9361,7 +9241,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "futures", @@ -9388,7 +9267,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "futures", @@ -9402,7 +9280,6 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "futures", "futures-timer", @@ -9883,7 +9760,6 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "hash-db", "log", @@ -9901,7 +9777,6 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "blake2", "proc-macro-crate", @@ -9912,8 +9787,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "6.0.0" dependencies = [ "parity-scale-codec", "scale-info", @@ -9925,8 +9799,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "5.0.0" dependencies = [ "integer-sqrt", "num-traits", @@ -9941,7 +9814,6 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "parity-scale-codec", "scale-info", @@ -9954,7 +9826,6 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "parity-scale-codec", @@ -9966,7 +9837,6 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "parity-scale-codec", "sp-api", @@ -9978,7 +9848,6 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "futures", "log", @@ -9996,7 +9865,6 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "futures", @@ -10015,7 +9883,6 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "merlin", @@ -10038,7 +9905,6 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "parity-scale-codec", "scale-info", @@ -10052,7 +9918,6 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "parity-scale-codec", "scale-info", @@ -10064,8 +9929,7 @@ dependencies = [ [[package]] name = "sp-core" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "6.0.0" dependencies = [ "array-bytes", "base58", @@ -10109,8 +9973,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "4.0.0" dependencies = [ "blake2", "byteorder", @@ -10124,7 +9987,6 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "proc-macro2", "quote", @@ -10135,7 +9997,6 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10143,8 +10004,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "4.0.0" dependencies = [ "proc-macro2", "quote", @@ -10153,8 +10013,7 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "0.12.0" dependencies = [ "environmental", "parity-scale-codec", @@ -10165,7 +10024,6 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "finality-grandpa", "log", @@ -10183,7 +10041,6 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10196,8 +10053,7 @@ dependencies = [ [[package]] name = "sp-io" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "6.0.0" dependencies = [ "bytes", "futures", @@ -10223,7 +10079,6 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "lazy_static", "sp-core", @@ -10233,8 +10088,7 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "0.12.0" dependencies = [ "async-trait", "futures", @@ -10251,7 +10105,6 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "thiserror", "zstd", @@ -10260,7 +10113,6 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "log", "parity-scale-codec", @@ -10277,7 +10129,6 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "parity-scale-codec", "scale-info", @@ -10291,7 +10142,6 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "sp-api", "sp-core", @@ -10300,8 +10150,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "4.0.0" dependencies = [ "backtrace", "lazy_static", @@ -10311,7 +10160,6 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "rustc-hash", "serde", @@ -10320,8 +10168,7 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "6.0.0" dependencies = [ "either", "hash256-std-hasher", @@ -10343,8 +10190,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "6.0.0" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10361,8 +10207,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "5.0.0" dependencies = [ "Inflector", "proc-macro-crate", @@ -10374,7 +10219,6 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "log", "parity-scale-codec", @@ -10388,7 +10232,6 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "parity-scale-codec", "scale-info", @@ -10402,7 +10245,6 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "parity-scale-codec", "scale-info", @@ -10412,8 +10254,7 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "0.12.0" dependencies = [ "hash-db", "log", @@ -10434,13 +10275,11 @@ dependencies = [ [[package]] name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "4.0.0" [[package]] name = "sp-storage" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "6.0.0" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10453,7 +10292,6 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "futures-timer", @@ -10468,8 +10306,7 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "5.0.0" dependencies = [ "parity-scale-codec", "sp-std", @@ -10481,7 +10318,6 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "sp-api", "sp-runtime", @@ -10490,7 +10326,6 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "log", @@ -10505,8 +10340,7 @@ dependencies = [ [[package]] name = "sp-trie" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "6.0.0" dependencies = [ "ahash", "hash-db", @@ -10529,7 +10363,6 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10546,7 +10379,6 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10556,8 +10388,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" +version = "6.0.0" dependencies = [ "impl-trait-for-tuples", "log", @@ -10570,7 +10401,6 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10785,7 +10615,6 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "platforms", ] @@ -10793,7 +10622,6 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -10814,7 +10642,6 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "futures-util", "hyper", @@ -10827,7 +10654,6 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "async-trait", "jsonrpsee", @@ -10840,7 +10666,6 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "jsonrpsee", "log", @@ -10861,7 +10686,6 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "array-bytes", "async-trait", @@ -10887,7 +10711,6 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "futures", "substrate-test-utils-derive", @@ -10897,7 +10720,6 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10908,7 +10730,6 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "ansi_term", "build-helper", @@ -11615,7 +11436,6 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#108d8eed88e71b5bb676a23fe983174fabf43c35" dependencies = [ "clap", "frame-try-runtime", diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index dd58ae44b853..32851a54d5b3 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -28,11 +28,8 @@ use crate::{ shared, }; use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec}; -use frame_support::{ - pallet_prelude::*, - traits::{EnqueueMessage, Footprint}, - BoundedSlice, -}; +use frame_support::{pallet_prelude::*, traits::EnqueueMessage, BoundedSlice}; +use pallet_message_queue::OnQueueChanged; use parity_scale_codec::{Decode, Encode}; use primitives::v2::{ well_known_keys, AvailabilityBitfield, BackedCandidate, CandidateCommitments, @@ -929,7 +926,7 @@ impl Pallet { /// Enqueues `upward_messages` from a `para`'s accepted candidate block. pub(crate) fn receive_upward_messages( - config: &HostConfiguration, + _config: &HostConfiguration, para: ParaId, upward_messages: Vec, ) -> Weight { @@ -939,31 +936,10 @@ impl Pallet { let messages = upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); T::MessageQueue::enqueue_messages(messages, para); + ::WeightInfo::receive_upward_messages(count) + } else { + Weight::zero() } - - // TODO: This should be done by the message queue itself (as per a config item mapping - // origin to an optional well-known key and maximum size/items) after enqueuing and# - // servicing. This ensures that the WKKs are updated after both enqueuing and servicing - // unlike in here where it's only after enqueuing. - Self::publish_ump_status(config, para); - - // TODO: Calculate worst-case enqueue (largest possible message with the most recent page - // being almost full) and return. - Weight::zero() - } - - /// Places the current status of UMP queues into the well-known-keys for other chains to see. - fn publish_ump_status(config: &HostConfiguration, para: ParaId) { - let Footprint { count, size } = T::MessageQueue::footprint(para); - // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` - #[allow(deprecated)] - let key = well_known_keys::relay_dispatch_queue_size(para); - (count, size).using_encoded(|d| sp_io::storage::set(&key, d)); - - let key = well_known_keys::relay_dispatch_queue_remaining_capacity(para); - let remaining_count = config.max_upward_queue_count.saturating_sub(count); - let remaining_size = config.max_upward_queue_size.saturating_sub(size); - (remaining_count, remaining_size).using_encoded(|d| sp_io::storage::set(&key, d)); } /// Cleans up all paras pending availability that the predicate returns true for. @@ -1096,6 +1072,21 @@ impl AcceptanceCheckErr { } } +impl OnQueueChanged for Pallet { + fn on_queue_changed(para: ParaId, count: u32, size: u32) { + // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` + #[allow(deprecated)] + let key = well_known_keys::relay_dispatch_queue_size(para); + (count, size).using_encoded(|d| sp_io::storage::set(&key, d)); + + let config = >::config(); + let key = well_known_keys::relay_dispatch_queue_remaining_capacity(para); + let remaining_count = config.max_upward_queue_count.saturating_sub(count); + let remaining_size = config.max_upward_queue_size.saturating_sub(size); + (remaining_count, remaining_size).using_encoded(|d| sp_io::storage::set(&key, d)); + } +} + /// A collection of data required for checking a candidate. pub(crate) struct CandidateCheckContext { config: configuration::HostConfiguration, diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index c219357179e1..888690278491 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -315,6 +315,7 @@ impl pallet_message_queue::Config for Test { type WeightInfo = TestWeightInfo; type MessageProcessor = TestProcessMessage; type Size = u32; + type QueueChangeHandler = ParaInclusion; type HeapSize = ConstU32<65536>; type MaxStale = ConstU32<8>; type ServiceWeight = (); From bba31cad2a85d61b5fe1ffcbd836f6bdbcd4ff9c Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Mon, 9 Jan 2023 20:30:02 +0100 Subject: [PATCH 012/182] Use master Cargo.lock Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 2757 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 1826 insertions(+), 931 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 617b1b84a4ab..6c5420adb46c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,16 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" dependencies = [ - "gimli", + "gimli 0.26.1", +] + +[[package]] +name = "addr2line" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +dependencies = [ + "gimli 0.27.0", ] [[package]] @@ -27,6 +36,15 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aead" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" +dependencies = [ + "generic-array 0.14.4", +] + [[package]] name = "aead" version = "0.4.3" @@ -34,6 +52,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ "generic-array 0.14.4", + "rand_core 0.6.3", +] + +[[package]] +name = "aes" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" +dependencies = [ + "aes-soft", + "aesni", + "cipher 0.2.5", ] [[package]] @@ -43,25 +73,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ "cfg-if", - "cipher", + "cipher 0.3.0", "cpufeatures", "opaque-debug 0.3.0", ] +[[package]] +name = "aes-gcm" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da" +dependencies = [ + "aead 0.3.2", + "aes 0.6.0", + "cipher 0.2.5", + "ctr 0.6.0", + "ghash 0.3.1", + "subtle", +] + [[package]] name = "aes-gcm" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", + "aead 0.4.3", + "aes 0.7.5", + "cipher 0.3.0", + "ctr 0.8.0", + "ghash 0.4.4", "subtle", ] +[[package]] +name = "aes-soft" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" +dependencies = [ + "cipher 0.2.5", + "opaque-debug 0.3.0", +] + +[[package]] +name = "aesni" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" +dependencies = [ + "cipher 0.2.5", + "opaque-debug 0.3.0", +] + [[package]] name = "ahash" version = "0.7.6" @@ -118,6 +182,12 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "510c76ecefdceada737ea728f4f9a84bd2e1ef29f1ba555e560940fe279954de" +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + [[package]] name = "array-bytes" version = "4.1.0" @@ -142,6 +212,73 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +[[package]] +name = "asn1-rs" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ff05a702273012438132f449575dbc804e27b2f3cbe3069aa237d26c98fa33" +dependencies = [ + "asn1-rs-derive 0.1.0", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time 0.3.17", +] + +[[package]] +name = "asn1-rs" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf6690c370453db30743b373a60ba498fc0d6d83b11f4abfd87a84a075db5dd4" +dependencies = [ + "asn1-rs-derive 0.4.0", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time 0.3.17", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "asn1_der" version = "0.7.5" @@ -284,7 +421,6 @@ dependencies = [ "async-global-executor", "async-io", "async-lock", - "async-process", "crossbeam-utils", "futures-channel", "futures-core", @@ -301,21 +437,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" @@ -324,9 +445,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", @@ -335,9 +456,9 @@ dependencies = [ [[package]] name = "asynchronous-codec" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690" +checksum = "06a0daa378f5fd10634e44b0a29b2a87b890657658e072a30d6f26e57ddee182" dependencies = [ "bytes", "futures-sink", @@ -365,22 +486,22 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.64" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "addr2line", + "addr2line 0.19.0", "cc", "cfg-if", "libc", - "miniz_oxide", - "object 0.27.1", + "miniz_oxide 0.6.2", + "object 0.30.0", "rustc-demangle", ] @@ -426,20 +547,17 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" 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", @@ -448,6 +566,7 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-arithmetic", + "sp-beefy", "sp-blockchain", "sp-consensus", "sp-core", @@ -462,17 +581,17 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" 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", @@ -481,26 +600,11 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ - "beefy-primitives", - "sp-api", - "sp-runtime", -] - -[[package]] -name = "beefy-primitives" -version = "4.0.0-dev" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-mmr-primitives", + "sp-beefy", "sp-runtime", - "sp-std", ] [[package]] @@ -600,7 +704,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding", + "block-padding 0.1.5", "byte-tools", "byteorder", "generic-array 0.12.4", @@ -624,6 +728,16 @@ dependencies = [ "generic-array 0.14.4", ] +[[package]] +name = "block-modes" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" +dependencies = [ + "block-padding 0.2.1", + "cipher 0.2.5", +] + [[package]] name = "block-padding" version = "0.1.5" @@ -633,6 +747,12 @@ dependencies = [ "byte-tools", ] +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + [[package]] name = "blocking" version = "1.1.0" @@ -769,6 +889,17 @@ dependencies = [ "jobserver", ] +[[package]] +name = "ccm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" +dependencies = [ + "aead 0.3.2", + "cipher 0.2.5", + "subtle", +] + [[package]] name = "cexpr" version = "0.6.0" @@ -806,7 +937,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" dependencies = [ "cfg-if", - "cipher", + "cipher 0.3.0", "cpufeatures", "zeroize", ] @@ -817,9 +948,9 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" dependencies = [ - "aead", + "aead 0.4.3", "chacha20", - "cipher", + "cipher 0.3.0", "poly1305", "zeroize", ] @@ -833,7 +964,7 @@ dependencies = [ "libc", "num-integer", "num-traits", - "time", + "time 0.1.44", "winapi", ] @@ -850,6 +981,15 @@ dependencies = [ "unsigned-varint", ] +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array 0.14.4", +] + [[package]] name = "cipher" version = "0.3.0" @@ -1023,6 +1163,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" @@ -1032,6 +1182,12 @@ dependencies = [ "libc", ] +[[package]] +name = "cpuid-bool" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" + [[package]] name = "cranelift-bforest" version = "0.88.0" @@ -1054,7 +1210,7 @@ dependencies = [ "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.26.1", "log", "regalloc2", "smallvec", @@ -1130,6 +1286,21 @@ dependencies = [ "wasmtime-types", ] +[[package]] +name = "crc" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff" + [[package]] name = "crc32fast" version = "1.3.0" @@ -1231,6 +1402,16 @@ dependencies = [ "subtle", ] +[[package]] +name = "crypto-mac" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" +dependencies = [ + "generic-array 0.14.4", + "subtle", +] + [[package]] name = "crypto-mac" version = "0.11.1" @@ -1251,13 +1432,22 @@ dependencies = [ "syn", ] +[[package]] +name = "ctr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" +dependencies = [ + "cipher 0.2.5", +] + [[package]] name = "ctr" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" dependencies = [ - "cipher", + "cipher 0.3.0", ] [[package]] @@ -1343,6 +1533,41 @@ dependencies = [ "syn", ] +[[package]] +name = "darling" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" +dependencies = [ + "darling_core", + "quote", + "syn", +] + [[package]] name = "data-encoding" version = "2.3.2" @@ -1375,7 +1600,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f91cf5a8c2f2097e2a32627123508635d47ce10563d999ec1a95addf08b502ba" dependencies = [ - "uuid", + "uuid 0.8.2", ] [[package]] @@ -1385,9 +1610,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" dependencies = [ "const-oid", + "pem-rfc7468", "zeroize", ] +[[package]] +name = "der-parser" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" +dependencies = [ + "asn1-rs 0.3.1", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "der-parser" +version = "8.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d4bc9b0db0a0df9ae64634ac5bdefb7afcb534e182275ca0beadbe486701c1" +dependencies = [ + "asn1-rs 0.5.1", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + [[package]] name = "derivative" version = "2.2.0" @@ -1400,24 +1654,55 @@ dependencies = [ ] [[package]] -name = "derive_more" -version = "0.99.17" +name = "derive_builder" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" dependencies = [ - "convert_case", + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" +dependencies = [ + "darling", "proc-macro2", "quote", - "rustc_version", "syn", ] [[package]] -name = "diff" -version = "0.1.12" +name = "derive_builder_macro" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499" - +checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" +dependencies = [ + "derive_builder_core", + "syn", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn", +] + +[[package]] +name = "diff" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499" + [[package]] name = "difflib" version = "0.4.0" @@ -1494,6 +1779,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "displaydoc" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "dissimilar" version = "1.0.3" @@ -1509,16 +1805,6 @@ dependencies = [ "libc", ] -[[package]] -name = "dns-parser" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" -dependencies = [ - "byteorder", - "quick-error 1.2.3", -] - [[package]] name = "doc-comment" version = "0.3.3" @@ -1584,9 +1870,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", ] @@ -1638,6 +1924,9 @@ dependencies = [ "ff", "generic-array 0.14.4", "group", + "hkdf", + "pem-rfc7468", + "pkcs8", "rand_core 0.6.3", "sec1", "subtle", @@ -1973,7 +2262,7 @@ dependencies = [ "crc32fast", "libc", "libz-sys", - "miniz_oxide", + "miniz_oxide 0.4.4", ] [[package]] @@ -2009,6 +2298,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "parity-scale-codec", ] @@ -2032,6 +2322,7 @@ checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support", "frame-system", @@ -2054,6 +2345,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "Inflector", "array-bytes", @@ -2065,16 +2357,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", @@ -2084,7 +2373,6 @@ dependencies = [ "sc-sysinfo", "serde", "serde_json", - "serde_nanos", "sp-api", "sp-blockchain", "sp-core", @@ -2097,7 +2385,6 @@ dependencies = [ "sp-std", "sp-storage", "sp-trie", - "tempfile", "thiserror", "thousands", ] @@ -2105,6 +2392,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2115,6 +2403,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2122,6 +2411,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", + "sp-core", "sp-npos-elections", "sp-runtime", "sp-std", @@ -2130,6 +2420,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support", "frame-system", @@ -2155,9 +2446,26 @@ dependencies = [ "serde", ] +[[package]] +name = "frame-remote-externalities" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +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#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "bitflags", "frame-metadata", @@ -2189,6 +2497,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "Inflector", "cfg-expr", @@ -2202,6 +2511,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2213,6 +2523,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "proc-macro2", "quote", @@ -2222,6 +2533,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2244,6 +2556,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support", "frame-system", @@ -2254,6 +2567,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support", "log", @@ -2271,6 +2585,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -2285,6 +2600,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "parity-scale-codec", "sp-api", @@ -2293,6 +2609,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support", "parity-scale-codec", @@ -2331,9 +2648,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" dependencies = [ "futures-channel", "futures-core", @@ -2346,9 +2663,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.23" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bfc52cbddcfd745bf1740338492bb0bd83d76c67b445f91c5fb29fae29ecaa1" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" dependencies = [ "futures-core", "futures-sink", @@ -2356,15 +2673,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.23" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2acedae88d38235936c3922476b10fced7b2b68136f5e3c03c2d5be348a1115" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" [[package]] name = "futures-executor" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" dependencies = [ "futures-core", "futures-task", @@ -2374,9 +2691,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.23" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93a66fc6d035a26a3ae255a6d2bca35eda63ae4c5512bef54449113f7a1228e5" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" [[package]] name = "futures-lite" @@ -2395,9 +2712,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.23" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0db9cce532b0eae2ccf2766ab246f114b56b9cf6d445e00c2549fbc100ca045d" +checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" dependencies = [ "proc-macro2", "quote", @@ -2406,26 +2723,26 @@ dependencies = [ [[package]] name = "futures-rustls" -version = "0.22.1" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01fe9932a224b72b45336d96040aa86386d674a31d0af27d800ea7bc8ca97fe" +checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", - "rustls", - "webpki", + "rustls 0.20.7", + "webpki 0.22.0", ] [[package]] name = "futures-sink" -version = "0.3.23" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0bae1fe9752cf7fd9b0064c674ae63f97b37bc714d745cbde0afb7ec4e6765" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" [[package]] name = "futures-task" -version = "0.3.23" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842fc63b931f4056a24d59de13fb1272134ce261816e063e634ad0c15cdc5306" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" [[package]] name = "futures-timer" @@ -2435,9 +2752,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.23" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0828a5471e340229c11c77ca80017937ce3c58cb788a17e5f1c2d5c485a9577" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" dependencies = [ "futures-channel", "futures-core", @@ -2463,6 +2780,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "chrono", "frame-election-provider-support", @@ -2471,7 +2789,6 @@ dependencies = [ "git2", "num-format", "pallet-staking", - "sp-io", ] [[package]] @@ -2510,10 +2827,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]] @@ -2527,6 +2842,16 @@ dependencies = [ "wasi 0.10.0+wasi-snapshot-preview1", ] +[[package]] +name = "ghash" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" +dependencies = [ + "opaque-debug 0.3.0", + "polyval 0.4.5", +] + [[package]] name = "ghash" version = "0.4.4" @@ -2534,7 +2859,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" dependencies = [ "opaque-debug 0.3.0", - "polyval", + "polyval 0.5.3", ] [[package]] @@ -2548,6 +2873,12 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "git2" version = "0.14.2" @@ -2688,6 +3019,15 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +[[package]] +name = "hkdf" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +dependencies = [ + "hmac 0.12.1", +] + [[package]] name = "hmac" version = "0.8.1" @@ -2698,6 +3038,16 @@ dependencies = [ "digest 0.9.0", ] +[[package]] +name = "hmac" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" +dependencies = [ + "crypto-mac 0.10.1", + "digest 0.9.0", +] + [[package]] name = "hmac" version = "0.11.0" @@ -2764,15 +3114,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" @@ -2833,7 +3189,7 @@ dependencies = [ "http", "hyper", "log", - "rustls", + "rustls 0.20.7", "rustls-native-certs", "tokio", "tokio-rustls", @@ -2852,6 +3208,12 @@ dependencies = [ "tokio-native-tls", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.2.3" @@ -2875,9 +3237,9 @@ dependencies = [ [[package]] name = "if-watch" -version = "2.0.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065c008e570a43c00de6aed9714035e5ea6a498c255323db9091722af6ee67dd" +checksum = "ba7abdbb86e485125dad06c2691e1e393bf3b08c7b743b43aa162a00fd39062e" dependencies = [ "async-io", "core-foundation", @@ -2888,6 +3250,7 @@ dependencies = [ "log", "rtnetlink", "system-configuration", + "tokio", "windows", ] @@ -2961,6 +3324,25 @@ dependencies = [ "num-traits", ] +[[package]] +name = "interceptor" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b" +dependencies = [ + "async-trait", + "bytes", + "log", + "rand 0.8.5", + "rtcp", + "rtp", + "thiserror", + "tokio", + "waitgroup", + "webrtc-srtp", + "webrtc-util", +] + [[package]] name = "io-lifetimes" version = "0.7.2" @@ -2987,9 +3369,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.3.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" +checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" [[package]] name = "itertools" @@ -3026,24 +3408,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", @@ -3062,9 +3443,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", @@ -3075,10 +3456,8 @@ dependencies = [ "futures-timer", "futures-util", "globset", - "http", "hyper", "jsonrpsee-types", - "lazy_static", "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", @@ -3088,45 +3467,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", @@ -3138,9 +3520,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", @@ -3148,26 +3530,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" @@ -3188,13 +3550,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", @@ -3217,13 +3579,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", @@ -3253,7 +3615,6 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", - "remote-externalities", "rustc-hex", "scale-info", "separator", @@ -3264,6 +3625,7 @@ dependencies = [ "sp-api", "sp-arithmetic", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -3292,13 +3654,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]] @@ -3312,35 +3676,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", @@ -3349,9 +3709,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", ] @@ -3404,16 +3764,15 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" -version = "0.49.0" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec878fda12ebec479186b3914ebc48ff180fa4c51847e11a1a68bf65249e02c1" +checksum = "2e0a0d2f693675f49ded13c5d510c48b78069e23cbd9108d7ccd59f6dc568819" dependencies = [ "bytes", "futures", "futures-timer", "getrandom 0.2.3", "instant", - "lazy_static", "libp2p-core", "libp2p-dns", "libp2p-identify", @@ -3423,11 +3782,12 @@ dependencies = [ "libp2p-mplex", "libp2p-noise", "libp2p-ping", + "libp2p-quic", "libp2p-request-response", "libp2p-swarm", - "libp2p-swarm-derive", "libp2p-tcp", "libp2p-wasm-ext", + "libp2p-webrtc", "libp2p-websocket", "libp2p-yamux", "multiaddr", @@ -3438,9 +3798,9 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799676bb0807c788065e57551c6527d461ad572162b0519d1958946ff9e0539d" +checksum = "b6a8fcd392ff67af6cc3f03b1426c41f7f26b6b9aff2dc632c1c56dd649e571f" dependencies = [ "asn1_der", "bs58", @@ -3450,17 +3810,18 @@ dependencies = [ "futures", "futures-timer", "instant", - "lazy_static", "log", "multiaddr", "multihash", "multistream-select", + "once_cell", "parking_lot 0.12.1", "pin-project", "prost", "prost-build", "rand 0.8.5", "rw-stream-sink", + "sec1", "sha2 0.10.2", "smallvec", "thiserror", @@ -3471,11 +3832,10 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2322c9fb40d99101def6a01612ee30500c89abbbecb6297b3cd252903a4c1720" +checksum = "8e42a271c1b49f789b92f7fc87749fa79ce5c7bdc88cbdfacb818a4bca47fec5" dependencies = [ - "async-std-resolver", "futures", "libp2p-core", "log", @@ -3486,9 +3846,9 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.40.0" +version = "0.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf9a121f699e8719bda2e6e9e9b6ddafc6cff4602471d6481c1067930ccb29b" +checksum = "c052d0026f4817b44869bfb6810f4e1112f43aec8553f2cb38881c524b563abf" dependencies = [ "asynchronous-codec", "futures", @@ -3507,9 +3867,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.41.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6721c200e2021f6c3fab8b6cf0272ead8912d871610ee194ebd628cecf428f22" +checksum = "2766dcd2be8c87d5e1f35487deb22d765f49c6ae1251b3633efe3b25698bd3d2" dependencies = [ "arrayvec 0.7.2", "asynchronous-codec", @@ -3535,13 +3895,11 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "761704e727f7d68d58d7bc2231eafae5fc1b9814de24290f126df09d4bd37a15" +checksum = "04f378264aade9872d6ccd315c0accc18be3a35d15fc1b9c36e5b6f983b62b5b" dependencies = [ - "async-io", "data-encoding", - "dns-parser", "futures", "if-watch", "libp2p-core", @@ -3550,14 +3908,16 @@ dependencies = [ "rand 0.8.5", "smallvec", "socket2", + "tokio", + "trust-dns-proto", "void", ] [[package]] name = "libp2p-metrics" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee31b08e78b7b8bfd1c4204a9dd8a87b4fcdf6dafc57eb51701c1c264a81cb9" +checksum = "5ad8a64f29da86005c86a4d2728b8a0719e9b192f4092b609fd8790acb9dec55" dependencies = [ "libp2p-core", "libp2p-identify", @@ -3569,9 +3929,9 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692664acfd98652de739a8acbb0a0d670f1d67190a49be6b4395e22c37337d89" +checksum = "03805b44107aa013e7cbbfa5627b31c36cbedfdfb00603c0311998882bc4bace" dependencies = [ "asynchronous-codec", "bytes", @@ -3587,31 +3947,32 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.40.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048155686bd81fe6cb5efdef0c6290f25ad32a0a42e8f4f72625cf6a505a206f" +checksum = "a978cb57efe82e892ec6f348a536bfbd9fee677adbe5689d7a93ad3a9bffbf2e" dependencies = [ "bytes", "curve25519-dalek 3.2.0", "futures", - "lazy_static", "libp2p-core", "log", + "once_cell", "prost", "prost-build", "rand 0.8.5", "sha2 0.10.2", "snow", "static_assertions", - "x25519-dalek", + "thiserror", + "x25519-dalek 1.1.1", "zeroize", ] [[package]] name = "libp2p-ping" -version = "0.40.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7228b9318d34689521349a86eb39a3c3a802c9efc99a0568062ffb80913e3f91" +checksum = "929fcace45a112536e22b3dcfd4db538723ef9c3cb79f672b98be2cc8e25f37f" dependencies = [ "futures", "futures-timer", @@ -3623,11 +3984,32 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-quic" +version = "0.7.0-alpha" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" +dependencies = [ + "bytes", + "futures", + "futures-timer", + "if-watch", + "libp2p-core", + "libp2p-tls", + "log", + "parking_lot 0.12.1", + "quinn-proto", + "rand 0.8.5", + "rustls 0.20.7", + "thiserror", + "tokio", +] + [[package]] name = "libp2p-request-response" -version = "0.22.1" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8827af16a017b65311a410bb626205a9ad92ec0473967618425039fa5231adc1" +checksum = "3236168796727bfcf4927f766393415361e2c644b08bedb6a6b13d957c9a4884" dependencies = [ "async-trait", "bytes", @@ -3643,9 +4025,9 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.40.1" +version = "0.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46d13df7c37807965d82930c0e4b04a659efcb6cca237373b206043db5398ecf" +checksum = "b2a35472fe3276b3855c00f1c032ea8413615e030256429ad5349cdf67c6e1a0" dependencies = [ "either", "fnv", @@ -3653,19 +4035,21 @@ dependencies = [ "futures-timer", "instant", "libp2p-core", + "libp2p-swarm-derive", "log", "pin-project", "rand 0.8.5", "smallvec", "thiserror", + "tokio", "void", ] [[package]] name = "libp2p-swarm-derive" -version = "0.30.1" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0eddc4497a8b5a506013c40e8189864f9c3a00db2b25671f428ae9007f3ba32" +checksum = "9d527d5827582abd44a6d80c07ff8b50b4ee238a8979e05998474179e79dc400" dependencies = [ "heck", "quote", @@ -3674,11 +4058,10 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9839d96761491c6d3e238e70554b856956fca0ab60feb9de2cd08eed4473fa92" +checksum = "b4b257baf6df8f2df39678b86c578961d48cc8b68642a12f0f763f56c8e5858d" dependencies = [ - "async-io", "futures", "futures-timer", "if-watch", @@ -3686,13 +4069,32 @@ dependencies = [ "libp2p-core", "log", "socket2", + "tokio", +] + +[[package]] +name = "libp2p-tls" +version = "0.1.0-alpha" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7905ce0d040576634e8a3229a7587cc8beab83f79db6023800f1792895defa8" +dependencies = [ + "futures", + "futures-rustls", + "libp2p-core", + "rcgen 0.10.0", + "ring", + "rustls 0.20.7", + "thiserror", + "webpki 0.22.0", + "x509-parser 0.14.0", + "yasna", ] [[package]] name = "libp2p-wasm-ext" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b5b8e7a73e379e47b1b77f8a82c4721e97eca01abcd18e9cd91a23ca6ce97" +checksum = "1bb1a35299860e0d4b3c02a3e74e3b293ad35ae0cee8a056363b0c862d082069" dependencies = [ "futures", "js-sys", @@ -3702,11 +4104,42 @@ dependencies = [ "wasm-bindgen-futures", ] +[[package]] +name = "libp2p-webrtc" +version = "0.4.0-alpha" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" +dependencies = [ + "async-trait", + "asynchronous-codec", + "bytes", + "futures", + "futures-timer", + "hex", + "if-watch", + "libp2p-core", + "libp2p-noise", + "log", + "multihash", + "prost", + "prost-build", + "prost-codec", + "rand 0.8.5", + "rcgen 0.9.3", + "serde", + "stun", + "thiserror", + "tinytemplate", + "tokio", + "tokio-util 0.7.1", + "webrtc", +] + [[package]] name = "libp2p-websocket" -version = "0.39.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3758ae6f89b2531a24b6d9f5776bda6a626b60a57600d7185d43dfa75ca5ecc4" +checksum = "1d705506030d5c0aaf2882437c70dab437605f21c5f9811978f694e6917a3b54" dependencies = [ "either", "futures", @@ -3723,9 +4156,9 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30f079097a21ad017fc8139460630286f02488c8c13b26affb46623aa20d8845" +checksum = "4f63594a0aa818642d9d4915c791945053877253f08a3626f13416b5cd928a29" dependencies = [ "futures", "libp2p-core", @@ -3962,6 +4395,15 @@ dependencies = [ "rawpointer", ] +[[package]] +name = "md-5" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66b48670c893079d3c2ed79114e3644b7004df1c361a4e0ad52e2e6940d07c3d" +dependencies = [ + "digest 0.10.3", +] + [[package]] name = "memchr" version = "2.4.1" @@ -3997,22 +4439,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]] @@ -4066,27 +4498,60 @@ dependencies = [ "autocfg", ] +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", +] + [[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#934d42aefb51b797ee9ef41270bc041b1c1c6025" 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#934d42aefb51b797ee9ef41270bc041b1c1c6025" +dependencies = [ + "anyhow", + "jsonrpsee", + "parity-scale-codec", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-mmr-primitives", + "sp-runtime", ] [[package]] @@ -4118,14 +4583,14 @@ dependencies = [ [[package]] name = "multiaddr" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c580bfdd8803cce319b047d239559a22f809094aaea4ac13902a1fdcfcd4261" +checksum = "a4aebdb21e90f81d13ed01dc84123320838e53963c2ca94b60b305d3fa64f31e" dependencies = [ "arrayref", - "bs58", "byteorder", "data-encoding", + "multibase", "multihash", "percent-encoding", "serde", @@ -4184,9 +4649,9 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "multistream-select" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bc41247ec209813e2fd414d6e16b9d94297dacf3cd613fa6ef09cd4d9755c10" +checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" dependencies = [ "bytes", "futures", @@ -4317,11 +4782,11 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92b654097027250401127914afb37cb1f311df6610a9891ff07a757e94199027" dependencies = [ - "async-io", "bytes", "futures", "libc", "log", + "tokio", ] [[package]] @@ -4372,15 +4837,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" @@ -4455,30 +4911,48 @@ dependencies = [ [[package]] name = "object" -version = "0.27.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ + "crc32fast", + "hashbrown", + "indexmap", "memchr", ] [[package]] name = "object" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" dependencies = [ - "crc32fast", - "hashbrown", - "indexmap", "memchr", ] +[[package]] +name = "oid-registry" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a" +dependencies = [ + "asn1-rs 0.3.1", +] + +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs 0.5.1", +] + [[package]] name = "once_cell" -version = "1.12.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" +checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "opaque-debug" @@ -4527,9 +5001,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", @@ -4544,9 +5018,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", @@ -4587,15 +5061,39 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" +[[package]] +name = "p256" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" +dependencies = [ + "ecdsa", + "elliptic-curve", + "sha2 0.10.2", +] + +[[package]] +name = "p384" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" +dependencies = [ + "ecdsa", + "elliptic-curve", + "sha2 0.10.2", +] + [[package]] name = "pallet-assets" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "sp-core", "sp-runtime", "sp-std", ] @@ -4603,6 +5101,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support", "frame-system", @@ -4618,6 +5117,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support", "frame-system", @@ -4632,6 +5132,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -4655,6 +5156,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4674,14 +5176,15 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" 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", @@ -4692,6 +5195,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -4706,14 +5210,15 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ - "beefy-primitives", "frame-support", "frame-system", "pallet-session", "parity-scale-codec", "scale-info", "serde", + "sp-beefy", "sp-runtime", "sp-std", ] @@ -4721,10 +5226,10 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "array-bytes", "beefy-merkle-tree", - "beefy-primitives", "frame-support", "frame-system", "log", @@ -4734,6 +5239,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", + "sp-beefy", "sp-core", "sp-io", "sp-runtime", @@ -4743,6 +5249,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -4760,6 +5267,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -4778,6 +5286,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -4794,6 +5303,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "assert_matches", "frame-benchmarking", @@ -4810,6 +5320,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -4827,6 +5338,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4835,7 +5347,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", @@ -4843,13 +5355,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#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4862,6 +5374,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -4879,6 +5392,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4893,23 +5407,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-gilt" -version = "4.0.0-dev" -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#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -4932,6 +5433,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4947,6 +5449,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -4966,6 +5469,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -4982,6 +5486,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -4996,66 +5501,50 @@ dependencies = [ ] [[package]] -name = "pallet-message-queue" -version = "0.9.29" +name = "pallet-mmr" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", "sp-core", "sp-io", + "sp-mmr-primitives", "sp-runtime", "sp-std", - "sp-weights", ] [[package]] -name = "pallet-mmr" +name = "pallet-multisig" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ - "ckb-merkle-mountain-range", "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", - "sp-core", "sp-io", - "sp-mmr-primitives", "sp-runtime", "sp-std", ] [[package]] -name = "pallet-mmr-rpc" -version = "3.0.0" -dependencies = [ - "anyhow", - "jsonrpsee", - "parity-scale-codec", - "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-mmr-primitives", - "sp-runtime", -] - -[[package]] -name = "pallet-multisig" +name = "pallet-nis" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log", "parity-scale-codec", "scale-info", - "sp-io", + "sp-arithmetic", + "sp-core", "sp-runtime", "sp-std", ] @@ -5063,6 +5552,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support", "frame-system", @@ -5079,6 +5569,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5098,6 +5589,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "parity-scale-codec", "sp-api", @@ -5107,6 +5599,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support", "frame-system", @@ -5123,6 +5616,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5145,6 +5639,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -5161,6 +5656,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -5175,6 +5671,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -5192,6 +5689,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -5206,11 +5704,13 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "assert_matches", "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "serde", @@ -5223,6 +5723,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -5239,6 +5740,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support", "frame-system", @@ -5259,13 +5761,14 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" 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", @@ -5274,6 +5777,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support", "frame-system", @@ -5287,6 +5791,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5309,6 +5814,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5319,6 +5825,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "log", "sp-arithmetic", @@ -5327,6 +5834,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -5343,6 +5851,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support", "frame-system", @@ -5356,6 +5865,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -5373,6 +5883,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -5391,6 +5902,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-support", "frame-system", @@ -5406,6 +5918,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5421,6 +5934,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5432,6 +5946,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -5448,6 +5963,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -5463,6 +5979,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -5477,6 +5994,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "frame-benchmarking", "frame-support", @@ -5490,7 +6008,7 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "frame-system", @@ -5512,7 +6030,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-benchmarking", "frame-support", @@ -5587,35 +6105,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" @@ -5684,20 +6173,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]] @@ -5706,6 +6195,24 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" +[[package]] +name = "pem" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c64931a1a212348ec4f3b4362585eca7159d0d09cbdf4a7f74f02173596fd4" +dependencies = [ + "base64", +] + +[[package]] +name = "pem-rfc7468" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.1.0" @@ -5827,27 +6334,28 @@ 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", "futures", "log", + "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -5866,7 +6374,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "bitvec", @@ -5891,7 +6399,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "derive_more", @@ -5920,7 +6428,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "env_logger 0.9.0", @@ -5949,7 +6457,7 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.9.31" +version = "0.9.33" dependencies = [ "clap", "frame-benchmarking-cli", @@ -5962,12 +6470,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", @@ -5975,13 +6484,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", @@ -5997,6 +6507,7 @@ dependencies = [ "sc-service", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", @@ -6017,7 +6528,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "0.9.31" +version = "0.9.33" dependencies = [ "always-assert", "assert_matches", @@ -6046,10 +6557,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", @@ -6058,7 +6568,7 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", @@ -6090,7 +6600,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.31" +version = "0.9.33" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -6103,7 +6613,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", @@ -6130,7 +6640,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.31" +version = "0.9.33" dependencies = [ "always-assert", "assert_matches", @@ -6141,6 +6651,7 @@ dependencies = [ "futures-timer", "parity-scale-codec", "parking_lot 0.12.1", + "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", @@ -6159,7 +6670,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.31" +version = "0.9.33" dependencies = [ "futures", "parity-scale-codec", @@ -6178,7 +6689,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", @@ -6217,7 +6728,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "bitvec", @@ -6245,7 +6756,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "bitvec", @@ -6271,7 +6782,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.31" +version = "0.9.33" dependencies = [ "futures", "polkadot-node-subsystem", @@ -6287,7 +6798,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", @@ -6295,6 +6806,7 @@ dependencies = [ "futures-timer", "parity-scale-codec", "polkadot-node-core-pvf", + "polkadot-node-metrics", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", @@ -6310,15 +6822,15 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.31" +version = "0.9.33" dependencies = [ "futures", "maplit", "parity-scale-codec", + "polkadot-node-metrics", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", - "polkadot-node-subsystem-util", "polkadot-primitives", "sc-client-api", "sc-consensus-babe", @@ -6329,7 +6841,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "futures", @@ -6350,7 +6862,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "fatality", @@ -6377,23 +6889,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", @@ -6414,12 +6926,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", @@ -6448,7 +6961,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.31" +version = "0.9.33" dependencies = [ "futures", "futures-timer", @@ -6471,16 +6984,15 @@ 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-metrics", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-types", - "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-primitives-test-helpers", "sp-api", @@ -6493,9 +7005,8 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "0.9.31" +version = "0.9.33" dependencies = [ - "async-std", "lazy_static", "log", "mick-jaeger", @@ -6506,11 +7017,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", @@ -6538,7 +7050,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.31" +version = "0.9.33" dependencies = [ "async-trait", "derive_more", @@ -6561,7 +7073,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "0.9.31" +version = "0.9.33" dependencies = [ "bounded-vec", "futures", @@ -6583,7 +7095,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "0.9.31" +version = "0.9.33" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -6592,7 +7104,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" -version = "0.9.31" +version = "0.9.33" dependencies = [ "async-trait", "futures", @@ -6610,7 +7122,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.31" +version = "0.9.33" dependencies = [ "async-trait", "derive_more", @@ -6632,7 +7144,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", @@ -6649,7 +7161,6 @@ dependencies = [ "lru", "parity-db", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.11.2", "pin-project", "polkadot-node-jaeger", @@ -6673,7 +7184,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", @@ -6682,7 +7193,6 @@ dependencies = [ "futures-timer", "lru", "orchestra", - "parity-util-mem", "parking_lot 0.12.1", "polkadot-node-metrics", "polkadot-node-network-protocol", @@ -6694,17 +7204,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", @@ -6715,7 +7225,7 @@ dependencies = [ [[package]] name = "polkadot-performance-test" -version = "0.9.31" +version = "0.9.33" dependencies = [ "env_logger 0.9.0", "kusama-runtime", @@ -6729,12 +7239,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", @@ -6755,7 +7264,7 @@ dependencies = [ [[package]] name = "polkadot-primitives-test-helpers" -version = "0.9.31" +version = "0.9.33" dependencies = [ "polkadot-primitives", "rand 0.8.5", @@ -6767,12 +7276,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", @@ -6798,13 +7307,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", @@ -6856,7 +7365,6 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-constants", "polkadot-runtime-parachains", - "remote-externalities", "rustc-hex", "scale-info", "separator", @@ -6866,6 +7374,7 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -6894,9 +7403,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", @@ -6931,6 +7439,7 @@ dependencies = [ "serde_json", "slot-range-helper", "sp-api", + "sp-beefy", "sp-core", "sp-inherents", "sp-io", @@ -6946,18 +7455,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", @@ -6968,7 +7479,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "bitflags", @@ -6985,7 +7496,6 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", - "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -7021,12 +7531,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", @@ -7038,6 +7547,7 @@ dependencies = [ "kvdb-rocksdb", "log", "lru", + "mmr-gadget", "pallet-babe", "pallet-im-online", "pallet-staking", @@ -7106,6 +7616,7 @@ dependencies = [ "serde_json", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", @@ -7115,6 +7626,7 @@ dependencies = [ "sp-inherents", "sp-io", "sp-keystore", + "sp-mmr-primitives", "sp-offchain", "sp-runtime", "sp-session", @@ -7133,7 +7645,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.31" +version = "0.9.33" dependencies = [ "arrayvec 0.5.2", "assert_matches", @@ -7164,7 +7676,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.31" +version = "0.9.33" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -7173,7 +7685,7 @@ dependencies = [ [[package]] name = "polkadot-test-client" -version = "0.9.31" +version = "0.9.33" dependencies = [ "futures", "parity-scale-codec", @@ -7199,7 +7711,7 @@ dependencies = [ [[package]] name = "polkadot-test-malus" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "async-trait", @@ -7207,7 +7719,6 @@ dependencies = [ "color-eyre", "futures", "futures-timer", - "parity-util-mem", "polkadot-cli", "polkadot-erasure-coding", "polkadot-node-core-backing", @@ -7228,9 +7739,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", @@ -7268,6 +7778,7 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -7293,7 +7804,7 @@ dependencies = [ [[package]] name = "polkadot-test-service" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-benchmarking", "frame-system", @@ -7348,7 +7859,7 @@ dependencies = [ [[package]] name = "polkadot-voter-bags" -version = "0.9.31" +version = "0.9.33" dependencies = [ "clap", "generate-bags", @@ -7382,6 +7893,17 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "polyval" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" +dependencies = [ + "cpuid-bool", + "opaque-debug 0.3.0", + "universal-hash", +] + [[package]] name = "polyval" version = "0.5.3" @@ -7527,9 +8049,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", ] @@ -7614,9 +8136,9 @@ dependencies = [ [[package]] name = "prost-codec" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "011ae9ff8359df7915f97302d591cdd9e0e27fbd5a4ddc5bd13b71079bb20987" +checksum = "0dc34979ff898b6e141106178981ce2596c387ea6e62533facfc61a37fc879c0" dependencies = [ "asynchronous-codec", "bytes", @@ -7694,15 +8216,33 @@ dependencies = [ ] [[package]] -name = "quote" -version = "1.0.20" +name = "quinn-proto" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" +checksum = "72ef4ced82a24bb281af338b9e8f94429b6eca01b4e66d899f40031f074e74c9" dependencies = [ - "proc-macro2", -] - -[[package]] + "bytes", + "rand 0.8.5", + "ring", + "rustc-hash", + "rustls 0.20.7", + "slab", + "thiserror", + "tinyvec", + "tracing", + "webpki 0.22.0", +] + +[[package]] +name = "quote" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" +dependencies = [ + "proc-macro2", +] + +[[package]] name = "radium" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -7719,7 +8259,6 @@ dependencies = [ "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc", - "rand_pcg 0.2.1", ] [[package]] @@ -7790,15 +8329,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" @@ -7839,6 +8369,31 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "rcgen" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" +dependencies = [ + "pem", + "ring", + "time 0.3.17", + "x509-parser 0.13.2", + "yasna", +] + +[[package]] +name = "rcgen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +dependencies = [ + "pem", + "ring", + "time 0.3.17", + "yasna", +] + [[package]] name = "redox_syscall" version = "0.2.10" @@ -7931,7 +8486,7 @@ checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "remote-ext-tests-bags-list" -version = "0.9.31" +version = "0.9.33" dependencies = [ "clap", "frame-system", @@ -7948,22 +8503,6 @@ dependencies = [ "westend-runtime-constants", ] -[[package]] -name = "remote-externalities" -version = "0.10.0-dev" -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" @@ -8058,16 +8597,17 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.31" +version = "0.9.33" dependencies = [ "beefy-merkle-tree", - "beefy-primitives", "frame-benchmarking", "frame-executive", + "frame-remote-externalities", "frame-support", "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", + "frame-try-runtime", "hex-literal", "log", "pallet-authority-discovery", @@ -8081,7 +8621,6 @@ dependencies = [ "pallet-collective", "pallet-democracy", "pallet-elections-phragmen", - "pallet-gilt", "pallet-grandpa", "pallet-identity", "pallet-im-online", @@ -8089,6 +8628,7 @@ dependencies = [ "pallet-membership", "pallet-mmr", "pallet-multisig", + "pallet-nis", "pallet-offences", "pallet-preimage", "pallet-proxy", @@ -8122,6 +8662,7 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -8134,12 +8675,14 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "sp-tracing", "sp-transaction-pool", "sp-trie", "sp-version", "static_assertions", "substrate-wasm-builder", "tiny-keccak", + "tokio", "xcm", "xcm-builder", "xcm-executor", @@ -8147,13 +8690,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]] @@ -8166,19 +8711,44 @@ dependencies = [ "winapi", ] +[[package]] +name = "rtcp" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691" +dependencies = [ + "bytes", + "thiserror", + "webrtc-util", +] + [[package]] name = "rtnetlink" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ - "async-global-executor", "futures", "log", "netlink-packet-route", "netlink-proto", "nix 0.24.1", "thiserror", + "tokio", +] + +[[package]] +name = "rtp" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2a095411ff00eed7b12e4c6a118ba984d113e1079582570d56a5ee723f11f80" +dependencies = [ + "async-trait", + "bytes", + "rand 0.8.5", + "serde", + "thiserror", + "webrtc-util", ] [[package]] @@ -8208,6 +8778,15 @@ dependencies = [ "semver 1.0.4", ] +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + [[package]] name = "rustix" version = "0.35.9" @@ -8224,14 +8803,27 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.2" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64", + "log", + "ring", + "sct 0.6.1", + "webpki 0.21.4", +] + +[[package]] +name = "rustls" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37e5e2290f3e040b594b1a9e04377c2c671f1a1cfd9bfdef82106ac1c113f84" +checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" dependencies = [ "log", "ring", - "sct", - "webpki", + "sct 0.7.0", + "webpki 0.22.0", ] [[package]] @@ -8290,6 +8882,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "log", "sp-core", @@ -8300,6 +8893,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "futures", @@ -8310,7 +8904,7 @@ dependencies = [ "parity-scale-codec", "prost", "prost-build", - "rand 0.7.3", + "rand 0.8.5", "sc-client-api", "sc-network-common", "sp-api", @@ -8326,6 +8920,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "futures", "futures-timer", @@ -8348,6 +8943,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8363,10 +8959,9 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ - "impl-trait-for-tuples", "memmap2", - "parity-scale-codec", "sc-chain-spec-derive", "sc-network-common", "sc-telemetry", @@ -8379,6 +8974,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8389,6 +8985,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "array-bytes", "chrono", @@ -8399,7 +8996,7 @@ dependencies = [ "log", "names", "parity-scale-codec", - "rand 0.7.3", + "rand 0.8.5", "regex", "rpassword", "sc-client-api", @@ -8428,10 +9025,10 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "fnv", "futures", - "hash-db", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -8448,13 +9045,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#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "hash-db", "kvdb", @@ -8479,12 +9076,14 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "futures", "futures-timer", "libp2p", "log", + "mockall", "parking_lot 0.12.1", "sc-client-api", "sc-utils", @@ -8502,6 +9101,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "fork-tree", @@ -8520,7 +9120,6 @@ dependencies = [ "sc-keystore", "sc-telemetry", "schnorrkel", - "serde", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -8531,10 +9130,8 @@ dependencies = [ "sp-consensus-vrf", "sp-core", "sp-inherents", - "sp-io", "sp-keystore", "sp-runtime", - "sp-version", "substrate-prometheus-endpoint", "thiserror", ] @@ -8542,6 +9139,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "futures", "jsonrpsee", @@ -8563,6 +9161,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8575,6 +9174,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "futures", @@ -8592,14 +9192,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#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ - "lazy_static", "lru", "parity-scale-codec", "parking_lot 0.12.1", @@ -8608,7 +9207,6 @@ dependencies = [ "sc-executor-wasmtime", "sp-api", "sp-core", - "sp-core-hashing-proc-macro", "sp-externalities", "sp-io", "sp-panic-handler", @@ -8623,12 +9221,10 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ - "environmental", - "parity-scale-codec", "sc-allocator", "sp-maybe-compressed-blob", - "sp-sandbox", "sp-wasm-interface", "thiserror", "wasm-instrument", @@ -8638,13 +9234,12 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "log", - "parity-scale-codec", "sc-allocator", "sc-executor-common", "sp-runtime-interface", - "sp-sandbox", "sp-wasm-interface", "wasmi", ] @@ -8652,18 +9247,16 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" 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", ] @@ -8671,6 +9264,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "ahash", "array-bytes", @@ -8688,7 +9282,6 @@ dependencies = [ "sc-chain-spec", "sc-client-api", "sc-consensus", - "sc-keystore", "sc-network", "sc-network-common", "sc-network-gossip", @@ -8711,6 +9304,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "finality-grandpa", "futures", @@ -8721,7 +9315,6 @@ dependencies = [ "sc-finality-grandpa", "sc-rpc", "serde", - "serde_json", "sp-blockchain", "sp-core", "sp-runtime", @@ -8731,15 +9324,14 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "ansi_term", "futures", "futures-timer", "log", - "parity-util-mem", "sc-client-api", "sc-network-common", - "sc-transaction-pool-api", "sp-blockchain", "sp-runtime", ] @@ -8747,6 +9339,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "array-bytes", "async-trait", @@ -8761,29 +9354,25 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "array-bytes", "async-trait", "asynchronous-codec", - "bitflags", + "backtrace", "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", @@ -8807,6 +9396,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "cid", "futures", @@ -8820,12 +9410,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#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "bitflags", @@ -8851,6 +9441,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "ahash", "futures", @@ -8868,6 +9459,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "array-bytes", "futures", @@ -8888,8 +9480,10 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "array-bytes", + "async-trait", "fork-tree", "futures", "libp2p", @@ -8911,22 +9505,24 @@ 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#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "array-bytes", "futures", - "hex", "libp2p", "log", "parity-scale-codec", "pin-project", "sc-network-common", "sc-peerset", + "sc-utils", "sp-consensus", "sp-runtime", "substrate-prometheus-endpoint", @@ -8935,6 +9531,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "array-bytes", "bytes", @@ -8948,7 +9545,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", @@ -8964,6 +9561,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "futures", "libp2p", @@ -8976,6 +9574,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8984,9 +9583,9 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "futures", - "hash-db", "jsonrpsee", "log", "parity-scale-codec", @@ -9013,12 +9612,10 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ - "futures", "jsonrpsee", - "log", "parity-scale-codec", - "parking_lot 0.12.1", "sc-chain-spec", "sc-transaction-pool-api", "scale-info", @@ -9027,7 +9624,6 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing", "sp-version", "thiserror", ] @@ -9035,50 +9631,60 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" 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#934d42aefb51b797ee9ef41270bc041b1c1c6025" 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#934d42aefb51b797ee9ef41270bc041b1c1c6025" 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", @@ -9106,19 +9712,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", @@ -9135,19 +9737,18 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" 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#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9166,12 +9767,13 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "futures", "libc", "log", - "rand 0.7.3", - "rand_pcg 0.2.1", + "rand 0.8.5", + "rand_pcg", "regex", "sc-telemetry", "serde", @@ -9184,6 +9786,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "chrono", "futures", @@ -9191,7 +9794,8 @@ dependencies = [ "log", "parking_lot 0.12.1", "pin-project", - "rand 0.7.3", + "rand 0.8.5", + "sc-utils", "serde", "serde_json", "thiserror", @@ -9201,6 +9805,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "ansi_term", "atty", @@ -9231,6 +9836,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9241,6 +9847,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "futures", @@ -9248,7 +9855,6 @@ dependencies = [ "linked-hash-map", "log", "parity-scale-codec", - "parity-util-mem", "parking_lot 0.12.1", "sc-client-api", "sc-transaction-pool-api", @@ -9267,6 +9873,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "futures", @@ -9280,7 +9887,9 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ + "backtrace", "futures", "futures-timer", "lazy_static", @@ -9355,6 +9964,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" +[[package]] +name = "sct" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "sct" version = "0.7.0" @@ -9365,6 +9984,18 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sdp" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d22a5ef407871893fd72b4562ee15e4742269b173959db4b8df6f538c414e13" +dependencies = [ + "rand 0.8.5", + "substring", + "thiserror", + "url", +] + [[package]] name = "sec1" version = "0.3.0" @@ -9381,9 +10012,9 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.24.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7649a0b3ffb32636e60c7ce0d70511eda9c52c658cd0634e194d5a19943aeff" +checksum = "d9512ffd81e3a3503ed401f79c33168b9148c75038956039166cd750eaa037c3" dependencies = [ "secp256k1-sys", ] @@ -9461,18 +10092,18 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.137" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.137" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ "proc-macro2", "quote", @@ -9499,15 +10130,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" @@ -9684,7 +10306,7 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" [[package]] name = "slot-range-helper" -version = "0.9.31" +version = "0.9.33" dependencies = [ "enumn", "parity-scale-codec", @@ -9720,7 +10342,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "774d05a3edae07ce6d68ea6984f3c05e9bba8927e3dd591e3b479e5b03213d0d" dependencies = [ - "aes-gcm", + "aes-gcm 0.9.4", "blake2", "chacha20poly1305", "curve25519-dalek 4.0.0-pre.1", @@ -9751,6 +10373,7 @@ dependencies = [ "bytes", "flate2", "futures", + "http", "httparse", "log", "rand 0.8.5", @@ -9760,6 +10383,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "hash-db", "log", @@ -9777,6 +10401,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "blake2", "proc-macro-crate", @@ -9787,7 +10412,8 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "6.0.0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "parity-scale-codec", "scale-info", @@ -9799,14 +10425,14 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "5.0.0" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-debug-derive", "sp-std", "static_assertions", ] @@ -9814,6 +10440,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "parity-scale-codec", "scale-info", @@ -9826,6 +10453,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "parity-scale-codec", @@ -9834,9 +10462,27 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +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#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "parity-scale-codec", "sp-api", @@ -9848,6 +10494,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "futures", "log", @@ -9865,10 +10512,10 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "futures", - "futures-timer", "log", "parity-scale-codec", "sp-core", @@ -9883,6 +10530,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "merlin", @@ -9905,12 +10553,11 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-runtime", "sp-std", "sp-timestamp", ] @@ -9918,6 +10565,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "parity-scale-codec", "scale-info", @@ -9929,13 +10577,13 @@ dependencies = [ [[package]] name = "sp-core" -version = "6.0.0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "array-bytes", "base58", "bitflags", "blake2", - "byteorder", "dyn-clonable", "ed25519-zebra", "futures", @@ -9946,11 +10594,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", @@ -9967,13 +10614,13 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", - "wasmi", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "4.0.0" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "blake2", "byteorder", @@ -9987,6 +10634,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "proc-macro2", "quote", @@ -9997,6 +10645,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10004,7 +10653,8 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "4.0.0" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "proc-macro2", "quote", @@ -10013,7 +10663,8 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.12.0" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "environmental", "parity-scale-codec", @@ -10024,6 +10675,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "finality-grandpa", "log", @@ -10041,6 +10693,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10053,15 +10706,16 @@ dependencies = [ [[package]] name = "sp-io" -version = "6.0.0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "bytes", + "ed25519", + "ed25519-dalek", "futures", - "hash-db", "libsecp256k1", "log", "parity-scale-codec", - "parking_lot 0.12.1", "secp256k1", "sp-core", "sp-externalities", @@ -10071,14 +10725,14 @@ dependencies = [ "sp-std", "sp-tracing", "sp-trie", - "sp-wasm-interface", "tracing", "tracing-core", ] [[package]] name = "sp-keyring" -version = "6.0.0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "lazy_static", "sp-core", @@ -10088,7 +10742,8 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.12.0" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "futures", @@ -10105,6 +10760,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "thiserror", "zstd", @@ -10113,7 +10769,9 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ + "ckb-merkle-mountain-range", "log", "parity-scale-codec", "scale-info", @@ -10129,6 +10787,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "parity-scale-codec", "scale-info", @@ -10142,6 +10801,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "sp-api", "sp-core", @@ -10150,7 +10810,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "4.0.0" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "backtrace", "lazy_static", @@ -10160,6 +10821,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "rustc-hash", "serde", @@ -10168,16 +10830,16 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "6.0.0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" 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", @@ -10190,7 +10852,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "6.0.0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10207,7 +10870,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "5.0.0" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "Inflector", "proc-macro-crate", @@ -10217,25 +10881,13 @@ dependencies = [ ] [[package]] -name = "sp-sandbox" -version = "0.10.0-dev" +name = "sp-session" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ - "log", "parity-scale-codec", - "sp-core", - "sp-io", - "sp-std", - "sp-wasm-interface", - "wasmi", -] - -[[package]] -name = "sp-session" -version = "4.0.0-dev" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-api", + "scale-info", + "sp-api", "sp-core", "sp-runtime", "sp-staking", @@ -10245,23 +10897,25 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "parity-scale-codec", "scale-info", + "sp-core", "sp-runtime", "sp-std", ] [[package]] name = "sp-state-machine" -version = "0.12.0" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" 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", @@ -10270,16 +10924,17 @@ dependencies = [ "sp-trie", "thiserror", "tracing", - "trie-root", ] [[package]] name = "sp-std" -version = "4.0.0" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" [[package]] name = "sp-storage" -version = "6.0.0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10292,12 +10947,12 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "futures-timer", "log", "parity-scale-codec", - "sp-api", "sp-inherents", "sp-runtime", "sp-std", @@ -10306,7 +10961,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "5.0.0" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "parity-scale-codec", "sp-std", @@ -10318,6 +10974,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "sp-api", "sp-runtime", @@ -10326,6 +10983,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "log", @@ -10340,7 +10998,8 @@ dependencies = [ [[package]] name = "sp-trie" -version = "6.0.0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "ahash", "hash-db", @@ -10363,6 +11022,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10379,6 +11039,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10388,7 +11049,8 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "6.0.0" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "impl-trait-for-tuples", "log", @@ -10401,8 +11063,8 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ - "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", @@ -10431,9 +11093,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", @@ -10452,12 +11114,13 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staking-miner" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_cmd", "clap", "exitcode", "frame-election-provider-support", + "frame-remote-externalities", "frame-support", "frame-system", "futures-util", @@ -10473,7 +11136,6 @@ dependencies = [ "polkadot-core-primitives", "polkadot-runtime", "polkadot-runtime-common", - "remote-externalities", "sc-transaction-pool-api", "serde", "serde_json", @@ -10591,6 +11253,25 @@ dependencies = [ "syn", ] +[[package]] +name = "stun" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" +dependencies = [ + "base64", + "crc", + "lazy_static", + "md-5", + "rand 0.8.5", + "ring", + "subtle", + "thiserror", + "tokio", + "url", + "webrtc-util", +] + [[package]] name = "sub-tokens" version = "0.1.0" @@ -10615,6 +11296,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "platforms", ] @@ -10622,16 +11304,15 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" 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", @@ -10642,8 +11323,8 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ - "futures-util", "hyper", "log", "prometheus", @@ -10654,6 +11335,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "async-trait", "jsonrpsee", @@ -10666,6 +11348,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "jsonrpsee", "log", @@ -10675,10 +11358,8 @@ dependencies = [ "scale-info", "serde", "sp-core", - "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", "sp-trie", "trie-db", ] @@ -10686,6 +11367,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "array-bytes", "async-trait", @@ -10711,6 +11393,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "futures", "substrate-test-utils-derive", @@ -10720,6 +11403,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10730,6 +11414,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "ansi_term", "build-helper", @@ -10743,6 +11428,15 @@ dependencies = [ "wasm-opt", ] +[[package]] +name = "substring" +version = "1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" +dependencies = [ + "autocfg", +] + [[package]] name = "subtle" version = "2.4.1" @@ -10767,7 +11461,7 @@ dependencies = [ "debugid", "memmap2", "stable_deref_trait", - "uuid", + "uuid 0.8.2", ] [[package]] @@ -10783,9 +11477,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", @@ -10868,7 +11562,7 @@ checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" [[package]] name = "test-parachain-adder" -version = "0.9.31" +version = "0.9.33" dependencies = [ "dlmalloc", "parity-scale-codec", @@ -10881,7 +11575,7 @@ dependencies = [ [[package]] name = "test-parachain-adder-collator" -version = "0.9.31" +version = "0.9.33" dependencies = [ "clap", "futures", @@ -10907,14 +11601,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", @@ -10928,7 +11622,7 @@ dependencies = [ [[package]] name = "test-parachain-undying-collator" -version = "0.9.31" +version = "0.9.33" dependencies = [ "clap", "futures", @@ -10954,7 +11648,7 @@ dependencies = [ [[package]] name = "test-parachains" -version = "0.9.31" +version = "0.9.33" dependencies = [ "parity-scale-codec", "sp-core", @@ -10965,13 +11659,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]] @@ -11074,19 +11770,46 @@ dependencies = [ "winapi", ] +[[package]] +name = "time" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +dependencies = [ + "itoa", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" + +[[package]] +name = "time-macros" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +dependencies = [ + "time-core", +] + [[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", @@ -11102,6 +11825,16 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + [[package]] name = "tinyvec" version = "1.5.1" @@ -11119,22 +11852,22 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.19.2" +version = "1.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439" +checksum = "1d9f76183f91ecfb55e1d7d5602bd1d979e38a3a522fe900241cf195624d67ae" dependencies = [ + "autocfg", "bytes", "libc", "memchr", "mio", "num_cpus", - "once_cell", "parking_lot 0.12.1", "pin-project-lite 0.2.7", "signal-hook-registry", "socket2", "tokio-macros", - "winapi", + "windows-sys 0.42.0", ] [[package]] @@ -11164,9 +11897,9 @@ version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b" dependencies = [ - "rustls", + "rustls 0.20.7", "tokio", - "webpki", + "webpki 0.22.0", ] [[package]] @@ -11178,6 +11911,7 @@ dependencies = [ "futures-core", "pin-project-lite 0.2.7", "tokio", + "tokio-util 0.7.1", ] [[package]] @@ -11229,6 +11963,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" @@ -11242,6 +12011,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", @@ -11280,7 +12050,7 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.31" +version = "0.9.33" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -11290,7 +12060,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.31" +version = "0.9.33" dependencies = [ "assert_matches", "expander 0.0.6", @@ -11402,8 +12172,10 @@ dependencies = [ "lazy_static", "rand 0.8.5", "smallvec", + "socket2", "thiserror", "tinyvec", + "tokio", "tracing", "url", ] @@ -11423,6 +12195,7 @@ dependencies = [ "resolv-conf", "smallvec", "thiserror", + "tokio", "tracing", "trust-dns-proto", ] @@ -11436,21 +12209,26 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" dependencies = [ "clap", + "frame-remote-externalities", "frame-try-runtime", + "hex", "log", "parity-scale-codec", - "remote-externalities", - "sc-chain-spec", "sc-cli", "sc-executor", "sc-service", "serde", + "serde_json", + "sp-api", "sp-core", + "sp-debug-derive", "sp-externalities", "sp-io", "sp-keystore", + "sp-rpc", "sp-runtime", "sp-state-machine", "sp-version", @@ -11500,6 +12278,25 @@ dependencies = [ "utf-8", ] +[[package]] +name = "turn" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8" +dependencies = [ + "async-trait", + "base64", + "futures", + "log", + "md-5", + "rand 0.8.5", + "ring", + "stun", + "thiserror", + "tokio", + "webrtc-util", +] + [[package]] name = "twox-hash" version = "1.6.3" @@ -11536,15 +12333,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" @@ -11630,6 +12418,15 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +[[package]] +name = "uuid" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" +dependencies = [ + "getrandom 0.2.3", +] + [[package]] name = "valuable" version = "0.1.0" @@ -11677,6 +12474,15 @@ dependencies = [ "libc", ] +[[package]] +name = "waitgroup" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292" +dependencies = [ + "atomic-waker", +] + [[package]] name = "waker-fn" version = "1.1.0" @@ -11966,7 +12772,7 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.26.1", "log", "object 0.29.0", "target-lexicon", @@ -11983,7 +12789,7 @@ checksum = "5c587c62e91c5499df62012b87b88890d0eb470b2ffecc5964e9da967b70c77c" dependencies = [ "anyhow", "cranelift-entity", - "gimli", + "gimli 0.26.1", "indexmap", "log", "object 0.29.0", @@ -12000,12 +12806,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "047839b5dabeae5424a078c19b8cc897e5943a7fadc69e3d888b9c9a897666b3" dependencies = [ - "addr2line", + "addr2line 0.17.0", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli", + "gimli 0.26.1", "log", "object 0.29.0", "rustc-demangle", @@ -12077,6 +12883,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki" +version = "0.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "webpki" version = "0.22.0" @@ -12093,7 +12909,219 @@ version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "552ceb903e957524388c4d3475725ff2c8b7960922063af6ce53c9a43da07449" dependencies = [ - "webpki", + "webpki 0.22.0", +] + +[[package]] +name = "webrtc" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3bc9049bdb2cea52f5fd4f6f728184225bdb867ed0dc2410eab6df5bdd67bb" +dependencies = [ + "arc-swap", + "async-trait", + "bytes", + "hex", + "interceptor", + "lazy_static", + "log", + "rand 0.8.5", + "rcgen 0.9.3", + "regex", + "ring", + "rtcp", + "rtp", + "rustls 0.19.1", + "sdp", + "serde", + "serde_json", + "sha2 0.10.2", + "stun", + "thiserror", + "time 0.3.17", + "tokio", + "turn", + "url", + "waitgroup", + "webrtc-data", + "webrtc-dtls", + "webrtc-ice", + "webrtc-mdns", + "webrtc-media", + "webrtc-sctp", + "webrtc-srtp", + "webrtc-util", +] + +[[package]] +name = "webrtc-data" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ef36a4d12baa6e842582fe9ec16a57184ba35e1a09308307b67d43ec8883100" +dependencies = [ + "bytes", + "derive_builder", + "log", + "thiserror", + "tokio", + "webrtc-sctp", + "webrtc-util", +] + +[[package]] +name = "webrtc-dtls" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7021987ae0a2ed6c8cd33f68e98e49bb6e74ffe9543310267b48a1bbe3900e5f" +dependencies = [ + "aes 0.6.0", + "aes-gcm 0.8.0", + "async-trait", + "bincode", + "block-modes", + "byteorder", + "ccm", + "curve25519-dalek 3.2.0", + "der-parser 8.1.0", + "elliptic-curve", + "hkdf", + "hmac 0.10.1", + "log", + "oid-registry 0.6.1", + "p256", + "p384", + "rand 0.8.5", + "rand_core 0.6.3", + "rcgen 0.9.3", + "ring", + "rustls 0.19.1", + "sec1", + "serde", + "sha-1 0.9.8", + "sha2 0.9.8", + "signature", + "subtle", + "thiserror", + "tokio", + "webpki 0.21.4", + "webrtc-util", + "x25519-dalek 2.0.0-pre.1", + "x509-parser 0.13.2", +] + +[[package]] +name = "webrtc-ice" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494483fbb2f5492620871fdc78b084aed8807377f6e3fe88b2e49f0a9c9c41d7" +dependencies = [ + "arc-swap", + "async-trait", + "crc", + "log", + "rand 0.8.5", + "serde", + "serde_json", + "stun", + "thiserror", + "tokio", + "turn", + "url", + "uuid 1.2.2", + "waitgroup", + "webrtc-mdns", + "webrtc-util", +] + +[[package]] +name = "webrtc-mdns" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" +dependencies = [ + "log", + "socket2", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-media" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2a3c157a040324e5049bcbd644ffc9079e6738fa2cfab2bcff64e5cc4c00d7" +dependencies = [ + "byteorder", + "bytes", + "derive_builder", + "displaydoc", + "rand 0.8.5", + "rtp", + "thiserror", + "webrtc-util", +] + +[[package]] +name = "webrtc-sctp" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d47adcd9427eb3ede33d5a7f3424038f63c965491beafcc20bc650a2f6679c0" +dependencies = [ + "arc-swap", + "async-trait", + "bytes", + "crc", + "log", + "rand 0.8.5", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-srtp" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6183edc4c1c6c0175f8812eefdce84dfa0aea9c3ece71c2bf6ddd3c964de3da5" +dependencies = [ + "aead 0.4.3", + "aes 0.7.5", + "aes-gcm 0.9.4", + "async-trait", + "byteorder", + "bytes", + "ctr 0.8.0", + "hmac 0.11.0", + "log", + "rtcp", + "rtp", + "sha-1 0.9.8", + "subtle", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-util" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" +dependencies = [ + "async-trait", + "bitflags", + "bytes", + "cc", + "ipnet", + "lazy_static", + "libc", + "log", + "nix 0.24.1", + "rand 0.8.5", + "thiserror", + "tokio", + "winapi", ] [[package]] @@ -12107,13 +13135,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", @@ -12166,7 +13194,6 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", - "remote-externalities", "rustc-hex", "scale-info", "serde", @@ -12175,6 +13202,7 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -12203,13 +13231,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]] @@ -12299,6 +13329,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" @@ -12317,6 +13368,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" @@ -12335,6 +13392,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" @@ -12353,6 +13416,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" @@ -12371,6 +13440,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" @@ -12389,6 +13470,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" @@ -12427,9 +13514,57 @@ dependencies = [ "zeroize", ] +[[package]] +name = "x25519-dalek" +version = "2.0.0-pre.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5da623d8af10a62342bcbbb230e33e58a63255a58012f8653c578e54bab48df" +dependencies = [ + "curve25519-dalek 3.2.0", + "rand_core 0.6.3", + "zeroize", +] + +[[package]] +name = "x509-parser" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9bace5b5589ffead1afb76e43e34cff39cd0f3ce7e170ae0c29e53b88eb1c" +dependencies = [ + "asn1-rs 0.3.1", + "base64", + "data-encoding", + "der-parser 7.0.0", + "lazy_static", + "nom", + "oid-registry 0.4.0", + "ring", + "rusticata-macros", + "thiserror", + "time 0.3.17", +] + +[[package]] +name = "x509-parser" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +dependencies = [ + "asn1-rs 0.5.1", + "base64", + "data-encoding", + "der-parser 8.1.0", + "lazy_static", + "nom", + "oid-registry 0.6.1", + "rusticata-macros", + "thiserror", + "time 0.3.17", +] + [[package]] name = "xcm" -version = "0.9.31" +version = "0.9.33" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -12442,7 +13577,7 @@ dependencies = [ [[package]] name = "xcm-builder" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "frame-system", @@ -12459,14 +13594,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "sp-weights", "xcm", "xcm-executor", ] [[package]] name = "xcm-executor" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-benchmarking", "frame-support", @@ -12483,7 +13617,7 @@ dependencies = [ [[package]] name = "xcm-executor-integration-tests" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "frame-system", @@ -12503,7 +13637,7 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "0.9.31" +version = "0.9.33" dependencies = [ "Inflector", "proc-macro2", @@ -12513,7 +13647,7 @@ dependencies = [ [[package]] name = "xcm-simulator" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "parity-scale-codec", @@ -12529,7 +13663,7 @@ dependencies = [ [[package]] name = "xcm-simulator-example" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "frame-system", @@ -12552,7 +13686,7 @@ dependencies = [ [[package]] name = "xcm-simulator-fuzzer" -version = "0.9.31" +version = "0.9.33" dependencies = [ "frame-support", "frame-system", @@ -12588,6 +13722,15 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "yasna" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aed2e7a52e3744ab4d0c05c20aa065258e84c49fd4226f5191b2ed29712710b4" +dependencies = [ + "time 0.3.17", +] + [[package]] name = "zeroize" version = "1.5.7" @@ -12611,7 +13754,7 @@ dependencies = [ [[package]] name = "zombienet-backchannel" -version = "0.9.31" +version = "0.9.33" dependencies = [ "futures-util", "lazy_static", @@ -12654,251 +13797,3 @@ dependencies = [ "cc", "libc", ] - -[[patch.unused]] -name = "chain-spec-builder" -version = "2.0.0" - -[[patch.unused]] -name = "frame-election-solution-type-fuzzer" -version = "2.0.0-alpha.5" - -[[patch.unused]] -name = "frame-support-test-compile-pass" -version = "4.0.0-dev" - -[[patch.unused]] -name = "kitchensink-runtime" -version = "3.0.0-dev" - -[[patch.unused]] -name = "node-bench" -version = "0.9.0-dev" - -[[patch.unused]] -name = "node-cli" -version = "3.0.0-dev" - -[[patch.unused]] -name = "node-executor" -version = "3.0.0-dev" - -[[patch.unused]] -name = "node-inspect" -version = "0.9.0-dev" - -[[patch.unused]] -name = "node-primitives" -version = "2.0.0" - -[[patch.unused]] -name = "node-rpc" -version = "3.0.0-dev" - -[[patch.unused]] -name = "node-runtime-generate-bags" -version = "3.0.0" - -[[patch.unused]] -name = "node-template" -version = "4.0.0-dev" - -[[patch.unused]] -name = "node-template-runtime" -version = "4.0.0-dev" - -[[patch.unused]] -name = "node-testing" -version = "3.0.0-dev" - -[[patch.unused]] -name = "pallet-alliance" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-asset-tx-payment" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-atomic-swap" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-aura" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-bags-list-fuzzer" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-contracts" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-contracts-primitives" -version = "6.0.0" - -[[patch.unused]] -name = "pallet-contracts-proc-macro" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-example-basic" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-example-offchain-worker" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-lottery" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-nicks" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-node-authorization" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-nomination-pools-fuzzer" -version = "2.0.0" - -[[patch.unused]] -name = "pallet-nomination-pools-test-staking" -version = "1.0.0" - -[[patch.unused]] -name = "pallet-randomness-collective-flip" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-remark" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-root-offences" -version = "1.0.0-dev" - -[[patch.unused]] -name = "pallet-root-testing" -version = "1.0.0-dev" - -[[patch.unused]] -name = "pallet-scored-pool" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-template" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-transaction-storage" -version = "4.0.0-dev" - -[[patch.unused]] -name = "pallet-uniques" -version = "4.0.0-dev" - -[[patch.unused]] -name = "sc-consensus-aura" -version = "0.10.0-dev" - -[[patch.unused]] -name = "sc-consensus-manual-seal" -version = "0.10.0-dev" - -[[patch.unused]] -name = "sc-consensus-pow" -version = "0.10.0-dev" - -[[patch.unused]] -name = "sc-consensus-uncles" -version = "0.10.0-dev" - -[[patch.unused]] -name = "sc-network-test" -version = "0.8.0" - -[[patch.unused]] -name = "sc-runtime-test" -version = "2.0.0" - -[[patch.unused]] -name = "sc-service-test" -version = "2.0.0" - -[[patch.unused]] -name = "sp-api-test" -version = "2.0.1" - -[[patch.unused]] -name = "sp-application-crypto-test" -version = "2.0.0" - -[[patch.unused]] -name = "sp-arithmetic-fuzzer" -version = "2.0.0" - -[[patch.unused]] -name = "sp-consensus-aura" -version = "0.10.0-dev" - -[[patch.unused]] -name = "sp-consensus-pow" -version = "0.10.0-dev" - -[[patch.unused]] -name = "sp-npos-elections-fuzzer" -version = "2.0.0-alpha.5" - -[[patch.unused]] -name = "sp-runtime-interface-test" -version = "2.0.0" - -[[patch.unused]] -name = "sp-runtime-interface-test-wasm" -version = "2.0.0" - -[[patch.unused]] -name = "sp-runtime-interface-test-wasm-deprecated" -version = "2.0.0" - -[[patch.unused]] -name = "sp-serializer" -version = "4.0.0-dev" - -[[patch.unused]] -name = "sp-test-primitives" -version = "2.0.0" - -[[patch.unused]] -name = "subkey" -version = "2.0.2" - -[[patch.unused]] -name = "substrate-frame-cli" -version = "4.0.0-dev" - -[[patch.unused]] -name = "substrate-frame-rpc-support" -version = "3.0.0" - -[[patch.unused]] -name = "substrate-test-runtime" -version = "2.0.0" - -[[patch.unused]] -name = "substrate-test-runtime-client" -version = "2.0.0" - -[[patch.unused]] -name = "substrate-test-runtime-transaction-pool" -version = "2.0.0" - -[[patch.unused]] -name = "substrate-test-utils-test-crate" -version = "0.1.0" From 9cd496d3136f9e75ec9f1aebcd717c9150a7157a Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Mon, 9 Jan 2023 20:46:06 +0100 Subject: [PATCH 013/182] Merge remote-tracking branch 'origin/master' into gav-message-queue --- .cargo/config.toml | 32 + .github/dependabot.yml | 4 +- .gitignore | 1 - .gitlab-ci.yml | 60 +- Cargo.toml | 18 +- README.md | 2 +- cli/Cargo.toml | 16 +- cli/src/command.rs | 34 +- core-primitives/Cargo.toml | 8 +- core-primitives/src/lib.rs | 6 - erasure-coding/Cargo.toml | 6 +- erasure-coding/fuzzer/Cargo.toml | 6 +- erasure-coding/src/lib.rs | 2 +- node/client/Cargo.toml | 10 +- node/client/src/benchmarking.rs | 13 +- node/client/src/lib.rs | 21 +- node/collation-generation/Cargo.toml | 6 +- node/core/approval-voting/Cargo.toml | 10 +- .../approval-voting/src/approval_checking.rs | 4 +- node/core/approval-voting/src/criteria.rs | 8 +- node/core/approval-voting/src/import.rs | 7 +- node/core/approval-voting/src/lib.rs | 16 +- node/core/av-store/Cargo.toml | 10 +- node/core/av-store/src/lib.rs | 10 +- node/core/av-store/src/metrics.rs | 14 +- node/core/av-store/src/tests.rs | 45 +- node/core/backing/Cargo.toml | 6 +- node/core/backing/src/lib.rs | 6 +- node/core/bitfield-signing/Cargo.toml | 6 +- node/core/bitfield-signing/src/metrics.rs | 14 +- node/core/candidate-validation/Cargo.toml | 11 +- node/core/candidate-validation/src/lib.rs | 43 +- node/core/candidate-validation/src/metrics.rs | 2 +- node/core/candidate-validation/src/tests.rs | 14 +- node/core/chain-api/Cargo.toml | 8 +- node/core/chain-api/src/lib.rs | 9 +- node/core/chain-api/src/metrics.rs | 2 +- node/core/chain-api/src/tests.rs | 22 +- node/core/chain-selection/Cargo.toml | 10 +- node/core/chain-selection/src/lib.rs | 1 + node/core/dispute-coordinator/Cargo.toml | 10 +- node/core/dispute-coordinator/src/db/v1.rs | 24 +- node/core/dispute-coordinator/src/import.rs | 54 +- .../dispute-coordinator/src/initialized.rs | 130 +- node/core/dispute-coordinator/src/lib.rs | 4 +- .../src/participation/mod.rs | 18 +- .../src/participation/queues/mod.rs | 212 ++-- .../src/participation/queues/tests.rs | 125 +- .../src/participation/tests.rs | 89 +- .../dispute-coordinator/src/scraping/mod.rs | 73 +- .../dispute-coordinator/src/scraping/tests.rs | 11 +- node/core/dispute-coordinator/src/tests.rs | 1071 ++++++++++------- node/core/parachains-inherent/Cargo.toml | 8 +- node/core/parachains-inherent/src/lib.rs | 44 +- node/core/provisioner/Cargo.toml | 6 +- .../src/disputes/prioritized_selection/mod.rs | 33 +- .../disputes/prioritized_selection/tests.rs | 93 +- .../src/disputes/random_selection/mod.rs | 64 +- node/core/provisioner/src/lib.rs | 4 +- node/core/pvf-checker/Cargo.toml | 6 +- node/core/pvf/Cargo.toml | 10 +- node/core/pvf/src/artifacts.rs | 11 +- node/core/pvf/src/error.rs | 79 +- node/core/pvf/src/execute/mod.rs | 2 +- node/core/pvf/src/execute/queue.rs | 3 +- node/core/pvf/src/execute/worker.rs | 134 ++- node/core/pvf/src/executor_intf.rs | 4 +- node/core/pvf/src/host.rs | 93 +- node/core/pvf/src/lib.rs | 37 +- node/core/pvf/src/metrics.rs | 6 + node/core/pvf/src/prepare/pool.rs | 81 +- node/core/pvf/src/prepare/queue.rs | 42 +- node/core/pvf/src/prepare/worker.rs | 299 +++-- node/core/pvf/src/priority.rs | 2 +- node/core/pvf/src/testing.rs | 2 +- node/core/pvf/src/worker_common.rs | 119 +- node/core/pvf/tests/it/adder.rs | 4 +- node/core/pvf/tests/it/main.rs | 24 +- node/core/runtime-api/Cargo.toml | 11 +- node/core/runtime-api/src/cache.rs | 256 ++-- node/core/runtime-api/src/lib.rs | 2 +- node/core/runtime-api/src/metrics.rs | 2 +- node/gum/Cargo.toml | 6 +- node/gum/proc-macro/Cargo.toml | 6 +- node/jaeger/Cargo.toml | 8 +- node/jaeger/src/lib.rs | 2 +- node/malus/Cargo.toml | 7 +- node/metrics/Cargo.toml | 8 +- node/metrics/src/metronome.rs | 2 +- node/network/approval-distribution/Cargo.toml | 10 +- node/network/approval-distribution/src/lib.rs | 183 +-- .../approval-distribution/src/metrics.rs | 4 +- .../approval-distribution/src/tests.rs | 144 +++ .../availability-distribution/Cargo.toml | 6 +- .../src/requester/fetch_task/mod.rs | 21 +- .../src/tests/state.rs | 4 +- node/network/availability-recovery/Cargo.toml | 6 +- node/network/availability-recovery/src/lib.rs | 5 +- node/network/bitfield-distribution/Cargo.toml | 6 +- node/network/bitfield-distribution/src/lib.rs | 25 +- node/network/bridge/Cargo.toml | 11 +- node/network/bridge/src/metrics.rs | 2 +- node/network/bridge/src/network.rs | 18 +- node/network/bridge/src/rx/mod.rs | 24 +- node/network/bridge/src/tx/mod.rs | 2 +- node/network/collator-protocol/Cargo.toml | 6 +- .../src/collator_side/mod.rs | 13 +- .../src/validator_side/mod.rs | 46 +- node/network/dispute-distribution/Cargo.toml | 6 +- .../dispute-distribution/src/receiver/mod.rs | 8 +- .../dispute-distribution/src/sender/mod.rs | 33 +- .../src/sender/send_task.rs | 19 +- .../dispute-distribution/src/tests/mod.rs | 13 +- node/network/gossip-support/Cargo.toml | 6 +- node/network/protocol/Cargo.toml | 6 +- node/network/protocol/src/grid_topology.rs | 4 +- node/network/protocol/src/lib.rs | 2 +- node/network/protocol/src/peer_set.rs | 2 +- .../protocol/src/request_response/mod.rs | 39 +- .../network/statement-distribution/Cargo.toml | 6 +- .../network/statement-distribution/src/lib.rs | 48 +- .../statement-distribution/src/metrics.rs | 6 +- node/overseer/Cargo.toml | 11 +- node/overseer/src/dummy.rs | 11 +- node/overseer/src/lib.rs | 34 +- node/overseer/src/memory_stats.rs | 53 + node/overseer/src/metrics.rs | 2 +- node/overseer/src/tests.rs | 14 +- node/primitives/Cargo.toml | 6 +- node/primitives/src/disputes/message.rs | 4 +- node/primitives/src/disputes/mod.rs | 100 +- node/primitives/src/lib.rs | 30 +- node/service/Cargo.toml | 14 +- node/service/chain-specs/kusama.json | 6 +- node/service/chain-specs/polkadot.json | 6 +- node/service/chain-specs/westend.json | 8 +- node/service/src/chain_spec.rs | 8 +- node/service/src/grandpa_support.rs | 47 +- node/service/src/lib.rs | 36 +- node/service/src/overseer.rs | 14 +- node/service/src/relay_chain_selection.rs | 5 +- node/subsystem-test-helpers/Cargo.toml | 6 +- node/subsystem-test-helpers/src/lib.rs | 19 +- node/subsystem-types/Cargo.toml | 8 +- node/subsystem-types/src/errors.rs | 7 +- node/subsystem-types/src/messages.rs | 137 +-- .../src/messages/network_bridge_event.rs | 13 +- node/subsystem-util/Cargo.toml | 13 +- node/subsystem-util/src/database.rs | 14 - .../src/rolling_session_window.rs | 20 + node/subsystem/Cargo.toml | 6 +- node/subsystem/src/lib.rs | 3 + node/test/client/Cargo.toml | 6 +- node/test/client/src/block_builder.rs | 13 +- node/test/performance-test/Cargo.toml | 6 +- node/test/service/Cargo.toml | 12 +- node/zombienet-backchannel/Cargo.toml | 8 +- parachain/Cargo.toml | 8 +- parachain/src/primitives.rs | 15 +- parachain/test-parachains/Cargo.toml | 6 +- parachain/test-parachains/adder/Cargo.toml | 6 +- .../test-parachains/adder/collator/Cargo.toml | 8 +- parachain/test-parachains/halt/Cargo.toml | 6 +- parachain/test-parachains/undying/Cargo.toml | 6 +- .../undying/collator/Cargo.toml | 8 +- primitives/Cargo.toml | 8 +- primitives/src/v2/mod.rs | 111 +- primitives/test-helpers/Cargo.toml | 6 +- roadmap/implementers-guide/README.md | 5 + roadmap/implementers-guide/src/SUMMARY.md | 1 - roadmap/implementers-guide/src/glossary.md | 4 +- .../src/node/availability/README.md | 2 +- .../node/collators/collation-generation.md | 1 - .../src/node/disputes/README.md | 54 +- .../src/node/disputes/dispute-coordinator.md | 255 ++-- .../src/node/utility/candidate-validation.md | 43 + .../src/node/utility/chain-selection.md | 7 +- .../src/node/utility/provisioner.md | 2 +- .../src/node/utility/pvf-prechecker.md | 6 +- .../src/protocol-overview.md | 1 - .../implementers-guide/src/runtime/README.md | 14 +- .../src/runtime/disputes.md | 61 +- .../implementers-guide/src/types/approval.md | 2 +- .../implementers-guide/src/types/candidate.md | 20 +- roadmap/implementers-guide/src/types/chain.md | 30 - .../src/types/overseer-protocol.md | 6 +- .../src/types/pvf-prechecking.md | 2 + rpc/Cargo.toml | 10 +- rpc/src/lib.rs | 8 +- runtime/common/Cargo.toml | 10 +- runtime/common/slot_range_helper/Cargo.toml | 6 +- runtime/common/src/assigned_slots.rs | 3 + runtime/common/src/auctions.rs | 3 + runtime/common/src/claims.rs | 29 +- runtime/common/src/crowdloan/migration.rs | 78 +- runtime/common/src/crowdloan/mod.rs | 18 + runtime/common/src/impls.rs | 10 +- runtime/common/src/lib.rs | 7 +- runtime/common/src/paras_registrar.rs | 9 + runtime/common/src/paras_sudo_wrapper.rs | 6 + runtime/common/src/purchase.rs | 7 + runtime/common/src/slots/migration.rs | 38 +- runtime/common/src/slots/mod.rs | 7 +- runtime/kusama/Cargo.toml | 22 +- runtime/kusama/constants/Cargo.toml | 17 +- runtime/kusama/constants/src/lib.rs | 4 +- .../constants/src/weights/block_weights.rs | 64 +- .../src/weights/extrinsic_weights.rs | 67 +- .../constants/src/weights/paritydb_weights.rs | 12 +- .../constants/src/weights/rocksdb_weights.rs | 12 +- runtime/kusama/src/governance/fellowship.rs | 18 +- runtime/kusama/src/governance/mod.rs | 11 +- runtime/kusama/src/governance/origins.rs | 2 + runtime/kusama/src/governance/tracks.rs | 118 +- runtime/kusama/src/lib.rs | 193 +-- .../weights/frame_benchmarking_baseline.rs | 48 +- .../frame_election_provider_support.rs | 28 +- runtime/kusama/src/weights/frame_system.rs | 46 +- runtime/kusama/src/weights/mod.rs | 3 +- .../kusama/src/weights/pallet_bags_list.rs | 15 +- runtime/kusama/src/weights/pallet_balances.rs | 27 +- ...allet_balances_nis_counterpart_balances.rs | 105 ++ runtime/kusama/src/weights/pallet_bounties.rs | 53 +- .../src/weights/pallet_child_bounties.rs | 34 +- .../src/weights/pallet_collective_council.rs | 135 ++- .../pallet_collective_technical_committee.rs | 135 ++- .../src/weights/pallet_conviction_voting.rs | 56 +- .../kusama/src/weights/pallet_democracy.rs | 104 +- .../pallet_election_provider_multi_phase.rs | 78 +- .../src/weights/pallet_elections_phragmen.rs | 79 +- .../kusama/src/weights/pallet_fast_unstake.rs | 67 +- runtime/kusama/src/weights/pallet_gilt.rs | 119 -- runtime/kusama/src/weights/pallet_identity.rs | 178 +-- .../kusama/src/weights/pallet_im_online.rs | 17 +- runtime/kusama/src/weights/pallet_indices.rs | 21 +- .../kusama/src/weights/pallet_membership.rs | 55 +- runtime/kusama/src/weights/pallet_multisig.rs | 74 +- runtime/kusama/src/weights/pallet_nis.rs | 122 ++ .../src/weights/pallet_nomination_pools.rs | 98 +- runtime/kusama/src/weights/pallet_preimage.rs | 54 +- runtime/kusama/src/weights/pallet_proxy.rs | 92 +- .../src/weights/pallet_ranked_collective.rs | 52 +- .../pallet_referenda_fellowship_referenda.rs | 120 +- .../src/weights/pallet_referenda_referenda.rs | 120 +- .../kusama/src/weights/pallet_scheduler.rs | 66 +- runtime/kusama/src/weights/pallet_session.rs | 12 +- runtime/kusama/src/weights/pallet_staking.rs | 344 +++--- .../kusama/src/weights/pallet_timestamp.rs | 12 +- runtime/kusama/src/weights/pallet_tips.rs | 48 +- runtime/kusama/src/weights/pallet_treasury.rs | 37 +- runtime/kusama/src/weights/pallet_utility.rs | 33 +- runtime/kusama/src/weights/pallet_vesting.rs | 94 +- .../kusama/src/weights/pallet_whitelist.rs | 3 +- .../src/weights/runtime_common_auctions.rs | 18 +- .../src/weights/runtime_common_claims.rs | 21 +- .../src/weights/runtime_common_crowdloan.rs | 41 +- .../weights/runtime_common_paras_registrar.rs | 41 +- .../src/weights/runtime_common_slots.rs | 26 +- .../runtime_parachains_configuration.rs | 22 +- .../weights/runtime_parachains_disputes.rs | 9 +- .../src/weights/runtime_parachains_hrmp.rs | 57 +- .../weights/runtime_parachains_initializer.rs | 13 +- .../src/weights/runtime_parachains_paras.rs | 62 +- .../runtime_parachains_paras_inherent.rs | 44 +- .../src/weights/runtime_parachains_ump.rs | 19 +- runtime/kusama/src/xcm_config.rs | 42 +- runtime/metrics/Cargo.toml | 6 +- runtime/parachains/Cargo.toml | 8 +- runtime/parachains/src/builder.rs | 4 +- runtime/parachains/src/configuration.rs | 59 +- .../parachains/src/configuration/migration.rs | 80 +- runtime/parachains/src/configuration/tests.rs | 6 - runtime/parachains/src/disputes.rs | 256 +--- runtime/parachains/src/disputes/migration.rs | 98 ++ runtime/parachains/src/disputes/slashing.rs | 1 + runtime/parachains/src/disputes/tests.rs | 742 +++--------- runtime/parachains/src/hrmp.rs | 18 +- runtime/parachains/src/inclusion/mod.rs | 7 +- runtime/parachains/src/initializer.rs | 3 +- runtime/parachains/src/paras/mod.rs | 10 +- runtime/parachains/src/paras_inherent/mod.rs | 11 +- runtime/parachains/src/runtime_api_impl/v2.rs | 4 +- runtime/parachains/src/scheduler.rs | 12 +- runtime/polkadot/Cargo.toml | 14 +- runtime/polkadot/constants/Cargo.toml | 17 +- .../constants/src/weights/block_weights.rs | 64 +- .../src/weights/extrinsic_weights.rs | 67 +- .../constants/src/weights/paritydb_weights.rs | 12 +- .../constants/src/weights/rocksdb_weights.rs | 12 +- runtime/polkadot/src/lib.rs | 62 +- .../weights/frame_benchmarking_baseline.rs | 48 +- .../frame_election_provider_support.rs | 28 +- runtime/polkadot/src/weights/frame_system.rs | 48 +- .../polkadot/src/weights/pallet_bags_list.rs | 15 +- .../polkadot/src/weights/pallet_balances.rs | 27 +- .../polkadot/src/weights/pallet_bounties.rs | 53 +- .../src/weights/pallet_child_bounties.rs | 34 +- .../src/weights/pallet_collective_council.rs | 134 ++- .../pallet_collective_technical_committee.rs | 138 ++- .../polkadot/src/weights/pallet_democracy.rs | 104 +- .../pallet_election_provider_multi_phase.rs | 80 +- .../src/weights/pallet_elections_phragmen.rs | 79 +- .../src/weights/pallet_fast_unstake.rs | 66 +- .../polkadot/src/weights/pallet_identity.rs | 178 +-- .../polkadot/src/weights/pallet_im_online.rs | 17 +- .../polkadot/src/weights/pallet_indices.rs | 21 +- .../polkadot/src/weights/pallet_membership.rs | 55 +- .../polkadot/src/weights/pallet_multisig.rs | 74 +- .../src/weights/pallet_nomination_pools.rs | 102 +- .../polkadot/src/weights/pallet_preimage.rs | 52 +- runtime/polkadot/src/weights/pallet_proxy.rs | 92 +- .../polkadot/src/weights/pallet_scheduler.rs | 69 +- .../polkadot/src/weights/pallet_session.rs | 12 +- .../polkadot/src/weights/pallet_staking.rs | 340 +++--- .../polkadot/src/weights/pallet_timestamp.rs | 12 +- runtime/polkadot/src/weights/pallet_tips.rs | 48 +- .../polkadot/src/weights/pallet_treasury.rs | 32 +- .../polkadot/src/weights/pallet_utility.rs | 33 +- .../polkadot/src/weights/pallet_vesting.rs | 94 +- .../src/weights/runtime_common_auctions.rs | 18 +- .../src/weights/runtime_common_claims.rs | 21 +- .../src/weights/runtime_common_crowdloan.rs | 41 +- .../weights/runtime_common_paras_registrar.rs | 42 +- .../src/weights/runtime_common_slots.rs | 26 +- .../runtime_parachains_configuration.rs | 22 +- .../weights/runtime_parachains_disputes.rs | 9 +- .../src/weights/runtime_parachains_hrmp.rs | 78 +- .../weights/runtime_parachains_initializer.rs | 13 +- .../src/weights/runtime_parachains_paras.rs | 62 +- .../runtime_parachains_paras_inherent.rs | 38 +- runtime/polkadot/src/xcm_config.rs | 6 +- runtime/rococo/Cargo.toml | 31 +- runtime/rococo/constants/Cargo.toml | 17 +- .../constants/src/weights/block_weights.rs | 62 +- .../src/weights/extrinsic_weights.rs | 63 +- .../constants/src/weights/paritydb_weights.rs | 12 +- .../constants/src/weights/rocksdb_weights.rs | 12 +- runtime/rococo/src/lib.rs | 157 ++- runtime/rococo/src/validator_manager.rs | 2 + .../weights/frame_benchmarking_baseline.rs | 48 +- runtime/rococo/src/weights/frame_system.rs | 48 +- runtime/rococo/src/weights/mod.rs | 3 +- runtime/rococo/src/weights/pallet_balances.rs | 27 +- ...allet_balances_nis_counterpart_balances.rs | 105 ++ runtime/rococo/src/weights/pallet_bounties.rs | 53 +- .../src/weights/pallet_child_bounties.rs | 34 +- .../src/weights/pallet_collective_council.rs | 244 ++-- .../pallet_collective_technical_committee.rs | 244 ++-- .../rococo/src/weights/pallet_democracy.rs | 104 +- .../src/weights/pallet_elections_phragmen.rs | 75 +- runtime/rococo/src/weights/pallet_gilt.rs | 119 -- runtime/rococo/src/weights/pallet_identity.rs | 176 +-- .../rococo/src/weights/pallet_im_online.rs | 17 +- runtime/rococo/src/weights/pallet_indices.rs | 21 +- .../rococo/src/weights/pallet_membership.rs | 113 +- runtime/rococo/src/weights/pallet_multisig.rs | 76 +- runtime/rococo/src/weights/pallet_nis.rs | 122 ++ runtime/rococo/src/weights/pallet_preimage.rs | 50 +- runtime/rococo/src/weights/pallet_proxy.rs | 92 +- .../rococo/src/weights/pallet_scheduler.rs | 69 +- .../rococo/src/weights/pallet_timestamp.rs | 12 +- runtime/rococo/src/weights/pallet_tips.rs | 48 +- runtime/rococo/src/weights/pallet_treasury.rs | 32 +- runtime/rococo/src/weights/pallet_utility.rs | 33 +- runtime/rococo/src/weights/pallet_vesting.rs | 94 +- .../src/weights/runtime_common_auctions.rs | 30 +- .../src/weights/runtime_common_claims.rs | 19 +- .../src/weights/runtime_common_crowdloan.rs | 43 +- .../weights/runtime_common_paras_registrar.rs | 42 +- .../src/weights/runtime_common_slots.rs | 26 +- .../runtime_parachains_configuration.rs | 22 +- .../weights/runtime_parachains_disputes.rs | 9 +- .../src/weights/runtime_parachains_hrmp.rs | 60 +- .../weights/runtime_parachains_initializer.rs | 13 +- .../src/weights/runtime_parachains_paras.rs | 62 +- .../src/weights/runtime_parachains_ump.rs | 19 +- runtime/test-runtime/Cargo.toml | 10 +- runtime/test-runtime/constants/Cargo.toml | 14 +- .../constants/src/weights/block_weights.rs | 7 +- .../src/weights/extrinsic_weights.rs | 7 +- .../constants/src/weights/paritydb_weights.rs | 12 +- .../constants/src/weights/rocksdb_weights.rs | 12 +- runtime/test-runtime/src/lib.rs | 11 +- runtime/westend/Cargo.toml | 14 +- runtime/westend/constants/Cargo.toml | 17 +- .../constants/src/weights/block_weights.rs | 62 +- .../src/weights/extrinsic_weights.rs | 63 +- .../constants/src/weights/paritydb_weights.rs | 12 +- .../constants/src/weights/rocksdb_weights.rs | 12 +- runtime/westend/src/lib.rs | 57 +- .../frame_election_provider_support.rs | 28 +- runtime/westend/src/weights/frame_system.rs | 48 +- .../westend/src/weights/pallet_bags_list.rs | 15 +- .../westend/src/weights/pallet_balances.rs | 27 +- .../pallet_election_provider_multi_phase.rs | 80 +- .../src/weights/pallet_fast_unstake.rs | 63 +- .../westend/src/weights/pallet_identity.rs | 176 +-- .../westend/src/weights/pallet_im_online.rs | 17 +- runtime/westend/src/weights/pallet_indices.rs | 21 +- .../westend/src/weights/pallet_multisig.rs | 74 +- .../src/weights/pallet_nomination_pools.rs | 102 +- .../westend/src/weights/pallet_preimage.rs | 52 +- runtime/westend/src/weights/pallet_proxy.rs | 92 +- .../westend/src/weights/pallet_scheduler.rs | 69 +- runtime/westend/src/weights/pallet_session.rs | 12 +- runtime/westend/src/weights/pallet_staking.rs | 340 +++--- .../westend/src/weights/pallet_timestamp.rs | 12 +- runtime/westend/src/weights/pallet_utility.rs | 33 +- runtime/westend/src/weights/pallet_vesting.rs | 94 +- .../src/weights/runtime_common_auctions.rs | 18 +- .../src/weights/runtime_common_crowdloan.rs | 41 +- .../weights/runtime_common_paras_registrar.rs | 41 +- .../src/weights/runtime_common_slots.rs | 26 +- .../runtime_parachains_configuration.rs | 22 +- .../weights/runtime_parachains_disputes.rs | 9 +- .../runtime_parachains_disputes_slashing.rs | 22 +- .../src/weights/runtime_parachains_hrmp.rs | 57 +- .../weights/runtime_parachains_initializer.rs | 13 +- .../src/weights/runtime_parachains_paras.rs | 62 +- .../runtime_parachains_paras_inherent.rs | 46 +- .../src/weights/runtime_parachains_ump.rs | 19 +- scripts/ci/gitlab/lingua.dic | 1 + scripts/ci/gitlab/pipeline/build.yml | 32 +- scripts/ci/gitlab/pipeline/check.yml | 48 +- scripts/ci/gitlab/pipeline/publish.yml | 13 +- scripts/ci/gitlab/pipeline/test.yml | 15 + src/main.rs | 5 + statement-table/Cargo.toml | 6 +- tests/benchmark_block.rs | 6 +- tests/benchmark_extrinsic.rs | 9 +- tests/benchmark_overhead.rs | 2 +- tests/benchmark_storage_works.rs | 4 +- tests/common.rs | 6 +- tests/invalid_order_arguments.rs | 2 +- tests/purge_chain_works.rs | 8 +- tests/running_the_node_and_interrupt.rs | 2 +- utils/generate-bags/Cargo.toml | 6 +- utils/remote-ext-tests/bags-list/Cargo.toml | 8 +- utils/staking-miner/Cargo.toml | 12 +- utils/staking-miner/src/main.rs | 7 +- xcm/Cargo.toml | 6 +- xcm/pallet-xcm-benchmarks/Cargo.toml | 6 +- xcm/pallet-xcm/Cargo.toml | 7 +- xcm/pallet-xcm/src/lib.rs | 23 + xcm/pallet-xcm/src/mock.rs | 3 + xcm/procedural/Cargo.toml | 6 +- xcm/src/v0/junction.rs | 9 + xcm/src/v0/multi_location.rs | 43 +- xcm/src/v1/multilocation.rs | 64 +- xcm/xcm-builder/Cargo.toml | 6 +- xcm/xcm-builder/src/currency_adapter.rs | 4 + xcm/xcm-builder/src/lib.rs | 2 +- xcm/xcm-builder/src/origin_conversion.rs | 17 + xcm/xcm-builder/src/tests.rs | 6 +- xcm/xcm-builder/src/weight.rs | 10 +- xcm/xcm-executor/Cargo.toml | 6 +- xcm/xcm-executor/integration-tests/Cargo.toml | 6 +- xcm/xcm-executor/src/assets.rs | 6 +- xcm/xcm-simulator/Cargo.toml | 6 +- xcm/xcm-simulator/example/Cargo.toml | 6 +- xcm/xcm-simulator/example/src/parachain.rs | 6 +- xcm/xcm-simulator/fuzzer/Cargo.toml | 6 +- xcm/xcm-simulator/fuzzer/src/parachain.rs | 6 +- 463 files changed, 11062 insertions(+), 8215 deletions(-) create mode 100644 .cargo/config.toml create mode 100644 node/overseer/src/memory_stats.rs delete mode 100644 roadmap/implementers-guide/src/types/chain.md create mode 100644 runtime/kusama/src/weights/pallet_balances_nis_counterpart_balances.rs delete mode 100644 runtime/kusama/src/weights/pallet_gilt.rs create mode 100644 runtime/kusama/src/weights/pallet_nis.rs create mode 100644 runtime/parachains/src/disputes/migration.rs create mode 100644 runtime/rococo/src/weights/pallet_balances_nis_counterpart_balances.rs delete mode 100644 runtime/rococo/src/weights/pallet_gilt.rs create mode 100644 runtime/rococo/src/weights/pallet_nis.rs 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 877004694d79..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: @@ -227,8 +226,23 @@ deploy-parity-testnet: PR_NUM: "${PR_NUM}" trigger: project: "parity/infrastructure/ci_cd/pipeline-stopper" + branch: "as-improve" + +remove-cancel-pipeline-message: + stage: .post + rules: + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + variables: + PROJECT_ID: "${CI_PROJECT_ID}" + PROJECT_NAME: "${CI_PROJECT_NAME}" + PIPELINE_ID: "${CI_PIPELINE_ID}" + FAILED_JOB_URL: "https://gitlab.com" + FAILED_JOB_NAME: "nope" + PR_NUM: "${CI_COMMIT_REF_NAME}" + trigger: + project: "parity/infrastructure/ci_cd/pipeline-stopper" -.cancel-pipeline-test-linux-stable: +cancel-pipeline-test-linux-stable: extends: .cancel-pipeline-template needs: - job: test-linux-stable diff --git a/Cargo.toml b/Cargo.toml index 4b0e2047bf64..4621c91d5511 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.24.1" 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 0a6c4002a1c5..6d59b6a4b01d 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..648d1d63155d 100644 --- a/node/client/src/lib.rs +++ b/node/client/src/lib.rs @@ -29,7 +29,7 @@ use sp_api::{CallApiAt, Encode, NumberFor, ProvideRuntimeApi}; use sp_blockchain::{HeaderBackend, HeaderMetadata}; use sp_consensus::BlockStatus; use sp_runtime::{ - generic::{BlockId, SignedBlock}, + generic::SignedBlock, traits::{BlakeTwo256, Block as BlockT}, Justifications, }; @@ -338,22 +338,25 @@ impl sc_client_api::BlockBackend for Client { } } - fn block(&self, id: &BlockId) -> sp_blockchain::Result>> { + fn block( + &self, + hash: ::Hash, + ) -> sp_blockchain::Result>> { with_client! { self, client, { - client.block(id) + client.block(hash) } } } - fn block_status(&self, id: &BlockId) -> sp_blockchain::Result { + fn block_status(&self, hash: ::Hash) -> sp_blockchain::Result { with_client! { self, client, { - client.block_status(id) + client.block_status(hash) } } } @@ -560,12 +563,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 +583,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..2bcd337b7491 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); @@ -570,6 +570,14 @@ async fn run_iteration( FromOrchestra::Signal(OverseerSignal::BlockFinalized(hash, number)) => { let _timer = subsystem.metrics.time_process_block_finalized(); + if !subsystem.known_blocks.is_known(&hash) { + // If we haven't processed this block yet, + // make sure we write the metadata about the + // candidates backed in this finalized block. + // Otherwise, we won't be able to store our chunk + // for these candidates. + process_block_activated(ctx, subsystem, hash).await?; + } subsystem.finalized_number = Some(number); subsystem.known_blocks.prune_finalized(number); process_block_finalized( 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/av-store/src/tests.rs b/node/core/av-store/src/tests.rs index 0a855bb88057..7d5d4a5025e5 100644 --- a/node/core/av-store/src/tests.rs +++ b/node/core/av-store/src/tests.rs @@ -732,8 +732,49 @@ fn we_dont_miss_anything_if_import_notifications_are_missed() { let test_state = TestState::default(); test_harness(test_state.clone(), store.clone(), |mut virtual_overseer| async move { - overseer_signal(&mut virtual_overseer, OverseerSignal::BlockFinalized(Hash::zero(), 1)) - .await; + let block_hash = Hash::repeat_byte(1); + overseer_signal(&mut virtual_overseer, OverseerSignal::BlockFinalized(block_hash, 1)).await; + + let header = Header { + parent_hash: Hash::repeat_byte(0), + number: 1, + state_root: Hash::zero(), + extrinsics_root: Hash::zero(), + digest: Default::default(), + }; + + assert_matches!( + overseer_recv(&mut virtual_overseer).await, + AllMessages::ChainApi(ChainApiMessage::BlockHeader( + relay_parent, + tx, + )) => { + assert_eq!(relay_parent, block_hash); + tx.send(Ok(Some(header))).unwrap(); + } + ); + + assert_matches!( + overseer_recv(&mut virtual_overseer).await, + AllMessages::RuntimeApi(RuntimeApiMessage::Request( + relay_parent, + RuntimeApiRequest::CandidateEvents(tx), + )) => { + assert_eq!(relay_parent, block_hash); + tx.send(Ok(Vec::new())).unwrap(); + } + ); + + assert_matches!( + overseer_recv(&mut virtual_overseer).await, + AllMessages::RuntimeApi(RuntimeApiMessage::Request( + relay_parent, + RuntimeApiRequest::Validators(tx), + )) => { + assert_eq!(relay_parent, Hash::zero()); + tx.send(Ok(Vec::new())).unwrap(); + } + ); let header = Header { parent_hash: Hash::repeat_byte(3), 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..28731e1f25b8 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" @@ -16,8 +16,8 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ polkadot-primitives = { path = "../../../primitives" } polkadot-parachain = { path = "../../../parachain" } polkadot-node-primitives = { path = "../../primitives" } -polkadot-node-subsystem = {path = "../../subsystem" } -polkadot-node-subsystem-util = { path = "../../subsystem-util" } +polkadot-node-subsystem = { path = "../../subsystem" } +polkadot-node-metrics = { path = "../../metrics" } [target.'cfg(not(any(target_os = "android", target_os = "unknown")))'.dependencies] polkadot-node-core-pvf = { path = "../pvf" } @@ -27,5 +27,6 @@ sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master futures = { version = "0.3.21", features = ["thread-pool"] } assert_matches = "1.4.0" polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } +polkadot-node-subsystem-util = { path = "../../subsystem-util" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } diff --git a/node/core/candidate-validation/src/lib.rs b/node/core/candidate-validation/src/lib.rs index 7d9db4f3d794..743a053f2ec7 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)"); @@ -604,6 +604,7 @@ async fn validate_candidate_exhaustive( #[async_trait] trait ValidationBackend { + /// Tries executing a PVF a single time (no retries). async fn validate_candidate( &mut self, pvf: Pvf, @@ -611,6 +612,8 @@ trait ValidationBackend { encoded_params: Vec, ) -> Result; + /// Tries executing a PVF. Will retry once if an error is encountered that may have been + /// transient. async fn validate_candidate_with_retry( &mut self, raw_validation_code: Vec, @@ -620,7 +623,7 @@ trait ValidationBackend { // Construct the PVF a single time, since it is an expensive operation. Cloning it is cheap. let pvf = Pvf::from_code(raw_validation_code); - let validation_result = + let mut validation_result = self.validate_candidate(pvf.clone(), timeout, params.encode()).await; // If we get an AmbiguousWorkerDeath error, retry once after a brief delay, on the @@ -630,15 +633,22 @@ trait ValidationBackend { { // Wait a brief delay before retrying. futures_timer::Delay::new(PVF_EXECUTION_RETRY_DELAY).await; + + gum::debug!( + target: LOG_TARGET, + ?pvf, + "Re-trying failed candidate validation due to AmbiguousWorkerDeath." + ); + // Encode the params again when re-trying. We expect the retry case to be relatively // rare, and we want to avoid unconditionally cloning data. - self.validate_candidate(pvf, timeout, params.encode()).await - } else { - validation_result + validation_result = self.validate_candidate(pvf, timeout, params.encode()).await; } + + validation_result } - async fn precheck_pvf(&mut self, pvf: Pvf) -> Result<(), PrepareError>; + async fn precheck_pvf(&mut self, pvf: Pvf) -> Result; } #[async_trait] @@ -664,13 +674,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/metrics.rs b/node/core/candidate-validation/src/metrics.rs index 64112c6a387b..344d95029256 100644 --- a/node/core/candidate-validation/src/metrics.rs +++ b/node/core/candidate-validation/src/metrics.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see . use super::{ValidationFailed, ValidationResult}; -use polkadot_node_subsystem_util::metrics::{self, prometheus}; +use polkadot_node_metrics::metrics::{self, prometheus}; #[derive(Clone)] pub(crate) struct MetricsInner { 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..ec4d0bc9a3d6 100644 --- a/node/core/chain-api/Cargo.toml +++ b/node/core/chain-api/Cargo.toml @@ -1,16 +1,16 @@ [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" gum = { package = "tracing-gum", path = "../../gum" } sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-primitives = { path = "../../../primitives" } +polkadot-node-metrics = { path = "../../metrics" } polkadot-node-subsystem = {path = "../../subsystem" } -polkadot-node-subsystem-util = { path = "../../subsystem-util" } sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } 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/metrics.rs b/node/core/chain-api/src/metrics.rs index 23f455729e16..34c258b84563 100644 --- a/node/core/chain-api/src/metrics.rs +++ b/node/core/chain-api/src/metrics.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use polkadot_node_subsystem_util::metrics::{self, prometheus}; +use polkadot_node_metrics::metrics::{self, prometheus}; #[derive(Clone)] pub(crate) struct MetricsInner { 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 0df1a620826c..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, @@ -617,7 +624,9 @@ impl Initialized { let _ = tx.send( get_active_with_status(recent_disputes.into_iter(), now) - .map(|(k, _)| k) + .map(|((session_idx, candidate_hash), dispute_status)| { + (session_idx, candidate_hash, dispute_status) + }) .collect(), ); }, @@ -706,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(); @@ -803,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!( @@ -826,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, @@ -840,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: @@ -869,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: @@ -1020,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" @@ -1073,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(), }); @@ -1255,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) @@ -1266,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 b2f779041a4c..b5c2a6bd8e3f 100644 --- a/node/core/dispute-coordinator/src/tests.rs +++ b/node/core/dispute-coordinator/src/tests.rs @@ -31,7 +31,9 @@ use futures::{ use polkadot_node_subsystem_util::database::Database; -use polkadot_node_primitives::{SignedDisputeStatement, SignedFullStatement, Statement}; +use polkadot_node_primitives::{ + DisputeStatus, SignedDisputeStatement, SignedFullStatement, Statement, +}; use polkadot_node_subsystem::{ messages::{ ApprovalVotingMessage, ChainApiMessage, DisputeCoordinatorMessage, @@ -55,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, @@ -100,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, @@ -133,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, @@ -189,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(), @@ -200,6 +239,7 @@ impl Default for TestState { config, clock: MockClock::default(), headers, + block_num_to_header, last_block, known_session: None, } @@ -226,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."); @@ -354,31 +395,44 @@ impl TestState { ); finished_steps.got_scraping_information = true; tx.send(Ok(0)).unwrap(); - assert_matches!( - overseer_recv(virtual_overseer).await, - AllMessages::RuntimeApi(RuntimeApiMessage::Request( - _new_leaf, - RuntimeApiRequest::CandidateEvents(tx), - )) => { - tx.send(Ok(candidate_events.clone())).unwrap(); - } - ); - gum::trace!("After answering runtime api request"); - assert_matches!( - overseer_recv(virtual_overseer).await, - AllMessages::RuntimeApi(RuntimeApiMessage::Request( - _new_leaf, - RuntimeApiRequest::FetchOnChainVotes(tx), - )) => { - //add some `BackedCandidates` or resolved disputes here as needed - tx.send(Ok(Some(ScrapedOnChainVotes { - session, - backing_validators_per_candidate: Vec::default(), - disputes: MultiDisputeStatementSet::default(), - }))).unwrap(); + }, + AllMessages::ChainApi(ChainApiMessage::BlockNumber(hash, tx)) => { + let block_num = self.headers.get(&hash).map(|header| header.number); + tx.send(Ok(block_num)).unwrap(); + }, + AllMessages::RuntimeApi(RuntimeApiMessage::Request( + _new_leaf, + RuntimeApiRequest::CandidateEvents(tx), + )) => { + tx.send(Ok(candidate_events.clone())).unwrap(); + }, + AllMessages::RuntimeApi(RuntimeApiMessage::Request( + _new_leaf, + RuntimeApiRequest::FetchOnChainVotes(tx), + )) => { + //add some `BackedCandidates` or resolved disputes here as needed + tx.send(Ok(Some(ScrapedOnChainVotes { + session, + backing_validators_per_candidate: Vec::default(), + disputes: MultiDisputeStatementSet::default(), + }))) + .unwrap(); + }, + AllMessages::ChainApi(ChainApiMessage::Ancestors { hash, k, response_channel }) => { + 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(), + ); } - ); - gum::trace!("After answering runtime API request (votes)"); + let _ = response_channel.send(Ok(response)); }, msg => { panic!("Received unexpected message in `handle_sync_queries`: {:?}", msg); @@ -519,7 +573,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(), @@ -540,7 +594,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. @@ -608,6 +689,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| { @@ -625,31 +718,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 @@ -682,7 +769,10 @@ fn too_many_unconfirmed_statements_are_considered_spam() { }) .await; - assert_eq!(rx.await.unwrap(), vec![(session, candidate_hash1)]); + assert_eq!( + rx.await.unwrap(), + vec![(session, candidate_hash1, DisputeStatus::Active)] + ); let (tx, rx) = oneshot::channel(); virtual_overseer @@ -695,7 +785,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); } @@ -759,18 +849,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), @@ -812,7 +899,10 @@ fn approval_vote_import_works() { }) .await; - assert_eq!(rx.await.unwrap(), vec![(session, candidate_hash1)]); + assert_eq!( + rx.await.unwrap(), + vec![(session, candidate_hash1, DisputeStatus::Active)] + ); let (tx, rx) = oneshot::channel(); virtual_overseer @@ -825,8 +915,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); } @@ -865,41 +958,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 { @@ -934,7 +1011,10 @@ fn dispute_gets_confirmed_via_participation() { }) .await; - assert_eq!(rx.await.unwrap(), vec![(session, candidate_hash1)]); + assert_eq!( + rx.await.unwrap(), + vec![(session, candidate_hash1, DisputeStatus::Active)] + ); let (tx, rx) = oneshot::channel(); virtual_overseer @@ -947,7 +1027,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); } @@ -982,7 +1062,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); } @@ -1016,59 +1096,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 { @@ -1099,7 +1155,10 @@ fn dispute_gets_confirmed_at_byzantine_threshold() { }) .await; - assert_eq!(rx.await.unwrap(), vec![(session, candidate_hash1)]); + assert_eq!( + rx.await.unwrap(), + vec![(session, candidate_hash1, DisputeStatus::Confirmed)] + ); let (tx, rx) = oneshot::channel(); virtual_overseer @@ -1112,7 +1171,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); } @@ -1147,7 +1206,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); } @@ -1226,7 +1285,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); } @@ -1267,7 +1326,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; @@ -1300,23 +1359,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( @@ -1358,7 +1409,10 @@ fn conflicting_votes_lead_to_dispute_participation() { }) .await; - assert_eq!(rx.await.unwrap(), vec![(session, candidate_hash)]); + assert_eq!( + rx.await.unwrap(), + vec![(session, candidate_hash, DisputeStatus::Active)] + ); let (tx, rx) = oneshot::channel(); virtual_overseer @@ -1371,7 +1425,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); } @@ -1398,7 +1452,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); } @@ -1482,7 +1536,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()); } @@ -1518,7 +1572,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()); } @@ -1547,23 +1601,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 { @@ -1632,23 +1678,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 { @@ -1752,23 +1790,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 { @@ -1899,23 +1929,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 { @@ -2024,23 +2046,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 @@ -2147,23 +2161,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 @@ -2222,68 +2228,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, }, }) @@ -2344,23 +2309,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 @@ -2436,23 +2393,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 @@ -2540,23 +2489,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 @@ -2736,22 +2677,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 @@ -2821,6 +2755,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(), @@ -2834,12 +2774,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 }) }); @@ -2996,23 +2930,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 { @@ -3052,7 +2978,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); } @@ -3096,23 +3022,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 { @@ -3148,7 +3066,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 { @@ -3160,7 +3078,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); } @@ -3170,3 +3088,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 07426ef1a75b..e92626e3afca 100644 --- a/node/core/provisioner/src/disputes/prioritized_selection/mod.rs +++ b/node/core/provisioner/src/disputes/prioritized_selection/mod.rs @@ -28,7 +28,7 @@ use polkadot_node_subsystem::{ }; use polkadot_primitives::v2::{ supermajority_threshold, CandidateHash, DisputeState, DisputeStatement, DisputeStatementSet, - Hash, MultiDisputeStatementSet, SessionIndex, ValidatorIndex, + Hash, MultiDisputeStatementSet, SessionIndex, ValidDisputeStatementKind, ValidatorIndex, }; use std::{ collections::{BTreeMap, HashMap}, @@ -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! @@ -139,6 +139,13 @@ where onchain.len(), ); + // Filter out unconfirmed disputes. However if the dispute is already onchain - don't skip it. + // In this case we'd better push as much fresh votes as possible to bring it to conclusion faster. + let recent_disputes = recent_disputes + .into_iter() + .filter(|d| d.2.is_confirmed_concluded() || onchain.contains_key(&(d.0, d.1))) + .collect::>(); + let partitioned = partition_recent_disputes(recent_disputes, &onchain); metrics.on_partition_recent_disputes(&partitioned); @@ -209,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); @@ -355,10 +364,20 @@ fn is_vote_worth_to_keep( dispute_statement: DisputeStatement, onchain_state: &DisputeState, ) -> bool { - let offchain_vote = match dispute_statement { - DisputeStatement::Valid(_) => true, - DisputeStatement::Invalid(_) => false, + let (offchain_vote, valid_kind) = match dispute_statement { + DisputeStatement::Valid(kind) => (true, Some(kind)), + DisputeStatement::Invalid(_) => (false, None), }; + // We want to keep all backing votes. This maximizes the number of backers + // punished when misbehaving. + if let Some(kind) = valid_kind { + match kind { + ValidDisputeStatementKind::BackingValid(_) | + ValidDisputeStatementKind::BackingSeconded(_) => return true, + _ => (), + } + } + let in_validators_for = onchain_state .validators_for .get(validator_index.0 as usize) diff --git a/node/core/provisioner/src/disputes/prioritized_selection/tests.rs b/node/core/provisioner/src/disputes/prioritized_selection/tests.rs index f76107dc65d4..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(), }, ); @@ -426,7 +428,7 @@ impl TestDisputes { pub fn add_unconfirmed_disputes_concluded_onchain( &mut self, dispute_count: usize, - ) -> (u32, usize) { + ) -> (SessionIndex, usize) { let local_votes_count = self.validators_count * 90 / 100; let onchain_votes_count = self.validators_count * 80 / 100; let session_idx = 0; @@ -444,7 +446,7 @@ impl TestDisputes { pub fn add_unconfirmed_disputes_unconcluded_onchain( &mut self, dispute_count: usize, - ) -> (u32, usize) { + ) -> (SessionIndex, usize) { let local_votes_count = self.validators_count * 90 / 100; let onchain_votes_count = self.validators_count * 40 / 100; let session_idx = 1; @@ -459,22 +461,25 @@ impl TestDisputes { (session_idx, (local_votes_count - onchain_votes_count) * dispute_count) } - pub fn add_unconfirmed_disputes_unknown_onchain( + pub fn add_confirmed_disputes_unknown_onchain( &mut self, dispute_count: usize, - ) -> (u32, usize) { + ) -> (SessionIndex, usize) { let local_votes_count = self.validators_count * 90 / 100; let session_idx = 2; let lf = leaf(); let dummy_receipt = test_helpers::dummy_candidate_receipt(lf.hash.clone()); for _ in 0..dispute_count { - let d = (session_idx, CandidateHash(Hash::random()), DisputeStatus::Active); + let d = (session_idx, CandidateHash(Hash::random()), DisputeStatus::Confirmed); self.add_offchain_dispute(d.clone(), local_votes_count, dummy_receipt.clone()); } (session_idx, local_votes_count * dispute_count) } - pub fn add_concluded_disputes_known_onchain(&mut self, dispute_count: usize) -> (u32, usize) { + pub fn add_concluded_disputes_known_onchain( + &mut self, + dispute_count: usize, + ) -> (SessionIndex, usize) { let local_votes_count = self.validators_count * 90 / 100; let onchain_votes_count = self.validators_count * 75 / 100; let session_idx = 3; @@ -488,7 +493,10 @@ impl TestDisputes { (session_idx, (local_votes_count - onchain_votes_count) * dispute_count) } - pub fn add_concluded_disputes_unknown_onchain(&mut self, dispute_count: usize) -> (u32, usize) { + pub fn add_concluded_disputes_unknown_onchain( + &mut self, + dispute_count: usize, + ) -> (SessionIndex, usize) { let local_votes_count = self.validators_count * 90 / 100; let session_idx = 4; let lf = leaf(); @@ -500,6 +508,40 @@ impl TestDisputes { (session_idx, local_votes_count * dispute_count) } + pub fn add_unconfirmed_disputes_known_onchain( + &mut self, + dispute_count: usize, + ) -> (SessionIndex, usize) { + let local_votes_count = self.validators_count * 10 / 100; + let onchain_votes_count = self.validators_count * 10 / 100; + let session_idx = 5; + let lf = leaf(); + let dummy_receipt = test_helpers::dummy_candidate_receipt(lf.hash.clone()); + for _ in 0..dispute_count { + let d = (session_idx, CandidateHash(Hash::random()), DisputeStatus::Active); + self.add_offchain_dispute(d.clone(), local_votes_count, dummy_receipt.clone()); + self.add_onchain_dispute(d, onchain_votes_count); + } + + (session_idx, (local_votes_count - onchain_votes_count) * dispute_count) + } + + pub fn add_unconfirmed_disputes_unknown_onchain( + &mut self, + dispute_count: usize, + ) -> (SessionIndex, usize) { + let local_votes_count = self.validators_count * 10 / 100; + let session_idx = 6; + let lf = leaf(); + let dummy_receipt = test_helpers::dummy_candidate_receipt(lf.hash.clone()); + for _ in 0..dispute_count { + let d = (session_idx, CandidateHash(Hash::random()), DisputeStatus::Active); + self.add_offchain_dispute(d.clone(), local_votes_count, dummy_receipt.clone()); + } + + (session_idx, local_votes_count * dispute_count) + } + fn generate_local_votes( statement_kind: T, start_idx: usize, @@ -554,9 +596,9 @@ fn normal_flow() { // concluded disputes known onchain - these should be ignored let (_, _) = input.add_concluded_disputes_known_onchain(DISPUTES_PER_BATCH); - // active disputes unknown onchain + // confirmed disputes unknown onchain let (second_idx, second_votes) = - input.add_unconfirmed_disputes_unknown_onchain(DISPUTES_PER_BATCH); + input.add_confirmed_disputes_unknown_onchain(DISPUTES_PER_BATCH); let metrics = metrics::Metrics::new_dummy(); let mut vote_queries: usize = 0; @@ -635,8 +677,8 @@ fn many_batches() { // concluded disputes known onchain input.add_concluded_disputes_known_onchain(DISPUTES_PER_PARTITION); - // active disputes unknown onchain - input.add_unconfirmed_disputes_unknown_onchain(DISPUTES_PER_PARTITION); + // confirmed disputes unknown onchain + input.add_confirmed_disputes_unknown_onchain(DISPUTES_PER_PARTITION); let metrics = metrics::Metrics::new_dummy(); let mut vote_queries: usize = 0; @@ -720,3 +762,30 @@ fn votes_above_limit() { ACCEPTABLE_RUNTIME_VOTES_QUERIES_COUNT ); } + +#[test] +fn unconfirmed_are_handled_correctly() { + const VALIDATOR_COUNT: usize = 10; + const DISPUTES_PER_PARTITION: usize = 50; + + let mut input = TestDisputes::new(VALIDATOR_COUNT); + + // Add unconfirmed known onchain -> this should be pushed + let (pushed_idx, _) = input.add_unconfirmed_disputes_known_onchain(DISPUTES_PER_PARTITION); + + // Add unconfirmed unknown onchain -> this should be ignored + input.add_unconfirmed_disputes_unknown_onchain(DISPUTES_PER_PARTITION); + + let metrics = metrics::Metrics::new_dummy(); + let mut vote_queries: usize = 0; + test_harness( + |r| mock_overseer(r, &mut input, &mut vote_queries), + |mut tx: TestSubsystemSender| async move { + let lf = leaf(); + let result = select_disputes(&mut tx, &metrics, &lf).await; + + assert!(result.len() == DISPUTES_PER_PARTITION); + result.iter().for_each(|d| assert!(d.session == pushed_idx)); + }, + ); +} diff --git a/node/core/provisioner/src/disputes/random_selection/mod.rs b/node/core/provisioner/src/disputes/random_selection/mod.rs index a25d3445ac6e..9a827475aa55 100644 --- a/node/core/provisioner/src/disputes/random_selection/mod.rs +++ b/node/core/provisioner/src/disputes/random_selection/mod.rs @@ -42,51 +42,35 @@ enum RequestType { } /// Request open disputes identified by `CandidateHash` and the `SessionIndex`. -async fn request_disputes( +/// Returns only confirmed/concluded disputes. The rest are filtered out. +async fn request_confirmed_disputes( sender: &mut impl overseer::ProvisionerSenderTrait, active_or_recent: RequestType, ) -> Vec<(SessionIndex, CandidateHash)> { - let disputes = match active_or_recent { - RequestType::Recent => { - let (tx, rx) = oneshot::channel(); - let msg = DisputeCoordinatorMessage::RecentDisputes(tx); - sender.send_unbounded_message(msg); - let recent_disputes = match rx.await { - Ok(r) => r, - Err(oneshot::Canceled) => { - gum::warn!( - target: LOG_TARGET, - "Channel closed: unable to gather {:?} disputes", - active_or_recent - ); - Vec::new() - }, - }; - recent_disputes - .into_iter() - .map(|(sesion_idx, candodate_hash, _)| (sesion_idx, candodate_hash)) - .collect::>() - }, - RequestType::Active => { - let (tx, rx) = oneshot::channel(); - let msg = DisputeCoordinatorMessage::ActiveDisputes(tx); - sender.send_unbounded_message(msg); - let active_disputes = match rx.await { - Ok(r) => r, - Err(oneshot::Canceled) => { - gum::warn!( - target: LOG_TARGET, - "Unable to gather {:?} disputes", - active_or_recent - ); - Vec::new() - }, - }; - active_disputes + let (tx, rx) = oneshot::channel(); + let msg = match active_or_recent { + RequestType::Recent => DisputeCoordinatorMessage::RecentDisputes(tx), + RequestType::Active => DisputeCoordinatorMessage::ActiveDisputes(tx), + }; + + sender.send_unbounded_message(msg); + let disputes = match rx.await { + Ok(r) => r, + Err(oneshot::Canceled) => { + gum::warn!( + target: LOG_TARGET, + "Channel closed: unable to gather {:?} disputes", + active_or_recent + ); + Vec::new() }, }; disputes + .into_iter() + .filter(|d| d.2.is_confirmed_concluded()) + .map(|d| (d.0, d.1)) + .collect() } /// Extend `acc` by `n` random, picks of not-yet-present in `acc` items of `recent` without repetition and additions of recent. @@ -132,7 +116,7 @@ where // In case of an overload condition, we limit ourselves to active disputes, and fill up to the // upper bound of disputes to pass to wasm `fn create_inherent_data`. // If the active ones are already exceeding the bounds, randomly select a subset. - let recent = request_disputes(sender, RequestType::Recent).await; + let recent = request_confirmed_disputes(sender, RequestType::Recent).await; let disputes = if recent.len() > MAX_DISPUTES_FORWARDED_TO_RUNTIME { gum::warn!( target: LOG_TARGET, @@ -140,7 +124,7 @@ where recent.len(), MAX_DISPUTES_FORWARDED_TO_RUNTIME ); - let mut active = request_disputes(sender, RequestType::Active).await; + let mut active = request_confirmed_disputes(sender, RequestType::Active).await; let n_active = active.len(); let active = if active.len() > MAX_DISPUTES_FORWARDED_TO_RUNTIME { let mut picked = Vec::with_capacity(MAX_DISPUTES_FORWARDED_TO_RUNTIME); 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..96aed4eae7a8 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. @@ -525,6 +525,16 @@ async fn handle_execute_pvf( }, ArtifactState::FailedToProcess { last_time_failed, num_failures, error } => { if can_retry_prepare_after_failure(*last_time_failed, *num_failures, error) { + gum::debug!( + target: LOG_TARGET, + ?pvf, + ?artifact_id, + ?last_time_failed, + %num_failures, + %error, + "handle_execute_pvf: Re-trying failed PVF preparation." + ); + // If we are allowed to retry the failed prepare job, change the state to // Preparing and re-queue this job. *state = ArtifactState::Preparing { @@ -563,7 +573,7 @@ async fn handle_execute_pvf( awaiting_prepare.add(artifact_id, execution_timeout, params, result_tx); } - return Ok(()) + Ok(()) } async fn handle_heads_up( @@ -585,6 +595,16 @@ async fn handle_heads_up( }, ArtifactState::FailedToProcess { last_time_failed, num_failures, error } => { if can_retry_prepare_after_failure(*last_time_failed, *num_failures, error) { + gum::debug!( + target: LOG_TARGET, + ?active_pvf, + ?artifact_id, + ?last_time_failed, + %num_failures, + %error, + "handle_heads_up: Re-trying failed PVF preparation." + ); + // If we are allowed to retry the failed prepare job, change the state to // Preparing and re-queue this job. *state = ArtifactState::Preparing { @@ -701,11 +721,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 +796,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 +1036,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 +1107,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 +1123,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 +1175,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 +1282,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 +1295,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(_)); } } @@ -1381,7 +1413,7 @@ mod tests { } // Test that multiple execution requests don't trigger preparation retries if the first one - // failed due to reproducible error (e.g. Prevalidation). + // failed due to a reproducible error (e.g. Prevalidation). #[async_std::test] async fn test_execute_prepare_no_retry() { let mut test = Builder::default().build(); @@ -1511,7 +1543,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..7d8ed54e812b 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -1,21 +1,20 @@ [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" } polkadot-primitives = { path = "../../../primitives" } +polkadot-node-metrics = { path = "../../metrics" } polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem-types = { path = "../../subsystem-types" } -polkadot-node-subsystem-util = { path = "../../subsystem-util" } [dev-dependencies] sp-api = { 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/core/runtime-api/src/metrics.rs b/node/core/runtime-api/src/metrics.rs index c6affaf38914..d9459d1ad57b 100644 --- a/node/core/runtime-api/src/metrics.rs +++ b/node/core/runtime-api/src/metrics.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use polkadot_node_subsystem_util::metrics::{self, prometheus}; +use polkadot_node_metrics::metrics::{self, prometheus}; #[derive(Clone)] pub(crate) struct MetricsInner { 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..938ae3853e39 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.24.1" 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..815df94a8488 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.24.1" 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..6df854072aa6 100644 --- a/node/network/approval-distribution/Cargo.toml +++ b/node/network/approval-distribution/Cargo.toml @@ -1,14 +1,14 @@ [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" } +polkadot-node-metrics = { path = "../../metrics" } polkadot-node-network-protocol = { path = "../protocol" } +polkadot-node-primitives = { path = "../../primitives" } polkadot-node-subsystem = { path = "../../subsystem" } -polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-primitives = { path = "../../../primitives" } rand = "0.8" 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..47bae7065a05 100644 --- a/node/network/approval-distribution/src/metrics.rs +++ b/node/network/approval-distribution/src/metrics.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use polkadot_node_subsystem_util::metrics::{prometheus, Metrics as MetricsTrait}; +use polkadot_node_metrics::metrics::{prometheus, Metrics as MetricsTrait}; /// Approval Distribution metrics. #[derive(Default, Clone)] @@ -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..2d68cdb4d808 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" @@ -14,10 +14,10 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } +polkadot-node-metrics = { path = "../../metrics"} +polkadot-node-network-protocol = { path = "../protocol" } polkadot-node-subsystem = {path = "../../subsystem" } polkadot-overseer = { path = "../../overseer" } -polkadot-node-network-protocol = { path = "../protocol" } -polkadot-node-subsystem-util = { path = "../../subsystem-util"} parking_lot = "0.12.0" bytes = "1" fatality = "0.0.6" @@ -26,6 +26,7 @@ thiserror = "1" [dev-dependencies] assert_matches = "1.4.0" polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } +polkadot-node-subsystem-util = { path = "../../subsystem-util"} sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } futures-timer = "3" diff --git a/node/network/bridge/src/metrics.rs b/node/network/bridge/src/metrics.rs index 52b3629a66ad..5ca392ee33f8 100644 --- a/node/network/bridge/src/metrics.rs +++ b/node/network/bridge/src/metrics.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see . use super::{PeerSet, ProtocolVersion}; -use polkadot_node_subsystem_util::metrics::{self, prometheus}; +use polkadot_node_metrics::metrics::{self, prometheus}; /// Metrics for the network bridge. #[derive(Clone, Default)] 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 0cb89b19b0ee..1d3052d3a218 100644 --- a/node/network/bridge/src/rx/mod.rs +++ b/node/network/bridge/src/rx/mod.rs @@ -125,7 +125,7 @@ where let future = run_network_in(self, ctx, network_stream) .map_err(|e| SubsystemError::with_origin("network-bridge", e)) .boxed(); - SpawnedSubsystem { name: "network-bridge-subsystem", future } + SpawnedSubsystem { name: "network-bridge-rx-subsystem", future } } } @@ -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/bridge/src/tx/mod.rs b/node/network/bridge/src/tx/mod.rs index 47f095fdf273..32a0ecaf7510 100644 --- a/node/network/bridge/src/tx/mod.rs +++ b/node/network/bridge/src/tx/mod.rs @@ -90,7 +90,7 @@ where let future = run_network_out(self, ctx) .map_err(|e| SubsystemError::with_origin("network-bridge", e)) .boxed(); - SpawnedSubsystem { name: "network-bridge-subsystem", future } + SpawnedSubsystem { name: "network-bridge-tx-subsystem", future } } } 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 331fe12c61e2..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(()), @@ -430,7 +439,9 @@ async fn get_active_disputes( // Caller scope is in `update_leaves` and this is bounded by fork count. ctx.send_unbounded_message(DisputeCoordinatorMessage::ActiveDisputes(tx)); - rx.await.map_err(|_| JfyiError::AskActiveDisputesCanceled) + rx.await + .map_err(|_| JfyiError::AskActiveDisputesCanceled) + .map(|disputes| disputes.into_iter().map(|d| (d.0, d.1)).collect()) } /// Get all locally available dispute votes for a given dispute. 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/dispute-distribution/src/tests/mod.rs b/node/network/dispute-distribution/src/tests/mod.rs index 56cdd467fd62..d6381239965b 100644 --- a/node/network/dispute-distribution/src/tests/mod.rs +++ b/node/network/dispute-distribution/src/tests/mod.rs @@ -45,7 +45,7 @@ use polkadot_node_network_protocol::{ request_response::{v1::DisputeResponse, Recipient, Requests}, IfDisconnected, }; -use polkadot_node_primitives::{CandidateVotes, UncheckedDisputeMessage}; +use polkadot_node_primitives::{CandidateVotes, DisputeStatus, UncheckedDisputeMessage}; use polkadot_node_subsystem::{ messages::{ AllMessages, DisputeCoordinatorMessage, DisputeDistributionMessage, ImportStatementsResult, @@ -658,7 +658,7 @@ fn dispute_retries_and_works_across_session_boundaries() { Some(old_head), MOCK_SESSION_INDEX, None, - vec![(MOCK_SESSION_INDEX, candidate.hash())], + vec![(MOCK_SESSION_INDEX, candidate.hash(), DisputeStatus::Active)], ) .await; @@ -673,7 +673,7 @@ fn dispute_retries_and_works_across_session_boundaries() { Some(old_head2), MOCK_NEXT_SESSION_INDEX, Some(MOCK_NEXT_SESSION_INFO.clone()), - vec![(MOCK_SESSION_INDEX, candidate.hash())], + vec![(MOCK_SESSION_INDEX, candidate.hash(), DisputeStatus::Active)], ) .await; @@ -832,7 +832,7 @@ async fn activate_leaf( // New session if we expect the subsystem to request it. new_session: Option, // Currently active disputes to send to the subsystem. - active_disputes: Vec<(SessionIndex, CandidateHash)>, + active_disputes: Vec<(SessionIndex, CandidateHash, DisputeStatus)>, ) { let has_active_disputes = !active_disputes.is_empty(); handle @@ -934,7 +934,10 @@ async fn handle_subsystem_startup( None, MOCK_SESSION_INDEX, Some(MOCK_SESSION_INFO.clone()), - ongoing_dispute.into_iter().map(|c| (MOCK_SESSION_INDEX, c)).collect(), + ongoing_dispute + .into_iter() + .map(|c| (MOCK_SESSION_INDEX, c, DisputeStatus::Active)) + .collect(), ) .await; relay_parent 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 5d369a723dfb..581f40aff4d6 100644 --- a/node/service/chain-specs/kusama.json +++ b/node/service/chain-specs/kusama.json @@ -21,7 +21,11 @@ "/dns/kusama-bootnode-1.paritytech.net/tcp/30333/p2p/12D3KooWQKqane1SqWJNWMQkbia9qiMWXkcHtAdfW5eVF8hbwEDw", "/dns/kusama-bootnode.dwellir.com/tcp/30333/ws/p2p/12D3KooWFj2ndawdYyk2spc42Y2arYwb2TUoHLHFAsKuHRzWXwoJ", "/dns/boot.stake.plus/tcp/31333/p2p/12D3KooWLa1UyG5xLPds2GbiRBCTJjpsVwRWHWN7Dff14yiNJRpR", - "/dns/boot.stake.plus/tcp/31334/wss/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/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 1a5ef94987de..8fc8ac63ba32 100644 --- a/node/service/chain-specs/polkadot.json +++ b/node/service/chain-specs/polkadot.json @@ -21,7 +21,11 @@ "/dns/cc1-1.parity.tech/tcp/30333/p2p/12D3KooWFN2mhgpkJsDBuNuE5427AcDrsib8EoqGMZmkxWwx3Md4", "/dns/polkadot-bootnode.dwellir.com/tcp/30333/ws/p2p/12D3KooWKvdDyRKqUfSAaUCbYiLwKY8uK3wDWpCuy2FiDLbkPTDJ", "/dns/boot.stake.plus/tcp/30333/p2p/12D3KooWKT4ZHNxXH4icMjdrv7EwWBkfbz5duxE5sdJKKeWFYi5n", - "/dns/boot.stake.plus/tcp/30334/wss/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/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 03f1f5ecf6b0..6527d81001df 100644 --- a/node/service/chain-specs/westend.json +++ b/node/service/chain-specs/westend.json @@ -13,7 +13,11 @@ "/dns/westend-connect-0.polkadot.io/tcp/443/wss/p2p/12D3KooWNg8iUqhux7X7voNU9Nty5pzehrFJwkQwg1CJnqN3CTzE", "/dns/westend-connect-1.polkadot.io/tcp/443/wss/p2p/12D3KooWAq2A7UNFS6725XFatD5QW7iYBezTLdAUx1SmRkxN79Ne", "/dns/boot.stake.plus/tcp/32333/p2p/12D3KooWK8fjVoSvMq5copQYMsdYreSGPGgcMbGMgbMDPfpf3sm7", - "/dns/boot.stake.plus/tcp/32334/wss/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/westend.bootnode.amforc.com/tcp/30333/p2p/12D3KooWJ5y9ZgVepBQNW4aabrxgmnrApdVnscqgKWiUu4BNJbC8", + "/dns/westend.bootnode.amforc.com/tcp/30334/wss/p2p/12D3KooWJ5y9ZgVepBQNW4aabrxgmnrApdVnscqgKWiUu4BNJbC8" ], "telemetryEndpoints": [ [ @@ -133,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 b8080641771a..2fd787f77e5d 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -765,10 +765,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(), } } @@ -1071,11 +1071,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(), } } @@ -1464,10 +1464,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(), } } @@ -1627,12 +1627,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 6e4983813984..bf1dbe552f5f 100644 --- a/node/subsystem-types/src/messages.rs +++ b/node/subsystem-types/src/messages.rs @@ -58,12 +58,6 @@ use std::{ pub mod network_bridge_event; pub use network_bridge_event::NetworkBridgeEvent; -/// Subsystem messages where each message is always bound to a relay parent. -pub trait BoundToRelayParent { - /// Returns the relay parent this message is bound to. - fn relay_parent(&self) -> Hash; -} - /// Messages received by the Candidate Backing subsystem. #[derive(Debug)] pub enum CandidateBackingMessage { @@ -78,16 +72,6 @@ pub enum CandidateBackingMessage { Statement(Hash, SignedFullStatement), } -impl BoundToRelayParent for CandidateBackingMessage { - fn relay_parent(&self) -> Hash { - match self { - Self::GetBackedCandidates(hash, _, _) => *hash, - Self::Second(hash, _, _) => *hash, - Self::Statement(hash, _) => *hash, - } - } -} - /// Blanket error for validation failing for internal reasons. #[derive(Debug, Error)] #[error("Validation failed with {0:?}")] @@ -170,17 +154,6 @@ pub enum CandidateValidationMessage { ), } -impl CandidateValidationMessage { - /// If the current variant contains the relay parent hash, return it. - pub fn relay_parent(&self) -> Option { - match self { - Self::ValidateFromChainState(_, _, _, _) => None, - Self::ValidateFromExhaustive(_, _, _, _, _, _) => None, - Self::PreCheck(relay_parent, _, _) => Some(*relay_parent), - } - } -} - /// Messages received by the Collator Protocol subsystem. #[derive(Debug, derive_more::From)] pub enum CollatorProtocolMessage { @@ -218,12 +191,6 @@ impl Default for CollatorProtocolMessage { } } -impl BoundToRelayParent for CollatorProtocolMessage { - fn relay_parent(&self) -> Hash { - Default::default() - } -} - /// Messages received by the dispute coordinator subsystem. /// /// NOTE: Any response oneshots might get cancelled if the `DisputeCoordinator` was not yet @@ -268,13 +235,13 @@ pub enum DisputeCoordinatorMessage { /// - or the imported statements are backing/approval votes, which are always accepted. pending_confirmation: Option>, }, - /// Fetch a list of all recent disputes the co-ordinator is aware of. + /// Fetch a list of all recent disputes the coordinator is aware of. /// These are disputes which have occurred any time in recent sessions, /// and which may have already concluded. RecentDisputes(oneshot::Sender>), /// Fetch a list of all active disputes that the coordinator is aware of. /// These disputes are either not yet concluded or recently concluded. - ActiveDisputes(oneshot::Sender>), + ActiveDisputes(oneshot::Sender>), /// Get candidate votes for a candidate. QueryCandidateVotes( Vec<(SessionIndex, CandidateHash)>, @@ -397,23 +364,6 @@ pub enum NetworkBridgeTxMessage { }, } -impl NetworkBridgeTxMessage { - /// If the current variant contains the relay parent hash, return it. - pub fn relay_parent(&self) -> Option { - match self { - Self::ReportPeer(_, _) => None, - Self::DisconnectPeer(_, _) => None, - Self::SendValidationMessage(_, _) => None, - Self::SendCollationMessage(_, _) => None, - Self::SendValidationMessages(_) => None, - Self::SendCollationMessages(_) => None, - Self::ConnectToValidators { .. } => None, - Self::ConnectToResolvedValidators { .. } => None, - Self::SendRequests { .. } => None, - } - } -} - /// Availability Distribution Message. #[derive(Debug)] pub enum AvailabilityDistributionMessage { @@ -463,28 +413,6 @@ pub enum BitfieldDistributionMessage { NetworkBridgeUpdate(NetworkBridgeEvent), } -impl BitfieldDistributionMessage { - /// If the current variant contains the relay parent hash, return it. - pub fn relay_parent(&self) -> Option { - match self { - Self::DistributeBitfield(hash, _) => Some(*hash), - Self::NetworkBridgeUpdate(_) => None, - } - } -} - -/// 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 { @@ -538,15 +466,6 @@ 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, - } - } -} - /// A response channel for the result of a chain API request. pub type ChainApiResponseChannel = oneshot::Sender>; @@ -589,13 +508,6 @@ pub enum ChainApiMessage { }, } -impl ChainApiMessage { - /// If the current variant contains the relay parent hash, return it. - pub fn relay_parent(&self) -> Option { - None - } -} - /// Chain selection subsystem messages #[derive(Debug)] pub enum ChainSelectionMessage { @@ -608,20 +520,6 @@ pub enum ChainSelectionMessage { BestLeafContaining(Hash, oneshot::Sender>), } -impl ChainSelectionMessage { - /// If the current variant contains the relay parent hash, return it. - pub fn relay_parent(&self) -> Option { - // None of the messages, even the ones containing specific - // block hashes, can be considered to have those blocks as - // a relay parent. - match *self { - ChainSelectionMessage::Approved(_) => None, - ChainSelectionMessage::Leaves(_) => None, - ChainSelectionMessage::BestLeafContaining(..) => None, - } - } -} - /// A sender for the result of a runtime API request. pub type RuntimeApiSender = oneshot::Sender>; @@ -716,15 +614,6 @@ pub enum RuntimeApiMessage { Request(Hash, RuntimeApiRequest), } -impl RuntimeApiMessage { - /// If the current variant contains the relay parent hash, return it. - pub fn relay_parent(&self) -> Option { - match self { - Self::Request(hash, _) => Some(*hash), - } - } -} - /// Statement distribution message. #[derive(Debug, derive_more::From)] pub enum StatementDistributionMessage { @@ -776,15 +665,6 @@ pub enum ProvisionerMessage { ProvisionableData(Hash, ProvisionableData), } -impl BoundToRelayParent for ProvisionerMessage { - fn relay_parent(&self) -> Hash { - match self { - Self::RequestInherentData(hash, _) => *hash, - Self::ProvisionableData(hash, _) => *hash, - } - } -} - /// Message to the Collation Generation subsystem. #[derive(Debug)] pub enum CollationGenerationMessage { @@ -792,13 +672,6 @@ pub enum CollationGenerationMessage { Initialize(CollationGenerationConfig), } -impl CollationGenerationMessage { - /// If the current variant contains the relay parent hash, return it. - pub fn relay_parent(&self) -> Option { - None - } -} - /// The result type of [`ApprovalVotingMessage::CheckAndImportAssignment`] request. #[derive(Debug, Clone, PartialEq, Eq)] pub enum AssignmentCheckResult { @@ -952,9 +825,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..9fc695210a82 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.24.1" # 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.24.1", 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..f80ff23dd6ac 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.24.1", 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..51b9ccad8097 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.24.1", 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..36a40cb779ec 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.24.1", 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 5b01e09d1178..0fb7b83a5944 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}; @@ -418,16 +376,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; @@ -477,7 +425,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, @@ -519,7 +467,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, @@ -556,7 +503,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, @@ -637,7 +584,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, @@ -658,7 +605,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, @@ -778,7 +725,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) { @@ -799,7 +746,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 { @@ -816,7 +763,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 { @@ -858,7 +805,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, @@ -946,7 +893,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 @@ -963,7 +910,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, @@ -982,7 +928,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, @@ -992,7 +938,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)] @@ -1043,7 +989,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. @@ -1062,7 +1008,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, @@ -1251,7 +1197,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)] @@ -1332,7 +1277,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)] @@ -1350,7 +1294,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)] @@ -1379,7 +1322,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, @@ -1444,22 +1386,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 { @@ -1476,7 +1402,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. @@ -1612,7 +1537,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 { @@ -1691,7 +1616,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. @@ -1717,7 +1642,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. /// @@ -1777,7 +1701,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. /// @@ -1793,7 +1717,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/collators/collation-generation.md b/roadmap/implementers-guide/src/node/collators/collation-generation.md index 0a17a8619ab1..d7c62fee39f8 100644 --- a/roadmap/implementers-guide/src/node/collators/collation-generation.md +++ b/roadmap/implementers-guide/src/node/collators/collation-generation.md @@ -99,7 +99,6 @@ On `ActiveLeavesUpdate`: * If there is no collation generation config, ignore. * Otherwise, for each `activated` head in the update: * Determine if the para is scheduled on any core by fetching the `availability_cores` Runtime API. - > TODO: figure out what to do in the case of occupied cores; see [this issue](https://github.com/paritytech/polkadot/issues/1573). * Determine an occupied core assumption to make about the para. Scheduled cores can make `OccupiedCoreAssumption::Free`. * Use the Runtime API subsystem to fetch the full validation data. * Invoke the `collator`, and use its outputs to produce a `CandidateReceipt`, signed with the configuration's `key`. 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/chain-selection.md b/roadmap/implementers-guide/src/node/utility/chain-selection.md index 423b5ed406c0..fc6a9820143b 100644 --- a/roadmap/implementers-guide/src/node/utility/chain-selection.md +++ b/roadmap/implementers-guide/src/node/utility/chain-selection.md @@ -24,10 +24,13 @@ Delete data for all orphaned chains and update all metadata descending from the Update the approval status of the referenced block. If the block was stagnant and thus non-viable and is now viable, then the metadata of all of its descendants needs to be updated as well, as they may no longer be stagnant either. Update the set of viable leaves accordingly. +### `ChainSelectionMessage::Leaves` + +Gets all leaves of the chain, i.e. block hashes that are suitable to build upon and have no suitable children. Supplies the leaves in descending order by score. + ### `ChainSelectionMessage::BestLeafContaining` -If the required block is unknown or not viable, then return `None`. -Iterate over all leaves, returning the first leaf containing the required block in its chain, and `None` otherwise. +If the required block is unknown or not viable, then return `None`. Iterate over all leaves in order of descending weight, returning the first leaf containing the required block in its chain, and `None` otherwise. ### Periodically diff --git a/roadmap/implementers-guide/src/node/utility/provisioner.md b/roadmap/implementers-guide/src/node/utility/provisioner.md index e477a652a60e..fb97d52f1a8c 100644 --- a/roadmap/implementers-guide/src/node/utility/provisioner.md +++ b/roadmap/implementers-guide/src/node/utility/provisioner.md @@ -73,7 +73,7 @@ The end result of this process is a vector of `BackedCandidate`s, sorted in orde This is the point at which the block author provides further votes to active disputes or initiates new disputes in the runtime state. -The block-authoring logic of the runtime has an extra step between handling the inherent-data and producing the actual inherent call, which we assume performs the work of filtering out disputes which are not relevant to the on-chain state. +The block-authoring logic of the runtime has an extra step between handling the inherent-data and producing the actual inherent call, which we assume performs the work of filtering out disputes which are not relevant to the on-chain state. Backing votes are always kept in the dispute statement set. This ensures we punish the maximum number of misbehaving backers. To select disputes: 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/runtime/disputes.md b/roadmap/implementers-guide/src/runtime/disputes.md index 83ca86b36b04..1f1debee9cd4 100644 --- a/roadmap/implementers-guide/src/runtime/disputes.md +++ b/roadmap/implementers-guide/src/runtime/disputes.md @@ -37,12 +37,6 @@ Disputes: double_map (SessionIndex, CandidateHash) -> Option, // All included blocks on the chain, as well as the block number in this chain that // should be reverted back to if the candidate is disputed and determined to be invalid. Included: double_map (SessionIndex, CandidateHash) -> Option, -// Maps session indices to a vector indicating the number of potentially-spam disputes -// each validator is participating in. Potentially-spam disputes are remote disputes which have -// fewer than `byzantine_threshold + 1` validators. -// -// The i'th entry of the vector corresponds to the i'th validator in the session. -SpamSlots: map SessionIndex -> Option>, // Whether the chain is frozen or not. Starts as `None`. When this is `Some`, // the chain will not accept any new parachain blocks for backing or inclusion, // and its value indicates the last valid block number in the chain. @@ -55,50 +49,45 @@ Frozen: Option, ## Session Change 1. If the current session is not greater than `config.dispute_period + 1`, nothing to do here. -1. Set `pruning_target = current_session - config.dispute_period - 1`. We add the extra `1` because we want to keep things for `config.dispute_period` _full_ sessions. +1. Set `pruning_target = current_session - config.dispute_period - 1`. We add the extra `1` because we want to keep things for `config.dispute_period` _full_ sessions. The stuff at the end of the most recent session has been around for a little over 0 sessions, not a little over 1. 1. If `LastPrunedSession` is `None`, then set `LastPrunedSession` to `Some(pruning_target)` and return. -1. Otherwise, clear out all disputes, included candidates, and `SpamSlots` entries in the range `last_pruned..=pruning_target` and set `LastPrunedSession` to `Some(pruning_target)`. +2. Otherwise, clear out all disputes and included candidates entries in the range `last_pruned..=pruning_target` and set `LastPrunedSession` to `Some(pruning_target)`. ## Block Initialization -1. Iterate through all disputes. If any have not concluded and started more than `config.dispute_conclusion_by_timeout_period` blocks ago, set them to `Concluded` and mildly punish all validators associated, as they have failed to distribute available data. If the `Included` map does not contain the candidate and there are fewer than `byzantine_threshold + 1` participating validators, reduce `SpamSlots` for all participating validators. +1. Iterate through all disputes. If any have not concluded and started more than `config.dispute_conclusion_by_timeout_period` blocks ago, set them to `Concluded` and mildly punish all validators associated, as they have failed to distribute available data. ## Routines * `filter_multi_dispute_data(MultiDisputeStatementSet) -> MultiDisputeStatementSet`: 1. Takes a `MultiDisputeStatementSet` and filters it down to a `MultiDisputeStatementSet` that satisfies all the criteria of `provide_multi_dispute_data`. That is, eliminating - ancient votes, votes which overwhelm the maximum amount of spam slots, and duplicates. - This can be used by block authors to create the final submission in a block which is + ancient votes, duplicates and unconfirmed disputes. + This can be used by block authors to create the final submission in a block which is guaranteed to pass the `provide_multi_dispute_data` checks. * `provide_multi_dispute_data(MultiDisputeStatementSet) -> Vec<(SessionIndex, Hash)>`: 1. Pass on each dispute statement set to `provide_dispute_data`, propagating failure. - 1. Return a list of all candidates who just had disputes initiated. + 2. Return a list of all candidates who just had disputes initiated. * `provide_dispute_data(DisputeStatementSet) -> bool`: Provide data to an ongoing dispute or initiate a dispute. - 1. All statements must be issued under the correct session for the correct candidate. + 1. All statements must be issued under the correct session for the correct candidate. 1. `SessionInfo` is used to check statement signatures and this function should fail if any signatures are invalid. 1. If there is no dispute under `Disputes`, create a new `DisputeState` with blank bitfields. 1. If `concluded_at` is `Some`, and is `concluded_at + config.post_conclusion_acceptance_period < now`, return false. - 1. If the overlap of the validators in the `DisputeStatementSet` and those already present in the `DisputeState` is fewer in number than `byzantine_threshold + 1` and the candidate is not present in the `Included` map - 1. increment `SpamSlots` for each validator in the `DisputeStatementSet` which is not already in the `DisputeState`. Initialize the `SpamSlots` to a zeroed vector first, if necessary. do not increment `SpamSlots` if the candidate is local. - 1. If the value for any spam slot exceeds `config.dispute_max_spam_slots`, return false. - 1. If the overlap of the validators in the `DisputeStatementSet` and those already present in the `DisputeState` is at least `byzantine_threshold + 1`, the `DisputeState` has fewer than `byzantine_threshold + 1` validators, and the candidate is not present in the `Included` map, then decrease `SpamSlots` by 1 for each validator in the `DisputeState`. - 1. Import all statements into the dispute. This should fail if any statements are duplicate or if the corresponding bit for the corresponding validator is set in the dispute already. - 1. If `concluded_at` is `None`, reward all statements. - 1. If `concluded_at` is `Some`, reward all statements slightly less. - 1. If either side now has supermajority and did not previously, slash the other side. This may be both sides, and we support this possibility in code, but note that this requires validators to participate on both sides which has negative expected value. Set `concluded_at` to `Some(now)` if it was `None`. - 1. If just concluded against the candidate and the `Included` map contains `(session, candidate)`: invoke `revert_and_freeze` with the stored block number. - 1. Return true if just initiated, false otherwise. + 2. Import all statements into the dispute. This should fail if any statements are duplicate or if the corresponding bit for the corresponding validator is set in the dispute already. + 3. If `concluded_at` is `None`, reward all statements. + 4. If `concluded_at` is `Some`, reward all statements slightly less. + 5. If either side now has supermajority and did not previously, slash the other side. This may be both sides, and we support this possibility in code, but note that this requires validators to participate on both sides which has negative expected value. Set `concluded_at` to `Some(now)` if it was `None`. + 6. If just concluded against the candidate and the `Included` map contains `(session, candidate)`: invoke `revert_and_freeze` with the stored block number. + 7. Return true if just initiated, false otherwise. * `disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState)>`: Get a list of all disputes and info about dispute state. 1. Iterate over all disputes in `Disputes` and collect into a vector. * `note_included(SessionIndex, CandidateHash, included_in: BlockNumber)`: 1. Add `(SessionIndex, CandidateHash)` to the `Included` map with `included_in - 1` as the value. - 1. If there is a dispute under `(Sessionindex, CandidateHash)` with fewer than `byzantine_threshold + 1` participating validators, decrease `SpamSlots` by 1 for each validator in the `DisputeState`. 1. If there is a dispute under `(SessionIndex, CandidateHash)` that has concluded against the candidate, invoke `revert_and_freeze` with the stored block number. * `concluded_invalid(SessionIndex, CandidateHash) -> bool`: Returns whether a candidate has already concluded a dispute in the negative. @@ -111,3 +100,27 @@ Frozen: Option, 1. If `is_frozen()` return. 1. Set `Frozen` to `Some(BlockNumber)` to indicate a rollback to the block number. 1. Issue a `Revert(BlockNumber + 1)` log to indicate a rollback of the block's child in the header chain, which is the same as a rollback to the block number. + +# Disputes filtering + +All disputes delivered to the runtime by the client are filtered before the actual import. In this context actual import +means persisted in the runtime storage. The filtering has got two purposes: +- Limit the amount of data saved onchain. +- Prevent persisting malicious dispute data onchain. + +*Implementation note*: Filtering is performed in function `filter_dispute_data` from `Disputes` pallet. + +The filtering is performed on the whole statement set which is about to be imported onchain. The following filters are +applied: +1. Remove ancient disputes - if a dispute is concluded before the block number indicated in `OLDEST_ACCEPTED` parameter + it is removed from the set. `OLDEST_ACCEPTED` is a runtime configuration option. + *Implementation note*: `dispute_post_conclusion_acceptance_period` from + `HostConfiguration` is used in the current Polkadot/Kusama implementation. +2. Remove votes from unknown validators. If there is a vote from a validator which wasn't an authority in the session + where the dispute was raised - they are removed. Please note that this step removes only single votes instead of + removing the whole dispute. +3. Remove one sided disputes - if a dispute doesn't contain two opposing votes it is not imported onchain. This serves + as a measure not to import one sided disputes. A dispute is raised only if there are two opposing votes so if the + client is not sending them the dispute is a potential spam. +4. Remove unconfirmed disputes - if a dispute contains less votes than the byzantine threshold it is removed. This is + also a spam precaution. A legitimate client will send only confirmed disputes to the runtime. \ No newline at end of file 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..2fbc67eb974d 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" @@ -11,11 +11,11 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.137", default-features = false } +serde = { version = "1.0.139", 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..7d7a789d828c 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -40,10 +40,10 @@ 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}; +use primitives::v2::{AssignmentId, Balance, BlockNumber, ValidatorId}; use sp_runtime::{FixedPointNumber, Perbill, Perquintill}; use static_assertions::const_assert; @@ -69,9 +69,10 @@ pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(1); /// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used /// by Operational extrinsics. pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); +/// We allow for 2 seconds of compute with a 6 second average block time. /// 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), u64::MAX); 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..d53082803f8e 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"] } @@ -11,14 +11,14 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.137", default-features = false } +serde = { version = "1.0.139", default-features = false } serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" 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.24.1", 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..6d5dc406586c 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,17 @@ 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" + "frame-support/std", + "primitives/std", + "runtime-common/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..8cf3e95f79bb 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,23 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { } } +/// All migrations that will run on the next runtime upgrade. +/// +/// Should be cleared after every release. +pub type Migrations = ( + pallet_balances::migration::MigrateToTrackInactive, + crowdloan::migration::MigrateToTrackInactive, + pallet_referenda::migration::v1::MigrateV0ToV1, + pallet_referenda::migration::v1::MigrateV0ToV1< + Runtime, + governance::FellowshipReferendaInstance, + >, + pallet_scheduler::migration::v4::CleanupAgendas, + pallet_staking::migrations::v13::MigrateToV13, + parachains_disputes::migration::v1::MigrateToV1, + parachains_configuration::migration::v4::MigrateToV4, +); + /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -1453,17 +1507,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 +1521,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 +1536,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 +1549,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 +1749,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 +1919,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: frame_try_runtime::UpgradeCheckSelect) -> (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 +2088,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 +2239,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 e0685f98a8b8..9cad350459e6 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"] } @@ -10,7 +10,7 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.137", features = [ "derive" ], optional = true } +serde = { version = "1.0.139", features = [ "derive" ], optional = true } derive_more = "0.99.17" bitflags = "1.3.2" diff --git a/runtime/parachains/src/builder.rs b/runtime/parachains/src/builder.rs index 9a1c16e6aa1d..84651a06003e 100644 --- a/runtime/parachains/src/builder.rs +++ b/runtime/parachains/src/builder.rs @@ -575,7 +575,7 @@ impl BenchBuilder { /// Fill cores `start..last` with dispute statement sets. The statement sets will have 3/4th of /// votes be valid, and 1/4th of votes be invalid. - fn create_disputes_with_no_spam( + fn create_disputes( &self, start: u32, last: u32, @@ -664,7 +664,7 @@ impl BenchBuilder { let backed_candidates = builder .create_backed_candidates(&builder.backed_and_concluding_cores, builder.code_upgrade); - let disputes = builder.create_disputes_with_no_spam( + let disputes = builder.create_disputes( builder.backed_and_concluding_cores.len() as u32, used_cores, builder.dispute_sessions.as_slice(), diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index 719da3b9b9e7..fe90940e3b17 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::*; +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}; @@ -187,8 +187,6 @@ pub struct HostConfiguration { pub dispute_period: SessionIndex, /// How long after dispute conclusion to accept statements. pub dispute_post_conclusion_acceptance_period: BlockNumber, - /// The maximum number of dispute spam slots - pub dispute_max_spam_slots: u32, /// How long it takes for a dispute to conclude by time-out, if no supermajority is reached. pub dispute_conclusion_by_time_out_period: BlockNumber, /// The amount of consensus slots that must pass between submitting an assignment and @@ -255,7 +253,6 @@ 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, @@ -523,6 +521,7 @@ pub mod pallet { } /// Set the validation upgrade delay. + #[pallet::call_index(1)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -538,6 +537,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, @@ -553,6 +553,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, @@ -565,6 +566,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, @@ -577,6 +579,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, @@ -589,6 +592,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, @@ -601,6 +605,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, @@ -613,6 +618,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, @@ -628,6 +634,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, @@ -643,6 +650,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, @@ -658,6 +666,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, @@ -670,6 +679,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, @@ -685,6 +695,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, @@ -697,6 +708,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, @@ -709,6 +721,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, @@ -723,19 +736,8 @@ pub mod pallet { }) } - /// Set the maximum number of dispute spam slots. - #[pallet::weight(( - T::WeightInfo::set_config_with_u32(), - DispatchClass::Operational, - ))] - pub fn set_dispute_max_spam_slots(origin: OriginFor, new: u32) -> DispatchResult { - ensure_root(origin)?; - Self::schedule_config_update(|config| { - config.dispute_max_spam_slots = new; - }) - } - /// Set the dispute conclusion by time out period. + #[pallet::call_index(17)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -752,6 +754,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, @@ -764,6 +767,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, @@ -776,6 +780,7 @@ pub mod pallet { } /// Set the zeroth delay tranche width. + #[pallet::call_index(20)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -788,6 +793,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, @@ -800,6 +806,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, @@ -812,6 +819,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, @@ -824,6 +832,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, @@ -836,6 +845,7 @@ pub mod pallet { } /// Set the critical downward message size. + #[pallet::call_index(25)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -848,6 +858,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, @@ -860,6 +871,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, @@ -875,6 +887,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, @@ -886,6 +899,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, @@ -899,6 +913,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, @@ -911,6 +926,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, @@ -923,6 +939,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, @@ -935,6 +952,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, @@ -950,6 +968,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, @@ -965,6 +984,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, @@ -977,6 +997,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, @@ -992,6 +1013,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, @@ -1007,6 +1029,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, @@ -1022,6 +1045,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(), @@ -1035,6 +1059,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, @@ -1050,6 +1075,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, @@ -1066,6 +1092,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 d02f01fff796..6318276ffc7c 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -16,7 +16,7 @@ //! A module that is responsible for migration of storage. -use crate::configuration::{self, Config, Pallet, Store}; +use crate::configuration::{self, Config, Pallet, Store, MAX_POV_SIZE}; use frame_support::{pallet_prelude::*, traits::StorageVersion, weights::Weight}; use frame_system::pallet_prelude::BlockNumberFor; @@ -25,13 +25,16 @@ use frame_system::pallet_prelude::BlockNumberFor; /// v0-v1: /// v1-v2: /// v2-v3: -/// v3-v4: (remove weights) -pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(4); +/// v3-v4: +/// v4-v5: +pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(5); -pub mod v4 { +pub mod v5 { use super::*; - use frame_support::traits::OnRuntimeUpgrade; + use frame_support::{traits::OnRuntimeUpgrade, weights::constants::WEIGHT_REF_TIME_PER_MILLIS}; use primitives::v2::{Balance, SessionIndex}; + #[cfg(feature = "try-runtime")] + use sp_std::prelude::*; // Copied over from configuration.rs @ de9e147695b9f1be8bd44e07861a31e483c8343a and removed // all the comments, and changed the Weight struct to Weight @@ -132,21 +135,40 @@ pub mod v4 { } } - pub struct MigrateToV4(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateToV4 { + pub struct MigrateToV5(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for MigrateToV5 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, &'static str> { + log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade()"); + + ensure!(StorageVersion::get::>() == 4, "The migration requires version 4"); + Ok(Default::default()) + } + fn on_runtime_upgrade() -> Weight { - if StorageVersion::get::>() == 3 { - let weight_consumed = migrate_to_v4::(); + if StorageVersion::get::>() == 4 { + let weight_consumed = migrate_to_v5::(); - log::info!(target: configuration::LOG_TARGET, "MigrateToV4 executed successfully"); + log::info!(target: configuration::LOG_TARGET, "MigrateToV5 executed successfully"); STORAGE_VERSION.put::>(); - weight_consumed + weight_consumed.saturating_add(T::DbWeight::get().writes(1)) } else { - log::warn!(target: configuration::LOG_TARGET, "MigrateToV4 should be removed."); + log::warn!(target: configuration::LOG_TARGET, "MigrateToV5 should be removed."); T::DbWeight::get().reads(1) } } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { + log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade()"); + ensure!( + StorageVersion::get::>() == 5, + "Storage version should be 5 after the migration" + ); + + Ok(()) + } } } @@ -172,6 +194,7 @@ validation_upgrade_cooldown : pre.validation_upgrade_cooldown, validation_upgrade_delay : pre.validation_upgrade_delay, max_pov_size : pre.max_pov_size, max_downward_message_size : pre.max_downward_message_size, +ump_service_total_weight : pre.ump_service_total_weight, hrmp_max_parachain_outbound_channels : pre.hrmp_max_parachain_outbound_channels, hrmp_max_parathread_outbound_channels : pre.hrmp_max_parathread_outbound_channels, hrmp_sender_deposit : pre.hrmp_sender_deposit, @@ -192,13 +215,13 @@ max_validators_per_core : pre.max_validators_per_core, max_validators : pre.max_validators, dispute_period : pre.dispute_period, dispute_post_conclusion_acceptance_period: pre.dispute_post_conclusion_acceptance_period, -dispute_max_spam_slots : pre.dispute_max_spam_slots, dispute_conclusion_by_time_out_period : pre.dispute_conclusion_by_time_out_period, no_show_slots : pre.no_show_slots, n_delay_tranches : pre.n_delay_tranches, zeroth_delay_tranche_width : pre.zeroth_delay_tranche_width, needed_approvals : pre.needed_approvals, relay_vrf_modulo_samples : pre.relay_vrf_modulo_samples, +ump_max_individual_weight : pre.ump_max_individual_weight, pvf_checking_enabled : pre.pvf_checking_enabled, pvf_voting_ttl : pre.pvf_voting_ttl, minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, @@ -213,7 +236,7 @@ minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, // to be unlikely to be caused by this. So we just log. Maybe it'll work out still? log::error!( target: configuration::LOG_TARGET, - "unexpected error when performing translation of the configuration type during storage upgrade to v2." + "unexpected error when performing translation of the configuration type during storage upgrade to v4." ); } @@ -226,15 +249,28 @@ mod tests { use crate::mock::{new_test_ext, Test}; #[test] - fn v3_deserialized_from_actual_data() { - // Fetched at Kusama 14,703,780 (0x3b2c305d01bd4adf1973d32a2d55ca1260a55eea8dfb3168e317c57f2841fdf1) + fn v4_deserialized_from_actual_data() { + // Example how to get new `raw_config`: + // We'll obtain the raw_config hes for block + // 15,772,152 (0xf89d3ab5312c5f70d396dc59612f0aa65806c798346f9db4b35278baed2e0e53) on Kusama. + // Steps: + // 1. Go to Polkadot.js -> Developer -> Chain state -> Storage: https://polkadot.js.org/apps/#/chainstate + // 2. Set these parameters: + // 2.1. selected state query: configuration; activeConfig(): PolkadotRuntimeParachainsConfigurationHostConfiguration + // 2.2. blockhash to query at: 0xf89d3ab5312c5f70d396dc59612f0aa65806c798346f9db4b35278baed2e0e53 (the hash of the block) + // 2.3. Note the value of encoded storage key -> 0x06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385 for the referenced block. + // 2.4. You'll also need the decoded values to update the test. + // 3. Go to Polkadot.js -> Developer -> Chain state -> Raw storage + // 3.1 Enter the encoded storage key and you get the raw config. + + // Fetched at Kusama 15,772,152 (0xf89d3ab5312c5f70d396dc59612f0aa65806c798346f9db4b35278baed2e0e53) // // This exceeds the maximal line width length, but that's fine, since this is not code and // doesn't need to be read and also leaving it as one line allows to easily copy it. - let raw_config = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c8000000e87648170000001e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c8000000060000005802000002000000580200000200000059000000000000001e0000002800000000c817a804000000000200000014000000"]; + let raw_config = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c800000700e8764817020040011e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c8000000060000005802000002000000580200000200000059000000000000001e000000280000000700c817a80402004001000200000014000000"]; - let v3 = - v4::OldHostConfiguration::::decode(&mut &raw_config[..]) + let v4 = + v5::OldHostConfiguration::::decode(&mut &raw_config[..]) .unwrap(); // We check only a sample of the values here. If we missed any fields or messed up data types @@ -243,7 +279,6 @@ mod tests { assert_eq!(v3.validation_upgrade_cooldown, 3600); assert_eq!(v3.max_pov_size, 5_242_880); assert_eq!(v3.hrmp_channel_max_message_size, 102_400); - assert_eq!(v3.dispute_max_spam_slots, 2); assert_eq!(v3.n_delay_tranches, 89); assert_eq!(v3.ump_max_individual_weight, Weight::zero()); assert_eq!(v3.minimum_validation_upgrade_delay, 20); @@ -259,8 +294,8 @@ mod tests { // We specify only the picked fields and the rest should be provided by the `Default` // implementation. That implementation is copied over between the two types and should work // fine. - let v3 = v4::OldHostConfiguration:: { - ump_max_individual_weight: Weight::from_ref_time(0x71616e6f6e0au64), + let v4 = v5::OldHostConfiguration:: { + ump_max_individual_weight: Weight::from_parts(0x71616e6f6e0au64, 0x71616e6f6e0au64), needed_approvals: 69, thread_availability_period: 55, hrmp_recipient_deposit: 1337, @@ -314,7 +349,6 @@ mod tests { assert_eq!(v3.max_validators , v4.max_validators); assert_eq!(v3.dispute_period , v4.dispute_period); assert_eq!(v3.dispute_post_conclusion_acceptance_period, v4.dispute_post_conclusion_acceptance_period); - assert_eq!(v3.dispute_max_spam_slots , v4.dispute_max_spam_slots); assert_eq!(v3.dispute_conclusion_by_time_out_period , v4.dispute_conclusion_by_time_out_period); assert_eq!(v3.no_show_slots , v4.no_show_slots); assert_eq!(v3.n_delay_tranches , v4.n_delay_tranches); diff --git a/runtime/parachains/src/configuration/tests.rs b/runtime/parachains/src/configuration/tests.rs index 28e71c2fa4ae..b0e6c5a41dff 100644 --- a/runtime/parachains/src/configuration/tests.rs +++ b/runtime/parachains/src/configuration/tests.rs @@ -309,7 +309,6 @@ fn setting_pending_config_members() { max_validators: None, dispute_period: 239, dispute_post_conclusion_acceptance_period: 10, - dispute_max_spam_slots: 2, dispute_conclusion_by_time_out_period: 512, no_show_slots: 240, n_delay_tranches: 241, @@ -400,11 +399,6 @@ fn setting_pending_config_members() { new_config.dispute_post_conclusion_acceptance_period, ) .unwrap(); - Configuration::set_dispute_max_spam_slots( - RuntimeOrigin::root(), - new_config.dispute_max_spam_slots, - ) - .unwrap(); Configuration::set_dispute_conclusion_by_time_out_period( RuntimeOrigin::root(), new_config.dispute_conclusion_by_time_out_period, diff --git a/runtime/parachains/src/disputes.rs b/runtime/parachains/src/disputes.rs index 9f458421e2ed..ca4cc2dda236 100644 --- a/runtime/parachains/src/disputes.rs +++ b/runtime/parachains/src/disputes.rs @@ -46,6 +46,10 @@ mod tests; #[cfg(feature = "runtime-benchmarks")] mod benchmarking; +pub mod migration; + +const LOG_TARGET: &str = "runtime::disputes"; + /// Whether the dispute is local or remote. #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub enum DisputeLocation { @@ -262,7 +266,6 @@ pub trait DisputesHandler { /// accounting for maximum block weight. fn filter_dispute_data( statement_set: DisputeStatementSet, - max_spam_slots: u32, post_conclusion_acceptance_period: BlockNumber, verify_sigs: VerifyDisputeSignatures, ) -> Option; @@ -311,7 +314,6 @@ impl DisputesHandler for () { fn filter_dispute_data( _set: DisputeStatementSet, - _max_spam_slots: u32, _post_conclusion_acceptance_period: BlockNumber, _verify_sigs: VerifyDisputeSignatures, ) -> Option { @@ -361,14 +363,12 @@ where fn filter_dispute_data( set: DisputeStatementSet, - max_spam_slots: u32, post_conclusion_acceptance_period: T::BlockNumber, verify_sigs: VerifyDisputeSignatures, ) -> Option { pallet::Pallet::::filter_dispute_data( &set, post_conclusion_acceptance_period, - max_spam_slots, verify_sigs, ) .filter_statement_set(set) @@ -471,14 +471,6 @@ pub mod pallet { T::BlockNumber, >; - /// Maps session indices to a vector indicating the number of potentially-spam disputes - /// each validator is participating in. Potentially-spam disputes are remote disputes which have - /// fewer than `byzantine_threshold + 1` validators. - /// - /// The i'th entry of the vector corresponds to the i'th validator in the session. - #[pallet::storage] - pub(super) type SpamSlots = StorageMap<_, Twox64Concat, SessionIndex, Vec>; - /// Whether the chain is frozen. Starts as `None`. When this is `Some`, /// the chain will not accept any new parachain blocks for backing or inclusion, /// and its value indicates the last valid block number in the chain. @@ -517,14 +509,15 @@ pub mod pallet { InvalidSignature, /// Validator vote submitted more than once to dispute. DuplicateStatement, - /// Too many spam slots used by some specific validator. - PotentialSpam, /// A dispute where there are only votes on one side. SingleSidedDispute, + /// Unconfirmed dispute statement sets provided + UnconfirmedDispute, } #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(::WeightInfo::force_unfreeze())] pub fn force_unfreeze(origin: OriginFor) -> DispatchResult { ensure_root(origin)?; @@ -573,19 +566,9 @@ impl DisputeStateFlags { } } -#[derive(PartialEq, RuntimeDebug)] -enum SpamSlotChange { - /// Add a `+1` to the spam slot for a particular validator index in this session. - Inc, - /// Subtract `-1` ... - Dec, -} - struct ImportSummary { /// The new state, with all votes imported. state: DisputeState, - /// Changes to spam slots. Validator index paired with directional change. - spam_slot_changes: Vec<(ValidatorIndex, SpamSlotChange)>, /// Validators to slash for being (wrongly) on the AGAINST side. slash_against: Vec, /// Validators to slash for being (wrongly) on the FOR side. @@ -698,37 +681,7 @@ impl DisputeStateImporter { let pre_post_contains = |flags| (pre_flags.contains(flags), post_flags.contains(flags)); - // 1. Act on confirmed flag state to inform spam slots changes. - let spam_slot_changes: Vec<_> = match pre_post_contains(DisputeStateFlags::CONFIRMED) { - (false, false) => { - // increment spam slots for all new participants. - self.new_participants - .iter_ones() - .map(|i| (ValidatorIndex(i as _), SpamSlotChange::Inc)) - .collect() - }, - (false, true) => { - // all participants, which are not new participants - let prev_participants = (self.state.validators_for.clone() | - self.state.validators_against.clone()) & - !self.new_participants.clone(); - - prev_participants - .iter_ones() - .map(|i| (ValidatorIndex(i as _), SpamSlotChange::Dec)) - .collect() - }, - (true, false) => { - log::error!("Dispute statements are never removed. This is a bug"); - Vec::new() - }, - (true, true) => { - // No change, nothing to do. - Vec::new() - }, - }; - - // 2. Check for fresh FOR supermajority. Only if not already concluded. + // 1. Check for fresh FOR supermajority. Only if not already concluded. let slash_against = if let (false, true) = pre_post_contains(DisputeStateFlags::FOR_SUPERMAJORITY) { if self.state.concluded_at.is_none() { @@ -745,7 +698,7 @@ impl DisputeStateImporter { Vec::new() }; - // 3. Check for fresh AGAINST supermajority. + // 2. Check for fresh AGAINST supermajority. let slash_for = if let (false, true) = pre_post_contains(DisputeStateFlags::AGAINST_SUPERMAJORITY) { if self.state.concluded_at.is_none() { @@ -760,7 +713,6 @@ impl DisputeStateImporter { ImportSummary { state: self.state, - spam_slot_changes, slash_against, slash_for, new_participants: self.new_participants, @@ -830,32 +782,7 @@ impl Pallet { dispute.concluded_at = Some(now); >::insert(session_index, candidate_hash, &dispute); - if >::contains_key(&session_index, &candidate_hash) { - // Local disputes don't count towards spam. - - weight += T::DbWeight::get().reads_writes(1, 1); - continue - } - - // mildly punish all validators involved. they've failed to make - // data available to others, so this is most likely spam. - SpamSlots::::mutate(session_index, |spam_slots| { - let spam_slots = match spam_slots { - Some(ref mut s) => s, - None => return, - }; - - // also reduce spam slots for all validators involved, if the dispute was unconfirmed. - // this does open us up to more spam, but only for validators who are willing - // to be punished more. - // - // it would be unexpected for any change here to occur when the dispute has not concluded - // in time, as a dispute guaranteed to have at least one honest participant should - // conclude quickly. - let _participating = decrement_spam(spam_slots, &dispute); - }); - - weight += T::DbWeight::get().reads_writes(2, 2); + weight += T::DbWeight::get().writes(1); } } @@ -893,7 +820,6 @@ impl Pallet { // TODO: https://github.com/paritytech/polkadot/issues/3469 #[allow(deprecated)] >::remove_prefix(to_prune, None); - SpamSlots::::remove(to_prune); } *last_pruned = Some(pruning_target); @@ -937,10 +863,10 @@ impl Pallet { // // Votes which are duplicate or already known by the chain are filtered out. // The entire set is removed if the dispute is both, ancient and concluded. + // Disputes without enough votes to get confirmed are also filtered out. fn filter_dispute_data( set: &DisputeStatementSet, post_conclusion_acceptance_period: ::BlockNumber, - max_spam_slots: u32, verify_sigs: VerifyDisputeSignatures, ) -> StatementSetFilter { let mut filter = StatementSetFilter::RemoveIndices(Vec::new()); @@ -959,29 +885,26 @@ impl Pallet { let n_validators = session_info.validators.len(); // Check for ancient. - let (first_votes, dispute_state) = { + let dispute_state = { if let Some(dispute_state) = >::get(&set.session, &set.candidate_hash) { if dispute_state.concluded_at.as_ref().map_or(false, |c| c < &oldest_accepted) { return StatementSetFilter::RemoveAll } - (false, dispute_state) + dispute_state } else { // No state in storage, this indicates it's the first dispute statement set as well. - ( - true, - DisputeState { - validators_for: bitvec![u8, BitOrderLsb0; 0; n_validators], - validators_against: bitvec![u8, BitOrderLsb0; 0; n_validators], - start: now, - concluded_at: None, - }, - ) + DisputeState { + validators_for: bitvec![u8, BitOrderLsb0; 0; n_validators], + validators_against: bitvec![u8, BitOrderLsb0; 0; n_validators], + start: now, + concluded_at: None, + } } }; // Check and import all votes. - let mut summary = { + let summary = { let mut importer = DisputeStateImporter::new(dispute_state, now); for (i, (statement, validator_index, signature)) in set.statements.iter().enumerate() { // assure the validator index and is present in the session info @@ -1038,99 +961,11 @@ impl Pallet { return StatementSetFilter::RemoveAll } - // Apply spam slot changes. Bail early if too many occupied. - let is_local = >::contains_key(&set.session, &set.candidate_hash); - if !is_local { - let mut spam_slots: Vec = - SpamSlots::::get(&set.session).unwrap_or_else(|| vec![0; n_validators]); - let mut spam_filter_struck = false; - for (validator_index, spam_slot_change) in summary.spam_slot_changes { - let spam_slot = spam_slots - .get_mut(validator_index.0 as usize) - .expect("index is in-bounds, as checked above; qed"); - - if let SpamSlotChange::Inc = spam_slot_change { - if *spam_slot >= max_spam_slots { - spam_filter_struck = true; - - // Find the vote by this validator and filter it out. - let first_index_in_set = set - .statements - .iter() - .position(|(_statement, v_i, _signature)| &validator_index == v_i) - .expect( - "spam slots are only incremented when a new statement \ - from a validator is included; qed", - ); - - // Note that there may be many votes by the validator in the statement - // set. There are not supposed to be, but the purpose of this function - // is to filter out invalid submissions, after all. - // - // This is fine - we only need to handle the first one, because all - // subsequent votes' indices have been added to the filter already - // by the duplicate checks above. It's only the first one which - // may not already have been filtered out. - filter.remove_index(first_index_in_set); - - // Removing individual statments can cause the dispute to become onesided. - // Checking that (again) is done after the loop. Remove the bit indices. - summary.new_participants.set(validator_index.0 as _, false); - } - - // It's also worth noting that the `DisputeStateImporter` - // which produces these spam slot updates only produces - // one spam slot update per validator because it rejects - // duplicate votes. - // - // So we don't need to worry about spam slots being - // updated incorrectly after receiving duplicates. - *spam_slot += 1; - } else { - *spam_slot = spam_slot.saturating_sub(1); - } - } - - // We write the spam slots here because sequential calls to - // `filter_dispute_data` have a dependency on each other. - // - // For example, if a validator V occupies 1 spam slot and - // max is 2, then 2 sequential calls incrementing spam slot - // cannot be allowed. - // - // However, 3 sequential calls, where the first increments, - // the second decrements, and the third increments would be allowed. - SpamSlots::::insert(&set.session, spam_slots); - - // This is only relevant in cases where it's the first vote and the state - // would hence hold a onesided dispute. If a onesided dispute can never be - // started, by induction, we can never enter a state of a one sided dispute. - if spam_filter_struck && first_votes { - let mut vote_for_count = 0_u64; - let mut vote_against_count = 0_u64; - // Since this is the first set of statements for the dispute, - // it's sufficient to count the votes in the statement set after they - set.statements.iter().for_each(|(statement, v_i, _signature)| { - if Some(true) == - summary.new_participants.get(v_i.0 as usize).map(|b| b.as_ref().clone()) - { - match statement { - // `summary.new_flags` contains the spam free votes. - // Note that this does not distinguish between pro or con votes, - // since allowing both of them, even if the spam threshold would be reached - // is a good thing. - // Overflow of the counters is no concern, disputes are limited by weight. - DisputeStatement::Valid(_) => vote_for_count += 1, - DisputeStatement::Invalid(_) => vote_against_count += 1, - } - } - }); - if vote_for_count.is_zero() || vote_against_count.is_zero() { - // It wasn't one-sided before the spam filters, but now it is, - // so we need to be thorough and not import that dispute. - return StatementSetFilter::RemoveAll - } - } + // Reject disputes containing less votes than needed for confirmation. + if (summary.state.validators_for.clone() | &summary.state.validators_against).count_ones() <= + byzantine_threshold(summary.state.validators_for.len()) + { + return StatementSetFilter::RemoveAll } filter @@ -1200,13 +1035,17 @@ impl Pallet { Error::::SingleSidedDispute, ); + // Reject disputes containing less votes than needed for confirmation. + ensure!( + (summary.state.validators_for.clone() | &summary.state.validators_against).count_ones() > + byzantine_threshold(summary.state.validators_for.len()), + Error::::UnconfirmedDispute, + ); + let DisputeStatementSet { ref session, ref candidate_hash, .. } = set; let session = *session; let candidate_hash = *candidate_hash; - // we can omit spam slot checks, `fn filter_disputes_data` is - // always called before calling this `fn`. - if fresh { let is_local = >::contains_key(&session, &candidate_hash); @@ -1282,15 +1121,7 @@ impl Pallet { >::insert(&session, &candidate_hash, revert_to); - // If we just included a block locally which has a live dispute, decrement spam slots - // for any involved validators, if the dispute is not already confirmed by f + 1. if let Some(state) = >::get(&session, candidate_hash) { - SpamSlots::::mutate(&session, |spam_slots| { - if let Some(ref mut spam_slots) = *spam_slots { - decrement_spam(spam_slots, &state); - } - }); - if has_supermajority_against(&state) { Self::revert_and_freeze(revert_to); } @@ -1336,29 +1167,6 @@ fn has_supermajority_against(dispute: &DisputeState) - dispute.validators_against.count_ones() >= supermajority_threshold } -// If the dispute had not enough validators to confirm, decrement spam slots for all the participating -// validators. -// -// Returns the set of participating validators as a bitvec. -fn decrement_spam( - spam_slots: &mut [u32], - dispute: &DisputeState, -) -> bitvec::vec::BitVec { - let byzantine_threshold = byzantine_threshold(spam_slots.len()); - - let participating = dispute.validators_for.clone() | dispute.validators_against.clone(); - let decrement_spam = participating.count_ones() <= byzantine_threshold; - for validator_index in participating.iter_ones() { - if decrement_spam { - if let Some(occupied) = spam_slots.get_mut(validator_index as usize) { - *occupied = occupied.saturating_sub(1); - } - } - } - - participating -} - fn check_signature( validator_public: &ValidatorId, candidate_hash: CandidateHash, diff --git a/runtime/parachains/src/disputes/migration.rs b/runtime/parachains/src/disputes/migration.rs new file mode 100644 index 000000000000..584d4b33872e --- /dev/null +++ b/runtime/parachains/src/disputes/migration.rs @@ -0,0 +1,98 @@ +// 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 . + +//! Storage migration(s) related to disputes pallet + +use frame_support::traits::StorageVersion; + +/// The current storage version. +const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); + +pub mod v1 { + use super::*; + use crate::disputes::{Config, Pallet}; + use frame_support::{ + pallet_prelude::*, storage_alias, traits::OnRuntimeUpgrade, weights::Weight, + }; + use primitives::v2::SessionIndex; + use sp_std::prelude::*; + + #[storage_alias] + type SpamSlots = StorageMap, Twox64Concat, SessionIndex, Vec>; + + pub struct MigrateToV1(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for MigrateToV1 { + fn on_runtime_upgrade() -> Weight { + let mut weight: Weight = Weight::zero(); + + if StorageVersion::get::>() < STORAGE_VERSION { + log::info!(target: crate::disputes::LOG_TARGET, "Migrating disputes storage to v1"); + weight += migrate_to_v1::(); + STORAGE_VERSION.put::>(); + weight = weight.saturating_add(T::DbWeight::get().reads_writes(1, 1)); + } else { + log::info!( + target: crate::disputes::LOG_TARGET, + "Disputes storage up to date - no need for migration" + ); + } + + weight + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, &'static str> { + log::trace!( + target: crate::disputes::LOG_TARGET, + "SpamSlots before migration: {}", + SpamSlots::::iter().count() + ); + ensure!( + StorageVersion::get::>() == 0, + "Storage version should be less than `1` before the migration", + ); + Ok(Vec::new()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { + log::trace!(target: crate::disputes::LOG_TARGET, "Running post_upgrade()"); + ensure!( + StorageVersion::get::>() == STORAGE_VERSION, + "Storage version should be `1` after the migration" + ); + ensure!( + SpamSlots::::iter().count() == 0, + "SpamSlots should be empty after the migration" + ); + Ok(()) + } + } + + /// Migrates the pallet storage to the most recent version, checking and setting the `StorageVersion`. + pub fn migrate_to_v1() -> Weight { + let mut weight: Weight = Weight::zero(); + + // SpamSlots should not contain too many keys so removing everything at once should be safe + let res = SpamSlots::::clear(u32::MAX, None); + // `loops` is the number of iterations => used to calculate read weights + // `backend` is the number of keys removed from the backend => used to calculate write weights + weight = weight + .saturating_add(T::DbWeight::get().reads_writes(res.loops as u64, res.backend as u64)); + + weight + } +} 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/disputes/tests.rs b/runtime/parachains/src/disputes/tests.rs index 4d8ac714cb7b..d1c785223ff6 100644 --- a/runtime/parachains/src/disputes/tests.rs +++ b/runtime/parachains/src/disputes/tests.rs @@ -23,7 +23,6 @@ use crate::{ Test, PUNISH_VALIDATORS_AGAINST, PUNISH_VALIDATORS_FOR, REWARD_VALIDATORS, }, }; -use assert_matches::assert_matches; use frame_support::{ assert_err, assert_noop, assert_ok, traits::{OnFinalize, OnInitialize}, @@ -31,20 +30,16 @@ use frame_support::{ use primitives::v2::BlockNumber; use sp_core::{crypto::CryptoType, Pair}; -/// Filtering updates the spam slots, as such update them. -fn update_spam_slots(stmts: MultiDisputeStatementSet) -> CheckedMultiDisputeStatementSet { +fn filter_dispute_set(stmts: MultiDisputeStatementSet) -> CheckedMultiDisputeStatementSet { let config = >::config(); - let max_spam_slots = config.dispute_max_spam_slots; let post_conclusion_acceptance_period = config.dispute_post_conclusion_acceptance_period; stmts .into_iter() .filter_map(|set| { - // updates spam slots implicitly let filter = Pallet::::filter_dispute_data( &set, post_conclusion_acceptance_period, - max_spam_slots, VerifyDisputeSignatures::Skip, ); filter.filter_statement_set(set) @@ -135,7 +130,7 @@ fn test_dispute_state_flag_from_state() { } #[test] -fn test_import_new_participant_spam_inc() { +fn test_import_new_participant() { let mut importer = DisputeStateImporter::new( DisputeState { validators_for: bitvec![u8, BitOrderLsb0; 1, 0, 0, 0, 0, 0, 0, 0], @@ -171,14 +166,13 @@ fn test_import_new_participant_spam_inc() { concluded_at: None, }, ); - assert_eq!(summary.spam_slot_changes, vec![(ValidatorIndex(2), SpamSlotChange::Inc)]); assert!(summary.slash_for.is_empty()); assert!(summary.slash_against.is_empty()); assert_eq!(summary.new_participants, bitvec![u8, BitOrderLsb0; 0, 0, 1, 0, 0, 0, 0, 0]); } #[test] -fn test_import_prev_participant_spam_dec_confirmed() { +fn test_import_prev_participant_confirmed() { let mut importer = DisputeStateImporter::new( DisputeState { validators_for: bitvec![u8, BitOrderLsb0; 1, 0, 0, 0, 0, 0, 0, 0], @@ -201,10 +195,7 @@ fn test_import_prev_participant_spam_dec_confirmed() { concluded_at: None, }, ); - assert_eq!( - summary.spam_slot_changes, - vec![(ValidatorIndex(0), SpamSlotChange::Dec), (ValidatorIndex(1), SpamSlotChange::Dec),], - ); + assert!(summary.slash_for.is_empty()); assert!(summary.slash_against.is_empty()); assert_eq!(summary.new_participants, bitvec![u8, BitOrderLsb0; 0, 0, 1, 0, 0, 0, 0, 0]); @@ -212,7 +203,7 @@ fn test_import_prev_participant_spam_dec_confirmed() { } #[test] -fn test_import_prev_participant_spam_dec_confirmed_slash_for() { +fn test_import_prev_participant_confirmed_slash_for() { let mut importer = DisputeStateImporter::new( DisputeState { validators_for: bitvec![u8, BitOrderLsb0; 1, 0, 0, 0, 0, 0, 0, 0], @@ -240,10 +231,7 @@ fn test_import_prev_participant_spam_dec_confirmed_slash_for() { concluded_at: Some(0), }, ); - assert_eq!( - summary.spam_slot_changes, - vec![(ValidatorIndex(0), SpamSlotChange::Dec), (ValidatorIndex(1), SpamSlotChange::Dec),], - ); + assert_eq!(summary.slash_for, vec![ValidatorIndex(0), ValidatorIndex(2)]); assert!(summary.slash_against.is_empty()); assert_eq!(summary.new_participants, bitvec![u8, BitOrderLsb0; 0, 0, 1, 1, 1, 1, 1, 0]); @@ -281,224 +269,12 @@ fn test_import_slash_against() { concluded_at: Some(0), }, ); - assert!(summary.spam_slot_changes.is_empty()); assert!(summary.slash_for.is_empty()); assert_eq!(summary.slash_against, vec![ValidatorIndex(1), ValidatorIndex(5)]); assert_eq!(summary.new_participants, bitvec![u8, BitOrderLsb0; 0, 0, 0, 1, 1, 1, 1, 1]); assert_eq!(summary.new_flags, DisputeStateFlags::FOR_SUPERMAJORITY); } -fn generate_dispute_statement_set_entry( - session: u32, - candidate_hash: CandidateHash, - statement: DisputeStatement, - validator: &::Pair, -) -> (DisputeStatement, ValidatorSignature) { - let valid = match &statement { - DisputeStatement::Valid(_) => true, - _ => false, - }; - let signature_bytes = validator - .sign(&ExplicitDisputeStatement { valid, candidate_hash, session }.signing_payload()); - let signature = ValidatorSignature::try_from(signature_bytes).unwrap(); - (statement, signature) -} - -fn generate_dispute_statement_set( - session: SessionIndex, - candidate_hash: CandidateHash, - validators: &[::Pair], - vidxs: Vec<(usize, DisputeStatement)>, -) -> DisputeStatementSet { - let statements = vidxs - .into_iter() - .map(|(v_i, statement)| { - let validator_index = ValidatorIndex(v_i as u32); - let (statement, signature) = generate_dispute_statement_set_entry( - session, - candidate_hash.clone(), - statement, - &validators[v_i], - ); - (statement, validator_index, signature) - }) - .collect::>(); - DisputeStatementSet { candidate_hash: candidate_hash.clone(), session, statements } -} - -#[test] -fn dispute_statement_becoming_onesided_due_to_spamslots_is_accepted() { - let dispute_conclusion_by_time_out_period = 3; - let start = 10; - let session = start - 1; - let dispute_max_spam_slots = 2; - let post_conclusion_acceptance_period = 3; - - let mock_genesis_config = MockGenesisConfig { - configuration: crate::configuration::GenesisConfig { - config: HostConfiguration { - dispute_conclusion_by_time_out_period, - dispute_max_spam_slots, - ..Default::default() - }, - ..Default::default() - }, - ..Default::default() - }; - - new_test_ext(mock_genesis_config).execute_with(|| { - // We need 6 validators for the byzantine threshold to be 2 - static ACCOUNT_IDS: &[AccountId] = &[0, 1, 2, 3, 4, 5, 6, 7]; - let validators = std::iter::repeat(()) - .take(7) - .map(|_| ::Pair::generate().0) - .collect::>(); - let validators = &validators; - - // a new session at each block, but always the same validators - let session_change_callback = |block_number: u32| -> Option> { - let session_validators = - Vec::from_iter(ACCOUNT_IDS.iter().zip(validators.iter().map(|pair| pair.public()))); - Some((true, block_number, session_validators.clone(), Some(session_validators))) - }; - - run_to_block(start, session_change_callback); - - // Must be _foreign_ parachain candidate - // otherwise slots do not trigger. - let candidate_hash_a = CandidateHash(sp_core::H256::repeat_byte(0xA)); - let candidate_hash_b = CandidateHash(sp_core::H256::repeat_byte(0xB)); - let candidate_hash_c = CandidateHash(sp_core::H256::repeat_byte(0xC)); - let candidate_hash_d = CandidateHash(sp_core::H256::repeat_byte(0xD)); - - let stmts = vec![ - // a - generate_dispute_statement_set( - session, - candidate_hash_a, - validators, - vec![ - (3, DisputeStatement::Valid(ValidDisputeStatementKind::Explicit)), - (6, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit)), - ], - ), - // b - generate_dispute_statement_set( - session, - candidate_hash_b, - validators, - vec![ - (1, DisputeStatement::Valid(ValidDisputeStatementKind::Explicit)), - (6, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit)), - ], - ), - // c - generate_dispute_statement_set( - session, - candidate_hash_c, - validators, - vec![ - (2, DisputeStatement::Valid(ValidDisputeStatementKind::Explicit)), - (6, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit)), - ], - ), - // d - generate_dispute_statement_set( - session, - candidate_hash_d, - validators, - vec![ - (4, DisputeStatement::Valid(ValidDisputeStatementKind::Explicit)), - (5, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit)), - ], - ), - generate_dispute_statement_set( - session, - candidate_hash_d, - validators, - vec![(6, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit))], - ), - ]; - - // no filtering happens, host config for `dispute_max_spam_slots: 2` is the default - // updates spam slots implicitly - let set = stmts[0].clone(); - let filter = Pallet::::filter_dispute_data( - &set, - post_conclusion_acceptance_period, - dispute_max_spam_slots, - VerifyDisputeSignatures::Skip, - ); - assert_matches!(&filter, StatementSetFilter::RemoveIndices(v) if v.is_empty()); - assert_matches!(filter.filter_statement_set(set.clone()), Some(modified) => { - assert_eq!(&set, modified.as_ref()); - }); - assert_eq!(SpamSlots::::get(session), Some(vec![0, 0, 0, 1, 0, 0, 1])); - - // <-----> - - // 2nd, still ok? Should be - let set = stmts[1].clone(); - let filter = Pallet::::filter_dispute_data( - &set, - post_conclusion_acceptance_period, - dispute_max_spam_slots, - VerifyDisputeSignatures::Skip, - ); - assert_matches!(&filter, StatementSetFilter::RemoveIndices(v) if v.is_empty()); - assert_matches!(filter.filter_statement_set(set.clone()), Some(modified) => { - assert_eq!(&set, modified.as_ref()); - }); - assert_eq!(SpamSlots::::get(session), Some(vec![0, 1, 0, 1, 0, 0, 2])); - - // <-----> - - // now this is the third spammy participation of validator 6 and hence - let set = stmts[2].clone(); - let filter = Pallet::::filter_dispute_data( - &set, - post_conclusion_acceptance_period, - dispute_max_spam_slots, - VerifyDisputeSignatures::Skip, - ); - assert_matches!(&filter, StatementSetFilter::RemoveAll); - // no need to apply the filter, - // we don't do anything with the result, and spam slots were updated already - - // <-----> - - // now there is no pariticipation in this dispute being initiated - // only validator 4 and 5 are part of it - // with 3 validators it's not a an unconfirmed dispute anymore - // so validator 6, while being considered spammy should work again - let set = stmts[3].clone(); - let filter = Pallet::::filter_dispute_data( - &set, - post_conclusion_acceptance_period, - dispute_max_spam_slots, - VerifyDisputeSignatures::Skip, - ); - assert_matches!(&filter, StatementSetFilter::RemoveIndices(v) if v.is_empty()); - // no need to apply the filter, - // we don't do anything with the result, and spam slots were updated already - - // <-----> - - // it's a spammy participant, so a new dispute will not be accepted being initiated by a spammer - let set = stmts[4].clone(); - let filter = Pallet::::filter_dispute_data( - &set, - post_conclusion_acceptance_period, - dispute_max_spam_slots, - VerifyDisputeSignatures::Skip, - ); - assert_matches!(&filter, StatementSetFilter::RemoveAll); - assert_matches!(filter.filter_statement_set(set.clone()), None); - - assert_eq!(SpamSlots::::get(session), Some(vec![0, 1, 1, 1, 1, 1, 3])); - }); -} - // Test that dispute timeout is handled correctly. #[test] fn test_dispute_timeout() { @@ -517,7 +293,7 @@ fn test_dispute_timeout() { }; new_test_ext(mock_genesis_config).execute_with(|| { - // We need 6 validators for the byzantine threshold to be 2 + // We need 7 validators for the byzantine threshold to be 2 let v0 = ::Pair::generate().0; let v1 = ::Pair::generate().0; let v2 = ::Pair::generate().0; @@ -554,10 +330,12 @@ fn test_dispute_timeout() { let candidate_hash = CandidateHash(sp_core::H256::repeat_byte(1)); - // v0 votes for 3, v6 against. + // v0 and v1 vote for 3, v2 against. We need f+1 votes (3) so that the dispute is + // confirmed. Otherwise It will be filtered out. + let session = start - 1; let stmts = vec![DisputeStatementSet { candidate_hash: candidate_hash.clone(), - session: start - 1, + session, statements: vec![ ( DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), @@ -571,6 +349,18 @@ fn test_dispute_timeout() { .signing_payload(), ), ), + ( + DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), + ValidatorIndex(1), + v1.sign( + &ExplicitDisputeStatement { + valid: true, + candidate_hash: candidate_hash.clone(), + session: start - 1, + } + .signing_payload(), + ), + ), ( DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), ValidatorIndex(6), @@ -586,8 +376,7 @@ fn test_dispute_timeout() { ], }]; - let stmts = update_spam_slots(stmts); - assert_eq!(SpamSlots::::get(start - 1), Some(vec![1, 0, 0, 0, 0, 0, 1])); + let stmts = filter_dispute_set(stmts); assert_ok!( Pallet::::process_checked_multi_dispute_data(stmts), @@ -596,11 +385,20 @@ fn test_dispute_timeout() { // Run to timeout period run_to_block(start + dispute_conclusion_by_time_out_period, |_| None); - assert_eq!(SpamSlots::::get(start - 1), Some(vec![1, 0, 0, 0, 0, 0, 1])); + assert!(>::get(&session, &candidate_hash) + .expect("dispute should exist") + .concluded_at + .is_none()); // Run to timeout + 1 in order to executive on_finalize(timeout) run_to_block(start + dispute_conclusion_by_time_out_period + 1, |_| None); - assert_eq!(SpamSlots::::get(start - 1), Some(vec![0, 0, 0, 0, 0, 0, 0])); + assert_eq!( + >::get(&session, &candidate_hash) + .expect("dispute should exist") + .concluded_at + .expect("dispute should have concluded"), + start + dispute_conclusion_by_time_out_period + 1 + ); }); } @@ -888,12 +686,122 @@ fn test_freeze_provided_against_supermajority_for_included() { }); } +mod unconfirmed_disputes { + use super::*; + use assert_matches::assert_matches; + use sp_runtime::ModuleError; + + // Shared initialization code between `test_unconfirmed_are_ignored` and `test_unconfirmed_disputes_cause_block_import_error` + fn generate_dispute_statement_set_and_run_to_block() -> DisputeStatementSet { + // 7 validators needed for byzantine threshold of 2. + let v0 = ::Pair::generate().0; + let v1 = ::Pair::generate().0; + let v2 = ::Pair::generate().0; + let v3 = ::Pair::generate().0; + let v4 = ::Pair::generate().0; + let v5 = ::Pair::generate().0; + let v6 = ::Pair::generate().0; + + // Mapping between key pair and `ValidatorIndex` + // v0 -> 0 + // v1 -> 3 + // v2 -> 6 + // v3 -> 5 + // v4 -> 1 + // v5 -> 4 + // v6 -> 2 + + run_to_block(6, |b| { + // a new session at each block + Some(( + true, + b, + vec![ + (&0, v0.public()), + (&1, v1.public()), + (&2, v2.public()), + (&3, v3.public()), + (&4, v4.public()), + (&5, v5.public()), + (&6, v6.public()), + ], + Some(vec![ + (&0, v0.public()), + (&1, v1.public()), + (&2, v2.public()), + (&3, v3.public()), + (&4, v4.public()), + (&5, v5.public()), + (&6, v6.public()), + ]), + )) + }); + + let candidate_hash = CandidateHash(sp_core::H256::repeat_byte(1)); + + // v0 votes for 4, v1 votes against 4. + DisputeStatementSet { + candidate_hash: candidate_hash.clone(), + session: 4, + statements: vec![ + ( + DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), + ValidatorIndex(0), + v0.sign( + &ExplicitDisputeStatement { + valid: true, + candidate_hash: candidate_hash.clone(), + session: 4, + } + .signing_payload(), + ), + ), + ( + DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), + ValidatorIndex(3), + v1.sign( + &ExplicitDisputeStatement { + valid: false, + candidate_hash: candidate_hash.clone(), + session: 4, + } + .signing_payload(), + ), + ), + ], + } + } + #[test] + fn test_unconfirmed_are_ignored() { + new_test_ext(Default::default()).execute_with(|| { + let stmts = vec![generate_dispute_statement_set_and_run_to_block()]; + let stmts = filter_dispute_set(stmts); + + // Not confirmed => should be filtered out + assert_ok!(Pallet::::process_checked_multi_dispute_data(stmts), vec![],); + }); + } + + #[test] + fn test_unconfirmed_disputes_cause_block_import_error() { + new_test_ext(Default::default()).execute_with(|| { + + let stmts = generate_dispute_statement_set_and_run_to_block(); + let stmts = vec![CheckedDisputeStatementSet::unchecked_from_unchecked(stmts)]; + + assert_matches!( + Pallet::::process_checked_multi_dispute_data(stmts), + Err(DispatchError::Module(ModuleError{index: _, error: _, message})) => assert_eq!(message, Some("UnconfirmedDispute")) + ); + + }); + } +} + // tests for: // * provide_multi_dispute: with success scenario // * disputes: correctness of datas // * could_be_invalid: correctness of datas -// * note_included: decrement spam correctly -// * spam slots: correctly incremented and decremented // * ensure rewards and punishment are correctly called. #[test] fn test_provide_multi_dispute_success_and_other() { @@ -907,6 +815,7 @@ fn test_provide_multi_dispute_success_and_other() { let v5 = ::Pair::generate().0; let v6 = ::Pair::generate().0; + // Mapping between key pair and `ValidatorIndex` // v0 -> 0 // v1 -> 3 // v2 -> 6 @@ -943,7 +852,7 @@ fn test_provide_multi_dispute_success_and_other() { let candidate_hash = CandidateHash(sp_core::H256::repeat_byte(1)); - // v0 votes for 3, v6 votes against + // v0 and v1 vote for 3, v6 votes against let stmts = vec![DisputeStatementSet { candidate_hash: candidate_hash.clone(), session: 3, @@ -972,53 +881,7 @@ fn test_provide_multi_dispute_success_and_other() { .signing_payload(), ), ), - ], - }]; - - let stmts = update_spam_slots(stmts); - assert_eq!(SpamSlots::::get(3), Some(vec![1, 0, 1, 0, 0, 0, 0])); - - assert_ok!( - Pallet::::process_checked_multi_dispute_data(stmts), - vec![(3, candidate_hash.clone())], - ); - - // v1 votes for 4 and for 3, v6 votes against 4. - let stmts = vec![ - DisputeStatementSet { - candidate_hash: candidate_hash.clone(), - session: 4, - statements: vec![ - ( - DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), - ValidatorIndex(3), - v1.sign( - &ExplicitDisputeStatement { - valid: true, - candidate_hash: candidate_hash.clone(), - session: 4, - } - .signing_payload(), - ), - ), - ( - DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), - ValidatorIndex(2), - v6.sign( - &ExplicitDisputeStatement { - valid: false, - candidate_hash: candidate_hash.clone(), - session: 4, - } - .signing_payload(), - ), - ), - ], - }, - DisputeStatementSet { - candidate_hash: candidate_hash.clone(), - session: 3, - statements: vec![( + ( DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), ValidatorIndex(3), v1.sign( @@ -1029,20 +892,18 @@ fn test_provide_multi_dispute_success_and_other() { } .signing_payload(), ), - )], - }, - ]; + ), + ], + }]; - let stmts = update_spam_slots(stmts); + let stmts = filter_dispute_set(stmts); assert_ok!( Pallet::::process_checked_multi_dispute_data(stmts), - vec![(4, candidate_hash.clone())], + vec![(3, candidate_hash.clone())], ); - assert_eq!(SpamSlots::::get(3), Some(vec![0, 0, 0, 0, 0, 0, 0])); // Confirmed as no longer spam - assert_eq!(SpamSlots::::get(4), Some(vec![0, 0, 1, 1, 0, 0, 0])); - // v3 votes against 3 and for 5, v6 votes against 5. + // v3 votes against 3 and for 5, v2 and v6 vote against 5. let stmts = vec![ DisputeStatementSet { candidate_hash: candidate_hash.clone(), @@ -1076,6 +937,18 @@ fn test_provide_multi_dispute_success_and_other() { .signing_payload(), ), ), + ( + DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), + ValidatorIndex(6), + v2.sign( + &ExplicitDisputeStatement { + valid: false, + candidate_hash: candidate_hash.clone(), + session: 5, + } + .signing_payload(), + ), + ), ( DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), ValidatorIndex(2), @@ -1092,55 +965,31 @@ fn test_provide_multi_dispute_success_and_other() { }, ]; - let stmts = update_spam_slots(stmts); + let stmts = filter_dispute_set(stmts); assert_ok!( Pallet::::process_checked_multi_dispute_data(stmts), vec![(5, candidate_hash.clone())], ); - assert_eq!(SpamSlots::::get(3), Some(vec![0, 0, 0, 0, 0, 0, 0])); - assert_eq!(SpamSlots::::get(4), Some(vec![0, 0, 1, 1, 0, 0, 0])); - assert_eq!(SpamSlots::::get(5), Some(vec![0, 0, 1, 0, 0, 1, 0])); - // v2 votes for 3 and against 5 - let stmts = vec![ - DisputeStatementSet { - candidate_hash: candidate_hash.clone(), - session: 3, - statements: vec![( - DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), - ValidatorIndex(6), - v2.sign( - &ExplicitDisputeStatement { - valid: true, - candidate_hash: candidate_hash.clone(), - session: 3, - } - .signing_payload(), - ), - )], - }, - DisputeStatementSet { - candidate_hash: candidate_hash.clone(), - session: 5, - statements: vec![( - DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), - ValidatorIndex(6), - v2.sign( - &ExplicitDisputeStatement { - valid: false, - candidate_hash: candidate_hash.clone(), - session: 5, - } - .signing_payload(), - ), - )], - }, - ]; - let stmts = update_spam_slots(stmts); + // v2 votes for 3 + let stmts = vec![DisputeStatementSet { + candidate_hash: candidate_hash.clone(), + session: 3, + statements: vec![( + DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), + ValidatorIndex(6), + v2.sign( + &ExplicitDisputeStatement { + valid: true, + candidate_hash: candidate_hash.clone(), + session: 3, + } + .signing_payload(), + ), + )], + }]; + let stmts = filter_dispute_set(stmts); assert_ok!(Pallet::::process_checked_multi_dispute_data(stmts), vec![]); - assert_eq!(SpamSlots::::get(3), Some(vec![0, 0, 0, 0, 0, 0, 0])); - assert_eq!(SpamSlots::::get(4), Some(vec![0, 0, 1, 1, 0, 0, 0])); - assert_eq!(SpamSlots::::get(5), Some(vec![0, 0, 0, 0, 0, 0, 0])); let stmts = vec![ // 0, 4, and 5 vote against 5 @@ -1218,7 +1067,7 @@ fn test_provide_multi_dispute_success_and_other() { ], }, ]; - let stmts = update_spam_slots(stmts); + let stmts = filter_dispute_set(stmts); assert_ok!(Pallet::::process_checked_multi_dispute_data(stmts), vec![]); assert_eq!( @@ -1244,16 +1093,6 @@ fn test_provide_multi_dispute_success_and_other() { concluded_at: Some(6), // 5 vote for } ), - ( - 4, - candidate_hash.clone(), - DisputeState { - validators_for: bitvec![u8, BitOrderLsb0; 0, 0, 0, 1, 0, 0, 0], - validators_against: bitvec![u8, BitOrderLsb0; 0, 0, 1, 0, 0, 0, 0], - start: 6, - concluded_at: None, - } - ), ] ); @@ -1261,22 +1100,14 @@ fn test_provide_multi_dispute_success_and_other() { assert!(!Pallet::::concluded_invalid(4, candidate_hash.clone())); assert!(Pallet::::concluded_invalid(5, candidate_hash.clone())); - // Ensure inclusion removes spam slots - assert_eq!(SpamSlots::::get(4), Some(vec![0, 0, 1, 1, 0, 0, 0])); - Pallet::::note_included(4, candidate_hash.clone(), 4); - assert_eq!(SpamSlots::::get(4), Some(vec![0, 0, 0, 0, 0, 0, 0])); - // Ensure the `reward_validator` function was correctly called assert_eq!( REWARD_VALIDATORS.with(|r| r.borrow().clone()), vec![ - (3, vec![ValidatorIndex(0), ValidatorIndex(2)]), - (4, vec![ValidatorIndex(2), ValidatorIndex(3)]), - (3, vec![ValidatorIndex(3)]), + (3, vec![ValidatorIndex(0), ValidatorIndex(2), ValidatorIndex(3)]), (3, vec![ValidatorIndex(5)]), - (5, vec![ValidatorIndex(2), ValidatorIndex(5)]), + (5, vec![ValidatorIndex(2), ValidatorIndex(5), ValidatorIndex(6)]), (3, vec![ValidatorIndex(6)]), - (5, vec![ValidatorIndex(6)]), (5, vec![ValidatorIndex(0), ValidatorIndex(1), ValidatorIndex(4)]), (3, vec![ValidatorIndex(1), ValidatorIndex(4)]), ], @@ -1286,14 +1117,11 @@ fn test_provide_multi_dispute_success_and_other() { assert_eq!( PUNISH_VALIDATORS_AGAINST.with(|r| r.borrow().clone()), vec![ - (3, vec![]), - (4, vec![]), (3, vec![]), (3, vec![]), (5, vec![]), (3, vec![]), (5, vec![]), - (5, vec![]), (3, vec![ValidatorIndex(2), ValidatorIndex(5)]), ], ); @@ -1302,13 +1130,10 @@ fn test_provide_multi_dispute_success_and_other() { assert_eq!( PUNISH_VALIDATORS_FOR.with(|r| r.borrow().clone()), vec![ - (3, vec![]), - (4, vec![]), (3, vec![]), (3, vec![]), (5, vec![]), (3, vec![]), - (5, vec![]), (5, vec![ValidatorIndex(5)]), (3, vec![]), ], @@ -1380,44 +1205,6 @@ fn test_has_supermajority_against() { ); } -#[test] -fn test_decrement_spam() { - let original_spam_slots = vec![0, 1, 2, 3, 4, 5, 6, 7]; - - // Test confirm is no-op - let mut spam_slots = original_spam_slots.clone(); - let dispute_state_confirm = DisputeState { - validators_for: bitvec![u8, BitOrderLsb0; 1, 1, 0, 0, 0, 0, 0, 0], - validators_against: bitvec![u8, BitOrderLsb0; 1, 0, 1, 0, 0, 0, 0, 0], - start: 0, - concluded_at: None, - }; - assert_eq!(DisputeStateFlags::from_state(&dispute_state_confirm), DisputeStateFlags::CONFIRMED); - assert_eq!( - decrement_spam(spam_slots.as_mut(), &dispute_state_confirm), - bitvec![u8, BitOrderLsb0; 1, 1, 1, 0, 0, 0, 0, 0], - ); - assert_eq!(spam_slots, original_spam_slots); - - // Test not confirm is decreasing spam - let mut spam_slots = original_spam_slots.clone(); - let dispute_state_no_confirm = DisputeState { - validators_for: bitvec![u8, BitOrderLsb0; 1, 0, 0, 0, 0, 0, 0, 0], - validators_against: bitvec![u8, BitOrderLsb0; 1, 0, 1, 0, 0, 0, 0, 0], - start: 0, - concluded_at: None, - }; - assert_eq!( - DisputeStateFlags::from_state(&dispute_state_no_confirm), - DisputeStateFlags::default() - ); - assert_eq!( - decrement_spam(spam_slots.as_mut(), &dispute_state_no_confirm), - bitvec![u8, BitOrderLsb0; 1, 0, 1, 0, 0, 0, 0, 0], - ); - assert_eq!(spam_slots, vec![0, 1, 1, 3, 4, 5, 6, 7]); -} - #[test] fn test_check_signature() { let validator_id = ::Pair::generate().0; @@ -1912,14 +1699,12 @@ fn apply_filter_all>( sets: I, ) -> Vec { let config = >::config(); - let max_spam_slots = config.dispute_max_spam_slots; let post_conclusion_acceptance_period = config.dispute_post_conclusion_acceptance_period; let mut acc = Vec::::new(); for dispute_statement in sets { if let Some(checked) = as DisputesHandler<::BlockNumber>>::filter_dispute_data( dispute_statement, - max_spam_slots, post_conclusion_acceptance_period, VerifyDisputeSignatures::Yes, ) { @@ -1993,13 +1778,11 @@ fn filter_removes_duplicates_within_set() { ], }; - let max_spam_slots = 10; let post_conclusion_acceptance_period = 10; let statements = as DisputesHandler< ::BlockNumber, >>::filter_dispute_data( statements, - max_spam_slots, post_conclusion_acceptance_period, VerifyDisputeSignatures::Yes, ); @@ -2085,151 +1868,6 @@ fn filter_bad_signatures_correctly_detects_single_sided() { }) } -#[test] -fn filter_correctly_accounts_spam_slots() { - let dispute_max_spam_slots = 2; - - let mock_genesis_config = MockGenesisConfig { - configuration: crate::configuration::GenesisConfig { - config: HostConfiguration { dispute_max_spam_slots, ..Default::default() }, - ..Default::default() - }, - ..Default::default() - }; - - new_test_ext(mock_genesis_config).execute_with(|| { - // We need 7 validators for the byzantine threshold to be 2 - let v0 = ::Pair::generate().0; - let v1 = ::Pair::generate().0; - let v2 = ::Pair::generate().0; - let v3 = ::Pair::generate().0; - let v4 = ::Pair::generate().0; - let v5 = ::Pair::generate().0; - let v6 = ::Pair::generate().0; - - run_to_block(3, |b| { - // a new session at each block - Some(( - true, - b, - vec![ - (&0, v0.public()), - (&1, v1.public()), - (&2, v2.public()), - (&3, v3.public()), - (&4, v4.public()), - (&5, v5.public()), - (&6, v6.public()), - ], - Some(vec![ - (&0, v0.public()), - (&1, v1.public()), - (&2, v2.public()), - (&3, v3.public()), - (&4, v4.public()), - (&5, v5.public()), - (&6, v6.public()), - ]), - )) - }); - - let candidate_hash_a = CandidateHash(sp_core::H256::repeat_byte(1)); - let candidate_hash_b = CandidateHash(sp_core::H256::repeat_byte(2)); - let candidate_hash_c = CandidateHash(sp_core::H256::repeat_byte(3)); - - let payload = |c_hash: &CandidateHash, valid| { - ExplicitDisputeStatement { valid, candidate_hash: c_hash.clone(), session: 1 } - .signing_payload() - }; - - let payload_a = payload(&candidate_hash_a, true); - let payload_b = payload(&candidate_hash_b, true); - let payload_c = payload(&candidate_hash_c, true); - - let payload_a_bad = payload(&candidate_hash_a, false); - let payload_b_bad = payload(&candidate_hash_b, false); - let payload_c_bad = payload(&candidate_hash_c, false); - - let sig_0a = v0.sign(&payload_a); - let sig_0b = v0.sign(&payload_b); - let sig_0c = v0.sign(&payload_c); - - let sig_1b = v1.sign(&payload_b); - - let sig_2a = v2.sign(&payload_a_bad); - let sig_2b = v2.sign(&payload_b_bad); - let sig_2c = v2.sign(&payload_c_bad); - - let statements = vec![ - // validators 0 and 2 get 1 spam slot from this. - DisputeStatementSet { - candidate_hash: candidate_hash_a.clone(), - session: 1, - statements: vec![ - ( - DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), - ValidatorIndex(0), - sig_0a.clone(), - ), - ( - DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), - ValidatorIndex(6), - sig_2a.clone(), - ), - ], - }, - // Validators 0, 2, and 3 get no spam slots for this - DisputeStatementSet { - candidate_hash: candidate_hash_b.clone(), - session: 1, - statements: vec![ - ( - DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), - ValidatorIndex(0), - sig_0b.clone(), - ), - ( - DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), - ValidatorIndex(3), - sig_1b.clone(), - ), - ( - DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), - ValidatorIndex(6), - sig_2b.clone(), - ), - ], - }, - // Validators 0 and 2 get an extra spam slot for this. - DisputeStatementSet { - candidate_hash: candidate_hash_c.clone(), - session: 1, - statements: vec![ - ( - DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), - ValidatorIndex(0), - sig_0c.clone(), - ), - ( - DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), - ValidatorIndex(6), - sig_2c.clone(), - ), - ], - }, - ]; - - let old_statements = statements - .clone() - .into_iter() - .map(CheckedDisputeStatementSet::unchecked_from_unchecked) - .collect::>(); - let statements = apply_filter_all::(statements); - - assert_eq!(statements, old_statements); - }) -} - #[test] fn filter_removes_session_out_of_bounds() { new_test_ext(Default::default()).execute_with(|| { 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 32851a54d5b3..7f0b55df59ef 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -132,7 +132,7 @@ impl CandidatePendingAvailability { /// Get the core index. pub(crate) fn core_occupied(&self) -> CoreIndex { - self.core.clone() + self.core } /// Get the candidate hash. @@ -465,7 +465,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 { @@ -726,8 +726,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 f6539a8500b0..52d5fdbb27e7 100644 --- a/runtime/parachains/src/initializer.rs +++ b/runtime/parachains/src/initializer.rs @@ -207,6 +207,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, @@ -244,7 +245,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 0bcfedfdca08..0f1c3c405829 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(), @@ -348,7 +349,6 @@ impl Pallet { let (checked_disputes, total_consumed_weight) = { // Obtain config params.. let config = >::config(); - let max_spam_slots = config.dispute_max_spam_slots; let post_conclusion_acceptance_period = config.dispute_post_conclusion_acceptance_period; @@ -362,7 +362,6 @@ impl Pallet { let dispute_set_validity_check = move |set| { T::DisputesHandler::filter_dispute_data( set, - max_spam_slots, post_conclusion_acceptance_period, verify_dispute_sigs, ) @@ -513,7 +512,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, @@ -590,7 +589,6 @@ impl Pallet { } let config = >::config(); - let max_spam_slots = config.dispute_max_spam_slots; let post_conclusion_acceptance_period = config.dispute_post_conclusion_acceptance_period; // TODO: Better if we can convert this to `with_transactional` and handle an error if @@ -604,7 +602,6 @@ impl Pallet { let dispute_statement_set_valid = move |set: DisputeStatementSet| { T::DisputesHandler::filter_dispute_data( set, - max_spam_slots, post_conclusion_acceptance_period, // `DisputeCoordinator` on the node side only forwards // valid dispute statement sets and hence this does not @@ -707,7 +704,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::( @@ -1197,7 +1194,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 fa877468ab75..f79ede5e05c9 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/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index 9809fb8ff843..8c715491cbf4 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"] } @@ -11,14 +11,14 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.137", default-features = false } +serde = { version = "1.0.139", default-features = false } serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" 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.24.1", 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..ad8159e7463d 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,17 @@ 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" + "frame-support/std", + "primitives/std", + "runtime-common/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..dc32a91c7ace 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,18 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { } } +/// All migrations that will run on the next runtime upgrade. +/// +/// Should be cleared after every release. +pub type Migrations = ( + pallet_balances::migration::MigrateToTrackInactive, + crowdloan::migration::MigrateToTrackInactive, + pallet_scheduler::migration::v4::CleanupAgendas, + pallet_staking::migrations::v13::MigrateToV13, + parachains_disputes::migration::v1::MigrateToV1, + parachains_configuration::migration::v4::MigrateToV4, +); + /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -1609,17 +1619,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 +1861,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 +2021,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: frame_try_runtime::UpgradeCheckSelect) -> (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 +2447,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..2b944a508f8f 100644 --- a/runtime/rococo/Cargo.toml +++ b/runtime/rococo/Cargo.toml @@ -1,22 +1,22 @@ [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"] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } -serde = { version = "1.0.137", default-features = false } +serde = { version = "1.0.139", default-features = false } serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" 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 } @@ -77,6 +77,7 @@ pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false } pallet-xcm-benchmarks = { path = "../../xcm/pallet-xcm-benchmarks", default-features = false, optional = true } frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } hex-literal = { version = "0.3.4" } @@ -92,9 +93,12 @@ xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default [dev-dependencies] tiny-keccak = { version = "2.0.2", features = ["keccak"] } keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" } +remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } separator = "0.4.1" serde_json = "1.0.81" +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +tokio = { version = "1.24.1", features = ["macros"] } [build-dependencies] substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -130,7 +134,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", @@ -168,6 +172,7 @@ std = [ "sp-session/std", "runtime-common/std", "runtime-parachains/std", + "frame-try-runtime/std", "beefy-primitives/std", "rococo-runtime-constants/std", "xcm/std", @@ -188,7 +193,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", @@ -214,10 +219,14 @@ runtime-benchmarks = [ ] try-runtime = [ "frame-executive/try-runtime", + "frame-try-runtime", "frame-system/try-runtime", "pallet-authority-discovery/try-runtime", "pallet-authorship/try-runtime", "pallet-balances/try-runtime", + "pallet-babe/try-runtime", + "pallet-beefy/try-runtime", + "pallet-beefy-mmr/try-runtime", "pallet-bounties/try-runtime", "pallet-child-bounties/try-runtime", "pallet-transaction-payment/try-runtime", @@ -229,7 +238,9 @@ try-runtime = [ "pallet-im-online/try-runtime", "pallet-indices/try-runtime", "pallet-membership/try-runtime", + "pallet-mmr/try-runtime", "pallet-multisig/try-runtime", + "pallet-nis/try-runtime", "pallet-offences/try-runtime", "pallet-preimage/try-runtime", "pallet-proxy/try-runtime", @@ -239,13 +250,15 @@ try-runtime = [ "pallet-society/try-runtime", "pallet-sudo/try-runtime", "pallet-staking/try-runtime", + "pallet-state-trie-migration/try-runtime", "pallet-timestamp/try-runtime", "pallet-tips/try-runtime", "pallet-treasury/try-runtime", "pallet-utility/try-runtime", "pallet-vesting/try-runtime", - "pallet-babe/try-runtime", + "pallet-xcm/try-runtime", "runtime-common/try-runtime", + "runtime-parachains/try-runtime", ] # When enabled, the runtime API will not be build. # diff --git a/runtime/rococo/constants/Cargo.toml b/runtime/rococo/constants/Cargo.toml index ec520965684b..9383a9de6c68 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,17 @@ 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" + "frame-support/std", + "primitives/std", + "runtime-common/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..38d5ce28d167 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,18 @@ pub type SignedExtra = ( /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; + +/// All migrations that will run on the next runtime upgrade. +/// +/// Should be cleared after every release. +pub type Migrations = ( + pallet_balances::migration::MigrateToTrackInactive, + crowdloan::migration::MigrateToTrackInactive, + pallet_scheduler::migration::v4::CleanupAgendas, + parachains_disputes::migration::v1::MigrateToV1, + parachains_configuration::migration::v4::MigrateToV4, +); + /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -1456,15 +1495,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 +1549,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 +1557,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 +1755,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, @@ -1892,6 +1928,26 @@ sp_api::impl_runtime_apis! { } } + #[cfg(feature = "try-runtime")] + impl frame_try_runtime::TryRuntime for Runtime { + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + log::info!("try-runtime::on_runtime_upgrade rococo."); + let weight = Executive::try_runtime_upgrade(checks).unwrap(); + (weight, BlockWeights::get().max_block) + } + + 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() + } + } + #[cfg(feature = "runtime-benchmarks")] impl frame_benchmarking::Benchmark for Runtime { fn benchmark_metadata(extra: bool) -> ( @@ -2013,3 +2069,38 @@ sp_api::impl_runtime_apis! { } } } + +#[cfg(all(test, feature = "try-runtime"))] +mod remote_tests { + use super::*; + use frame_try_runtime::runtime_decl_for_TryRuntime::TryRuntime; + use remote_externalities::{ + Builder, Mode, OfflineConfig, OnlineConfig, SnapshotConfig, Transport, + }; + use std::env::var; + + #[tokio::test] + async fn run_migrations() { + sp_tracing::try_init_simple(); + let transport: Transport = + var("WS").unwrap_or("wss://rococo-rpc.polkadot.io:443".to_string()).into(); + let maybe_state_snapshot: Option = var("SNAP").map(|s| s.into()).ok(); + let mut ext = Builder::::default() + .mode(if let Some(state_snapshot) = maybe_state_snapshot { + Mode::OfflineOrElseOnline( + OfflineConfig { state_snapshot: state_snapshot.clone() }, + OnlineConfig { + transport, + state_snapshot: Some(state_snapshot), + ..Default::default() + }, + ) + } else { + Mode::Online(OnlineConfig { transport, ..Default::default() }) + }) + .build() + .await + .unwrap(); + ext.execute_with(|| Runtime::on_runtime_upgrade(true)); + } +} 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..0bb3b1954f9b 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"] } @@ -11,13 +11,13 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.137", default-features = false } +serde = { version = "1.0.139", default-features = false } serde_derive = { version = "1.0.117", optional = true } 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..76f45bd5306e 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"] } @@ -11,13 +11,13 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.137", default-features = false } +serde = { version = "1.0.139", default-features = false } serde_derive = { version = "1.0.117", optional = true } 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.24.1", 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..c6fac15dca32 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,17 @@ 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" + "frame-support/std", + "primitives/std", + "runtime-common/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..b10f76a2700d 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,18 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { } } +/// All migrations that will run on the next runtime upgrade. +/// +/// Should be cleared after every release. +pub type Migrations = ( + pallet_balances::migration::MigrateToTrackInactive, + crowdloan::migration::MigrateToTrackInactive, + pallet_scheduler::migration::v4::CleanupAgendas, + pallet_staking::migrations::v13::MigrateToV13, + parachains_disputes::migration::v1::MigrateToV1, + parachains_configuration::migration::v4::MigrateToV4, +); + /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -1222,16 +1233,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 +1461,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 +1636,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: frame_try_runtime::UpgradeCheckSelect) -> (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 +1838,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..38b47942f1de 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 @@ -40,24 +39,6 @@ build-linux-stable: - echo -n "v${RELEASE_VERSION}" > ./artifacts/BUILD_RELEASE_VERSION - cp -r scripts/* ./artifacts -check-transaction-versions: - stage: build - extends: - - .docker-env - - .test-refs - image: node:15 - needs: - - job: build-linux-stable - artifacts: true - before_script: - - apt-get -y update; apt-get -y install jq lsof - - 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 - script: - - ./scripts/ci/gitlab/check_extrinsics_ordering.sh - build-test-collators: stage: build # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs @@ -73,7 +54,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 +78,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 +144,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..f8b08767f898 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.24.1", features = ["macros"] } diff --git a/utils/staking-miner/Cargo.toml b/utils/staking-miner/Cargo.toml index 45cb5fec6d1a..20d19451489a 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.24.1", 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 152b2eaf8b40..a8089fcf2ead 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 a1bba7014a34..9285d3bb4acd 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! { From 972f4d3b5793fb751e8d8c24a7bf45f87e301050 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:23:35 +0100 Subject: [PATCH 014/182] Update Cargo.lock Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 447 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 263 insertions(+), 184 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6c5420adb46c..5cb338071a3d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -547,7 +547,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "async-trait", @@ -581,7 +581,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "beefy-gadget", "futures", @@ -600,7 +600,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "sp-api", "sp-beefy", @@ -635,6 +635,21 @@ dependencies = [ "shlex", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" @@ -2208,9 +2223,9 @@ dependencies = [ [[package]] name = "finality-grandpa" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b22349c6a11563a202d95772a68e0fcf56119e74ea8a2a19cf2301460fcd0df5" +checksum = "e24e6c429951433ccb7c87fd528c60084834dcd14763182c1f83291bcde24c34" dependencies = [ "either", "futures", @@ -2298,7 +2313,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", ] @@ -2322,7 +2337,7 @@ checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -2345,7 +2360,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "Inflector", "array-bytes", @@ -2392,7 +2407,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2403,7 +2418,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2420,7 +2435,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -2449,7 +2464,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "log", @@ -2465,7 +2480,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "bitflags", "frame-metadata", @@ -2497,7 +2512,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "Inflector", "cfg-expr", @@ -2511,7 +2526,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2523,7 +2538,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro2", "quote", @@ -2533,7 +2548,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2556,7 +2571,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -2567,7 +2582,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "log", @@ -2585,7 +2600,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -2600,7 +2615,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "sp-api", @@ -2609,7 +2624,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "parity-scale-codec", @@ -2780,7 +2795,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "chrono", "frame-election-provider-support", @@ -4522,7 +4537,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "log", @@ -4541,7 +4556,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "anyhow", "jsonrpsee", @@ -5086,7 +5101,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5101,7 +5116,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5117,7 +5132,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5132,7 +5147,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5156,7 +5171,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5176,7 +5191,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5195,7 +5210,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5210,7 +5225,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5226,7 +5241,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "beefy-merkle-tree", @@ -5249,7 +5264,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5267,7 +5282,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5286,7 +5301,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5303,7 +5318,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5320,7 +5335,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5338,7 +5353,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5361,7 +5376,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5374,7 +5389,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5392,7 +5407,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5410,7 +5425,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5433,7 +5448,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5449,7 +5464,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5469,7 +5484,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5486,7 +5501,24 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-message-queue" +version = "7.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5494,16 +5526,18 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", + "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", "sp-std", + "sp-weights", ] [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5520,7 +5554,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5536,7 +5570,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5552,7 +5586,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5569,7 +5603,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5589,7 +5623,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "sp-api", @@ -5599,7 +5633,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5616,7 +5650,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5639,7 +5673,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5656,7 +5690,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5671,7 +5705,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5689,7 +5723,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5704,7 +5738,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5723,7 +5757,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5740,7 +5774,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5761,7 +5795,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5777,7 +5811,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5791,7 +5825,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5814,7 +5848,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5825,7 +5859,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "log", "sp-arithmetic", @@ -5834,7 +5868,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5851,7 +5885,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5865,7 +5899,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5883,7 +5917,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5902,7 +5936,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5918,7 +5952,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5934,7 +5968,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5946,7 +5980,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5963,7 +5997,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5979,7 +6013,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5994,7 +6028,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -7339,6 +7373,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7496,6 +7531,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -7504,6 +7540,7 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-runtime-metrics", + "proptest", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", @@ -8104,6 +8141,26 @@ dependencies = [ "regex", ] +[[package]] +name = "proptest" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" +dependencies = [ + "bit-set", + "bitflags", + "byteorder", + "lazy_static", + "num-traits", + "quick-error 2.0.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax", + "rusty-fork", + "tempfile", +] + [[package]] name = "prost" version = "0.11.0" @@ -8338,6 +8395,15 @@ dependencies = [ "rand_core 0.6.3", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.3", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -8853,6 +8919,18 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error 1.2.3", + "tempfile", + "wait-timeout", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -8882,7 +8960,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "log", "sp-core", @@ -8893,7 +8971,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures", @@ -8920,7 +8998,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "futures-timer", @@ -8943,7 +9021,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8959,7 +9037,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -8974,7 +9052,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8985,7 +9063,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "chrono", @@ -9025,7 +9103,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "fnv", "futures", @@ -9051,7 +9129,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "hash-db", "kvdb", @@ -9076,7 +9154,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures", @@ -9101,7 +9179,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "fork-tree", @@ -9139,7 +9217,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "jsonrpsee", @@ -9161,7 +9239,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9174,7 +9252,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures", @@ -9197,7 +9275,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "lru", "parity-scale-codec", @@ -9221,7 +9299,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9234,7 +9312,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "log", "sc-allocator", @@ -9247,7 +9325,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "cfg-if", "libc", @@ -9264,7 +9342,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "ahash", "array-bytes", @@ -9304,7 +9382,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "finality-grandpa", "futures", @@ -9324,7 +9402,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "ansi_term", "futures", @@ -9339,7 +9417,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "async-trait", @@ -9354,7 +9432,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "async-trait", @@ -9396,7 +9474,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "cid", "futures", @@ -9415,7 +9493,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "bitflags", @@ -9441,7 +9519,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "ahash", "futures", @@ -9459,7 +9537,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "futures", @@ -9480,7 +9558,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "async-trait", @@ -9512,7 +9590,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "futures", @@ -9531,7 +9609,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "bytes", @@ -9561,7 +9639,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "libp2p", @@ -9574,7 +9652,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9583,7 +9661,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "jsonrpsee", @@ -9612,7 +9690,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9631,7 +9709,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "http", "jsonrpsee", @@ -9646,7 +9724,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "futures", @@ -9672,7 +9750,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "directories", @@ -9737,7 +9815,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "log", "parity-scale-codec", @@ -9748,7 +9826,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9767,7 +9845,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "libc", @@ -9786,7 +9864,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "chrono", "futures", @@ -9805,7 +9883,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "ansi_term", "atty", @@ -9836,7 +9914,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9847,7 +9925,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures", @@ -9873,7 +9951,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures", @@ -9887,7 +9965,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "backtrace", "futures", @@ -10383,7 +10461,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "hash-db", "log", @@ -10401,7 +10479,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "blake2", "proc-macro-crate", @@ -10413,7 +10491,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "scale-info", @@ -10426,7 +10504,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "integer-sqrt", "num-traits", @@ -10440,7 +10518,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "scale-info", @@ -10453,7 +10531,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "parity-scale-codec", @@ -10465,7 +10543,7 @@ dependencies = [ [[package]] name = "sp-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "scale-info", @@ -10482,7 +10560,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "sp-api", @@ -10494,7 +10572,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "log", @@ -10512,7 +10590,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures", @@ -10530,7 +10608,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "merlin", @@ -10553,7 +10631,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "scale-info", @@ -10565,7 +10643,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "scale-info", @@ -10578,7 +10656,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "base58", @@ -10620,7 +10698,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "blake2", "byteorder", @@ -10634,7 +10712,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro2", "quote", @@ -10645,7 +10723,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10654,7 +10732,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro2", "quote", @@ -10664,7 +10742,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "environmental", "parity-scale-codec", @@ -10675,7 +10753,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "finality-grandpa", "log", @@ -10693,7 +10771,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10707,7 +10785,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "bytes", "ed25519", @@ -10732,7 +10810,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "lazy_static", "sp-core", @@ -10743,7 +10821,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures", @@ -10760,7 +10838,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "thiserror", "zstd", @@ -10769,7 +10847,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -10787,7 +10865,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "scale-info", @@ -10801,7 +10879,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "sp-api", "sp-core", @@ -10811,7 +10889,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "backtrace", "lazy_static", @@ -10821,7 +10899,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "rustc-hash", "serde", @@ -10831,7 +10909,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "either", "hash256-std-hasher", @@ -10853,7 +10931,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10871,7 +10949,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "Inflector", "proc-macro-crate", @@ -10883,7 +10961,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "scale-info", @@ -10897,7 +10975,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "scale-info", @@ -10909,7 +10987,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "hash-db", "log", @@ -10929,12 +11007,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10947,7 +11025,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures-timer", @@ -10962,7 +11040,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "sp-std", @@ -10974,7 +11052,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "sp-api", "sp-runtime", @@ -10983,7 +11061,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "log", @@ -10999,7 +11077,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "ahash", "hash-db", @@ -11022,7 +11100,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11039,7 +11117,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11050,7 +11128,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "impl-trait-for-tuples", "log", @@ -11063,7 +11141,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "scale-info", @@ -11296,7 +11374,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "platforms", ] @@ -11304,7 +11382,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11323,7 +11401,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "hyper", "log", @@ -11335,7 +11413,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "jsonrpsee", @@ -11348,7 +11426,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "jsonrpsee", "log", @@ -11367,7 +11445,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "async-trait", @@ -11393,7 +11471,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11403,7 +11481,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11414,7 +11492,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "ansi_term", "build-helper", @@ -12209,7 +12287,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "clap", "frame-remote-externalities", @@ -12239,9 +12317,9 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.61" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc92f558afb6d1d7c6f175eb8d615b8ef49c227543e68e19c123d4ee43d8a7d" +checksum = "f1212c215a87a183687a7cc7065901b1a98da6b37277d51a1b5faedbb4efd4f3" dependencies = [ "dissimilar", "glob", @@ -13594,6 +13672,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", "xcm", "xcm-executor", ] From e48d6ef84e4fe2433fc279a37982cbee4d9a10ad Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:30:31 +0100 Subject: [PATCH 015/182] Update remove-weight migration The migration got touched on master; just resolving conflicts here. Signed-off-by: Oliver Tale-Yazdi --- .../parachains/src/configuration/migration.rs | 116 +++++++++--------- 1 file changed, 57 insertions(+), 59 deletions(-) diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs index 6318276ffc7c..9a1072f432e0 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -16,7 +16,7 @@ //! A module that is responsible for migration of storage. -use crate::configuration::{self, Config, Pallet, Store, MAX_POV_SIZE}; +use crate::configuration::{self, Config, Pallet, Store}; use frame_support::{pallet_prelude::*, traits::StorageVersion, weights::Weight}; use frame_system::pallet_prelude::BlockNumberFor; @@ -31,7 +31,7 @@ pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(5); pub mod v5 { use super::*; - use frame_support::{traits::OnRuntimeUpgrade, weights::constants::WEIGHT_REF_TIME_PER_MILLIS}; + use frame_support::traits::OnRuntimeUpgrade; use primitives::v2::{Balance, SessionIndex}; #[cfg(feature = "try-runtime")] use sp_std::prelude::*; @@ -172,14 +172,14 @@ pub mod v5 { } } -fn migrate_to_v4() -> Weight { +fn migrate_to_v5() -> Weight { // Unusual formatting is justified: // - make it easier to verify that fields assign what they supposed to assign. // - this code is transient and will be removed after all migrations are done. // - this code is important enough to optimize for legibility sacrificing consistency. #[rustfmt::skip] let translate = - |pre: v4::OldHostConfiguration>| -> + |pre: v5::OldHostConfiguration>| -> configuration::HostConfiguration> { super::HostConfiguration { @@ -194,7 +194,6 @@ validation_upgrade_cooldown : pre.validation_upgrade_cooldown, validation_upgrade_delay : pre.validation_upgrade_delay, max_pov_size : pre.max_pov_size, max_downward_message_size : pre.max_downward_message_size, -ump_service_total_weight : pre.ump_service_total_weight, hrmp_max_parachain_outbound_channels : pre.hrmp_max_parachain_outbound_channels, hrmp_max_parathread_outbound_channels : pre.hrmp_max_parathread_outbound_channels, hrmp_sender_deposit : pre.hrmp_sender_deposit, @@ -221,7 +220,6 @@ n_delay_tranches : pre.n_delay_tranches, zeroth_delay_tranche_width : pre.zeroth_delay_tranche_width, needed_approvals : pre.needed_approvals, relay_vrf_modulo_samples : pre.relay_vrf_modulo_samples, -ump_max_individual_weight : pre.ump_max_individual_weight, pvf_checking_enabled : pre.pvf_checking_enabled, pvf_voting_ttl : pre.pvf_voting_ttl, minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, @@ -236,7 +234,7 @@ minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, // to be unlikely to be caused by this. So we just log. Maybe it'll work out still? log::error!( target: configuration::LOG_TARGET, - "unexpected error when performing translation of the configuration type during storage upgrade to v4." + "unexpected error when performing translation of the configuration type during storage upgrade to v5." ); } @@ -275,17 +273,17 @@ mod tests { // We check only a sample of the values here. If we missed any fields or messed up data types // that would skew all the fields coming after. - assert_eq!(v3.max_code_size, 10_485_760); - assert_eq!(v3.validation_upgrade_cooldown, 3600); - assert_eq!(v3.max_pov_size, 5_242_880); - assert_eq!(v3.hrmp_channel_max_message_size, 102_400); - assert_eq!(v3.n_delay_tranches, 89); - assert_eq!(v3.ump_max_individual_weight, Weight::zero()); - assert_eq!(v3.minimum_validation_upgrade_delay, 20); + assert_eq!(v4.max_code_size, 10_485_760); + assert_eq!(v4.validation_upgrade_cooldown, 3600); + assert_eq!(v4.max_pov_size, 5_242_880); + assert_eq!(v4.hrmp_channel_max_message_size, 102_400); + assert_eq!(v4.n_delay_tranches, 89); + assert_eq!(v4.ump_max_individual_weight, Weight::zero()); + assert_eq!(v4.minimum_validation_upgrade_delay, 20); } #[test] - fn test_migrate_to_v4() { + fn test_migrate_to_v5() { // Host configuration has lots of fields. However, in this migration we add only a couple of // fields. The most important part to check are a couple of the last fields. We also pick // extra fields to check arbitrarily, e.g. depending on their position (i.e. the middle) and @@ -306,58 +304,58 @@ mod tests { }; new_test_ext(Default::default()).execute_with(|| { - // Implant the v3 version in the state. + // Implant the v4 version in the state. frame_support::storage::unhashed::put_raw( &configuration::ActiveConfig::::hashed_key(), - &v3.encode(), + &v4.encode(), ); - migrate_to_v4::(); + migrate_to_v5::(); - let v4 = configuration::ActiveConfig::::get(); + let v5 = configuration::ActiveConfig::::get(); #[rustfmt::skip] { - assert_eq!(v3.max_code_size , v4.max_code_size); - assert_eq!(v3.max_head_data_size , v4.max_head_data_size); - assert_eq!(v3.max_upward_queue_count , v4.max_upward_queue_count); - assert_eq!(v3.max_upward_queue_size , v4.max_upward_queue_size); - assert_eq!(v3.max_upward_message_size , v4.max_upward_message_size); - assert_eq!(v3.max_upward_message_num_per_candidate , v4.max_upward_message_num_per_candidate); - assert_eq!(v3.hrmp_max_message_num_per_candidate , v4.hrmp_max_message_num_per_candidate); - assert_eq!(v3.validation_upgrade_cooldown , v4.validation_upgrade_cooldown); - assert_eq!(v3.validation_upgrade_delay , v4.validation_upgrade_delay); - assert_eq!(v3.max_pov_size , v4.max_pov_size); - assert_eq!(v3.max_downward_message_size , v4.max_downward_message_size); - assert_eq!(v3.hrmp_max_parachain_outbound_channels , v4.hrmp_max_parachain_outbound_channels); - assert_eq!(v3.hrmp_max_parathread_outbound_channels , v4.hrmp_max_parathread_outbound_channels); - assert_eq!(v3.hrmp_sender_deposit , v4.hrmp_sender_deposit); - assert_eq!(v3.hrmp_recipient_deposit , v4.hrmp_recipient_deposit); - assert_eq!(v3.hrmp_channel_max_capacity , v4.hrmp_channel_max_capacity); - assert_eq!(v3.hrmp_channel_max_total_size , v4.hrmp_channel_max_total_size); - assert_eq!(v3.hrmp_max_parachain_inbound_channels , v4.hrmp_max_parachain_inbound_channels); - assert_eq!(v3.hrmp_max_parathread_inbound_channels , v4.hrmp_max_parathread_inbound_channels); - assert_eq!(v3.hrmp_channel_max_message_size , v4.hrmp_channel_max_message_size); - assert_eq!(v3.code_retention_period , v4.code_retention_period); - assert_eq!(v3.parathread_cores , v4.parathread_cores); - assert_eq!(v3.parathread_retries , v4.parathread_retries); - assert_eq!(v3.group_rotation_frequency , v4.group_rotation_frequency); - assert_eq!(v3.chain_availability_period , v4.chain_availability_period); - assert_eq!(v3.thread_availability_period , v4.thread_availability_period); - assert_eq!(v3.scheduling_lookahead , v4.scheduling_lookahead); - assert_eq!(v3.max_validators_per_core , v4.max_validators_per_core); - assert_eq!(v3.max_validators , v4.max_validators); - assert_eq!(v3.dispute_period , v4.dispute_period); - assert_eq!(v3.dispute_post_conclusion_acceptance_period, v4.dispute_post_conclusion_acceptance_period); - assert_eq!(v3.dispute_conclusion_by_time_out_period , v4.dispute_conclusion_by_time_out_period); - assert_eq!(v3.no_show_slots , v4.no_show_slots); - assert_eq!(v3.n_delay_tranches , v4.n_delay_tranches); - assert_eq!(v3.zeroth_delay_tranche_width , v4.zeroth_delay_tranche_width); - assert_eq!(v3.needed_approvals , v4.needed_approvals); - assert_eq!(v3.relay_vrf_modulo_samples , v4.relay_vrf_modulo_samples); - assert_eq!(v3.pvf_checking_enabled , v4.pvf_checking_enabled); - assert_eq!(v3.pvf_voting_ttl , v4.pvf_voting_ttl); - assert_eq!(v3.minimum_validation_upgrade_delay , v4.minimum_validation_upgrade_delay); + assert_eq!(v4.max_code_size , v5.max_code_size); + assert_eq!(v4.max_head_data_size , v5.max_head_data_size); + assert_eq!(v4.max_upward_queue_count , v5.max_upward_queue_count); + assert_eq!(v4.max_upward_queue_size , v5.max_upward_queue_size); + assert_eq!(v4.max_upward_message_size , v5.max_upward_message_size); + assert_eq!(v4.max_upward_message_num_per_candidate , v5.max_upward_message_num_per_candidate); + assert_eq!(v4.hrmp_max_message_num_per_candidate , v5.hrmp_max_message_num_per_candidate); + assert_eq!(v4.validation_upgrade_cooldown , v5.validation_upgrade_cooldown); + assert_eq!(v4.validation_upgrade_delay , v5.validation_upgrade_delay); + assert_eq!(v4.max_pov_size , v5.max_pov_size); + assert_eq!(v4.max_downward_message_size , v5.max_downward_message_size); + assert_eq!(v4.hrmp_max_parachain_outbound_channels , v5.hrmp_max_parachain_outbound_channels); + assert_eq!(v4.hrmp_max_parathread_outbound_channels , v5.hrmp_max_parathread_outbound_channels); + assert_eq!(v4.hrmp_sender_deposit , v5.hrmp_sender_deposit); + assert_eq!(v4.hrmp_recipient_deposit , v5.hrmp_recipient_deposit); + assert_eq!(v4.hrmp_channel_max_capacity , v5.hrmp_channel_max_capacity); + assert_eq!(v4.hrmp_channel_max_total_size , v5.hrmp_channel_max_total_size); + assert_eq!(v4.hrmp_max_parachain_inbound_channels , v5.hrmp_max_parachain_inbound_channels); + assert_eq!(v4.hrmp_max_parathread_inbound_channels , v5.hrmp_max_parathread_inbound_channels); + assert_eq!(v4.hrmp_channel_max_message_size , v5.hrmp_channel_max_message_size); + assert_eq!(v4.code_retention_period , v5.code_retention_period); + assert_eq!(v4.parathread_cores , v5.parathread_cores); + assert_eq!(v4.parathread_retries , v5.parathread_retries); + assert_eq!(v4.group_rotation_frequency , v5.group_rotation_frequency); + assert_eq!(v4.chain_availability_period , v5.chain_availability_period); + assert_eq!(v4.thread_availability_period , v5.thread_availability_period); + assert_eq!(v4.scheduling_lookahead , v5.scheduling_lookahead); + assert_eq!(v4.max_validators_per_core , v5.max_validators_per_core); + assert_eq!(v4.max_validators , v5.max_validators); + assert_eq!(v4.dispute_period , v5.dispute_period); + assert_eq!(v4.dispute_post_conclusion_acceptance_period, v5.dispute_post_conclusion_acceptance_period); + assert_eq!(v4.dispute_conclusion_by_time_out_period , v5.dispute_conclusion_by_time_out_period); + assert_eq!(v4.no_show_slots , v5.no_show_slots); + assert_eq!(v4.n_delay_tranches , v5.n_delay_tranches); + assert_eq!(v4.zeroth_delay_tranche_width , v5.zeroth_delay_tranche_width); + assert_eq!(v4.needed_approvals , v5.needed_approvals); + assert_eq!(v4.relay_vrf_modulo_samples , v5.relay_vrf_modulo_samples); + assert_eq!(v4.pvf_checking_enabled , v5.pvf_checking_enabled); + assert_eq!(v4.pvf_voting_ttl , v5.pvf_voting_ttl); + assert_eq!(v4.minimum_validation_upgrade_delay , v5.minimum_validation_upgrade_delay); }; // ; makes this a statement. `rustfmt::skip` cannot be put on an expression. }); } From cd5b50d2f3c594377e42f10511e4a32576449015 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:32:12 +0100 Subject: [PATCH 016/182] Add message- to dispatch-origin conversion for XCM processing Just using the `impl Into` was a bit inflexible. Like this, the Relaychain can convert `UMP(para)` to a MultiLocation `para`. Signed-off-by: Oliver Tale-Yazdi --- xcm/xcm-builder/src/process_xcm_message.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index 2c506fb95428..05d3dce5e912 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -27,14 +27,15 @@ use sp_std::{fmt::Debug, marker::PhantomData}; use sp_weights::Weight; use xcm::prelude::*; -pub struct ProcessXcmMessage( - PhantomData<(MessageOrigin, XcmExecutor, Call)>, +pub struct ProcessXcmMessage( + PhantomData<(MessageOrigin, XcmExecutor, Call, MessageToDispatchOrigin)>, ); impl< - MessageOrigin: Into + FullCodec + MaxEncodedLen + Clone + Eq + PartialEq + TypeInfo + Debug, + MessageOrigin: FullCodec + MaxEncodedLen + Clone + Eq + PartialEq + TypeInfo + Debug, XcmExecutor: ExecuteXcm, Call, - > ProcessMessage for ProcessXcmMessage + MessageToDispatchOrigin: sp_runtime::traits::Convert, + > ProcessMessage for ProcessXcmMessage { type Origin = MessageOrigin; From 130a48abdb83ca6a224c39b59b55462c11eeee7a Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:33:54 +0100 Subject: [PATCH 017/182] DNM: Temporarily comment code since XCMv3 is not merged yet Signed-off-by: Oliver Tale-Yazdi --- xcm/xcm-builder/src/process_xcm_message.rs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index 05d3dce5e912..7b0305a41bc2 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -43,20 +43,33 @@ impl< fn process_message( message: &[u8], origin: Self::Origin, - weight_limit: Weight, + _weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { - let hash = blake2_256(message); + let _hash = blake2_256(message); let versioned_message = VersionedXcm::::decode(&mut &message[..]) .map_err(|_| ProcessMessageError::Corrupt)?; let message = Xcm::::try_from(versioned_message) .map_err(|_| ProcessMessageError::Unsupported)?; - let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; + // FIXME: Needs XCMv3 for pre-dispatch message weight extraction + // + /* let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; let weight = Weight::from_ref_time(pre.weight_of()); ensure!(weight.all_lte(weight_limit), ProcessMessageError::Overweight(weight)); match XcmExecutor::execute(origin.into(), pre, hash, 0) { Outcome::Complete(w) => Ok((true, Weight::from_ref_time(w))), Outcome::Incomplete(w, _) => Ok((false, Weight::from_ref_time(w))), Outcome::Error(_) => Err(ProcessMessageError::Unsupported), + }*/ + // Do not merge this… + let outcome = XcmExecutor::execute_xcm( + MessageToDispatchOrigin::convert(origin).into(), + message, + u64::MAX, + ); + match outcome { + Outcome::Error(XcmError::WeightLimitReached(_required)) => + Err(ProcessMessageError::Unsupported), + _outcome => Ok((true, Weight::MAX)), } } } From b583ddff537543eec8f7b12ea152355981ee8e38 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:39:02 +0100 Subject: [PATCH 018/182] Use u64 for queue-wide limits on UmpAcceptanceCheckErr Using u32 here was one audit finding for the queue pallet. Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 7f0b55df59ef..92d07a5c0bc1 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -348,11 +348,16 @@ enum AcceptanceCheckErr { /// An error returned by [`check_upward_messages`] that indicates a violation of one of acceptance /// criteria rules. +#[cfg_attr(test, derive(PartialEq))] pub enum UmpAcceptanceCheckErr { + /// The maximal number of messages that can be submitted in one batch was exceeded. MoreMessagesThanPermitted { sent: u32, permitted: u32 }, + /// The maximal size of a single message was exceeded. MessageSize { idx: u32, msg_size: u32, max_size: u32 }, - CapacityExceeded { count: u32, limit: u32 }, - TotalSizeExceeded { total_size: u32, limit: u32 }, + /// The allowed number of messages in the queue was exceeded. + CapacityExceeded { count: u64, limit: u64 }, + /// The allowed combined message size in the queue was exceeded. + TotalSizeExceeded { total_size: u64, limit: u64 }, } impl fmt::Debug for UmpAcceptanceCheckErr { From b8b09981b1aa397fb0193f7d67aad51165cbc338 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:46:06 +0100 Subject: [PATCH 019/182] Define one sub-queue per *MP queue Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 63 +++++++++++++++++++------ 1 file changed, 49 insertions(+), 14 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 92d07a5c0bc1..f6c4939ba13b 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -38,7 +38,7 @@ use primitives::v2::{ UpwardMessage, ValidatorId, ValidatorIndex, ValidityAttestation, }; use scale_info::TypeInfo; -use sp_runtime::{traits::One, DispatchError}; +use sp_runtime::{traits::One, DispatchError, SaturatedConversion}; use sp_std::{collections::btree_set::BTreeSet, fmt, prelude::*}; pub use pallet::*; @@ -209,6 +209,33 @@ pub fn minimum_backing_votes(n_validators: usize) -> usize { sp_std::cmp::min(n_validators, 2) } +/// Divides the [`Config::MessageQueue`] into sub queues which are serviced in a round-robin fashion. +/// +/// NOTE Ideally we want the queue pallet to be sub-queue aware since currently we waste PoV by introducing a lot of few-element queues by doing this. +/// +/// Changing this requires a migration of the queue pallet. +#[derive(Encode, Decode, Clone, Copy, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +pub enum SubQueue { + UMP, + HRMP, + DMP, +} + +/// Over which `queue` and `from` which para-chain a message came in from. +/// +/// Changing this requires a migration of the queue pallet. +#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +pub struct MessageOrigin { + pub queue: SubQueue, + pub para: ParaId, +} + +impl MessageOrigin { + pub const fn ump(para: ParaId) -> Self { + Self { queue: SubQueue::UMP, para } + } +} + #[frame_support::pallet] pub mod pallet { use super::*; @@ -233,7 +260,9 @@ pub mod pallet { type RewardValidators: RewardValidators; /// The system message queue. - type MessageQueue: EnqueueMessage; + /// + /// The message queue provides general queueing and processing functionality. Currently it replaces the old `UMP`, `HRMP` and `DMP` queue pallets. Since it provides a very generic kind of service; other use-cases can be implemented as well. + type MessageQueue: EnqueueMessage; } #[pallet::event] @@ -1076,18 +1105,24 @@ impl AcceptanceCheckErr { } } -impl OnQueueChanged for Pallet { - fn on_queue_changed(para: ParaId, count: u32, size: u32) { - // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` - #[allow(deprecated)] - let key = well_known_keys::relay_dispatch_queue_size(para); - (count, size).using_encoded(|d| sp_io::storage::set(&key, d)); - - let config = >::config(); - let key = well_known_keys::relay_dispatch_queue_remaining_capacity(para); - let remaining_count = config.max_upward_queue_count.saturating_sub(count); - let remaining_size = config.max_upward_queue_size.saturating_sub(size); - (remaining_count, remaining_size).using_encoded(|d| sp_io::storage::set(&key, d)); +impl OnQueueChanged for Pallet { + fn on_queue_changed(queue: MessageOrigin, count: u64, size: u64) { + match queue { + MessageOrigin { queue: SubQueue::UMP, para } => { + // TODO maybe migrate this to u64 + let (count, size) = (count.saturated_into(), size.saturated_into()); + // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` + #[allow(deprecated)] + well_known_keys::relay_dispatch_queue_size_typed(para).set((count, size)); + + let config = >::config(); + let remaining_count = config.max_upward_queue_count.saturating_sub(count); + let remaining_size = config.max_upward_queue_size.saturating_sub(size); + well_known_keys::relay_dispatch_queue_remaining_capacity(para) + .set((remaining_count, remaining_size)); + }, + _ => todo!(), + } } } From 435f743f4389c366925845ca4cb81cac03c74746 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:51:27 +0100 Subject: [PATCH 020/182] Harden check_upward_messages Using safe math and casts. Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 57 ++++++++++++++----------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index f6c4939ba13b..9cf521d04802 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -911,47 +911,56 @@ impl Pallet { /// Check that all the upward messages sent by a candidate pass the acceptance criteria. Returns /// false, if any of the messages doesn't pass. + // FAIL-CI: TODO update docs pub(crate) fn check_upward_messages( config: &HostConfiguration, para: ParaId, upward_messages: &[UpwardMessage], ) -> Result<(), UmpAcceptanceCheckErr> { - if upward_messages.len() as u32 > config.max_upward_message_num_per_candidate { + let additional_msgs = upward_messages.len(); + if additional_msgs > config.max_upward_message_num_per_candidate as usize { return Err(UmpAcceptanceCheckErr::MoreMessagesThanPermitted { - sent: upward_messages.len() as u32, + sent: additional_msgs as u32, permitted: config.max_upward_message_num_per_candidate, }) } - let fp = T::MessageQueue::footprint(para); - let (mut para_queue_count, mut para_queue_size) = (fp.count, fp.size); + let fp = T::MessageQueue::footprint(MessageOrigin::ump(para)); + let (para_queue_count, mut para_queue_size) = (fp.count, fp.size); + + if para_queue_count + .checked_add(additional_msgs as u64) + .map(|want| want > config.max_upward_queue_count as u64) + .unwrap_or(true) + { + return Err(UmpAcceptanceCheckErr::CapacityExceeded { + count: para_queue_count.saturating_add(additional_msgs as u64), + limit: config.max_upward_queue_count as u64, + }) + } for (idx, msg) in upward_messages.into_iter().enumerate() { - let msg_size = msg.len() as u32; - if msg_size > config.max_upward_message_size { + let msg_size = msg.len(); + if msg_size > config.max_upward_message_size as usize { return Err(UmpAcceptanceCheckErr::MessageSize { idx: idx as u32, - msg_size, + msg_size: msg_size as u32, max_size: config.max_upward_message_size, }) } - para_queue_count += 1; - para_queue_size += msg_size; - } - - // make sure that the queue is not overfilled. - // we do it here only once since returning false invalidates the whole relay-chain block. - if para_queue_count > config.max_upward_queue_count { - return Err(UmpAcceptanceCheckErr::CapacityExceeded { - count: para_queue_count, - limit: config.max_upward_queue_count, - }) - } - if para_queue_size > config.max_upward_queue_size { - return Err(UmpAcceptanceCheckErr::TotalSizeExceeded { - total_size: para_queue_size, - limit: config.max_upward_queue_size, - }) + // make sure that the queue is not overfilled. + // we do it here only once since returning false invalidates the whole relay-chain block. + if para_queue_size + .checked_add(msg_size as u64) + .map(|want| want > config.max_upward_queue_size as u64) + .unwrap_or(true) + { + return Err(UmpAcceptanceCheckErr::TotalSizeExceeded { + total_size: para_queue_size.saturating_add(msg_size as u64), + limit: config.max_upward_queue_size as u64, + }) + } + para_queue_size += msg_size as u64; } Ok(()) From 67b313680d7f3600457cf355b3fb85029a947a4e Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:52:10 +0100 Subject: [PATCH 021/182] Add type-safe well_known_keys Signed-off-by: Oliver Tale-Yazdi --- primitives/src/v2/mod.rs | 47 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/primitives/src/v2/mod.rs b/primitives/src/v2/mod.rs index 0fb7b83a5944..0d3d5e9bd65c 100644 --- a/primitives/src/v2/mod.rs +++ b/primitives/src/v2/mod.rs @@ -133,7 +133,7 @@ pub type ValidatorSignature = validator_app::Signature; /// A declarations of storage keys where an external observer can find some interesting data. pub mod well_known_keys { - use super::{HrmpChannelId, Id}; + use super::{HrmpChannelId, Id, WellKnownKey}; use hex_literal::hex; use parity_scale_codec::Encode as _; use sp_io::hashing::twox_64; @@ -208,6 +208,13 @@ pub mod well_known_keys { }) } + /// Type safe version of `relay_dispatch_queue_size`. + #[deprecated = "Use `relay_dispatch_queue_remaining_capacity` instead"] + pub fn relay_dispatch_queue_size_typed(para: Id) -> WellKnownKey<(u32, u32)> { + #[allow(deprecated)] + relay_dispatch_queue_size(para).into() + } + /// The upward message dispatch queue remaining capacity for the given para id. /// /// The storage entry stores a tuple of two values: @@ -215,8 +222,8 @@ pub mod well_known_keys { /// - `count: u32`, the number of additional messages which may be enqueued for the given para, /// - `total_size: u32`, the total size of additional messages which may be enqueued for the /// given para. - pub fn relay_dispatch_queue_remaining_capacity(para_id: Id) -> Vec { - (b":relay_dispatch_queue_remaining_capacity", para_id).encode() + pub fn relay_dispatch_queue_remaining_capacity(para_id: Id) -> WellKnownKey<(u32, u32)> { + (b":relay_dispatch_queue_remaining_capacity", para_id).encode().into() } /// The HRMP channel for the given identifier. @@ -1698,6 +1705,40 @@ impl PvfCheckStatement { } } +/// A well-known and typed storage key. +pub struct WellKnownKey { + /// The raw storage key. + pub key: Vec, + _p: sp_std::marker::PhantomData, +} + +impl From> for WellKnownKey { + fn from(key: Vec) -> Self { + Self { key, _p: Default::default() } + } +} + +impl AsRef<[u8]> for WellKnownKey { + fn as_ref(&self) -> &[u8] { + self.key.as_ref() + } +} + +impl WellKnownKey { + /// Gets the value or `None` if it does not exist or decoding failed. + pub fn get(&self) -> Option { + sp_io::storage::get(&self.key).and_then(|raw| + parity_scale_codec::DecodeAll::decode_all(&mut raw.as_ref()).ok()) + } +} + +impl WellKnownKey { + /// Sets the value. + pub fn set(&self, value: T) { + sp_io::storage::set(&self.key, &value.encode()); + } +} + /// Old, v1-style info about session info. Only needed for limited /// backwards-compatibility. #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] From bea3a0ec171b911bccbfe98cb300c355a597d714 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:52:57 +0100 Subject: [PATCH 022/182] Add message-queue weights Signed-off-by: Oliver Tale-Yazdi --- runtime/polkadot/src/weights/mod.rs | 1 + .../src/weights/pallet_message_queue.rs | 216 ++++++++++++++++++ 2 files changed, 217 insertions(+) create mode 100644 runtime/polkadot/src/weights/pallet_message_queue.rs diff --git a/runtime/polkadot/src/weights/mod.rs b/runtime/polkadot/src/weights/mod.rs index cef1ce83bd11..059b5a70b098 100644 --- a/runtime/polkadot/src/weights/mod.rs +++ b/runtime/polkadot/src/weights/mod.rs @@ -31,6 +31,7 @@ pub mod pallet_identity; pub mod pallet_im_online; pub mod pallet_indices; pub mod pallet_membership; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_nomination_pools; pub mod pallet_preimage; diff --git a/runtime/polkadot/src/weights/pallet_message_queue.rs b/runtime/polkadot/src/weights/pallet_message_queue.rs new file mode 100644 index 000000000000..cd9268ffde22 --- /dev/null +++ b/runtime/polkadot/src/weights/pallet_message_queue.rs @@ -0,0 +1,216 @@ +// This file is part of Substrate. + +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for pallet_message_queue +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-12-08, 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("dev"), DB CACHE: 1024 + +// Executed Command: +// /home/benchbot/cargo_target_dir/production/substrate +// 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/substrate/.git/.artifacts/bench.json +// --pallet=pallet_message_queue +// --chain=dev +// --header=./HEADER-APACHE2 +// --output=./frame/message-queue/src/weights.rs +// --template=./.maintain/frame-weight-template.hbs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +/// Weight functions needed for pallet_message_queue. +pub trait WeightInfo { + fn ready_ring_knit() -> Weight; + fn ready_ring_unknit() -> Weight; + fn service_queue_base() -> Weight; + fn service_page_base_completion() -> Weight; + fn service_page_base_no_completion() -> Weight; + fn service_page_item() -> Weight; + fn bump_service_head() -> Weight; + fn reap_page() -> Weight; + fn execute_overweight_page_removed() -> Weight; + fn execute_overweight_page_updated() -> Weight; +} + +/// Weights for pallet_message_queue using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl WeightInfo for SubstrateWeight { + // Storage: MessageQueue ServiceHead (r:1 w:0) + // Storage: MessageQueue BookStateFor (r:2 w:2) + fn ready_ring_knit() -> Weight { + // Minimum execution time: 12_330 nanoseconds. + Weight::from_ref_time(12_711_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: MessageQueue BookStateFor (r:2 w:2) + // Storage: MessageQueue ServiceHead (r:1 w:1) + fn ready_ring_unknit() -> Weight { + // Minimum execution time: 12_322 nanoseconds. + Weight::from_ref_time(12_560_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + fn service_queue_base() -> Weight { + // Minimum execution time: 4_652 nanoseconds. + Weight::from_ref_time(4_848_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: MessageQueue Pages (r:1 w:1) + fn service_page_base_completion() -> Weight { + // Minimum execution time: 7_115 nanoseconds. + Weight::from_ref_time(7_407_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: MessageQueue Pages (r:1 w:1) + fn service_page_base_no_completion() -> Weight { + // Minimum execution time: 6_974 nanoseconds. + Weight::from_ref_time(7_200_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Minimum execution time: 79_657 nanoseconds. + Weight::from_ref_time(80_050_000) + } + // Storage: MessageQueue ServiceHead (r:1 w:1) + // Storage: MessageQueue BookStateFor (r:1 w:0) + fn bump_service_head() -> Weight { + // Minimum execution time: 7_598 nanoseconds. + Weight::from_ref_time(8_118_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + // Storage: MessageQueue Pages (r:1 w:1) + fn reap_page() -> Weight { + // Minimum execution time: 60_562 nanoseconds. + Weight::from_ref_time(61_430_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + // Storage: MessageQueue Pages (r:1 w:1) + fn execute_overweight_page_removed() -> Weight { + // Minimum execution time: 74_582 nanoseconds. + Weight::from_ref_time(75_445_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + // Storage: MessageQueue Pages (r:1 w:1) + fn execute_overweight_page_updated() -> Weight { + // Minimum execution time: 87_526 nanoseconds. + Weight::from_ref_time(88_055_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} + +// For backwards compatibility and tests +impl WeightInfo for () { + // Storage: MessageQueue ServiceHead (r:1 w:0) + // Storage: MessageQueue BookStateFor (r:2 w:2) + fn ready_ring_knit() -> Weight { + // Minimum execution time: 12_330 nanoseconds. + Weight::from_ref_time(12_711_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: MessageQueue BookStateFor (r:2 w:2) + // Storage: MessageQueue ServiceHead (r:1 w:1) + fn ready_ring_unknit() -> Weight { + // Minimum execution time: 12_322 nanoseconds. + Weight::from_ref_time(12_560_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + fn service_queue_base() -> Weight { + // Minimum execution time: 4_652 nanoseconds. + Weight::from_ref_time(4_848_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: MessageQueue Pages (r:1 w:1) + fn service_page_base_completion() -> Weight { + // Minimum execution time: 7_115 nanoseconds. + Weight::from_ref_time(7_407_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: MessageQueue Pages (r:1 w:1) + fn service_page_base_no_completion() -> Weight { + // Minimum execution time: 6_974 nanoseconds. + Weight::from_ref_time(7_200_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Minimum execution time: 79_657 nanoseconds. + Weight::from_ref_time(80_050_000) + } + // Storage: MessageQueue ServiceHead (r:1 w:1) + // Storage: MessageQueue BookStateFor (r:1 w:0) + fn bump_service_head() -> Weight { + // Minimum execution time: 7_598 nanoseconds. + Weight::from_ref_time(8_118_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + // Storage: MessageQueue Pages (r:1 w:1) + fn reap_page() -> Weight { + // Minimum execution time: 60_562 nanoseconds. + Weight::from_ref_time(61_430_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + // Storage: MessageQueue Pages (r:1 w:1) + fn execute_overweight_page_removed() -> Weight { + // Minimum execution time: 74_582 nanoseconds. + Weight::from_ref_time(75_445_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + // Storage: MessageQueue Pages (r:1 w:1) + fn execute_overweight_page_updated() -> Weight { + // Minimum execution time: 87_526 nanoseconds. + Weight::from_ref_time(88_055_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } +} From f35e2cfc597637259cd79fb8add995fb18a4b86d Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:55:08 +0100 Subject: [PATCH 023/182] Deploy MessageQueue to Polkadot Signed-off-by: Oliver Tale-Yazdi --- runtime/polkadot/src/lib.rs | 51 +++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index dc32a91c7ace..482506b177d8 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -32,7 +32,7 @@ use runtime_parachains::{ initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::v2 as parachains_runtime_api_impl, scheduler as parachains_scheduler, - session_info as parachains_session_info, shared as parachains_shared, ump as parachains_ump, + session_info as parachains_session_info, shared as parachains_shared, }; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; @@ -44,7 +44,7 @@ use frame_support::{ ConstU32, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, PrivilegeCmp, WithdrawReasons, }, - weights::ConstantMultiplier, + weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier}, PalletId, RuntimeDebug, }; use frame_system::EnsureRoot; @@ -1280,6 +1280,8 @@ impl parachains_inclusion::Config for Runtime { type RuntimeEvent = RuntimeEvent; type DisputesHandler = ParasDisputes; type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; + type MessageQueue = MessageQueue; + type WeightInfo = (); // FAIL-CI: TODO } parameter_types! { @@ -1293,17 +1295,44 @@ impl parachains_paras::Config for Runtime { type NextSessionRotation = Babe; } +// TODO does this make the slightest amount of sense? +pub struct ParaIdToJunction; +impl sp_runtime::traits::Convert + for ParaIdToJunction +{ + fn convert(o: parachains_inclusion::MessageOrigin) -> xcm::latest::Junction { + match o { + parachains_inclusion::MessageOrigin { + para, + queue: parachains_inclusion::SubQueue::UMP, + } => xcm::latest::Junction::Parachain(para.into()), + // FAIL-CI: Should be similar for the other *MP queues but check this as a TODO + _ => todo!(), + } + } +} + parameter_types! { - pub const FirstMessageFactorPercent: u64 = 100; + /// Amount of weigh which can be spent per block to service messages. + /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. + pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); } -impl parachains_ump::Config for Runtime { +impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type UmpSink = - crate::parachains_ump::XcmSink, Runtime>; - type FirstMessageFactorPercent = FirstMessageFactorPercent; - type ExecuteOverweightOrigin = EnsureRoot; - type WeightInfo = parachains_ump::TestWeightInfo; + type Size = u32; + type HeapSize = ConstU32<65_536>; + type MaxStale = ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; + // TODO Is `ParaIdToJunction` correct here? + type MessageProcessor = xcm_builder::ProcessXcmMessage< + parachains_inclusion::MessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + ParaIdToJunction, + >; + type QueueChangeHandler = (); + type WeightInfo = (); // FAIL-CI: TODO } impl parachains_dmp::Config for Runtime {} @@ -1551,10 +1580,11 @@ construct_runtime! { Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, Dmp: parachains_dmp::{Pallet, Call, Storage} = 58, - Ump: parachains_ump::{Pallet, Call, Storage, Event} = 59, + // Ump 59 Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 63, // Parachain Onboarding Pallets. Start indices at 70 to leave room. Registrar: paras_registrar::{Pallet, Call, Storage, Event} = 70, @@ -1664,6 +1694,7 @@ mod benches { [pallet_im_online, ImOnline] [pallet_indices, Indices] [pallet_membership, TechnicalMembership] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_nomination_pools, NominationPoolsBench::] [pallet_offences, OffencesBench::] From d0ec96e1ea52af4d522616ece58fc5cdc82d98d0 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:55:40 +0100 Subject: [PATCH 024/182] Update Cargo.toml Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/Cargo.toml | 13 ++++++++++++- runtime/polkadot/Cargo.toml | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/runtime/parachains/Cargo.toml b/runtime/parachains/Cargo.toml index 9cad350459e6..7f1b6995b775 100644 --- a/runtime/parachains/Cargo.toml +++ b/runtime/parachains/Cargo.toml @@ -30,6 +30,7 @@ pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -58,7 +59,7 @@ sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master thousands = "0.2.0" assert_matches = "1" serde_json = "1.0.85" -pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master" } +proptest = "1.0.0" [features] default = ["std"] @@ -80,9 +81,11 @@ std = [ "sp-runtime/std", "sp-session/std", "sp-staking/std", + "pallet-authority-discovery/std", "pallet-authorship/std", "pallet-babe/std", "pallet-balances/std", + "pallet-message-queue/std", "pallet-session/std", "pallet-staking/std", "pallet-timestamp/std", @@ -97,15 +100,23 @@ runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", + "pallet-babe/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-staking/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-vesting/runtime-benchmarks", "primitives/runtime-benchmarks", "static_assertions", "sp-application-crypto", ] try-runtime = [ "frame-support/try-runtime", + "pallet-authority-discovery/try-runtime", "pallet-authorship/try-runtime", + "pallet-babe/try-runtime", "pallet-balances/try-runtime", + "pallet-message-queue/try-runtime", "pallet-session/try-runtime", "pallet-staking/try-runtime", "pallet-timestamp/try-runtime", diff --git a/runtime/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index 8c715491cbf4..07b821edc9df 100644 --- a/runtime/polkadot/Cargo.toml +++ b/runtime/polkadot/Cargo.toml @@ -54,6 +54,7 @@ pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "m 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-message-queue = { 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-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -146,6 +147,7 @@ std = [ "pallet-im-online/std", "pallet-indices/std", "pallet-membership/std", + "pallet-message-queue/std", "pallet-multisig/std", "pallet-nomination-pools/std", "pallet-nomination-pools-runtime-api/std", @@ -202,6 +204,7 @@ runtime-benchmarks = [ "pallet-im-online/runtime-benchmarks", "pallet-indices/runtime-benchmarks", "pallet-membership/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-nomination-pools/runtime-benchmarks", "pallet-nomination-pools-benchmarking/runtime-benchmarks", @@ -247,6 +250,7 @@ try-runtime = [ "pallet-im-online/try-runtime", "pallet-indices/try-runtime", "pallet-membership/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-nomination-pools/try-runtime", "pallet-offences/try-runtime", From 3c34375c8d95c284e1614666954a7fc94835d527 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:56:27 +0100 Subject: [PATCH 025/182] Migrate to parachain config V5 Signed-off-by: Oliver Tale-Yazdi --- runtime/polkadot/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 482506b177d8..a904759ad3be 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1636,7 +1636,7 @@ pub type Migrations = ( pallet_scheduler::migration::v4::CleanupAgendas, pallet_staking::migrations::v13::MigrateToV13, parachains_disputes::migration::v1::MigrateToV1, - parachains_configuration::migration::v4::MigrateToV4, + parachains_configuration::migration::v5::MigrateToV5, ); /// Unchecked extrinsic type as expected by this runtime. From 63322ab449a7fae265bf7b64abbdfe320a64492c Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:58:29 +0100 Subject: [PATCH 026/182] Update UMP tests Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/mock.rs | 50 +++--- runtime/parachains/src/ump_tests.rs | 253 +++++++++++++++++++++++----- 2 files changed, 239 insertions(+), 64 deletions(-) diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 888690278491..05712c900419 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -17,8 +17,9 @@ //! Mocks for all the traits. use crate::{ - configuration, disputes, dmp, hrmp, inclusion, initializer, origin, paras, paras_inherent, - scheduler, session_info, shared, ParaId, + configuration, disputes, dmp, hrmp, + inclusion::{self, MessageOrigin, SubQueue}, + initializer, origin, paras, paras_inherent, scheduler, session_info, shared, ParaId, }; use frame_support::{ @@ -279,42 +280,47 @@ impl crate::disputes::SlashingHandler for Test { impl crate::scheduler::Config for Test {} -pub struct TestWeightInfo; -impl pallet_message_queue::WeightInfo for TestWeightInfo { - fn service_page_base() -> Weight { +pub struct TestMessageQueueWeight; +impl pallet_message_queue::WeightInfo for TestMessageQueueWeight { + fn ready_ring_knit() -> Weight { + Weight::zero() + } + fn ready_ring_unknit() -> Weight { Weight::zero() } fn service_queue_base() -> Weight { Weight::zero() } - fn service_page_process_message() -> Weight { + fn service_page_base_completion() -> Weight { Weight::zero() } - fn bump_service_head() -> Weight { + fn service_page_base_no_completion() -> Weight { Weight::zero() } fn service_page_item() -> Weight { Weight::zero() } - fn ready_ring_unknit() -> Weight { + fn bump_service_head() -> Weight { Weight::zero() } fn reap_page() -> Weight { Weight::zero() } - fn execute_overweight() -> Weight { + fn execute_overweight_page_removed() -> Weight { Weight::zero() } - fn process_message_payload(_: u32) -> Weight { + fn execute_overweight_page_updated() -> Weight { Weight::zero() } } +pub type MessageQueueSize = u32; + impl pallet_message_queue::Config for Test { type RuntimeEvent = RuntimeEvent; - type WeightInfo = TestWeightInfo; + type WeightInfo = TestMessageQueueWeight; type MessageProcessor = TestProcessMessage; - type Size = u32; + type Size = MessageQueueSize; type QueueChangeHandler = ParaInclusion; type HeapSize = ConstU32<65536>; type MaxStale = ConstU32<8>; @@ -403,13 +409,8 @@ pub fn availability_rewards() -> HashMap { AVAILABILITY_REWARDS.with(|r| r.borrow().clone()) } -std::thread_local! { - static PROCESSED: RefCell> = RefCell::new(vec![]); -} - -/// Return which messages have been processed by `process_upward_message` and clear the buffer. -pub fn take_processed() -> Vec<(ParaId, UpwardMessage)> { - PROCESSED.with(|opt_hook| std::mem::take(&mut *opt_hook.borrow_mut())) +parameter_types! { + pub static Processed: Vec<(ParaId, UpwardMessage)> = vec![]; } /// An implementation of a UMP sink that just records which messages were processed. @@ -418,23 +419,24 @@ pub fn take_processed() -> Vec<(ParaId, UpwardMessage)> { /// `u32`. pub struct TestProcessMessage; impl ProcessMessage for TestProcessMessage { - type Origin = ParaId; + type Origin = MessageOrigin; fn process_message( message: &[u8], - origin: ParaId, + origin: MessageOrigin, weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { let weight = match u32::decode(&mut &message[..]) { Ok(w) => Weight::from_parts(w as u64, w as u64), Err(_) => return Err(ProcessMessageError::Corrupt), // same as the real `ProcessMessage` }; + debug_assert!(origin.queue == SubQueue::UMP); if weight.any_gt(weight_limit) { return Err(ProcessMessageError::Overweight(weight)) } - PROCESSED.with(|opt_hook| { - opt_hook.borrow_mut().push((origin, message.to_owned())); - }); + let mut processed = Processed::get(); + processed.push((origin.para, message.to_vec())); + Processed::set(processed); Ok((true, weight)) } } diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 08828f21ed14..23ace7df5348 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -14,9 +14,12 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use crate::mock::{ - assert_last_event, assert_last_events, new_test_ext, take_processed, Configuration, - MessageQueue, MockGenesisConfig, ParaInclusion, System, Test, +use crate::{ + inclusion::{MessageOrigin, UmpAcceptanceCheckErr}, + mock::{ + assert_last_event, assert_last_events, new_test_ext, Configuration, MessageQueue, + MessageQueueSize, MockGenesisConfig, ParaInclusion, Processed, System, Test, + }, }; use frame_support::{ assert_noop, assert_ok, @@ -24,7 +27,7 @@ use frame_support::{ traits::{ExecuteOverweightError, ServiceQueues}, weights::Weight, }; -use primitives::v2::{Id as ParaId, UpwardMessage}; +use primitives::v2::{well_known_keys, Id as ParaId, UpwardMessage}; use sp_runtime::traits::{Bounded, Hash}; use sp_std::prelude::*; @@ -47,6 +50,10 @@ impl Default for GenesisConfigBuilder { } impl GenesisConfigBuilder { + pub(super) fn large_queue_count() -> Self { + Self { max_upward_queue_count: 128, ..Default::default() } + } + pub(super) fn build(self) -> crate::mock::MockGenesisConfig { let mut genesis = default_genesis_config(); let config = &mut genesis.configuration.config; @@ -71,12 +78,149 @@ fn default_genesis_config() -> MockGenesisConfig { } } +// FAIL-CI: TODO add tests fn queue_upward_msg(para: ParaId, msg: UpwardMessage) { let msgs = vec![msg]; assert!(ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs).is_ok()); let _ = ParaInclusion::receive_upward_messages(&Configuration::config(), para, msgs); } +mod check_upward_messages { + use super::*; + + const P_0: ParaId = ParaId::new(0u32); + const P_1: ParaId = ParaId::new(1u32); + + // Currently its trivial since unbounded, but this function will be handy when we bound it. + fn msg(data: &str) -> UpwardMessage { + data.as_bytes().to_vec() + } + + // helper + fn check(para: ParaId, msgs: Vec, err: Option) { + assert_eq!( + ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs[..]).err(), + err + ); + } + + fn queue(para: ParaId, msgs: Vec) { + let _ = ParaInclusion::receive_upward_messages(&Configuration::config(), para, msgs); + } + + #[test] + fn basic_works() { + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + let _g = frame_support::StorageNoopGuard::default(); + check(P_0, vec![msg("p0m0")], None); + check(P_1, vec![msg("p1m0")], None); + check(P_0, vec![msg("p0m1")], None); + check(P_1, vec![msg("p1m1")], None); + }); + } + + #[test] + fn num_per_candidate_exceeded_error() { + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + let _g = frame_support::StorageNoopGuard::default(); + let permitted = Configuration::config().max_upward_message_num_per_candidate; + + for sent in 0..permitted + 1 { + check(P_0, vec![msg(""); sent as usize], None); + } + for sent in permitted + 1..permitted + 10 { + check( + P_0, + vec![msg(""); sent as usize], + Some(UmpAcceptanceCheckErr::MoreMessagesThanPermitted { sent, permitted }), + ); + } + }); + } + + #[test] + fn size_per_message_exceeded_error() { + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + let _g = frame_support::StorageNoopGuard::default(); + let max_size = Configuration::config().max_upward_message_size; + + for msg_size in 0..max_size + 1 { + check(P_0, vec![vec![0; msg_size as usize]], None); + } + // FAIL-CI: TODO test when the msg is not first + for msg_size in max_size + 1..max_size + 10 { + check( + P_0, + vec![vec![0; msg_size as usize]], + Some(UmpAcceptanceCheckErr::MessageSize { idx: 0, msg_size, max_size }), + ); + } + }); + } + + #[test] + fn queue_count_exceeded_error() { + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + let limit = Configuration::config().max_upward_queue_count as u64; + + for _ in 0..limit { + check(P_0, vec![msg("")], None); + queue(P_0, vec![msg("")]); + } + + check( + P_0, + vec![msg("")], + Some(UmpAcceptanceCheckErr::CapacityExceeded { count: limit + 1, limit }), + ); + check( + P_0, + vec![msg(""); 2], + Some(UmpAcceptanceCheckErr::CapacityExceeded { count: limit + 2, limit }), + ); + }); + } + + #[test] + fn queue_size_exceeded_error() { + new_test_ext(GenesisConfigBuilder::large_queue_count().build()).execute_with(|| { + let limit = Configuration::config().max_upward_queue_size as u64; + assert_eq!(pallet_message_queue::ItemHeader::::max_encoded_len(), 5); + + // FAIL-CI: TODO why is the item header overhead not taken into account? + for _ in 0..limit { + check(P_0, vec![msg("1")], None); + queue(P_0, vec![msg("1")]); + } + + check( + P_0, + vec![msg("1")], + Some(UmpAcceptanceCheckErr::TotalSizeExceeded { total_size: limit + 1, limit }), + ); + check( + P_0, + vec![msg("123456")], + Some(UmpAcceptanceCheckErr::TotalSizeExceeded { total_size: limit + 6, limit }), + ); + }); + } + + proptest::proptest! { + #[test] + fn check_and_receive_do_not_panic(enqueued: Vec, candidate: Vec) { + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + let cfg = Configuration::config(); + + let _ = ParaInclusion::check_upward_messages(&cfg, P_0, &enqueued); + ParaInclusion::receive_upward_messages(&cfg, P_0, enqueued); + let _ = ParaInclusion::check_upward_messages(&cfg, P_0, &candidate); + ParaInclusion::receive_upward_messages(&cfg, P_0, candidate); + }); + } + } +} + #[test] fn dispatch_empty() { new_test_ext(default_genesis_config()).execute_with(|| { @@ -93,7 +237,7 @@ fn dispatch_single_message() { new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { queue_upward_msg(a, msg.clone()); MessageQueue::service_queues(Weight::max_value()); - assert_eq!(take_processed(), vec![(a, msg)]); + assert_eq!(Processed::take(), vec![(a, msg)]); }); } @@ -117,17 +261,17 @@ fn dispatch_resume_after_exceeding_dispatch_stage_weight() { // we expect only two first messages to fit in the first iteration. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(take_processed(), vec![(q, q_msg)]); + assert_eq!(Processed::take(), vec![(q, q_msg)]); queue_upward_msg(c, c_msg_2.clone()); // second iteration should process the second message. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(take_processed(), vec![(c, c_msg_1), (c, c_msg_2)]); + assert_eq!(Processed::take(), vec![(c, c_msg_1), (c, c_msg_2)]); // 3rd iteration. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(take_processed(), vec![(a, a_msg_1), (a, a_msg_2)]); + assert_eq!(Processed::take(), vec![(a, a_msg_1), (a, a_msg_2)]); // finally, make sure that the queue is empty. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(take_processed(), vec![]); + assert_eq!(Processed::take(), vec![]); }); } @@ -144,13 +288,13 @@ fn dispatch_keeps_message_after_weight_exhausted() { // we expect only one message to fit in the first iteration. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(take_processed(), vec![(a, a_msg_1)]); + assert_eq!(Processed::take(), vec![(a, a_msg_1)]); // second iteration should process the remaining message. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(take_processed(), vec![(a, a_msg_2)]); + assert_eq!(Processed::take(), vec![(a, a_msg_2)]); // finally, make sure that the queue is empty. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(take_processed(), vec![]); + assert_eq!(Processed::take(), vec![]); }); } @@ -174,7 +318,7 @@ fn dispatch_correctly_handle_remove_of_latest() { queue_upward_msg(a, a_msg_2.clone()); queue_upward_msg(b, b_msg_1.clone()); MessageQueue::service_queues(Weight::from_parts(900, 900)); - assert_eq!(take_processed(), vec![(a, a_msg_1), (a, a_msg_2), (b, b_msg_1)]); + assert_eq!(Processed::take(), vec![(a, a_msg_1), (a, a_msg_2), (b, b_msg_1)]); }); } @@ -182,27 +326,56 @@ fn dispatch_correctly_handle_remove_of_latest() { fn verify_relay_dispatch_queue_size_is_externally_accessible() { // Make sure that the relay dispatch queue size storage entry is accessible via well known // keys and is decodable into a (u32, u32). - - use parity_scale_codec::Decode as _; - use primitives::v2::well_known_keys; - - let a = ParaId::from(228); - let msg = vec![1, 2, 3]; - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - queue_upward_msg(a, msg); + let cfg = Configuration::config(); + + for para in 0..10 { + let para = para.into(); + queue_upward_msg(para, vec![0u8; 3]); + assert_queue_size(para, 1, 3); + assert_queue_remaining( + para, + cfg.max_upward_queue_count - 1, + cfg.max_upward_queue_size - 3, + ); + + queue_upward_msg(para, vec![0u8; 3]); + assert_queue_size(para, 2, 6); + assert_queue_remaining( + para, + cfg.max_upward_queue_count - 2, + cfg.max_upward_queue_size - 6, + ); + } + }); +} - #[allow(deprecated)] - let raw_queue_size = sp_io::storage::get(&well_known_keys::relay_dispatch_queue_size(a)).expect( - "enqueing a message should create the dispatch queue\ +fn assert_queue_size(para: ParaId, count: u32, size: u32) { + #[allow(deprecated)] + let raw_queue_size = sp_io::storage::get(&well_known_keys::relay_dispatch_queue_size(para)).expect( + "enqueing a message should create the dispatch queue\ and it should be accessible via the well known keys", - ); - let (cnt, size) = <(u32, u32)>::decode(&mut &raw_queue_size[..]) - .expect("the dispatch queue size should be decodable into (u32, u32)"); + ); + let (c, s) = <(u32, u32)>::decode(&mut &raw_queue_size[..]) + .expect("the dispatch queue size should be decodable into (u32, u32)"); + assert_eq!((c, s), (count, size)); + + // Test the deprecated but at least type-safe `relay_dispatch_queue_size_typed`: + #[allow(deprecated)] + let (c, s) = well_known_keys::relay_dispatch_queue_size_typed(para).get().expect( + "enqueing a message should create the dispatch queue\ + and it should be accessible via the well known keys", + ); + assert_eq!((c, s), (count, size)); +} - assert_eq!(cnt, 1); - assert_eq!(size, 3); - }); +fn assert_queue_remaining(para: ParaId, count: u32, size: u32) { + let (remaining_cnt, remaining_size) = + well_known_keys::relay_dispatch_queue_remaining_capacity(para) + .get() + .expect("No storage value"); + assert_eq!(count, remaining_cnt); + assert_eq!(size, remaining_size); } #[test] @@ -212,8 +385,8 @@ fn service_overweight_unknown() { new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { assert_noop!( ::execute_overweight( - Weight::from_ref_time(1000), - (0u32.into(), 0, 0) + Weight::MAX, + (MessageOrigin::ump(0u32.into()), 0, 0) ), ExecuteOverweightError::NotFound, ); @@ -247,21 +420,21 @@ fn overweight_queue_works() { [ pallet_message_queue::Event::::Processed { hash: hash_1.clone(), - origin: para_a, + origin: MessageOrigin::ump(para_a), weight_used: Weight::from_parts(301, 301), success: true, } .into(), pallet_message_queue::Event::::OverweightEnqueued { hash: hash_2.clone(), - origin: para_a, + origin: MessageOrigin::ump(para_a), page_index: 0, message_index: 1, } .into(), pallet_message_queue::Event::::OverweightEnqueued { hash: hash_3.clone(), - origin: para_a, + origin: MessageOrigin::ump(para_a), page_index: 0, message_index: 2, } @@ -269,14 +442,14 @@ fn overweight_queue_works() { ] .into_iter(), ); - assert_eq!(take_processed(), vec![(para_a, a_msg_1)]); + assert_eq!(Processed::take(), vec![(para_a, a_msg_1)]); // Now verify that if we wanted to service this overweight message with less than enough // weight it will fail. assert_noop!( ::execute_overweight( Weight::from_parts(500, 500), - (para_a, 0, 2) + (MessageOrigin::ump(para_a), 0, 2) ), ExecuteOverweightError::InsufficientWeight, ); @@ -284,12 +457,12 @@ fn overweight_queue_works() { // ... and if we try to service it with just enough weight it will succeed as well. assert_ok!(::execute_overweight( Weight::from_parts(501, 501), - (para_a, 0, 2) + (MessageOrigin::ump(para_a), 0, 2) )); assert_last_event( pallet_message_queue::Event::::Processed { hash: hash_3, - origin: para_a, + origin: MessageOrigin::ump(para_a), weight_used: Weight::from_parts(501, 501), success: true, } @@ -301,7 +474,7 @@ fn overweight_queue_works() { assert_noop!( ::execute_overweight( Weight::from_parts(501, 501), - (para_a, 0, 2) + (MessageOrigin::ump(para_a), 0, 2) ), ExecuteOverweightError::NotFound, ); From a02df6fe2226ca87d4d8d98eb03d36f4aab28c25 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:59:00 +0100 Subject: [PATCH 027/182] Cleanup Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 9cf521d04802..cdd05fd0e871 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -972,16 +972,15 @@ impl Pallet { para: ParaId, upward_messages: Vec, ) -> Weight { - if !upward_messages.is_empty() { - let count = upward_messages.len() as u32; - Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); - let messages = - upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); - T::MessageQueue::enqueue_messages(messages, para); - ::WeightInfo::receive_upward_messages(count) - } else { - Weight::zero() + if upward_messages.is_empty() { + return Weight::zero() } + + let count = upward_messages.len() as u32; + Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); + let messages = upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); + T::MessageQueue::enqueue_messages(messages, MessageOrigin::ump(para)); + ::WeightInfo::receive_upward_messages(count) } /// Cleans up all paras pending availability that the predicate returns true for. @@ -1170,12 +1169,13 @@ impl CandidateCheckContext { let relay_parent_number = now - One::one(); { - // this should never fail because the para is registered let persisted_validation_data = match crate::util::make_persisted_validation_data::( para_id, relay_parent_number, parent_storage_root, - ) { + ) + .defensive_proof("the para is registered") + { Some(l) => l, None => return Ok(Err(FailedToCreatePVD)), }; From cdb18219e252f25da9b1e6196e443dd63bb52c21 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 16:00:09 +0100 Subject: [PATCH 028/182] fmt Signed-off-by: Oliver Tale-Yazdi --- primitives/src/v2/mod.rs | 4 ++-- runtime/common/src/paras_sudo_wrapper.rs | 7 ++----- runtime/parachains/src/configuration.rs | 2 +- runtime/parachains/src/inclusion/mod.rs | 6 +++++- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/primitives/src/v2/mod.rs b/primitives/src/v2/mod.rs index 0d3d5e9bd65c..8d3b5706e736 100644 --- a/primitives/src/v2/mod.rs +++ b/primitives/src/v2/mod.rs @@ -1727,8 +1727,8 @@ impl AsRef<[u8]> for WellKnownKey { impl WellKnownKey { /// Gets the value or `None` if it does not exist or decoding failed. pub fn get(&self) -> Option { - sp_io::storage::get(&self.key).and_then(|raw| - parity_scale_codec::DecodeAll::decode_all(&mut raw.as_ref()).ok()) + sp_io::storage::get(&self.key) + .and_then(|raw| parity_scale_codec::DecodeAll::decode_all(&mut raw.as_ref()).ok()) } } diff --git a/runtime/common/src/paras_sudo_wrapper.rs b/runtime/common/src/paras_sudo_wrapper.rs index 8cb402c0930e..46885bb678da 100644 --- a/runtime/common/src/paras_sudo_wrapper.rs +++ b/runtime/common/src/paras_sudo_wrapper.rs @@ -24,7 +24,7 @@ use primitives::v2::Id as ParaId; use runtime_parachains::{ configuration, dmp, hrmp, paras::{self, ParaGenesisArgs}, - ump, ParaLifecycle, + ParaLifecycle, }; use sp_std::boxed::Box; @@ -38,10 +38,7 @@ pub mod pallet { #[pallet::config] #[pallet::disable_frame_system_supertrait_check] - pub trait Config: - configuration::Config + paras::Config + dmp::Config + ump::Config + hrmp::Config - { - } + pub trait Config: configuration::Config + paras::Config + dmp::Config + hrmp::Config {} #[pallet::error] pub enum Error { diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index fe90940e3b17..5ad0b3263ac2 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_REF_TIME_PER_MILLIS}; +use frame_support::pallet_prelude::*; 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}; diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index cdd05fd0e871..a4ac27c0baa0 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -28,7 +28,11 @@ use crate::{ shared, }; use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec}; -use frame_support::{pallet_prelude::*, traits::EnqueueMessage, BoundedSlice}; +use frame_support::{ + pallet_prelude::*, + traits::{Defensive, EnqueueMessage}, + BoundedSlice, +}; use pallet_message_queue::OnQueueChanged; use parity_scale_codec::{Decode, Encode}; use primitives::v2::{ From 59dc6d7281e29231b7c5928d8eab5fbf643e5e2e Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 16:13:23 +0100 Subject: [PATCH 029/182] Revert messed up merge :facepalm: Signed-off-by: Oliver Tale-Yazdi --- .cargo/config.toml | 32 - .github/dependabot.yml | 4 +- .gitignore | 1 + .gitlab-ci.yml | 60 +- Cargo.lock | 2778 ++++++----------- Cargo.toml | 18 +- README.md | 2 +- cli/Cargo.toml | 16 +- cli/src/command.rs | 34 +- core-primitives/Cargo.toml | 8 +- core-primitives/src/lib.rs | 6 + erasure-coding/Cargo.toml | 6 +- erasure-coding/fuzzer/Cargo.toml | 6 +- erasure-coding/src/lib.rs | 2 +- node/client/Cargo.toml | 10 +- node/client/src/benchmarking.rs | 13 +- node/client/src/lib.rs | 21 +- node/collation-generation/Cargo.toml | 6 +- node/core/approval-voting/Cargo.toml | 10 +- .../approval-voting/src/approval_checking.rs | 4 +- node/core/approval-voting/src/criteria.rs | 8 +- node/core/approval-voting/src/import.rs | 7 +- node/core/approval-voting/src/lib.rs | 16 +- node/core/av-store/Cargo.toml | 10 +- node/core/av-store/src/lib.rs | 10 +- node/core/av-store/src/metrics.rs | 14 +- node/core/av-store/src/tests.rs | 45 +- node/core/backing/Cargo.toml | 6 +- node/core/backing/src/lib.rs | 6 +- node/core/bitfield-signing/Cargo.toml | 6 +- node/core/bitfield-signing/src/metrics.rs | 14 +- node/core/candidate-validation/Cargo.toml | 11 +- node/core/candidate-validation/src/lib.rs | 43 +- node/core/candidate-validation/src/metrics.rs | 2 +- node/core/candidate-validation/src/tests.rs | 14 +- node/core/chain-api/Cargo.toml | 8 +- node/core/chain-api/src/lib.rs | 9 +- node/core/chain-api/src/metrics.rs | 2 +- node/core/chain-api/src/tests.rs | 22 +- node/core/chain-selection/Cargo.toml | 10 +- node/core/chain-selection/src/lib.rs | 1 - node/core/dispute-coordinator/Cargo.toml | 10 +- node/core/dispute-coordinator/src/db/v1.rs | 24 +- node/core/dispute-coordinator/src/import.rs | 54 +- .../dispute-coordinator/src/initialized.rs | 130 +- node/core/dispute-coordinator/src/lib.rs | 4 +- .../src/participation/mod.rs | 18 +- .../src/participation/queues/mod.rs | 212 +- .../src/participation/queues/tests.rs | 125 +- .../src/participation/tests.rs | 89 +- .../dispute-coordinator/src/scraping/mod.rs | 73 +- .../dispute-coordinator/src/scraping/tests.rs | 11 +- node/core/dispute-coordinator/src/tests.rs | 1079 +++---- node/core/parachains-inherent/Cargo.toml | 8 +- node/core/parachains-inherent/src/lib.rs | 44 +- node/core/provisioner/Cargo.toml | 6 +- .../src/disputes/prioritized_selection/mod.rs | 33 +- .../disputes/prioritized_selection/tests.rs | 93 +- .../src/disputes/random_selection/mod.rs | 64 +- node/core/provisioner/src/lib.rs | 4 +- node/core/pvf-checker/Cargo.toml | 6 +- node/core/pvf/Cargo.toml | 10 +- node/core/pvf/src/artifacts.rs | 11 +- node/core/pvf/src/error.rs | 79 +- node/core/pvf/src/execute/mod.rs | 2 +- node/core/pvf/src/execute/queue.rs | 3 +- node/core/pvf/src/execute/worker.rs | 134 +- node/core/pvf/src/executor_intf.rs | 4 +- node/core/pvf/src/host.rs | 93 +- node/core/pvf/src/lib.rs | 37 +- node/core/pvf/src/metrics.rs | 6 - node/core/pvf/src/prepare/pool.rs | 81 +- node/core/pvf/src/prepare/queue.rs | 42 +- node/core/pvf/src/prepare/worker.rs | 299 +- node/core/pvf/src/priority.rs | 2 +- node/core/pvf/src/testing.rs | 2 +- node/core/pvf/src/worker_common.rs | 119 +- node/core/pvf/tests/it/adder.rs | 4 +- node/core/pvf/tests/it/main.rs | 24 +- node/core/runtime-api/Cargo.toml | 11 +- node/core/runtime-api/src/cache.rs | 256 +- node/core/runtime-api/src/lib.rs | 2 +- node/core/runtime-api/src/metrics.rs | 2 +- node/gum/Cargo.toml | 6 +- node/gum/proc-macro/Cargo.toml | 6 +- node/jaeger/Cargo.toml | 8 +- node/jaeger/src/lib.rs | 2 +- node/malus/Cargo.toml | 7 +- node/metrics/Cargo.toml | 8 +- node/metrics/src/metronome.rs | 2 +- node/network/approval-distribution/Cargo.toml | 10 +- node/network/approval-distribution/src/lib.rs | 183 +- .../approval-distribution/src/metrics.rs | 4 +- .../approval-distribution/src/tests.rs | 144 - .../availability-distribution/Cargo.toml | 6 +- .../src/requester/fetch_task/mod.rs | 21 +- .../src/tests/state.rs | 4 +- node/network/availability-recovery/Cargo.toml | 6 +- node/network/availability-recovery/src/lib.rs | 5 +- node/network/bitfield-distribution/Cargo.toml | 6 +- node/network/bitfield-distribution/src/lib.rs | 25 +- node/network/bridge/Cargo.toml | 11 +- node/network/bridge/src/metrics.rs | 2 +- node/network/bridge/src/network.rs | 18 +- node/network/bridge/src/rx/mod.rs | 24 +- node/network/bridge/src/tx/mod.rs | 2 +- node/network/collator-protocol/Cargo.toml | 6 +- .../src/collator_side/mod.rs | 13 +- .../src/validator_side/mod.rs | 46 +- node/network/dispute-distribution/Cargo.toml | 6 +- .../dispute-distribution/src/receiver/mod.rs | 8 +- .../dispute-distribution/src/sender/mod.rs | 33 +- .../src/sender/send_task.rs | 19 +- .../dispute-distribution/src/tests/mod.rs | 13 +- node/network/gossip-support/Cargo.toml | 6 +- node/network/protocol/Cargo.toml | 6 +- node/network/protocol/src/grid_topology.rs | 4 +- node/network/protocol/src/lib.rs | 2 +- node/network/protocol/src/peer_set.rs | 2 +- .../protocol/src/request_response/mod.rs | 39 +- .../network/statement-distribution/Cargo.toml | 6 +- .../network/statement-distribution/src/lib.rs | 48 +- .../statement-distribution/src/metrics.rs | 6 +- node/overseer/Cargo.toml | 11 +- node/overseer/src/dummy.rs | 11 +- node/overseer/src/lib.rs | 34 +- node/overseer/src/memory_stats.rs | 53 - node/overseer/src/metrics.rs | 2 +- node/overseer/src/tests.rs | 14 +- node/primitives/Cargo.toml | 6 +- node/primitives/src/disputes/message.rs | 4 +- node/primitives/src/disputes/mod.rs | 100 +- node/primitives/src/lib.rs | 30 +- node/service/Cargo.toml | 14 +- node/service/chain-specs/kusama.json | 6 +- node/service/chain-specs/polkadot.json | 6 +- node/service/chain-specs/westend.json | 8 +- node/service/src/chain_spec.rs | 8 +- node/service/src/grandpa_support.rs | 47 +- node/service/src/lib.rs | 36 +- node/service/src/overseer.rs | 14 +- node/service/src/relay_chain_selection.rs | 5 +- node/subsystem-test-helpers/Cargo.toml | 6 +- node/subsystem-test-helpers/src/lib.rs | 19 +- node/subsystem-types/Cargo.toml | 8 +- node/subsystem-types/src/errors.rs | 7 +- node/subsystem-types/src/messages.rs | 137 +- .../src/messages/network_bridge_event.rs | 13 +- node/subsystem-util/Cargo.toml | 13 +- node/subsystem-util/src/database.rs | 14 + .../src/rolling_session_window.rs | 20 - node/subsystem/Cargo.toml | 6 +- node/subsystem/src/lib.rs | 3 - node/test/client/Cargo.toml | 6 +- node/test/client/src/block_builder.rs | 13 +- node/test/performance-test/Cargo.toml | 6 +- node/test/service/Cargo.toml | 12 +- node/zombienet-backchannel/Cargo.toml | 8 +- parachain/Cargo.toml | 8 +- parachain/src/primitives.rs | 15 +- parachain/test-parachains/Cargo.toml | 6 +- parachain/test-parachains/adder/Cargo.toml | 6 +- .../test-parachains/adder/collator/Cargo.toml | 8 +- parachain/test-parachains/halt/Cargo.toml | 6 +- parachain/test-parachains/undying/Cargo.toml | 6 +- .../undying/collator/Cargo.toml | 8 +- primitives/Cargo.toml | 8 +- primitives/src/v2/mod.rs | 158 +- primitives/test-helpers/Cargo.toml | 6 +- roadmap/implementers-guide/README.md | 5 - roadmap/implementers-guide/src/SUMMARY.md | 1 + roadmap/implementers-guide/src/glossary.md | 4 +- .../src/node/availability/README.md | 2 +- .../node/collators/collation-generation.md | 1 + .../src/node/disputes/README.md | 54 +- .../src/node/disputes/dispute-coordinator.md | 255 +- .../src/node/utility/candidate-validation.md | 43 - .../src/node/utility/chain-selection.md | 7 +- .../src/node/utility/provisioner.md | 2 +- .../src/node/utility/pvf-prechecker.md | 6 +- .../src/protocol-overview.md | 1 + .../implementers-guide/src/runtime/README.md | 14 +- .../src/runtime/disputes.md | 61 +- .../implementers-guide/src/types/approval.md | 2 +- .../implementers-guide/src/types/candidate.md | 20 +- roadmap/implementers-guide/src/types/chain.md | 30 + .../src/types/overseer-protocol.md | 6 +- .../src/types/pvf-prechecking.md | 2 - rpc/Cargo.toml | 10 +- rpc/src/lib.rs | 8 +- runtime/common/Cargo.toml | 10 +- runtime/common/slot_range_helper/Cargo.toml | 6 +- runtime/common/src/assigned_slots.rs | 3 - runtime/common/src/auctions.rs | 3 - runtime/common/src/claims.rs | 29 +- runtime/common/src/crowdloan/migration.rs | 78 +- runtime/common/src/crowdloan/mod.rs | 18 - runtime/common/src/impls.rs | 10 +- runtime/common/src/lib.rs | 7 +- runtime/common/src/paras_registrar.rs | 9 - runtime/common/src/paras_sudo_wrapper.rs | 13 +- runtime/common/src/purchase.rs | 7 - runtime/common/src/slots/migration.rs | 38 +- runtime/common/src/slots/mod.rs | 7 +- runtime/kusama/Cargo.toml | 22 +- runtime/kusama/constants/Cargo.toml | 17 +- runtime/kusama/constants/src/lib.rs | 4 +- .../constants/src/weights/block_weights.rs | 64 +- .../src/weights/extrinsic_weights.rs | 67 +- .../constants/src/weights/paritydb_weights.rs | 12 +- .../constants/src/weights/rocksdb_weights.rs | 12 +- runtime/kusama/src/governance/fellowship.rs | 18 +- runtime/kusama/src/governance/mod.rs | 11 +- runtime/kusama/src/governance/origins.rs | 2 - runtime/kusama/src/governance/tracks.rs | 118 +- runtime/kusama/src/lib.rs | 193 +- .../weights/frame_benchmarking_baseline.rs | 48 +- .../frame_election_provider_support.rs | 28 +- runtime/kusama/src/weights/frame_system.rs | 46 +- runtime/kusama/src/weights/mod.rs | 3 +- .../kusama/src/weights/pallet_bags_list.rs | 15 +- runtime/kusama/src/weights/pallet_balances.rs | 27 +- ...allet_balances_nis_counterpart_balances.rs | 105 - runtime/kusama/src/weights/pallet_bounties.rs | 53 +- .../src/weights/pallet_child_bounties.rs | 34 +- .../src/weights/pallet_collective_council.rs | 135 +- .../pallet_collective_technical_committee.rs | 135 +- .../src/weights/pallet_conviction_voting.rs | 56 +- .../kusama/src/weights/pallet_democracy.rs | 104 +- .../pallet_election_provider_multi_phase.rs | 78 +- .../src/weights/pallet_elections_phragmen.rs | 79 +- .../kusama/src/weights/pallet_fast_unstake.rs | 67 +- runtime/kusama/src/weights/pallet_gilt.rs | 119 + runtime/kusama/src/weights/pallet_identity.rs | 178 +- .../kusama/src/weights/pallet_im_online.rs | 17 +- runtime/kusama/src/weights/pallet_indices.rs | 21 +- .../kusama/src/weights/pallet_membership.rs | 55 +- runtime/kusama/src/weights/pallet_multisig.rs | 74 +- runtime/kusama/src/weights/pallet_nis.rs | 122 - .../src/weights/pallet_nomination_pools.rs | 98 +- runtime/kusama/src/weights/pallet_preimage.rs | 54 +- runtime/kusama/src/weights/pallet_proxy.rs | 92 +- .../src/weights/pallet_ranked_collective.rs | 52 +- .../pallet_referenda_fellowship_referenda.rs | 120 +- .../src/weights/pallet_referenda_referenda.rs | 120 +- .../kusama/src/weights/pallet_scheduler.rs | 66 +- runtime/kusama/src/weights/pallet_session.rs | 12 +- runtime/kusama/src/weights/pallet_staking.rs | 344 +- .../kusama/src/weights/pallet_timestamp.rs | 12 +- runtime/kusama/src/weights/pallet_tips.rs | 48 +- runtime/kusama/src/weights/pallet_treasury.rs | 37 +- runtime/kusama/src/weights/pallet_utility.rs | 33 +- runtime/kusama/src/weights/pallet_vesting.rs | 94 +- .../kusama/src/weights/pallet_whitelist.rs | 3 +- .../src/weights/runtime_common_auctions.rs | 18 +- .../src/weights/runtime_common_claims.rs | 21 +- .../src/weights/runtime_common_crowdloan.rs | 41 +- .../weights/runtime_common_paras_registrar.rs | 41 +- .../src/weights/runtime_common_slots.rs | 26 +- .../runtime_parachains_configuration.rs | 22 +- .../weights/runtime_parachains_disputes.rs | 9 +- .../src/weights/runtime_parachains_hrmp.rs | 57 +- .../weights/runtime_parachains_initializer.rs | 13 +- .../src/weights/runtime_parachains_paras.rs | 62 +- .../runtime_parachains_paras_inherent.rs | 44 +- .../src/weights/runtime_parachains_ump.rs | 19 +- runtime/kusama/src/xcm_config.rs | 42 +- runtime/metrics/Cargo.toml | 6 +- runtime/parachains/Cargo.toml | 21 +- runtime/parachains/src/builder.rs | 4 +- runtime/parachains/src/configuration.rs | 57 +- .../parachains/src/configuration/migration.rs | 182 +- runtime/parachains/src/configuration/tests.rs | 6 + runtime/parachains/src/disputes.rs | 256 +- runtime/parachains/src/disputes/migration.rs | 98 - runtime/parachains/src/disputes/slashing.rs | 1 - runtime/parachains/src/disputes/tests.rs | 742 +++-- runtime/parachains/src/hrmp.rs | 18 +- runtime/parachains/src/inclusion/mod.rs | 164 +- runtime/parachains/src/initializer.rs | 3 +- runtime/parachains/src/mock.rs | 50 +- runtime/parachains/src/paras/mod.rs | 10 +- runtime/parachains/src/paras_inherent/mod.rs | 11 +- runtime/parachains/src/runtime_api_impl/v2.rs | 4 +- runtime/parachains/src/scheduler.rs | 12 +- runtime/parachains/src/ump_tests.rs | 253 +- runtime/polkadot/Cargo.toml | 18 +- runtime/polkadot/constants/Cargo.toml | 17 +- .../constants/src/weights/block_weights.rs | 64 +- .../src/weights/extrinsic_weights.rs | 67 +- .../constants/src/weights/paritydb_weights.rs | 12 +- .../constants/src/weights/rocksdb_weights.rs | 12 +- runtime/polkadot/src/lib.rs | 113 +- .../weights/frame_benchmarking_baseline.rs | 48 +- .../frame_election_provider_support.rs | 28 +- runtime/polkadot/src/weights/frame_system.rs | 48 +- runtime/polkadot/src/weights/mod.rs | 1 - .../polkadot/src/weights/pallet_bags_list.rs | 15 +- .../polkadot/src/weights/pallet_balances.rs | 27 +- .../polkadot/src/weights/pallet_bounties.rs | 53 +- .../src/weights/pallet_child_bounties.rs | 34 +- .../src/weights/pallet_collective_council.rs | 134 +- .../pallet_collective_technical_committee.rs | 138 +- .../polkadot/src/weights/pallet_democracy.rs | 104 +- .../pallet_election_provider_multi_phase.rs | 80 +- .../src/weights/pallet_elections_phragmen.rs | 79 +- .../src/weights/pallet_fast_unstake.rs | 66 +- .../polkadot/src/weights/pallet_identity.rs | 178 +- .../polkadot/src/weights/pallet_im_online.rs | 17 +- .../polkadot/src/weights/pallet_indices.rs | 21 +- .../polkadot/src/weights/pallet_membership.rs | 55 +- .../src/weights/pallet_message_queue.rs | 216 -- .../polkadot/src/weights/pallet_multisig.rs | 74 +- .../src/weights/pallet_nomination_pools.rs | 102 +- .../polkadot/src/weights/pallet_preimage.rs | 52 +- runtime/polkadot/src/weights/pallet_proxy.rs | 92 +- .../polkadot/src/weights/pallet_scheduler.rs | 69 +- .../polkadot/src/weights/pallet_session.rs | 12 +- .../polkadot/src/weights/pallet_staking.rs | 340 +- .../polkadot/src/weights/pallet_timestamp.rs | 12 +- runtime/polkadot/src/weights/pallet_tips.rs | 48 +- .../polkadot/src/weights/pallet_treasury.rs | 32 +- .../polkadot/src/weights/pallet_utility.rs | 33 +- .../polkadot/src/weights/pallet_vesting.rs | 94 +- .../src/weights/runtime_common_auctions.rs | 18 +- .../src/weights/runtime_common_claims.rs | 21 +- .../src/weights/runtime_common_crowdloan.rs | 41 +- .../weights/runtime_common_paras_registrar.rs | 42 +- .../src/weights/runtime_common_slots.rs | 26 +- .../runtime_parachains_configuration.rs | 22 +- .../weights/runtime_parachains_disputes.rs | 9 +- .../src/weights/runtime_parachains_hrmp.rs | 78 +- .../weights/runtime_parachains_initializer.rs | 13 +- .../src/weights/runtime_parachains_paras.rs | 62 +- .../runtime_parachains_paras_inherent.rs | 38 +- runtime/polkadot/src/xcm_config.rs | 6 +- runtime/rococo/Cargo.toml | 31 +- runtime/rococo/constants/Cargo.toml | 17 +- .../constants/src/weights/block_weights.rs | 62 +- .../src/weights/extrinsic_weights.rs | 63 +- .../constants/src/weights/paritydb_weights.rs | 12 +- .../constants/src/weights/rocksdb_weights.rs | 12 +- runtime/rococo/src/lib.rs | 157 +- runtime/rococo/src/validator_manager.rs | 2 - .../weights/frame_benchmarking_baseline.rs | 48 +- runtime/rococo/src/weights/frame_system.rs | 48 +- runtime/rococo/src/weights/mod.rs | 3 +- runtime/rococo/src/weights/pallet_balances.rs | 27 +- ...allet_balances_nis_counterpart_balances.rs | 105 - runtime/rococo/src/weights/pallet_bounties.rs | 53 +- .../src/weights/pallet_child_bounties.rs | 34 +- .../src/weights/pallet_collective_council.rs | 244 +- .../pallet_collective_technical_committee.rs | 244 +- .../rococo/src/weights/pallet_democracy.rs | 104 +- .../src/weights/pallet_elections_phragmen.rs | 75 +- runtime/rococo/src/weights/pallet_gilt.rs | 119 + runtime/rococo/src/weights/pallet_identity.rs | 176 +- .../rococo/src/weights/pallet_im_online.rs | 17 +- runtime/rococo/src/weights/pallet_indices.rs | 21 +- .../rococo/src/weights/pallet_membership.rs | 113 +- runtime/rococo/src/weights/pallet_multisig.rs | 76 +- runtime/rococo/src/weights/pallet_nis.rs | 122 - runtime/rococo/src/weights/pallet_preimage.rs | 50 +- runtime/rococo/src/weights/pallet_proxy.rs | 92 +- .../rococo/src/weights/pallet_scheduler.rs | 69 +- .../rococo/src/weights/pallet_timestamp.rs | 12 +- runtime/rococo/src/weights/pallet_tips.rs | 48 +- runtime/rococo/src/weights/pallet_treasury.rs | 32 +- runtime/rococo/src/weights/pallet_utility.rs | 33 +- runtime/rococo/src/weights/pallet_vesting.rs | 94 +- .../src/weights/runtime_common_auctions.rs | 30 +- .../src/weights/runtime_common_claims.rs | 19 +- .../src/weights/runtime_common_crowdloan.rs | 43 +- .../weights/runtime_common_paras_registrar.rs | 42 +- .../src/weights/runtime_common_slots.rs | 26 +- .../runtime_parachains_configuration.rs | 22 +- .../weights/runtime_parachains_disputes.rs | 9 +- .../src/weights/runtime_parachains_hrmp.rs | 60 +- .../weights/runtime_parachains_initializer.rs | 13 +- .../src/weights/runtime_parachains_paras.rs | 62 +- .../src/weights/runtime_parachains_ump.rs | 19 +- runtime/test-runtime/Cargo.toml | 10 +- runtime/test-runtime/constants/Cargo.toml | 14 +- .../constants/src/weights/block_weights.rs | 7 +- .../src/weights/extrinsic_weights.rs | 7 +- .../constants/src/weights/paritydb_weights.rs | 12 +- .../constants/src/weights/rocksdb_weights.rs | 12 +- runtime/test-runtime/src/lib.rs | 11 +- runtime/westend/Cargo.toml | 14 +- runtime/westend/constants/Cargo.toml | 17 +- .../constants/src/weights/block_weights.rs | 62 +- .../src/weights/extrinsic_weights.rs | 63 +- .../constants/src/weights/paritydb_weights.rs | 12 +- .../constants/src/weights/rocksdb_weights.rs | 12 +- runtime/westend/src/lib.rs | 57 +- .../frame_election_provider_support.rs | 28 +- runtime/westend/src/weights/frame_system.rs | 48 +- .../westend/src/weights/pallet_bags_list.rs | 15 +- .../westend/src/weights/pallet_balances.rs | 27 +- .../pallet_election_provider_multi_phase.rs | 80 +- .../src/weights/pallet_fast_unstake.rs | 63 +- .../westend/src/weights/pallet_identity.rs | 176 +- .../westend/src/weights/pallet_im_online.rs | 17 +- runtime/westend/src/weights/pallet_indices.rs | 21 +- .../westend/src/weights/pallet_multisig.rs | 74 +- .../src/weights/pallet_nomination_pools.rs | 102 +- .../westend/src/weights/pallet_preimage.rs | 52 +- runtime/westend/src/weights/pallet_proxy.rs | 92 +- .../westend/src/weights/pallet_scheduler.rs | 69 +- runtime/westend/src/weights/pallet_session.rs | 12 +- runtime/westend/src/weights/pallet_staking.rs | 340 +- .../westend/src/weights/pallet_timestamp.rs | 12 +- runtime/westend/src/weights/pallet_utility.rs | 33 +- runtime/westend/src/weights/pallet_vesting.rs | 94 +- .../src/weights/runtime_common_auctions.rs | 18 +- .../src/weights/runtime_common_crowdloan.rs | 41 +- .../weights/runtime_common_paras_registrar.rs | 41 +- .../src/weights/runtime_common_slots.rs | 26 +- .../runtime_parachains_configuration.rs | 22 +- .../weights/runtime_parachains_disputes.rs | 9 +- .../runtime_parachains_disputes_slashing.rs | 22 +- .../src/weights/runtime_parachains_hrmp.rs | 57 +- .../weights/runtime_parachains_initializer.rs | 13 +- .../src/weights/runtime_parachains_paras.rs | 62 +- .../runtime_parachains_paras_inherent.rs | 46 +- .../src/weights/runtime_parachains_ump.rs | 19 +- scripts/ci/gitlab/lingua.dic | 1 - scripts/ci/gitlab/pipeline/build.yml | 32 +- scripts/ci/gitlab/pipeline/check.yml | 48 +- scripts/ci/gitlab/pipeline/publish.yml | 13 +- scripts/ci/gitlab/pipeline/test.yml | 15 - src/main.rs | 5 - statement-table/Cargo.toml | 6 +- tests/benchmark_block.rs | 6 +- tests/benchmark_extrinsic.rs | 9 +- tests/benchmark_overhead.rs | 2 +- tests/benchmark_storage_works.rs | 4 +- tests/common.rs | 6 +- tests/invalid_order_arguments.rs | 2 +- tests/purge_chain_works.rs | 8 +- tests/running_the_node_and_interrupt.rs | 2 +- utils/generate-bags/Cargo.toml | 6 +- utils/remote-ext-tests/bags-list/Cargo.toml | 8 +- utils/staking-miner/Cargo.toml | 12 +- utils/staking-miner/src/main.rs | 7 +- xcm/Cargo.toml | 6 +- xcm/pallet-xcm-benchmarks/Cargo.toml | 6 +- xcm/pallet-xcm/Cargo.toml | 7 +- xcm/pallet-xcm/src/lib.rs | 23 - xcm/pallet-xcm/src/mock.rs | 3 - xcm/procedural/Cargo.toml | 6 +- xcm/src/v0/junction.rs | 9 - xcm/src/v0/multi_location.rs | 43 +- xcm/src/v1/multilocation.rs | 64 +- xcm/xcm-builder/Cargo.toml | 6 +- xcm/xcm-builder/src/currency_adapter.rs | 4 - xcm/xcm-builder/src/lib.rs | 2 +- xcm/xcm-builder/src/origin_conversion.rs | 17 - xcm/xcm-builder/src/process_xcm_message.rs | 28 +- xcm/xcm-builder/src/tests.rs | 6 +- xcm/xcm-builder/src/weight.rs | 10 +- xcm/xcm-executor/Cargo.toml | 6 +- xcm/xcm-executor/integration-tests/Cargo.toml | 6 +- xcm/xcm-executor/src/assets.rs | 6 +- xcm/xcm-simulator/Cargo.toml | 6 +- xcm/xcm-simulator/example/Cargo.toml | 6 +- xcm/xcm-simulator/example/src/parachain.rs | 6 +- xcm/xcm-simulator/fuzzer/Cargo.toml | 6 +- xcm/xcm-simulator/fuzzer/src/parachain.rs | 6 +- 469 files changed, 9314 insertions(+), 13676 deletions(-) delete mode 100644 .cargo/config.toml delete mode 100644 node/overseer/src/memory_stats.rs create mode 100644 roadmap/implementers-guide/src/types/chain.md delete mode 100644 runtime/kusama/src/weights/pallet_balances_nis_counterpart_balances.rs create mode 100644 runtime/kusama/src/weights/pallet_gilt.rs delete mode 100644 runtime/kusama/src/weights/pallet_nis.rs delete mode 100644 runtime/parachains/src/disputes/migration.rs delete mode 100644 runtime/polkadot/src/weights/pallet_message_queue.rs delete mode 100644 runtime/rococo/src/weights/pallet_balances_nis_counterpart_balances.rs create mode 100644 runtime/rococo/src/weights/pallet_gilt.rs delete mode 100644 runtime/rococo/src/weights/pallet_nis.rs diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 66b28b3485d8..000000000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,32 +0,0 @@ -# -# 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 665e9417256a..b49246776c54 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: "frame-remote-externalities" + - dependency-name: "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 📌", "E2-dependencies"] + labels: ["A2-insubstantial", "B0-silent", "C1-low 📌", "E3-dependencies"] schedule: interval: daily diff --git a/.gitignore b/.gitignore index f9ab33eb63f3..5ea0458ddfc8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ polkadot.* !polkadot.service !.rpm/* .DS_Store +.cargo .env diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6d9300ba93a0..877004694d79 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,20 +33,13 @@ 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: @@ -68,7 +61,6 @@ 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 @@ -79,29 +71,34 @@ 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: - image: "${CI_IMAGE}" - before_script: - - !reference [.job-switcher, before_script] + retry: + max: 2 + when: + - runner_system_failure + - unknown_failure + - api_failure + interruptible: true tags: - kubernetes-parity-build .docker-env: image: "${CI_IMAGE}" - before_script: - - !reference [.job-switcher, before_script] + retry: + max: 2 + when: + - runner_system_failure + - unknown_failure + - api_failure + interruptible: true tags: - - linux-docker-vm-c2 + - linux-docker .compiler-info: before_script: - - !reference [.job-switcher, before_script] - rustup show - cargo --version + - sccache -s .test-refs: rules: @@ -153,8 +150,10 @@ 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)" @@ -197,6 +196,8 @@ include: # zombienet jobs - scripts/ci/gitlab/pipeline/zombienet.yml + + #### stage: .post deploy-parity-testnet: @@ -226,23 +227,8 @@ deploy-parity-testnet: PR_NUM: "${PR_NUM}" trigger: project: "parity/infrastructure/ci_cd/pipeline-stopper" - branch: "as-improve" - -remove-cancel-pipeline-message: - stage: .post - rules: - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - variables: - PROJECT_ID: "${CI_PROJECT_ID}" - PROJECT_NAME: "${CI_PROJECT_NAME}" - PIPELINE_ID: "${CI_PIPELINE_ID}" - FAILED_JOB_URL: "https://gitlab.com" - FAILED_JOB_NAME: "nope" - PR_NUM: "${CI_COMMIT_REF_NAME}" - trigger: - project: "parity/infrastructure/ci_cd/pipeline-stopper" -cancel-pipeline-test-linux-stable: +.cancel-pipeline-test-linux-stable: extends: .cancel-pipeline-template needs: - job: test-linux-stable diff --git a/Cargo.lock b/Cargo.lock index 5cb338071a3d..617b1b84a4ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,16 +18,7 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" dependencies = [ - "gimli 0.26.1", -] - -[[package]] -name = "addr2line" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" -dependencies = [ - "gimli 0.27.0", + "gimli", ] [[package]] @@ -36,15 +27,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array 0.14.4", -] - [[package]] name = "aead" version = "0.4.3" @@ -52,18 +34,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ "generic-array 0.14.4", - "rand_core 0.6.3", -] - -[[package]] -name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher 0.2.5", ] [[package]] @@ -73,59 +43,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ "cfg-if", - "cipher 0.3.0", + "cipher", "cpufeatures", "opaque-debug 0.3.0", ] -[[package]] -name = "aes-gcm" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da" -dependencies = [ - "aead 0.3.2", - "aes 0.6.0", - "cipher 0.2.5", - "ctr 0.6.0", - "ghash 0.3.1", - "subtle", -] - [[package]] name = "aes-gcm" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "cipher 0.3.0", - "ctr 0.8.0", - "ghash 0.4.4", + "aead", + "aes", + "cipher", + "ctr", + "ghash", "subtle", ] -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher 0.2.5", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher 0.2.5", - "opaque-debug 0.3.0", -] - [[package]] name = "ahash" version = "0.7.6" @@ -182,12 +118,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "510c76ecefdceada737ea728f4f9a84bd2e1ef29f1ba555e560940fe279954de" -[[package]] -name = "arc-swap" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" - [[package]] name = "array-bytes" version = "4.1.0" @@ -212,73 +142,6 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" -[[package]] -name = "asn1-rs" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ff05a702273012438132f449575dbc804e27b2f3cbe3069aa237d26c98fa33" -dependencies = [ - "asn1-rs-derive 0.1.0", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror", - "time 0.3.17", -] - -[[package]] -name = "asn1-rs" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf6690c370453db30743b373a60ba498fc0d6d83b11f4abfd87a84a075db5dd4" -dependencies = [ - "asn1-rs-derive 0.4.0", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror", - "time 0.3.17", -] - -[[package]] -name = "asn1-rs-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "asn1-rs-derive" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "asn1-rs-impl" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "asn1_der" version = "0.7.5" @@ -421,6 +284,7 @@ dependencies = [ "async-global-executor", "async-io", "async-lock", + "async-process", "crossbeam-utils", "futures-channel", "futures-core", @@ -437,6 +301,21 @@ 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" @@ -445,9 +324,9 @@ checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" [[package]] name = "async-trait" -version = "0.1.58" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c" +checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" dependencies = [ "proc-macro2", "quote", @@ -456,9 +335,9 @@ dependencies = [ [[package]] name = "asynchronous-codec" -version = "0.6.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06a0daa378f5fd10634e44b0a29b2a87b890657658e072a30d6f26e57ddee182" +checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690" dependencies = [ "bytes", "futures-sink", @@ -486,22 +365,22 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" dependencies = [ - "addr2line 0.19.0", + "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide 0.6.2", - "object 0.30.0", + "miniz_oxide", + "object 0.27.1", "rustc-demangle", ] @@ -547,17 +426,20 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" 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", @@ -566,7 +448,6 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-arithmetic", - "sp-beefy", "sp-blockchain", "sp-consensus", "sp-core", @@ -581,17 +462,17 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" 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", @@ -600,11 +481,26 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ + "beefy-primitives", + "sp-api", + "sp-runtime", +] + +[[package]] +name = "beefy-primitives" +version = "4.0.0-dev" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", "sp-api", - "sp-beefy", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-mmr-primitives", "sp-runtime", + "sp-std", ] [[package]] @@ -635,21 +531,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bitflags" version = "1.3.2" @@ -719,7 +600,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding 0.1.5", + "block-padding", "byte-tools", "byteorder", "generic-array 0.12.4", @@ -743,16 +624,6 @@ dependencies = [ "generic-array 0.14.4", ] -[[package]] -name = "block-modes" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" -dependencies = [ - "block-padding 0.2.1", - "cipher 0.2.5", -] - [[package]] name = "block-padding" version = "0.1.5" @@ -762,12 +633,6 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "blocking" version = "1.1.0" @@ -904,17 +769,6 @@ dependencies = [ "jobserver", ] -[[package]] -name = "ccm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" -dependencies = [ - "aead 0.3.2", - "cipher 0.2.5", - "subtle", -] - [[package]] name = "cexpr" version = "0.6.0" @@ -952,7 +806,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" dependencies = [ "cfg-if", - "cipher 0.3.0", + "cipher", "cpufeatures", "zeroize", ] @@ -963,9 +817,9 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" dependencies = [ - "aead 0.4.3", + "aead", "chacha20", - "cipher 0.3.0", + "cipher", "poly1305", "zeroize", ] @@ -979,7 +833,7 @@ dependencies = [ "libc", "num-integer", "num-traits", - "time 0.1.44", + "time", "winapi", ] @@ -996,15 +850,6 @@ dependencies = [ "unsigned-varint", ] -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array 0.14.4", -] - [[package]] name = "cipher" version = "0.3.0" @@ -1178,16 +1023,6 @@ 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" @@ -1197,12 +1032,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cpuid-bool" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" - [[package]] name = "cranelift-bforest" version = "0.88.0" @@ -1225,7 +1054,7 @@ dependencies = [ "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli 0.26.1", + "gimli", "log", "regalloc2", "smallvec", @@ -1301,21 +1130,6 @@ dependencies = [ "wasmtime-types", ] -[[package]] -name = "crc" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff" - [[package]] name = "crc32fast" version = "1.3.0" @@ -1417,16 +1231,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "crypto-mac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" -dependencies = [ - "generic-array 0.14.4", - "subtle", -] - [[package]] name = "crypto-mac" version = "0.11.1" @@ -1447,22 +1251,13 @@ dependencies = [ "syn", ] -[[package]] -name = "ctr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" -dependencies = [ - "cipher 0.2.5", -] - [[package]] name = "ctr" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" dependencies = [ - "cipher 0.3.0", + "cipher", ] [[package]] @@ -1548,41 +1343,6 @@ dependencies = [ "syn", ] -[[package]] -name = "darling" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" -dependencies = [ - "darling_core", - "quote", - "syn", -] - [[package]] name = "data-encoding" version = "2.3.2" @@ -1615,7 +1375,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f91cf5a8c2f2097e2a32627123508635d47ce10563d999ec1a95addf08b502ba" dependencies = [ - "uuid 0.8.2", + "uuid", ] [[package]] @@ -1625,38 +1385,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" dependencies = [ "const-oid", - "pem-rfc7468", "zeroize", ] -[[package]] -name = "der-parser" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" -dependencies = [ - "asn1-rs 0.3.1", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", -] - -[[package]] -name = "der-parser" -version = "8.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d4bc9b0db0a0df9ae64634ac5bdefb7afcb534e182275ca0beadbe486701c1" -dependencies = [ - "asn1-rs 0.5.1", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", -] - [[package]] name = "derivative" version = "2.2.0" @@ -1669,41 +1400,10 @@ dependencies = [ ] [[package]] -name = "derive_builder" -version = "0.11.2" +name = "derive_more" +version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "derive_builder_macro" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" -dependencies = [ - "derive_builder_core", - "syn", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case", "proc-macro2", @@ -1794,17 +1494,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "displaydoc" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "dissimilar" version = "1.0.3" @@ -1820,6 +1509,16 @@ dependencies = [ "libc", ] +[[package]] +name = "dns-parser" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" +dependencies = [ + "byteorder", + "quick-error 1.2.3", +] + [[package]] name = "doc-comment" version = "0.3.3" @@ -1885,9 +1584,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "1.5.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" +checksum = "74e1069e39f1454367eb2de793ed062fac4c35c2934b76a81d90dd9abcd28816" dependencies = [ "signature", ] @@ -1939,9 +1638,6 @@ dependencies = [ "ff", "generic-array 0.14.4", "group", - "hkdf", - "pem-rfc7468", - "pkcs8", "rand_core 0.6.3", "sec1", "subtle", @@ -2223,9 +1919,9 @@ dependencies = [ [[package]] name = "finality-grandpa" -version = "0.16.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24e6c429951433ccb7c87fd528c60084834dcd14763182c1f83291bcde24c34" +checksum = "b22349c6a11563a202d95772a68e0fcf56119e74ea8a2a19cf2301460fcd0df5" dependencies = [ "either", "futures", @@ -2277,7 +1973,7 @@ dependencies = [ "crc32fast", "libc", "libz-sys", - "miniz_oxide 0.4.4", + "miniz_oxide", ] [[package]] @@ -2313,7 +2009,6 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", ] @@ -2337,7 +2032,6 @@ checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -2360,7 +2054,6 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "Inflector", "array-bytes", @@ -2372,13 +2065,16 @@ 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", + "rand_pcg 0.3.1", "sc-block-builder", "sc-cli", "sc-client-api", @@ -2388,6 +2084,7 @@ dependencies = [ "sc-sysinfo", "serde", "serde_json", + "serde_nanos", "sp-api", "sp-blockchain", "sp-core", @@ -2400,6 +2097,7 @@ dependencies = [ "sp-std", "sp-storage", "sp-trie", + "tempfile", "thiserror", "thousands", ] @@ -2407,7 +2105,6 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2418,7 +2115,6 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2426,7 +2122,6 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", - "sp-core", "sp-npos-elections", "sp-runtime", "sp-std", @@ -2435,7 +2130,6 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -2461,26 +2155,9 @@ dependencies = [ "serde", ] -[[package]] -name = "frame-remote-externalities" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" -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#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "bitflags", "frame-metadata", @@ -2512,7 +2189,6 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "Inflector", "cfg-expr", @@ -2526,7 +2202,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2538,7 +2213,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro2", "quote", @@ -2548,7 +2222,6 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2571,7 +2244,6 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -2582,7 +2254,6 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "log", @@ -2600,7 +2271,6 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -2615,7 +2285,6 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "sp-api", @@ -2624,7 +2293,6 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "parity-scale-codec", @@ -2663,9 +2331,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.25" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" dependencies = [ "futures-channel", "futures-core", @@ -2678,9 +2346,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "2bfc52cbddcfd745bf1740338492bb0bd83d76c67b445f91c5fb29fae29ecaa1" dependencies = [ "futures-core", "futures-sink", @@ -2688,15 +2356,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "d2acedae88d38235936c3922476b10fced7b2b68136f5e3c03c2d5be348a1115" [[package]] name = "futures-executor" -version = "0.3.25" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" dependencies = [ "futures-core", "futures-task", @@ -2706,9 +2374,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "93a66fc6d035a26a3ae255a6d2bca35eda63ae4c5512bef54449113f7a1228e5" [[package]] name = "futures-lite" @@ -2727,9 +2395,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "0db9cce532b0eae2ccf2766ab246f114b56b9cf6d445e00c2549fbc100ca045d" dependencies = [ "proc-macro2", "quote", @@ -2738,26 +2406,26 @@ dependencies = [ [[package]] name = "futures-rustls" -version = "0.22.2" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" +checksum = "e01fe9932a224b72b45336d96040aa86386d674a31d0af27d800ea7bc8ca97fe" dependencies = [ "futures-io", - "rustls 0.20.7", - "webpki 0.22.0", + "rustls", + "webpki", ] [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "ca0bae1fe9752cf7fd9b0064c674ae63f97b37bc714d745cbde0afb7ec4e6765" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "842fc63b931f4056a24d59de13fb1272134ce261816e063e634ad0c15cdc5306" [[package]] name = "futures-timer" @@ -2767,9 +2435,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "f0828a5471e340229c11c77ca80017937ce3c58cb788a17e5f1c2d5c485a9577" dependencies = [ "futures-channel", "futures-core", @@ -2795,7 +2463,6 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "chrono", "frame-election-provider-support", @@ -2804,6 +2471,7 @@ dependencies = [ "git2", "num-format", "pallet-staking", + "sp-io", ] [[package]] @@ -2842,8 +2510,10 @@ 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]] @@ -2857,16 +2527,6 @@ dependencies = [ "wasi 0.10.0+wasi-snapshot-preview1", ] -[[package]] -name = "ghash" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" -dependencies = [ - "opaque-debug 0.3.0", - "polyval 0.4.5", -] - [[package]] name = "ghash" version = "0.4.4" @@ -2874,7 +2534,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" dependencies = [ "opaque-debug 0.3.0", - "polyval 0.5.3", + "polyval", ] [[package]] @@ -2888,12 +2548,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" - [[package]] name = "git2" version = "0.14.2" @@ -3034,15 +2688,6 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" -[[package]] -name = "hkdf" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" -dependencies = [ - "hmac 0.12.1", -] - [[package]] name = "hmac" version = "0.8.1" @@ -3053,16 +2698,6 @@ dependencies = [ "digest 0.9.0", ] -[[package]] -name = "hmac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac 0.10.1", - "digest 0.9.0", -] - [[package]] name = "hmac" version = "0.11.0" @@ -3129,21 +2764,15 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" 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" @@ -3204,7 +2833,7 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.20.7", + "rustls", "rustls-native-certs", "tokio", "tokio-rustls", @@ -3223,12 +2852,6 @@ dependencies = [ "tokio-native-tls", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.2.3" @@ -3252,9 +2875,9 @@ dependencies = [ [[package]] name = "if-watch" -version = "3.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba7abdbb86e485125dad06c2691e1e393bf3b08c7b743b43aa162a00fd39062e" +checksum = "065c008e570a43c00de6aed9714035e5ea6a498c255323db9091722af6ee67dd" dependencies = [ "async-io", "core-foundation", @@ -3265,7 +2888,6 @@ dependencies = [ "log", "rtnetlink", "system-configuration", - "tokio", "windows", ] @@ -3339,25 +2961,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "interceptor" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b" -dependencies = [ - "async-trait", - "bytes", - "log", - "rand 0.8.5", - "rtcp", - "rtp", - "thiserror", - "tokio", - "waitgroup", - "webrtc-srtp", - "webrtc-util", -] - [[package]] name = "io-lifetimes" version = "0.7.2" @@ -3384,9 +2987,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.7.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" +checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" [[package]] name = "itertools" @@ -3423,23 +3026,24 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.16.2" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" +checksum = "8bd0d559d5e679b1ab2f869b486a11182923863b1b3ee8b421763cdd707b783a" 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.16.2" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" +checksum = "8752740ecd374bcbf8b69f3e80b0327942df76f793f8d4e60d3355650c31fb74" dependencies = [ "futures-util", "http", @@ -3458,9 +3062,9 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.16.2" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" +checksum = "f3dc3e9cf2ba50b7b1d7d76a667619f82846caa39e8e8daa8a4962d74acaddca" dependencies = [ "anyhow", "arrayvec 0.7.2", @@ -3471,8 +3075,10 @@ dependencies = [ "futures-timer", "futures-util", "globset", + "http", "hyper", "jsonrpsee-types", + "lazy_static", "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", @@ -3482,48 +3088,45 @@ dependencies = [ "thiserror", "tokio", "tracing", + "tracing-futures", + "unicase", ] [[package]] -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" +name = "jsonrpsee-http-server" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb69dad85df79527c019659a992498d03f8495390496da2f07e6c24c2b356fc" +checksum = "03802f0373a38c2420c70b5144742d800b509e2937edc4afb116434f07120117" 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.16.2" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" +checksum = "e290bba767401b646812f608c099b922d8142603c9e73a50fb192d3ac86f4a0d" dependencies = [ "anyhow", "beef", @@ -3535,9 +3138,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.16.2" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b83daeecfc6517cfe210df24e570fb06213533dfb990318fae781f4c7119dd9" +checksum = "6ee5feddd5188e62ac08fcf0e56478138e581509d4730f3f7be9b57dd402a4ff" dependencies = [ "http", "jsonrpsee-client-transport", @@ -3545,6 +3148,26 @@ 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" @@ -3565,13 +3188,13 @@ checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] name = "kusama-runtime" -version = "0.9.33" +version = "0.9.31" dependencies = [ + "beefy-primitives", "bitvec", "frame-benchmarking", "frame-election-provider-support", "frame-executive", - "frame-remote-externalities", "frame-support", "frame-system", "frame-system-benchmarking", @@ -3594,13 +3217,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", @@ -3630,6 +3253,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", + "remote-externalities", "rustc-hex", "scale-info", "separator", @@ -3640,7 +3264,6 @@ dependencies = [ "sp-api", "sp-arithmetic", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -3669,15 +3292,13 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" -version = "0.9.33" +version = "0.9.31" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core", "sp-runtime", - "sp-weights", ] [[package]] @@ -3691,31 +3312,35 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.13.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d770dcb02bf6835887c3a979b5107a04ff4bbde97a5f0928d27404a155add9" +checksum = "585089ceadba0197ffe9af6740ab350b325e3c1f5fccfbc3522e0250c750409b" dependencies = [ + "parity-util-mem", "smallvec", ] [[package]] name = "kvdb-memorydb" -version = "0.13.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" +checksum = "40d109c87bfb7759edd2a49b2649c1afe25af785d930ad6a38479b4dc70dd873" dependencies = [ "kvdb", + "parity-util-mem", "parking_lot 0.12.1", ] [[package]] name = "kvdb-rocksdb" -version = "0.17.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2182b8219fee6bd83aacaab7344e840179ae079d5216aa4e249b4d704646a844" +checksum = "c076cc2cdbac89b9910c853a36c957d3862a779f31c2661174222cefb49ee597" dependencies = [ "kvdb", + "log", "num_cpus", + "parity-util-mem", "parking_lot 0.12.1", "regex", "rocksdb", @@ -3724,9 +3349,9 @@ dependencies = [ [[package]] name = "kvdb-shared-tests" -version = "0.11.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d3b4e3e80c369f1b5364b6acdeba9b8a02285e91a5570f7c0404b7f9024541" +checksum = "de82a1adb7ade192c0090dd56d059a626191c0638c795eb68aff4b0bd2c1f9be" dependencies = [ "kvdb", ] @@ -3779,15 +3404,16 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" -version = "0.50.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e0a0d2f693675f49ded13c5d510c48b78069e23cbd9108d7ccd59f6dc568819" +checksum = "ec878fda12ebec479186b3914ebc48ff180fa4c51847e11a1a68bf65249e02c1" dependencies = [ "bytes", "futures", "futures-timer", "getrandom 0.2.3", "instant", + "lazy_static", "libp2p-core", "libp2p-dns", "libp2p-identify", @@ -3797,12 +3423,11 @@ dependencies = [ "libp2p-mplex", "libp2p-noise", "libp2p-ping", - "libp2p-quic", "libp2p-request-response", "libp2p-swarm", + "libp2p-swarm-derive", "libp2p-tcp", "libp2p-wasm-ext", - "libp2p-webrtc", "libp2p-websocket", "libp2p-yamux", "multiaddr", @@ -3813,9 +3438,9 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.38.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a8fcd392ff67af6cc3f03b1426c41f7f26b6b9aff2dc632c1c56dd649e571f" +checksum = "799676bb0807c788065e57551c6527d461ad572162b0519d1958946ff9e0539d" dependencies = [ "asn1_der", "bs58", @@ -3825,18 +3450,17 @@ dependencies = [ "futures", "futures-timer", "instant", + "lazy_static", "log", "multiaddr", "multihash", "multistream-select", - "once_cell", "parking_lot 0.12.1", "pin-project", "prost", "prost-build", "rand 0.8.5", "rw-stream-sink", - "sec1", "sha2 0.10.2", "smallvec", "thiserror", @@ -3847,10 +3471,11 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.38.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e42a271c1b49f789b92f7fc87749fa79ce5c7bdc88cbdfacb818a4bca47fec5" +checksum = "2322c9fb40d99101def6a01612ee30500c89abbbecb6297b3cd252903a4c1720" dependencies = [ + "async-std-resolver", "futures", "libp2p-core", "log", @@ -3861,9 +3486,9 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.41.1" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c052d0026f4817b44869bfb6810f4e1112f43aec8553f2cb38881c524b563abf" +checksum = "dcf9a121f699e8719bda2e6e9e9b6ddafc6cff4602471d6481c1067930ccb29b" dependencies = [ "asynchronous-codec", "futures", @@ -3882,9 +3507,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.42.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2766dcd2be8c87d5e1f35487deb22d765f49c6ae1251b3633efe3b25698bd3d2" +checksum = "6721c200e2021f6c3fab8b6cf0272ead8912d871610ee194ebd628cecf428f22" dependencies = [ "arrayvec 0.7.2", "asynchronous-codec", @@ -3910,11 +3535,13 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.42.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f378264aade9872d6ccd315c0accc18be3a35d15fc1b9c36e5b6f983b62b5b" +checksum = "761704e727f7d68d58d7bc2231eafae5fc1b9814de24290f126df09d4bd37a15" dependencies = [ + "async-io", "data-encoding", + "dns-parser", "futures", "if-watch", "libp2p-core", @@ -3923,16 +3550,14 @@ dependencies = [ "rand 0.8.5", "smallvec", "socket2", - "tokio", - "trust-dns-proto", "void", ] [[package]] name = "libp2p-metrics" -version = "0.11.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad8a64f29da86005c86a4d2728b8a0719e9b192f4092b609fd8790acb9dec55" +checksum = "9ee31b08e78b7b8bfd1c4204a9dd8a87b4fcdf6dafc57eb51701c1c264a81cb9" dependencies = [ "libp2p-core", "libp2p-identify", @@ -3944,9 +3569,9 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.38.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03805b44107aa013e7cbbfa5627b31c36cbedfdfb00603c0311998882bc4bace" +checksum = "692664acfd98652de739a8acbb0a0d670f1d67190a49be6b4395e22c37337d89" dependencies = [ "asynchronous-codec", "bytes", @@ -3962,32 +3587,31 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.41.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a978cb57efe82e892ec6f348a536bfbd9fee677adbe5689d7a93ad3a9bffbf2e" +checksum = "048155686bd81fe6cb5efdef0c6290f25ad32a0a42e8f4f72625cf6a505a206f" dependencies = [ "bytes", "curve25519-dalek 3.2.0", "futures", + "lazy_static", "libp2p-core", "log", - "once_cell", "prost", "prost-build", "rand 0.8.5", "sha2 0.10.2", "snow", "static_assertions", - "thiserror", - "x25519-dalek 1.1.1", + "x25519-dalek", "zeroize", ] [[package]] name = "libp2p-ping" -version = "0.41.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "929fcace45a112536e22b3dcfd4db538723ef9c3cb79f672b98be2cc8e25f37f" +checksum = "7228b9318d34689521349a86eb39a3c3a802c9efc99a0568062ffb80913e3f91" dependencies = [ "futures", "futures-timer", @@ -3999,32 +3623,11 @@ dependencies = [ "void", ] -[[package]] -name = "libp2p-quic" -version = "0.7.0-alpha" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" -dependencies = [ - "bytes", - "futures", - "futures-timer", - "if-watch", - "libp2p-core", - "libp2p-tls", - "log", - "parking_lot 0.12.1", - "quinn-proto", - "rand 0.8.5", - "rustls 0.20.7", - "thiserror", - "tokio", -] - [[package]] name = "libp2p-request-response" -version = "0.23.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3236168796727bfcf4927f766393415361e2c644b08bedb6a6b13d957c9a4884" +checksum = "8827af16a017b65311a410bb626205a9ad92ec0473967618425039fa5231adc1" dependencies = [ "async-trait", "bytes", @@ -4040,9 +3643,9 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.41.1" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a35472fe3276b3855c00f1c032ea8413615e030256429ad5349cdf67c6e1a0" +checksum = "46d13df7c37807965d82930c0e4b04a659efcb6cca237373b206043db5398ecf" dependencies = [ "either", "fnv", @@ -4050,21 +3653,19 @@ dependencies = [ "futures-timer", "instant", "libp2p-core", - "libp2p-swarm-derive", "log", "pin-project", "rand 0.8.5", "smallvec", "thiserror", - "tokio", "void", ] [[package]] name = "libp2p-swarm-derive" -version = "0.31.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d527d5827582abd44a6d80c07ff8b50b4ee238a8979e05998474179e79dc400" +checksum = "a0eddc4497a8b5a506013c40e8189864f9c3a00db2b25671f428ae9007f3ba32" dependencies = [ "heck", "quote", @@ -4073,10 +3674,11 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.38.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b257baf6df8f2df39678b86c578961d48cc8b68642a12f0f763f56c8e5858d" +checksum = "9839d96761491c6d3e238e70554b856956fca0ab60feb9de2cd08eed4473fa92" dependencies = [ + "async-io", "futures", "futures-timer", "if-watch", @@ -4084,32 +3686,13 @@ dependencies = [ "libp2p-core", "log", "socket2", - "tokio", -] - -[[package]] -name = "libp2p-tls" -version = "0.1.0-alpha" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7905ce0d040576634e8a3229a7587cc8beab83f79db6023800f1792895defa8" -dependencies = [ - "futures", - "futures-rustls", - "libp2p-core", - "rcgen 0.10.0", - "ring", - "rustls 0.20.7", - "thiserror", - "webpki 0.22.0", - "x509-parser 0.14.0", - "yasna", ] [[package]] name = "libp2p-wasm-ext" -version = "0.38.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb1a35299860e0d4b3c02a3e74e3b293ad35ae0cee8a056363b0c862d082069" +checksum = "a17b5b8e7a73e379e47b1b77f8a82c4721e97eca01abcd18e9cd91a23ca6ce97" dependencies = [ "futures", "js-sys", @@ -4119,42 +3702,11 @@ dependencies = [ "wasm-bindgen-futures", ] -[[package]] -name = "libp2p-webrtc" -version = "0.4.0-alpha" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" -dependencies = [ - "async-trait", - "asynchronous-codec", - "bytes", - "futures", - "futures-timer", - "hex", - "if-watch", - "libp2p-core", - "libp2p-noise", - "log", - "multihash", - "prost", - "prost-build", - "prost-codec", - "rand 0.8.5", - "rcgen 0.9.3", - "serde", - "stun", - "thiserror", - "tinytemplate", - "tokio", - "tokio-util 0.7.1", - "webrtc", -] - [[package]] name = "libp2p-websocket" -version = "0.40.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d705506030d5c0aaf2882437c70dab437605f21c5f9811978f694e6917a3b54" +checksum = "3758ae6f89b2531a24b6d9f5776bda6a626b60a57600d7185d43dfa75ca5ecc4" dependencies = [ "either", "futures", @@ -4171,9 +3723,9 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.42.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f63594a0aa818642d9d4915c791945053877253f08a3626f13416b5cd928a29" +checksum = "30f079097a21ad017fc8139460630286f02488c8c13b26affb46623aa20d8845" dependencies = [ "futures", "libp2p-core", @@ -4410,15 +3962,6 @@ dependencies = [ "rawpointer", ] -[[package]] -name = "md-5" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b48670c893079d3c2ed79114e3644b7004df1c361a4e0ad52e2e6940d07c3d" -dependencies = [ - "digest 0.10.3", -] - [[package]] name = "memchr" version = "2.4.1" @@ -4454,12 +3997,22 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.31.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" +checksum = "34ac11bb793c28fa095b7554466f53b3a60a2cd002afdac01bcf135cbd73a269" 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]] @@ -4513,60 +4066,27 @@ dependencies = [ "autocfg", ] -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - [[package]] name = "mio" -version = "0.8.5" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" dependencies = [ "libc", "log", + "miow", + "ntapi", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", -] - -[[package]] -name = "mmr-gadget" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" -dependencies = [ - "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", + "winapi", ] [[package]] -name = "mmr-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +name = "miow" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" dependencies = [ - "anyhow", - "jsonrpsee", - "parity-scale-codec", - "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-mmr-primitives", - "sp-runtime", + "winapi", ] [[package]] @@ -4598,14 +4118,14 @@ dependencies = [ [[package]] name = "multiaddr" -version = "0.16.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aebdb21e90f81d13ed01dc84123320838e53963c2ca94b60b305d3fa64f31e" +checksum = "3c580bfdd8803cce319b047d239559a22f809094aaea4ac13902a1fdcfcd4261" dependencies = [ "arrayref", + "bs58", "byteorder", "data-encoding", - "multibase", "multihash", "percent-encoding", "serde", @@ -4664,9 +4184,9 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "multistream-select" -version = "0.12.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" +checksum = "9bc41247ec209813e2fd414d6e16b9d94297dacf3cd613fa6ef09cd4d9755c10" dependencies = [ "bytes", "futures", @@ -4797,11 +4317,11 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92b654097027250401127914afb37cb1f311df6610a9891ff07a757e94199027" dependencies = [ + "async-io", "bytes", "futures", "libc", "log", - "tokio", ] [[package]] @@ -4852,6 +4372,15 @@ 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" @@ -4926,48 +4455,30 @@ dependencies = [ [[package]] name = "object" -version = "0.29.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" dependencies = [ - "crc32fast", - "hashbrown", - "indexmap", "memchr", ] [[package]] name = "object" -version = "0.30.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ + "crc32fast", + "hashbrown", + "indexmap", "memchr", ] -[[package]] -name = "oid-registry" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a" -dependencies = [ - "asn1-rs 0.3.1", -] - -[[package]] -name = "oid-registry" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" -dependencies = [ - "asn1-rs 0.5.1", -] - [[package]] name = "once_cell" -version = "1.17.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "opaque-debug" @@ -5016,9 +4527,9 @@ dependencies = [ [[package]] name = "orchestra" -version = "0.0.4" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17e7d5b6bb115db09390bed8842c94180893dd83df3dfce7354f2a2aa090a4ee" +checksum = "0aab54694ddaa8a9b703724c6ef04272b2d27bc32d2c855aae5cdd1857216b43" dependencies = [ "async-trait", "dyn-clonable", @@ -5033,9 +4544,9 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.0.4" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2af4dabb2286b0be0e9711d2d24e25f6217048b71210cffd3daddc3b5c84e1f" +checksum = "a702b2f6bf592b3eb06c00d80d05afaf7a8eff6b41bb361e397d799acc21b45a" dependencies = [ "expander 0.0.6", "itertools", @@ -5076,39 +4587,15 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" -[[package]] -name = "p256" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" -dependencies = [ - "ecdsa", - "elliptic-curve", - "sha2 0.10.2", -] - -[[package]] -name = "p384" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" -dependencies = [ - "ecdsa", - "elliptic-curve", - "sha2 0.10.2", -] - [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core", "sp-runtime", "sp-std", ] @@ -5116,7 +4603,6 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5132,7 +4618,6 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5147,7 +4632,6 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5171,7 +4655,6 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5191,15 +4674,14 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" 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", @@ -5210,7 +4692,6 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5225,15 +4706,14 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ + "beefy-primitives", "frame-support", "frame-system", "pallet-session", "parity-scale-codec", "scale-info", "serde", - "sp-beefy", "sp-runtime", "sp-std", ] @@ -5241,10 +4721,10 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "beefy-merkle-tree", + "beefy-primitives", "frame-support", "frame-system", "log", @@ -5254,7 +4734,6 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-beefy", "sp-core", "sp-io", "sp-runtime", @@ -5264,7 +4743,6 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5282,7 +4760,6 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5301,7 +4778,6 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5318,7 +4794,6 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5335,7 +4810,6 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5353,7 +4827,6 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5362,7 +4835,7 @@ dependencies = [ "log", "pallet-election-provider-support-benchmarking", "parity-scale-codec", - "rand 0.8.5", + "rand 0.7.3", "scale-info", "sp-arithmetic", "sp-core", @@ -5370,13 +4843,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#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5389,7 +4862,6 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5407,7 +4879,6 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5422,10 +4893,23 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-gilt" +version = "4.0.0-dev" +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#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5448,7 +4932,6 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5464,7 +4947,6 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5484,7 +4966,6 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5501,7 +4982,6 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5517,8 +4997,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" -version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "0.9.29" dependencies = [ "frame-benchmarking", "frame-support", @@ -5537,8 +5016,8 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ + "ckb-merkle-mountain-range", "frame-benchmarking", "frame-support", "frame-system", @@ -5552,33 +5031,31 @@ dependencies = [ ] [[package]] -name = "pallet-multisig" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +name = "pallet-mmr-rpc" +version = "3.0.0" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", + "anyhow", + "jsonrpsee", "parity-scale-codec", - "scale-info", - "sp-io", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-mmr-primitives", "sp-runtime", - "sp-std", ] [[package]] -name = "pallet-nis" +name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", - "sp-core", + "sp-io", "sp-runtime", "sp-std", ] @@ -5586,7 +5063,6 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5603,7 +5079,6 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5623,7 +5098,6 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "sp-api", @@ -5633,7 +5107,6 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5650,7 +5123,6 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5673,7 +5145,6 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5690,7 +5161,6 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5705,7 +5175,6 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5723,7 +5192,6 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5738,13 +5206,11 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "assert_matches", "frame-benchmarking", "frame-support", "frame-system", - "log", "parity-scale-codec", "scale-info", "serde", @@ -5757,7 +5223,6 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5774,7 +5239,6 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5795,14 +5259,13 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", "pallet-staking", - "rand 0.8.5", + "rand 0.7.3", "sp-runtime", "sp-session", "sp-std", @@ -5811,7 +5274,6 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5825,7 +5287,6 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5848,7 +5309,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5859,7 +5319,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "log", "sp-arithmetic", @@ -5868,7 +5327,6 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5885,7 +5343,6 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5899,7 +5356,6 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5917,7 +5373,6 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5936,7 +5391,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-support", "frame-system", @@ -5952,7 +5406,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5968,7 +5421,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5980,7 +5432,6 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -5997,7 +5448,6 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -6013,7 +5463,6 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -6028,7 +5477,6 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "frame-benchmarking", "frame-support", @@ -6042,7 +5490,7 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "0.9.33" +version = "0.9.31" dependencies = [ "frame-support", "frame-system", @@ -6064,7 +5512,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.33" +version = "0.9.31" dependencies = [ "frame-benchmarking", "frame-support", @@ -6139,6 +5587,35 @@ 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" @@ -6207,20 +5684,20 @@ checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" [[package]] name = "pbkdf2" -version = "0.8.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" dependencies = [ - "crypto-mac 0.11.1", + "crypto-mac 0.8.0", ] [[package]] name = "pbkdf2" -version = "0.11.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "digest 0.10.3", + "crypto-mac 0.11.1", ] [[package]] @@ -6229,24 +5706,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" -[[package]] -name = "pem" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c64931a1a212348ec4f3b4362585eca7159d0d09cbdf4a7f74f02173596fd4" -dependencies = [ - "base64", -] - -[[package]] -name = "pem-rfc7468" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" -dependencies = [ - "base64ct", -] - [[package]] name = "percent-encoding" version = "2.1.0" @@ -6368,28 +5827,27 @@ checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" [[package]] name = "polkadot" -version = "0.9.33" +version = "0.9.31" 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.33" +version = "0.9.31" dependencies = [ "assert_matches", "env_logger 0.9.0", "futures", "log", - "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6408,7 +5866,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "bitvec", @@ -6433,7 +5891,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "derive_more", @@ -6462,7 +5920,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "env_logger 0.9.0", @@ -6491,7 +5949,7 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.9.33" +version = "0.9.31" dependencies = [ "clap", "frame-benchmarking-cli", @@ -6504,13 +5962,12 @@ 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", @@ -6518,14 +5975,13 @@ dependencies = [ [[package]] name = "polkadot-client" -version = "0.9.33" +version = "0.9.31" dependencies = [ - "async-trait", + "beefy-primitives", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", "frame-system-rpc-runtime-api", - "futures", "kusama-runtime", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", @@ -6541,7 +5997,6 @@ dependencies = [ "sc-service", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", @@ -6562,7 +6017,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "0.9.33" +version = "0.9.31" dependencies = [ "always-assert", "assert_matches", @@ -6591,9 +6046,10 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "0.9.33" +version = "0.9.31" dependencies = [ "parity-scale-codec", + "parity-util-mem", "scale-info", "sp-core", "sp-runtime", @@ -6602,7 +6058,7 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "async-trait", @@ -6634,7 +6090,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.33" +version = "0.9.31" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -6647,7 +6103,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "async-trait", @@ -6674,7 +6130,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.33" +version = "0.9.31" dependencies = [ "always-assert", "assert_matches", @@ -6685,7 +6141,6 @@ dependencies = [ "futures-timer", "parity-scale-codec", "parking_lot 0.12.1", - "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", @@ -6704,7 +6159,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.33" +version = "0.9.31" dependencies = [ "futures", "parity-scale-codec", @@ -6723,7 +6178,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "async-trait", @@ -6762,7 +6217,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "bitvec", @@ -6790,7 +6245,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "bitvec", @@ -6816,7 +6271,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.33" +version = "0.9.31" dependencies = [ "futures", "polkadot-node-subsystem", @@ -6832,7 +6287,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "async-trait", @@ -6840,7 +6295,6 @@ dependencies = [ "futures-timer", "parity-scale-codec", "polkadot-node-core-pvf", - "polkadot-node-metrics", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", @@ -6856,15 +6310,15 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.33" +version = "0.9.31" dependencies = [ "futures", "maplit", "parity-scale-codec", - "polkadot-node-metrics", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", + "polkadot-node-subsystem-util", "polkadot-primitives", "sc-client-api", "sc-consensus-babe", @@ -6875,7 +6329,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "futures", @@ -6896,7 +6350,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "fatality", @@ -6923,23 +6377,23 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.33" +version = "0.9.31" 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.33" +version = "0.9.31" dependencies = [ "bitvec", "fatality", @@ -6960,13 +6414,12 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "0.9.33" +version = "0.9.31" dependencies = [ "always-assert", "assert_matches", "async-process", "async-std", - "cpu-time", "futures", "futures-timer", "hex-literal", @@ -6995,7 +6448,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.33" +version = "0.9.31" dependencies = [ "futures", "futures-timer", @@ -7018,15 +6471,16 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.33" +version = "0.9.31" dependencies = [ "futures", - "lru", - "polkadot-node-metrics", + "memory-lru", + "parity-util-mem", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-types", + "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-primitives-test-helpers", "sp-api", @@ -7039,8 +6493,9 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "0.9.33" +version = "0.9.31" dependencies = [ + "async-std", "lazy_static", "log", "mick-jaeger", @@ -7051,12 +6506,11 @@ dependencies = [ "sc-network", "sp-core", "thiserror", - "tokio", ] [[package]] name = "polkadot-node-metrics" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_cmd", "bs58", @@ -7084,7 +6538,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.33" +version = "0.9.31" dependencies = [ "async-trait", "derive_more", @@ -7107,7 +6561,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "0.9.33" +version = "0.9.31" dependencies = [ "bounded-vec", "futures", @@ -7129,7 +6583,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "0.9.33" +version = "0.9.31" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -7138,7 +6592,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" -version = "0.9.33" +version = "0.9.31" dependencies = [ "async-trait", "futures", @@ -7156,7 +6610,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.33" +version = "0.9.31" dependencies = [ "async-trait", "derive_more", @@ -7178,7 +6632,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "async-trait", @@ -7195,6 +6649,7 @@ dependencies = [ "lru", "parity-db", "parity-scale-codec", + "parity-util-mem", "parking_lot 0.11.2", "pin-project", "polkadot-node-jaeger", @@ -7218,7 +6673,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "async-trait", @@ -7227,6 +6682,7 @@ dependencies = [ "futures-timer", "lru", "orchestra", + "parity-util-mem", "parking_lot 0.12.1", "polkadot-node-metrics", "polkadot-node-network-protocol", @@ -7238,17 +6694,17 @@ dependencies = [ "sc-client-api", "sp-api", "sp-core", - "tikv-jemalloc-ctl", "tracing-gum", ] [[package]] name = "polkadot-parachain" -version = "0.9.33" +version = "0.9.31" dependencies = [ "derive_more", "frame-support", "parity-scale-codec", + "parity-util-mem", "polkadot-core-primitives", "scale-info", "serde", @@ -7259,7 +6715,7 @@ dependencies = [ [[package]] name = "polkadot-performance-test" -version = "0.9.33" +version = "0.9.31" dependencies = [ "env_logger 0.9.0", "kusama-runtime", @@ -7273,11 +6729,12 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.9.33" +version = "0.9.31" dependencies = [ "bitvec", "hex-literal", "parity-scale-codec", + "parity-util-mem", "polkadot-core-primitives", "polkadot-parachain", "scale-info", @@ -7298,7 +6755,7 @@ dependencies = [ [[package]] name = "polkadot-primitives-test-helpers" -version = "0.9.33" +version = "0.9.31" dependencies = [ "polkadot-primitives", "rand 0.8.5", @@ -7310,12 +6767,12 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.9.33" +version = "0.9.31" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", "jsonrpsee", - "mmr-rpc", + "pallet-mmr-rpc", "pallet-transaction-payment-rpc", "polkadot-primitives", "sc-chain-spec", @@ -7341,13 +6798,13 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.33" +version = "0.9.31" dependencies = [ + "beefy-primitives", "bitvec", "frame-benchmarking", "frame-election-provider-support", "frame-executive", - "frame-remote-externalities", "frame-support", "frame-system", "frame-system-benchmarking", @@ -7373,7 +6830,6 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", - "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7400,6 +6856,7 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-constants", "polkadot-runtime-parachains", + "remote-externalities", "rustc-hex", "scale-info", "separator", @@ -7409,7 +6866,6 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -7438,8 +6894,9 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.9.33" +version = "0.9.31" dependencies = [ + "beefy-primitives", "bitvec", "frame-benchmarking", "frame-election-provider-support", @@ -7474,7 +6931,6 @@ dependencies = [ "serde_json", "slot-range-helper", "sp-api", - "sp-beefy", "sp-core", "sp-inherents", "sp-io", @@ -7490,20 +6946,18 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" -version = "0.9.33" +version = "0.9.31" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core", "sp-runtime", - "sp-weights", ] [[package]] name = "polkadot-runtime-metrics" -version = "0.9.33" +version = "0.9.31" dependencies = [ "bs58", "parity-scale-codec", @@ -7514,7 +6968,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "bitflags", @@ -7540,7 +6994,6 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-runtime-metrics", - "proptest", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", @@ -7568,11 +7021,12 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "async-trait", "beefy-gadget", + "beefy-primitives", "env_logger 0.9.0", "frame-support", "frame-system-rpc-runtime-api", @@ -7584,7 +7038,6 @@ dependencies = [ "kvdb-rocksdb", "log", "lru", - "mmr-gadget", "pallet-babe", "pallet-im-online", "pallet-staking", @@ -7653,7 +7106,6 @@ dependencies = [ "serde_json", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", @@ -7663,7 +7115,6 @@ dependencies = [ "sp-inherents", "sp-io", "sp-keystore", - "sp-mmr-primitives", "sp-offchain", "sp-runtime", "sp-session", @@ -7682,7 +7133,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.33" +version = "0.9.31" dependencies = [ "arrayvec 0.5.2", "assert_matches", @@ -7713,7 +7164,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.33" +version = "0.9.31" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -7722,7 +7173,7 @@ dependencies = [ [[package]] name = "polkadot-test-client" -version = "0.9.33" +version = "0.9.31" dependencies = [ "futures", "parity-scale-codec", @@ -7748,7 +7199,7 @@ dependencies = [ [[package]] name = "polkadot-test-malus" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "async-trait", @@ -7756,6 +7207,7 @@ dependencies = [ "color-eyre", "futures", "futures-timer", + "parity-util-mem", "polkadot-cli", "polkadot-erasure-coding", "polkadot-node-core-backing", @@ -7776,8 +7228,9 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" -version = "0.9.33" +version = "0.9.31" dependencies = [ + "beefy-primitives", "bitvec", "frame-election-provider-support", "frame-executive", @@ -7815,7 +7268,6 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -7841,7 +7293,7 @@ dependencies = [ [[package]] name = "polkadot-test-service" -version = "0.9.33" +version = "0.9.31" dependencies = [ "frame-benchmarking", "frame-system", @@ -7896,7 +7348,7 @@ dependencies = [ [[package]] name = "polkadot-voter-bags" -version = "0.9.33" +version = "0.9.31" dependencies = [ "clap", "generate-bags", @@ -7930,17 +7382,6 @@ dependencies = [ "universal-hash", ] -[[package]] -name = "polyval" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" -dependencies = [ - "cpuid-bool", - "opaque-debug 0.3.0", - "universal-hash", -] - [[package]] name = "polyval" version = "0.5.3" @@ -8086,9 +7527,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" dependencies = [ "unicode-ident", ] @@ -8141,26 +7582,6 @@ dependencies = [ "regex", ] -[[package]] -name = "proptest" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" -dependencies = [ - "bit-set", - "bitflags", - "byteorder", - "lazy_static", - "num-traits", - "quick-error 2.0.1", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_xorshift", - "regex-syntax", - "rusty-fork", - "tempfile", -] - [[package]] name = "prost" version = "0.11.0" @@ -8193,9 +7614,9 @@ dependencies = [ [[package]] name = "prost-codec" -version = "0.3.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc34979ff898b6e141106178981ce2596c387ea6e62533facfc61a37fc879c0" +checksum = "011ae9ff8359df7915f97302d591cdd9e0e27fbd5a4ddc5bd13b71079bb20987" dependencies = [ "asynchronous-codec", "bytes", @@ -8272,24 +7693,6 @@ dependencies = [ "pin-project-lite 0.1.12", ] -[[package]] -name = "quinn-proto" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4ced82a24bb281af338b9e8f94429b6eca01b4e66d899f40031f074e74c9" -dependencies = [ - "bytes", - "rand 0.8.5", - "ring", - "rustc-hash", - "rustls 0.20.7", - "slab", - "thiserror", - "tinyvec", - "tracing", - "webpki 0.22.0", -] - [[package]] name = "quote" version = "1.0.20" @@ -8316,6 +7719,7 @@ dependencies = [ "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc", + "rand_pcg 0.2.1", ] [[package]] @@ -8388,18 +7792,18 @@ dependencies = [ [[package]] name = "rand_pcg" -version = "0.3.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" dependencies = [ - "rand_core 0.6.3", + "rand_core 0.5.1", ] [[package]] -name = "rand_xorshift" -version = "0.3.0" +name = "rand_pcg" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" dependencies = [ "rand_core 0.6.3", ] @@ -8435,31 +7839,6 @@ dependencies = [ "num_cpus", ] -[[package]] -name = "rcgen" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" -dependencies = [ - "pem", - "ring", - "time 0.3.17", - "x509-parser 0.13.2", - "yasna", -] - -[[package]] -name = "rcgen" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" -dependencies = [ - "pem", - "ring", - "time 0.3.17", - "yasna", -] - [[package]] name = "redox_syscall" version = "0.2.10" @@ -8552,7 +7931,7 @@ checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "remote-ext-tests-bags-list" -version = "0.9.33" +version = "0.9.31" dependencies = [ "clap", "frame-system", @@ -8569,6 +7948,22 @@ dependencies = [ "westend-runtime-constants", ] +[[package]] +name = "remote-externalities" +version = "0.10.0-dev" +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" @@ -8663,17 +8058,16 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.33" +version = "0.9.31" dependencies = [ "beefy-merkle-tree", + "beefy-primitives", "frame-benchmarking", "frame-executive", - "frame-remote-externalities", "frame-support", "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", - "frame-try-runtime", "hex-literal", "log", "pallet-authority-discovery", @@ -8687,6 +8081,7 @@ dependencies = [ "pallet-collective", "pallet-democracy", "pallet-elections-phragmen", + "pallet-gilt", "pallet-grandpa", "pallet-identity", "pallet-im-online", @@ -8694,7 +8089,6 @@ dependencies = [ "pallet-membership", "pallet-mmr", "pallet-multisig", - "pallet-nis", "pallet-offences", "pallet-preimage", "pallet-proxy", @@ -8728,7 +8122,6 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -8741,14 +8134,12 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", - "sp-tracing", "sp-transaction-pool", "sp-trie", "sp-version", "static_assertions", "substrate-wasm-builder", "tiny-keccak", - "tokio", "xcm", "xcm-builder", "xcm-executor", @@ -8756,15 +8147,13 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "0.9.33" +version = "0.9.31" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core", "sp-runtime", - "sp-weights", ] [[package]] @@ -8777,44 +8166,19 @@ dependencies = [ "winapi", ] -[[package]] -name = "rtcp" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691" -dependencies = [ - "bytes", - "thiserror", - "webrtc-util", -] - [[package]] name = "rtnetlink" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ + "async-global-executor", "futures", "log", "netlink-packet-route", "netlink-proto", "nix 0.24.1", "thiserror", - "tokio", -] - -[[package]] -name = "rtp" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a095411ff00eed7b12e4c6a118ba984d113e1079582570d56a5ee723f11f80" -dependencies = [ - "async-trait", - "bytes", - "rand 0.8.5", - "serde", - "thiserror", - "webrtc-util", ] [[package]] @@ -8844,15 +8208,6 @@ dependencies = [ "semver 1.0.4", ] -[[package]] -name = "rusticata-macros" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" -dependencies = [ - "nom", -] - [[package]] name = "rustix" version = "0.35.9" @@ -8869,27 +8224,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64", - "log", - "ring", - "sct 0.6.1", - "webpki 0.21.4", -] - -[[package]] -name = "rustls" -version = "0.20.7" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" +checksum = "d37e5e2290f3e040b594b1a9e04377c2c671f1a1cfd9bfdef82106ac1c113f84" dependencies = [ "log", "ring", - "sct 0.7.0", - "webpki 0.22.0", + "sct", + "webpki", ] [[package]] @@ -8919,18 +8261,6 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error 1.2.3", - "tempfile", - "wait-timeout", -] - [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -8960,7 +8290,6 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "log", "sp-core", @@ -8971,7 +8300,6 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures", @@ -8982,7 +8310,7 @@ dependencies = [ "parity-scale-codec", "prost", "prost-build", - "rand 0.8.5", + "rand 0.7.3", "sc-client-api", "sc-network-common", "sp-api", @@ -8998,7 +8326,6 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "futures-timer", @@ -9021,7 +8348,6 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9037,9 +8363,10 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ + "impl-trait-for-tuples", "memmap2", + "parity-scale-codec", "sc-chain-spec-derive", "sc-network-common", "sc-telemetry", @@ -9052,7 +8379,6 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9063,7 +8389,6 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "chrono", @@ -9074,7 +8399,7 @@ dependencies = [ "log", "names", "parity-scale-codec", - "rand 0.8.5", + "rand 0.7.3", "regex", "rpassword", "sc-client-api", @@ -9103,10 +8428,10 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "fnv", "futures", + "hash-db", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -9123,13 +8448,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#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "hash-db", "kvdb", @@ -9154,14 +8479,12 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures", "futures-timer", "libp2p", "log", - "mockall", "parking_lot 0.12.1", "sc-client-api", "sc-utils", @@ -9179,7 +8502,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "fork-tree", @@ -9198,6 +8520,7 @@ dependencies = [ "sc-keystore", "sc-telemetry", "schnorrkel", + "serde", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -9208,8 +8531,10 @@ dependencies = [ "sp-consensus-vrf", "sp-core", "sp-inherents", + "sp-io", "sp-keystore", "sp-runtime", + "sp-version", "substrate-prometheus-endpoint", "thiserror", ] @@ -9217,7 +8542,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "jsonrpsee", @@ -9239,7 +8563,6 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9252,7 +8575,6 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures", @@ -9270,13 +8592,14 @@ 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#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ + "lazy_static", "lru", "parity-scale-codec", "parking_lot 0.12.1", @@ -9285,6 +8608,7 @@ dependencies = [ "sc-executor-wasmtime", "sp-api", "sp-core", + "sp-core-hashing-proc-macro", "sp-externalities", "sp-io", "sp-panic-handler", @@ -9299,10 +8623,12 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ + "environmental", + "parity-scale-codec", "sc-allocator", "sp-maybe-compressed-blob", + "sp-sandbox", "sp-wasm-interface", "thiserror", "wasm-instrument", @@ -9312,12 +8638,13 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "log", + "parity-scale-codec", "sc-allocator", "sc-executor-common", "sp-runtime-interface", + "sp-sandbox", "sp-wasm-interface", "wasmi", ] @@ -9325,16 +8652,18 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" 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", ] @@ -9342,7 +8671,6 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "ahash", "array-bytes", @@ -9360,6 +8688,7 @@ dependencies = [ "sc-chain-spec", "sc-client-api", "sc-consensus", + "sc-keystore", "sc-network", "sc-network-common", "sc-network-gossip", @@ -9382,7 +8711,6 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "finality-grandpa", "futures", @@ -9393,6 +8721,7 @@ dependencies = [ "sc-finality-grandpa", "sc-rpc", "serde", + "serde_json", "sp-blockchain", "sp-core", "sp-runtime", @@ -9402,14 +8731,15 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "ansi_term", "futures", "futures-timer", "log", + "parity-util-mem", "sc-client-api", "sc-network-common", + "sc-transaction-pool-api", "sp-blockchain", "sp-runtime", ] @@ -9417,7 +8747,6 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "async-trait", @@ -9432,25 +8761,29 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "async-trait", "asynchronous-codec", - "backtrace", + "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", - "rand 0.8.5", + "prost", + "rand 0.7.3", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -9474,7 +8807,6 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "cid", "futures", @@ -9488,12 +8820,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#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "bitflags", @@ -9519,7 +8851,6 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "ahash", "futures", @@ -9537,7 +8868,6 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "futures", @@ -9558,10 +8888,8 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", - "async-trait", "fork-tree", "futures", "libp2p", @@ -9583,24 +8911,22 @@ 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#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "futures", + "hex", "libp2p", "log", "parity-scale-codec", "pin-project", "sc-network-common", "sc-peerset", - "sc-utils", "sp-consensus", "sp-runtime", "substrate-prometheus-endpoint", @@ -9609,7 +8935,6 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "bytes", @@ -9623,7 +8948,7 @@ dependencies = [ "once_cell", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand 0.7.3", "sc-client-api", "sc-network-common", "sc-peerset", @@ -9639,7 +8964,6 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "libp2p", @@ -9652,7 +8976,6 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9661,9 +8984,9 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", + "hash-db", "jsonrpsee", "log", "parity-scale-codec", @@ -9690,10 +9013,12 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ + "futures", "jsonrpsee", + "log", "parity-scale-codec", + "parking_lot 0.12.1", "sc-chain-spec", "sc-transaction-pool-api", "scale-info", @@ -9702,6 +9027,7 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", + "sp-tracing", "sp-version", "thiserror", ] @@ -9709,60 +9035,50 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ - "http", + "futures", "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#b85246bf1156f9f58825f0be48e6086128cc0bbd" 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#b85246bf1156f9f58825f0be48e6086128cc0bbd" 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.8.5", + "rand 0.7.3", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -9790,15 +9106,19 @@ 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", @@ -9815,18 +9135,19 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" 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#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9845,13 +9166,12 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "libc", "log", - "rand 0.8.5", - "rand_pcg", + "rand 0.7.3", + "rand_pcg 0.2.1", "regex", "sc-telemetry", "serde", @@ -9864,7 +9184,6 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "chrono", "futures", @@ -9872,8 +9191,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "pin-project", - "rand 0.8.5", - "sc-utils", + "rand 0.7.3", "serde", "serde_json", "thiserror", @@ -9883,7 +9201,6 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "ansi_term", "atty", @@ -9914,7 +9231,6 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9925,7 +9241,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures", @@ -9933,6 +9248,7 @@ dependencies = [ "linked-hash-map", "log", "parity-scale-codec", + "parity-util-mem", "parking_lot 0.12.1", "sc-client-api", "sc-transaction-pool-api", @@ -9951,7 +9267,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures", @@ -9965,9 +9280,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ - "backtrace", "futures", "futures-timer", "lazy_static", @@ -10042,16 +9355,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sct" version = "0.7.0" @@ -10062,18 +9365,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "sdp" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d22a5ef407871893fd72b4562ee15e4742269b173959db4b8df6f538c414e13" -dependencies = [ - "rand 0.8.5", - "substring", - "thiserror", - "url", -] - [[package]] name = "sec1" version = "0.3.0" @@ -10090,9 +9381,9 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.24.2" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9512ffd81e3a3503ed401f79c33168b9148c75038956039166cd750eaa037c3" +checksum = "b7649a0b3ffb32636e60c7ce0d70511eda9c52c658cd0634e194d5a19943aeff" dependencies = [ "secp256k1-sys", ] @@ -10170,18 +9461,18 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2", "quote", @@ -10208,6 +9499,15 @@ 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" @@ -10384,7 +9684,7 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" [[package]] name = "slot-range-helper" -version = "0.9.33" +version = "0.9.31" dependencies = [ "enumn", "parity-scale-codec", @@ -10420,7 +9720,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "774d05a3edae07ce6d68ea6984f3c05e9bba8927e3dd591e3b479e5b03213d0d" dependencies = [ - "aes-gcm 0.9.4", + "aes-gcm", "blake2", "chacha20poly1305", "curve25519-dalek 4.0.0-pre.1", @@ -10451,7 +9751,6 @@ dependencies = [ "bytes", "flate2", "futures", - "http", "httparse", "log", "rand 0.8.5", @@ -10461,7 +9760,6 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "hash-db", "log", @@ -10479,7 +9777,6 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "blake2", "proc-macro-crate", @@ -10490,8 +9787,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "6.0.0" dependencies = [ "parity-scale-codec", "scale-info", @@ -10503,14 +9799,14 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "5.0.0" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", + "sp-debug-derive", "sp-std", "static_assertions", ] @@ -10518,7 +9814,6 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "scale-info", @@ -10531,7 +9826,6 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "parity-scale-codec", @@ -10540,27 +9834,9 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" -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#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "sp-api", @@ -10572,7 +9848,6 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "log", @@ -10590,10 +9865,10 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures", + "futures-timer", "log", "parity-scale-codec", "sp-core", @@ -10608,7 +9883,6 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "merlin", @@ -10631,11 +9905,12 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "scale-info", "serde", + "sp-arithmetic", + "sp-runtime", "sp-std", "sp-timestamp", ] @@ -10643,7 +9918,6 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "scale-info", @@ -10655,13 +9929,13 @@ dependencies = [ [[package]] name = "sp-core" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "6.0.0" dependencies = [ "array-bytes", "base58", "bitflags", "blake2", + "byteorder", "dyn-clonable", "ed25519-zebra", "futures", @@ -10672,10 +9946,11 @@ dependencies = [ "libsecp256k1", "log", "merlin", + "num-traits", "parity-scale-codec", "parking_lot 0.12.1", "primitive-types", - "rand 0.8.5", + "rand 0.7.3", "regex", "scale-info", "schnorrkel", @@ -10692,13 +9967,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#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "4.0.0" dependencies = [ "blake2", "byteorder", @@ -10712,7 +9987,6 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro2", "quote", @@ -10723,7 +9997,6 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10731,8 +10004,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "4.0.0" dependencies = [ "proc-macro2", "quote", @@ -10741,8 +10013,7 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "0.12.0" dependencies = [ "environmental", "parity-scale-codec", @@ -10753,7 +10024,6 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "finality-grandpa", "log", @@ -10771,7 +10041,6 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10784,16 +10053,15 @@ dependencies = [ [[package]] name = "sp-io" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "6.0.0" dependencies = [ "bytes", - "ed25519", - "ed25519-dalek", "futures", + "hash-db", "libsecp256k1", "log", "parity-scale-codec", + "parking_lot 0.12.1", "secp256k1", "sp-core", "sp-externalities", @@ -10803,14 +10071,14 @@ dependencies = [ "sp-std", "sp-tracing", "sp-trie", + "sp-wasm-interface", "tracing", "tracing-core", ] [[package]] name = "sp-keyring" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "6.0.0" dependencies = [ "lazy_static", "sp-core", @@ -10820,8 +10088,7 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "0.12.0" dependencies = [ "async-trait", "futures", @@ -10838,7 +10105,6 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "thiserror", "zstd", @@ -10847,9 +10113,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ - "ckb-merkle-mountain-range", "log", "parity-scale-codec", "scale-info", @@ -10865,7 +10129,6 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "scale-info", @@ -10879,7 +10142,6 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "sp-api", "sp-core", @@ -10888,8 +10150,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "4.0.0" dependencies = [ "backtrace", "lazy_static", @@ -10899,7 +10160,6 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "rustc-hash", "serde", @@ -10908,16 +10168,16 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "6.0.0" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", "parity-scale-codec", + "parity-util-mem", "paste", - "rand 0.8.5", + "rand 0.7.3", "scale-info", "serde", "sp-application-crypto", @@ -10930,8 +10190,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "6.0.0" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10948,8 +10207,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "5.0.0" dependencies = [ "Inflector", "proc-macro-crate", @@ -10959,9 +10217,21 @@ dependencies = [ ] [[package]] -name = "sp-session" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +name = "sp-sandbox" +version = "0.10.0-dev" +dependencies = [ + "log", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-std", + "sp-wasm-interface", + "wasmi", +] + +[[package]] +name = "sp-session" +version = "4.0.0-dev" dependencies = [ "parity-scale-codec", "scale-info", @@ -10975,25 +10245,23 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core", "sp-runtime", "sp-std", ] [[package]] name = "sp-state-machine" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "0.12.0" dependencies = [ "hash-db", "log", + "num-traits", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand 0.7.3", "smallvec", "sp-core", "sp-externalities", @@ -11002,17 +10270,16 @@ dependencies = [ "sp-trie", "thiserror", "tracing", + "trie-root", ] [[package]] name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "4.0.0" [[package]] name = "sp-storage" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "6.0.0" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11025,12 +10292,12 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "futures-timer", "log", "parity-scale-codec", + "sp-api", "sp-inherents", "sp-runtime", "sp-std", @@ -11039,8 +10306,7 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "5.0.0" dependencies = [ "parity-scale-codec", "sp-std", @@ -11052,7 +10318,6 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "sp-api", "sp-runtime", @@ -11061,7 +10326,6 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "log", @@ -11076,8 +10340,7 @@ dependencies = [ [[package]] name = "sp-trie" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "6.0.0" dependencies = [ "ahash", "hash-db", @@ -11100,7 +10363,6 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11117,7 +10379,6 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11127,8 +10388,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" +version = "6.0.0" dependencies = [ "impl-trait-for-tuples", "log", @@ -11141,8 +10401,8 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", @@ -11171,9 +10431,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.36.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d92659e7d18d82b803824a9ba5a6022cff101c3491d027c1c1d8d30e749284" +checksum = "37a9821878e1f13aba383aa40a86fb1b33c7265774ec91e32563cb1dd1577496" dependencies = [ "Inflector", "num-format", @@ -11192,13 +10452,12 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staking-miner" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_cmd", "clap", "exitcode", "frame-election-provider-support", - "frame-remote-externalities", "frame-support", "frame-system", "futures-util", @@ -11214,6 +10473,7 @@ dependencies = [ "polkadot-core-primitives", "polkadot-runtime", "polkadot-runtime-common", + "remote-externalities", "sc-transaction-pool-api", "serde", "serde_json", @@ -11331,25 +10591,6 @@ dependencies = [ "syn", ] -[[package]] -name = "stun" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" -dependencies = [ - "base64", - "crc", - "lazy_static", - "md-5", - "rand 0.8.5", - "ring", - "subtle", - "thiserror", - "tokio", - "url", - "webrtc-util", -] - [[package]] name = "sub-tokens" version = "0.1.0" @@ -11374,7 +10615,6 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "platforms", ] @@ -11382,15 +10622,16 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" 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", @@ -11401,8 +10642,8 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ + "futures-util", "hyper", "log", "prometheus", @@ -11413,7 +10654,6 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "async-trait", "jsonrpsee", @@ -11426,7 +10666,6 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "jsonrpsee", "log", @@ -11436,8 +10675,10 @@ dependencies = [ "scale-info", "serde", "sp-core", + "sp-io", "sp-runtime", "sp-state-machine", + "sp-std", "sp-trie", "trie-db", ] @@ -11445,7 +10686,6 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "array-bytes", "async-trait", @@ -11471,7 +10711,6 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11481,7 +10720,6 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11492,7 +10730,6 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "ansi_term", "build-helper", @@ -11506,15 +10743,6 @@ dependencies = [ "wasm-opt", ] -[[package]] -name = "substring" -version = "1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" -dependencies = [ - "autocfg", -] - [[package]] name = "subtle" version = "2.4.1" @@ -11539,7 +10767,7 @@ dependencies = [ "debugid", "memmap2", "stable_deref_trait", - "uuid 0.8.2", + "uuid", ] [[package]] @@ -11555,9 +10783,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.105" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" +checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" dependencies = [ "proc-macro2", "quote", @@ -11640,7 +10868,7 @@ checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" [[package]] name = "test-parachain-adder" -version = "0.9.33" +version = "0.9.31" dependencies = [ "dlmalloc", "parity-scale-codec", @@ -11653,7 +10881,7 @@ dependencies = [ [[package]] name = "test-parachain-adder-collator" -version = "0.9.33" +version = "0.9.31" dependencies = [ "clap", "futures", @@ -11679,14 +10907,14 @@ dependencies = [ [[package]] name = "test-parachain-halt" -version = "0.9.33" +version = "0.9.31" dependencies = [ "substrate-wasm-builder", ] [[package]] name = "test-parachain-undying" -version = "0.9.33" +version = "0.9.31" dependencies = [ "dlmalloc", "log", @@ -11700,7 +10928,7 @@ dependencies = [ [[package]] name = "test-parachain-undying-collator" -version = "0.9.33" +version = "0.9.31" dependencies = [ "clap", "futures", @@ -11726,7 +10954,7 @@ dependencies = [ [[package]] name = "test-parachains" -version = "0.9.33" +version = "0.9.31" dependencies = [ "parity-scale-codec", "sp-core", @@ -11737,15 +10965,13 @@ dependencies = [ [[package]] name = "test-runtime-constants" -version = "0.9.33" +version = "0.9.31" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core", "sp-runtime", - "sp-weights", ] [[package]] @@ -11848,46 +11074,19 @@ dependencies = [ "winapi", ] -[[package]] -name = "time" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" -dependencies = [ - "itoa", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" - -[[package]] -name = "time-macros" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" -dependencies = [ - "time-core", -] - [[package]] name = "tiny-bip39" -version = "1.0.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" dependencies = [ "anyhow", - "hmac 0.12.1", + "hmac 0.8.1", "once_cell", - "pbkdf2 0.11.0", - "rand 0.8.5", + "pbkdf2 0.4.0", + "rand 0.7.3", "rustc-hash", - "sha2 0.10.2", + "sha2 0.9.8", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -11903,16 +11102,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "tinytemplate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "tinyvec" version = "1.5.1" @@ -11930,22 +11119,22 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.24.1" +version = "1.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9f76183f91ecfb55e1d7d5602bd1d979e38a3a522fe900241cf195624d67ae" +checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439" dependencies = [ - "autocfg", "bytes", "libc", "memchr", "mio", "num_cpus", + "once_cell", "parking_lot 0.12.1", "pin-project-lite 0.2.7", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.42.0", + "winapi", ] [[package]] @@ -11975,9 +11164,9 @@ version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b" dependencies = [ - "rustls 0.20.7", + "rustls", "tokio", - "webpki 0.22.0", + "webpki", ] [[package]] @@ -11989,7 +11178,6 @@ dependencies = [ "futures-core", "pin-project-lite 0.2.7", "tokio", - "tokio-util 0.7.1", ] [[package]] @@ -12041,41 +11229,6 @@ 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" @@ -12089,7 +11242,6 @@ 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", @@ -12128,7 +11280,7 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.33" +version = "0.9.31" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -12138,7 +11290,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.33" +version = "0.9.31" dependencies = [ "assert_matches", "expander 0.0.6", @@ -12250,10 +11402,8 @@ dependencies = [ "lazy_static", "rand 0.8.5", "smallvec", - "socket2", "thiserror", "tinyvec", - "tokio", "tracing", "url", ] @@ -12273,7 +11423,6 @@ dependencies = [ "resolv-conf", "smallvec", "thiserror", - "tokio", "tracing", "trust-dns-proto", ] @@ -12287,26 +11436,21 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#b85246bf1156f9f58825f0be48e6086128cc0bbd" dependencies = [ "clap", - "frame-remote-externalities", "frame-try-runtime", - "hex", "log", "parity-scale-codec", + "remote-externalities", + "sc-chain-spec", "sc-cli", "sc-executor", "sc-service", "serde", - "serde_json", - "sp-api", "sp-core", - "sp-debug-derive", "sp-externalities", "sp-io", "sp-keystore", - "sp-rpc", "sp-runtime", "sp-state-machine", "sp-version", @@ -12317,9 +11461,9 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.75" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1212c215a87a183687a7cc7065901b1a98da6b37277d51a1b5faedbb4efd4f3" +checksum = "7fc92f558afb6d1d7c6f175eb8d615b8ef49c227543e68e19c123d4ee43d8a7d" dependencies = [ "dissimilar", "glob", @@ -12356,25 +11500,6 @@ dependencies = [ "utf-8", ] -[[package]] -name = "turn" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8" -dependencies = [ - "async-trait", - "base64", - "futures", - "log", - "md-5", - "rand 0.8.5", - "ring", - "stun", - "thiserror", - "tokio", - "webrtc-util", -] - [[package]] name = "twox-hash" version = "1.6.3" @@ -12411,6 +11536,15 @@ 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" @@ -12496,15 +11630,6 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -[[package]] -name = "uuid" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" -dependencies = [ - "getrandom 0.2.3", -] - [[package]] name = "valuable" version = "0.1.0" @@ -12552,15 +11677,6 @@ dependencies = [ "libc", ] -[[package]] -name = "waitgroup" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292" -dependencies = [ - "atomic-waker", -] - [[package]] name = "waker-fn" version = "1.1.0" @@ -12850,7 +11966,7 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.26.1", + "gimli", "log", "object 0.29.0", "target-lexicon", @@ -12867,7 +11983,7 @@ checksum = "5c587c62e91c5499df62012b87b88890d0eb470b2ffecc5964e9da967b70c77c" dependencies = [ "anyhow", "cranelift-entity", - "gimli 0.26.1", + "gimli", "indexmap", "log", "object 0.29.0", @@ -12884,12 +12000,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "047839b5dabeae5424a078c19b8cc897e5943a7fadc69e3d888b9c9a897666b3" dependencies = [ - "addr2line 0.17.0", + "addr2line", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli 0.26.1", + "gimli", "log", "object 0.29.0", "rustc-demangle", @@ -12961,16 +12077,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki" version = "0.22.0" @@ -12987,219 +12093,7 @@ version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "552ceb903e957524388c4d3475725ff2c8b7960922063af6ce53c9a43da07449" dependencies = [ - "webpki 0.22.0", -] - -[[package]] -name = "webrtc" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3bc9049bdb2cea52f5fd4f6f728184225bdb867ed0dc2410eab6df5bdd67bb" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "hex", - "interceptor", - "lazy_static", - "log", - "rand 0.8.5", - "rcgen 0.9.3", - "regex", - "ring", - "rtcp", - "rtp", - "rustls 0.19.1", - "sdp", - "serde", - "serde_json", - "sha2 0.10.2", - "stun", - "thiserror", - "time 0.3.17", - "tokio", - "turn", - "url", - "waitgroup", - "webrtc-data", - "webrtc-dtls", - "webrtc-ice", - "webrtc-mdns", - "webrtc-media", - "webrtc-sctp", - "webrtc-srtp", - "webrtc-util", -] - -[[package]] -name = "webrtc-data" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef36a4d12baa6e842582fe9ec16a57184ba35e1a09308307b67d43ec8883100" -dependencies = [ - "bytes", - "derive_builder", - "log", - "thiserror", - "tokio", - "webrtc-sctp", - "webrtc-util", -] - -[[package]] -name = "webrtc-dtls" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7021987ae0a2ed6c8cd33f68e98e49bb6e74ffe9543310267b48a1bbe3900e5f" -dependencies = [ - "aes 0.6.0", - "aes-gcm 0.8.0", - "async-trait", - "bincode", - "block-modes", - "byteorder", - "ccm", - "curve25519-dalek 3.2.0", - "der-parser 8.1.0", - "elliptic-curve", - "hkdf", - "hmac 0.10.1", - "log", - "oid-registry 0.6.1", - "p256", - "p384", - "rand 0.8.5", - "rand_core 0.6.3", - "rcgen 0.9.3", - "ring", - "rustls 0.19.1", - "sec1", - "serde", - "sha-1 0.9.8", - "sha2 0.9.8", - "signature", - "subtle", - "thiserror", - "tokio", - "webpki 0.21.4", - "webrtc-util", - "x25519-dalek 2.0.0-pre.1", - "x509-parser 0.13.2", -] - -[[package]] -name = "webrtc-ice" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494483fbb2f5492620871fdc78b084aed8807377f6e3fe88b2e49f0a9c9c41d7" -dependencies = [ - "arc-swap", - "async-trait", - "crc", - "log", - "rand 0.8.5", - "serde", - "serde_json", - "stun", - "thiserror", - "tokio", - "turn", - "url", - "uuid 1.2.2", - "waitgroup", - "webrtc-mdns", - "webrtc-util", -] - -[[package]] -name = "webrtc-mdns" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" -dependencies = [ - "log", - "socket2", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-media" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a3c157a040324e5049bcbd644ffc9079e6738fa2cfab2bcff64e5cc4c00d7" -dependencies = [ - "byteorder", - "bytes", - "derive_builder", - "displaydoc", - "rand 0.8.5", - "rtp", - "thiserror", - "webrtc-util", -] - -[[package]] -name = "webrtc-sctp" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d47adcd9427eb3ede33d5a7f3424038f63c965491beafcc20bc650a2f6679c0" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "crc", - "log", - "rand 0.8.5", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-srtp" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6183edc4c1c6c0175f8812eefdce84dfa0aea9c3ece71c2bf6ddd3c964de3da5" -dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "aes-gcm 0.9.4", - "async-trait", - "byteorder", - "bytes", - "ctr 0.8.0", - "hmac 0.11.0", - "log", - "rtcp", - "rtp", - "sha-1 0.9.8", - "subtle", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-util" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" -dependencies = [ - "async-trait", - "bitflags", - "bytes", - "cc", - "ipnet", - "lazy_static", - "libc", - "log", - "nix 0.24.1", - "rand 0.8.5", - "thiserror", - "tokio", - "winapi", + "webpki", ] [[package]] @@ -13213,13 +12107,13 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "0.9.33" +version = "0.9.31" dependencies = [ + "beefy-primitives", "bitvec", "frame-benchmarking", "frame-election-provider-support", "frame-executive", - "frame-remote-externalities", "frame-support", "frame-system", "frame-system-benchmarking", @@ -13272,6 +12166,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", + "remote-externalities", "rustc-hex", "scale-info", "serde", @@ -13280,7 +12175,6 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -13309,15 +12203,13 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "0.9.33" +version = "0.9.31" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core", "sp-runtime", - "sp-weights", ] [[package]] @@ -13407,27 +12299,6 @@ 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" @@ -13446,12 +12317,6 @@ 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" @@ -13470,12 +12335,6 @@ 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" @@ -13494,12 +12353,6 @@ 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" @@ -13518,18 +12371,6 @@ 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" @@ -13548,12 +12389,6 @@ 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" @@ -13592,57 +12427,9 @@ dependencies = [ "zeroize", ] -[[package]] -name = "x25519-dalek" -version = "2.0.0-pre.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5da623d8af10a62342bcbbb230e33e58a63255a58012f8653c578e54bab48df" -dependencies = [ - "curve25519-dalek 3.2.0", - "rand_core 0.6.3", - "zeroize", -] - -[[package]] -name = "x509-parser" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb9bace5b5589ffead1afb76e43e34cff39cd0f3ce7e170ae0c29e53b88eb1c" -dependencies = [ - "asn1-rs 0.3.1", - "base64", - "data-encoding", - "der-parser 7.0.0", - "lazy_static", - "nom", - "oid-registry 0.4.0", - "ring", - "rusticata-macros", - "thiserror", - "time 0.3.17", -] - -[[package]] -name = "x509-parser" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" -dependencies = [ - "asn1-rs 0.5.1", - "base64", - "data-encoding", - "der-parser 8.1.0", - "lazy_static", - "nom", - "oid-registry 0.6.1", - "rusticata-macros", - "thiserror", - "time 0.3.17", -] - [[package]] name = "xcm" -version = "0.9.33" +version = "0.9.31" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -13655,7 +12442,7 @@ dependencies = [ [[package]] name = "xcm-builder" -version = "0.9.33" +version = "0.9.31" dependencies = [ "frame-support", "frame-system", @@ -13679,7 +12466,7 @@ dependencies = [ [[package]] name = "xcm-executor" -version = "0.9.33" +version = "0.9.31" dependencies = [ "frame-benchmarking", "frame-support", @@ -13696,7 +12483,7 @@ dependencies = [ [[package]] name = "xcm-executor-integration-tests" -version = "0.9.33" +version = "0.9.31" dependencies = [ "frame-support", "frame-system", @@ -13716,7 +12503,7 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "0.9.33" +version = "0.9.31" dependencies = [ "Inflector", "proc-macro2", @@ -13726,7 +12513,7 @@ dependencies = [ [[package]] name = "xcm-simulator" -version = "0.9.33" +version = "0.9.31" dependencies = [ "frame-support", "parity-scale-codec", @@ -13742,7 +12529,7 @@ dependencies = [ [[package]] name = "xcm-simulator-example" -version = "0.9.33" +version = "0.9.31" dependencies = [ "frame-support", "frame-system", @@ -13765,7 +12552,7 @@ dependencies = [ [[package]] name = "xcm-simulator-fuzzer" -version = "0.9.33" +version = "0.9.31" dependencies = [ "frame-support", "frame-system", @@ -13801,15 +12588,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "yasna" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aed2e7a52e3744ab4d0c05c20aa065258e84c49fd4226f5191b2ed29712710b4" -dependencies = [ - "time 0.3.17", -] - [[package]] name = "zeroize" version = "1.5.7" @@ -13833,7 +12611,7 @@ dependencies = [ [[package]] name = "zombienet-backchannel" -version = "0.9.33" +version = "0.9.31" dependencies = [ "futures-util", "lazy_static", @@ -13876,3 +12654,251 @@ dependencies = [ "cc", "libc", ] + +[[patch.unused]] +name = "chain-spec-builder" +version = "2.0.0" + +[[patch.unused]] +name = "frame-election-solution-type-fuzzer" +version = "2.0.0-alpha.5" + +[[patch.unused]] +name = "frame-support-test-compile-pass" +version = "4.0.0-dev" + +[[patch.unused]] +name = "kitchensink-runtime" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-bench" +version = "0.9.0-dev" + +[[patch.unused]] +name = "node-cli" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-executor" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-inspect" +version = "0.9.0-dev" + +[[patch.unused]] +name = "node-primitives" +version = "2.0.0" + +[[patch.unused]] +name = "node-rpc" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-runtime-generate-bags" +version = "3.0.0" + +[[patch.unused]] +name = "node-template" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-template-runtime" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-testing" +version = "3.0.0-dev" + +[[patch.unused]] +name = "pallet-alliance" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-asset-tx-payment" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-atomic-swap" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-aura" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-bags-list-fuzzer" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts-primitives" +version = "6.0.0" + +[[patch.unused]] +name = "pallet-contracts-proc-macro" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-basic" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-offchain-worker" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-lottery" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-nicks" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-node-authorization" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-nomination-pools-fuzzer" +version = "2.0.0" + +[[patch.unused]] +name = "pallet-nomination-pools-test-staking" +version = "1.0.0" + +[[patch.unused]] +name = "pallet-randomness-collective-flip" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-remark" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-root-offences" +version = "1.0.0-dev" + +[[patch.unused]] +name = "pallet-root-testing" +version = "1.0.0-dev" + +[[patch.unused]] +name = "pallet-scored-pool" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-template" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-transaction-storage" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-uniques" +version = "4.0.0-dev" + +[[patch.unused]] +name = "sc-consensus-aura" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-consensus-manual-seal" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-consensus-pow" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-consensus-uncles" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-network-test" +version = "0.8.0" + +[[patch.unused]] +name = "sc-runtime-test" +version = "2.0.0" + +[[patch.unused]] +name = "sc-service-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-api-test" +version = "2.0.1" + +[[patch.unused]] +name = "sp-application-crypto-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-arithmetic-fuzzer" +version = "2.0.0" + +[[patch.unused]] +name = "sp-consensus-aura" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-consensus-pow" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-npos-elections-fuzzer" +version = "2.0.0-alpha.5" + +[[patch.unused]] +name = "sp-runtime-interface-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-runtime-interface-test-wasm" +version = "2.0.0" + +[[patch.unused]] +name = "sp-runtime-interface-test-wasm-deprecated" +version = "2.0.0" + +[[patch.unused]] +name = "sp-serializer" +version = "4.0.0-dev" + +[[patch.unused]] +name = "sp-test-primitives" +version = "2.0.0" + +[[patch.unused]] +name = "subkey" +version = "2.0.2" + +[[patch.unused]] +name = "substrate-frame-cli" +version = "4.0.0-dev" + +[[patch.unused]] +name = "substrate-frame-rpc-support" +version = "3.0.0" + +[[patch.unused]] +name = "substrate-test-runtime" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-runtime-client" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-runtime-transaction-pool" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-utils-test-crate" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 4621c91d5511..4b0e2047bf64 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,31 +6,25 @@ 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" -rust-version = "1.64.0" # workspace properties -readme = "README.md" -authors.workspace = true -edition.workspace = true -version.workspace = true - -[workspace.package] +version = "0.9.31" authors = ["Parity Technologies "] edition = "2021" -repository = "https://github.com/paritytech/polkadot.git" -version = "0.9.33" +rust-version = "1.57.0" # custom profiles +readme = "README.md" [dependencies] polkadot-cli = { path = "cli", features = [ "kusama-native", "westend-native", "rococo-native" ] } color-eyre = { version = "0.6.1", default-features = false } -tikv-jemallocator = "0.5.0" +parity-util-mem = { version = "0.12.0", default-features = false, features = ["jemalloc-global"] } [dev-dependencies] assert_cmd = "2.0.4" nix = "0.24.1" tempfile = "3.2.0" -tokio = "1.24.1" +tokio = "1.19.2" 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 319e1714fd7b..55b66f6ea619 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 --workspace --release +cargo test --all --release ``` You can start a development chain with: diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 0d1c55187400..c1fe95795328 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" -version.workspace = true -authors.workspace = true -edition.workspace = true +edition = "2021" [package.metadata.wasm-pack.profile.release] # `wasm-opt` has some problems on Linux, see @@ -26,7 +26,6 @@ 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 } @@ -35,13 +34,17 @@ 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" } -sc-executor = { 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 } [build-dependencies] substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] -default = ["db", "cli", "hostperfcheck", "full-node", "polkadot-native"] +default = ["wasmtime", "db", "cli", "hostperfcheck", "full-node", "trie-memory-tracker", "polkadot-native"] +wasmtime = ["sc-cli/wasmtime"] db = ["service/db"] cli = [ "clap", @@ -58,6 +61,7 @@ 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 d7a66bb9d711..5ce7c05162c1 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(client.info().genesis_hash).unwrap().unwrap(); + let header = client.header(BlockId::Number(0_u32.into())).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 runner.sync_run(|config| { + return Ok(runner.sync_run(|config| { cmd.run::(config) .map_err(|e| Error::SubstrateCli(e)) - }) + })?) } #[cfg(feature = "westend-native")] if chain_spec.is_westend() { - return runner.sync_run(|config| { + return Ok(runner.sync_run(|config| { cmd.run::(config) .map_err(|e| Error::SubstrateCli(e)) - }) + })?) } // else we assume it is polkadot. #[cfg(feature = "polkadot-native")] { - return runner.sync_run(|config| { + return Ok(runner.sync_run(|config| { cmd.run::(config) .map_err(|e| Error::SubstrateCli(e)) - }) + })?) } #[cfg(not(feature = "polkadot-native"))] @@ -638,14 +638,9 @@ 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); @@ -656,9 +651,10 @@ pub fn run() -> Result<()> { #[cfg(feature = "kusama-native")] if chain_spec.is_kusama() { - return runner.async_run(|_| { + return runner.async_run(|config| { Ok(( - cmd.run::>( + cmd.run::( + config, ) .map_err(Error::SubstrateCli), task_manager, @@ -668,9 +664,10 @@ pub fn run() -> Result<()> { #[cfg(feature = "westend-native")] if chain_spec.is_westend() { - return runner.async_run(|_| { + return runner.async_run(|config| { Ok(( - cmd.run::>( + cmd.run::( + config, ) .map_err(Error::SubstrateCli), task_manager, @@ -680,9 +677,10 @@ pub fn run() -> Result<()> { // else we assume it is polkadot. #[cfg(feature = "polkadot-native")] { - return runner.async_run(|_| { + return runner.async_run(|config| { Ok(( - cmd.run::>( + cmd.run::( + config, ) .map_err(Error::SubstrateCli), task_manager, diff --git a/core-primitives/Cargo.toml b/core-primitives/Cargo.toml index bad5533f9d1d..2c6fe070522d 100644 --- a/core-primitives/Cargo.toml +++ b/core-primitives/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-core-primitives" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -10,6 +10,7 @@ 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" ] @@ -20,4 +21,5 @@ 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 ca4d2372db38..bd0256dc7c9e 100644 --- a/core-primitives/src/lib.rs +++ b/core-primitives/src/lib.rs @@ -21,6 +21,8 @@ //! 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, @@ -64,6 +66,7 @@ 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")] @@ -124,6 +127,7 @@ 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, @@ -133,6 +137,7 @@ 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 @@ -144,6 +149,7 @@ 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 6d59b6a4b01d..0a6c4002a1c5 100644 --- a/erasure-coding/Cargo.toml +++ b/erasure-coding/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-erasure-coding" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] polkadot-primitives = { path = "../primitives" } diff --git a/erasure-coding/fuzzer/Cargo.toml b/erasure-coding/fuzzer/Cargo.toml index bd8632a185f5..6c8ad88e3955 100644 --- a/erasure-coding/fuzzer/Cargo.toml +++ b/erasure-coding/fuzzer/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "erasure_coding_fuzzer" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] polkadot-erasure-coding = { path = ".." } diff --git a/erasure-coding/src/lib.rs b/erasure-coding/src/lib.rs index 6abd7dce4dd3..5e85809f4117 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 + self.root.clone() } } diff --git a/node/client/Cargo.toml b/node/client/Cargo.toml index b07447ef3396..4889ecb6ecef 100644 --- a/node/client/Cargo.toml +++ b/node/client/Cargo.toml @@ -1,12 +1,10 @@ [package] name = "polkadot-client" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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" } @@ -37,7 +35,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", package = "sp-beefy" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master" } # Polkadot Runtimes polkadot-runtime = { path = "../../runtime/polkadot", optional = true } diff --git a/node/client/src/benchmarking.rs b/node/client/src/benchmarking.rs index 17ef63f4ba6e..7990bc88d218 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, + genesis.clone(), genesis, (), (), @@ -220,7 +220,7 @@ impl BenchmarkCallSigner (), runtime::VERSION.spec_version, runtime::VERSION.transaction_version, - genesis, + genesis.clone(), genesis, (), (), @@ -274,7 +274,7 @@ impl BenchmarkCallSigner (), runtime::VERSION.spec_version, runtime::VERSION.transaction_version, - genesis, + genesis.clone(), genesis, (), (), @@ -328,7 +328,7 @@ impl BenchmarkCallSigner (), runtime::VERSION.spec_version, runtime::VERSION.transaction_version, - genesis, + genesis.clone(), 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()); - futures::executor::block_on(timestamp.provide_inherent_data(&mut inherent_data))?; + timestamp.provide_inherent_data(&mut inherent_data)?; let para_data = polkadot_primitives::v2::InherentData { bitfields: Vec::new(), @@ -368,7 +368,8 @@ pub fn benchmark_inherent_data( parent_header: header, }; - inherent_data.put_data(polkadot_primitives::v2::PARACHAINS_INHERENT_IDENTIFIER, ¶_data)?; + polkadot_node_core_parachains_inherent::ParachainsInherentDataProvider::from_data(para_data) + .provide_inherent_data(&mut inherent_data)?; Ok(inherent_data) } diff --git a/node/client/src/lib.rs b/node/client/src/lib.rs index 648d1d63155d..d2c119ba04a8 100644 --- a/node/client/src/lib.rs +++ b/node/client/src/lib.rs @@ -29,7 +29,7 @@ use sp_api::{CallApiAt, Encode, NumberFor, ProvideRuntimeApi}; use sp_blockchain::{HeaderBackend, HeaderMetadata}; use sp_consensus::BlockStatus; use sp_runtime::{ - generic::SignedBlock, + generic::{BlockId, SignedBlock}, traits::{BlakeTwo256, Block as BlockT}, Justifications, }; @@ -338,25 +338,22 @@ impl sc_client_api::BlockBackend for Client { } } - fn block( - &self, - hash: ::Hash, - ) -> sp_blockchain::Result>> { + fn block(&self, id: &BlockId) -> sp_blockchain::Result>> { with_client! { self, client, { - client.block(hash) + client.block(id) } } } - fn block_status(&self, hash: ::Hash) -> sp_blockchain::Result { + fn block_status(&self, id: &BlockId) -> sp_blockchain::Result { with_client! { self, client, { - client.block_status(hash) + client.block_status(id) } } } @@ -563,12 +560,12 @@ impl sc_client_api::StorageProvider for Client { } impl sp_blockchain::HeaderBackend for Client { - fn header(&self, hash: Hash) -> sp_blockchain::Result> { + fn header(&self, id: BlockId) -> sp_blockchain::Result> { with_client! { self, client, { - client.header(hash) + client.header(&id) } } } @@ -583,12 +580,12 @@ impl sp_blockchain::HeaderBackend for Client { } } - fn status(&self, hash: Hash) -> sp_blockchain::Result { + fn status(&self, id: BlockId) -> sp_blockchain::Result { with_client! { self, client, { - client.status(hash) + client.status(id) } } } diff --git a/node/collation-generation/Cargo.toml b/node/collation-generation/Cargo.toml index 93b06f315b5f..46eaf83b4498 100644 --- a/node/collation-generation/Cargo.toml +++ b/node/collation-generation/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-collation-generation" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/node/core/approval-voting/Cargo.toml b/node/core/approval-voting/Cargo.toml index b73c4b97eb1b..bf580c3bf348 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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.13.0" +kvdb = "0.12.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.13.0" +kvdb-memorydb = "0.12.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 82a9a8c89bf5..b513c18895b3 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( - tranches: &[TrancheEntry], +fn filled_tranche_iterator<'a>( + tranches: &'a [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 520a1a745056..fea71d79c098 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, - 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, + 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(), } } } diff --git a/node/core/approval-voting/src/import.rs b/node/core/approval-voting/src/import.rs index 2331b50b6bb1..20629dd022d4 100644 --- a/node/core/approval-voting/src/import.rs +++ b/node/core/approval-voting/src/import.rs @@ -415,8 +415,11 @@ 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, tx)) - .await; + ctx.send_message(ChainApiMessage::FinalizedBlockHash( + block_header.number.clone(), + 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 14fc87761c42..bc63549795c2 100644 --- a/node/core/approval-voting/src/lib.rs +++ b/node/core/approval-voting/src/lib.rs @@ -621,7 +621,10 @@ impl CurrentlyCheckingSet { .candidate_hash_map .remove(&approval_state.candidate_hash) .unwrap_or_default(); - approvals_cache.put(approval_state.candidate_hash, approval_state.approval_outcome); + approvals_cache.put( + approval_state.candidate_hash.clone(), + approval_state.approval_outcome.clone(), + ); return (out, approval_state) } } @@ -765,7 +768,7 @@ async fn run( where B: Backend, { - if let Err(err) = db_sanity_check(subsystem.db.clone(), subsystem.db_config) { + if let Err(err) = db_sanity_check(subsystem.db.clone(), subsystem.db_config.clone()) { gum::warn!(target: LOG_TARGET, ?err, "Could not run approval vote DB sanity check"); } @@ -1275,7 +1278,7 @@ async fn get_approval_signatures_for_candidate( Some(e) => e, }; - let relay_hashes = entry.block_assignments.keys(); + let relay_hashes = entry.block_assignments.iter().map(|(relay_hash, _)| relay_hash); let mut candidate_indices = HashSet::new(); // Retrieve `CoreIndices`/`CandidateIndices` as required by approval-distribution: @@ -1327,11 +1330,6 @@ 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)) } @@ -2504,7 +2502,7 @@ async fn issue_approval( }; let candidate_hash = match block_entry.candidate(candidate_index as usize) { - Some((_, h)) => *h, + Some((_, h)) => h.clone(), None => { gum::warn!( target: LOG_TARGET, diff --git a/node/core/av-store/Cargo.toml b/node/core/av-store/Cargo.toml index 73cdb72d8012..a4a39df77668 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] futures = "0.3.21" futures-timer = "3.0.2" -kvdb = "0.13.0" +kvdb = "0.12.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.13.0" +kvdb-memorydb = "0.12.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 2bcd337b7491..4fbbf3740ab0 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); @@ -570,14 +570,6 @@ async fn run_iteration( FromOrchestra::Signal(OverseerSignal::BlockFinalized(hash, number)) => { let _timer = subsystem.metrics.time_process_block_finalized(); - if !subsystem.known_blocks.is_known(&hash) { - // If we haven't processed this block yet, - // make sure we write the metadata about the - // candidates backed in this finalized block. - // Otherwise, we won't be able to store our chunk - // for these candidates. - process_block_activated(ctx, subsystem, hash).await?; - } subsystem.finalized_number = Some(number); subsystem.known_blocks.prune_finalized(number); process_block_finalized( diff --git a/node/core/av-store/src/metrics.rs b/node/core/av-store/src/metrics.rs index fedeb2b7d0e5..c50932c6173e 100644 --- a/node/core/av-store/src/metrics.rs +++ b/node/core/av-store/src/metrics.rs @@ -140,16 +140,10 @@ 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.`", - ) - .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, - ]), - )?, + prometheus::Histogram::with_opts(prometheus::HistogramOpts::new( + "polkadot_parachain_av_store_get_chunk", + "Time spent fetching requested chunks.`", + ))?, registry, )?, }; diff --git a/node/core/av-store/src/tests.rs b/node/core/av-store/src/tests.rs index 7d5d4a5025e5..0a855bb88057 100644 --- a/node/core/av-store/src/tests.rs +++ b/node/core/av-store/src/tests.rs @@ -732,49 +732,8 @@ fn we_dont_miss_anything_if_import_notifications_are_missed() { let test_state = TestState::default(); test_harness(test_state.clone(), store.clone(), |mut virtual_overseer| async move { - let block_hash = Hash::repeat_byte(1); - overseer_signal(&mut virtual_overseer, OverseerSignal::BlockFinalized(block_hash, 1)).await; - - let header = Header { - parent_hash: Hash::repeat_byte(0), - number: 1, - state_root: Hash::zero(), - extrinsics_root: Hash::zero(), - digest: Default::default(), - }; - - assert_matches!( - overseer_recv(&mut virtual_overseer).await, - AllMessages::ChainApi(ChainApiMessage::BlockHeader( - relay_parent, - tx, - )) => { - assert_eq!(relay_parent, block_hash); - tx.send(Ok(Some(header))).unwrap(); - } - ); - - assert_matches!( - overseer_recv(&mut virtual_overseer).await, - AllMessages::RuntimeApi(RuntimeApiMessage::Request( - relay_parent, - RuntimeApiRequest::CandidateEvents(tx), - )) => { - assert_eq!(relay_parent, block_hash); - tx.send(Ok(Vec::new())).unwrap(); - } - ); - - assert_matches!( - overseer_recv(&mut virtual_overseer).await, - AllMessages::RuntimeApi(RuntimeApiMessage::Request( - relay_parent, - RuntimeApiRequest::Validators(tx), - )) => { - assert_eq!(relay_parent, Hash::zero()); - tx.send(Ok(Vec::new())).unwrap(); - } - ); + overseer_signal(&mut virtual_overseer, OverseerSignal::BlockFinalized(Hash::zero(), 1)) + .await; let header = Header { parent_hash: Hash::repeat_byte(3), diff --git a/node/core/backing/Cargo.toml b/node/core/backing/Cargo.toml index 7428372eec62..bf52d54167fc 100644 --- a/node/core/backing/Cargo.toml +++ b/node/core/backing/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-core-backing" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/node/core/backing/src/lib.rs b/node/core/backing/src/lib.rs index 2f8aa4490f27..a9ae518e3103 100644 --- a/node/core/backing/src/lib.rs +++ b/node/core/backing/src/lib.rs @@ -482,7 +482,9 @@ impl TableContextTrait for TableContext { } fn is_member_of(&self, authority: &ValidatorIndex, group: &ParaId) -> bool { - self.groups.get(group).map_or(false, |g| g.iter().any(|a| a == authority)) + self.groups + .get(group) + .map_or(false, |g| g.iter().position(|a| a == authority).is_some()) } fn requisite_votes(&self, group: &ParaId) -> usize { @@ -497,7 +499,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), + Statement::Valid(h) => TableStatement::Valid(h.clone()), }; TableSignedStatement { diff --git a/node/core/bitfield-signing/Cargo.toml b/node/core/bitfield-signing/Cargo.toml index b94cc6708c74..54aa27766b7b 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/node/core/bitfield-signing/src/metrics.rs b/node/core/bitfield-signing/src/metrics.rs index 571a0c335bd7..ab4e73be0eeb 100644 --- a/node/core/bitfield-signing/src/metrics.rs +++ b/node/core/bitfield-signing/src/metrics.rs @@ -50,16 +50,10 @@ 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`", - ) - .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, - ]), - )?, + prometheus::Histogram::with_opts(prometheus::HistogramOpts::new( + "polkadot_parachain_bitfield_signing_run", + "Time spent within `bitfield_signing::run`", + ))?, registry, )?, }; diff --git a/node/core/candidate-validation/Cargo.toml b/node/core/candidate-validation/Cargo.toml index 28731e1f25b8..105d7c1a21dc 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] async-trait = "0.1.57" @@ -16,8 +16,8 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ polkadot-primitives = { path = "../../../primitives" } polkadot-parachain = { path = "../../../parachain" } polkadot-node-primitives = { path = "../../primitives" } -polkadot-node-subsystem = { path = "../../subsystem" } -polkadot-node-metrics = { path = "../../metrics" } +polkadot-node-subsystem = {path = "../../subsystem" } +polkadot-node-subsystem-util = { path = "../../subsystem-util" } [target.'cfg(not(any(target_os = "android", target_os = "unknown")))'.dependencies] polkadot-node-core-pvf = { path = "../pvf" } @@ -27,6 +27,5 @@ sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master futures = { version = "0.3.21", features = ["thread-pool"] } assert_matches = "1.4.0" polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } -polkadot-node-subsystem-util = { path = "../../subsystem-util" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } diff --git a/node/core/candidate-validation/src/lib.rs b/node/core/candidate-validation/src/lib.rs index 743a053f2ec7..7d9db4f3d794 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) => - if prepare_err.is_deterministic() { - PreCheckOutcome::Invalid - } else { - PreCheckOutcome::Failed - }, + Err(prepare_err) => match prepare_err { + PrepareError::Prevalidation(_) | + PrepareError::Preparation(_) | + PrepareError::Panic(_) => PreCheckOutcome::Invalid, + PrepareError::TimedOut | PrepareError::DidNotMakeIt => 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; + let para_id = candidate_receipt.descriptor.para_id.clone(); 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)"); @@ -604,7 +604,6 @@ async fn validate_candidate_exhaustive( #[async_trait] trait ValidationBackend { - /// Tries executing a PVF a single time (no retries). async fn validate_candidate( &mut self, pvf: Pvf, @@ -612,8 +611,6 @@ trait ValidationBackend { encoded_params: Vec, ) -> Result; - /// Tries executing a PVF. Will retry once if an error is encountered that may have been - /// transient. async fn validate_candidate_with_retry( &mut self, raw_validation_code: Vec, @@ -623,7 +620,7 @@ trait ValidationBackend { // Construct the PVF a single time, since it is an expensive operation. Cloning it is cheap. let pvf = Pvf::from_code(raw_validation_code); - let mut validation_result = + let validation_result = self.validate_candidate(pvf.clone(), timeout, params.encode()).await; // If we get an AmbiguousWorkerDeath error, retry once after a brief delay, on the @@ -633,22 +630,15 @@ trait ValidationBackend { { // Wait a brief delay before retrying. futures_timer::Delay::new(PVF_EXECUTION_RETRY_DELAY).await; - - gum::debug!( - target: LOG_TARGET, - ?pvf, - "Re-trying failed candidate validation due to AmbiguousWorkerDeath." - ); - // Encode the params again when re-trying. We expect the retry case to be relatively // rare, and we want to avoid unconditionally cloning data. - validation_result = self.validate_candidate(pvf, timeout, params.encode()).await; + self.validate_candidate(pvf, timeout, params.encode()).await + } else { + validation_result } - - validation_result } - async fn precheck_pvf(&mut self, pvf: Pvf) -> Result; + async fn precheck_pvf(&mut self, pvf: Pvf) -> Result<(), PrepareError>; } #[async_trait] @@ -674,14 +664,13 @@ impl ValidationBackend for ValidationHost { .map_err(|_| ValidationError::InternalError("validation was cancelled".into()))? } - async fn precheck_pvf(&mut self, pvf: Pvf) -> Result { + async fn precheck_pvf(&mut self, pvf: Pvf) -> Result<(), PrepareError> { let (tx, rx) = oneshot::channel(); if let Err(_) = self.precheck_pvf(pvf, tx).await { - // Return an IO error if there was an error communicating with the host. - return Err(PrepareError::IoErr) + return Err(PrepareError::DidNotMakeIt) } - let precheck_result = rx.await.or(Err(PrepareError::IoErr))?; + let precheck_result = rx.await.or(Err(PrepareError::DidNotMakeIt))?; precheck_result } diff --git a/node/core/candidate-validation/src/metrics.rs b/node/core/candidate-validation/src/metrics.rs index 344d95029256..64112c6a387b 100644 --- a/node/core/candidate-validation/src/metrics.rs +++ b/node/core/candidate-validation/src/metrics.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see . use super::{ValidationFailed, ValidationResult}; -use polkadot_node_metrics::metrics::{self, prometheus}; +use polkadot_node_subsystem_util::metrics::{self, prometheus}; #[derive(Clone)] pub(crate) struct MetricsInner { diff --git a/node/core/candidate-validation/src/tests.rs b/node/core/candidate-validation/src/tests.rs index c6003c734973..cf467cd5c057 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 { + async fn precheck_pvf(&mut self, _pvf: Pvf) -> Result<(), PrepareError> { unreachable!() } } @@ -894,11 +894,11 @@ fn pov_decompression_failure_is_invalid() { } struct MockPreCheckBackend { - result: Result, + result: Result<(), PrepareError>, } impl MockPreCheckBackend { - fn with_hardcoded_result(result: Result) -> Self { + fn with_hardcoded_result(result: Result<(), PrepareError>) -> Self { Self { result } } } @@ -914,7 +914,7 @@ impl ValidationBackend for MockPreCheckBackend { unreachable!() } - async fn precheck_pvf(&mut self, _pvf: Pvf) -> Result { + async fn precheck_pvf(&mut self, _pvf: Pvf) -> Result<(), PrepareError> { self.result.clone() } } @@ -931,7 +931,7 @@ fn precheck_works() { let (check_fut, check_result) = precheck_pvf( ctx.sender(), - MockPreCheckBackend::with_hardcoded_result(Ok(Duration::default())), + MockPreCheckBackend::with_hardcoded_result(Ok(())), 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(Duration::default())), + MockPreCheckBackend::with_hardcoded_result(Ok(())), 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::IoErr), PreCheckOutcome::Failed); + inner(Err(PrepareError::DidNotMakeIt), PreCheckOutcome::Failed); } diff --git a/node/core/chain-api/Cargo.toml b/node/core/chain-api/Cargo.toml index ec4d0bc9a3d6..19cff83c9fdf 100644 --- a/node/core/chain-api/Cargo.toml +++ b/node/core/chain-api/Cargo.toml @@ -1,16 +1,16 @@ [package] name = "polkadot-node-core-chain-api" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-primitives = { path = "../../../primitives" } -polkadot-node-metrics = { path = "../../metrics" } polkadot-node-subsystem = {path = "../../subsystem" } +polkadot-node-subsystem-util = { path = "../../subsystem-util" } sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/core/chain-api/src/lib.rs b/node/core/chain-api/src/lib.rs index b218c00c57e5..7205527982c1 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; +use polkadot_primitives::v2::{Block, BlockId}; mod metrics; use self::metrics::Metrics; @@ -99,7 +99,10 @@ where }, ChainApiMessage::BlockHeader(hash, response_channel) => { let _timer = subsystem.metrics.time_block_header(); - let result = subsystem.client.header(hash).map_err(|e| e.to_string().into()); + let result = subsystem + .client + .header(BlockId::Hash(hash)) + .map_err(|e| e.to_string().into()); subsystem.metrics.on_request(result.is_ok()); let _ = response_channel.send(result); }, @@ -131,7 +134,7 @@ where let mut hash = hash; let next_parent = core::iter::from_fn(|| { - let maybe_header = subsystem.client.header(hash); + let maybe_header = subsystem.client.header(BlockId::Hash(hash)); match maybe_header { // propagate the error Err(e) => { diff --git a/node/core/chain-api/src/metrics.rs b/node/core/chain-api/src/metrics.rs index 34c258b84563..23f455729e16 100644 --- a/node/core/chain-api/src/metrics.rs +++ b/node/core/chain-api/src/metrics.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use polkadot_node_metrics::metrics::{self, prometheus}; +use polkadot_node_subsystem_util::metrics::{self, prometheus}; #[derive(Clone)] pub(crate) struct MetricsInner { diff --git a/node/core/chain-api/src/tests.rs b/node/core/chain-api/src/tests.rs index 654458757e70..aa24b3621200 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::{BlockNumber, Hash, Header}; +use polkadot_primitives::v2::{BlockId, BlockNumber, Hash, Header}; use sp_blockchain::Info as BlockInfo; use sp_core::testing::TaskExecutor; @@ -117,14 +117,16 @@ impl HeaderBackend for TestClient { fn hash(&self, number: BlockNumber) -> sp_blockchain::Result> { Ok(self.finalized_blocks.get(&number).copied()) } - 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 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 status(&self, _hash: Hash) -> sp_blockchain::Result { + fn status(&self, _id: BlockId) -> sp_blockchain::Result { unimplemented!() } } @@ -201,8 +203,10 @@ 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(TWO).unwrap()), (NOT_HERE, client.header(NOT_HERE).unwrap())]; + let test_cases = [ + (TWO, client.header(BlockId::Hash(TWO)).unwrap()), + (NOT_HERE, client.header(BlockId::Hash(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 8d4145461b94..1e505a4df98d 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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.13.0" +kvdb = "0.12.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.13.0" +kvdb-memorydb = "0.12.0" diff --git a/node/core/chain-selection/src/lib.rs b/node/core/chain-selection/src/lib.rs index 786454fb9891..e5ffe6811d6e 100644 --- a/node/core/chain-selection/src/lib.rs +++ b/node/core/chain-selection/src/lib.rs @@ -381,7 +381,6 @@ 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 2ecc4d5e331f..19eff42d4ad3 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } parity-scale-codec = "3.1.5" -kvdb = "0.13.0" +kvdb = "0.12.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.13.0" +kvdb-memorydb = "0.12.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 ab571108af37..bb1456a59745 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, - LOG_TARGET, + DISPUTE_WINDOW, LOG_TARGET, }; const RECENT_DISPUTES_KEY: &[u8; 15] = b"recent-disputes"; @@ -318,24 +318,25 @@ 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_earliest_session( +pub(crate) fn note_current_session( overlay_db: &mut OverlayedBackend<'_, impl Backend>, - new_earliest_session: SessionIndex, + current_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_session); + overlay_db.write_earliest_session(new_earliest); }, - Some(prev_earliest) if new_earliest_session > prev_earliest => { + Some(prev_earliest) if new_earliest > prev_earliest => { // Prune all data in the outdated sessions. - overlay_db.write_earliest_session(new_earliest_session); + overlay_db.write_earliest_session(new_earliest); // Clear recent disputes metadata. { let mut recent_disputes = overlay_db.load_recent_disputes()?.unwrap_or_default(); - let lower_bound = (new_earliest_session, CandidateHash(Hash::repeat_byte(0x00))); + let lower_bound = (new_earliest, 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. @@ -372,7 +373,6 @@ 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_earliest_session(&mut overlay_db, earliest_session).unwrap(); + note_current_session(&mut overlay_db, current_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_earliest_session(&mut overlay_db, earliest_session).unwrap(); + note_current_session(&mut overlay_db, current_session).unwrap(); let write_ops = overlay_db.into_write_ops(); backend.write(write_ops).unwrap(); @@ -599,7 +599,7 @@ mod tests { } #[test] - fn note_earliest_session_prunes_old() { + fn note_current_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_earliest_session(&mut overlay_db, new_earliest_session).unwrap(); + note_current_session(&mut overlay_db, current_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 84adae167c7a..c0f0d3d9e009 100644 --- a/node/core/dispute-coordinator/src/import.rs +++ b/node/core/dispute-coordinator/src/import.rs @@ -28,9 +28,7 @@ use std::collections::{BTreeMap, HashMap, HashSet}; -use polkadot_node_primitives::{ - disputes::ValidCandidateVotes, CandidateVotes, DisputeStatus, SignedDisputeStatement, Timestamp, -}; +use polkadot_node_primitives::{CandidateVotes, DisputeStatus, SignedDisputeStatement, Timestamp}; use polkadot_node_subsystem_util::rolling_session_window::RollingSessionWindow; use polkadot_primitives::v2::{ CandidateReceipt, DisputeStatement, IndexedVec, SessionIndex, SessionInfo, @@ -103,7 +101,7 @@ impl OwnVoteState { let mut our_valid_votes = env .controlled_indices() .iter() - .filter_map(|i| votes.valid.raw().get_key_value(i)) + .filter_map(|i| votes.valid.get_key_value(i)) .peekable(); let mut our_invalid_votes = env.controlled_indices.iter().filter_map(|i| votes.invalid.get_key_value(i)); @@ -165,16 +163,13 @@ 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: ValidCandidateVotes::new(), - invalid: BTreeMap::new(), - }; + let votes = + CandidateVotes { candidate_receipt, valid: BTreeMap::new(), invalid: BTreeMap::new() }; Self { votes, own_vote: OwnVoteState::NoVote, dispute_status: None } } /// Create a new `CandidateVoteState` from already existing votes. - pub fn new(votes: CandidateVotes, env: &CandidateEnvironment, now: Timestamp) -> Self { + pub fn new<'a>(votes: CandidateVotes, env: &CandidateEnvironment<'a>, now: Timestamp) -> Self { let own_vote = OwnVoteState::new(&votes, env); let n_validators = env.validators().len(); @@ -183,7 +178,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.raw().is_empty(); + let is_disputed = !votes.invalid.is_empty() && !votes.valid.is_empty(); let dispute_status = if is_disputed { let mut status = DisputeStatus::active(); @@ -192,7 +187,7 @@ impl CandidateVoteState { if is_confirmed { status = status.confirm(); }; - let concluded_for = votes.valid.raw().len() >= supermajority_threshold; + let concluded_for = votes.valid.len() >= supermajority_threshold; if concluded_for { status = status.conclude_for(now); }; @@ -267,20 +262,25 @@ impl CandidateVoteState { match statement.statement() { DisputeStatement::Valid(valid_kind) => { - let fresh = votes.valid.insert_vote( - val_index, + let fresh = insert_into_statements( + &mut votes.valid, *valid_kind, + val_index, statement.into_validator_signature(), ); + if fresh { imported_valid_votes += 1; } }, DisputeStatement::Invalid(invalid_kind) => { - let fresh = votes - .invalid - .insert(val_index, (*invalid_kind, statement.into_validator_signature())) - .is_none(); + let fresh = insert_into_statements( + &mut votes.invalid, + *invalid_kind, + val_index, + statement.into_validator_signature(), + ); + if fresh { new_invalid_voters.push(val_index); imported_invalid_votes += 1; @@ -481,7 +481,12 @@ 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 votes.valid.insert_vote(index, ValidDisputeStatementKind::ApprovalChecking, sig) { + if insert_into_statements( + &mut votes.valid, + ValidDisputeStatementKind::ApprovalChecking, + index, + sig, + ) { imported_valid_votes += 1; imported_approval_votes += 1; } @@ -530,3 +535,14 @@ 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 9f4415ba36a6..0df1a620826c 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::{ - disputes::ValidCandidateVotes, CandidateVotes, DisputeMessage, DisputeMessageCheckError, - DisputeStatus, SignedDisputeStatement, Timestamp, + CandidateVotes, DisputeMessage, DisputeMessageCheckError, DisputeStatus, + SignedDisputeStatement, Timestamp, DISPUTE_WINDOW, }; use polkadot_node_subsystem::{ messages::{ @@ -269,13 +269,8 @@ impl Initialized { update: ActiveLeavesUpdate, now: u64, ) -> Result<()> { - let scraped_updates = + let on_chain_votes = 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 { @@ -304,7 +299,7 @@ impl Initialized { self.highest_session = session; - db::v1::note_earliest_session(overlay_db, new_window_start)?; + db::v1::note_current_session(overlay_db, session)?; self.spam_slots.prune_old(new_window_start); } }, @@ -313,7 +308,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 scraped_updates.on_chain_votes { + for votes in on_chain_votes { let _ = self.process_on_chain_votes(ctx, overlay_db, votes, now).await.map_err( |error| { gum::warn!( @@ -421,8 +416,6 @@ 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, @@ -624,9 +617,7 @@ impl Initialized { let _ = tx.send( get_active_with_status(recent_disputes.into_iter(), now) - .map(|((session_idx, candidate_hash), dispute_status)| { - (session_idx, candidate_hash, dispute_status) - }) + .map(|(k, _)| k) .collect(), ); }, @@ -715,27 +706,25 @@ impl Initialized { now: Timestamp, ) -> Result { gum::trace!(target: LOG_TARGET, ?statements, "In handle import statements"); - if !self.rolling_session_window.contains(session) { - // It is not valid to participate in an ancient dispute (spam?) or too new. + if session + DISPUTE_WINDOW.get() < self.highest_session { + // It is not valid to participate in an ancient dispute (spam?). 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(); @@ -814,14 +803,7 @@ impl Initialized { ); intermediate_result }, - Ok(votes) => { - gum::trace!( - target: LOG_TARGET, - count = votes.len(), - "Successfully received approval votes." - ); - intermediate_result.import_approval_votes(&env, votes, now) - }, + Ok(votes) => intermediate_result.import_approval_votes(&env, votes, now), } } else { gum::trace!( @@ -844,15 +826,8 @@ impl Initialized { let new_state = import_result.new_state(); let is_included = self.scraper.is_candidate_included(&candidate_hash); - 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; + + let potential_spam = !is_included && !new_state.is_confirmed() && !new_state.has_own_vote(); gum::trace!( target: LOG_TARGET, @@ -865,11 +840,8 @@ 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: @@ -897,6 +869,14 @@ 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: @@ -1040,7 +1020,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.raw().len(), + total_valid_votes = ?import_result.new_state().votes().valid.len(), total_invalid_votes = ?import_result.new_state().votes().invalid.len(), confirmed = ?import_result.new_state().is_confirmed(), "Import summary" @@ -1093,29 +1073,27 @@ 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: ValidCandidateVotes::new(), + valid: BTreeMap::new(), invalid: BTreeMap::new(), }); @@ -1277,7 +1255,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(), + our_vote.candidate_hash().clone(), our_vote.session_index(), validators .get(*validator_index) @@ -1288,15 +1266,11 @@ 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 - .raw() - .iter() - .next() - .ok_or(DisputeMessageCreationError::NoOppositeVote)?; + let (validator_index, (statement_kind, validator_signature)) = + votes.valid.iter().next().ok_or(DisputeMessageCreationError::NoOppositeVote)?; let other_vote = SignedDisputeStatement::new_checked( DisputeStatement::Valid(*statement_kind), - *our_vote.candidate_hash(), + our_vote.candidate_hash().clone(), 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 e7ac66ce2ece..09d6c621b999 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; +use polkadot_node_primitives::{CandidateVotes, DISPUTE_WINDOW}; use polkadot_node_subsystem::{ overseer, ActivatedLeaf, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, }; @@ -272,7 +272,7 @@ impl DisputeCoordinatorSubsystem { ChainScraper, )> { // Prune obsolete disputes: - db::v1::note_earliest_session(overlay_db, rolling_session_window.earliest_session())?; + db::v1::note_current_session(overlay_db, rolling_session_window.latest_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 7167bc7e26e8..874f37e63213 100644 --- a/node/core/dispute-coordinator/src/participation/mod.rs +++ b/node/core/dispute-coordinator/src/participation/mod.rs @@ -51,10 +51,7 @@ 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. /// @@ -215,19 +212,6 @@ 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, @@ -251,7 +235,7 @@ impl Participation { req: ParticipationRequest, recent_head: Hash, ) -> FatalResult<()> { - if self.running_participations.insert(*req.candidate_hash()) { + if self.running_participations.insert(req.candidate_hash().clone()) { 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 3452470efcb5..3ec217628625 100644 --- a/node/core/dispute-coordinator/src/participation/queues/mod.rs +++ b/node/core/dispute-coordinator/src/participation/queues/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::{cmp::Ordering, collections::BTreeMap}; +use std::{ + cmp::Ordering, + collections::{BTreeMap, HashMap}, +}; use futures::channel::oneshot; use polkadot_node_subsystem::{messages::ChainApiMessage, overseer}; @@ -47,14 +50,25 @@ 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. - best_effort: BTreeMap, + /// + /// 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, /// Priority queue. + /// + /// In the priority queue, we have a strict ordering of candidates and participation will + /// happen in that order. priority: BTreeMap, } @@ -129,13 +143,14 @@ impl ParticipationRequest { impl Queues { /// Create new `Queues`. pub fn new() -> Self { - Self { best_effort: BTreeMap::new(), priority: BTreeMap::new() } + Self { best_effort: HashMap::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 is considered priority now. + /// if it considered priority now, otherwise the `added_count` on the best effort queue will be + /// bumped. /// /// Returns error in case a queue was found full already. pub async fn queue( @@ -144,101 +159,94 @@ impl Queues { priority: ParticipationPriority, req: ParticipationRequest, ) -> Result<()> { - let comparator = CandidateComparator::new(sender, &req.candidate_receipt).await?; - - self.queue_with_comparator(comparator, priority, req)?; + let comparator = match priority { + ParticipationPriority::BestEffort => None, + ParticipationPriority::Priority => + CandidateComparator::new(sender, &req.candidate_receipt).await?, + }; + self.queue_with_comparator(comparator, req)?; Ok(()) } - /// Get the next best request for dispute participation if any. - /// First the priority queue is considered and then the best effort one. + /// 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`. pub fn dequeue(&mut self) -> Option { if let Some(req) = self.pop_priority() { - return Some(req.1) + // 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) } - 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(()) + self.pop_best_effort() } fn queue_with_comparator( &mut self, - comparator: CandidateComparator, - priority: ParticipationPriority, + comparator: Option, req: ParticipationRequest, ) -> std::result::Result<(), QueueError> { - if priority.is_priority() { + if let Some(comparator) = comparator { if self.priority.len() >= PRIORITY_QUEUE_SIZE { return Err(QueueError::PriorityFull) } // Remove any best effort entry: - self.best_effort.remove(&comparator); + self.best_effort.remove(&req.candidate_hash); 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) } - self.best_effort.insert(comparator, req); + // 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; } Ok(()) } - /// 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 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 priority queue entry. - 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)> { + fn pop_priority(&mut self) -> Option { // Once https://github.com/rust-lang/rust/issues/62924 is there, we can use a simple: - // target.pop_first(). - if let Some((comparator, _)) = target.iter().next() { - let comparator = *comparator; - target - .remove(&comparator) - .map(|participation_request| (comparator, participation_request)) + // priority.pop_first(). + if let Some((comparator, _)) = self.priority.iter().next() { + let comparator = comparator.clone(); + self.priority.remove(&comparator) } 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 @@ -258,12 +266,9 @@ impl Queues { #[derive(Copy, Clone)] #[cfg_attr(test, derive(Debug))] struct CandidateComparator { - /// 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. + /// Block number of the relay parent. /// - /// The order enforced by `CandidateComparator` is important because we want to participate in - /// the oldest disputes first. + /// Important, so we will be participating in 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 @@ -272,10 +277,8 @@ 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: 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). + relay_parent_block_number: BlockNumber, + /// By adding the `CandidateHash`, we can guarantee a unique ordering across candidates. candidate_hash: CandidateHash, } @@ -284,35 +287,33 @@ impl CandidateComparator { /// /// Useful for testing. #[cfg(test)] - pub fn new_dummy(block_number: Option, candidate_hash: CandidateHash) -> Self { + pub fn new_dummy(block_number: BlockNumber, candidate_hash: CandidateHash) -> Self { Self { relay_parent_block_number: block_number, candidate_hash } } /// Create a candidate comparator for a given candidate. /// /// Returns: - /// - `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. + /// `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. pub async fn new( sender: &mut impl overseer::DisputeCoordinatorSenderTrait, candidate: &CandidateReceipt, - ) -> FatalResult { + ) -> FatalResult> { let candidate_hash = candidate.hash(); - 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!" - ); - } + 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, + }; - Ok(CandidateComparator { relay_parent_block_number: n, candidate_hash }) + Ok(Some(CandidateComparator { relay_parent_block_number: n, candidate_hash })) } } @@ -332,28 +333,11 @@ impl PartialOrd for CandidateComparator { impl Ord for CandidateComparator { fn cmp(&self, other: &Self) -> Ordering { - 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 - }, + match self.relay_parent_block_number.cmp(&other.relay_parent_block_number) { + Ordering::Equal => (), + o => return o, } + 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 b6af4bd2b55a..4e9019ebb499 100644 --- a/node/core/dispute-coordinator/src/participation/queues/tests.rs +++ b/node/core/dispute-coordinator/src/participation/queues/tests.rs @@ -14,7 +14,6 @@ // 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}; @@ -32,16 +31,15 @@ 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: Option, + relay_parent: BlockNumber, ) -> 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 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. +/// 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. #[test] fn ordering_works_as_expected() { let mut queue = Queues::new(); @@ -49,69 +47,36 @@ 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_unknown_parent = make_participation_request(Hash::repeat_byte(0x05)); + let req5 = 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( - 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(), - ) + .queue_with_comparator(Some(make_dummy_comparator(&req_prio, 1)), req_prio.clone()) .unwrap(); + queue.queue_with_comparator(None, req3.clone()).unwrap(); queue - .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(), - ) + .queue_with_comparator(Some(make_dummy_comparator(&req_prio_2, 2)), req_prio_2.clone()) .unwrap(); + queue.queue_with_comparator(None, req3.clone()).unwrap(); + queue.queue_with_comparator(None, req5.clone()).unwrap(); assert_matches!( - queue.queue_with_comparator( - make_dummy_comparator(&req_prio_full, Some(3)), - ParticipationPriority::Priority, - req_prio_full - ), + queue.queue_with_comparator(Some(make_dummy_comparator(&req_prio_full, 3)), req_prio_full), Err(QueueError::PriorityFull) ); - assert_matches!( - queue.queue_with_comparator( - make_dummy_comparator(&req_full, Some(3)), - ParticipationPriority::BestEffort, - req_full - ), - Err(QueueError::BestEffortFull) - ); + assert_matches!(queue.queue_with_comparator(None, 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_eq!(queue.dequeue(), Some(req5_unknown_parent)); - + assert_matches!( + queue.dequeue(), + Some(r) => { assert!(r == req1 || r == req5) } + ); + assert_matches!( + queue.dequeue(), + Some(r) => { assert!(r == req1 || r == req5) } + ); assert_matches!(queue.dequeue(), None); } @@ -124,50 +89,23 @@ 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( - 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(), - ) + .queue_with_comparator(Some(make_dummy_comparator(&req_prio, 1)), req_prio.clone()) .unwrap(); // Insert same best effort again: - queue - .queue_with_comparator( - make_dummy_comparator(&req1, None), - ParticipationPriority::BestEffort, - req1.clone(), - ) - .unwrap(); + queue.queue_with_comparator(None, req1.clone()).unwrap(); // insert same prio again: queue - .queue_with_comparator( - make_dummy_comparator(&req_prio, Some(1)), - ParticipationPriority::Priority, - req_prio.clone(), - ) + .queue_with_comparator(Some(make_dummy_comparator(&req_prio, 1)), req_prio.clone()) .unwrap(); // Insert first as best effort: - queue - .queue_with_comparator( - make_dummy_comparator(&req_best_effort_then_prio, Some(2)), - ParticipationPriority::BestEffort, - req_best_effort_then_prio.clone(), - ) - .unwrap(); + queue.queue_with_comparator(None, req_best_effort_then_prio.clone()).unwrap(); // Then as prio: queue .queue_with_comparator( - make_dummy_comparator(&req_best_effort_then_prio, Some(2)), - ParticipationPriority::Priority, + Some(make_dummy_comparator(&req_best_effort_then_prio, 2)), req_best_effort_then_prio.clone(), ) .unwrap(); @@ -178,19 +116,12 @@ fn candidate_is_only_dequeued_once() { // Insert first as prio: queue .queue_with_comparator( - make_dummy_comparator(&req_prio_then_best_effort, Some(3)), - ParticipationPriority::Priority, + Some(make_dummy_comparator(&req_prio_then_best_effort, 3)), req_prio_then_best_effort.clone(), ) .unwrap(); // Then as best effort: - queue - .queue_with_comparator( - make_dummy_comparator(&req_prio_then_best_effort, Some(3)), - ParticipationPriority::BestEffort, - req_prio_then_best_effort.clone(), - ) - .unwrap(); + queue.queue_with_comparator(None, 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 bf149a87286f..03772b1918dc 100644 --- a/node/core/dispute-coordinator/src/participation/tests.rs +++ b/node/core/dispute-coordinator/src/participation/tests.rs @@ -29,10 +29,7 @@ use parity_scale_codec::Encode; use polkadot_node_primitives::{AvailableData, BlockData, InvalidCandidate, PoV}; use polkadot_node_subsystem::{ jaeger, - messages::{ - AllMessages, ChainApiMessage, DisputeCoordinatorMessage, RuntimeApiMessage, - RuntimeApiRequest, - }, + messages::{AllMessages, DisputeCoordinatorMessage, RuntimeApiMessage, RuntimeApiRequest}, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, SpawnGlue, }; use polkadot_node_subsystem_test_helpers::{ @@ -224,9 +221,9 @@ fn same_req_wont_get_queued_if_participation_is_already_running() { #[test] fn reqs_get_queued_when_out_of_capacity() { - let (mut ctx, mut ctx_handle) = make_our_subsystem_context(TaskExecutor::new()); + futures::executor::block_on(async { + 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(); @@ -242,81 +239,43 @@ 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 + // we should not have any further results nor recovery requests: assert_matches!(ctx_handle.recv().timeout(Duration::from_millis(10)).await, None); - }; - - futures::executor::block_on(async { - futures::join!(test, request_handler); - }); + assert_matches!(worker_receiver.next().timeout(Duration::from_millis(10)).await, None); + }) } #[test] fn reqs_get_queued_on_no_recent_block() { - 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 { + futures::executor::block_on(async { + let (mut ctx, mut ctx_handle) = make_our_subsystem_context(TaskExecutor::new()); + let (sender, _worker_receiver) = mpsc::channel(1); let mut participation = Participation::new(sender); participate(&mut ctx, &mut participation).await.unwrap(); - - // 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(); + activate_leaf(&mut ctx, &mut participation, 10).await.unwrap(); // after activating at least one leaf the recent block // state should be available which should lead to trying @@ -329,11 +288,7 @@ 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 29b217e46e4a..99a6e68cdfb5 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::{DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION, MAX_FINALITY_LAG}; +use polkadot_node_primitives::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, CandidateReceipt, Hash, ScrapedOnChainVotes, + BlockNumber, CandidateEvent, CandidateHash, Hash, ScrapedOnChainVotes, }; use crate::{ @@ -51,24 +51,6 @@ 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. @@ -83,7 +65,7 @@ impl ScrapedUpdates { /// With this information it provides a `CandidateComparator` and as a return value of /// `process_active_leaves_update` any scraped votes. /// -/// Scraped candidates are available `DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION` more blocks +/// Scraped candidates are available `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. @@ -105,6 +87,16 @@ 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. @@ -122,8 +114,8 @@ impl ChainScraper { }; let update = ActiveLeavesUpdate { activated: Some(initial_head), deactivated: Default::default() }; - let updates = s.process_active_leaves_update(sender, &update).await?; - Ok((s, updates.on_chain_votes)) + let votes = s.process_active_leaves_update(sender, &update).await?; + Ok((s, votes)) } /// Check whether we have seen a candidate included on any chain. @@ -140,19 +132,18 @@ impl ChainScraper { /// /// and updates current heads, so we can query candidates for all non finalized blocks. /// - /// Returns: On chain votes and included candidate receipts for the leaf and any - /// ancestors we might not yet have seen. + /// Returns: On chain vote 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(ScrapedUpdates::new()), + None => return Ok(Vec::new()), }; // Fetch ancestry up to last finalized block. @@ -166,33 +157,30 @@ impl ChainScraper { let block_hashes = std::iter::once(activated.hash).chain(ancestors); - let mut scraped_updates = ScrapedUpdates::new(); + let mut on_chain_votes = Vec::new(); for (block_number, block_hash) in block_numbers.zip(block_hashes) { gum::trace!(?block_number, ?block_hash, "In ancestor processing."); - let receipts_for_block = - self.process_candidate_events(sender, block_number, block_hash).await?; - scraped_updates.included_receipts.extend(receipts_for_block); + self.process_candidate_events(sender, block_number, block_hash).await?; if let Some(votes) = get_on_chain_votes(sender, block_hash).await? { - scraped_updates.on_chain_votes.push(votes); + on_chain_votes.push(votes); } } self.last_observed_blocks.put(activated.hash, ()); - Ok(scraped_updates) + Ok(on_chain_votes) } /// Prune finalized candidates. /// - /// We keep each candidate for `DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION` blocks after finalization. + /// We keep each candidate for `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) { - // `DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION - 1` because `finalized_block_number`counts to the + // `CANDIDATE_LIFETIME_AFTER_FINALIZATION - 1` because `finalized_block_number`counts to the // candidate lifetime. - match finalized_block_number.checked_sub(DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION - 1) - { + match finalized_block_number.checked_sub(Self::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); @@ -208,21 +196,17 @@ 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 events { + for ev in get_candidate_events(sender, block_hash).await? { match ev { CandidateEvent::CandidateIncluded(receipt, _, _, _) => { let candidate_hash = receipt.hash(); @@ -233,7 +217,6 @@ 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(); @@ -250,7 +233,7 @@ impl ChainScraper { }, } } - Ok(included_receipts) + Ok(()) } /// 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 3a6befa2002d..6251891af5a3 100644 --- a/node/core/dispute-coordinator/src/scraping/tests.rs +++ b/node/core/dispute-coordinator/src/scraping/tests.rs @@ -23,7 +23,6 @@ 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::{ @@ -453,9 +452,9 @@ fn scraper_prunes_finalized_candidates() { let candidate = make_candidate_receipt(get_block_number_hash(TEST_TARGET_BLOCK_NUMBER)); - // After `DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION` blocks the candidate should be removed + // After `CANDIDATE_LIFETIME_AFTER_FINALIZATION` blocks the candidate should be removed finalized_block_number = - TEST_TARGET_BLOCK_NUMBER + DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION; + TEST_TARGET_BLOCK_NUMBER + ChainScraper::CANDIDATE_LIFETIME_AFTER_FINALIZATION; process_finalized_block(&mut scraper, &finalized_block_number); assert!(!scraper.is_candidate_backed(&candidate.hash())); @@ -513,10 +512,10 @@ fn scraper_handles_backed_but_not_included_candidate() { // The candidate should be removed. assert!( finalized_block_number < - TEST_TARGET_BLOCK_NUMBER + DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION + TEST_TARGET_BLOCK_NUMBER + ChainScraper::CANDIDATE_LIFETIME_AFTER_FINALIZATION ); finalized_block_number += - TEST_TARGET_BLOCK_NUMBER + DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION; + TEST_TARGET_BLOCK_NUMBER + ChainScraper::CANDIDATE_LIFETIME_AFTER_FINALIZATION; process_finalized_block(&mut scraper, &finalized_block_number); assert!(!scraper.is_candidate_included(&candidate.hash())); @@ -563,7 +562,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") + - DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION; + ChainScraper::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 b5c2a6bd8e3f..b2f779041a4c 100644 --- a/node/core/dispute-coordinator/src/tests.rs +++ b/node/core/dispute-coordinator/src/tests.rs @@ -31,9 +31,7 @@ use futures::{ use polkadot_node_subsystem_util::database::Database; -use polkadot_node_primitives::{ - DisputeStatus, SignedDisputeStatement, SignedFullStatement, Statement, -}; +use polkadot_node_primitives::{SignedDisputeStatement, SignedFullStatement, Statement}; use polkadot_node_subsystem::{ messages::{ ApprovalVotingMessage, ChainApiMessage, DisputeCoordinatorMessage, @@ -57,9 +55,7 @@ use polkadot_node_subsystem::{ messages::{AllMessages, BlockDescription, RuntimeApiMessage, RuntimeApiRequest}, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, }; -use polkadot_node_subsystem_test_helpers::{ - make_buffered_subsystem_context, TestSubsystemContextHandle, -}; +use polkadot_node_subsystem_test_helpers::{make_subsystem_context, TestSubsystemContextHandle}; use polkadot_primitives::v2::{ ApprovalVote, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash, CandidateReceipt, CoreIndex, DisputeStatement, GroupIndex, Hash, HeadData, Header, IndexedVec, @@ -104,38 +100,6 @@ 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, @@ -169,7 +133,6 @@ 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, @@ -226,8 +189,6 @@ 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(), @@ -239,7 +200,6 @@ impl Default for TestState { config, clock: MockClock::default(), headers, - block_num_to_header, last_block, known_session: None, } @@ -266,7 +226,6 @@ 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."); @@ -395,44 +354,31 @@ impl TestState { ); finished_steps.got_scraping_information = true; tx.send(Ok(0)).unwrap(); - }, - AllMessages::ChainApi(ChainApiMessage::BlockNumber(hash, tx)) => { - let block_num = self.headers.get(&hash).map(|header| header.number); - tx.send(Ok(block_num)).unwrap(); - }, - AllMessages::RuntimeApi(RuntimeApiMessage::Request( - _new_leaf, - RuntimeApiRequest::CandidateEvents(tx), - )) => { - tx.send(Ok(candidate_events.clone())).unwrap(); - }, - AllMessages::RuntimeApi(RuntimeApiMessage::Request( - _new_leaf, - RuntimeApiRequest::FetchOnChainVotes(tx), - )) => { - //add some `BackedCandidates` or resolved disputes here as needed - tx.send(Ok(Some(ScrapedOnChainVotes { - session, - backing_validators_per_candidate: Vec::default(), - disputes: MultiDisputeStatementSet::default(), - }))) - .unwrap(); - }, - AllMessages::ChainApi(ChainApiMessage::Ancestors { hash, k, response_channel }) => { - 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(), - ); + assert_matches!( + overseer_recv(virtual_overseer).await, + AllMessages::RuntimeApi(RuntimeApiMessage::Request( + _new_leaf, + RuntimeApiRequest::CandidateEvents(tx), + )) => { + tx.send(Ok(candidate_events.clone())).unwrap(); + } + ); + gum::trace!("After answering runtime api request"); + assert_matches!( + overseer_recv(virtual_overseer).await, + AllMessages::RuntimeApi(RuntimeApiMessage::Request( + _new_leaf, + RuntimeApiRequest::FetchOnChainVotes(tx), + )) => { + //add some `BackedCandidates` or resolved disputes here as needed + tx.send(Ok(Some(ScrapedOnChainVotes { + session, + backing_validators_per_candidate: Vec::default(), + disputes: MultiDisputeStatementSet::default(), + }))).unwrap(); } - let _ = response_channel.send(Ok(response)); + ); + gum::trace!("After answering runtime API request (votes)"); }, msg => { panic!("Received unexpected message in `handle_sync_queries`: {:?}", msg); @@ -573,7 +519,7 @@ impl TestState { F: FnOnce(TestState, VirtualOverseer) -> BoxFuture<'static, TestState>, { self.known_session = None; - let (ctx, ctx_handle) = make_buffered_subsystem_context(TaskExecutor::new(), 1); + let (ctx, ctx_handle) = make_subsystem_context(TaskExecutor::new()); let subsystem = DisputeCoordinatorSubsystem::new( self.db.clone(), self.config.clone(), @@ -594,34 +540,7 @@ fn test_harness(test: F) -> TestState where F: FnOnce(TestState, VirtualOverseer) -> BoxFuture<'static, TestState>, { - 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) + TestState::default().resume(test) } /// Handle participation messages. @@ -689,18 +608,6 @@ 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| { @@ -718,25 +625,31 @@ fn too_many_unconfirmed_statements_are_considered_spam() { .activate_leaf_at_session(&mut virtual_overseer, session, 1, Vec::new()) .await; - let (valid_vote1, invalid_vote1) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(3), - ValidatorIndex(1), - candidate_hash1, - session, - VoteType::Backing, - ) - .await; + let valid_vote1 = test_state + .issue_backing_statement_with_index(ValidatorIndex(3), candidate_hash1, session) + .await; - let (valid_vote2, invalid_vote2) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(3), - ValidatorIndex(1), - candidate_hash2, - session, - VoteType::Backing, - ) - .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 invalid_vote2 = test_state + .issue_explicit_statement_with_index( + ValidatorIndex(1), + candidate_hash2, + session, + false, + ) + .await; gum::trace!("Before sending `ImportStatements`"); virtual_overseer @@ -769,10 +682,7 @@ fn too_many_unconfirmed_statements_are_considered_spam() { }) .await; - assert_eq!( - rx.await.unwrap(), - vec![(session, candidate_hash1, DisputeStatus::Active)] - ); + assert_eq!(rx.await.unwrap(), vec![(session, candidate_hash1)]); let (tx, rx) = oneshot::channel(); virtual_overseer @@ -785,7 +695,7 @@ fn too_many_unconfirmed_statements_are_considered_spam() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.raw().len(), 1); + assert_eq!(votes.valid.len(), 1); assert_eq!(votes.invalid.len(), 1); } @@ -849,15 +759,18 @@ fn approval_vote_import_works() { .activate_leaf_at_session(&mut virtual_overseer, session, 1, Vec::new()) .await; - let (valid_vote1, invalid_vote1) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(3), - ValidatorIndex(1), - candidate_hash1, - session, - VoteType::Backing, - ) - .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 approval_vote = test_state.issue_approval_vote_with_index( ValidatorIndex(4), @@ -899,10 +812,7 @@ fn approval_vote_import_works() { }) .await; - assert_eq!( - rx.await.unwrap(), - vec![(session, candidate_hash1, DisputeStatus::Active)] - ); + assert_eq!(rx.await.unwrap(), vec![(session, candidate_hash1)]); let (tx, rx) = oneshot::channel(); virtual_overseer @@ -915,11 +825,8 @@ fn approval_vote_import_works() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.raw().len(), 2); - assert!( - votes.valid.raw().get(&ValidatorIndex(4)).is_some(), - "Approval vote is missing!" - ); + assert_eq!(votes.valid.len(), 2); + assert!(votes.valid.get(&ValidatorIndex(4)).is_some(), "Approval vote is missing!"); assert_eq!(votes.invalid.len(), 1); } @@ -958,25 +865,41 @@ fn dispute_gets_confirmed_via_participation() { ) .await; - let (valid_vote1, invalid_vote1) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(3), - ValidatorIndex(1), - candidate_hash1, - session, - VoteType::Explicit, - ) - .await; + let valid_vote1 = test_state + .issue_explicit_statement_with_index( + ValidatorIndex(3), + candidate_hash1, + session, + true, + ) + .await; - let (valid_vote2, invalid_vote2) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(3), - ValidatorIndex(1), - candidate_hash2, - session, - VoteType::Explicit, - ) - .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 invalid_vote2 = test_state + .issue_explicit_statement_with_index( + ValidatorIndex(1), + candidate_hash2, + session, + false, + ) + .await; virtual_overseer .send(FromOrchestra::Communication { @@ -1011,10 +934,7 @@ fn dispute_gets_confirmed_via_participation() { }) .await; - assert_eq!( - rx.await.unwrap(), - vec![(session, candidate_hash1, DisputeStatus::Active)] - ); + assert_eq!(rx.await.unwrap(), vec![(session, candidate_hash1)]); let (tx, rx) = oneshot::channel(); virtual_overseer @@ -1027,7 +947,7 @@ fn dispute_gets_confirmed_via_participation() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.raw().len(), 2); + assert_eq!(votes.valid.len(), 2); assert_eq!(votes.invalid.len(), 1); } @@ -1062,7 +982,7 @@ fn dispute_gets_confirmed_via_participation() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.raw().len(), 1); + assert_eq!(votes.valid.len(), 1); assert_eq!(votes.invalid.len(), 1); } @@ -1096,35 +1016,59 @@ fn dispute_gets_confirmed_at_byzantine_threshold() { .activate_leaf_at_session(&mut virtual_overseer, session, 1, Vec::new()) .await; - let (valid_vote1, invalid_vote1) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(3), - ValidatorIndex(1), - candidate_hash1, - session, - VoteType::Explicit, - ) - .await; + let valid_vote1 = test_state + .issue_explicit_statement_with_index( + ValidatorIndex(3), + candidate_hash1, + 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_vote1 = test_state + .issue_explicit_statement_with_index( + ValidatorIndex(1), + candidate_hash1, + session, + false, + ) + .await; - let (valid_vote2, invalid_vote2) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(3), - ValidatorIndex(1), - candidate_hash2, - session, - VoteType::Explicit, - ) - .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_vote2 = test_state + .issue_explicit_statement_with_index( + ValidatorIndex(3), + candidate_hash2, + session, + true, + ) + .await; + + let invalid_vote2 = test_state + .issue_explicit_statement_with_index( + ValidatorIndex(1), + candidate_hash2, + session, + false, + ) + .await; virtual_overseer .send(FromOrchestra::Communication { @@ -1155,10 +1099,7 @@ fn dispute_gets_confirmed_at_byzantine_threshold() { }) .await; - assert_eq!( - rx.await.unwrap(), - vec![(session, candidate_hash1, DisputeStatus::Confirmed)] - ); + assert_eq!(rx.await.unwrap(), vec![(session, candidate_hash1)]); let (tx, rx) = oneshot::channel(); virtual_overseer @@ -1171,7 +1112,7 @@ fn dispute_gets_confirmed_at_byzantine_threshold() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.raw().len(), 2); + assert_eq!(votes.valid.len(), 2); assert_eq!(votes.invalid.len(), 2); } @@ -1206,7 +1147,7 @@ fn dispute_gets_confirmed_at_byzantine_threshold() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.raw().len(), 1); + assert_eq!(votes.valid.len(), 1); assert_eq!(votes.invalid.len(), 1); } @@ -1285,7 +1226,7 @@ fn backing_statements_import_works_and_no_spam() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.raw().len(), 2); + assert_eq!(votes.valid.len(), 2); assert_eq!(votes.invalid.len(), 0); } @@ -1326,7 +1267,7 @@ fn backing_statements_import_works_and_no_spam() { }) .await; - // Import should be valid, as spam slots were not filled + // Result should be valid, because our node participated, so spam slots are cleared: assert_matches!(confirmation_rx.await, Ok(ImportStatementsResult::ValidImport)); virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; @@ -1359,15 +1300,23 @@ fn conflicting_votes_lead_to_dispute_participation() { ) .await; - let (valid_vote, invalid_vote) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(3), - ValidatorIndex(1), - candidate_hash, - session, - VoteType::Explicit, - ) - .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 invalid_vote_2 = test_state .issue_explicit_statement_with_index( @@ -1409,10 +1358,7 @@ fn conflicting_votes_lead_to_dispute_participation() { }) .await; - assert_eq!( - rx.await.unwrap(), - vec![(session, candidate_hash, DisputeStatus::Active)] - ); + assert_eq!(rx.await.unwrap(), vec![(session, candidate_hash)]); let (tx, rx) = oneshot::channel(); virtual_overseer @@ -1425,7 +1371,7 @@ fn conflicting_votes_lead_to_dispute_participation() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.raw().len(), 2); + assert_eq!(votes.valid.len(), 2); assert_eq!(votes.invalid.len(), 1); } @@ -1452,7 +1398,7 @@ fn conflicting_votes_lead_to_dispute_participation() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.raw().len(), 2); + assert_eq!(votes.valid.len(), 2); assert_eq!(votes.invalid.len(), 2); } @@ -1536,7 +1482,7 @@ fn positive_votes_dont_trigger_participation() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.raw().len(), 1); + assert_eq!(votes.valid.len(), 1); assert!(votes.invalid.is_empty()); } @@ -1572,7 +1518,7 @@ fn positive_votes_dont_trigger_participation() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.raw().len(), 2); + assert_eq!(votes.valid.len(), 2); assert!(votes.invalid.is_empty()); } @@ -1601,15 +1547,23 @@ fn wrong_validator_index_is_ignored() { .activate_leaf_at_session(&mut virtual_overseer, session, 1, Vec::new()) .await; - let (valid_vote, invalid_vote) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(2), - ValidatorIndex(1), - candidate_hash, - session, - VoteType::Explicit, - ) - .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; virtual_overseer .send(FromOrchestra::Communication { @@ -1678,15 +1632,23 @@ fn finality_votes_ignore_disputed_candidates() { ) .await; - let (valid_vote, invalid_vote) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(2), - ValidatorIndex(1), - candidate_hash, - session, - VoteType::Explicit, - ) - .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; virtual_overseer .send(FromOrchestra::Communication { @@ -1790,15 +1752,23 @@ fn supermajority_valid_dispute_may_be_finalized() { let supermajority_threshold = polkadot_primitives::v2::supermajority_threshold(test_state.validators.len()); - let (valid_vote, invalid_vote) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(2), - ValidatorIndex(1), - candidate_hash, - session, - VoteType::Explicit, - ) - .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; virtual_overseer .send(FromOrchestra::Communication { @@ -1929,20 +1899,28 @@ fn concluded_supermajority_for_non_active_after_time() { let supermajority_threshold = polkadot_primitives::v2::supermajority_threshold(test_state.validators.len()); - let (valid_vote, invalid_vote) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(2), - ValidatorIndex(1), - candidate_hash, - session, - VoteType::Explicit, - ) - .await; + let valid_vote = test_state + .issue_explicit_statement_with_index( + ValidatorIndex(2), + candidate_hash, + session, + true, + ) + .await; - virtual_overseer - .send(FromOrchestra::Communication { - msg: DisputeCoordinatorMessage::ImportStatements { - candidate_receipt: candidate_receipt.clone(), + let invalid_vote = test_state + .issue_explicit_statement_with_index( + ValidatorIndex(1), + candidate_hash, + session, + false, + ) + .await; + + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::ImportStatements { + candidate_receipt: candidate_receipt.clone(), session, statements: vec![ (valid_vote, ValidatorIndex(2)), @@ -2046,15 +2024,23 @@ fn concluded_supermajority_against_non_active_after_time() { let supermajority_threshold = polkadot_primitives::v2::supermajority_threshold(test_state.validators.len()); - let (valid_vote, invalid_vote) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(2), - ValidatorIndex(1), - candidate_hash, - session, - VoteType::Explicit, - ) - .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 (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer @@ -2161,15 +2147,23 @@ fn resume_dispute_without_local_statement() { .activate_leaf_at_session(&mut virtual_overseer, session, 1, Vec::new()) .await; - let (valid_vote, invalid_vote) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(1), - ValidatorIndex(2), - candidate_hash, - session, - VoteType::Explicit, - ) - .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 (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer @@ -2228,27 +2222,68 @@ fn resume_dispute_without_local_statement() { ) .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 _))); - } + 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; virtual_overseer .send(FromOrchestra::Communication { msg: DisputeCoordinatorMessage::ImportStatements { candidate_receipt: candidate_receipt.clone(), session, - statements, + 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)), + ], pending_confirmation: None, }, }) @@ -2309,15 +2344,23 @@ fn resume_dispute_with_local_statement() { ) .await; - let (valid_vote, invalid_vote) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(1), - ValidatorIndex(2), - candidate_hash, - session, - VoteType::Explicit, - ) - .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 (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer @@ -2393,15 +2436,23 @@ fn resume_dispute_without_local_statement_or_local_key() { .activate_leaf_at_session(&mut virtual_overseer, session, 1, Vec::new()) .await; - let (valid_vote, invalid_vote) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(1), - ValidatorIndex(2), - candidate_hash, - session, - VoteType::Explicit, - ) - .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 (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer @@ -2489,15 +2540,23 @@ fn resume_dispute_with_local_statement_without_local_key() { ) .await; - let (valid_vote, invalid_vote) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(1), - ValidatorIndex(2), - candidate_hash, - session, - VoteType::Explicit, - ) - .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 (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer @@ -2677,15 +2736,22 @@ fn own_approval_vote_gets_distributed_on_dispute() { .await; // Trigger dispute: - let (valid_vote, invalid_vote) = generate_opposing_votes_pair( - &test_state, - ValidatorIndex(2), - ValidatorIndex(1), - candidate_hash, - session, - VoteType::Explicit, - ) - .await; + 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 (pending_confirmation, confirmation_rx) = oneshot::channel(); virtual_overseer @@ -2755,12 +2821,6 @@ 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(), @@ -2774,6 +2834,12 @@ 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 }) }); @@ -2930,15 +2996,23 @@ fn refrain_from_participation() { .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; + 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; virtual_overseer .send(FromOrchestra::Communication { @@ -2978,7 +3052,7 @@ fn refrain_from_participation() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.raw().len(), 1); + assert_eq!(votes.valid.len(), 1); assert_eq!(votes.invalid.len(), 1); } @@ -3022,15 +3096,23 @@ fn participation_for_included_candidates() { .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; + 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; virtual_overseer .send(FromOrchestra::Communication { @@ -3066,7 +3148,7 @@ fn participation_for_included_candidates() { assert_eq!(rx.await.unwrap().len(), 1); - // check if we have participated (cast a vote) + // check if we have participated (casted a vote) let (tx, rx) = oneshot::channel(); virtual_overseer .send(FromOrchestra::Communication { @@ -3078,7 +3160,7 @@ fn participation_for_included_candidates() { .await; let (_, _, votes) = rx.await.unwrap().get(0).unwrap().clone(); - assert_eq!(votes.valid.raw().len(), 2); // 2 => we have participated + assert_eq!(votes.valid.len(), 2); // 2 => we have participated assert_eq!(votes.invalid.len(), 1); } @@ -3088,252 +3170,3 @@ 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 d4301cb22270..c38b45944d5b 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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 a4df582b17a8..e9441d21aefe 100644 --- a/node/core/parachains-inherent/src/lib.rs +++ b/node/core/parachains-inherent/src/lib.rs @@ -29,7 +29,9 @@ use polkadot_node_subsystem::{ errors::SubsystemError, messages::ProvisionerMessage, overseer::Handle, }; use polkadot_primitives::v2::{Block, Hash, InherentData as ParachainsInherentData}; -use std::{sync::Arc, time}; +use sp_blockchain::HeaderBackend; +use sp_runtime::generic::BlockId; +use std::time; pub(crate) const LOG_TARGET: &str = "parachain::parachains-inherent"; @@ -37,24 +39,22 @@ 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> { - pub client: Arc, - pub overseer: polkadot_overseer::Handle, - pub parent: Hash, +pub struct ParachainsInherentDataProvider { + inherent_data: ParachainsInherentData, } -impl> ParachainsInherentDataProvider { - /// Create a new [`Self`]. - pub fn new(client: Arc, overseer: polkadot_overseer::Handle, parent: Hash) -> Self { - ParachainsInherentDataProvider { client, overseer, parent } +impl ParachainsInherentDataProvider { + /// Create a [`Self`] directly from some [`ParachainsInherentData`]. + pub fn from_data(inherent_data: ParachainsInherentData) -> Self { + Self { inherent_data } } /// Create a new instance of the [`ParachainsInherentDataProvider`]. - pub async fn create( - client: Arc, + pub async fn create>( + client: &C, 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(parent) { + let parent_header = match client.header(BlockId::Hash(parent)) { Ok(Some(h)) => h, Ok(None) => return Err(Error::ParentHeaderNotFound(parent)), Err(err) => return Err(Error::Blockchain(err)), @@ -119,28 +119,18 @@ impl> ParachainsInherentDataProvider { }, }; - Ok(inherent_data) + Ok(Self { inherent_data }) } } #[async_trait::async_trait] -impl> sp_inherents::InherentDataProvider - for ParachainsInherentDataProvider -{ - async fn provide_inherent_data( +impl sp_inherents::InherentDataProvider for ParachainsInherentDataProvider { + 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, &inherent_data) + .put_data(polkadot_primitives::v2::PARACHAINS_INHERENT_IDENTIFIER, &self.inherent_data) } async fn try_handle_error( diff --git a/node/core/provisioner/Cargo.toml b/node/core/provisioner/Cargo.toml index c6d78582cfc9..6fbdc8cf0435 100644 --- a/node/core/provisioner/Cargo.toml +++ b/node/core/provisioner/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-core-provisioner" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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 e92626e3afca..07426ef1a75b 100644 --- a/node/core/provisioner/src/disputes/prioritized_selection/mod.rs +++ b/node/core/provisioner/src/disputes/prioritized_selection/mod.rs @@ -28,7 +28,7 @@ use polkadot_node_subsystem::{ }; use polkadot_primitives::v2::{ supermajority_threshold, CandidateHash, DisputeState, DisputeStatement, DisputeStatementSet, - Hash, MultiDisputeStatementSet, SessionIndex, ValidDisputeStatementKind, ValidatorIndex, + Hash, MultiDisputeStatementSet, SessionIndex, ValidatorIndex, }; use std::{ collections::{BTreeMap, HashMap}, @@ -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).await { + let onchain = match get_onchain_disputes(sender, leaf.hash.clone()).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! @@ -139,13 +139,6 @@ where onchain.len(), ); - // Filter out unconfirmed disputes. However if the dispute is already onchain - don't skip it. - // In this case we'd better push as much fresh votes as possible to bring it to conclusion faster. - let recent_disputes = recent_disputes - .into_iter() - .filter(|d| d.2.is_confirmed_concluded() || onchain.contains_key(&(d.0, d.1))) - .collect::>(); - let partitioned = partition_recent_disputes(recent_disputes, &onchain); metrics.on_partition_recent_disputes(&partitioned); @@ -216,11 +209,9 @@ where // Check if votes are within the limit for (session_index, candidate_hash, selected_votes) in votes { - let votes_len = selected_votes.valid.raw().len() + selected_votes.invalid.len(); + let votes_len = selected_votes.valid.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. 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. + // we are done - no more votes can be added return result } result.insert((session_index, candidate_hash), selected_votes); @@ -364,20 +355,10 @@ fn is_vote_worth_to_keep( dispute_statement: DisputeStatement, onchain_state: &DisputeState, ) -> bool { - let (offchain_vote, valid_kind) = match dispute_statement { - DisputeStatement::Valid(kind) => (true, Some(kind)), - DisputeStatement::Invalid(_) => (false, None), + let offchain_vote = match dispute_statement { + DisputeStatement::Valid(_) => true, + DisputeStatement::Invalid(_) => false, }; - // We want to keep all backing votes. This maximizes the number of backers - // punished when misbehaving. - if let Some(kind) = valid_kind { - match kind { - ValidDisputeStatementKind::BackingValid(_) | - ValidDisputeStatementKind::BackingSeconded(_) => return true, - _ => (), - } - } - let in_validators_for = onchain_state .validators_for .get(validator_index.0 as usize) diff --git a/node/core/provisioner/src/disputes/prioritized_selection/tests.rs b/node/core/provisioner/src/disputes/prioritized_selection/tests.rs index 982d19356e6a..f76107dc65d4 100644 --- a/node/core/provisioner/src/disputes/prioritized_selection/tests.rs +++ b/node/core/provisioner/src/disputes/prioritized_selection/tests.rs @@ -393,9 +393,7 @@ impl TestDisputes { ValidDisputeStatementKind::Explicit, 0, local_votes_count, - ) - .into_iter() - .collect(), + ), invalid: BTreeMap::new(), }, ); @@ -428,7 +426,7 @@ impl TestDisputes { pub fn add_unconfirmed_disputes_concluded_onchain( &mut self, dispute_count: usize, - ) -> (SessionIndex, usize) { + ) -> (u32, usize) { let local_votes_count = self.validators_count * 90 / 100; let onchain_votes_count = self.validators_count * 80 / 100; let session_idx = 0; @@ -446,7 +444,7 @@ impl TestDisputes { pub fn add_unconfirmed_disputes_unconcluded_onchain( &mut self, dispute_count: usize, - ) -> (SessionIndex, usize) { + ) -> (u32, usize) { let local_votes_count = self.validators_count * 90 / 100; let onchain_votes_count = self.validators_count * 40 / 100; let session_idx = 1; @@ -461,25 +459,22 @@ impl TestDisputes { (session_idx, (local_votes_count - onchain_votes_count) * dispute_count) } - pub fn add_confirmed_disputes_unknown_onchain( + pub fn add_unconfirmed_disputes_unknown_onchain( &mut self, dispute_count: usize, - ) -> (SessionIndex, usize) { + ) -> (u32, usize) { let local_votes_count = self.validators_count * 90 / 100; let session_idx = 2; let lf = leaf(); let dummy_receipt = test_helpers::dummy_candidate_receipt(lf.hash.clone()); for _ in 0..dispute_count { - let d = (session_idx, CandidateHash(Hash::random()), DisputeStatus::Confirmed); + let d = (session_idx, CandidateHash(Hash::random()), DisputeStatus::Active); self.add_offchain_dispute(d.clone(), local_votes_count, dummy_receipt.clone()); } (session_idx, local_votes_count * dispute_count) } - pub fn add_concluded_disputes_known_onchain( - &mut self, - dispute_count: usize, - ) -> (SessionIndex, usize) { + pub fn add_concluded_disputes_known_onchain(&mut self, dispute_count: usize) -> (u32, usize) { let local_votes_count = self.validators_count * 90 / 100; let onchain_votes_count = self.validators_count * 75 / 100; let session_idx = 3; @@ -493,10 +488,7 @@ impl TestDisputes { (session_idx, (local_votes_count - onchain_votes_count) * dispute_count) } - pub fn add_concluded_disputes_unknown_onchain( - &mut self, - dispute_count: usize, - ) -> (SessionIndex, usize) { + pub fn add_concluded_disputes_unknown_onchain(&mut self, dispute_count: usize) -> (u32, usize) { let local_votes_count = self.validators_count * 90 / 100; let session_idx = 4; let lf = leaf(); @@ -508,40 +500,6 @@ impl TestDisputes { (session_idx, local_votes_count * dispute_count) } - pub fn add_unconfirmed_disputes_known_onchain( - &mut self, - dispute_count: usize, - ) -> (SessionIndex, usize) { - let local_votes_count = self.validators_count * 10 / 100; - let onchain_votes_count = self.validators_count * 10 / 100; - let session_idx = 5; - let lf = leaf(); - let dummy_receipt = test_helpers::dummy_candidate_receipt(lf.hash.clone()); - for _ in 0..dispute_count { - let d = (session_idx, CandidateHash(Hash::random()), DisputeStatus::Active); - self.add_offchain_dispute(d.clone(), local_votes_count, dummy_receipt.clone()); - self.add_onchain_dispute(d, onchain_votes_count); - } - - (session_idx, (local_votes_count - onchain_votes_count) * dispute_count) - } - - pub fn add_unconfirmed_disputes_unknown_onchain( - &mut self, - dispute_count: usize, - ) -> (SessionIndex, usize) { - let local_votes_count = self.validators_count * 10 / 100; - let session_idx = 6; - let lf = leaf(); - let dummy_receipt = test_helpers::dummy_candidate_receipt(lf.hash.clone()); - for _ in 0..dispute_count { - let d = (session_idx, CandidateHash(Hash::random()), DisputeStatus::Active); - self.add_offchain_dispute(d.clone(), local_votes_count, dummy_receipt.clone()); - } - - (session_idx, local_votes_count * dispute_count) - } - fn generate_local_votes( statement_kind: T, start_idx: usize, @@ -596,9 +554,9 @@ fn normal_flow() { // concluded disputes known onchain - these should be ignored let (_, _) = input.add_concluded_disputes_known_onchain(DISPUTES_PER_BATCH); - // confirmed disputes unknown onchain + // active disputes unknown onchain let (second_idx, second_votes) = - input.add_confirmed_disputes_unknown_onchain(DISPUTES_PER_BATCH); + input.add_unconfirmed_disputes_unknown_onchain(DISPUTES_PER_BATCH); let metrics = metrics::Metrics::new_dummy(); let mut vote_queries: usize = 0; @@ -677,8 +635,8 @@ fn many_batches() { // concluded disputes known onchain input.add_concluded_disputes_known_onchain(DISPUTES_PER_PARTITION); - // confirmed disputes unknown onchain - input.add_confirmed_disputes_unknown_onchain(DISPUTES_PER_PARTITION); + // active disputes unknown onchain + input.add_unconfirmed_disputes_unknown_onchain(DISPUTES_PER_PARTITION); let metrics = metrics::Metrics::new_dummy(); let mut vote_queries: usize = 0; @@ -762,30 +720,3 @@ fn votes_above_limit() { ACCEPTABLE_RUNTIME_VOTES_QUERIES_COUNT ); } - -#[test] -fn unconfirmed_are_handled_correctly() { - const VALIDATOR_COUNT: usize = 10; - const DISPUTES_PER_PARTITION: usize = 50; - - let mut input = TestDisputes::new(VALIDATOR_COUNT); - - // Add unconfirmed known onchain -> this should be pushed - let (pushed_idx, _) = input.add_unconfirmed_disputes_known_onchain(DISPUTES_PER_PARTITION); - - // Add unconfirmed unknown onchain -> this should be ignored - input.add_unconfirmed_disputes_unknown_onchain(DISPUTES_PER_PARTITION); - - let metrics = metrics::Metrics::new_dummy(); - let mut vote_queries: usize = 0; - test_harness( - |r| mock_overseer(r, &mut input, &mut vote_queries), - |mut tx: TestSubsystemSender| async move { - let lf = leaf(); - let result = select_disputes(&mut tx, &metrics, &lf).await; - - assert!(result.len() == DISPUTES_PER_PARTITION); - result.iter().for_each(|d| assert!(d.session == pushed_idx)); - }, - ); -} diff --git a/node/core/provisioner/src/disputes/random_selection/mod.rs b/node/core/provisioner/src/disputes/random_selection/mod.rs index 9a827475aa55..a25d3445ac6e 100644 --- a/node/core/provisioner/src/disputes/random_selection/mod.rs +++ b/node/core/provisioner/src/disputes/random_selection/mod.rs @@ -42,35 +42,51 @@ enum RequestType { } /// Request open disputes identified by `CandidateHash` and the `SessionIndex`. -/// Returns only confirmed/concluded disputes. The rest are filtered out. -async fn request_confirmed_disputes( +async fn request_disputes( sender: &mut impl overseer::ProvisionerSenderTrait, active_or_recent: RequestType, ) -> Vec<(SessionIndex, CandidateHash)> { - let (tx, rx) = oneshot::channel(); - let msg = match active_or_recent { - RequestType::Recent => DisputeCoordinatorMessage::RecentDisputes(tx), - RequestType::Active => DisputeCoordinatorMessage::ActiveDisputes(tx), - }; - - sender.send_unbounded_message(msg); - let disputes = match rx.await { - Ok(r) => r, - Err(oneshot::Canceled) => { - gum::warn!( - target: LOG_TARGET, - "Channel closed: unable to gather {:?} disputes", - active_or_recent - ); - Vec::new() + let disputes = match active_or_recent { + RequestType::Recent => { + let (tx, rx) = oneshot::channel(); + let msg = DisputeCoordinatorMessage::RecentDisputes(tx); + sender.send_unbounded_message(msg); + let recent_disputes = match rx.await { + Ok(r) => r, + Err(oneshot::Canceled) => { + gum::warn!( + target: LOG_TARGET, + "Channel closed: unable to gather {:?} disputes", + active_or_recent + ); + Vec::new() + }, + }; + recent_disputes + .into_iter() + .map(|(sesion_idx, candodate_hash, _)| (sesion_idx, candodate_hash)) + .collect::>() + }, + RequestType::Active => { + let (tx, rx) = oneshot::channel(); + let msg = DisputeCoordinatorMessage::ActiveDisputes(tx); + sender.send_unbounded_message(msg); + let active_disputes = match rx.await { + Ok(r) => r, + Err(oneshot::Canceled) => { + gum::warn!( + target: LOG_TARGET, + "Unable to gather {:?} disputes", + active_or_recent + ); + Vec::new() + }, + }; + active_disputes }, }; disputes - .into_iter() - .filter(|d| d.2.is_confirmed_concluded()) - .map(|d| (d.0, d.1)) - .collect() } /// Extend `acc` by `n` random, picks of not-yet-present in `acc` items of `recent` without repetition and additions of recent. @@ -116,7 +132,7 @@ where // In case of an overload condition, we limit ourselves to active disputes, and fill up to the // upper bound of disputes to pass to wasm `fn create_inherent_data`. // If the active ones are already exceeding the bounds, randomly select a subset. - let recent = request_confirmed_disputes(sender, RequestType::Recent).await; + let recent = request_disputes(sender, RequestType::Recent).await; let disputes = if recent.len() > MAX_DISPUTES_FORWARDED_TO_RUNTIME { gum::warn!( target: LOG_TARGET, @@ -124,7 +140,7 @@ where recent.len(), MAX_DISPUTES_FORWARDED_TO_RUNTIME ); - let mut active = request_confirmed_disputes(sender, RequestType::Active).await; + let mut active = request_disputes(sender, RequestType::Active).await; let n_active = active.len(); let active = if active.len() > MAX_DISPUTES_FORWARDED_TO_RUNTIME { let mut picked = Vec::with_capacity(MAX_DISPUTES_FORWARDED_TO_RUNTIME); diff --git a/node/core/provisioner/src/lib.rs b/node/core/provisioner/src/lib.rs index fcb65d66f286..0530d48aabda 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, + leaf.hash.clone(), PRIORITIZED_SELECTION_RUNTIME_VERSION_REQUIREMENT, ) .await @@ -506,7 +506,7 @@ fn select_availability_bitfields( bitfields.len() ); - selected.into_values().collect() + selected.into_iter().map(|(_, b)| b).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 d41955d9bac5..b0881042e957 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/node/core/pvf/Cargo.toml b/node/core/pvf/Cargo.toml index 2aaf408ae56d..8bcecf55475e 100644 --- a/node/core/pvf/Cargo.toml +++ b/node/core/pvf/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-core-pvf" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [[bin]] name = "puppet_worker" @@ -13,7 +13,6 @@ 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" @@ -22,13 +21,10 @@ 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 413d73b4c558..038d8e803299 100644 --- a/node/core/pvf/src/artifacts.rs +++ b/node/core/pvf/src/artifacts.rs @@ -101,8 +101,6 @@ 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 { @@ -173,16 +171,11 @@ 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, - cpu_time_elapsed: Duration, - ) { + pub fn insert_prepared(&mut self, artifact_id: ArtifactId, last_time_needed: SystemTime) { // See the precondition. always!(self .artifacts - .insert(artifact_id, ArtifactState::Prepared { last_time_needed, cpu_time_elapsed }) + .insert(artifact_id, ArtifactState::Prepared { last_time_needed }) .is_none()); } diff --git a/node/core/pvf/src/error.rs b/node/core/pvf/src/error.rs index 01d8c78d39ca..4aca2da4b3ba 100644 --- a/node/core/pvf/src/error.rs +++ b/node/core/pvf/src/error.rs @@ -15,11 +15,10 @@ // along with Polkadot. If not, see . use parity_scale_codec::{Decode, Encode}; -use std::{any::Any, fmt, time::Duration}; +use std::any::Any; -/// Result of PVF preparation performed by the validation host. Contains the elapsed CPU time if -/// successful -pub type PrepareResult = Result; +/// Result of PVF preparation performed by the validation host. +pub type PrepareResult = Result<(), PrepareError>; /// An error that occurred during the prepare part of the PVF pipeline. #[derive(Debug, Clone, Encode, Decode)] @@ -32,46 +31,9 @@ pub enum PrepareError { Panic(String), /// Failed to prepare the PVF due to the time limit. TimedOut, - /// 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), - } - } + /// 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, } /// A error raised during validation of the candidate. @@ -118,17 +80,32 @@ 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`]. // - // We treat the deterministic errors as `InvalidCandidate`. Should those occur they could - // potentially trigger disputes. + // 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. // // All non-deterministic errors are qualified as `InternalError`s and will not trigger // disputes. - if error.is_deterministic() { - ValidationError::InvalidCandidate(InvalidCandidate::PrepareError(error.to_string())) - } else { - ValidationError::InternalError(error.to_string()) + 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()), } } } diff --git a/node/core/pvf/src/execute/mod.rs b/node/core/pvf/src/execute/mod.rs index bc7f035a8b40..86e1d79fc951 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, Response as ExecuteResponse}; +pub use worker::worker_entrypoint; diff --git a/node/core/pvf/src/execute/queue.rs b/node/core/pvf/src/execute/queue.rs index 72b6e450351b..b4c6a66b7719 100644 --- a/node/core/pvf/src/execute/queue.rs +++ b/node/core/pvf/src/execute/queue.rs @@ -225,8 +225,9 @@ fn handle_job_finish( result_tx: ResultSender, ) { let (idle_worker, result) = match outcome { - Outcome::Ok { result_descriptor, duration: _, idle_worker } => { + Outcome::Ok { result_descriptor, duration_ms, 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 105accf18e2b..a0b8337ddc4a 100644 --- a/node/core/pvf/src/execute/worker.rs +++ b/node/core/pvf/src/execute/worker.rs @@ -18,9 +18,8 @@ use crate::{ artifacts::ArtifactPathId, executor_intf::Executor, worker_common::{ - 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, + bytes_to_path, framed_recv, framed_send, path_to_bytes, spawn_with_program_path, + worker_event_loop, IdleWorker, SpawnErr, WorkerHandle, }, LOG_TARGET, }; @@ -28,21 +27,12 @@ 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::{ - sync::{ - atomic::{AtomicBool, Ordering}, - Arc, - }, - thread, - time::Duration, -}; +use std::time::{Duration, Instant}; /// Spawns a new worker with the given program path that acts as the worker and the spawn timeout. /// @@ -58,7 +48,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: Duration, idle_worker: IdleWorker }, + Ok { result_descriptor: ValidationResult, duration_ms: u64, 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 }, @@ -74,8 +64,6 @@ 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, @@ -92,9 +80,7 @@ pub async fn start_work( artifact.path.display(), ); - if let Err(error) = - send_request(&mut stream, &artifact.path, &validation_params, execution_timeout).await - { + if let Err(error) = send_request(&mut stream, &artifact.path, &validation_params).await { gum::warn!( target: LOG_TARGET, worker_pid = %pid, @@ -105,12 +91,6 @@ 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 { @@ -124,47 +104,25 @@ pub async fn start_work( ); return Outcome::IoErr }, - 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 - }, + Ok(response) => response, } }, - _ = Delay::new(timeout).fuse() => { + _ = Delay::new(execution_timeout).fuse() => { gum::warn!( target: LOG_TARGET, worker_pid = %pid, validation_code_hash = ?artifact.id.code_hash, - "execution worker exceeded allotted time for execution", + "execution worker exceeded alloted time for execution", ); - // 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 + return Outcome::HardTimeout; }, }; match response { - Response::Ok { result_descriptor, duration } => - Outcome::Ok { result_descriptor, duration, idle_worker: IdleWorker { stream, pid } }, + Response::Ok { result_descriptor, duration_ms } => + Outcome::Ok { result_descriptor, duration_ms, 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 } }, } @@ -174,14 +132,12 @@ 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, &execution_timeout.encode()).await + framed_send(stream, validation_params).await } -async fn recv_request(stream: &mut UnixStream) -> io::Result<(PathBuf, Vec, Duration)> { +async fn recv_request(stream: &mut UnixStream) -> io::Result<(PathBuf, Vec)> { let artifact_path = framed_recv(stream).await?; let artifact_path = bytes_to_path(&artifact_path).ok_or_else(|| { io::Error::new( @@ -190,14 +146,7 @@ async fn recv_request(stream: &mut UnixStream) -> io::Result<(PathBuf, Vec, ) })?; let params = framed_recv(stream).await?; - 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)) + Ok((artifact_path, params)) } async fn send_response(stream: &mut UnixStream, response: Response) -> io::Result<()> { @@ -215,10 +164,9 @@ async fn recv_response(stream: &mut UnixStream) -> io::Result { } #[derive(Encode, Decode)] -pub enum Response { - Ok { result_descriptor: ValidationResult, duration: Duration }, +enum Response { + Ok { result_descriptor: ValidationResult, duration_ms: u64 }, InvalidCandidate(String), - TimedOut, InternalError(String), } @@ -239,53 +187,15 @@ 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, execution_timeout) = recv_request(&mut stream).await?; + let (artifact_path, params) = recv_request(&mut stream).await?; gum::debug!( target: LOG_TARGET, worker_pid = %std::process::id(), "worker: validating artifact {}", artifact_path.display(), ); - - // 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 - } - + let response = validate_using_artifact(&artifact_path, ¶ms, &executor).await; send_response(&mut stream, response).await?; } }); @@ -295,19 +205,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), + Err(err) => return Response::format_invalid("execute", &err.to_string()), Ok(d) => d, }; - let duration = cpu_time_start.elapsed(); + let duration_ms = validation_started_at.elapsed().as_millis() as u64; let result_descriptor = match ValidationResult::decode(&mut &descriptor_bytes[..]) { Err(err) => @@ -315,5 +225,5 @@ async fn validate_using_artifact( Ok(r) => r, }; - Response::Ok { result_descriptor, duration } + Response::Ok { result_descriptor, duration_ms } } diff --git a/node/core/pvf/src/executor_intf.rs b/node/core/pvf/src/executor_intf.rs index c5578f5f81ad..6827fb636eac 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("runtime version section is not found".to_string()), + None => Err(format!("runtime version section is not found")), } } } diff --git a/node/core/pvf/src/host.rs b/node/core/pvf/src/host.rs index 96aed4eae7a8..5c29072da1c3 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 the preparation outcome is always reported as concluded. + // Note that preparation always succeeds. // // 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_PREPARATION_TIMEOUT`]). +/// This tries to prepare the PVF by compiling the WASM blob within a given timeout ([`PRECHECK_COMPILATION_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, cpu_time_elapsed } => { + ArtifactState::Prepared { last_time_needed } => { *last_time_needed = SystemTime::now(); - let _ = result_sender.send(Ok(*cpu_time_elapsed)); + let _ = result_sender.send(Ok(())); }, 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_PREPARATION_TIMEOUT`]) +/// When preparing for execution, we use a more lenient timeout ([`EXECUTE_COMPILATION_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. @@ -525,16 +525,6 @@ async fn handle_execute_pvf( }, ArtifactState::FailedToProcess { last_time_failed, num_failures, error } => { if can_retry_prepare_after_failure(*last_time_failed, *num_failures, error) { - gum::debug!( - target: LOG_TARGET, - ?pvf, - ?artifact_id, - ?last_time_failed, - %num_failures, - %error, - "handle_execute_pvf: Re-trying failed PVF preparation." - ); - // If we are allowed to retry the failed prepare job, change the state to // Preparing and re-queue this job. *state = ArtifactState::Preparing { @@ -573,7 +563,7 @@ async fn handle_execute_pvf( awaiting_prepare.add(artifact_id, execution_timeout, params, result_tx); } - Ok(()) + return Ok(()) } async fn handle_heads_up( @@ -595,16 +585,6 @@ async fn handle_heads_up( }, ArtifactState::FailedToProcess { last_time_failed, num_failures, error } => { if can_retry_prepare_after_failure(*last_time_failed, *num_failures, error) { - gum::debug!( - target: LOG_TARGET, - ?active_pvf, - ?artifact_id, - ?last_time_failed, - %num_failures, - %error, - "handle_heads_up: Re-trying failed PVF preparation." - ); - // If we are allowed to retry the failed prepare job, change the state to // Preparing and re-queue this job. *state = ArtifactState::Preparing { @@ -721,12 +701,11 @@ async fn handle_prepare_done( } *state = match result { - Ok(cpu_time_elapsed) => - ArtifactState::Prepared { last_time_needed: SystemTime::now(), cpu_time_elapsed }, + Ok(()) => ArtifactState::Prepared { last_time_needed: SystemTime::now() }, Err(error) => ArtifactState::FailedToProcess { last_time_failed: SystemTime::now(), num_failures: *num_failures + 1, - error, + error: error.clone(), }, }; @@ -796,15 +775,16 @@ fn can_retry_prepare_after_failure( num_failures: u32, error: &PrepareError, ) -> bool { - if error.is_deterministic() { - // This error is considered deterministic, so it will probably be reproducible. Don't retry. - return false + 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, } - - // 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. @@ -1036,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, Duration::default()); - builder.artifacts.insert_prepared(artifact_id(2), mock_now, Duration::default()); + builder.artifacts.insert_prepared(artifact_id(1), mock_now); + builder.artifacts.insert_prepared(artifact_id(2), mock_now); let mut test = builder.build(); let mut host = test.host_handle(); @@ -1107,10 +1087,7 @@ mod tests { ); test.from_prepare_queue_tx - .send(prepare::FromQueue { - artifact_id: artifact_id(1), - result: Ok(Duration::default()), - }) + .send(prepare::FromQueue { artifact_id: artifact_id(1), result: Ok(()) }) .await .unwrap(); let result_tx_pvf_1_1 = assert_matches!( @@ -1123,10 +1100,7 @@ mod tests { ); test.from_prepare_queue_tx - .send(prepare::FromQueue { - artifact_id: artifact_id(2), - result: Ok(Duration::default()), - }) + .send(prepare::FromQueue { artifact_id: artifact_id(2), result: Ok(()) }) .await .unwrap(); let result_tx_pvf_2 = assert_matches!( @@ -1175,16 +1149,13 @@ 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(Duration::default()), - }) + .send(prepare::FromQueue { artifact_id: artifact_id(1), result: Ok(()) }) .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(); @@ -1282,10 +1253,7 @@ mod tests { prepare::ToQueue::Enqueue { .. } ); test.from_prepare_queue_tx - .send(prepare::FromQueue { - artifact_id: artifact_id(2), - result: Ok(Duration::default()), - }) + .send(prepare::FromQueue { artifact_id: artifact_id(2), result: Ok(()) }) .await .unwrap(); // The execute queue receives new request, preckecking is finished and we can @@ -1295,7 +1263,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(())); } } @@ -1413,7 +1381,7 @@ mod tests { } // Test that multiple execution requests don't trigger preparation retries if the first one - // failed due to a reproducible error (e.g. Prevalidation). + // failed due to reproducible error (e.g. Prevalidation). #[async_std::test] async fn test_execute_prepare_no_retry() { let mut test = Builder::default().build(); @@ -1543,10 +1511,7 @@ mod tests { ); test.from_prepare_queue_tx - .send(prepare::FromQueue { - artifact_id: artifact_id(1), - result: Ok(Duration::default()), - }) + .send(prepare::FromQueue { artifact_id: artifact_id(1), result: Ok(()) }) .await .unwrap(); diff --git a/node/core/pvf/src/lib.rs b/node/core/pvf/src/lib.rs index 1aabb1100437..ef5f31889237 100644 --- a/node/core/pvf/src/lib.rs +++ b/node/core/pvf/src/lib.rs @@ -16,27 +16,18 @@ #![warn(missing_docs)] -//! 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 +//! A crate that implements PVF validation host. //! //! 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 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. +//! Then using the handle the client can send two types of requests: //! -//! (b) PVF execution. This accepts the PVF [`params`][`polkadot_parachain::primitives::ValidationParams`] +//! (a) 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`. //! -//! (c) Heads up. This request allows to signal that the given PVF may be needed soon and that it +//! (b) 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. @@ -48,7 +39,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 with the background priority. If there +//! Preparation started by a heads up signal always starts in 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. @@ -57,8 +48,6 @@ //! //! # 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". @@ -66,13 +55,11 @@ //! 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 prevalidating and instrumenting PVF wasm code, +//! Preparation workers handle preparation requests by preverifying and instrumenting PVF wasm code, //! and then passing it into the compiler, to prepare the artifact. //! -//! ## 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. +//! 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. //! //! 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 @@ -81,14 +68,12 @@ //! 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 8db105d895ea..20965ec7dbd7 100644 --- a/node/core/pvf/src/metrics.rs +++ b/node/core/pvf/src/metrics.rs @@ -183,9 +183,6 @@ 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, @@ -195,9 +192,6 @@ 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 3319d44e7fb4..9ba64be97555 100644 --- a/node/core/pvf/src/prepare/pool.rs +++ b/node/core/pvf/src/prepare/pool.rs @@ -22,6 +22,7 @@ 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, @@ -231,7 +232,7 @@ fn handle_to_pool( // items concluded; // thus idle token is Some; // qed. - never!("unexpected absence of the idle token in prepare pool"); + never!("unexpected abscence of the idle token in prepare pool"); } } else { // That's a relatively normal situation since the queue may send `start_work` and @@ -293,28 +294,26 @@ 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 } => - 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::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::Unreachable => { if attempt_retire(metrics, spawned, worker) { reply(from_pool, FromPool::Rip(worker))?; @@ -322,14 +321,14 @@ fn handle_mux( Ok(()) }, - Outcome::IoErr => { + Outcome::DidNotMakeIt => { if attempt_retire(metrics, spawned, worker) { reply( from_pool, FromPool::Concluded { worker, rip: true, - result: Err(PrepareError::IoErr), + result: Err(PrepareError::DidNotMakeIt), }, )?; } @@ -378,40 +377,6 @@ 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 e78351af9839..ae0757d80461 100644 --- a/node/core/pvf/src/prepare/queue.rs +++ b/node/core/pvf/src/prepare/queue.rs @@ -364,14 +364,16 @@ 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 { - // see if there are more work available and schedule it. - if let Some(job) = queue.unscheduled.next() { - assign(queue, worker, job).await?; + 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?; + } } } @@ -616,11 +618,7 @@ 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(Duration::default()), - }); + test.send_from_pool(pool::FromPool::Concluded { worker: w, rip: false, result: Ok(()) }); assert_eq!(test.poll_and_recv_from_queue().await.artifact_id, pvf(1).as_artifact_id()); } @@ -649,11 +647,7 @@ 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(Duration::default()), - }); + test.send_from_pool(pool::FromPool::Concluded { worker: w1, rip: false, result: Ok(()) }); assert_matches!(test.poll_and_recv_to_pool().await, pool::ToPool::StartWork { .. }); @@ -699,11 +693,7 @@ 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(Duration::default()), - }); + test.send_from_pool(pool::FromPool::Concluded { worker: w1, rip: false, result: Ok(()) }); assert_eq!(test.poll_and_recv_to_pool().await, pool::ToPool::Kill(w1)); } @@ -729,11 +719,7 @@ 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(Duration::default()), - }); + test.send_from_pool(pool::FromPool::Concluded { worker: w1, rip: true, result: Ok(()) }); // Since there is still work, the queue requested one extra worker to spawn to handle the // remaining enqueued work items. @@ -761,7 +747,7 @@ mod tests { test.send_from_pool(pool::FromPool::Concluded { worker: w1, rip: true, - result: Err(PrepareError::IoErr), + result: Err(PrepareError::DidNotMakeIt), }); 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 5b4212e1e313..1cf512894740 100644 --- a/node/core/pvf/src/prepare/worker.rs +++ b/node/core/pvf/src/prepare/worker.rs @@ -18,9 +18,8 @@ use crate::{ artifacts::CompiledArtifact, error::{PrepareError, PrepareResult}, worker_common::{ - 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, + bytes_to_path, framed_recv, framed_send, path_to_bytes, spawn_with_program_path, + tmpfile_in, worker_event_loop, IdleWorker, SpawnErr, WorkerHandle, }, LOG_TARGET, }; @@ -28,20 +27,10 @@ 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::{ - atomic::{AtomicBool, Ordering}, - Arc, - }, - thread, - time::Duration, -}; +use std::{panic, sync::Arc, time::Duration}; /// Spawns a new worker with the given program path that acts as the worker and the spawn timeout. /// @@ -59,26 +48,18 @@ 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, - /// An IO error occurred while receiving the result from the worker process. + /// The execution was interrupted abruptly and the worker is not available anymore. /// /// This doesn't return an idle worker instance, thus this worker is no longer usable. - IoErr, + DidNotMakeIt, } /// 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>, @@ -95,8 +76,8 @@ pub async fn start_work( artifact_path.display(), ); - 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 { + with_tmp_file(pid, cache_path, |tmp_file| async move { + if let Err(err) = send_request(&mut stream, code, &tmp_file).await { gum::warn!( target: LOG_TARGET, worker_pid = %pid, @@ -107,134 +88,92 @@ 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. In that case we should propagate - // the error to the pool. + // worker may get killed, or something along these lines. // - // 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; + // In that case we should propagate the error to the pool. - 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 - }, + #[derive(Debug)] + enum Selected { + Done(PrepareResult), + IoErr, + Deadline, } - }) - .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(), - ); + 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 + }, + }; - 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) } - }, - } + match selected { + Selected::Done(result) => + Outcome::Concluded { worker: IdleWorker { stream, pid }, result }, + Selected::Deadline => Outcome::TimedOut, + Selected::IoErr => Outcome::DidNotMakeIt, + } + }) + .await } /// 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(stream: UnixStream, pid: u32, cache_path: &Path, f: F) -> Outcome +async fn with_tmp_file(pid: u32, cache_path: &Path, f: F) -> Outcome where Fut: futures::Future, F: FnOnce(PathBuf) -> Fut, @@ -248,10 +187,7 @@ where "failed to create a temp file for the artifact: {:?}", err, ); - return Outcome::CreateTmpFileErr { - worker: IdleWorker { stream, pid }, - err: format!("{:?}", err), - } + return Outcome::DidNotMakeIt }, }; @@ -282,15 +218,13 @@ 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, Duration)> { +async fn recv_request(stream: &mut UnixStream) -> io::Result<(Vec, PathBuf)> { let code = framed_recv(stream).await?; let tmp_file = framed_recv(stream).await?; let tmp_file = bytes_to_path(&tmp_file).ok_or_else(|| { @@ -299,14 +233,7 @@ async fn recv_request(stream: &mut UnixStream) -> io::Result<(Vec, PathBuf, "prepare pvf recv_request: non utf-8 artifact path".to_string(), ) })?; - 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)) + Ok((code, tmp_file)) } /// The entrypoint that the spawned prepare worker should start with. The `socket_path` specifies @@ -314,7 +241,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, preparation_timeout) = recv_request(&mut stream).await?; + let (code, dest) = recv_request(&mut stream).await?; gum::debug!( target: LOG_TARGET, @@ -322,54 +249,18 @@ pub fn worker_entrypoint(socket_path: &str) { "worker: preparing artifact", ); - // 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 { + let result = match prepare_artifact(&code) { 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 `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 an empty `Ok` to the pool + // to indicate the success. gum::debug!( target: LOG_TARGET, @@ -379,7 +270,7 @@ pub fn worker_entrypoint(socket_path: &str) { ); async_std::fs::write(&dest, &compiled_artifact).await?; - Ok(cpu_time_elapsed) + Ok(()) }, }; @@ -388,7 +279,7 @@ pub fn worker_entrypoint(socket_path: &str) { }); } -async fn prepare_artifact(code: &[u8]) -> Result { +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 b80c9195832a..de169be0696b 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 a critical path and requires execution as soon as possible. + /// For example, backing is on critical path and require execution as soon as possible. Critical, } diff --git a/node/core/pvf/src/testing.rs b/node/core/pvf/src/testing.rs index cbd37b06d403..3b64d130fc6a 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 e052bd77ed06..572e3717832b 100644 --- a/node/core/pvf/src/worker_common.rs +++ b/node/core/pvf/src/worker_common.rs @@ -16,55 +16,25 @@ //! Common logic for implementation of worker processes. -use crate::{execute::ExecuteResponse, PrepareError, LOG_TARGET}; +use crate::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( @@ -186,19 +156,7 @@ where let stream = UnixStream::connect(socket_path).await?; let _ = async_std::fs::remove_file(socket_path).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 + event_loop(stream).await }) .unwrap_err(); // it's never `Ok` because it's `Ok(Never)` @@ -211,75 +169,6 @@ 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 @@ -311,8 +200,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 69b6b7d21979..83cbd27b6ed5 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_block_on_parent() { +async fn execute_good_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_block_on_parent() { +async fn execute_bad_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 a6aaf5d369d4..bf0983d50874 100644 --- a/node/core/pvf/tests/it/main.rs +++ b/node/core/pvf/tests/it/main.rs @@ -101,7 +101,6 @@ 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(), @@ -125,14 +124,11 @@ 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 TEST_EXECUTION_TIMEOUT (two workers run in parallel). - let duration = std::time::Instant::now().duration_since(start); - let max_duration = 2 * TEST_EXECUTION_TIMEOUT; + // total time should be < 2 x EXECUTION_TIMEOUT_SEC + const EXECUTION_TIMEOUT_SEC: u64 = 3; assert!( - duration < max_duration, - "Expected duration {}ms to be less than {}ms", - duration.as_millis(), - max_duration.as_millis() + std::time::Instant::now().duration_since(start) < + std::time::Duration::from_secs(EXECUTION_TIMEOUT_SEC * 2) ); } @@ -145,7 +141,6 @@ 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(), @@ -158,15 +153,4 @@ 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 7d8ed54e812b..ff7ea662603c 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -1,20 +1,21 @@ [package] name = "polkadot-node-core-runtime-api" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } -lru = "0.8" +memory-lru = "0.1.1" +parity-util-mem = { version = "0.12.0", default-features = false } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-primitives = { path = "../../../primitives" } -polkadot-node-metrics = { path = "../../metrics" } polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem-types = { path = "../../subsystem-types" } +polkadot-node-subsystem-util = { path = "../../subsystem-util" } [dev-dependencies] sp-api = { 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 d202b46d0da3..0fe9b74dc86d 100644 --- a/node/core/runtime-api/src/cache.rs +++ b/node/core/runtime-api/src/cache.rs @@ -14,9 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use std::{collections::btree_map::BTreeMap, num::NonZeroUsize}; +use std::collections::btree_map::BTreeMap; -use lru::LruCache; +use memory_lru::{MemoryLruCache, ResidentSize}; +use parity_util_mem::{MallocSizeOf, MallocSizeOfExt}; use sp_consensus_babe::Epoch; use polkadot_primitives::v2::{ @@ -27,67 +28,126 @@ use polkadot_primitives::v2::{ ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, }; -/// 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"), -}; +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() + } +} pub(crate) struct RequestResultCache { - 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)>>, + 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)>>, + >, } impl Default for RequestResultCache { fn default() -> Self { Self { - 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), + 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), } } } @@ -97,7 +157,7 @@ impl RequestResultCache { &mut self, relay_parent: &Hash, ) -> Option<&Vec> { - self.authorities.get(relay_parent) + self.authorities.get(relay_parent).map(|v| &v.0) } pub(crate) fn cache_authorities( @@ -105,22 +165,22 @@ impl RequestResultCache { relay_parent: Hash, authorities: Vec, ) { - self.authorities.put(relay_parent, authorities); + self.authorities.insert(relay_parent, VecOfDoesNotAllocate(authorities)); } pub(crate) fn validators(&mut self, relay_parent: &Hash) -> Option<&Vec> { - self.validators.get(relay_parent) + self.validators.get(relay_parent).map(|v| &v.0) } pub(crate) fn cache_validators(&mut self, relay_parent: Hash, validators: Vec) { - self.validators.put(relay_parent, validators); + self.validators.insert(relay_parent, ResidentSizeOf(validators)); } pub(crate) fn validator_groups( &mut self, relay_parent: &Hash, ) -> Option<&(Vec>, GroupRotationInfo)> { - self.validator_groups.get(relay_parent) + self.validator_groups.get(relay_parent).map(|v| &v.0) } pub(crate) fn cache_validator_groups( @@ -128,22 +188,22 @@ impl RequestResultCache { relay_parent: Hash, groups: (Vec>, GroupRotationInfo), ) { - self.validator_groups.put(relay_parent, groups); + self.validator_groups.insert(relay_parent, ResidentSizeOf(groups)); } pub(crate) fn availability_cores(&mut self, relay_parent: &Hash) -> Option<&Vec> { - self.availability_cores.get(relay_parent) + self.availability_cores.get(relay_parent).map(|v| &v.0) } pub(crate) fn cache_availability_cores(&mut self, relay_parent: Hash, cores: Vec) { - self.availability_cores.put(relay_parent, cores); + self.availability_cores.insert(relay_parent, ResidentSizeOf(cores)); } pub(crate) fn persisted_validation_data( &mut self, key: (Hash, ParaId, OccupiedCoreAssumption), ) -> Option<&Option> { - self.persisted_validation_data.get(&key) + self.persisted_validation_data.get(&key).map(|v| &v.0) } pub(crate) fn cache_persisted_validation_data( @@ -151,14 +211,14 @@ impl RequestResultCache { key: (Hash, ParaId, OccupiedCoreAssumption), data: Option, ) { - self.persisted_validation_data.put(key, data); + self.persisted_validation_data.insert(key, ResidentSizeOf(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)) + self.assumed_validation_data.get(&(key.1, key.2)).map(|v| &v.0) } pub(crate) fn cache_assumed_validation_data( @@ -166,14 +226,14 @@ impl RequestResultCache { key: (ParaId, Hash), data: Option<(PersistedValidationData, ValidationCodeHash)>, ) { - self.assumed_validation_data.put(key, data); + self.assumed_validation_data.insert(key, ResidentSizeOf(data)); } pub(crate) fn check_validation_outputs( &mut self, key: (Hash, ParaId, CandidateCommitments), ) -> Option<&bool> { - self.check_validation_outputs.get(&key) + self.check_validation_outputs.get(&key).map(|v| &v.0) } pub(crate) fn cache_check_validation_outputs( @@ -181,11 +241,11 @@ impl RequestResultCache { key: (Hash, ParaId, CandidateCommitments), value: bool, ) { - self.check_validation_outputs.put(key, value); + self.check_validation_outputs.insert(key, ResidentSizeOf(value)); } pub(crate) fn session_index_for_child(&mut self, relay_parent: &Hash) -> Option<&SessionIndex> { - self.session_index_for_child.get(relay_parent) + self.session_index_for_child.get(relay_parent).map(|v| &v.0) } pub(crate) fn cache_session_index_for_child( @@ -193,14 +253,14 @@ impl RequestResultCache { relay_parent: Hash, index: SessionIndex, ) { - self.session_index_for_child.put(relay_parent, index); + self.session_index_for_child.insert(relay_parent, ResidentSizeOf(index)); } pub(crate) fn validation_code( &mut self, key: (Hash, ParaId, OccupiedCoreAssumption), ) -> Option<&Option> { - self.validation_code.get(&key) + self.validation_code.get(&key).map(|v| &v.0) } pub(crate) fn cache_validation_code( @@ -208,7 +268,7 @@ impl RequestResultCache { key: (Hash, ParaId, OccupiedCoreAssumption), value: Option, ) { - self.validation_code.put(key, value); + self.validation_code.insert(key, ResidentSizeOf(value)); } // the actual key is `ValidationCodeHash` (`Hash` is ignored), @@ -217,7 +277,7 @@ impl RequestResultCache { &mut self, key: (Hash, ValidationCodeHash), ) -> Option<&Option> { - self.validation_code_by_hash.get(&key.1) + self.validation_code_by_hash.get(&key.1).map(|v| &v.0) } pub(crate) fn cache_validation_code_by_hash( @@ -225,14 +285,14 @@ impl RequestResultCache { key: ValidationCodeHash, value: Option, ) { - self.validation_code_by_hash.put(key, value); + self.validation_code_by_hash.insert(key, ResidentSizeOf(value)); } pub(crate) fn candidate_pending_availability( &mut self, key: (Hash, ParaId), ) -> Option<&Option> { - self.candidate_pending_availability.get(&key) + self.candidate_pending_availability.get(&key).map(|v| &v.0) } pub(crate) fn cache_candidate_pending_availability( @@ -240,11 +300,11 @@ impl RequestResultCache { key: (Hash, ParaId), value: Option, ) { - self.candidate_pending_availability.put(key, value); + self.candidate_pending_availability.insert(key, ResidentSizeOf(value)); } pub(crate) fn candidate_events(&mut self, relay_parent: &Hash) -> Option<&Vec> { - self.candidate_events.get(relay_parent) + self.candidate_events.get(relay_parent).map(|v| &v.0) } pub(crate) fn cache_candidate_events( @@ -252,22 +312,22 @@ impl RequestResultCache { relay_parent: Hash, events: Vec, ) { - self.candidate_events.put(relay_parent, events); + self.candidate_events.insert(relay_parent, ResidentSizeOf(events)); } pub(crate) fn session_info(&mut self, key: SessionIndex) -> Option<&SessionInfo> { - self.session_info.get(&key) + self.session_info.get(&key).map(|v| &v.0) } pub(crate) fn cache_session_info(&mut self, key: SessionIndex, value: SessionInfo) { - self.session_info.put(key, value); + self.session_info.insert(key, ResidentSizeOf(value)); } pub(crate) fn dmq_contents( &mut self, key: (Hash, ParaId), ) -> Option<&Vec>> { - self.dmq_contents.get(&key) + self.dmq_contents.get(&key).map(|v| &v.0) } pub(crate) fn cache_dmq_contents( @@ -275,14 +335,14 @@ impl RequestResultCache { key: (Hash, ParaId), value: Vec>, ) { - self.dmq_contents.put(key, value); + self.dmq_contents.insert(key, ResidentSizeOf(value)); } pub(crate) fn inbound_hrmp_channels_contents( &mut self, key: (Hash, ParaId), ) -> Option<&BTreeMap>>> { - self.inbound_hrmp_channels_contents.get(&key) + self.inbound_hrmp_channels_contents.get(&key).map(|v| &v.0) } pub(crate) fn cache_inbound_hrmp_channel_contents( @@ -290,22 +350,22 @@ impl RequestResultCache { key: (Hash, ParaId), value: BTreeMap>>, ) { - self.inbound_hrmp_channels_contents.put(key, value); + self.inbound_hrmp_channels_contents.insert(key, ResidentSizeOf(value)); } pub(crate) fn current_babe_epoch(&mut self, relay_parent: &Hash) -> Option<&Epoch> { - self.current_babe_epoch.get(relay_parent) + self.current_babe_epoch.get(relay_parent).map(|v| &v.0) } pub(crate) fn cache_current_babe_epoch(&mut self, relay_parent: Hash, epoch: Epoch) { - self.current_babe_epoch.put(relay_parent, epoch); + self.current_babe_epoch.insert(relay_parent, DoesNotAllocate(epoch)); } pub(crate) fn on_chain_votes( &mut self, relay_parent: &Hash, ) -> Option<&Option> { - self.on_chain_votes.get(relay_parent) + self.on_chain_votes.get(relay_parent).map(|v| &v.0) } pub(crate) fn cache_on_chain_votes( @@ -313,14 +373,14 @@ impl RequestResultCache { relay_parent: Hash, scraped: Option, ) { - self.on_chain_votes.put(relay_parent, scraped); + self.on_chain_votes.insert(relay_parent, ResidentSizeOf(scraped)); } pub(crate) fn pvfs_require_precheck( &mut self, relay_parent: &Hash, ) -> Option<&Vec> { - self.pvfs_require_precheck.get(relay_parent) + self.pvfs_require_precheck.get(relay_parent).map(|v| &v.0) } pub(crate) fn cache_pvfs_require_precheck( @@ -328,14 +388,14 @@ impl RequestResultCache { relay_parent: Hash, pvfs: Vec, ) { - self.pvfs_require_precheck.put(relay_parent, pvfs); + self.pvfs_require_precheck.insert(relay_parent, ResidentSizeOf(pvfs)) } pub(crate) fn validation_code_hash( &mut self, key: (Hash, ParaId, OccupiedCoreAssumption), ) -> Option<&Option> { - self.validation_code_hash.get(&key) + self.validation_code_hash.get(&key).map(|v| &v.0) } pub(crate) fn cache_validation_code_hash( @@ -343,22 +403,22 @@ impl RequestResultCache { key: (Hash, ParaId, OccupiedCoreAssumption), value: Option, ) { - self.validation_code_hash.put(key, value); + self.validation_code_hash.insert(key, ResidentSizeOf(value)); } pub(crate) fn version(&mut self, relay_parent: &Hash) -> Option<&u32> { - self.version.get(relay_parent) + self.version.get(&relay_parent).map(|v| &v.0) } pub(crate) fn cache_version(&mut self, key: Hash, value: u32) { - self.version.put(key, value); + self.version.insert(key, ResidentSizeOf(value)); } pub(crate) fn disputes( &mut self, relay_parent: &Hash, ) -> Option<&Vec<(SessionIndex, CandidateHash, DisputeState)>> { - self.disputes.get(relay_parent) + self.disputes.get(relay_parent).map(|v| &v.0) } pub(crate) fn cache_disputes( @@ -366,7 +426,7 @@ impl RequestResultCache { relay_parent: Hash, value: Vec<(SessionIndex, CandidateHash, DisputeState)>, ) { - self.disputes.put(relay_parent, value); + self.disputes.insert(relay_parent, ResidentSizeOf(value)); } } diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index de42ace3af0c..36355b5759e6 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, request) { + let request = match self.query_cache(relay_parent.clone(), request) { Some(request) => request, None => return, }; diff --git a/node/core/runtime-api/src/metrics.rs b/node/core/runtime-api/src/metrics.rs index d9459d1ad57b..c6affaf38914 100644 --- a/node/core/runtime-api/src/metrics.rs +++ b/node/core/runtime-api/src/metrics.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use polkadot_node_metrics::metrics::{self, prometheus}; +use polkadot_node_subsystem_util::metrics::{self, prometheus}; #[derive(Clone)] pub(crate) struct MetricsInner { diff --git a/node/gum/Cargo.toml b/node/gum/Cargo.toml index 13cb9954df43..c9338cd71a81 100644 --- a/node/gum/Cargo.toml +++ b/node/gum/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "tracing-gum" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" 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 fccd4d218121..7fa597f759fe 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" 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 938ae3853e39..2042d6cb60d7 100644 --- a/node/jaeger/Cargo.toml +++ b/node/jaeger/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "polkadot-node-jaeger" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" 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" @@ -14,6 +15,5 @@ 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.24.1" 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 f33563a3d752..5af77764d9c8 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 tokio::net::UdpSocket::bind("0.0.0.0:0").await { + match async_std::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 c783693ca527..2f78fa43bdf2 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" readme = "README.md" publish = false @@ -23,6 +23,7 @@ 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 815df94a8488..26ea24766e53 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.24.1" +tokio = "1.19.2" 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 ac47e20319d8..9184f7ac20ad 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; + let val = self.period.clone(); 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 6df854072aa6..b6efa097ac28 100644 --- a/node/network/approval-distribution/Cargo.toml +++ b/node/network/approval-distribution/Cargo.toml @@ -1,14 +1,14 @@ [package] name = "polkadot-approval-distribution" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] -polkadot-node-metrics = { path = "../../metrics" } -polkadot-node-network-protocol = { path = "../protocol" } polkadot-node-primitives = { path = "../../primitives" } +polkadot-node-network-protocol = { path = "../protocol" } polkadot-node-subsystem = { path = "../../subsystem" } +polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-primitives = { path = "../../../primitives" } rand = "0.8" diff --git a/node/network/approval-distribution/src/lib.rs b/node/network/approval-distribution/src/lib.rs index bf8a60fcefba..5afae66ae818 100644 --- a/node/network/approval-distribution/src/lib.rs +++ b/node/network/approval-distribution/src/lib.rs @@ -24,7 +24,6 @@ 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::{ @@ -310,7 +309,7 @@ enum MessageSource { impl MessageSource { fn peer_id(&self) -> Option { match self { - Self::Peer(id) => Some(*id), + Self::Peer(id) => Some(id.clone()), Self::Local => None, } } @@ -390,7 +389,7 @@ impl State { ) { let mut new_hashes = HashSet::new(); for meta in &metas { - match self.blocks.entry(meta.hash) { + match self.blocks.entry(meta.hash.clone()) { hash_map::Entry::Vacant(entry) => { let candidates_count = meta.candidates.len(); let mut candidates = Vec::with_capacity(candidates_count); @@ -399,7 +398,7 @@ impl State { entry.insert(BlockEntry { known_by: HashMap::new(), number: meta.number, - parent_hash: meta.parent_hash, + parent_hash: meta.parent_hash.clone(), knowledge: Knowledge::default(), candidates, session: meta.session, @@ -407,7 +406,7 @@ impl State { self.topologies.inc_session_refs(meta.session); - new_hashes.insert(meta.hash); + new_hashes.insert(meta.hash.clone()); // In case there are duplicates, we should only set this if the entry // was vacant. @@ -434,7 +433,7 @@ impl State { &mut self.blocks, &self.topologies, self.peer_views.len(), - *peer_id, + peer_id.clone(), view_intersection, rng, ) @@ -564,8 +563,10 @@ impl State { "Pending assignment", ); - pending - .push((peer_id, PendingMessage::Assignment(assignment, claimed_index))); + pending.push(( + peer_id.clone(), + PendingMessage::Assignment(assignment, claimed_index), + )); continue } @@ -573,7 +574,7 @@ impl State { self.import_and_circulate_assignment( ctx, metrics, - MessageSource::Peer(peer_id), + MessageSource::Peer(peer_id.clone()), assignment, claimed_index, rng, @@ -603,7 +604,7 @@ impl State { "Pending approval", ); - pending.push((peer_id, PendingMessage::Approval(approval_vote))); + pending.push((peer_id.clone(), PendingMessage::Approval(approval_vote))); continue } @@ -611,7 +612,7 @@ impl State { self.import_and_circulate_approval( ctx, metrics, - MessageSource::Peer(peer_id), + MessageSource::Peer(peer_id.clone()), approval_vote, ) .await; @@ -662,7 +663,7 @@ impl State { &mut self.blocks, &self.topologies, self.peer_views.len(), - peer_id, + peer_id.clone(), view, rng, ) @@ -708,7 +709,7 @@ impl State { ) where R: CryptoRng + Rng, { - let block_hash = assignment.block_hash; + let block_hash = assignment.block_hash.clone(); let validator_index = assignment.validator; let entry = match self.blocks.get_mut(&block_hash) { @@ -736,7 +737,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) { + match entry.known_by.entry(peer_id.clone()) { hash_map::Entry::Occupied(mut peer_knowledge) => { let peer_knowledge = peer_knowledge.get_mut(); if peer_knowledge.contains(&message_subject, message_kind) { @@ -760,13 +761,13 @@ impl State { ?message_subject, "Assignment from a peer is out of view", ); - modify_reputation(ctx.sender(), peer_id, COST_UNEXPECTED_MESSAGE).await; + modify_reputation(ctx.sender(), peer_id.clone(), 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, BENEFIT_VALID_MESSAGE).await; + modify_reputation(ctx.sender(), peer_id.clone(), 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); @@ -802,7 +803,8 @@ impl State { ); match result { AssignmentCheckResult::Accepted => { - modify_reputation(ctx.sender(), peer_id, BENEFIT_VALID_MESSAGE_FIRST).await; + modify_reputation(ctx.sender(), peer_id.clone(), 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); @@ -968,7 +970,7 @@ impl State { source: MessageSource, vote: IndirectSignedApprovalVote, ) { - let block_hash = vote.block_hash; + let block_hash = vote.block_hash.clone(); let validator_index = vote.validator; let candidate_index = vote.candidate_index; @@ -1001,7 +1003,7 @@ impl State { } // check if our knowledge of the peer already contains this approval - match entry.known_by.entry(peer_id) { + match entry.known_by.entry(peer_id.clone()) { hash_map::Entry::Occupied(mut knowledge) => { let peer_knowledge = knowledge.get_mut(); if peer_knowledge.contains(&message_subject, message_kind) { @@ -1025,14 +1027,14 @@ impl State { ?message_subject, "Approval from a peer is out of view", ); - modify_reputation(ctx.sender(), peer_id, COST_UNEXPECTED_MESSAGE).await; + modify_reputation(ctx.sender(), peer_id.clone(), 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, BENEFIT_VALID_MESSAGE).await; + modify_reputation(ctx.sender(), peer_id.clone(), 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); } @@ -1063,7 +1065,8 @@ impl State { ); match result { ApprovalCheckResult::Accepted => { - modify_reputation(ctx.sender(), peer_id, BENEFIT_VALID_MESSAGE_FIRST).await; + modify_reputation(ctx.sender(), peer_id.clone(), 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) { @@ -1298,7 +1301,7 @@ impl State { break } - let peer_knowledge = entry.known_by.entry(peer_id).or_default(); + let peer_knowledge = entry.known_by.entry(peer_id.clone()).or_default(); let topology = topologies.get_topology(entry.session); @@ -1332,12 +1335,13 @@ impl State { } } - let message_subject = MessageSubject(block, candidate_index, *validator); + let message_subject = + MessageSubject(block.clone(), candidate_index, validator.clone()); let assignment_message = ( IndirectAssignmentCert { - block_hash: block, - validator: *validator, + block_hash: block.clone(), + validator: validator.clone(), cert: message_state.approval_state.assignment_cert().clone(), }, candidate_index, @@ -1346,8 +1350,8 @@ impl State { let approval_message = message_state.approval_state.approval_signature().map(|signature| { IndirectSignedApprovalVote { - block_hash: block, - validator: *validator, + block_hash: block.clone(), + validator: validator.clone(), candidate_index, signature, } @@ -1370,7 +1374,7 @@ impl State { } } - block = entry.parent_hash; + block = entry.parent_hash.clone(); } } @@ -1382,7 +1386,14 @@ impl State { "Sending assignments to unified peer", ); - send_assignments_batched(sender, assignments_to_send, peer_id).await; + sender + .send_message(NetworkBridgeTxMessage::SendValidationMessage( + vec![peer_id.clone()], + Versioned::V1(protocol_v1::ValidationProtocol::ApprovalDistribution( + protocol_v1::ApprovalDistributionMessage::Assignments(assignments_to_send), + )), + )) + .await; } if !approvals_to_send.is_empty() { @@ -1393,7 +1404,14 @@ impl State { "Sending approvals to unified peer", ); - send_approvals_batched(sender, approvals_to_send, peer_id).await; + sender + .send_message(NetworkBridgeTxMessage::SendValidationMessage( + vec![peer_id], + Versioned::V1(protocol_v1::ValidationProtocol::ApprovalDistribution( + protocol_v1::ApprovalDistributionMessage::Approvals(approvals_to_send), + )), + )) + .await; } } @@ -1540,12 +1558,13 @@ 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 47bae7065a05..c0887b25f7f4 100644 --- a/node/network/approval-distribution/src/metrics.rs +++ b/node/network/approval-distribution/src/metrics.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use polkadot_node_metrics::metrics::{prometheus, Metrics as MetricsTrait}; +use polkadot_node_subsystem_util::metrics::{prometheus, Metrics as MetricsTrait}; /// Approval Distribution metrics. #[derive(Default, Clone)] @@ -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 567cf22f23f1..73aa461752ba 100644 --- a/node/network/approval-distribution/src/tests.rs +++ b/node/network/approval-distribution/src/tests.rs @@ -2276,147 +2276,3 @@ 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 5653e07a8bac..3e0924a4a86b 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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 c6356c9ccd5f..89b634a5ce7e 100644 --- a/node/network/availability-distribution/src/requester/fetch_task/mod.rs +++ b/node/network/availability-distribution/src/requester/fetch_task/mod.rs @@ -326,17 +326,6 @@ 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); @@ -357,13 +346,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) @@ -371,13 +360,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) @@ -385,7 +374,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 be77aa2d023c..c021f1bfb81b 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; +use test_helpers::{mock::make_ferdie_keystore, SingleItemSink}; use super::mock::{make_session_info, OccupiedCoreBuilder}; use crate::LOG_TARGET; @@ -295,7 +295,7 @@ impl TestState { } async fn overseer_signal( - mut tx: mpsc::Sender>, + mut tx: SingleItemSink>, msg: impl Into, ) { let msg = msg.into(); diff --git a/node/network/availability-recovery/Cargo.toml b/node/network/availability-recovery/Cargo.toml index c731808b1b86..a82f2360a0fc 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/node/network/availability-recovery/src/lib.rs b/node/network/availability-recovery/src/lib.rs index 38acfbe88ff9..5a2905082379 100644 --- a/node/network/availability-recovery/src/lib.rs +++ b/node/network/availability-recovery/src/lib.rs @@ -338,7 +338,8 @@ impl RequestChunksFromValidators { index: validator_index, }; - let (req, res) = OutgoingRequest::new(Recipient::Authority(validator), raw_request); + let (req, res) = + OutgoingRequest::new(Recipient::Authority(validator), raw_request.clone()); requests.push(Requests::ChunkFetchingV1(req)); params.metrics.on_chunk_request_issued(); @@ -972,7 +973,7 @@ async fn query_full_data( ctx.send_message(AvailabilityStoreMessage::QueryAvailableData(candidate_hash, tx)) .await; - rx.await.map_err(error::Error::CanceledQueryFullData) + Ok(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 8ac7c2ac6bfb..6e819fbe7cf4 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/node/network/bitfield-distribution/src/lib.rs b/node/network/bitfield-distribution/src/lib.rs index 1bd9230a3787..2a1e3b8d9ef3 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) + Some(peer.clone()) } 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) + .entry(peer.clone()) .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).or_default(); + let received_set = job_data.message_received_from_peer.entry(origin.clone()).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) + .entry(origin.clone()) .or_default() .replace_difference(view) .cloned() @@ -681,10 +681,11 @@ 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) @@ -698,7 +699,7 @@ async fn handle_peer_view_change( .collect(); for (validator, message) in delta_set.into_iter() { - send_tracked_gossip_message(ctx, state, origin, validator, message).await; + send_tracked_gossip_message(ctx, state, origin.clone(), validator, message).await; } } @@ -726,7 +727,11 @@ async fn send_tracked_gossip_message( "Sending gossip message" ); - job_data.message_sent_to_peer.entry(dest).or_default().insert(validator.clone()); + job_data + .message_sent_to_peer + .entry(dest.clone()) + .or_default() + .insert(validator.clone()); ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( vec![dest], @@ -755,14 +760,14 @@ async fn query_basics( // query validators ctx.send_message(RuntimeApiMessage::Request( - relay_parent, + relay_parent.clone(), RuntimeApiRequest::Validators(validators_tx), )) .await; // query signing context ctx.send_message(RuntimeApiMessage::Request( - relay_parent, + relay_parent.clone(), RuntimeApiRequest::SessionIndexForChild(session_tx), )) .await; diff --git a/node/network/bridge/Cargo.toml b/node/network/bridge/Cargo.toml index 2d68cdb4d808..4ca402536000 100644 --- a/node/network/bridge/Cargo.toml +++ b/node/network/bridge/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-network-bridge" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] always-assert = "0.1" @@ -14,10 +14,10 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } -polkadot-node-metrics = { path = "../../metrics"} -polkadot-node-network-protocol = { path = "../protocol" } polkadot-node-subsystem = {path = "../../subsystem" } polkadot-overseer = { path = "../../overseer" } +polkadot-node-network-protocol = { path = "../protocol" } +polkadot-node-subsystem-util = { path = "../../subsystem-util"} parking_lot = "0.12.0" bytes = "1" fatality = "0.0.6" @@ -26,7 +26,6 @@ thiserror = "1" [dev-dependencies] assert_matches = "1.4.0" polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } -polkadot-node-subsystem-util = { path = "../../subsystem-util"} sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } futures-timer = "3" diff --git a/node/network/bridge/src/metrics.rs b/node/network/bridge/src/metrics.rs index 5ca392ee33f8..52b3629a66ad 100644 --- a/node/network/bridge/src/metrics.rs +++ b/node/network/bridge/src/metrics.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see . use super::{PeerSet, ProtocolVersion}; -use polkadot_node_metrics::metrics::{self, prometheus}; +use polkadot_node_subsystem_util::metrics::{self, prometheus}; /// Metrics for the network bridge. #[derive(Clone, Default)] diff --git a/node/network/bridge/src/network.rs b/node/network/bridge/src/network.rs index ec7623bb2e1d..9b326cbbfb38 100644 --- a/node/network/bridge/src/network.rs +++ b/node/network/bridge/src/network.rs @@ -161,12 +161,6 @@ 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. @@ -180,7 +174,7 @@ impl Network for Arc> { Ok(v) => v, Err(_) => continue, }; - NetworkService::add_known_address(self, peer_id, addr); + NetworkService::add_known_address(&*self, peer_id.clone(), addr); found_peer_id = Some(peer_id); } found_peer_id @@ -202,16 +196,8 @@ 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 1d3052d3a218..0cb89b19b0ee 100644 --- a/node/network/bridge/src/rx/mod.rs +++ b/node/network/bridge/src/rx/mod.rs @@ -125,7 +125,7 @@ where let future = run_network_in(self, ctx, network_stream) .map_err(|e| SubsystemError::with_origin("network-bridge", e)) .boxed(); - SpawnedSubsystem { name: "network-bridge-rx-subsystem", future } + SpawnedSubsystem { name: "network-bridge-subsystem", future } } } @@ -213,7 +213,7 @@ where PeerSet::Collation => &mut shared.collation_peers, }; - match peer_map.entry(peer) { + match peer_map.entry(peer.clone()) { 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, + peer.clone(), role, version, maybe_authority, ), - NetworkBridgeEvent::PeerViewChange(peer, View::default()), + NetworkBridgeEvent::PeerViewChange(peer.clone(), View::default()), ], &mut sender, ) @@ -259,12 +259,12 @@ where dispatch_collation_events_to_all( vec![ NetworkBridgeEvent::PeerConnected( - peer, + peer.clone(), role, version, maybe_authority, ), - NetworkBridgeEvent::PeerViewChange(peer, View::default()), + NetworkBridgeEvent::PeerViewChange(peer.clone(), View::default()), ], &mut sender, ) @@ -421,7 +421,7 @@ where Some(ValidationVersion::V1.into()) { handle_v1_peer_messages::( - remote, + remote.clone(), PeerSet::Validation, &mut shared.0.lock().validation_peers, v_messages, @@ -442,7 +442,7 @@ where }; for report in reports { - network_service.report_peer(remote, report); + network_service.report_peer(remote.clone(), report); } dispatch_validation_events_to_all(events, &mut sender).await; @@ -454,7 +454,7 @@ where Some(CollationVersion::V1.into()) { handle_v1_peer_messages::( - remote, + remote.clone(), PeerSet::Collation, &mut shared.0.lock().collation_peers, c_messages, @@ -475,7 +475,7 @@ where }; for report in reports { - network_service.report_peer(remote, report); + network_service.report_peer(remote.clone(), 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, peer_data.view.clone()) + NetworkBridgeEvent::PeerViewChange(peer.clone(), peer_data.view.clone()) } }, WireMessage::ProtocolMessage(message) => - NetworkBridgeEvent::PeerMessage(peer, message.into()), + NetworkBridgeEvent::PeerMessage(peer.clone(), message.into()), }) } diff --git a/node/network/bridge/src/tx/mod.rs b/node/network/bridge/src/tx/mod.rs index 32a0ecaf7510..47f095fdf273 100644 --- a/node/network/bridge/src/tx/mod.rs +++ b/node/network/bridge/src/tx/mod.rs @@ -90,7 +90,7 @@ where let future = run_network_out(self, ctx) .map_err(|e| SubsystemError::with_origin("network-bridge", e)) .boxed(); - SpawnedSubsystem { name: "network-bridge-tx-subsystem", future } + SpawnedSubsystem { name: "network-bridge-subsystem", future } } } diff --git a/node/network/collator-protocol/Cargo.toml b/node/network/collator-protocol/Cargo.toml index c7618baa3cd7..cae4ec2b1730 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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 f7b27583a6dd..7a603a8a404a 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], + vec![peer.clone()], Versioned::V1(protocol_v1::CollationProtocol::CollatorProtocol(wire_message)), )) .await; @@ -707,8 +707,11 @@ async fn handle_incoming_peer_message( "AdvertiseCollation message is not expected on the collator side of the protocol", ); - ctx.send_message(NetworkBridgeTxMessage::ReportPeer(origin, COST_UNEXPECTED_MESSAGE)) - .await; + ctx.send_message(NetworkBridgeTxMessage::ReportPeer( + origin.clone(), + 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)) @@ -835,14 +838,14 @@ async fn handle_peer_view_change( peer_id: PeerId, view: View, ) { - let current = state.peer_views.entry(peer_id).or_default(); + let current = state.peer_views.entry(peer_id.clone()).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).await; + advertise_collation(ctx, state, added, peer_id.clone()).await; } } diff --git a/node/network/collator-protocol/src/validator_side/mod.rs b/node/network/collator-protocol/src/validator_side/mod.rs index 1442fbcc2bcb..b2b3dc4824b5 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)) + Ok((state.collator_id.clone(), state.para_id.clone())) } else { Err(AdvertisementError::Duplicate) }, @@ -375,19 +375,22 @@ impl ActiveParas { .await .await .ok() - .and_then(|x| x.ok()); + .map(|x| x.ok()) + .flatten(); let mg = polkadot_node_subsystem_util::request_validator_groups(relay_parent, sender) .await .await .ok() - .and_then(|x| x.ok()); + .map(|x| x.ok()) + .flatten(); let mc = polkadot_node_subsystem_util::request_availability_cores(relay_parent, sender) .await .await .ok() - .and_then(|x| x.ok()); + .map(|x| x.ok()) + .flatten(); let (validators, groups, rotation_info, cores) = match (mv, mg, mc) { (Some(v), Some((g, r)), Some(c)) => (v, g, r, c), @@ -483,7 +486,12 @@ struct PendingCollation { impl PendingCollation { fn new(relay_parent: Hash, para_id: &ParaId, peer_id: &PeerId) -> Self { - Self { relay_parent, para_id: *para_id, peer_id: *peer_id, commitments_hash: None } + Self { + relay_parent, + para_id: para_id.clone(), + peer_id: peer_id.clone(), + commitments_hash: None, + } } } @@ -621,9 +629,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)) + peer_data.iter().find_map(|(peer, data)| { + data.collator_id().filter(|c| c == &collator_id).map(|_| peer.clone()) + }) } async fn disconnect_peer(sender: &mut impl overseer::CollatorProtocolSenderTrait, peer_id: PeerId) { @@ -647,7 +655,9 @@ 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).boxed()); + state + .collation_fetch_timeouts + .push(timeout(id.clone(), relay_parent.clone()).boxed()); if let Some(peer_data) = state.peer_data.get(&peer_id) { if peer_data.has_advertised(&relay_parent) { @@ -719,7 +729,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).or_default(); + let peer_data = state.peer_data.entry(peer_id.clone()).or_default(); peer_data.update_view(view); state @@ -873,7 +883,7 @@ async fn process_incoming_peer_message( "Declared as collator for unneeded para", ); - modify_reputation(ctx.sender(), origin, COST_UNNEEDED_COLLATOR).await; + modify_reputation(ctx.sender(), origin.clone(), COST_UNNEEDED_COLLATOR).await; gum::trace!(target: LOG_TARGET, "Disconnecting unneeded collator"); disconnect_peer(ctx.sender(), origin).await; } @@ -1003,7 +1013,7 @@ async fn handle_our_view_change( .span_per_head() .iter() .filter(|v| !old_view.contains(&v.0)) - .map(|v| (*v.0, v.1.clone())) + .map(|v| (v.0.clone(), v.1.clone())) .collect(); added.into_iter().for_each(|(h, s)| { @@ -1036,7 +1046,7 @@ async fn handle_our_view_change( ?para_id, "Disconnecting peer on view change (not current parachain id)" ); - disconnect_peer(ctx.sender(), *peer_id).await; + disconnect_peer(ctx.sender(), peer_id.clone()).await; } } } @@ -1244,7 +1254,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, rep)); + reputation_changes.push((pending_collation.peer_id.clone(), rep)); } } requested_collations.retain(|k, _| retained_requested.contains(k)); @@ -1327,7 +1337,11 @@ 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, candidate_receipt, pov)) + .send_message(CandidateBackingMessage::Second( + relay_parent.clone(), + candidate_receipt, + pov, + )) .await; entry.insert(collation_event); @@ -1352,7 +1366,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).await; + disconnect_peer(sender, peer.clone()).await; } } } diff --git a/node/network/dispute-distribution/Cargo.toml b/node/network/dispute-distribution/Cargo.toml index 4db7b854a74d..d70d41f6916f 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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 b84be7b2dfde..158c66e20655 100644 --- a/node/network/dispute-distribution/src/receiver/mod.rs +++ b/node/network/dispute-distribution/src/receiver/mod.rs @@ -302,12 +302,6 @@ 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], @@ -430,7 +424,7 @@ where ); return }, - Some(vote) => (vote.0.session_index(), *vote.0.candidate_hash()), + Some(vote) => (vote.0.session_index(), vote.0.candidate_hash().clone()), }; 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 a54033945d6f..331fe12c61e2 100644 --- a/node/network/dispute-distribution/src/sender/mod.rs +++ b/node/network/dispute-distribution/src/sender/mod.rs @@ -108,6 +108,8 @@ 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) { @@ -116,8 +118,6 @@ 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,12 +169,10 @@ impl DisputeSender { // Iterates in order of insertion: let mut should_rate_limit = true; - for (candidate_hash, dispute) in self.disputes.iter_mut() { + for dispute in self.disputes.values_mut() { if have_new_sessions || dispute.has_failed_sends() { if should_rate_limit { - self.rate_limit - .limit("while going through new sessions/failed sends", *candidate_hash) - .await; + self.rate_limit.limit().await; } let sends_happened = dispute .refresh_sends(ctx, runtime, &self.active_sessions, &self.metrics) @@ -195,7 +193,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 { - // Rate limiting handled inside `start_send_for_dispute` (calls `start_sender`). + self.rate_limit.limit().await; self.start_send_for_dispute(ctx, runtime, dispute).await?; } Ok(()) @@ -279,7 +277,7 @@ impl DisputeSender { Some(votes) => votes, }; - let our_valid_vote = votes.valid.raw().get(&our_index); + let our_valid_vote = votes.valid.get(&our_index); let our_invalid_vote = votes.invalid.get(&our_index); @@ -291,7 +289,7 @@ impl DisputeSender { } else if let Some(our_invalid_vote) = our_invalid_vote { // Get some valid vote as well: let valid_vote = - votes.valid.raw().iter().next().ok_or(JfyiError::MissingVotesFromCoordinator)?; + votes.valid.iter().next().ok_or(JfyiError::MissingVotesFromCoordinator)?; (valid_vote, (&our_index, our_invalid_vote)) } else { // There is no vote from us yet - nothing to do. @@ -304,7 +302,7 @@ impl DisputeSender { .get(*valid_index) .ok_or(JfyiError::InvalidStatementFromCoordinator)?; let valid_signed = SignedDisputeStatement::new_checked( - DisputeStatement::Valid(*kind), + DisputeStatement::Valid(kind.clone()), candidate_hash, session_index, valid_public.clone(), @@ -319,7 +317,7 @@ impl DisputeSender { .get(*invalid_index) .ok_or(JfyiError::InvalidValidatorIndexFromCoordinator)?; let invalid_signed = SignedDisputeStatement::new_checked( - DisputeStatement::Invalid(*kind), + DisputeStatement::Invalid(kind.clone()), candidate_hash, session_index, invalid_public.clone(), @@ -385,23 +383,16 @@ impl RateLimit { } /// Wait until ready and prepare for next call. - /// - /// 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) { + async fn limit(&mut self) { // 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(()), @@ -439,9 +430,7 @@ async fn get_active_disputes( // Caller scope is in `update_leaves` and this is bounded by fork count. ctx.send_unbounded_message(DisputeCoordinatorMessage::ActiveDisputes(tx)); - rx.await - .map_err(|_| JfyiError::AskActiveDisputesCanceled) - .map(|disputes| disputes.into_iter().map(|d| (d.0, d.1)).collect()) + rx.await.map_err(|_| JfyiError::AskActiveDisputesCanceled) } /// Get all locally available dispute votes for a given dispute. diff --git a/node/network/dispute-distribution/src/sender/send_task.rs b/node/network/dispute-distribution/src/sender/send_task.rs index 3852adbc141b..89b5c099bde9 100644 --- a/node/network/dispute-distribution/src/sender/send_task.rs +++ b/node/network/dispute-distribution/src/sender/send_task.rs @@ -140,38 +140,21 @@ 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: Vec<_> = new_authorities + let add_authorities = 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/dispute-distribution/src/tests/mod.rs b/node/network/dispute-distribution/src/tests/mod.rs index d6381239965b..56cdd467fd62 100644 --- a/node/network/dispute-distribution/src/tests/mod.rs +++ b/node/network/dispute-distribution/src/tests/mod.rs @@ -45,7 +45,7 @@ use polkadot_node_network_protocol::{ request_response::{v1::DisputeResponse, Recipient, Requests}, IfDisconnected, }; -use polkadot_node_primitives::{CandidateVotes, DisputeStatus, UncheckedDisputeMessage}; +use polkadot_node_primitives::{CandidateVotes, UncheckedDisputeMessage}; use polkadot_node_subsystem::{ messages::{ AllMessages, DisputeCoordinatorMessage, DisputeDistributionMessage, ImportStatementsResult, @@ -658,7 +658,7 @@ fn dispute_retries_and_works_across_session_boundaries() { Some(old_head), MOCK_SESSION_INDEX, None, - vec![(MOCK_SESSION_INDEX, candidate.hash(), DisputeStatus::Active)], + vec![(MOCK_SESSION_INDEX, candidate.hash())], ) .await; @@ -673,7 +673,7 @@ fn dispute_retries_and_works_across_session_boundaries() { Some(old_head2), MOCK_NEXT_SESSION_INDEX, Some(MOCK_NEXT_SESSION_INFO.clone()), - vec![(MOCK_SESSION_INDEX, candidate.hash(), DisputeStatus::Active)], + vec![(MOCK_SESSION_INDEX, candidate.hash())], ) .await; @@ -832,7 +832,7 @@ async fn activate_leaf( // New session if we expect the subsystem to request it. new_session: Option, // Currently active disputes to send to the subsystem. - active_disputes: Vec<(SessionIndex, CandidateHash, DisputeStatus)>, + active_disputes: Vec<(SessionIndex, CandidateHash)>, ) { let has_active_disputes = !active_disputes.is_empty(); handle @@ -934,10 +934,7 @@ async fn handle_subsystem_startup( None, MOCK_SESSION_INDEX, Some(MOCK_SESSION_INFO.clone()), - ongoing_dispute - .into_iter() - .map(|c| (MOCK_SESSION_INDEX, c, DisputeStatus::Active)) - .collect(), + ongoing_dispute.into_iter().map(|c| (MOCK_SESSION_INDEX, c)).collect(), ) .await; relay_parent diff --git a/node/network/gossip-support/Cargo.toml b/node/network/gossip-support/Cargo.toml index 2236b72d3c77..fa99366c098d 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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 2cfe1ce58e61..c3fa1faedb67 100644 --- a/node/network/protocol/Cargo.toml +++ b/node/network/protocol/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-node-network-protocol" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" 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 2ae43c07c355..100ef66957bd 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); + grid_subset.peers_x.insert(p.clone()); } } @@ -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); + grid_subset.peers_y.insert(p.clone()); } } diff --git a/node/network/protocol/src/lib.rs b/node/network/protocol/src/lib.rs index 744217133eed..169d916ce6f9 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(&self) -> impl Iterator { + pub fn iter<'a>(&'a 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 22eddc44c42f..d9d2925e594d 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. -pub const MAX_NOTIFICATION_SIZE: u64 = 100 * 1024; +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 6ce0c883cc6c..d24537e219c7 100644 --- a/node/network/protocol/src/request_response/mod.rs +++ b/node/network/protocol/src/request_response/mod.rs @@ -126,17 +126,6 @@ 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 @@ -145,19 +134,10 @@ 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(); - match self { + let (tx, rx) = mpsc::channel(self.get_channel_size()); + let cfg = match self { Protocol::ChunkFetchingV1 => RequestResponseConfig { name, fallback_names, @@ -165,7 +145,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: tx, + inbound_queue: Some(tx), }, Protocol::CollationFetchingV1 => RequestResponseConfig { name, @@ -174,7 +154,7 @@ impl Protocol { max_response_size: POV_RESPONSE_SIZE, // Taken from initial implementation in collator protocol: request_timeout: POV_REQUEST_TIMEOUT_CONNECTED, - inbound_queue: tx, + inbound_queue: Some(tx), }, Protocol::PoVFetchingV1 => RequestResponseConfig { name, @@ -182,7 +162,7 @@ impl Protocol { max_request_size: 1_000, max_response_size: POV_RESPONSE_SIZE, request_timeout: POV_REQUEST_TIMEOUT_CONNECTED, - inbound_queue: tx, + inbound_queue: Some(tx), }, Protocol::AvailableDataFetchingV1 => RequestResponseConfig { name, @@ -191,7 +171,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: tx, + inbound_queue: Some(tx), }, Protocol::StatementFetchingV1 => RequestResponseConfig { name, @@ -209,7 +189,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: tx, + inbound_queue: Some(tx), }, Protocol::DisputeSendingV1 => RequestResponseConfig { name, @@ -219,9 +199,10 @@ impl Protocol { /// plenty. max_response_size: 100, request_timeout: DISPUTE_REQUEST_TIMEOUT, - inbound_queue: tx, + inbound_queue: Some(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 5ebdcd01b7ab..1490ed01142a 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" -version.workspace = true -authors.workspace = true -edition.workspace = true +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/node/network/statement-distribution/src/lib.rs b/node/network/statement-distribution/src/lib.rs index 271072ab1031..055fd4123f9a 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); + self.seconded_counts.entry(fingerprint.1).or_default().note_local(h.clone()); let was_known = self.is_known_candidate(h); - self.sent_candidates.insert(*h); + self.sent_candidates.insert(h.clone()); !was_known }, CompactStatement::Valid(_) => false, @@ -345,7 +345,7 @@ impl PeerRelayParentKnowledge { .seconded_counts .entry(fingerprint.1) .or_insert_with(Default::default) - .note_remote(*h); + .note_remote(h.clone()); 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); + self.received_candidates.insert(candidate_hash.clone()); Ok(fresh) } @@ -1025,15 +1025,13 @@ 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) - } else { - None - } - }, - ) + .filter_map(|(peer, data)| { + if data.can_send(&relay_parent, &fingerprint) { + Some(peer.clone()) + } else { + None + } + }) .collect(); let good_peers: HashSet<&PeerId> = peers_to_send.iter().collect(); @@ -1089,7 +1087,7 @@ async fn circulate_statement<'a, Context>( "Sending statement", ); ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( - peers_to_send.iter().map(|(p, _)| *p).collect(), + peers_to_send.iter().map(|(p, _)| p.clone()).collect(), payload, )) .await; @@ -1128,8 +1126,11 @@ async fn send_statements_about( statement = ?statement.statement, "Sending statement", ); - ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage(vec![peer], payload)) - .await; + ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( + vec![peer.clone()], + payload, + )) + .await; metrics.on_statement_distributed(); } @@ -1160,8 +1161,11 @@ async fn send_statements( statement = ?statement.statement, "Sending statement" ); - ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage(vec![peer], payload)) - .await; + ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( + vec![peer.clone()], + payload, + )) + .await; metrics.on_statement_distributed(); } @@ -1427,7 +1431,7 @@ async fn handle_incoming_message<'a, Context>( } let fingerprint = message.get_fingerprint(); - let candidate_hash = *fingerprint.0.candidate_hash(); + let candidate_hash = fingerprint.0.candidate_hash().clone(); let handle_incoming_span = active_head .span .child("handle-incoming") @@ -1547,7 +1551,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, + peer.clone(), peer_data, ctx, relay_parent, @@ -1623,7 +1627,7 @@ async fn update_peer_view_and_maybe_send_unlocked( continue } if let Some(active_head) = active_heads.get(&new) { - send_statements(peer, peer_data, ctx, new, active_head, metrics).await; + send_statements(peer.clone(), peer_data, ctx, new, active_head, metrics).await; } } } @@ -1706,7 +1710,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 6acbf63eadc0..6bc6f724ae09 100644 --- a/node/network/statement-distribution/src/metrics.rs +++ b/node/network/statement-distribution/src/metrics.rs @@ -17,10 +17,8 @@ use polkadot_node_subsystem_util::metrics::{self, prometheus}; /// Buckets more suitable for checking the typical latency values -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, -]; +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]; #[derive(Clone)] struct MetricsInner { diff --git a/node/overseer/Cargo.toml b/node/overseer/Cargo.toml index 52310422eb4d..3aaa74e22da1 100644 --- a/node/overseer/Cargo.toml +++ b/node/overseer/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-overseer" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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.4" +orchestra = "0.0.2" 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,4 +34,3 @@ 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 cf72774826ea..84ecdd1e8a89 100644 --- a/node/overseer/src/dummy.rs +++ b/node/overseer/src/dummy.rs @@ -22,9 +22,6 @@ 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)] @@ -59,10 +56,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( +pub fn dummy_overseer_builder<'a, Spawner, SupportsParachains>( spawner: Spawner, supports_parachains: SupportsParachains, - registry: Option<&Registry>, + registry: Option<&'a Registry>, ) -> Result< InitializedOverseerBuilder< SpawnGlue, @@ -100,11 +97,11 @@ where } /// Create an overseer with all subsystem being `Sub`. -pub fn one_for_all_overseer_builder( +pub fn one_for_all_overseer_builder<'a, Spawner, SupportsParachains, Sub>( spawner: Spawner, supports_parachains: SupportsParachains, subsystem: Sub, - registry: Option<&Registry>, + registry: Option<&'a Registry>, ) -> Result< InitializedOverseerBuilder< SpawnGlue, diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index 6253f8b3e264..70dbe92b2432 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -74,16 +74,15 @@ 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, - CandidateBackingMessage, CandidateValidationMessage, ChainApiMessage, ChainSelectionMessage, - CollationGenerationMessage, CollatorProtocolMessage, DisputeCoordinatorMessage, - DisputeDistributionMessage, GossipSupportMessage, NetworkBridgeRxMessage, - NetworkBridgeTxMessage, ProvisionerMessage, RuntimeApiMessage, StatementDistributionMessage, + BitfieldSigningMessage, CandidateBackingMessage, CandidateValidationMessage, ChainApiMessage, + ChainSelectionMessage, CollationGenerationMessage, CollatorProtocolMessage, + DisputeCoordinatorMessage, DisputeDistributionMessage, GossipSupportMessage, + NetworkBridgeRxMessage, NetworkBridgeTxMessage, ProvisionerMessage, PvfCheckerMessage, + RuntimeApiMessage, StatementDistributionMessage, }; - pub use polkadot_node_subsystem_types::{ errors::{SubsystemError, SubsystemResult}, jaeger, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, OverseerSignal, @@ -102,6 +101,8 @@ 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, @@ -117,14 +118,11 @@ 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); @@ -459,7 +457,7 @@ pub struct Overseer { ])] candidate_validation: CandidateValidation, - #[subsystem(sends: [ + #[subsystem(PvfCheckerMessage, sends: [ CandidateValidationMessage, RuntimeApiMessage, ])] @@ -499,7 +497,7 @@ pub struct Overseer { ])] availability_recovery: AvailabilityRecovery, - #[subsystem(blocking, sends: [ + #[subsystem(blocking, BitfieldSigningMessage, sends: [ AvailabilityStoreMessage, RuntimeApiMessage, BitfieldDistributionMessage, @@ -688,7 +686,7 @@ where subsystem_meters .iter() .cloned() - .flatten() + .filter_map(|x| x) .map(|(name, ref meters)| (name, meters.read())), ); @@ -712,15 +710,7 @@ where } /// Run the `Overseer`. - /// - /// 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<()> { + pub async fn run(mut self) -> SubsystemResult<()> { let metrics = self.metrics.clone(); spawn_metronome_metrics(&mut self, metrics)?; @@ -871,7 +861,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 deleted file mode 100644 index 670762a4935c..000000000000 --- a/node/overseer/src/memory_stats.rs +++ /dev/null @@ -1,53 +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 . - -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 bb7d98a68f2e..71295dd2238c 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 memory_stats::MemoryAllocationSnapshot; +use parity_util_mem::MemoryAllocationSnapshot; /// Overseer Prometheus metrics. #[derive(Clone)] diff --git a/node/overseer/src/tests.rs b/node/overseer/src/tests.rs index ca84f033b599..dee4c7cbbba9 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_inner().fuse(); + let overseer_fut = overseer.run().fuse(); pin_mut!(overseer_fut); @@ -302,7 +302,7 @@ fn overseer_ends_on_subsystem_exit() { .build() .unwrap(); - overseer.run_inner().await.unwrap(); + overseer.run().await.unwrap(); }) } @@ -400,7 +400,7 @@ fn overseer_start_stop_works() { .unwrap(); let mut handle = Handle::new(handle); - let overseer_fut = overseer.run_inner().fuse(); + let overseer_fut = overseer.run().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_inner().fuse(); + let overseer_fut = overseer.run().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_inner().fuse(); + let overseer_fut = overseer.run().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_inner().fuse(); + let overseer_fut = overseer.run().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_inner().fuse(); + let overseer_fut = overseer.run().fuse(); pin_mut!(overseer_fut); diff --git a/node/primitives/Cargo.toml b/node/primitives/Cargo.toml index b865298f8467..3f0865b1e033 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 c31ff1ecb283..1a943f8dcee6 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, + kind: valid_kind.clone(), }; let invalid_vote = InvalidDisputeVote { validator_index: invalid_index, signature: invalid_statement.validator_signature().clone(), - kind: *invalid_kind, + kind: invalid_kind.clone(), }; Ok(DisputeMessage(UncheckedDisputeMessage { diff --git a/node/primitives/src/disputes/mod.rs b/node/primitives/src/disputes/mod.rs index bad2ddbffc46..ee047c7bcc22 100644 --- a/node/primitives/src/disputes/mod.rs +++ b/node/primitives/src/disputes/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::collections::{ - btree_map::{Entry as Bentry, Keys as Bkeys}, - BTreeMap, BTreeSet, -}; +use std::collections::{BTreeMap, BTreeSet}; use parity_scale_codec::{Decode, Encode}; @@ -52,7 +49,7 @@ pub struct CandidateVotes { /// The receipt of the candidate itself. pub candidate_receipt: CandidateReceipt, /// Votes of validity, sorted by validator index. - pub valid: ValidCandidateVotes, + pub valid: BTreeMap, /// Votes of invalidity, sorted by validator index. pub invalid: BTreeMap, } @@ -72,99 +69,6 @@ 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 da0a0eca80be..e75181b900e9 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, 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, + BlakeTwo256, CandidateCommitments, CandidateHash, CollatorPair, CommittedCandidateReceipt, + CompactStatement, EncodeAs, Hash, HashT, HeadData, Id as ParaId, OutboundHrmpMessage, + PersistedValidationData, SessionIndex, Signed, UncheckedSigned, UpwardMessage, ValidationCode, + ValidatorIndex, MAX_CODE_SIZE, MAX_POV_SIZE, }; pub use sp_consensus_babe::{ AllowedSlots as BabeAllowedSlots, BabeEpochConfiguration, Epoch as BabeEpoch, @@ -73,28 +73,8 @@ 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` @@ -403,7 +383,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 approval checks. + /// The persisted validation data needed for secondary checks. pub validation_data: PersistedValidationData, } diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index 8b2771b7e18d..e6e073546a13 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -1,20 +1,18 @@ [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", package = "sp-beefy" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master" } 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" } @@ -71,8 +69,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.13.0" -kvdb-rocksdb = { version = "0.17.0", optional = true } +kvdb = "0.12.0" +kvdb-rocksdb = { version = "0.16.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 581f40aff4d6..5d369a723dfb 100644 --- a/node/service/chain-specs/kusama.json +++ b/node/service/chain-specs/kusama.json @@ -21,11 +21,7 @@ "/dns/kusama-bootnode-1.paritytech.net/tcp/30333/p2p/12D3KooWQKqane1SqWJNWMQkbia9qiMWXkcHtAdfW5eVF8hbwEDw", "/dns/kusama-bootnode.dwellir.com/tcp/30333/ws/p2p/12D3KooWFj2ndawdYyk2spc42Y2arYwb2TUoHLHFAsKuHRzWXwoJ", "/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/kusama.bootnode.amforc.com/tcp/30333/p2p/12D3KooWLx6nsj6Fpd8biP1VDyuCUjazvRiGWyBam8PsqRJkbUb9", - "/dns/kusama.bootnode.amforc.com/tcp/30334/wss/p2p/12D3KooWLx6nsj6Fpd8biP1VDyuCUjazvRiGWyBam8PsqRJkbUb9" + "/dns/boot.stake.plus/tcp/31334/wss/p2p/12D3KooWLa1UyG5xLPds2GbiRBCTJjpsVwRWHWN7Dff14yiNJRpR" ], "telemetryEndpoints": [ [ diff --git a/node/service/chain-specs/polkadot.json b/node/service/chain-specs/polkadot.json index 8fc8ac63ba32..1a5ef94987de 100644 --- a/node/service/chain-specs/polkadot.json +++ b/node/service/chain-specs/polkadot.json @@ -21,11 +21,7 @@ "/dns/cc1-1.parity.tech/tcp/30333/p2p/12D3KooWFN2mhgpkJsDBuNuE5427AcDrsib8EoqGMZmkxWwx3Md4", "/dns/polkadot-bootnode.dwellir.com/tcp/30333/ws/p2p/12D3KooWKvdDyRKqUfSAaUCbYiLwKY8uK3wDWpCuy2FiDLbkPTDJ", "/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/polkadot.bootnode.amforc.com/tcp/30333/p2p/12D3KooWAsuCEVCzUVUrtib8W82Yne3jgVGhQZN3hizko5FTnDg3", - "/dns/polkadot.bootnode.amforc.com/tcp/30334/wss/p2p/12D3KooWAsuCEVCzUVUrtib8W82Yne3jgVGhQZN3hizko5FTnDg3" + "/dns/boot.stake.plus/tcp/30334/wss/p2p/12D3KooWKT4ZHNxXH4icMjdrv7EwWBkfbz5duxE5sdJKKeWFYi5n" ], "telemetryEndpoints": [ [ diff --git a/node/service/chain-specs/westend.json b/node/service/chain-specs/westend.json index 6527d81001df..03f1f5ecf6b0 100644 --- a/node/service/chain-specs/westend.json +++ b/node/service/chain-specs/westend.json @@ -13,11 +13,7 @@ "/dns/westend-connect-0.polkadot.io/tcp/443/wss/p2p/12D3KooWNg8iUqhux7X7voNU9Nty5pzehrFJwkQwg1CJnqN3CTzE", "/dns/westend-connect-1.polkadot.io/tcp/443/wss/p2p/12D3KooWAq2A7UNFS6725XFatD5QW7iYBezTLdAUx1SmRkxN79Ne", "/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/westend.bootnode.amforc.com/tcp/30333/p2p/12D3KooWJ5y9ZgVepBQNW4aabrxgmnrApdVnscqgKWiUu4BNJbC8", - "/dns/westend.bootnode.amforc.com/tcp/30334/wss/p2p/12D3KooWJ5y9ZgVepBQNW4aabrxgmnrApdVnscqgKWiUu4BNJbC8" + "/dns/boot.stake.plus/tcp/32334/wss/p2p/12D3KooWK8fjVoSvMq5copQYMsdYreSGPGgcMbGMgbMDPfpf3sm7" ], "telemetryEndpoints": [ [ @@ -137,4 +133,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 2fd787f77e5d..b8080641771a 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -765,10 +765,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(), } } @@ -1071,11 +1071,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(), } } @@ -1464,10 +1464,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(), } } @@ -1627,12 +1627,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 2e31737d97c3..f85249579ecf 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::traits::Header; + use sp_runtime::{generic::BlockId, traits::Header}; use std::sync::Arc; #[test] @@ -232,16 +232,13 @@ 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 |hashes: &mut Vec<_>, n| { + move |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(); } } @@ -249,7 +246,7 @@ mod tests { let get_header = { let client = client.clone(); - move |n| client.expect_header(n).unwrap() + move |n| client.header(&BlockId::Number(n)).unwrap().unwrap() }; // the rule should filter all votes after block #20 @@ -257,7 +254,7 @@ mod tests { let voting_rule = super::PauseAfterBlockFor(20, 30); // add 10 blocks - push_blocks(&mut hashes, 10); + push_blocks(10); assert_eq!(client.info().best_number, 10); // we have not reached the pause block @@ -265,38 +262,38 @@ mod tests { assert_eq!( futures::executor::block_on(voting_rule.restrict_vote( client.clone(), - &get_header(hashes[0]), - &get_header(hashes[10]), - &get_header(hashes[10]) + &get_header(0), + &get_header(10), + &get_header(10) )), None, ); // add 15 more blocks // best block: #25 - push_blocks(&mut hashes, 15); + push_blocks(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(hashes[10]), - &get_header(hashes[20]), - &get_header(hashes[20]) + &get_header(10), + &get_header(20), + &get_header(20) )), None, ); // we are past the pause block, votes should // be limited to the pause block. - let pause_block = get_header(hashes[20]); + let pause_block = get_header(20); assert_eq!( futures::executor::block_on(voting_rule.restrict_vote( client.clone(), - &get_header(hashes[10]), - &get_header(hashes[21]), - &get_header(hashes[21]) + &get_header(10), + &get_header(21), + &get_header(21) )), Some((pause_block.hash(), *pause_block.number())), ); @@ -307,15 +304,15 @@ mod tests { futures::executor::block_on(voting_rule.restrict_vote( client.clone(), &pause_block, // #20 - &get_header(hashes[21]), - &get_header(hashes[21]), + &get_header(21), + &get_header(21), )), Some((pause_block.hash(), *pause_block.number())), ); // add 30 more blocks // best block: #55 - push_blocks(&mut hashes, 30); + push_blocks(30); // we're at the last block of the pause, this block // should still be considered in the pause period @@ -323,8 +320,8 @@ mod tests { futures::executor::block_on(voting_rule.restrict_vote( client.clone(), &pause_block, // #20 - &get_header(hashes[50]), - &get_header(hashes[50]), + &get_header(50), + &get_header(50), )), Some((pause_block.hash(), *pause_block.number())), ); @@ -334,8 +331,8 @@ mod tests { futures::executor::block_on(voting_rule.restrict_vote( client.clone(), &pause_block, // #20 - &get_header(hashes[51]), - &get_header(hashes[51]), + &get_header(51), + &get_header(51), )), None, ); diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 4cd937b1d7de..3e535f3bd1f5 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -95,7 +95,6 @@ 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, @@ -161,7 +160,10 @@ where &self, hash: Block::Hash, ) -> sp_blockchain::Result::Header>> { - >::header(self, hash) + >::header( + self, + generic::BlockId::::Hash(hash), + ) } fn number( &self, @@ -698,7 +700,7 @@ where return None }; - let parent_hash = client.header(hash).ok()??.parent_hash; + let parent_hash = client.header(&BlockId::Hash(hash)).ok()??.parent_hash; Some(BlockInfo { hash, parent_hash, number }) }) @@ -756,7 +758,6 @@ 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 = { @@ -1109,8 +1110,8 @@ where pin_mut!(forward); select! { - () = forward => (), - () = overseer_fut => (), + _ = forward => (), + _ = overseer_fut => (), complete => (), } }), @@ -1151,12 +1152,11 @@ where let overseer_handle = overseer_handle.clone(); async move { - let parachain = - polkadot_node_core_parachains_inherent::ParachainsInherentDataProvider::new( - client_clone, - overseer_handle, - parent, - ); + let parachain = polkadot_node_core_parachains_inherent::ParachainsInherentDataProvider::create( + &*client_clone, + overseer_handle, + parent, + ).await.map_err(|e| Box::new(e))?; let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); @@ -1219,18 +1219,6 @@ 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 7dff86693827..a8ce3e5eaaf0 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( +pub fn prepared_overseer_builder<'a, Spawner, RuntimeClient>( OverseerGenArgs { leaves, keystore, @@ -155,7 +155,7 @@ pub fn prepared_overseer_builder( overseer_message_channel_capacity_override, req_protocol_names, peerset_protocol_names, - }: OverseerGenArgs, + }: OverseerGenArgs<'a, Spawner, RuntimeClient>, ) -> 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(), + network_service.local_peer_id().clone(), 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( + fn generate<'a, Spawner, RuntimeClient>( &self, connector: OverseerConnector, - args: OverseerGenArgs, + args: OverseerGenArgs<'a, Spawner, RuntimeClient>, ) -> 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( + fn generate<'a, Spawner, RuntimeClient>( &self, connector: OverseerConnector, - args: OverseerGenArgs, + args: OverseerGenArgs<'a, Spawner, RuntimeClient>, ) -> 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 890e4c16ec8f..df3e68cc7b1a 100644 --- a/node/service/src/relay_chain_selection.rs +++ b/node/service/src/relay_chain_selection.rs @@ -343,11 +343,12 @@ 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)))?; + .ok_or_else(|| ConsensusError::Other(Box::new(Error::EmptyLeaves)))? + .clone(); 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 41c48d7f31e1..de4b0ae0a388 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 dd207039091a..79f833b7558c 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: mpsc::Receiver>, + rx: SingleItemStream>, 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: mpsc::Sender>, + pub tx: SingleItemSink>, /// Direct access to the receiver. pub rx: mpsc::UnboundedReceiver, @@ -280,22 +280,11 @@ impl TestSubsystemContextHandle { } } -/// Make a test subsystem context with `buffer_size == 0`. This is used by most -/// of the tests. +/// Make a test subsystem context. pub fn make_subsystem_context( spawner: S, ) -> (TestSubsystemContext>, TestSubsystemContextHandle) { - 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 (overseer_tx, overseer_rx) = single_item_sink(); let (all_messages_tx, all_messages_rx) = mpsc::unbounded(); ( diff --git a/node/subsystem-types/Cargo.toml b/node/subsystem-types/Cargo.toml index 22528503ccc4..acd66a067241 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.4" +orchestra = "0.0.2" 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 48829e7fc779..27c4fcdf8d37 100644 --- a/node/subsystem-types/src/errors.rs +++ b/node/subsystem-types/src/errors.rs @@ -79,12 +79,7 @@ pub enum RecoveryError { impl std::fmt::Display for RecoveryError { fn fmt(&self, f: &mut core::fmt::Formatter) -> Result<(), core::fmt::Error> { - let msg = match self { - RecoveryError::Invalid => "Invalid", - RecoveryError::Unavailable => "Unavailable", - }; - - write!(f, "{}", msg) + write!(f, "{}", self) } } diff --git a/node/subsystem-types/src/messages.rs b/node/subsystem-types/src/messages.rs index bf1dbe552f5f..6e4983813984 100644 --- a/node/subsystem-types/src/messages.rs +++ b/node/subsystem-types/src/messages.rs @@ -58,6 +58,12 @@ use std::{ pub mod network_bridge_event; pub use network_bridge_event::NetworkBridgeEvent; +/// Subsystem messages where each message is always bound to a relay parent. +pub trait BoundToRelayParent { + /// Returns the relay parent this message is bound to. + fn relay_parent(&self) -> Hash; +} + /// Messages received by the Candidate Backing subsystem. #[derive(Debug)] pub enum CandidateBackingMessage { @@ -72,6 +78,16 @@ pub enum CandidateBackingMessage { Statement(Hash, SignedFullStatement), } +impl BoundToRelayParent for CandidateBackingMessage { + fn relay_parent(&self) -> Hash { + match self { + Self::GetBackedCandidates(hash, _, _) => *hash, + Self::Second(hash, _, _) => *hash, + Self::Statement(hash, _) => *hash, + } + } +} + /// Blanket error for validation failing for internal reasons. #[derive(Debug, Error)] #[error("Validation failed with {0:?}")] @@ -154,6 +170,17 @@ pub enum CandidateValidationMessage { ), } +impl CandidateValidationMessage { + /// If the current variant contains the relay parent hash, return it. + pub fn relay_parent(&self) -> Option { + match self { + Self::ValidateFromChainState(_, _, _, _) => None, + Self::ValidateFromExhaustive(_, _, _, _, _, _) => None, + Self::PreCheck(relay_parent, _, _) => Some(*relay_parent), + } + } +} + /// Messages received by the Collator Protocol subsystem. #[derive(Debug, derive_more::From)] pub enum CollatorProtocolMessage { @@ -191,6 +218,12 @@ impl Default for CollatorProtocolMessage { } } +impl BoundToRelayParent for CollatorProtocolMessage { + fn relay_parent(&self) -> Hash { + Default::default() + } +} + /// Messages received by the dispute coordinator subsystem. /// /// NOTE: Any response oneshots might get cancelled if the `DisputeCoordinator` was not yet @@ -235,13 +268,13 @@ pub enum DisputeCoordinatorMessage { /// - or the imported statements are backing/approval votes, which are always accepted. pending_confirmation: Option>, }, - /// Fetch a list of all recent disputes the coordinator is aware of. + /// Fetch a list of all recent disputes the co-ordinator is aware of. /// These are disputes which have occurred any time in recent sessions, /// and which may have already concluded. RecentDisputes(oneshot::Sender>), /// Fetch a list of all active disputes that the coordinator is aware of. /// These disputes are either not yet concluded or recently concluded. - ActiveDisputes(oneshot::Sender>), + ActiveDisputes(oneshot::Sender>), /// Get candidate votes for a candidate. QueryCandidateVotes( Vec<(SessionIndex, CandidateHash)>, @@ -364,6 +397,23 @@ pub enum NetworkBridgeTxMessage { }, } +impl NetworkBridgeTxMessage { + /// If the current variant contains the relay parent hash, return it. + pub fn relay_parent(&self) -> Option { + match self { + Self::ReportPeer(_, _) => None, + Self::DisconnectPeer(_, _) => None, + Self::SendValidationMessage(_, _) => None, + Self::SendCollationMessage(_, _) => None, + Self::SendValidationMessages(_) => None, + Self::SendCollationMessages(_) => None, + Self::ConnectToValidators { .. } => None, + Self::ConnectToResolvedValidators { .. } => None, + Self::SendRequests { .. } => None, + } + } +} + /// Availability Distribution Message. #[derive(Debug)] pub enum AvailabilityDistributionMessage { @@ -413,6 +463,28 @@ pub enum BitfieldDistributionMessage { NetworkBridgeUpdate(NetworkBridgeEvent), } +impl BitfieldDistributionMessage { + /// If the current variant contains the relay parent hash, return it. + pub fn relay_parent(&self) -> Option { + match self { + Self::DistributeBitfield(hash, _) => Some(*hash), + Self::NetworkBridgeUpdate(_) => None, + } + } +} + +/// 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 { @@ -466,6 +538,15 @@ 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, + } + } +} + /// A response channel for the result of a chain API request. pub type ChainApiResponseChannel = oneshot::Sender>; @@ -508,6 +589,13 @@ pub enum ChainApiMessage { }, } +impl ChainApiMessage { + /// If the current variant contains the relay parent hash, return it. + pub fn relay_parent(&self) -> Option { + None + } +} + /// Chain selection subsystem messages #[derive(Debug)] pub enum ChainSelectionMessage { @@ -520,6 +608,20 @@ pub enum ChainSelectionMessage { BestLeafContaining(Hash, oneshot::Sender>), } +impl ChainSelectionMessage { + /// If the current variant contains the relay parent hash, return it. + pub fn relay_parent(&self) -> Option { + // None of the messages, even the ones containing specific + // block hashes, can be considered to have those blocks as + // a relay parent. + match *self { + ChainSelectionMessage::Approved(_) => None, + ChainSelectionMessage::Leaves(_) => None, + ChainSelectionMessage::BestLeafContaining(..) => None, + } + } +} + /// A sender for the result of a runtime API request. pub type RuntimeApiSender = oneshot::Sender>; @@ -614,6 +716,15 @@ pub enum RuntimeApiMessage { Request(Hash, RuntimeApiRequest), } +impl RuntimeApiMessage { + /// If the current variant contains the relay parent hash, return it. + pub fn relay_parent(&self) -> Option { + match self { + Self::Request(hash, _) => Some(*hash), + } + } +} + /// Statement distribution message. #[derive(Debug, derive_more::From)] pub enum StatementDistributionMessage { @@ -665,6 +776,15 @@ pub enum ProvisionerMessage { ProvisionableData(Hash, ProvisionableData), } +impl BoundToRelayParent for ProvisionerMessage { + fn relay_parent(&self) -> Hash { + match self { + Self::RequestInherentData(hash, _) => *hash, + Self::ProvisionableData(hash, _) => *hash, + } + } +} + /// Message to the Collation Generation subsystem. #[derive(Debug)] pub enum CollationGenerationMessage { @@ -672,6 +792,13 @@ pub enum CollationGenerationMessage { Initialize(CollationGenerationConfig), } +impl CollationGenerationMessage { + /// If the current variant contains the relay parent hash, return it. + pub fn relay_parent(&self) -> Option { + None + } +} + /// The result type of [`ApprovalVotingMessage::CheckAndImportAssignment`] request. #[derive(Debug, Clone, PartialEq, Eq)] pub enum AssignmentCheckResult { @@ -825,3 +952,9 @@ 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 06654153357a..5abad8a3c22c 100644 --- a/node/subsystem-types/src/messages/network_bridge_event.rs +++ b/node/subsystem-types/src/messages/network_bridge_event.rs @@ -86,19 +86,24 @@ impl NetworkBridgeEvent { { Ok(match *self { NetworkBridgeEvent::PeerMessage(ref peer, ref msg) => - NetworkBridgeEvent::PeerMessage(*peer, T::try_from(msg)?), + NetworkBridgeEvent::PeerMessage(peer.clone(), T::try_from(msg)?), NetworkBridgeEvent::PeerConnected( ref peer, ref role, ref version, ref authority_id, - ) => NetworkBridgeEvent::PeerConnected(*peer, *role, *version, authority_id.clone()), + ) => NetworkBridgeEvent::PeerConnected( + peer.clone(), + role.clone(), + *version, + authority_id.clone(), + ), NetworkBridgeEvent::PeerDisconnected(ref peer) => - NetworkBridgeEvent::PeerDisconnected(*peer), + NetworkBridgeEvent::PeerDisconnected(peer.clone()), NetworkBridgeEvent::NewGossipTopology(ref topology) => NetworkBridgeEvent::NewGossipTopology(topology.clone()), NetworkBridgeEvent::PeerViewChange(ref peer, ref view) => - NetworkBridgeEvent::PeerViewChange(*peer, view.clone()), + NetworkBridgeEvent::PeerViewChange(peer.clone(), 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 90abc62f97af..d390fd2b42cc 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,7 +32,8 @@ 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.13.0" +kvdb = "0.12.0" +parity-util-mem = { version = "0.12.0", default-features = false } parity-db = { version = "0.4.2"} [dev-dependencies] @@ -43,6 +44,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.11.0" +kvdb-shared-tests = "0.10.0" tempfile = "3.1.0" -kvdb-memorydb = "0.13.0" +kvdb-memorydb = "0.12.0" diff --git a/node/subsystem-util/src/database.rs b/node/subsystem-util/src/database.rs index d29a4460ea7e..6f338b5d6440 100644 --- a/node/subsystem-util/src/database.rs +++ b/node/subsystem-util/src/database.rs @@ -29,6 +29,7 @@ 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 @@ -122,6 +123,13 @@ 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. @@ -152,6 +160,12 @@ 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 4ebfad405b5b..beac31292b7d 100644 --- a/node/subsystem-util/src/rolling_session_window.rs +++ b/node/subsystem-util/src/rolling_session_window.rs @@ -294,11 +294,6 @@ 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 @@ -788,21 +783,6 @@ 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 2d788c10b4c1..1d783f748b45 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 6d534f5fd5bd..ce5fef2c8b51 100644 --- a/node/subsystem/src/lib.rs +++ b/node/subsystem/src/lib.rs @@ -34,9 +34,6 @@ 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 8287d167644e..712f2a902c2d 100644 --- a/node/test/client/Cargo.toml +++ b/node/test/client/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-test-client" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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 058d469a26a1..1ee6d1e87dc5 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, traits::Block as BlockT, Digest, DigestItem}; +use sp_runtime::{generic::BlockId, Digest, DigestItem}; use sp_state_machine::BasicExternalities; /// An extension for the test client to initialize a Polkadot specific block builder. @@ -42,21 +42,20 @@ pub trait InitPolkadotBlockBuilder { /// which should be the parent block of the block that is being build. fn init_polkadot_block_builder_at( &self, - hash: ::Hash, + at: &BlockId, ) -> 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(chain_info.best_hash) + self.init_polkadot_block_builder_at(&BlockId::Hash(chain_info.best_hash)) } fn init_polkadot_block_builder_at( &self, - hash: ::Hash, + at: &BlockId, ) -> BlockBuilder { - let at = BlockId::Hash(hash); let last_timestamp = self.runtime_api().get_last_timestamp(&at).expect("Get last timestamp"); @@ -88,7 +87,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(); @@ -98,7 +97,7 @@ impl InitPolkadotBlockBuilder for Client { .expect("Put timestamp inherent data"); let parent_header = self - .header(hash) + .header(at) .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 95da89662579..55d74ad62f1d 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] thiserror = "1.0.31" diff --git a/node/test/service/Cargo.toml b/node/test/service/Cargo.toml index 9fc695210a82..87111241b25a 100644 --- a/node/test/service/Cargo.toml +++ b/node/test/service/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-test-service" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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.24.1" +tokio = "1.19.2" # 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 } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = [ "wasmtime" ] } 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.24.1", features = ["macros"] } +tokio = { version = "1.19.2", 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 f80ff23dd6ac..74cd56ec521a 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.24.1", default-features = false, features = ["macros", "net", "rt-multi-thread", "sync"] } +tokio = { version = "1.19.2", 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 d203bd3ed9f6..665a7b0986cc 100644 --- a/parachain/Cargo.toml +++ b/parachain/Cargo.toml @@ -1,15 +1,16 @@ [package] name = "polkadot-parachain" +version = "0.9.31" +authors = ["Parity Technologies "] description = "Types and utilities for creating and working with parachains" -authors.workspace = true -edition.workspace = true -version.workspace = true +edition = "2021" [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 } @@ -31,6 +32,7 @@ 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 e638b83c2d7c..2c18b178271f 100644 --- a/parachain/src/primitives.rs +++ b/parachain/src/primitives.rs @@ -31,6 +31,9 @@ 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. @@ -40,7 +43,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, Default))] +#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Hash, MallocSizeOf, Default))] pub struct HeadData(#[cfg_attr(feature = "std", serde(with = "bytes"))] pub Vec); impl HeadData { @@ -52,7 +55,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))] +#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Hash, MallocSizeOf))] pub struct ValidationCode(#[cfg_attr(feature = "std", serde(with = "bytes"))] pub Vec); impl ValidationCode { @@ -68,6 +71,7 @@ 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 { @@ -110,7 +114,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))] +#[cfg_attr(feature = "std", derive(Serialize, Deserialize, MallocSizeOf))] pub struct BlockData(#[cfg_attr(feature = "std", serde(with = "bytes"))] pub Vec); /// Unique identifier of a parachain. @@ -130,7 +134,10 @@ 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))] +#[cfg_attr( + feature = "std", + derive(serde::Serialize, serde::Deserialize, derive_more::Display, MallocSizeOf) +)] pub struct Id(u32); impl TypeId for Id { diff --git a/parachain/test-parachains/Cargo.toml b/parachain/test-parachains/Cargo.toml index d023fb6be6ea..8ed8ae6211c4 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" -version.workspace = true -authors.workspace = true -edition.workspace = true +edition = "2021" [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 4b29da55c1cf..42ffaf728ac5 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 51b9ccad8097..132fe2c0a527 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" -version.workspace = true -authors.workspace = true -edition.workspace = true +edition = "2021" [[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.24.1", features = ["macros"] } +tokio = { version = "1.19.2", features = ["macros"] } diff --git a/parachain/test-parachains/halt/Cargo.toml b/parachain/test-parachains/halt/Cargo.toml index 05df7e7d592f..3a9096c4d56b 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 1cc5595ec7a5..ab27c07781c5 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 36a40cb779ec..f8198f8e4006 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.workspace = true -version.workspace = true -authors.workspace = true +edition = "2021" [[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.24.1", features = ["macros"] } +tokio = { version = "1.19", features = ["macros"] } diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 43df39e26bde..b99ac7bc19e6 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -1,13 +1,14 @@ [package] name = "polkadot-primitives" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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"] } @@ -45,6 +46,7 @@ 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 8d3b5706e736..5b01e09d1178 100644 --- a/primitives/src/v2/mod.rs +++ b/primitives/src/v2/mod.rs @@ -47,6 +47,8 @@ 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}; @@ -75,6 +77,16 @@ 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; @@ -82,6 +94,16 @@ 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"); @@ -96,6 +118,16 @@ 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. @@ -104,7 +136,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))] +#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Hash, MallocSizeOf))] pub struct ValidatorIndex(pub u32); // We should really get https://github.com/paritytech/polkadot/issues/2403 going .. @@ -131,9 +163,19 @@ 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, WellKnownKey}; + use super::{HrmpChannelId, Id}; use hex_literal::hex; use parity_scale_codec::Encode as _; use sp_io::hashing::twox_64; @@ -208,13 +250,6 @@ pub mod well_known_keys { }) } - /// Type safe version of `relay_dispatch_queue_size`. - #[deprecated = "Use `relay_dispatch_queue_remaining_capacity` instead"] - pub fn relay_dispatch_queue_size_typed(para: Id) -> WellKnownKey<(u32, u32)> { - #[allow(deprecated)] - relay_dispatch_queue_size(para).into() - } - /// The upward message dispatch queue remaining capacity for the given para id. /// /// The storage entry stores a tuple of two values: @@ -222,8 +257,8 @@ pub mod well_known_keys { /// - `count: u32`, the number of additional messages which may be enqueued for the given para, /// - `total_size: u32`, the total size of additional messages which may be enqueued for the /// given para. - pub fn relay_dispatch_queue_remaining_capacity(para_id: Id) -> WellKnownKey<(u32, u32)> { - (b":relay_dispatch_queue_remaining_capacity", para_id).encode().into() + pub fn relay_dispatch_queue_remaining_capacity(para_id: Id) -> Vec { + (b":relay_dispatch_queue_remaining_capacity", para_id).encode() } /// The HRMP channel for the given identifier. @@ -383,6 +418,16 @@ 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; @@ -432,7 +477,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))] +#[cfg_attr(feature = "std", derive(Hash, MallocSizeOf))] pub struct CandidateDescriptor { /// The ID of the para this is a candidate for. pub para_id: Id, @@ -474,6 +519,7 @@ 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, @@ -510,7 +556,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))] +#[cfg_attr(feature = "std", derive(Hash, MallocSizeOf))] pub struct CommittedCandidateReceipt { /// The descriptor of the candidate. pub descriptor: CandidateDescriptor, @@ -591,7 +637,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))] +#[cfg_attr(feature = "std", derive(Default, MallocSizeOf))] pub struct PersistedValidationData { /// The parent head-data. pub parent_head: HeadData, @@ -612,7 +658,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, Default))] +#[cfg_attr(feature = "std", derive(Hash, MallocSizeOf, Default))] pub struct CandidateCommitments { /// Messages destined to be interpreted by the Relay chain itself. pub upward_messages: Vec, @@ -732,7 +778,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, signing_context); + let payload = attestation.signed_payload(hash.clone(), signing_context); let sig = attestation.signature(); if sig.verify(&payload[..], &validator_id) { @@ -753,7 +799,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))] +#[cfg_attr(feature = "std", derive(Hash, MallocSizeOf))] pub struct CoreIndex(pub u32); impl From for CoreIndex { @@ -770,7 +816,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))] +#[cfg_attr(feature = "std", derive(Hash, MallocSizeOf))] pub struct GroupIndex(pub u32); impl From for GroupIndex { @@ -812,7 +858,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))] +#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] pub struct GroupRotationInfo { /// The block number where the session started. pub session_start_block: N, @@ -900,7 +946,7 @@ impl GroupRotationInfo { /// Information about a core which is currently occupied. #[derive(Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(PartialEq))] +#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] 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 @@ -917,6 +963,7 @@ 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, @@ -935,7 +982,7 @@ impl OccupiedCore { /// Information about a core which is currently occupied. #[derive(Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(PartialEq))] +#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] pub struct ScheduledCore { /// The ID of a para scheduled. pub para_id: Id, @@ -945,7 +992,7 @@ pub struct ScheduledCore { /// The state of a particular availability core. #[derive(Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(PartialEq))] +#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] pub enum CoreState { /// The core is currently occupied. #[codec(index = 0)] @@ -996,7 +1043,7 @@ pub enum OccupiedCoreAssumption { /// An even concerning a candidate. #[derive(Clone, Encode, Decode, TypeInfo, RuntimeDebug)] -#[cfg_attr(feature = "std", derive(PartialEq))] +#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] pub enum CandidateEvent { /// This candidate receipt was backed in the most recent block. /// This includes the core index the candidate is now occupying. @@ -1015,7 +1062,7 @@ pub enum CandidateEvent { /// Scraped runtime backing votes and resolved disputes. #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] -#[cfg_attr(feature = "std", derive(PartialEq))] +#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] pub struct ScrapedOnChainVotes { /// The session in which the block was included. pub session: SessionIndex, @@ -1204,6 +1251,7 @@ 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)] @@ -1284,6 +1332,7 @@ 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)] @@ -1301,6 +1350,7 @@ 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)] @@ -1329,6 +1379,7 @@ 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, @@ -1393,6 +1444,22 @@ 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 { @@ -1409,6 +1476,7 @@ 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. @@ -1544,7 +1612,7 @@ impl CompactStatement { /// `IndexedVec` struct indexed by type specific indices. #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] -#[cfg_attr(feature = "std", derive(PartialEq))] +#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] pub struct IndexedVec(Vec, PhantomData K>); impl Default for IndexedVec { @@ -1623,7 +1691,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))] +#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] pub struct SessionInfo { /****** New in v2 *******/ /// All the validators actively participating in parachain consensus. @@ -1649,6 +1717,7 @@ 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. /// @@ -1705,44 +1774,10 @@ impl PvfCheckStatement { } } -/// A well-known and typed storage key. -pub struct WellKnownKey { - /// The raw storage key. - pub key: Vec, - _p: sp_std::marker::PhantomData, -} - -impl From> for WellKnownKey { - fn from(key: Vec) -> Self { - Self { key, _p: Default::default() } - } -} - -impl AsRef<[u8]> for WellKnownKey { - fn as_ref(&self) -> &[u8] { - self.key.as_ref() - } -} - -impl WellKnownKey { - /// Gets the value or `None` if it does not exist or decoding failed. - pub fn get(&self) -> Option { - sp_io::storage::get(&self.key) - .and_then(|raw| parity_scale_codec::DecodeAll::decode_all(&mut raw.as_ref()).ok()) - } -} - -impl WellKnownKey { - /// Sets the value. - pub fn set(&self, value: T) { - sp_io::storage::set(&self.key, &value.encode()); - } -} - /// 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))] +#[cfg_attr(feature = "std", derive(PartialEq, MallocSizeOf))] pub struct OldV1SessionInfo { /// Validators in canonical ordering. /// @@ -1758,6 +1793,7 @@ 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 917e5f3babdb..3ea45e12df7f 100644 --- a/primitives/test-helpers/Cargo.toml +++ b/primitives/test-helpers/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-primitives-test-helpers" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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 996041f176bb..7f3f8cef7e63 100644 --- a/roadmap/implementers-guide/README.md +++ b/roadmap/implementers-guide/README.md @@ -22,11 +22,6 @@ 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 c504b9ac1923..bcf87aad8a49 100644 --- a/roadmap/implementers-guide/src/SUMMARY.md +++ b/roadmap/implementers-guide/src/SUMMARY.md @@ -75,6 +75,7 @@ - [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 d379c2813b59..8612d8834cb8 100644 --- a/roadmap/implementers-guide/src/glossary.md +++ b/roadmap/implementers-guide/src/glossary.md @@ -2,7 +2,6 @@ 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 @@ -32,9 +31,11 @@ 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. @@ -47,3 +48,4 @@ 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 76bd6467e178..46ee4b204982 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 an approval checker needs to validate a parachain 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 a fisherman reports a potentially invalid block. diff --git a/roadmap/implementers-guide/src/node/collators/collation-generation.md b/roadmap/implementers-guide/src/node/collators/collation-generation.md index d7c62fee39f8..0a17a8619ab1 100644 --- a/roadmap/implementers-guide/src/node/collators/collation-generation.md +++ b/roadmap/implementers-guide/src/node/collators/collation-generation.md @@ -99,6 +99,7 @@ On `ActiveLeavesUpdate`: * If there is no collation generation config, ignore. * Otherwise, for each `activated` head in the update: * Determine if the para is scheduled on any core by fetching the `availability_cores` Runtime API. + > TODO: figure out what to do in the case of occupied cores; see [this issue](https://github.com/paritytech/polkadot/issues/1573). * Determine an occupied core assumption to make about the para. Scheduled cores can make `OccupiedCoreAssumption::Free`. * Use the Runtime API subsystem to fetch the full validation data. * Invoke the `collator`, and use its outputs to produce a `CandidateReceipt`, signed with the configuration's `key`. diff --git a/roadmap/implementers-guide/src/node/disputes/README.md b/roadmap/implementers-guide/src/node/disputes/README.md index a6e126b1534b..2db891aa216f 100644 --- a/roadmap/implementers-guide/src/node/disputes/README.md +++ b/roadmap/implementers-guide/src/node/disputes/README.md @@ -1,18 +1,40 @@ # Disputes Subsystems -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. +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. diff --git a/roadmap/implementers-guide/src/node/disputes/dispute-coordinator.md b/roadmap/implementers-guide/src/node/disputes/dispute-coordinator.md index dc01664c295a..3d44e210db0e 100644 --- a/roadmap/implementers-guide/src/node/disputes/dispute-coordinator.md +++ b/roadmap/implementers-guide/src/node/disputes/dispute-coordinator.md @@ -9,14 +9,12 @@ 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 approval votes will be recorded. +- Ensuring lazy approval votes (votes given without running the parachain + validation function) will be recorded, so lazy nodes can get slashed properly. - 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 @@ -24,8 +22,6 @@ 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 @@ -80,38 +76,32 @@ 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 approval votes will be recorded +## Ensuring Lazy 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 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. +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. Hence, we have the following requirements for importing approval votes: @@ -122,12 +112,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 one-by-one, depending on what point in time the dispute was -raised. +the votes unbatched, but 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 @@ -136,11 +126,14 @@ 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? +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? 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! -Two concerns that come to mind, are easily addressed: +There are two potential caveats with this though: 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, @@ -160,12 +153,31 @@ Two concerns that come to mind, are easily addressed: 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 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. + 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. Conclusion: As long as we make sure, if our own approval vote gets imported (which would prevent dispute participation) to also distribute it via @@ -174,27 +186,28 @@ 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, but this is fine as argued -above. +raciness obviously is not fully resolved by this, [a +ticket](https://github.com/paritytech/polkadot/issues/5864) exists. Ensuring vote import on chain is covered in the next section. -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. +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. ### 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 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. +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. Dispute distribution will make sure all explicit dispute votes get distributed among nodes which includes current block producers (current authority set) which @@ -214,14 +227,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: @@ -296,7 +309,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 @@ -323,7 +336,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 @@ -335,7 +348,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 the candidate and for candidates with the same +number of the relay parent of that candidate and for candidates with the same relay parent height further by the `CandidateHash`. This ordering is globally unique and also prioritizes older candidates. @@ -346,89 +359,37 @@ 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 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 +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. -### Spam Considerations +#### Import -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 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. +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. 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 @@ -527,14 +488,16 @@ 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. Also, by design non included candidates do not pose any threat to the system. +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. 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 the spam handling -strategies described above would simply be unavailable. +disputes handled by the dispute-coordinator. In fact all described spam handling +strategies above would simply be not available. 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 6e7a5f3d0c8f..5393368c5c6b 100644 --- a/roadmap/implementers-guide/src/node/utility/candidate-validation.md +++ b/roadmap/implementers-guide/src/node/utility/candidate-validation.md @@ -48,47 +48,4 @@ 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/chain-selection.md b/roadmap/implementers-guide/src/node/utility/chain-selection.md index fc6a9820143b..423b5ed406c0 100644 --- a/roadmap/implementers-guide/src/node/utility/chain-selection.md +++ b/roadmap/implementers-guide/src/node/utility/chain-selection.md @@ -24,13 +24,10 @@ Delete data for all orphaned chains and update all metadata descending from the Update the approval status of the referenced block. If the block was stagnant and thus non-viable and is now viable, then the metadata of all of its descendants needs to be updated as well, as they may no longer be stagnant either. Update the set of viable leaves accordingly. -### `ChainSelectionMessage::Leaves` - -Gets all leaves of the chain, i.e. block hashes that are suitable to build upon and have no suitable children. Supplies the leaves in descending order by score. - ### `ChainSelectionMessage::BestLeafContaining` -If the required block is unknown or not viable, then return `None`. Iterate over all leaves in order of descending weight, returning the first leaf containing the required block in its chain, and `None` otherwise. +If the required block is unknown or not viable, then return `None`. +Iterate over all leaves, returning the first leaf containing the required block in its chain, and `None` otherwise. ### Periodically diff --git a/roadmap/implementers-guide/src/node/utility/provisioner.md b/roadmap/implementers-guide/src/node/utility/provisioner.md index fb97d52f1a8c..e477a652a60e 100644 --- a/roadmap/implementers-guide/src/node/utility/provisioner.md +++ b/roadmap/implementers-guide/src/node/utility/provisioner.md @@ -73,7 +73,7 @@ The end result of this process is a vector of `BackedCandidate`s, sorted in orde This is the point at which the block author provides further votes to active disputes or initiates new disputes in the runtime state. -The block-authoring logic of the runtime has an extra step between handling the inherent-data and producing the actual inherent call, which we assume performs the work of filtering out disputes which are not relevant to the on-chain state. Backing votes are always kept in the dispute statement set. This ensures we punish the maximum number of misbehaving backers. +The block-authoring logic of the runtime has an extra step between handling the inherent-data and producing the actual inherent call, which we assume performs the work of filtering out disputes which are not relevant to the on-chain state. To select disputes: diff --git a/roadmap/implementers-guide/src/node/utility/pvf-prechecker.md b/roadmap/implementers-guide/src/node/utility/pvf-prechecker.md index fd75ce9e3804..b0f58346da99 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 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. +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. 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`][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`] 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 +[`PvfCheckStatement`]: ../../types/pvf-prechecking.md diff --git a/roadmap/implementers-guide/src/protocol-overview.md b/roadmap/implementers-guide/src/protocol-overview.md index fa5a866e6121..77b3a7448c44 100644 --- a/roadmap/implementers-guide/src/protocol-overview.md +++ b/roadmap/implementers-guide/src/protocol-overview.md @@ -8,6 +8,7 @@ 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 f1f9d6c950e2..178346e184f5 100644 --- a/roadmap/implementers-guide/src/runtime/README.md +++ b/roadmap/implementers-guide/src/runtime/README.md @@ -14,18 +14,16 @@ 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: manages initialization order of the other modules. +* Initializer: manage initialization order of the other modules. * Shared: manages shared storage and configurations for other modules. -* Configuration: manages configuration and configuration updates in a non-racy manner. -* Paras: manages chain-head and validation code for parachains and parathreads. +* Configuration: manage configuration and configuration updates in a non-racy manner. +* Paras: manage 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. -* 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. +* Validity: handles secondary checks and dispute resolution for included, available parablocks. * 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/runtime/disputes.md b/roadmap/implementers-guide/src/runtime/disputes.md index 1f1debee9cd4..83ca86b36b04 100644 --- a/roadmap/implementers-guide/src/runtime/disputes.md +++ b/roadmap/implementers-guide/src/runtime/disputes.md @@ -37,6 +37,12 @@ Disputes: double_map (SessionIndex, CandidateHash) -> Option, // All included blocks on the chain, as well as the block number in this chain that // should be reverted back to if the candidate is disputed and determined to be invalid. Included: double_map (SessionIndex, CandidateHash) -> Option, +// Maps session indices to a vector indicating the number of potentially-spam disputes +// each validator is participating in. Potentially-spam disputes are remote disputes which have +// fewer than `byzantine_threshold + 1` validators. +// +// The i'th entry of the vector corresponds to the i'th validator in the session. +SpamSlots: map SessionIndex -> Option>, // Whether the chain is frozen or not. Starts as `None`. When this is `Some`, // the chain will not accept any new parachain blocks for backing or inclusion, // and its value indicates the last valid block number in the chain. @@ -49,45 +55,50 @@ Frozen: Option, ## Session Change 1. If the current session is not greater than `config.dispute_period + 1`, nothing to do here. -1. Set `pruning_target = current_session - config.dispute_period - 1`. We add the extra `1` because we want to keep things for `config.dispute_period` _full_ sessions. +1. Set `pruning_target = current_session - config.dispute_period - 1`. We add the extra `1` because we want to keep things for `config.dispute_period` _full_ sessions. The stuff at the end of the most recent session has been around for a little over 0 sessions, not a little over 1. 1. If `LastPrunedSession` is `None`, then set `LastPrunedSession` to `Some(pruning_target)` and return. -2. Otherwise, clear out all disputes and included candidates entries in the range `last_pruned..=pruning_target` and set `LastPrunedSession` to `Some(pruning_target)`. +1. Otherwise, clear out all disputes, included candidates, and `SpamSlots` entries in the range `last_pruned..=pruning_target` and set `LastPrunedSession` to `Some(pruning_target)`. ## Block Initialization -1. Iterate through all disputes. If any have not concluded and started more than `config.dispute_conclusion_by_timeout_period` blocks ago, set them to `Concluded` and mildly punish all validators associated, as they have failed to distribute available data. +1. Iterate through all disputes. If any have not concluded and started more than `config.dispute_conclusion_by_timeout_period` blocks ago, set them to `Concluded` and mildly punish all validators associated, as they have failed to distribute available data. If the `Included` map does not contain the candidate and there are fewer than `byzantine_threshold + 1` participating validators, reduce `SpamSlots` for all participating validators. ## Routines * `filter_multi_dispute_data(MultiDisputeStatementSet) -> MultiDisputeStatementSet`: 1. Takes a `MultiDisputeStatementSet` and filters it down to a `MultiDisputeStatementSet` that satisfies all the criteria of `provide_multi_dispute_data`. That is, eliminating - ancient votes, duplicates and unconfirmed disputes. - This can be used by block authors to create the final submission in a block which is + ancient votes, votes which overwhelm the maximum amount of spam slots, and duplicates. + This can be used by block authors to create the final submission in a block which is guaranteed to pass the `provide_multi_dispute_data` checks. * `provide_multi_dispute_data(MultiDisputeStatementSet) -> Vec<(SessionIndex, Hash)>`: 1. Pass on each dispute statement set to `provide_dispute_data`, propagating failure. - 2. Return a list of all candidates who just had disputes initiated. + 1. Return a list of all candidates who just had disputes initiated. * `provide_dispute_data(DisputeStatementSet) -> bool`: Provide data to an ongoing dispute or initiate a dispute. - 1. All statements must be issued under the correct session for the correct candidate. + 1. All statements must be issued under the correct session for the correct candidate. 1. `SessionInfo` is used to check statement signatures and this function should fail if any signatures are invalid. 1. If there is no dispute under `Disputes`, create a new `DisputeState` with blank bitfields. 1. If `concluded_at` is `Some`, and is `concluded_at + config.post_conclusion_acceptance_period < now`, return false. - 2. Import all statements into the dispute. This should fail if any statements are duplicate or if the corresponding bit for the corresponding validator is set in the dispute already. - 3. If `concluded_at` is `None`, reward all statements. - 4. If `concluded_at` is `Some`, reward all statements slightly less. - 5. If either side now has supermajority and did not previously, slash the other side. This may be both sides, and we support this possibility in code, but note that this requires validators to participate on both sides which has negative expected value. Set `concluded_at` to `Some(now)` if it was `None`. - 6. If just concluded against the candidate and the `Included` map contains `(session, candidate)`: invoke `revert_and_freeze` with the stored block number. - 7. Return true if just initiated, false otherwise. + 1. If the overlap of the validators in the `DisputeStatementSet` and those already present in the `DisputeState` is fewer in number than `byzantine_threshold + 1` and the candidate is not present in the `Included` map + 1. increment `SpamSlots` for each validator in the `DisputeStatementSet` which is not already in the `DisputeState`. Initialize the `SpamSlots` to a zeroed vector first, if necessary. do not increment `SpamSlots` if the candidate is local. + 1. If the value for any spam slot exceeds `config.dispute_max_spam_slots`, return false. + 1. If the overlap of the validators in the `DisputeStatementSet` and those already present in the `DisputeState` is at least `byzantine_threshold + 1`, the `DisputeState` has fewer than `byzantine_threshold + 1` validators, and the candidate is not present in the `Included` map, then decrease `SpamSlots` by 1 for each validator in the `DisputeState`. + 1. Import all statements into the dispute. This should fail if any statements are duplicate or if the corresponding bit for the corresponding validator is set in the dispute already. + 1. If `concluded_at` is `None`, reward all statements. + 1. If `concluded_at` is `Some`, reward all statements slightly less. + 1. If either side now has supermajority and did not previously, slash the other side. This may be both sides, and we support this possibility in code, but note that this requires validators to participate on both sides which has negative expected value. Set `concluded_at` to `Some(now)` if it was `None`. + 1. If just concluded against the candidate and the `Included` map contains `(session, candidate)`: invoke `revert_and_freeze` with the stored block number. + 1. Return true if just initiated, false otherwise. * `disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState)>`: Get a list of all disputes and info about dispute state. 1. Iterate over all disputes in `Disputes` and collect into a vector. * `note_included(SessionIndex, CandidateHash, included_in: BlockNumber)`: 1. Add `(SessionIndex, CandidateHash)` to the `Included` map with `included_in - 1` as the value. + 1. If there is a dispute under `(Sessionindex, CandidateHash)` with fewer than `byzantine_threshold + 1` participating validators, decrease `SpamSlots` by 1 for each validator in the `DisputeState`. 1. If there is a dispute under `(SessionIndex, CandidateHash)` that has concluded against the candidate, invoke `revert_and_freeze` with the stored block number. * `concluded_invalid(SessionIndex, CandidateHash) -> bool`: Returns whether a candidate has already concluded a dispute in the negative. @@ -100,27 +111,3 @@ Frozen: Option, 1. If `is_frozen()` return. 1. Set `Frozen` to `Some(BlockNumber)` to indicate a rollback to the block number. 1. Issue a `Revert(BlockNumber + 1)` log to indicate a rollback of the block's child in the header chain, which is the same as a rollback to the block number. - -# Disputes filtering - -All disputes delivered to the runtime by the client are filtered before the actual import. In this context actual import -means persisted in the runtime storage. The filtering has got two purposes: -- Limit the amount of data saved onchain. -- Prevent persisting malicious dispute data onchain. - -*Implementation note*: Filtering is performed in function `filter_dispute_data` from `Disputes` pallet. - -The filtering is performed on the whole statement set which is about to be imported onchain. The following filters are -applied: -1. Remove ancient disputes - if a dispute is concluded before the block number indicated in `OLDEST_ACCEPTED` parameter - it is removed from the set. `OLDEST_ACCEPTED` is a runtime configuration option. - *Implementation note*: `dispute_post_conclusion_acceptance_period` from - `HostConfiguration` is used in the current Polkadot/Kusama implementation. -2. Remove votes from unknown validators. If there is a vote from a validator which wasn't an authority in the session - where the dispute was raised - they are removed. Please note that this step removes only single votes instead of - removing the whole dispute. -3. Remove one sided disputes - if a dispute doesn't contain two opposing votes it is not imported onchain. This serves - as a measure not to import one sided disputes. A dispute is raised only if there are two opposing votes so if the - client is not sending them the dispute is a potential spam. -4. Remove unconfirmed disputes - if a dispute contains less votes than the byzantine threshold it is removed. This is - also a spam precaution. A legitimate client will send only confirmed disputes to the runtime. \ No newline at end of file diff --git a/roadmap/implementers-guide/src/types/approval.md b/roadmap/implementers-guide/src/types/approval.md index b58e0a8187e1..e85a625b0710 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 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 secondary 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 729c72180ee5..b9d5900b7f17 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 approval checkers. + /// must also be kept available for secondary checkers. persisted_validation_data_hash: Hash, /// The blake2-256 hash of the `pov-block`. pov_hash: Hash, @@ -92,22 +92,6 @@ 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. @@ -116,7 +100,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, 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. +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. 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 new file mode 100644 index 000000000000..e8ec6cea8f4a --- /dev/null +++ b/roadmap/implementers-guide/src/types/chain.md @@ -0,0 +1,30 @@ +# 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 41d624670363..4b9dc97c27e2 100644 --- a/roadmap/implementers-guide/src/types/overseer-protocol.md +++ b/roadmap/implementers-guide/src/types/overseer-protocol.md @@ -681,7 +681,9 @@ 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](../runtime-api) of the guide. +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. ```rust enum RuntimeApiRequest { @@ -825,7 +827,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: approval checkers would use this request relying on the full prior checks + /// use-case: secondary 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 f68f1e60feee..331429bd1fc5 100644 --- a/roadmap/implementers-guide/src/types/pvf-prechecking.md +++ b/roadmap/implementers-guide/src/types/pvf-prechecking.md @@ -1,7 +1,5 @@ # 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 a641afd12496..401eec5a30d9 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "polkadot-rpc" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] -jsonrpsee = { version = "0.16.2", features = ["server"] } +jsonrpsee = { version = "0.15.1", 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" } -mmr-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-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 43efefcae15b..2b3497832caa 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -108,7 +108,11 @@ where + Sync + 'static, C::Api: frame_rpc_system::AccountNonceApi, - C::Api: mmr_rpc::MmrRuntimeApi::Hash, BlockNumber>, + C::Api: pallet_mmr_rpc::MmrRuntimeApi< + Block, + ::Hash, + BlockNumber, + >, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, C::Api: BabeApi, C::Api: BlockBuilder, @@ -119,7 +123,7 @@ where { use beefy_gadget_rpc::{Beefy, BeefyApiServer}; use frame_rpc_system::{System, SystemApiServer}; - use mmr_rpc::{Mmr, MmrApiServer}; + use pallet_mmr_rpc::{Mmr, MmrApiServer}; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; use sc_consensus_babe_rpc::{Babe, BabeApiServer}; use sc_finality_grandpa_rpc::{Grandpa, GrandpaApiServer}; diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 2fbc67eb974d..96f29eae9257 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-runtime-common" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] impl-trait-for-tuples = "0.2.2" @@ -11,11 +11,11 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.139", default-features = false } +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, package = "sp-beefy" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", 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 } 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 c6d8452be79d..0cd436955827 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] paste = "1.0" diff --git a/runtime/common/src/assigned_slots.rs b/runtime/common/src/assigned_slots.rs index e7da8c7407cf..9be227a37352 100644 --- a/runtime/common/src/assigned_slots.rs +++ b/runtime/common/src/assigned_slots.rs @@ -200,7 +200,6 @@ 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)?; @@ -259,7 +258,6 @@ 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, @@ -343,7 +341,6 @@ 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 bdbd9d4cae97..f9181a7eac7b 100644 --- a/runtime/common/src/auctions.rs +++ b/runtime/common/src/auctions.rs @@ -253,7 +253,6 @@ 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, @@ -280,7 +279,6 @@ 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, @@ -298,7 +296,6 @@ 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 a07bf37079d3..bb0663ec34f7 100644 --- a/runtime/common/src/claims.rs +++ b/runtime/common/src/claims.rs @@ -247,9 +247,12 @@ pub mod pallet { impl GenesisBuild for GenesisConfig { fn build(&self) { // build `Claims` - self.claims.iter().map(|(a, b, _, _)| (*a, *b)).for_each(|(a, b)| { - Claims::::insert(a, b); - }); + self.claims + .iter() + .map(|(a, b, _, _)| (a.clone(), b.clone())) + .for_each(|(a, b)| { + Claims::::insert(a, b); + }); // build `Total` Total::::put( self.claims @@ -263,16 +266,17 @@ pub mod pallet { // build `Signing` self.claims .iter() - .filter_map(|(a, _, _, s)| Some((*a, (*s)?))) + .filter_map(|(a, _, _, s)| Some((a.clone(), s.clone()?))) .for_each(|(a, s)| { Signing::::insert(a, s); }); // build `Preclaims` - self.claims.iter().filter_map(|(a, _, i, _)| Some((i.clone()?, *a))).for_each( - |(i, a)| { + self.claims + .iter() + .filter_map(|(a, _, i, _)| Some((i.clone()?, a.clone()))) + .for_each(|(i, a)| { Preclaims::::insert(i, a); - }, - ); + }); } } @@ -305,7 +309,6 @@ pub mod pallet { /// /// Total Complexity: O(1) /// - #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::claim())] pub fn claim( origin: OriginFor, @@ -338,7 +341,6 @@ pub mod pallet { /// /// Total Complexity: O(1) /// - #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::mint_claim())] pub fn mint_claim( origin: OriginFor, @@ -386,7 +388,6 @@ pub mod pallet { /// /// Total Complexity: O(1) /// - #[pallet::call_index(2)] #[pallet::weight(T::WeightInfo::claim_attest())] pub fn claim_attest( origin: OriginFor, @@ -423,7 +424,6 @@ pub mod pallet { /// /// Total Complexity: O(1) /// - #[pallet::call_index(3)] #[pallet::weight(( T::WeightInfo::attest(), DispatchClass::Normal, @@ -440,7 +440,6 @@ pub mod pallet { Ok(()) } - #[pallet::call_index(4)] #[pallet::weight(T::WeightInfo::move_claim())] pub fn move_claim( origin: OriginFor, @@ -539,7 +538,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 @@ -646,7 +645,7 @@ where info: &DispatchInfoOf, len: usize, ) -> Result { - self.validate(who, call, info, len).map(|_| ()) + Ok(self.validate(who, call, info, len).map(|_| ())?) } // diff --git a/runtime/common/src/crowdloan/migration.rs b/runtime/common/src/crowdloan/migration.rs index 468c2a572b51..775d70f92458 100644 --- a/runtime/common/src/crowdloan/migration.rs +++ b/runtime/common/src/crowdloan/migration.rs @@ -15,53 +15,7 @@ // along with Polkadot. If not, see . use super::*; -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(()) - } -} +use frame_support::{storage_alias, Twox64Concat}; /// Migrations for using fund index to create fund accounts instead of para ID. pub mod crowdloan_index_migration { @@ -113,10 +67,12 @@ pub mod crowdloan_index_migration { let leases = Leases::::get(para_id).unwrap_or_default(); let mut found_lease_deposit = false; - for (who, _amount) in leases.iter().flatten() { - if *who == old_fund_account { - found_lease_deposit = true; - break + for maybe_deposit in leases.iter() { + if let Some((who, _amount)) = maybe_deposit { + if *who == old_fund_account { + found_lease_deposit = true; + break + } } } if found_lease_deposit { @@ -156,9 +112,11 @@ 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 (who, _amount) in leases.iter_mut().flatten() { - if *who == old_fund_account { - *who = new_fund_account.clone(); + for maybe_deposit in leases.iter_mut() { + if let Some((who, _amount)) = maybe_deposit { + if *who == old_fund_account { + *who = new_fund_account.clone(); + } } } @@ -204,11 +162,13 @@ pub mod crowdloan_index_migration { let leases = Leases::::get(para_id).unwrap_or_default(); let mut new_account_found = false; - 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; + 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; + } } } if new_account_found { diff --git a/runtime/common/src/crowdloan/mod.rs b/runtime/common/src/crowdloan/mod.rs index 711bf0b7b33b..1f84af3f2ee9 100644 --- a/runtime/common/src/crowdloan/mod.rs +++ b/runtime/common/src/crowdloan/mod.rs @@ -51,8 +51,6 @@ pub mod migration; -// TODO: Expose the total amount held. - use crate::{ slot_range::SlotRange, traits::{Auctioneer, Registrar}, @@ -184,13 +182,9 @@ 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] @@ -372,7 +366,6 @@ 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, @@ -450,7 +443,6 @@ 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, @@ -479,7 +471,6 @@ 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, @@ -497,7 +488,6 @@ 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); @@ -513,7 +503,6 @@ 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, @@ -538,7 +527,6 @@ 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; @@ -559,7 +547,6 @@ 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)?; @@ -587,7 +574,6 @@ 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, @@ -625,7 +611,6 @@ 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)?; @@ -644,7 +629,6 @@ 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)?; @@ -658,7 +642,6 @@ 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, @@ -794,7 +777,6 @@ 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 51dbdd80c781..2b10c79cfdff 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, - total_stakable: Balance, + non_gilt_issuance: 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, total_stakable); + let stake = Perquintill::from_rational(total_staked, non_gilt_issuance); 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 * total_stakable; - let staking_payout = (period_fraction * staking_inflation) * total_stakable; + let max_payout = period_fraction * max_annual_inflation * non_gilt_issuance; + let staking_payout = (period_fraction * staking_inflation) * non_gilt_issuance; let rest = max_payout.saturating_sub(staking_payout); - let other_issuance = total_stakable.saturating_sub(total_staked); + let other_issuance = non_gilt_issuance.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 7d7a789d828c..ac5fc69a28e4 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -40,10 +40,10 @@ mod mock; use frame_support::{ parameter_types, traits::{ConstU32, Currency, OneSessionHandler}, - weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}, + weights::{constants::WEIGHT_PER_SECOND, Weight}, }; use frame_system::limits; -use primitives::v2::{AssignmentId, Balance, BlockNumber, ValidatorId}; +use primitives::v2::{AssignmentId, Balance, BlockNumber, ValidatorId, MAX_POV_SIZE}; use sp_runtime::{FixedPointNumber, Perbill, Perquintill}; use static_assertions::const_assert; @@ -69,10 +69,9 @@ pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(1); /// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used /// by Operational extrinsics. pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); -/// We allow for 2 seconds of compute with a 6 second average block time. /// The storage proof size is not limited so far. pub const MAXIMUM_BLOCK_WEIGHT: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX); + WEIGHT_PER_SECOND.saturating_mul(2).set_proof_size(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 c66c33ca21bd..bfcc91e3ba71 100644 --- a/runtime/common/src/paras_registrar.rs +++ b/runtime/common/src/paras_registrar.rs @@ -228,7 +228,6 @@ 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, @@ -247,7 +246,6 @@ 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, @@ -264,7 +262,6 @@ 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)?; @@ -282,7 +279,6 @@ 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)?; @@ -332,7 +328,6 @@ 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)?; @@ -354,7 +349,6 @@ 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)?; @@ -368,7 +362,6 @@ 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)?; @@ -379,7 +372,6 @@ 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, @@ -394,7 +386,6 @@ 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 46885bb678da..49f27a8d44c3 100644 --- a/runtime/common/src/paras_sudo_wrapper.rs +++ b/runtime/common/src/paras_sudo_wrapper.rs @@ -24,7 +24,7 @@ use primitives::v2::Id as ParaId; use runtime_parachains::{ configuration, dmp, hrmp, paras::{self, ParaGenesisArgs}, - ParaLifecycle, + ump, ParaLifecycle, }; use sp_std::boxed::Box; @@ -38,7 +38,10 @@ pub mod pallet { #[pallet::config] #[pallet::disable_frame_system_supertrait_check] - pub trait Config: configuration::Config + paras::Config + dmp::Config + hrmp::Config {} + pub trait Config: + configuration::Config + paras::Config + dmp::Config + ump::Config + hrmp::Config + { + } #[pallet::error] pub enum Error { @@ -67,7 +70,6 @@ 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, @@ -81,7 +83,6 @@ 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)?; @@ -91,7 +92,6 @@ 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,7 +109,6 @@ 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, @@ -130,7 +129,6 @@ 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, @@ -151,7 +149,6 @@ 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 dcc3f1e2b5c5..52ad22bec2fb 100644 --- a/runtime/common/src/purchase.rs +++ b/runtime/common/src/purchase.rs @@ -195,7 +195,6 @@ 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, @@ -233,7 +232,6 @@ 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, @@ -262,7 +260,6 @@ 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, @@ -300,7 +297,6 @@ 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`. @@ -370,7 +366,6 @@ 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)?; @@ -383,7 +378,6 @@ 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)?; @@ -400,7 +394,6 @@ 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 a87f1cd7a074..33d221b209d5 100644 --- a/runtime/common/src/slots/migration.rs +++ b/runtime/common/src/slots/migration.rs @@ -31,16 +31,18 @@ pub mod slots_crowdloan_index_migration { for (para_id, leases) in Leases::::iter() { let old_fund_account = old_fund_account_id::(para_id); - 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 + 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 + } } } } @@ -59,9 +61,11 @@ 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 (who, _amount) in leases.iter_mut().flatten() { - if *who == old_fund_account { - *who = new_fund_account.clone(); + for maybe_deposit in leases.iter_mut() { + if let Some((who, _amount)) = maybe_deposit { + if *who == old_fund_account { + *who = new_fund_account.clone(); + } } } @@ -79,9 +83,11 @@ 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 (who, _amount) in leases.iter().flatten() { - if *who == old_fund_account { - panic!("old fund account found after migration!"); + 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!"); + } } } } diff --git a/runtime/common/src/slots/mod.rs b/runtime/common/src/slots/mod.rs index 62637d582b55..673d9f86e1bd 100644 --- a/runtime/common/src/slots/mod.rs +++ b/runtime/common/src/slots/mod.rs @@ -165,7 +165,6 @@ 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, @@ -184,7 +183,6 @@ 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)?; @@ -207,7 +205,6 @@ 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)?; @@ -1042,8 +1039,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 0 .. 100; - let t in 0 .. 100; + let c in 1 .. 100; + let t in 1 .. 100; let period_begin = 1u32.into(); let period_count = 4u32.into(); diff --git a/runtime/kusama/Cargo.toml b/runtime/kusama/Cargo.toml index d53082803f8e..ec3de40ec5e6 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"] } @@ -11,14 +11,14 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.139", default-features = false } +serde = { version = "1.0.137", default-features = false } serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" 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, package = "sp-beefy" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } 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-nis = { 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 } @@ -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", package = "frame-remote-externalities" } -tokio = { version = "1.24.1", features = ["macros"] } +remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" } +tokio = { version = "1.19.2", 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-nis/std", + "pallet-gilt/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-nis/runtime-benchmarks", + "pallet-gilt/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-nis/try-runtime", + "pallet-gilt/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 6d5dc406586c..6f85387f743d 100644 --- a/runtime/kusama/constants/Cargo.toml +++ b/runtime/kusama/constants/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "kusama-runtime-constants" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] smallvec = "1.8.0" @@ -10,17 +10,10 @@ 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", 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" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [features] default = ["std"] std = [ - "frame-support/std", - "primitives/std", - "runtime-common/std", - "sp-core/std", - "sp-runtime/std", - "sp-weights/std" + "sp-runtime/std" ] diff --git a/runtime/kusama/constants/src/lib.rs b/runtime/kusama/constants/src/lib.rs index 923f71b94dd8..a8d047241b24 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 QUID: Balance = UNITS / 30; - pub const CENTS: Balance = QUID / 100; + pub const CENTS: Balance = UNITS / 30_000; + pub const QUID: Balance = CENTS * 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 7931478ee7b0..a96b7bfc11de 100644 --- a/runtime/kusama/constants/src/weights/block_weights.rs +++ b/runtime/kusama/constants/src/weights/block_weights.rs @@ -1,26 +1,28 @@ -// Copyright 2017-2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Substrate. -// 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. +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 -// 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. +// 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. -// 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-11-16 (Y/M/D) -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-08-19 (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/kusama/constants/src/weights/` -//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -32,32 +34,32 @@ // --weight-path=runtime/kusama/constants/src/weights/ // --warmup=10 // --repeat=100 -// --header=./file_header.txt -use sp_core::parameter_types; -use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; +use frame_support::{ + parameter_types, + weights::{constants::WEIGHT_PER_NANOS, Weight}, +}; parameter_types! { /// Time to execute an empty block. - /// Calculated by multiplying the *Average* with `1.0` and adding `0`. + /// Calculated by multiplying the *Average* with `1` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 6_665_440, 6_986_371 - /// Average: 6_731_894 - /// Median: 6_723_700 - /// Std-Dev: 49280.83 + /// Min, Max: 6_094_385, 6_351_993 + /// Average: 6_192_341 + /// Median: 6_193_838 + /// Std-Dev: 63893.84 /// /// Percentiles nanoseconds: - /// 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)); + /// 99th: 6_332_047 + /// 95th: 6_308_225 + /// 75th: 6_236_204 + pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(6_192_341); } #[cfg(test)] mod test_weights { - use sp_weights::constants; + use frame_support::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, @@ -68,12 +70,12 @@ mod test_weights { // At least 100 µs. assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + w.ref_time() >= 100u64 * constants::WEIGHT_PER_MICROS.ref_time(), "Weight should be at least 100 µs." ); // At most 50 ms. assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, + w.ref_time() <= 50u64 * constants::WEIGHT_PER_MILLIS.ref_time(), "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 f0fc7739ee27..dfa623b6c72a 100644 --- a/runtime/kusama/constants/src/weights/extrinsic_weights.rs +++ b/runtime/kusama/constants/src/weights/extrinsic_weights.rs @@ -1,26 +1,27 @@ -// Copyright 2017-2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Substrate. -// 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. +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 -// 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. +// 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. -// 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-11-16 (Y/M/D) -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-04-20 (Y/M/D) //! //! 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.0`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -32,32 +33,32 @@ // --weight-path=runtime/kusama/constants/src/weights/ // --warmup=10 // --repeat=100 -// --header=./file_header.txt -use sp_core::parameter_types; -use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; +use frame_support::{ + parameter_types, + weights::{constants::WEIGHT_PER_NANOS, Weight}, +}; parameter_types! { /// Time to execute a NO-OP extrinsic, for example `System::remark`. - /// Calculated by multiplying the *Average* with `1.0` and adding `0`. + /// Calculated by multiplying the *Average* with `1` and adding `0`. /// - /// Stats nanoseconds: - /// Min, Max: 94_359, 96_436 - /// Average: 94_889 - /// Median: 94_839 - /// Std-Dev: 369.49 + /// Stats [NS]: + /// Min, Max: 85_946, 88_408 + /// Average: 86_309 + /// Median: 86_213 + /// Std-Dev: 345.03 /// - /// 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)); + /// Percentiles [NS]: + /// 99th: 87_527 + /// 95th: 86_901 + /// 75th: 86_308 + pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(86_309); } #[cfg(test)] mod test_weights { - use sp_weights::constants; + use frame_support::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, @@ -68,12 +69,12 @@ mod test_weights { // At least 10 µs. assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + w.ref_time() >= 10u64 * constants::WEIGHT_PER_MICROS.ref_time(), "Weight should be at least 10 µs." ); // At most 1 ms. assert!( - w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + w.ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "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 4338d928d807..dca7d348310c 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_REF_TIME_PER_NANOS, - write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "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 1d115d963fac..87867ebfe177 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_REF_TIME_PER_NANOS, - write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "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 6d01780ebc0c..52ab8d0bebc8 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: 1 * MINUTES, + min_enactment_period: 4, 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: 1 * MINUTES, + min_enactment_period: 4, 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: 1 * MINUTES, + min_enactment_period: 4, 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: 1 * MINUTES, + min_enactment_period: 4, 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: 1 * MINUTES, + min_enactment_period: 4, 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: 1 * MINUTES, + min_enactment_period: 4, 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: 1 * MINUTES, + min_enactment_period: 4, 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: 1 * MINUTES, + min_enactment_period: 4, 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: 1 * MINUTES, + min_enactment_period: 4, 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 3dd4eba2b57e..87cbfd7eea2f 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, Treasurer, WhitelistedCaller, + ReferendumKiller, Spender, StakingAdmin, WhitelistedCaller, }; mod tracks; pub use tracks::TracksInfo; @@ -47,15 +47,14 @@ impl pallet_conviction_voting::Config for Runtime { type Currency = Balances; type VoteLockingPeriod = VoteLockingPeriod; type MaxVotes = ConstU32<512>; - type MaxTurnout = - frame_support::traits::tokens::currency::ActiveIssuanceOf; + type MaxTurnout = frame_support::traits::TotalIssuanceOf; type Polls = Referenda; } parameter_types! { pub const AlarmInterval: BlockNumber = 1; - pub const SubmissionDeposit: Balance = 1 * QUID; - pub const UndecidingTimeout: BlockNumber = 14 * DAYS; + pub const SubmissionDeposit: Balance = 100 * UNITS; + pub const UndecidingTimeout: BlockNumber = 28 * DAYS; } parameter_types! { @@ -72,7 +71,7 @@ impl pallet_whitelist::Config for Runtime { type WhitelistOrigin = EitherOf>, Fellows>; type DispatchWhitelistedOrigin = EitherOf, WhitelistedCaller>; - type Preimages = Preimage; + type PreimageProvider = Preimage; } impl pallet_referenda::Config for Runtime { diff --git a/runtime/kusama/src/governance/origins.rs b/runtime/kusama/src/governance/origins.rs index b02ff53f3bab..be8c44430f46 100644 --- a/runtime/kusama/src/governance/origins.rs +++ b/runtime/kusama/src/governance/origins.rs @@ -120,7 +120,6 @@ pub mod pallet_custom_origins { } decl_unit_ensures!( StakingAdmin, - Treasurer, FellowshipAdmin, GeneralAdmin, AuctionAdmin, @@ -174,7 +173,6 @@ 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 93b2312a76f8..fd1c94118507 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(5), percent(50)); + Curve::make_reciprocal(1, 28, percent(20), percent(10), 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: 100 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 14 * DAYS, - confirm_period: 24 * HOURS, - min_enactment_period: 24 * HOURS, + decision_deposit: 1_000 * GRAND, + prepare_period: 3 * HOURS, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 3 * 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: 100, - decision_deposit: 10 * GRAND, - prepare_period: 30 * MINUTES, - decision_period: 14 * DAYS, + max_deciding: 10, + decision_deposit: 10_000 * GRAND, + prepare_period: 3 * HOURS, + decision_period: 28 * DAYS, confirm_period: 10 * MINUTES, - min_enactment_period: 10 * MINUTES, + min_enactment_period: 30 * 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: 2 * HOURS, - decision_period: 14 * DAYS, + prepare_period: 4, + decision_period: 28 * DAYS, confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, + min_enactment_period: 2 * DAYS, 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: 1 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 14 * DAYS, + decision_deposit: 5 * GRAND, + prepare_period: 4, + decision_period: 28 * DAYS, confirm_period: 3 * HOURS, - min_enactment_period: 24 * HOURS, + min_enactment_period: 2 * DAYS, 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: 2 * HOURS, - decision_period: 14 * DAYS, + prepare_period: 4, + decision_period: 28 * DAYS, confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, + min_enactment_period: 2 * DAYS, 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: 2 * HOURS, - decision_period: 14 * DAYS, + prepare_period: 4, + decision_period: 28 * DAYS, confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, + min_enactment_period: 2 * DAYS, 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: 2 * HOURS, - decision_period: 14 * DAYS, + prepare_period: 4, + decision_period: 28 * DAYS, confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, + min_enactment_period: 2 * DAYS, 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: 2 * HOURS, - decision_period: 14 * DAYS, + prepare_period: 4, + decision_period: 28 * DAYS, confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, + min_enactment_period: 2 * DAYS, 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: 10 * GRAND, - prepare_period: 2 * HOURS, - decision_period: 7 * DAYS, + decision_deposit: 50 * GRAND, + prepare_period: 4, + decision_period: 28 * 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: 2 * HOURS, - decision_period: 14 * DAYS, + prepare_period: 4, + decision_period: 28 * 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: 1 * QUID, - prepare_period: 1 * MINUTES, - decision_period: 7 * DAYS, - confirm_period: 10 * MINUTES, - min_enactment_period: 1 * MINUTES, + decision_deposit: 5 * QUID, + prepare_period: 4, + decision_period: 28 * DAYS, + confirm_period: 3 * HOURS, + min_enactment_period: 28 * DAYS, 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: 10 * QUID, - prepare_period: 10 * MINUTES, - decision_period: 7 * DAYS, - confirm_period: 1 * HOURS, - min_enactment_period: 10 * MINUTES, + decision_deposit: 50 * QUID, + prepare_period: 4, + decision_period: 28 * DAYS, + confirm_period: 6 * HOURS, + min_enactment_period: 28 * DAYS, 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: 100 * QUID, - prepare_period: 4 * HOURS, - decision_period: 14 * DAYS, + decision_deposit: 500 * QUID, + prepare_period: 4, + decision_period: 28 * DAYS, confirm_period: 12 * HOURS, - min_enactment_period: 24 * HOURS, + min_enactment_period: 28 * DAYS, 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: 50, - decision_deposit: 200 * QUID, - prepare_period: 4 * HOURS, - decision_period: 14 * DAYS, + max_deciding: 20, + decision_deposit: 1_500 * QUID, + prepare_period: 4, + decision_period: 28 * DAYS, confirm_period: 24 * HOURS, - min_enactment_period: 24 * HOURS, + min_enactment_period: 28 * DAYS, 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: 50, - decision_deposit: 400 * QUID, - prepare_period: 4 * HOURS, - decision_period: 14 * DAYS, + max_deciding: 10, + decision_deposit: 5 * GRAND, + prepare_period: 4, + decision_period: 28 * DAYS, confirm_period: 48 * HOURS, - min_enactment_period: 24 * HOURS, + min_enactment_period: 28 * DAYS, 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 8cf3e95f79bb..7ef451e52ea9 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -20,7 +20,6 @@ // `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, @@ -54,7 +53,7 @@ use frame_support::{ construct_runtime, parameter_types, traits::{ ConstU32, Contains, EitherOf, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, - LockIdentifier, PrivilegeCmp, StorageMapShim, WithdrawReasons, + LockIdentifier, PrivilegeCmp, WithdrawReasons, }, weights::ConstantMultiplier, PalletId, RuntimeDebug, @@ -64,7 +63,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::{ConstU128, OpaqueMetadata}; +use sp_core::OpaqueMetadata; use sp_mmr_primitives as mmr; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, @@ -106,10 +105,9 @@ pub mod xcm_config; // Governance configurations. pub mod governance; use governance::{ - old::CouncilCollective, pallet_custom_origins, AuctionAdmin, Fellows, GeneralAdmin, LeaseAdmin, - StakingAdmin, Treasurer, TreasurySpender, + old::CouncilCollective, pallet_custom_origins, AuctionAdmin, GeneralAdmin, LeaseAdmin, + StakingAdmin, TreasurySpender, }; -use xcm_config::CheckAccount; #[cfg(test)] mod tests; @@ -126,13 +124,13 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("kusama"), impl_name: create_runtime_str!("parity-kusama"), authoring_version: 2, - spec_version: 9330, + spec_version: 9310, 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: 15, state_version: 0, }; @@ -499,7 +497,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime { (), >; type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig; - type ForceOrigin = EitherOf, StakingAdmin>; + type ForceOrigin = StakingAdmin; type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo; type MaxElectingVoters = MaxElectingVoters; type MaxElectableTargets = MaxElectableTargets; @@ -539,7 +537,7 @@ impl pallet_staking::EraPayout for EraPayout { runtime_common::impls::era_payout( total_staked, - Nis::issuance().other, + Gilt::issuance().non_gilt, MAX_ANNUAL_INFLATION, Perquintill::from_rational(era_duration_millis, MILLISECONDS_PER_YEAR), auctioned_slots, @@ -584,7 +582,8 @@ impl pallet_staking::Config for Runtime { type SessionsPerEra = SessionsPerEra; type BondingDuration = BondingDuration; type SlashDeferDuration = SlashDeferDuration; - type AdminOrigin = EitherOf, StakingAdmin>; + // The staking admin or root can cancel the slash. + type SlashCancelOrigin = EitherOf, StakingAdmin>; type SessionInterface = Self; type EraPayout = EraPayout; type NextNewSession = Session; @@ -634,8 +633,8 @@ parameter_types! { impl pallet_treasury::Config for Runtime { type PalletId = TreasuryPalletId; type Currency = Balances; - type ApproveOrigin = EitherOfDiverse, Treasurer>; - type RejectOrigin = EitherOfDiverse, Treasurer>; + type ApproveOrigin = EnsureRoot; + type RejectOrigin = EnsureRoot; type RuntimeEvent = RuntimeEvent; type OnSlash = Treasury; type ProposalBond = ProposalBond; @@ -842,8 +841,8 @@ impl pallet_identity::Config for Runtime { type MaxAdditionalFields = MaxAdditionalFields; type MaxRegistrars = MaxRegistrars; type Slashed = Treasury; - type ForceOrigin = EitherOf, GeneralAdmin>; - type RegistrarOrigin = EitherOf, GeneralAdmin>; + type ForceOrigin = GeneralAdmin; + type RegistrarOrigin = GeneralAdmin; type WeightInfo = weights::pallet_identity::WeightInfo; } @@ -1006,11 +1005,6 @@ 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(..) | @@ -1028,7 +1022,7 @@ impl InstanceFilter for ProxyType { RuntimeCall::Scheduler(..) | RuntimeCall::Proxy(..) | RuntimeCall::Multisig(..) | - RuntimeCall::Nis(..) | + RuntimeCall::Gilt(..) | RuntimeCall::Registrar(paras_registrar::Call::register {..}) | RuntimeCall::Registrar(paras_registrar::Call::deregister {..}) | // Specifically omitting Registrar `swap` @@ -1040,22 +1034,17 @@ 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(..) | - // OpenGov calls - RuntimeCall::ConvictionVoting(..) | - RuntimeCall::Referenda(..) | - RuntimeCall::FellowshipCollective(..) | - RuntimeCall::FellowshipReferenda(..) | - RuntimeCall::Whitelist(..) - ), + ProxyType::Governance => + matches!( + c, + RuntimeCall::Democracy(..) | + RuntimeCall::Council(..) | RuntimeCall::TechnicalCommittee(..) | + RuntimeCall::PhragmenElection(..) | + RuntimeCall::Treasury(..) | + RuntimeCall::Bounties(..) | + RuntimeCall::Tips(..) | RuntimeCall::Utility(..) | + RuntimeCall::ChildBounties(..) + ), ProxyType::Staking => { matches!( c, @@ -1203,7 +1192,7 @@ impl slots::Config for Runtime { type Registrar = Registrar; type LeasePeriod = LeasePeriod; type LeaseOffset = (); - type ForceOrigin = EitherOf, LeaseAdmin>; + type ForceOrigin = LeaseAdmin; type WeightInfo = weights::runtime_common_slots::WeightInfo; } @@ -1243,61 +1232,37 @@ impl auctions::Config for Runtime { type EndingPeriod = EndingPeriod; type SampleLength = SampleLength; type Randomness = pallet_babe::RandomnessFromOneEpochAgo; - type InitiateOrigin = EitherOf, AuctionAdmin>; + type InitiateOrigin = 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 NisBasePeriod: BlockNumber = 7 * DAYS; - pub const MinBid: Balance = 100 * QUID; - pub MinReceipt: Perquintill = Perquintill::from_rational(1u64, 10_000_000u64); + 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 IntakePeriod: BlockNumber = 5 * MINUTES; - 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 "); + pub const MaxIntakeBids: u32 = 100; } -impl pallet_nis::Config for Runtime { - type WeightInfo = weights::pallet_nis::WeightInfo; +impl pallet_gilt::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type CurrencyBalance = Balance; - type FundOrigin = frame_system::EnsureSigned; - type Counterpart = NisCounterpartBalances; - type CounterpartAmount = WithMaximumOf>; + type AdminOrigin = EnsureRoot; type Deficit = (); // Mint + type Surplus = (); // Burn type IgnoredIssuance = IgnoredIssuance; - 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 QueueCount = QueueCount; + type MaxQueueLen = MaxQueueLen; + type FifoQueueLen = FifoQueueLen; + type Period = GiltPeriod; + type MinFreeze = MinFreeze; type IntakePeriod = IntakePeriod; - type MaxIntakeWeight = MaxIntakeWeight; - type ThawThrottle = ThawThrottle; + type MaxIntakeBids = MaxIntakeBids; + type WeightInfo = weights::pallet_gilt::WeightInfo; } parameter_types! { @@ -1411,10 +1376,8 @@ 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, - // NIS pallet. - Nis: pallet_nis::{Pallet, Call, Storage, Event} = 38, -// pub type NisCounterpartInstance = pallet_balances::Instance2; - NisCounterpartBalances: pallet_balances:: = 45, + // Gilts pallet. + Gilt: pallet_gilt::{Pallet, Call, Storage, Event, Config} = 38, // Provides a semi-sorted list of nominators for staking. VoterList: pallet_bags_list::::{Pallet, Call, Storage, Event} = 39, @@ -1480,23 +1443,6 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { } } -/// All migrations that will run on the next runtime upgrade. -/// -/// Should be cleared after every release. -pub type Migrations = ( - pallet_balances::migration::MigrateToTrackInactive, - crowdloan::migration::MigrateToTrackInactive, - pallet_referenda::migration::v1::MigrateV0ToV1, - pallet_referenda::migration::v1::MigrateV0ToV1< - Runtime, - governance::FellowshipReferendaInstance, - >, - pallet_scheduler::migration::v4::CleanupAgendas, - pallet_staking::migrations::v13::MigrateToV13, - parachains_disputes::migration::v1::MigrateToV1, - parachains_configuration::migration::v4::MigrateToV4, -); - /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -1507,7 +1453,17 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, + ( + // "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, + ), >; /// The payload being signed in the transactions. pub type SignedPayload = generic::SignedPayload; @@ -1521,7 +1477,7 @@ mod benches { define_benchmarks!( // Polkadot // NOTE: Make sure to prefix these with `runtime_common::` so - // that the path resolves correctly in the generated file. + // the that path resolves correctly in the generated file. [runtime_common::auctions, Auctions] [runtime_common::crowdloan, Crowdloan] [runtime_common::claims, Claims] @@ -1536,7 +1492,6 @@ mod benches { [runtime_parachains::ump, Ump] // Substrate [pallet_balances, Balances] - [pallet_balances, NisCounterpartBalances] [pallet_bags_list, VoterList] [frame_benchmarking::baseline, Baseline::] [pallet_bounties, Bounties] @@ -1549,7 +1504,7 @@ mod benches { [pallet_election_provider_multi_phase, ElectionProviderMultiPhase] [frame_election_provider_support, ElectionProviderBench::] [pallet_fast_unstake, FastUnstake] - [pallet_nis, Nis] + [pallet_gilt, Gilt] [pallet_identity, Identity] [pallet_im_online, ImOnline] [pallet_indices, Indices] @@ -1749,10 +1704,6 @@ 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, @@ -1919,21 +1870,21 @@ sp_api::impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + fn on_runtime_upgrade() -> (Weight, Weight) { log::info!("try-runtime::on_runtime_upgrade kusama."); - let weight = Executive::try_runtime_upgrade(checks).unwrap(); + let weight = Executive::try_runtime_upgrade().unwrap(); (weight, BlockWeights::get().max_block) } - 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() + 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") } } @@ -2088,7 +2039,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 * 167 / 100, UNITS / 100); + assert_eq_error_rate!(deposit, UNITS * 16 / 100, UNITS / 100); } } @@ -2239,6 +2190,6 @@ mod remote_tests { .build() .await .unwrap(); - ext.execute_with(|| Runtime::on_runtime_upgrade(true)); + ext.execute_with(|| Runtime::on_runtime_upgrade()); } } diff --git a/runtime/kusama/src/weights/frame_benchmarking_baseline.rs b/runtime/kusama/src/weights/frame_benchmarking_baseline.rs index adf6d21c8ad5..174c8859a41e 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,54 +46,46 @@ pub struct WeightInfo(PhantomData); impl frame_benchmarking::baseline::WeightInfo for WeightInfo { /// The range of component `i` is `[0, 1000000]`. fn addition(_i: u32, ) -> Weight { - // Minimum execution time: 102 nanoseconds. - Weight::from_ref_time(153_256 as u64) + Weight::from_ref_time(114_000 as u64) } /// The range of component `i` is `[0, 1000000]`. fn subtraction(_i: u32, ) -> Weight { - // Minimum execution time: 104 nanoseconds. - Weight::from_ref_time(159_150 as u64) + Weight::from_ref_time(125_000 as u64) } /// The range of component `i` is `[0, 1000000]`. fn multiplication(_i: u32, ) -> Weight { - // Minimum execution time: 106 nanoseconds. - Weight::from_ref_time(155_325 as u64) + Weight::from_ref_time(116_000 as u64) } /// The range of component `i` is `[0, 1000000]`. fn division(_i: u32, ) -> Weight { - // Minimum execution time: 102 nanoseconds. - Weight::from_ref_time(148_483 as u64) + Weight::from_ref_time(115_000 as u64) } /// The range of component `i` is `[0, 100]`. fn hashing(i: u32, ) -> Weight { - // 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)) + 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)) } - /// The range of component `i` is `[0, 100]`. + /// The range of component `i` is `[1, 100]`. fn sr25519_verification(i: u32, ) -> Weight { - // 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)) + 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)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[0, 1000]`. fn storage_read(i: u32, ) -> Weight { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 255bda05e015..3b1691b5b770 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,22 +48,20 @@ 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 { - // 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)) + 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)) } /// 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 { - // 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)) + 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)) } } diff --git a/runtime/kusama/src/weights/frame_system.rs b/runtime/kusama/src/weights/frame_system.rs index dd8aeed0d219..022c09e7752b 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,51 +46,45 @@ pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(b: u32, ) -> Weight { - // Minimum execution time: 3_661 nanoseconds. - Weight::from_ref_time(3_719_000 as u64) + Weight::from_ref_time(882_000 as u64) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(411 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - // Minimum execution time: 12_500 nanoseconds. - Weight::from_ref_time(12_792_000 as u64) + Weight::from_ref_time(0 as u64) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_770 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_ref_time(2_000 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 { - // Minimum execution time: 8_514 nanoseconds. - Weight::from_ref_time(8_736_000 as u64) + Weight::from_ref_time(7_344_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 `[0, 1000]`. + /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { - // 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)) + 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)) .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 `[0, 1000]`. + /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { - // 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)) + 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)) .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 `[0, 1000]`. + /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - // 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)) + 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)) .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 c277b2beb819..2f9e2d35c211 100644 --- a/runtime/kusama/src/weights/mod.rs +++ b/runtime/kusama/src/weights/mod.rs @@ -19,7 +19,6 @@ 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; @@ -29,12 +28,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 de0700d07983..e753f72a62ea 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,8 +49,7 @@ 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 { - // Minimum execution time: 62_727 nanoseconds. - Weight::from_ref_time(64_215_000 as u64) + Weight::from_ref_time(61_057_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -59,8 +58,7 @@ 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 { - // Minimum execution time: 61_907 nanoseconds. - Weight::from_ref_time(64_148_000 as u64) + Weight::from_ref_time(59_674_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -70,8 +68,7 @@ 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 { - // Minimum execution time: 61_775 nanoseconds. - Weight::from_ref_time(62_422_000 as u64) + Weight::from_ref_time(60_844_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 1787c8d3822d..adfee6ac8b23 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,50 +46,43 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - // Minimum execution time: 40_902 nanoseconds. - Weight::from_ref_time(41_638_000 as u64) + Weight::from_ref_time(39_458_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 { - // Minimum execution time: 30_093 nanoseconds. - Weight::from_ref_time(30_732_000 as u64) + Weight::from_ref_time(28_773_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 { - // Minimum execution time: 23_901 nanoseconds. - Weight::from_ref_time(24_238_000 as u64) + Weight::from_ref_time(22_414_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 { - // Minimum execution time: 26_402 nanoseconds. - Weight::from_ref_time(27_026_000 as u64) + Weight::from_ref_time(25_136_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 { - // Minimum execution time: 40_328 nanoseconds. - Weight::from_ref_time(41_242_000 as u64) + Weight::from_ref_time(39_681_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 { - // Minimum execution time: 35_401 nanoseconds. - Weight::from_ref_time(36_122_000 as u64) + Weight::from_ref_time(33_651_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 { - // Minimum execution time: 20_178 nanoseconds. - Weight::from_ref_time(20_435_000 as u64) + Weight::from_ref_time(19_448_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 deleted file mode 100644 index fcaa58c5fbda..000000000000 --- a/runtime/kusama/src/weights/pallet_balances_nis_counterpart_balances.rs +++ /dev/null @@ -1,105 +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_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 cf34a99e51a3..e4c633dc6114 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,49 +50,43 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 11_505 nanoseconds. - Weight::from_ref_time(11_831_000 as u64) + Weight::from_ref_time(11_971_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 { - // Minimum execution time: 11_422 nanoseconds. - Weight::from_ref_time(11_716_000 as u64) + Weight::from_ref_time(11_213_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 { - // Minimum execution time: 40_028 nanoseconds. - Weight::from_ref_time(40_648_000 as u64) + Weight::from_ref_time(39_351_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 { - // Minimum execution time: 27_639 nanoseconds. - Weight::from_ref_time(28_480_000 as u64) + Weight::from_ref_time(27_149_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 { - // Minimum execution time: 24_826 nanoseconds. - Weight::from_ref_time(25_281_000 as u64) + Weight::from_ref_time(23_870_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -101,8 +95,7 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: ChildBounties ChildrenCuratorFees (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn claim_bounty() -> Weight { - // Minimum execution time: 67_233 nanoseconds. - Weight::from_ref_time(68_242_000 as u64) + Weight::from_ref_time(67_658_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -111,8 +104,7 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_proposed() -> Weight { - // Minimum execution time: 43_779 nanoseconds. - Weight::from_ref_time(44_285_000 as u64) + Weight::from_ref_time(41_915_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -121,27 +113,24 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_active() -> Weight { - // Minimum execution time: 52_893 nanoseconds. - Weight::from_ref_time(53_583_000 as u64) + Weight::from_ref_time(51_843_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 { - // Minimum execution time: 21_030 nanoseconds. - Weight::from_ref_time(21_691_000 as u64) + Weight::from_ref_time(19_980_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:2 w:2) - // Storage: System Account (r:4 w:4) - /// The range of component `b` is `[0, 100]`. + // Storage: Bounties Bounties (r:1 w:1) + // Storage: System Account (r:2 w:2) + /// The range of component `b` is `[1, 100]`. fn spend_funds(b: u32, ) -> Weight { - // 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)) + 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)) .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 ae6ecf0808b4..861d7bf92ebf 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,10 +52,9 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -63,8 +62,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 19_296 nanoseconds. - Weight::from_ref_time(19_776_000 as u64) + Weight::from_ref_time(18_300_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -72,8 +70,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 34_816 nanoseconds. - Weight::from_ref_time(35_312_000 as u64) + Weight::from_ref_time(32_067_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -81,16 +78,14 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 46_811 nanoseconds. - Weight::from_ref_time(47_562_000 as u64) + Weight::from_ref_time(43_720_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 { - // Minimum execution time: 29_189 nanoseconds. - Weight::from_ref_time(29_476_000 as u64) + Weight::from_ref_time(27_081_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -99,8 +94,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 69_129 nanoseconds. - Weight::from_ref_time(70_082_000 as u64) + Weight::from_ref_time(65_901_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -111,8 +105,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 52_958 nanoseconds. - Weight::from_ref_time(54_430_000 as u64) + Weight::from_ref_time(50_101_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -123,8 +116,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 62_510 nanoseconds. - Weight::from_ref_time(64_138_000 as u64) + Weight::from_ref_time(61_510_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 5fb745f5397c..8fe7d12e04b5 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -27,7 +27,6 @@ // --chain=kusama-dev // --steps=50 // --repeat=20 -// --pallet=pallet_collective // --extrinsic=* // --execution=wasm // --wasm-execution=compiled @@ -38,7 +37,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,21 +45,20 @@ 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 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]`. + // 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]`. fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - // 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)) + 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)) .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)) @@ -72,12 +70,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Council Members (r:1 w:0) @@ -87,12 +84,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } // Storage: Council Members (r:1 w:0) @@ -107,14 +103,13 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -123,10 +118,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -139,12 +133,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -159,14 +152,13 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -180,12 +172,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -201,14 +192,13 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -218,10 +208,9 @@ 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 { - // 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)) + 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)) .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 4d0711063214..149a26d54b0e 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -27,7 +27,6 @@ // --chain=kusama-dev // --steps=50 // --repeat=20 -// --pallet=pallet_collective // --extrinsic=* // --execution=wasm // --wasm-execution=compiled @@ -38,7 +37,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,21 +45,20 @@ 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 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]`. + // 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 { - // 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)) + 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)) .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)) @@ -72,12 +70,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: TechnicalCommittee Members (r:1 w:0) @@ -87,12 +84,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } // Storage: TechnicalCommittee Members (r:1 w:0) @@ -107,14 +103,13 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -123,10 +118,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -139,12 +133,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -159,14 +152,13 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -180,12 +172,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -201,14 +192,13 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -218,10 +208,9 @@ 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 { - // 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)) + 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)) .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 b8050dcf2c3e..fbbb0d6529b5 100644 --- a/runtime/kusama/src/weights/pallet_conviction_voting.rs +++ b/runtime/kusama/src/weights/pallet_conviction_voting.rs @@ -16,21 +16,22 @@ //! Autogenerated weights for `pallet_conviction_voting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-16, 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_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/ @@ -38,7 +39,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`. @@ -48,12 +49,11 @@ 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:1 w:1) + // Storage: Scheduler Agenda (r:2 w:2) fn vote_new() -> Weight { - // 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)) + 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)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: ConvictionVoting VotingFor (r:1 w:1) @@ -61,8 +61,7 @@ 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 { - // Minimum execution time: 154_191 nanoseconds. - Weight::from_ref_time(156_774_000 as u64) + Weight::from_ref_time(509_859_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -70,16 +69,14 @@ 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 { - // Minimum execution time: 128_599 nanoseconds. - Weight::from_ref_time(131_816_000 as u64) + Weight::from_ref_time(486_638_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 { - // Minimum execution time: 71_872 nanoseconds. - Weight::from_ref_time(73_800_000 as u64) + Weight::from_ref_time(74_517_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -90,13 +87,12 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64))) - .saturating_add(T::DbWeight::get().writes(6 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:2 w:2) @@ -104,21 +100,19 @@ 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 { - // 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)) + 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)) .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(2 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 { - // Minimum execution time: 91_278 nanoseconds. - Weight::from_ref_time(93_505_000 as u64) + Weight::from_ref_time(93_068_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 87865759d494..b9b4127c597e 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-03, 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: @@ -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,15 +49,13 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:1 w:0) // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - // Minimum execution time: 43_480 nanoseconds. - Weight::from_ref_time(44_439_000 as u64) + Weight::from_ref_time(42_340_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 { - // Minimum execution time: 40_276 nanoseconds. - Weight::from_ref_time(41_788_000 as u64) + Weight::from_ref_time(38_557_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -65,8 +63,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_new() -> Weight { - // Minimum execution time: 50_609 nanoseconds. - Weight::from_ref_time(51_581_000 as u64) + Weight::from_ref_time(48_480_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -74,16 +71,14 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_existing() -> Weight { - // Minimum execution time: 50_941 nanoseconds. - Weight::from_ref_time(51_356_000 as u64) + Weight::from_ref_time(48_553_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 { - // Minimum execution time: 21_573 nanoseconds. - Weight::from_ref_time(22_094_000 as u64) + Weight::from_ref_time(20_602_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -94,45 +89,39 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy Blacklist (r:0 w:1) fn blacklist() -> Weight { - // Minimum execution time: 78_016 nanoseconds. - Weight::from_ref_time(79_651_000 as u64) + Weight::from_ref_time(75_265_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 { - // Minimum execution time: 17_106 nanoseconds. - Weight::from_ref_time(17_287_000 as u64) + Weight::from_ref_time(15_498_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 { - // Minimum execution time: 4_801 nanoseconds. - Weight::from_ref_time(4_954_000 as u64) + Weight::from_ref_time(4_503_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - // Minimum execution time: 4_671 nanoseconds. - Weight::from_ref_time(4_906_000 as u64) + Weight::from_ref_time(4_486_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 { - // Minimum execution time: 20_734 nanoseconds. - Weight::from_ref_time(21_068_000 as u64) + Weight::from_ref_time(19_676_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 { - // Minimum execution time: 26_640 nanoseconds. - Weight::from_ref_time(27_058_000 as u64) + Weight::from_ref_time(25_443_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -140,15 +129,13 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:1 w:1) fn cancel_proposal() -> Weight { - // Minimum execution time: 66_091 nanoseconds. - Weight::from_ref_time(67_119_000 as u64) + Weight::from_ref_time(63_468_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 { - // Minimum execution time: 13_879 nanoseconds. - Weight::from_ref_time(14_107_000 as u64) + Weight::from_ref_time(13_030_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy LowestUnbaked (r:1 w:1) @@ -156,10 +143,9 @@ 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 { - // 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)) + 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)) .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)) @@ -172,10 +158,9 @@ 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 { - // 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)) + 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)) .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)) @@ -185,10 +170,9 @@ 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 { - // 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)) + 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)) .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)) @@ -198,10 +182,9 @@ 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 { - // 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)) + 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)) .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)) @@ -209,8 +192,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { } // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - // Minimum execution time: 5_062 nanoseconds. - Weight::from_ref_time(5_265_000 as u64) + Weight::from_ref_time(5_200_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy VotingOf (r:1 w:1) @@ -218,10 +200,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -230,10 +211,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -241,10 +221,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -252,10 +231,9 @@ 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 { - // 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)) + 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)) .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 2705a9d2d49f..e388d4bce642 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,38 +53,33 @@ 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 { - // Minimum execution time: 15_765 nanoseconds. - Weight::from_ref_time(16_178_000 as u64) + Weight::from_ref_time(15_619_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 { - // Minimum execution time: 15_294 nanoseconds. - Weight::from_ref_time(15_649_000 as u64) + Weight::from_ref_time(14_464_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 { - // Minimum execution time: 14_776 nanoseconds. - Weight::from_ref_time(15_204_000 as u64) + Weight::from_ref_time(14_167_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 { - // Minimum execution time: 29_172 nanoseconds. - Weight::from_ref_time(29_735_000 as u64) + Weight::from_ref_time(28_601_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 { - // Minimum execution time: 23_324 nanoseconds. - Weight::from_ref_time(23_675_000 as u64) + Weight::from_ref_time(22_410_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -94,12 +89,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) @@ -114,11 +108,12 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -129,8 +124,7 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) fn submit() -> Weight { - // Minimum execution time: 50_778 nanoseconds. - Weight::from_ref_time(51_219_000 as u64) + Weight::from_ref_time(49_945_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -145,11 +139,16 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -161,13 +160,16 @@ 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 { - // 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)) + 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)) .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 9a333bb4a60b..8d5db5a31006 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,10 +51,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -65,10 +64,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -79,18 +77,16 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 40_370 nanoseconds. - Weight::from_ref_time(41_142_000 as u64) + Weight::from_ref_time(39_001_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -99,20 +95,18 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -122,21 +116,18 @@ 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 { - // Minimum execution time: 44_751 nanoseconds. - Weight::from_ref_time(46_264_000 as u64) + Weight::from_ref_time(44_960_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 { - // Minimum execution time: 34_904 nanoseconds. - Weight::from_ref_time(36_139_000 as u64) + Weight::from_ref_time(34_666_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) @@ -146,8 +137,7 @@ 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 { - // Minimum execution time: 59_246 nanoseconds. - Weight::from_ref_time(60_848_000 as u64) + Weight::from_ref_time(59_021_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -158,12 +148,13 @@ 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 `[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)) + /// 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)) .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))) @@ -181,16 +172,14 @@ 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 { - // 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)) + 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)) .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 4f1ce8aee992..b7b6008fcc7e 100644 --- a/runtime/kusama/src/weights/pallet_fast_unstake.rs +++ b/runtime/kusama/src/weights/pallet_fast_unstake.rs @@ -16,21 +16,22 @@ //! Autogenerated weights for `pallet_fast_unstake` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-27, 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_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/ @@ -49,73 +50,65 @@ 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: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) + // 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) fn on_idle_unstake() -> Weight { - // 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)) + 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)) } // 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:65 w:64) + // Storage: FastUnstake Queue (r:2 w:1) // 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(66 as u64)) + .saturating_add(T::DbWeight::get().writes(3 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 ListNodes (r:1 w:1) // 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 { - // 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)) + 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)) } - // 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 { - // Minimum execution time: 50_711 nanoseconds. - Weight::from_ref_time(51_537_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) + Weight::from_ref_time(23_369_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: FastUnstake ErasToCheckPerBlock (r:0 w:1) fn control() -> Weight { - // Minimum execution time: 4_008 nanoseconds. - Weight::from_ref_time(4_153_000 as u64) + Weight::from_ref_time(3_991_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 new file mode 100644 index 000000000000..3ab2d6d41709 --- /dev/null +++ b/runtime/kusama/src/weights/pallet_gilt.rs @@ -0,0 +1,119 @@ +// 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 46a9f0d10351..050a3b10db8e 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,35 +47,32 @@ 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 { - // 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)) + 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)) .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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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:2 w:2) - /// The range of component `s` is `[0, 100]`. + // Storage: Identity SuperOf (r:1 w:1) + /// The range of component `s` is `[1, 100]`. fn set_subs_new(s: u32, ) -> Weight { - // 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)) + 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)) .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)) @@ -83,13 +80,12 @@ 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:2) - /// The range of component `p` is `[0, 100]`. + // Storage: Identity SuperOf (r:0 w:1) + /// The range of component `p` is `[1, 100]`. fn set_subs_old(p: u32, ) -> Weight { - // 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)) + 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)) .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))) @@ -98,17 +94,16 @@ 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 `[0, 100]`. - /// The range of component `x` is `[0, 100]`. + /// The range of component `s` is `[1, 100]`. + /// The range of component `x` is `[1, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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))) @@ -116,71 +111,65 @@ 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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -189,17 +178,16 @@ 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 `[0, 100]`. - /// The range of component `x` is `[0, 100]`. + /// 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 { - // 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)) + 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)) .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))) @@ -207,12 +195,11 @@ 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 `[0, 99]`. + /// The range of component `s` is `[1, 99]`. fn add_sub(s: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -220,10 +207,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -232,21 +218,19 @@ 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 { - // 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)) + 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)) .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 `[0, 99]`. + /// The range of component `s` is `[1, 99]`. fn quit_sub(s: u32, ) -> Weight { - // 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)) + 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)) .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 90c9f826561d..0c11f749e439 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,12 +52,11 @@ 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 { - // 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)) + 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)) .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 46bec05d5241..b0f0fc563044 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,38 +46,33 @@ pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - // Minimum execution time: 26_443 nanoseconds. - Weight::from_ref_time(26_877_000 as u64) + Weight::from_ref_time(25_146_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 { - // Minimum execution time: 33_704 nanoseconds. - Weight::from_ref_time(34_123_000 as u64) + Weight::from_ref_time(31_999_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 { - // Minimum execution time: 27_656 nanoseconds. - Weight::from_ref_time(28_641_000 as u64) + Weight::from_ref_time(26_357_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 { - // Minimum execution time: 27_860 nanoseconds. - Weight::from_ref_time(28_165_000 as u64) + Weight::from_ref_time(26_922_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 { - // Minimum execution time: 33_354 nanoseconds. - Weight::from_ref_time(33_982_000 as u64) + Weight::from_ref_time(31_859_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 cf8da764e400..1994c517a4d3 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,10 +50,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -64,10 +63,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -78,10 +76,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -92,10 +89,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -106,10 +102,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -118,21 +113,17 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + fn clear_prime(_m: u32, ) -> Weight { + Weight::from_ref_time(4_643_000 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 adb5cbb2a7e4..b034fafcd8cc 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-26, 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: @@ -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_550 nanoseconds. - Weight::from_ref_time(14_819_772 as u64) + // Minimum execution time: 14_233 nanoseconds. + Weight::from_ref_time(14_763_390 as u64) // Standard Error: 2 - .saturating_add(Weight::from_ref_time(530 as u64).saturating_mul(z as u64)) + .saturating_add(Weight::from_ref_time(479 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: 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)) + // 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)) .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: 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)) + // 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)) .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: 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)) + // 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)) .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: 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)) + // 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)) .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: 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)) + // 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)) .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: 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)) + // 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)) .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 deleted file mode 100644 index 857b20a14e98..000000000000 --- a/runtime/kusama/src/weights/pallet_nis.rs +++ /dev/null @@ -1,122 +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_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 365606d19ea7..96ebdf4dec37 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,19 +47,18 @@ 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 { - // Minimum execution time: 140_322 nanoseconds. - Weight::from_ref_time(142_148_000 as u64) + Weight::from_ref_time(141_186_000 as u64) .saturating_add(T::DbWeight::get().reads(17 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -67,14 +66,13 @@ 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 Bonded (r:1 w:0) // Storage: Staking Ledger (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 bond_extra_transfer() -> Weight { - // Minimum execution time: 137_788 nanoseconds. - Weight::from_ref_time(138_966_000 as u64) + Weight::from_ref_time(136_315_000 as u64) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -82,14 +80,13 @@ 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 Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // 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 { - // Minimum execution time: 141_513 nanoseconds. - Weight::from_ref_time(143_360_000 as u64) + Weight::from_ref_time(140_720_000 as u64) .saturating_add(T::DbWeight::get().reads(13 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -98,15 +95,13 @@ 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 { - // Minimum execution time: 54_447 nanoseconds. - Weight::from_ref_time(54_781_000 as u64) + Weight::from_ref_time(54_588_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) @@ -114,53 +109,49 @@ 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 { - // Minimum execution time: 141_940 nanoseconds. - Weight::from_ref_time(142_725_000 as u64) + Weight::from_ref_time(139_268_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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 Bonded (r:1 w:1) // Storage: Staking Ledger (r:1 w:1) + // Storage: Staking Bonded (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) @@ -177,25 +168,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 { - // Minimum execution time: 144_438 nanoseconds. - Weight::from_ref_time(148_030_307 as u64) + Weight::from_ref_time(146_714_000 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 Bonded (r:1 w:1) // Storage: Staking Ledger (r:1 w:1) + // Storage: Staking Bonded (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) @@ -204,40 +195,36 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn create() -> Weight { - // Minimum execution time: 127_047 nanoseconds. - Weight::from_ref_time(128_199_000 as u64) - .saturating_add(T::DbWeight::get().reads(21 as u64)) + Weight::from_ref_time(130_529_000 as u64) + .saturating_add(T::DbWeight::get().reads(22 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 38_503 nanoseconds. - Weight::from_ref_time(38_998_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) + Weight::from_ref_time(34_144_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) @@ -245,10 +232,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -258,19 +244,16 @@ 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 { - // Minimum execution time: 6_206 nanoseconds. - Weight::from_ref_time(6_409_000 as u64) + Weight::from_ref_time(7_602_000 as u64) .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: NominationPools BondedPools (r:1 w:1) fn update_roles() -> Weight { - // Minimum execution time: 25_897 nanoseconds. - Weight::from_ref_time(26_204_000 as u64) + Weight::from_ref_time(25_674_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) @@ -279,9 +262,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - // Minimum execution time: 65_020 nanoseconds. - Weight::from_ref_time(65_744_000 as u64) - .saturating_add(T::DbWeight::get().reads(9 as u64)) + Weight::from_ref_time(59_990_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 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 bdc5d2480fb5..2fc3687f4581 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-03, 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: @@ -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,10 +48,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -59,10 +58,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -70,76 +68,66 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 42_136 nanoseconds. - Weight::from_ref_time(43_022_000 as u64) + Weight::from_ref_time(40_091_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 { - // Minimum execution time: 29_924 nanoseconds. - Weight::from_ref_time(30_867_000 as u64) + Weight::from_ref_time(27_459_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 { - // Minimum execution time: 28_022 nanoseconds. - Weight::from_ref_time(29_699_000 as u64) + Weight::from_ref_time(27_176_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 { - // Minimum execution time: 14_463 nanoseconds. - Weight::from_ref_time(15_790_000 as u64) + Weight::from_ref_time(14_096_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 { - // Minimum execution time: 17_932 nanoseconds. - Weight::from_ref_time(18_435_000 as u64) + Weight::from_ref_time(17_365_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 { - // Minimum execution time: 8_460 nanoseconds. - Weight::from_ref_time(8_648_000 as u64) + Weight::from_ref_time(8_013_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 { - // Minimum execution time: 28_702 nanoseconds. - Weight::from_ref_time(29_678_000 as u64) + Weight::from_ref_time(27_185_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 { - // Minimum execution time: 8_322 nanoseconds. - Weight::from_ref_time(8_687_000 as u64) + Weight::from_ref_time(7_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 unrequest_multi_referenced_preimage() -> Weight { - // Minimum execution time: 8_678 nanoseconds. - Weight::from_ref_time(8_930_000 as u64) + Weight::from_ref_time(7_819_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 5f86d59c8903..2ea546eed2fa 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,10 +47,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Proxy Proxies (r:1 w:0) @@ -59,12 +58,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -73,12 +71,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -86,11 +83,12 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -100,42 +98,38 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -143,20 +137,18 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 d84db79ceec1..33b62a7db764 100644 --- a/runtime/kusama/src/weights/pallet_ranked_collective.rs +++ b/runtime/kusama/src/weights/pallet_ranked_collective.rs @@ -16,21 +16,22 @@ //! Autogenerated weights for `pallet_ranked_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-16, 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_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/ @@ -38,7 +39,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`. @@ -49,8 +50,7 @@ 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 { - // Minimum execution time: 20_091 nanoseconds. - Weight::from_ref_time(20_793_000 as u64) + Weight::from_ref_time(20_797_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -60,10 +60,9 @@ 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 { - // 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)) + 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)) .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)) @@ -75,10 +74,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -88,10 +86,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -100,21 +97,20 @@ impl pallet_ranked_collective::WeightInfo for WeightInf // Storage: FellowshipCollective Voting (r:1 w:1) // Storage: Scheduler Agenda (r:2 w:2) fn vote() -> Weight { - // Minimum execution time: 46_000 nanoseconds. - Weight::from_ref_time(46_496_000 as u64) + Weight::from_ref_time(45_989_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:2) - /// The range of component `n` is `[0, 100]`. + // Storage: FellowshipCollective Voting (r:0 w:1) + /// The range of component `n` is `[1, 100]`. fn cleanup_poll(n: u32, ) -> Weight { - // 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)) + 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)) .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 e9e8f8797a50..ca52d8044bbf 100644 --- a/runtime/kusama/src/weights/pallet_referenda_fellowship_referenda.rs +++ b/runtime/kusama/src/weights/pallet_referenda_fellowship_referenda.rs @@ -16,21 +16,22 @@ //! Autogenerated weights for `pallet_referenda` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-30, 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_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,16 +50,14 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) // Storage: FellowshipReferenda ReferendumInfoFor (r:0 w:1) fn submit() -> Weight { - // Minimum execution time: 32_206 nanoseconds. - Weight::from_ref_time(32_784_000 as u64) + Weight::from_ref_time(32_438_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 { - // Minimum execution time: 48_362 nanoseconds. - Weight::from_ref_time(48_952_000 as u64) + Weight::from_ref_time(48_476_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -66,8 +65,7 @@ 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 { - // Minimum execution time: 85_674 nanoseconds. - Weight::from_ref_time(88_734_000 as u64) + Weight::from_ref_time(94_751_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -75,8 +73,7 @@ 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 { - // Minimum execution time: 85_794 nanoseconds. - Weight::from_ref_time(88_404_000 as u64) + Weight::from_ref_time(94_975_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -85,8 +82,7 @@ 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 { - // Minimum execution time: 175_254 nanoseconds. - Weight::from_ref_time(198_703_000 as u64) + Weight::from_ref_time(194_931_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -94,46 +90,34 @@ 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 { - // Minimum execution time: 43_797 nanoseconds. - Weight::from_ref_time(44_532_000 as u64) + Weight::from_ref_time(42_888_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 { - // Minimum execution time: 31_289 nanoseconds. - Weight::from_ref_time(32_447_000 as u64) + Weight::from_ref_time(30_949_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 { - // Minimum execution time: 38_398 nanoseconds. - Weight::from_ref_time(38_965_000 as u64) + Weight::from_ref_time(38_960_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 { - // Minimum execution time: 68_236 nanoseconds. - Weight::from_ref_time(69_049_000 as u64) + Weight::from_ref_time(67_836_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 { - // Minimum execution time: 11_448 nanoseconds. - Weight::from_ref_time(11_631_000 as u64) + Weight::from_ref_time(11_204_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -142,8 +126,7 @@ 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 { - // Minimum execution time: 118_312 nanoseconds. - Weight::from_ref_time(122_145_000 as u64) + Weight::from_ref_time(224_465_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -152,69 +135,61 @@ 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 { - // Minimum execution time: 120_150 nanoseconds. - Weight::from_ref_time(122_398_000 as u64) + Weight::from_ref_time(224_764_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:0) + // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_requeued_insertion() -> Weight { - // Minimum execution time: 84_906 nanoseconds. - Weight::from_ref_time(89_371_000 as u64) + Weight::from_ref_time(91_727_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1) // Storage: FellowshipReferenda TrackQueue (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:0) + // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_requeued_slide() -> Weight { - // Minimum execution time: 85_598 nanoseconds. - Weight::from_ref_time(88_356_000 as u64) + Weight::from_ref_time(91_868_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 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:0) + // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_queued() -> Weight { - // Minimum execution time: 89_197 nanoseconds. - Weight::from_ref_time(92_027_000 as u64) + Weight::from_ref_time(94_520_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 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:0) + // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_not_queued() -> Weight { - // Minimum execution time: 87_844 nanoseconds. - Weight::from_ref_time(90_542_000 as u64) + Weight::from_ref_time(93_483_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: FellowshipReferenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_no_deposit() -> Weight { - // Minimum execution time: 29_265 nanoseconds. - Weight::from_ref_time(29_798_000 as u64) + Weight::from_ref_time(29_294_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 { - // Minimum execution time: 30_675 nanoseconds. - Weight::from_ref_time(31_170_000 as u64) + Weight::from_ref_time(30_363_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 { - // Minimum execution time: 22_609 nanoseconds. - Weight::from_ref_time(23_111_000 as u64) + Weight::from_ref_time(22_703_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -223,8 +198,7 @@ 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 { - // Minimum execution time: 41_801 nanoseconds. - Weight::from_ref_time(42_472_000 as u64) + Weight::from_ref_time(40_760_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -233,8 +207,7 @@ 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 { - // Minimum execution time: 87_514 nanoseconds. - Weight::from_ref_time(90_499_000 as u64) + Weight::from_ref_time(91_300_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -242,8 +215,7 @@ 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 { - // Minimum execution time: 162_441 nanoseconds. - Weight::from_ref_time(168_308_000 as u64) + Weight::from_ref_time(165_577_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -251,8 +223,7 @@ 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 { - // Minimum execution time: 160_873 nanoseconds. - Weight::from_ref_time(169_712_000 as u64) + Weight::from_ref_time(166_188_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -260,8 +231,7 @@ 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 { - // Minimum execution time: 153_124 nanoseconds. - Weight::from_ref_time(165_777_000 as u64) + Weight::from_ref_time(159_324_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -269,8 +239,7 @@ 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 { - // Minimum execution time: 80_850 nanoseconds. - Weight::from_ref_time(84_958_000 as u64) + Weight::from_ref_time(82_615_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -278,18 +247,17 @@ 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 { - // 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)) + 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)) } // 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 { - // Minimum execution time: 164_370 nanoseconds. - Weight::from_ref_time(169_732_000 as u64) + Weight::from_ref_time(165_963_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 f389a91d98bd..8d8fc6ecbd61 100644 --- a/runtime/kusama/src/weights/pallet_referenda_referenda.rs +++ b/runtime/kusama/src/weights/pallet_referenda_referenda.rs @@ -16,21 +16,22 @@ //! Autogenerated weights for `pallet_referenda` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-30, 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_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/ @@ -48,16 +49,14 @@ impl pallet_referenda::WeightInfo for WeightInfo { // Storage: Scheduler Agenda (r:1 w:1) // Storage: Referenda ReferendumInfoFor (r:0 w:1) fn submit() -> Weight { - // Minimum execution time: 36_890 nanoseconds. - Weight::from_ref_time(37_840_000 as u64) + Weight::from_ref_time(37_366_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 { - // Minimum execution time: 47_353 nanoseconds. - Weight::from_ref_time(48_691_000 as u64) + Weight::from_ref_time(47_931_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -65,8 +64,7 @@ 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 { - // Minimum execution time: 49_607 nanoseconds. - Weight::from_ref_time(50_436_000 as u64) + Weight::from_ref_time(48_799_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -74,8 +72,7 @@ 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 { - // Minimum execution time: 49_359 nanoseconds. - Weight::from_ref_time(50_238_000 as u64) + Weight::from_ref_time(48_899_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -83,54 +80,41 @@ 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 { - // Minimum execution time: 61_393 nanoseconds. - Weight::from_ref_time(62_632_000 as u64) + Weight::from_ref_time(61_981_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 { - // Minimum execution time: 43_290 nanoseconds. - Weight::from_ref_time(43_959_000 as u64) + Weight::from_ref_time(42_318_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 { - // Minimum execution time: 30_398 nanoseconds. - Weight::from_ref_time(31_447_000 as u64) + Weight::from_ref_time(30_391_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 { - // Minimum execution time: 37_690 nanoseconds. - Weight::from_ref_time(38_864_000 as u64) + Weight::from_ref_time(38_601_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 { - // Minimum execution time: 77_496 nanoseconds. - Weight::from_ref_time(79_978_000 as u64) + Weight::from_ref_time(78_111_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 { - // Minimum execution time: 11_238 nanoseconds. - Weight::from_ref_time(11_723_000 as u64) + Weight::from_ref_time(11_132_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -138,8 +122,7 @@ 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 { - // Minimum execution time: 75_823 nanoseconds. - Weight::from_ref_time(77_497_000 as u64) + Weight::from_ref_time(161_624_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -147,69 +130,61 @@ 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 { - // Minimum execution time: 78_698 nanoseconds. - Weight::from_ref_time(79_660_000 as u64) + Weight::from_ref_time(167_193_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:0) + // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_requeued_insertion() -> Weight { - // Minimum execution time: 53_145 nanoseconds. - Weight::from_ref_time(54_297_000 as u64) + Weight::from_ref_time(44_257_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Referenda TrackQueue (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:0) + // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_requeued_slide() -> Weight { - // Minimum execution time: 52_893 nanoseconds. - Weight::from_ref_time(53_670_000 as u64) + Weight::from_ref_time(43_981_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 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:0) + // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_queued() -> Weight { - // Minimum execution time: 55_017 nanoseconds. - Weight::from_ref_time(55_775_000 as u64) + Weight::from_ref_time(45_931_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 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:0) + // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_not_queued() -> Weight { - // Minimum execution time: 55_068 nanoseconds. - Weight::from_ref_time(55_545_000 as u64) + Weight::from_ref_time(45_854_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(2 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_no_deposit() -> Weight { - // Minimum execution time: 28_613 nanoseconds. - Weight::from_ref_time(29_017_000 as u64) + Weight::from_ref_time(28_641_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 { - // Minimum execution time: 30_008 nanoseconds. - Weight::from_ref_time(30_928_000 as u64) + Weight::from_ref_time(29_629_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 { - // Minimum execution time: 21_985 nanoseconds. - Weight::from_ref_time(22_654_000 as u64) + 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)) } @@ -217,8 +192,7 @@ 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 { - // Minimum execution time: 41_155 nanoseconds. - Weight::from_ref_time(42_540_000 as u64) + Weight::from_ref_time(41_478_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -226,57 +200,51 @@ 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 { - // Minimum execution time: 43_525 nanoseconds. - Weight::from_ref_time(44_193_000 as u64) + Weight::from_ref_time(44_198_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 { - // Minimum execution time: 39_208 nanoseconds. - Weight::from_ref_time(40_097_000 as u64) + Weight::from_ref_time(38_978_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 { - // Minimum execution time: 40_627 nanoseconds. - Weight::from_ref_time(42_055_000 as u64) + Weight::from_ref_time(40_123_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 { - // Minimum execution time: 37_450 nanoseconds. - Weight::from_ref_time(38_157_000 as u64) + Weight::from_ref_time(36_868_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 { - // Minimum execution time: 37_800 nanoseconds. - Weight::from_ref_time(38_601_000 as u64) + Weight::from_ref_time(36_835_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 { - // 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)) + 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)) } // Storage: Referenda ReferendumInfoFor (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn nudge_referendum_rejected() -> Weight { - // Minimum execution time: 39_656 nanoseconds. - Weight::from_ref_time(40_908_000 as u64) + Weight::from_ref_time(38_997_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 dc7fe054f202..c6df2801dd69 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-03, 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: @@ -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,61 +46,52 @@ pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler IncompleteSince (r:1 w:1) fn service_agendas_base() -> Weight { - // Minimum execution time: 5_067 nanoseconds. - Weight::from_ref_time(5_193_000 as u64) + Weight::from_ref_time(4_558_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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn service_task_base() -> Weight { - // Minimum execution time: 9_861 nanoseconds. - Weight::from_ref_time(10_063_000 as u64) + Weight::from_ref_time(9_345_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 { - // 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)) + 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)) .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 { - // Minimum execution time: 11_292 nanoseconds. - Weight::from_ref_time(11_567_000 as u64) + Weight::from_ref_time(10_744_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn service_task_periodic() -> Weight { - // Minimum execution time: 9_974 nanoseconds. - Weight::from_ref_time(10_162_000 as u64) + Weight::from_ref_time(9_556_000 as u64) } fn execute_dispatch_signed() -> Weight { - // Minimum execution time: 4_164 nanoseconds. - Weight::from_ref_time(4_266_000 as u64) + Weight::from_ref_time(4_130_000 as u64) } fn execute_dispatch_unsigned() -> Weight { - // Minimum execution time: 4_020 nanoseconds. - Weight::from_ref_time(4_116_000 as u64) + Weight::from_ref_time(4_058_000 as u64) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -108,10 +99,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -119,10 +109,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -130,10 +119,9 @@ 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 { - // 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)) + 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)) .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 5e376a70cff5..b07d6a7444e2 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,8 +48,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:6 w:6) fn set_keys() -> Weight { - // Minimum execution time: 51_779 nanoseconds. - Weight::from_ref_time(53_571_000 as u64) + Weight::from_ref_time(51_955_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -57,8 +56,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:6) fn purge_keys() -> Weight { - // Minimum execution time: 39_411 nanoseconds. - Weight::from_ref_time(40_698_000 as u64) + Weight::from_ref_time(38_814_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 cdaa6e100ffc..53cb5d10c4b1 100644 --- a/runtime/kusama/src/weights/pallet_staking.rs +++ b/runtime/kusama/src/weights/pallet_staking.rs @@ -16,23 +16,21 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-26, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: -// /home/benchbot/cargo_target_dir/production/polkadot +// ./target/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/ @@ -40,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_staking`. @@ -49,13 +47,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 { - // 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)) + 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)) } // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) @@ -63,10 +61,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra() -> Weight { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Nominators (r:1 w:0) @@ -78,10 +75,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListBags (r:2 w:2) fn unbond() -> Weight { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -89,12 +85,11 @@ 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 { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -109,16 +104,11 @@ 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 { - // 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()))) + 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)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinValidatorBond (r:1 w:0) @@ -132,22 +122,20 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForValidators (r:1 w:1) fn validate() -> Weight { - // 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)) + 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)) } // 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 { - // 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()))) + 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))) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinNominatorBond (r:1 w:0) @@ -162,13 +150,12 @@ 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 { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Validators (r:1 w:0) @@ -178,59 +165,51 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Payee (r:0 w:1) fn set_payee() -> Weight { - // 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)) + 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)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking Ledger (r:2 w:2) fn set_controller() -> Weight { - // 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)) + 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)) } // Storage: Staking ValidatorCount (r:0 w:1) fn set_validator_count() -> Weight { - // Minimum execution time: 4_236 nanoseconds. - Weight::from_ref_time(4_468_000) - .saturating_add(T::DbWeight::get().writes(1)) + Weight::from_ref_time(4_071_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking ForceEra (r:0 w:1) fn force_no_eras() -> Weight { - // Minimum execution time: 4_264 nanoseconds. - Weight::from_ref_time(4_397_000) - .saturating_add(T::DbWeight::get().writes(1)) + Weight::from_ref_time(4_152_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era() -> Weight { - // Minimum execution time: 4_334 nanoseconds. - Weight::from_ref_time(4_478_000) - .saturating_add(T::DbWeight::get().writes(1)) + Weight::from_ref_time(4_318_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era_always() -> Weight { - // Minimum execution time: 4_429 nanoseconds. - Weight::from_ref_time(4_522_000) - .saturating_add(T::DbWeight::get().writes(1)) + Weight::from_ref_time(4_106_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking Invulnerables (r:0 w:1) /// The range of component `v` is `[0, 1000]`. fn set_invulnerables(v: u32, ) -> Weight { - // 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)) + 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)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking SlashingSpans (r:1 w:0) @@ -247,64 +226,62 @@ 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 { - // 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()))) + 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))) } // Storage: Staking UnappliedSlashes (r:1 w:1) /// The range of component `s` is `[1, 1000]`. fn cancel_deferred_slash(s: u32, ) -> Weight { - // 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)) + 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)) } // 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:1 w:0) + // Storage: Staking Bonded (r:2 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:1 w:0) - // Storage: System Account (r:1 w:1) - /// The range of component `n` is `[0, 512]`. + // Storage: Staking Payee (r:2 w:0) + // Storage: System Account (r:2 w:2) + /// The range of component `n` is `[1, 256]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { - // 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()))) + 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))) } // 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:1 w:0) - // Storage: Staking Ledger (r:1 w:1) + // Storage: Staking Bonded (r:2 w:0) + // Storage: Staking Ledger (r:2 w:2) // 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: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]`. + // Storage: Staking Payee (r:2 w:0) + // Storage: System Account (r:2 w:2) + // Storage: Balances Locks (r:2 w:2) + /// The range of component `n` is `[1, 256]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { - // 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()))) + 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))) } // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) @@ -314,12 +291,11 @@ 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 { - // 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)) + 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)) } // Storage: System Account (r:1 w:1) // Storage: Staking Bonded (r:1 w:1) @@ -336,16 +312,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 { - // 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()))) + 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))) } // Storage: VoterList CounterForListNodes (r:1 w:0) - // Storage: VoterList ListBags (r:166 w:0) + // Storage: Staking SlashingSpans (r:1 w:0) + // Storage: VoterList ListBags (r:183 w:0) // Storage: VoterList ListNodes (r:101 w:0) // Storage: Staking Nominators (r:101 w:0) // Storage: Staking Validators (r:2 w:0) @@ -356,62 +332,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 `[0, 100]`. + /// The range of component `n` is `[1, 100]`. fn new_era(v: u32, n: u32, ) -> Weight { - // 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()))) + 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))) } // Storage: VoterList CounterForListNodes (r:1 w:0) - // Storage: VoterList ListBags (r:166 w:0) + // Storage: Staking SlashingSpans (r:21 w:0) + // Storage: VoterList ListBags (r:183 w:0) // Storage: VoterList ListNodes (r:1500 w:0) // Storage: Staking Nominators (r:1500 w:0) // Storage: Staking Validators (r:500 w:0) // Storage: Staking Bonded (r:1500 w:0) // Storage: Staking Ledger (r:1500 w:0) // Storage: System BlockWeight (r:1 w:1) - // Storage: Staking MinimumActiveStake (r:0 w:1) /// The range of component `v` is `[500, 1000]`. /// The range of component `n` is `[500, 1000]`. - 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)) + /// 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)) } - // 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 { - // 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)) + 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)) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -420,9 +396,8 @@ 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 { - // Minimum execution time: 7_596 nanoseconds. - Weight::from_ref_time(7_960_000) - .saturating_add(T::DbWeight::get().writes(6)) + Weight::from_ref_time(7_502_000 as u64) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -431,9 +406,8 @@ 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 { - // Minimum execution time: 7_041 nanoseconds. - Weight::from_ref_time(7_258_000) - .saturating_add(T::DbWeight::get().writes(6)) + Weight::from_ref_time(6_757_000 as u64) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) @@ -446,23 +420,15 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill_other() -> Weight { - // 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)) + 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)) } // Storage: Staking MinCommission (r:1 w:0) // Storage: Staking Validators (r:1 w:1) fn force_apply_min_commission() -> Weight { - // 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)) + 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)) } } diff --git a/runtime/kusama/src/weights/pallet_timestamp.rs b/runtime/kusama/src/weights/pallet_timestamp.rs index 57d4f7621be0..9ae6e72e02f8 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,13 +47,11 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Babe CurrentSlot (r:1 w:0) fn set() -> Weight { - // Minimum execution time: 9_352 nanoseconds. - Weight::from_ref_time(9_715_000 as u64) + Weight::from_ref_time(9_144_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 { - // Minimum execution time: 4_512 nanoseconds. - Weight::from_ref_time(4_623_000 as u64) + Weight::from_ref_time(3_852_000 as u64) } } diff --git a/runtime/kusama/src/weights/pallet_tips.rs b/runtime/kusama/src/weights/pallet_tips.rs index 66ddaf41b3c0..dc6f02b1d9b1 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,18 +48,16 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 29_400 nanoseconds. - Weight::from_ref_time(29_797_000 as u64) + Weight::from_ref_time(28_620_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -69,12 +67,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -82,10 +79,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -95,10 +91,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -106,10 +101,9 @@ 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 { - // 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)) + 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)) .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 7bdfe2064462..ac10deacaa8b 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -38,34 +38,26 @@ #![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 { - // 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)) + Weight::from_ref_time(131_000 as u64) } // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - // Minimum execution time: 27_164 nanoseconds. - Weight::from_ref_time(27_790_000 as u64) + Weight::from_ref_time(25_664_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 { - // Minimum execution time: 38_257 nanoseconds. - Weight::from_ref_time(38_930_000 as u64) + Weight::from_ref_time(36_678_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -73,17 +65,15 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 8_151 nanoseconds. - Weight::from_ref_time(8_355_000 as u64) + Weight::from_ref_time(7_810_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -93,10 +83,9 @@ 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 { - // 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)) + 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)) .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 16d0d87b4b4e..8eaa6258faa3 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,31 +46,26 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - // 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)) + 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)) } fn as_derivative() -> Weight { - // Minimum execution time: 5_876 nanoseconds. - Weight::from_ref_time(5_994_000 as u64) + Weight::from_ref_time(5_660_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - // 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)) + 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)) } fn dispatch_as() -> Weight { - // Minimum execution time: 13_664 nanoseconds. - Weight::from_ref_time(14_022_000 as u64) + Weight::from_ref_time(13_181_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - // 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)) + 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)) } } diff --git a/runtime/kusama/src/weights/pallet_vesting.rs b/runtime/kusama/src/weights/pallet_vesting.rs index 6288e07a5db0..a570fa7b4b99 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,12 +49,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -63,12 +62,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -78,12 +76,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -93,12 +90,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -108,12 +104,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -123,12 +118,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -138,12 +132,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -153,12 +146,11 @@ 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 { - // 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)) + 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)) .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 401ffb48f4d2..5e7dcf8f75b3 100644 --- a/runtime/kusama/src/weights/pallet_whitelist.rs +++ b/runtime/kusama/src/weights/pallet_whitelist.rs @@ -63,8 +63,7 @@ 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) - // TODO regenerate - fn dispatch_whitelisted_call(_n: u32) -> Weight { + fn dispatch_whitelisted_call() -> 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 bb9a9a008d01..368665cb91a7 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,8 +47,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions AuctionInfo (r:1 w:1) // Storage: Auctions AuctionCounter (r:1 w:1) fn new_auction() -> Weight { - // Minimum execution time: 17_589 nanoseconds. - Weight::from_ref_time(17_777_000 as u64) + Weight::from_ref_time(16_541_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -60,8 +59,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn bid() -> Weight { - // Minimum execution time: 71_154 nanoseconds. - Weight::from_ref_time(72_510_000 as u64) + Weight::from_ref_time(72_654_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -78,8 +76,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar Paras (r:1 w:1) fn on_initialize() -> Weight { - // Minimum execution time: 15_548_622 nanoseconds. - Weight::from_ref_time(15_867_007_000 as u64) + Weight::from_ref_time(15_198_212_000 as u64) .saturating_add(T::DbWeight::get().reads(3688 as u64)) .saturating_add(T::DbWeight::get().writes(3683 as u64)) } @@ -88,8 +85,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions Winning (r:0 w:3600) // Storage: Auctions AuctionInfo (r:0 w:1) fn cancel_auction() -> Weight { - // Minimum execution time: 4_637_901 nanoseconds. - Weight::from_ref_time(4_730_879_000 as u64) + Weight::from_ref_time(4_630_319_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 b27afcd0a8df..cf02524e5559 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,8 +52,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim() -> Weight { - // Minimum execution time: 144_357 nanoseconds. - Weight::from_ref_time(146_222_000 as u64) + Weight::from_ref_time(144_147_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -62,8 +61,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Claims (r:0 w:1) // Storage: Claims Signing (r:0 w:1) fn mint_claim() -> Weight { - // Minimum execution time: 11_388 nanoseconds. - Weight::from_ref_time(11_833_000 as u64) + Weight::from_ref_time(11_356_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -75,8 +73,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim_attest() -> Weight { - // Minimum execution time: 148_256 nanoseconds. - Weight::from_ref_time(153_700_000 as u64) + Weight::from_ref_time(147_747_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -89,8 +86,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn attest() -> Weight { - // Minimum execution time: 68_246 nanoseconds. - Weight::from_ref_time(70_821_000 as u64) + Weight::from_ref_time(67_746_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -99,8 +95,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Signing (r:1 w:2) // Storage: Claims Preclaims (r:1 w:1) fn move_claim() -> Weight { - // Minimum execution time: 21_200 nanoseconds. - Weight::from_ref_time(21_813_000 as u64) + Weight::from_ref_time(21_643_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 91753886e41d..ac5438c137d1 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,8 +49,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Paras ParaLifecycles (r:1 w:0) // Storage: Crowdloan NextFundIndex (r:1 w:1) fn create() -> Weight { - // Minimum execution time: 47_414 nanoseconds. - Weight::from_ref_time(48_286_000 as u64) + Weight::from_ref_time(46_612_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -62,8 +61,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan NewRaise (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - // Minimum execution time: 116_057 nanoseconds. - Weight::from_ref_time(117_264_000 as u64) + Weight::from_ref_time(116_068_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -71,18 +69,16 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) // Storage: unknown [0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0] (r:1 w:1) fn withdraw() -> Weight { - // Minimum execution time: 55_684 nanoseconds. - Weight::from_ref_time(56_470_000 as u64) + Weight::from_ref_time(54_293_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 { - // 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)) + 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)) .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)) @@ -91,31 +87,27 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan Funds (r:1 w:1) // Storage: System Account (r:1 w:1) fn dissolve() -> Weight { - // Minimum execution time: 37_873 nanoseconds. - Weight::from_ref_time(38_408_000 as u64) + Weight::from_ref_time(34_634_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 { - // Minimum execution time: 26_842 nanoseconds. - Weight::from_ref_time(27_758_000 as u64) + Weight::from_ref_time(24_646_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 { - // Minimum execution time: 34_190 nanoseconds. - Weight::from_ref_time(35_145_000 as u64) + Weight::from_ref_time(32_088_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 { - // Minimum execution time: 26_873 nanoseconds. - Weight::from_ref_time(27_829_000 as u64) + Weight::from_ref_time(24_754_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -131,10 +123,9 @@ 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 { - // 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)) + 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)) .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 a1b572259692..8b9f554fe3e6 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,8 +48,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Registrar Paras (r:1 w:1) // Storage: Paras ParaLifecycles (r:1 w:0) fn reserve() -> Weight { - // Minimum execution time: 30_852 nanoseconds. - Weight::from_ref_time(31_532_000 as u64) + Weight::from_ref_time(30_299_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -63,8 +62,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn register() -> Weight { - // Minimum execution time: 7_439_882 nanoseconds. - Weight::from_ref_time(7_564_995_000 as u64) + Weight::from_ref_time(7_938_844_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -78,8 +76,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn force_register() -> Weight { - // Minimum execution time: 7_412_236 nanoseconds. - Weight::from_ref_time(7_528_657_000 as u64) + Weight::from_ref_time(7_905_688_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -90,8 +87,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar PendingSwap (r:0 w:1) fn deregister() -> Weight { - // Minimum execution time: 49_031 nanoseconds. - Weight::from_ref_time(50_187_000 as u64) + Weight::from_ref_time(47_531_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -103,13 +99,11 @@ 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 { - // Minimum execution time: 44_366 nanoseconds. - Weight::from_ref_time(45_345_000 as u64) + Weight::from_ref_time(42_367_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) @@ -118,22 +112,19 @@ 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) - /// The range of component `b` is `[1, 3145728]`. + // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) fn schedule_code_upgrade(b: u32, ) -> Weight { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 cf26075d1390..a897fe1205ff 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,8 +47,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // Minimum execution time: 31_674 nanoseconds. - Weight::from_ref_time(32_043_000 as u64) + Weight::from_ref_time(30_342_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -61,12 +60,11 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // 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)) + 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)) .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))) @@ -77,8 +75,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // Minimum execution time: 92_561 nanoseconds. - Weight::from_ref_time(93_794_000 as u64) + Weight::from_ref_time(92_539_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -88,8 +85,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // Minimum execution time: 28_796 nanoseconds. - Weight::from_ref_time(29_798_000 as u64) + Weight::from_ref_time(28_034_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 dac0259c9762..f7308aafffe0 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,8 +48,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_block_number() -> Weight { - // Minimum execution time: 12_075 nanoseconds. - Weight::from_ref_time(12_339_000 as u64) + Weight::from_ref_time(10_810_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -57,8 +56,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_u32() -> Weight { - // Minimum execution time: 12_457 nanoseconds. - Weight::from_ref_time(13_010_000 as u64) + Weight::from_ref_time(10_580_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -66,8 +64,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_option_u32() -> Weight { - // Minimum execution time: 12_413 nanoseconds. - Weight::from_ref_time(12_701_000 as u64) + Weight::from_ref_time(10_631_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -75,22 +72,19 @@ 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 { - // Minimum execution time: 12_333 nanoseconds. - Weight::from_ref_time(12_813_000 as u64) + Weight::from_ref_time(10_910_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 { - // Minimum execution time: 12_040 nanoseconds. - Weight::from_ref_time(12_571_000 as u64) + Weight::from_ref_time(11_012_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 a26e08073182..248b3af844f7 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,8 +46,7 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::disputes::WeightInfo for WeightInfo { // Storage: ParasDisputes Frozen (r:0 w:1) fn force_unfreeze() -> Weight { - // Minimum execution time: 4_402 nanoseconds. - Weight::from_ref_time(4_492_000 as u64) + Weight::from_ref_time(3_909_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 33343a4067a7..ab7a5b87291e 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,8 +53,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_init_open_channel() -> Weight { - // Minimum execution time: 42_278 nanoseconds. - Weight::from_ref_time(42_770_000 as u64) + Weight::from_ref_time(38_970_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -65,8 +64,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_accept_open_channel() -> Weight { - // Minimum execution time: 41_471 nanoseconds. - Weight::from_ref_time(42_331_000 as u64) + Weight::from_ref_time(39_314_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -76,8 +74,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_close_channel() -> Weight { - // Minimum execution time: 38_134 nanoseconds. - Weight::from_ref_time(38_715_000 as u64) + Weight::from_ref_time(35_896_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -90,12 +87,11 @@ 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 { - // 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)) + 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)) .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,10 +109,9 @@ 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 { - // 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)) + 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)) .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)) @@ -130,10 +125,9 @@ 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 { - // 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)) + 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)) .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)) @@ -144,10 +138,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -155,10 +148,9 @@ 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 { - // 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)) + 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)) .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)) @@ -175,8 +167,7 @@ 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 { - // Minimum execution time: 53_453 nanoseconds. - Weight::from_ref_time(53_861_000 as u64) + Weight::from_ref_time(104_771_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 380e0a99aa1b..ef152d190f79 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,10 +47,9 @@ 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 { - // 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)) + 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)) .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 c9f7419e9452..4b42562c8566 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,20 +52,18 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Paras FutureCodeHash (r:1 w:1) @@ -80,10 +78,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -92,18 +89,16 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 23_946 nanoseconds. - Weight::from_ref_time(24_805_000 as u64) + Weight::from_ref_time(22_217_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -111,18 +106,16 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 7_063 nanoseconds. - Weight::from_ref_time(7_167_000 as u64) + Weight::from_ref_time(6_480_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -130,8 +123,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras PvfActiveVoteMap (r:1 w:1) fn include_pvf_check_statement() -> Weight { - // Minimum execution time: 92_634 nanoseconds. - Weight::from_ref_time(94_982_000 as u64) + Weight::from_ref_time(93_853_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -143,8 +135,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: System Digest (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { - // Minimum execution time: 624_541 nanoseconds. - Weight::from_ref_time(631_251_000 as u64) + Weight::from_ref_time(644_115_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(104 as u64)) } @@ -157,8 +148,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:100) // Storage: Paras FutureCodeHash (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { - // Minimum execution time: 592_733 nanoseconds. - Weight::from_ref_time(600_415_000 as u64) + Weight::from_ref_time(609_948_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(204 as u64)) } @@ -168,8 +158,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PvfActiveVoteList (r:1 w:1) // Storage: Paras ActionsQueue (r:1 w:1) fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight { - // Minimum execution time: 491_686 nanoseconds. - Weight::from_ref_time(503_208_000 as u64) + Weight::from_ref_time(505_647_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -183,8 +172,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CurrentCodeHash (r:0 w:100) // Storage: Paras UpcomingParasGenesis (r:0 w:100) fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight { - // Minimum execution time: 661_583 nanoseconds. - Weight::from_ref_time(670_694_000 as u64) + Weight::from_ref_time(692_341_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 c5a68ad56e81..bb0f7815ec08 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,15 +53,14 @@ 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) @@ -77,11 +76,10 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().writes(18 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -95,7 +93,6 @@ 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) @@ -115,9 +112,8 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_bitfields() -> Weight { - // Minimum execution time: 332_410 nanoseconds. - Weight::from_ref_time(339_799_000 as u64) - .saturating_add(T::DbWeight::get().reads(26 as u64)) + Weight::from_ref_time(339_684_000 as u64) + .saturating_add(T::DbWeight::get().reads(25 as u64)) .saturating_add(T::DbWeight::get().writes(17 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -131,7 +127,6 @@ 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) @@ -153,11 +148,10 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -171,7 +165,6 @@ 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) @@ -194,9 +187,8 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_backed_candidate_code_upgrade() -> Weight { - // 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)) + Weight::from_ref_time(40_608_399_000 as u64) + .saturating_add(T::DbWeight::get().reads(30 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 1473eeac063b..effa650d0258 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -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,25 +46,22 @@ 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 { - // 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)) + 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)) } // 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 { - // Minimum execution time: 9_800 nanoseconds. - Weight::from_ref_time(10_025_000 as u64) + Weight::from_ref_time(8_784_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 { - // Minimum execution time: 26_272 nanoseconds. - Weight::from_ref_time(26_790_000 as u64) + Weight::from_ref_time(24_147_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 55a474e239f6..17310dd5ead1 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, Fellows, ParaId, Runtime, - RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, WeightToFee, XcmPallet, + parachains_origin, AccountId, Balances, CouncilCollective, ParaId, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, 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, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, + LocationInverter, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, + TakeWeightCredit, UsingComponents, WeightInfoBounds, }; parameter_types! { @@ -154,10 +154,6 @@ 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. @@ -176,33 +172,13 @@ 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 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; + // We only allow the council to send messages. This is basically safe to enable for everyone + // (safe the possibility of someone spamming the parachain if they're willing to pay the KSM to + // send from the Relay-chain), but it's useless until we bring in XCM v3 which will make + // `DescendOrigin` a bit more useful. + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally. type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; diff --git a/runtime/metrics/Cargo.toml b/runtime/metrics/Cargo.toml index 99d7878d99e8..efa7569d1130 100644 --- a/runtime/metrics/Cargo.toml +++ b/runtime/metrics/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-runtime-metrics" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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 7f1b6995b775..e0685f98a8b8 100644 --- a/runtime/parachains/Cargo.toml +++ b/runtime/parachains/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-runtime-parachains" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } @@ -10,7 +10,7 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.139", features = [ "derive" ], optional = true } +serde = { version = "1.0.137", features = [ "derive" ], optional = true } derive_more = "0.99.17" bitflags = "1.3.2" @@ -30,7 +30,6 @@ pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -59,7 +58,7 @@ sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master thousands = "0.2.0" assert_matches = "1" serde_json = "1.0.85" -proptest = "1.0.0" +pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = ["std"] @@ -81,11 +80,9 @@ std = [ "sp-runtime/std", "sp-session/std", "sp-staking/std", - "pallet-authority-discovery/std", "pallet-authorship/std", "pallet-babe/std", "pallet-balances/std", - "pallet-message-queue/std", "pallet-session/std", "pallet-staking/std", "pallet-timestamp/std", @@ -100,23 +97,15 @@ runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "pallet-babe/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-message-queue/runtime-benchmarks", "pallet-staking/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-vesting/runtime-benchmarks", "primitives/runtime-benchmarks", "static_assertions", "sp-application-crypto", ] try-runtime = [ "frame-support/try-runtime", - "pallet-authority-discovery/try-runtime", "pallet-authorship/try-runtime", - "pallet-babe/try-runtime", "pallet-balances/try-runtime", - "pallet-message-queue/try-runtime", "pallet-session/try-runtime", "pallet-staking/try-runtime", "pallet-timestamp/try-runtime", diff --git a/runtime/parachains/src/builder.rs b/runtime/parachains/src/builder.rs index 84651a06003e..9a1c16e6aa1d 100644 --- a/runtime/parachains/src/builder.rs +++ b/runtime/parachains/src/builder.rs @@ -575,7 +575,7 @@ impl BenchBuilder { /// Fill cores `start..last` with dispute statement sets. The statement sets will have 3/4th of /// votes be valid, and 1/4th of votes be invalid. - fn create_disputes( + fn create_disputes_with_no_spam( &self, start: u32, last: u32, @@ -664,7 +664,7 @@ impl BenchBuilder { let backed_candidates = builder .create_backed_candidates(&builder.backed_and_concluding_cores, builder.code_upgrade); - let disputes = builder.create_disputes( + let disputes = builder.create_disputes_with_no_spam( builder.backed_and_concluding_cores.len() as u32, used_cores, builder.dispute_sessions.as_slice(), diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index 5ad0b3263ac2..719da3b9b9e7 100644 --- a/runtime/parachains/src/configuration.rs +++ b/runtime/parachains/src/configuration.rs @@ -187,6 +187,8 @@ pub struct HostConfiguration { pub dispute_period: SessionIndex, /// How long after dispute conclusion to accept statements. pub dispute_post_conclusion_acceptance_period: BlockNumber, + /// The maximum number of dispute spam slots + pub dispute_max_spam_slots: u32, /// How long it takes for a dispute to conclude by time-out, if no supermajority is reached. pub dispute_conclusion_by_time_out_period: BlockNumber, /// The amount of consensus slots that must pass between submitting an assignment and @@ -253,6 +255,7 @@ 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, @@ -521,7 +523,6 @@ pub mod pallet { } /// Set the validation upgrade delay. - #[pallet::call_index(1)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -537,7 +538,6 @@ 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, @@ -553,7 +553,6 @@ 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, @@ -566,7 +565,6 @@ 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, @@ -579,7 +577,6 @@ 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, @@ -592,7 +589,6 @@ pub mod pallet { } /// Set the number of parathread execution cores. - #[pallet::call_index(6)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -605,7 +601,6 @@ 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, @@ -618,7 +613,6 @@ 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, @@ -634,7 +628,6 @@ pub mod pallet { } /// Set the availability period for parachains. - #[pallet::call_index(9)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -650,7 +643,6 @@ pub mod pallet { } /// Set the availability period for parathreads. - #[pallet::call_index(10)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -666,7 +658,6 @@ 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, @@ -679,7 +670,6 @@ 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, @@ -695,7 +685,6 @@ 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,7 +697,6 @@ 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, @@ -721,7 +709,6 @@ 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, @@ -736,8 +723,19 @@ pub mod pallet { }) } + /// Set the maximum number of dispute spam slots. + #[pallet::weight(( + T::WeightInfo::set_config_with_u32(), + DispatchClass::Operational, + ))] + pub fn set_dispute_max_spam_slots(origin: OriginFor, new: u32) -> DispatchResult { + ensure_root(origin)?; + Self::schedule_config_update(|config| { + config.dispute_max_spam_slots = new; + }) + } + /// Set the dispute conclusion by time out period. - #[pallet::call_index(17)] #[pallet::weight(( T::WeightInfo::set_config_with_block_number(), DispatchClass::Operational, @@ -754,7 +752,6 @@ 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, @@ -767,7 +764,6 @@ pub mod pallet { } /// Set the total number of delay tranches. - #[pallet::call_index(19)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -780,7 +776,6 @@ pub mod pallet { } /// Set the zeroth delay tranche width. - #[pallet::call_index(20)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -793,7 +788,6 @@ 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, @@ -806,7 +800,6 @@ 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, @@ -819,7 +812,6 @@ 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, @@ -832,7 +824,6 @@ 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, @@ -845,7 +836,6 @@ pub mod pallet { } /// Set the critical downward message size. - #[pallet::call_index(25)] #[pallet::weight(( T::WeightInfo::set_config_with_u32(), DispatchClass::Operational, @@ -858,7 +848,6 @@ 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, @@ -871,7 +860,6 @@ 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, @@ -887,7 +875,6 @@ 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, @@ -899,7 +886,6 @@ 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, @@ -913,7 +899,6 @@ 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, @@ -926,7 +911,6 @@ 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, @@ -939,7 +923,6 @@ 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, @@ -952,7 +935,6 @@ 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, @@ -968,7 +950,6 @@ 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, @@ -984,7 +965,6 @@ 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, @@ -997,7 +977,6 @@ 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, @@ -1013,7 +992,6 @@ 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, @@ -1029,7 +1007,6 @@ 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,7 +1022,6 @@ 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(), @@ -1059,7 +1035,6 @@ 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, @@ -1075,7 +1050,6 @@ 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, @@ -1092,7 +1066,6 @@ 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 9a1072f432e0..d02f01fff796 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -25,16 +25,13 @@ use frame_system::pallet_prelude::BlockNumberFor; /// v0-v1: /// v1-v2: /// v2-v3: -/// v3-v4: -/// v4-v5: -pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(5); +/// v3-v4: (remove weights) +pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(4); -pub mod v5 { +pub mod v4 { use super::*; use frame_support::traits::OnRuntimeUpgrade; use primitives::v2::{Balance, SessionIndex}; - #[cfg(feature = "try-runtime")] - use sp_std::prelude::*; // Copied over from configuration.rs @ de9e147695b9f1be8bd44e07861a31e483c8343a and removed // all the comments, and changed the Weight struct to Weight @@ -135,51 +132,32 @@ pub mod v5 { } } - pub struct MigrateToV5(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateToV5 { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade()"); - - ensure!(StorageVersion::get::>() == 4, "The migration requires version 4"); - Ok(Default::default()) - } - + pub struct MigrateToV4(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for MigrateToV4 { fn on_runtime_upgrade() -> Weight { - if StorageVersion::get::>() == 4 { - let weight_consumed = migrate_to_v5::(); + if StorageVersion::get::>() == 3 { + let weight_consumed = migrate_to_v4::(); - log::info!(target: configuration::LOG_TARGET, "MigrateToV5 executed successfully"); + log::info!(target: configuration::LOG_TARGET, "MigrateToV4 executed successfully"); STORAGE_VERSION.put::>(); - weight_consumed.saturating_add(T::DbWeight::get().writes(1)) + weight_consumed } else { - log::warn!(target: configuration::LOG_TARGET, "MigrateToV5 should be removed."); + log::warn!(target: configuration::LOG_TARGET, "MigrateToV4 should be removed."); T::DbWeight::get().reads(1) } } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), &'static str> { - log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade()"); - ensure!( - StorageVersion::get::>() == 5, - "Storage version should be 5 after the migration" - ); - - Ok(()) - } } } -fn migrate_to_v5() -> Weight { +fn migrate_to_v4() -> Weight { // Unusual formatting is justified: // - make it easier to verify that fields assign what they supposed to assign. // - this code is transient and will be removed after all migrations are done. // - this code is important enough to optimize for legibility sacrificing consistency. #[rustfmt::skip] let translate = - |pre: v5::OldHostConfiguration>| -> + |pre: v4::OldHostConfiguration>| -> configuration::HostConfiguration> { super::HostConfiguration { @@ -214,6 +192,7 @@ max_validators_per_core : pre.max_validators_per_core, max_validators : pre.max_validators, dispute_period : pre.dispute_period, dispute_post_conclusion_acceptance_period: pre.dispute_post_conclusion_acceptance_period, +dispute_max_spam_slots : pre.dispute_max_spam_slots, dispute_conclusion_by_time_out_period : pre.dispute_conclusion_by_time_out_period, no_show_slots : pre.no_show_slots, n_delay_tranches : pre.n_delay_tranches, @@ -234,7 +213,7 @@ minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, // to be unlikely to be caused by this. So we just log. Maybe it'll work out still? log::error!( target: configuration::LOG_TARGET, - "unexpected error when performing translation of the configuration type during storage upgrade to v5." + "unexpected error when performing translation of the configuration type during storage upgrade to v2." ); } @@ -247,43 +226,31 @@ mod tests { use crate::mock::{new_test_ext, Test}; #[test] - fn v4_deserialized_from_actual_data() { - // Example how to get new `raw_config`: - // We'll obtain the raw_config hes for block - // 15,772,152 (0xf89d3ab5312c5f70d396dc59612f0aa65806c798346f9db4b35278baed2e0e53) on Kusama. - // Steps: - // 1. Go to Polkadot.js -> Developer -> Chain state -> Storage: https://polkadot.js.org/apps/#/chainstate - // 2. Set these parameters: - // 2.1. selected state query: configuration; activeConfig(): PolkadotRuntimeParachainsConfigurationHostConfiguration - // 2.2. blockhash to query at: 0xf89d3ab5312c5f70d396dc59612f0aa65806c798346f9db4b35278baed2e0e53 (the hash of the block) - // 2.3. Note the value of encoded storage key -> 0x06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385 for the referenced block. - // 2.4. You'll also need the decoded values to update the test. - // 3. Go to Polkadot.js -> Developer -> Chain state -> Raw storage - // 3.1 Enter the encoded storage key and you get the raw config. - - // Fetched at Kusama 15,772,152 (0xf89d3ab5312c5f70d396dc59612f0aa65806c798346f9db4b35278baed2e0e53) + fn v3_deserialized_from_actual_data() { + // Fetched at Kusama 14,703,780 (0x3b2c305d01bd4adf1973d32a2d55ca1260a55eea8dfb3168e317c57f2841fdf1) // // This exceeds the maximal line width length, but that's fine, since this is not code and // doesn't need to be read and also leaving it as one line allows to easily copy it. - let raw_config = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c800000700e8764817020040011e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c8000000060000005802000002000000580200000200000059000000000000001e000000280000000700c817a80402004001000200000014000000"]; + let raw_config = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c8000000e87648170000001e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c8000000060000005802000002000000580200000200000059000000000000001e0000002800000000c817a804000000000200000014000000"]; - let v4 = - v5::OldHostConfiguration::::decode(&mut &raw_config[..]) + let v3 = + v4::OldHostConfiguration::::decode(&mut &raw_config[..]) .unwrap(); // We check only a sample of the values here. If we missed any fields or messed up data types // that would skew all the fields coming after. - assert_eq!(v4.max_code_size, 10_485_760); - assert_eq!(v4.validation_upgrade_cooldown, 3600); - assert_eq!(v4.max_pov_size, 5_242_880); - assert_eq!(v4.hrmp_channel_max_message_size, 102_400); - assert_eq!(v4.n_delay_tranches, 89); - assert_eq!(v4.ump_max_individual_weight, Weight::zero()); - assert_eq!(v4.minimum_validation_upgrade_delay, 20); + assert_eq!(v3.max_code_size, 10_485_760); + assert_eq!(v3.validation_upgrade_cooldown, 3600); + assert_eq!(v3.max_pov_size, 5_242_880); + assert_eq!(v3.hrmp_channel_max_message_size, 102_400); + assert_eq!(v3.dispute_max_spam_slots, 2); + assert_eq!(v3.n_delay_tranches, 89); + assert_eq!(v3.ump_max_individual_weight, Weight::zero()); + assert_eq!(v3.minimum_validation_upgrade_delay, 20); } #[test] - fn test_migrate_to_v5() { + fn test_migrate_to_v4() { // Host configuration has lots of fields. However, in this migration we add only a couple of // fields. The most important part to check are a couple of the last fields. We also pick // extra fields to check arbitrarily, e.g. depending on their position (i.e. the middle) and @@ -292,8 +259,8 @@ mod tests { // We specify only the picked fields and the rest should be provided by the `Default` // implementation. That implementation is copied over between the two types and should work // fine. - let v4 = v5::OldHostConfiguration:: { - ump_max_individual_weight: Weight::from_parts(0x71616e6f6e0au64, 0x71616e6f6e0au64), + let v3 = v4::OldHostConfiguration:: { + ump_max_individual_weight: Weight::from_ref_time(0x71616e6f6e0au64), needed_approvals: 69, thread_availability_period: 55, hrmp_recipient_deposit: 1337, @@ -304,58 +271,59 @@ mod tests { }; new_test_ext(Default::default()).execute_with(|| { - // Implant the v4 version in the state. + // Implant the v3 version in the state. frame_support::storage::unhashed::put_raw( &configuration::ActiveConfig::::hashed_key(), - &v4.encode(), + &v3.encode(), ); - migrate_to_v5::(); + migrate_to_v4::(); - let v5 = configuration::ActiveConfig::::get(); + let v4 = configuration::ActiveConfig::::get(); #[rustfmt::skip] { - assert_eq!(v4.max_code_size , v5.max_code_size); - assert_eq!(v4.max_head_data_size , v5.max_head_data_size); - assert_eq!(v4.max_upward_queue_count , v5.max_upward_queue_count); - assert_eq!(v4.max_upward_queue_size , v5.max_upward_queue_size); - assert_eq!(v4.max_upward_message_size , v5.max_upward_message_size); - assert_eq!(v4.max_upward_message_num_per_candidate , v5.max_upward_message_num_per_candidate); - assert_eq!(v4.hrmp_max_message_num_per_candidate , v5.hrmp_max_message_num_per_candidate); - assert_eq!(v4.validation_upgrade_cooldown , v5.validation_upgrade_cooldown); - assert_eq!(v4.validation_upgrade_delay , v5.validation_upgrade_delay); - assert_eq!(v4.max_pov_size , v5.max_pov_size); - assert_eq!(v4.max_downward_message_size , v5.max_downward_message_size); - assert_eq!(v4.hrmp_max_parachain_outbound_channels , v5.hrmp_max_parachain_outbound_channels); - assert_eq!(v4.hrmp_max_parathread_outbound_channels , v5.hrmp_max_parathread_outbound_channels); - assert_eq!(v4.hrmp_sender_deposit , v5.hrmp_sender_deposit); - assert_eq!(v4.hrmp_recipient_deposit , v5.hrmp_recipient_deposit); - assert_eq!(v4.hrmp_channel_max_capacity , v5.hrmp_channel_max_capacity); - assert_eq!(v4.hrmp_channel_max_total_size , v5.hrmp_channel_max_total_size); - assert_eq!(v4.hrmp_max_parachain_inbound_channels , v5.hrmp_max_parachain_inbound_channels); - assert_eq!(v4.hrmp_max_parathread_inbound_channels , v5.hrmp_max_parathread_inbound_channels); - assert_eq!(v4.hrmp_channel_max_message_size , v5.hrmp_channel_max_message_size); - assert_eq!(v4.code_retention_period , v5.code_retention_period); - assert_eq!(v4.parathread_cores , v5.parathread_cores); - assert_eq!(v4.parathread_retries , v5.parathread_retries); - assert_eq!(v4.group_rotation_frequency , v5.group_rotation_frequency); - assert_eq!(v4.chain_availability_period , v5.chain_availability_period); - assert_eq!(v4.thread_availability_period , v5.thread_availability_period); - assert_eq!(v4.scheduling_lookahead , v5.scheduling_lookahead); - assert_eq!(v4.max_validators_per_core , v5.max_validators_per_core); - assert_eq!(v4.max_validators , v5.max_validators); - assert_eq!(v4.dispute_period , v5.dispute_period); - assert_eq!(v4.dispute_post_conclusion_acceptance_period, v5.dispute_post_conclusion_acceptance_period); - assert_eq!(v4.dispute_conclusion_by_time_out_period , v5.dispute_conclusion_by_time_out_period); - assert_eq!(v4.no_show_slots , v5.no_show_slots); - assert_eq!(v4.n_delay_tranches , v5.n_delay_tranches); - assert_eq!(v4.zeroth_delay_tranche_width , v5.zeroth_delay_tranche_width); - assert_eq!(v4.needed_approvals , v5.needed_approvals); - assert_eq!(v4.relay_vrf_modulo_samples , v5.relay_vrf_modulo_samples); - assert_eq!(v4.pvf_checking_enabled , v5.pvf_checking_enabled); - assert_eq!(v4.pvf_voting_ttl , v5.pvf_voting_ttl); - assert_eq!(v4.minimum_validation_upgrade_delay , v5.minimum_validation_upgrade_delay); + assert_eq!(v3.max_code_size , v4.max_code_size); + assert_eq!(v3.max_head_data_size , v4.max_head_data_size); + assert_eq!(v3.max_upward_queue_count , v4.max_upward_queue_count); + assert_eq!(v3.max_upward_queue_size , v4.max_upward_queue_size); + assert_eq!(v3.max_upward_message_size , v4.max_upward_message_size); + assert_eq!(v3.max_upward_message_num_per_candidate , v4.max_upward_message_num_per_candidate); + assert_eq!(v3.hrmp_max_message_num_per_candidate , v4.hrmp_max_message_num_per_candidate); + assert_eq!(v3.validation_upgrade_cooldown , v4.validation_upgrade_cooldown); + assert_eq!(v3.validation_upgrade_delay , v4.validation_upgrade_delay); + assert_eq!(v3.max_pov_size , v4.max_pov_size); + assert_eq!(v3.max_downward_message_size , v4.max_downward_message_size); + assert_eq!(v3.hrmp_max_parachain_outbound_channels , v4.hrmp_max_parachain_outbound_channels); + assert_eq!(v3.hrmp_max_parathread_outbound_channels , v4.hrmp_max_parathread_outbound_channels); + assert_eq!(v3.hrmp_sender_deposit , v4.hrmp_sender_deposit); + assert_eq!(v3.hrmp_recipient_deposit , v4.hrmp_recipient_deposit); + assert_eq!(v3.hrmp_channel_max_capacity , v4.hrmp_channel_max_capacity); + assert_eq!(v3.hrmp_channel_max_total_size , v4.hrmp_channel_max_total_size); + assert_eq!(v3.hrmp_max_parachain_inbound_channels , v4.hrmp_max_parachain_inbound_channels); + assert_eq!(v3.hrmp_max_parathread_inbound_channels , v4.hrmp_max_parathread_inbound_channels); + assert_eq!(v3.hrmp_channel_max_message_size , v4.hrmp_channel_max_message_size); + assert_eq!(v3.code_retention_period , v4.code_retention_period); + assert_eq!(v3.parathread_cores , v4.parathread_cores); + assert_eq!(v3.parathread_retries , v4.parathread_retries); + assert_eq!(v3.group_rotation_frequency , v4.group_rotation_frequency); + assert_eq!(v3.chain_availability_period , v4.chain_availability_period); + assert_eq!(v3.thread_availability_period , v4.thread_availability_period); + assert_eq!(v3.scheduling_lookahead , v4.scheduling_lookahead); + assert_eq!(v3.max_validators_per_core , v4.max_validators_per_core); + assert_eq!(v3.max_validators , v4.max_validators); + assert_eq!(v3.dispute_period , v4.dispute_period); + assert_eq!(v3.dispute_post_conclusion_acceptance_period, v4.dispute_post_conclusion_acceptance_period); + assert_eq!(v3.dispute_max_spam_slots , v4.dispute_max_spam_slots); + assert_eq!(v3.dispute_conclusion_by_time_out_period , v4.dispute_conclusion_by_time_out_period); + assert_eq!(v3.no_show_slots , v4.no_show_slots); + assert_eq!(v3.n_delay_tranches , v4.n_delay_tranches); + assert_eq!(v3.zeroth_delay_tranche_width , v4.zeroth_delay_tranche_width); + assert_eq!(v3.needed_approvals , v4.needed_approvals); + assert_eq!(v3.relay_vrf_modulo_samples , v4.relay_vrf_modulo_samples); + assert_eq!(v3.pvf_checking_enabled , v4.pvf_checking_enabled); + assert_eq!(v3.pvf_voting_ttl , v4.pvf_voting_ttl); + assert_eq!(v3.minimum_validation_upgrade_delay , v4.minimum_validation_upgrade_delay); }; // ; makes this a statement. `rustfmt::skip` cannot be put on an expression. }); } diff --git a/runtime/parachains/src/configuration/tests.rs b/runtime/parachains/src/configuration/tests.rs index b0e6c5a41dff..28e71c2fa4ae 100644 --- a/runtime/parachains/src/configuration/tests.rs +++ b/runtime/parachains/src/configuration/tests.rs @@ -309,6 +309,7 @@ fn setting_pending_config_members() { max_validators: None, dispute_period: 239, dispute_post_conclusion_acceptance_period: 10, + dispute_max_spam_slots: 2, dispute_conclusion_by_time_out_period: 512, no_show_slots: 240, n_delay_tranches: 241, @@ -399,6 +400,11 @@ fn setting_pending_config_members() { new_config.dispute_post_conclusion_acceptance_period, ) .unwrap(); + Configuration::set_dispute_max_spam_slots( + RuntimeOrigin::root(), + new_config.dispute_max_spam_slots, + ) + .unwrap(); Configuration::set_dispute_conclusion_by_time_out_period( RuntimeOrigin::root(), new_config.dispute_conclusion_by_time_out_period, diff --git a/runtime/parachains/src/disputes.rs b/runtime/parachains/src/disputes.rs index ca4cc2dda236..9f458421e2ed 100644 --- a/runtime/parachains/src/disputes.rs +++ b/runtime/parachains/src/disputes.rs @@ -46,10 +46,6 @@ mod tests; #[cfg(feature = "runtime-benchmarks")] mod benchmarking; -pub mod migration; - -const LOG_TARGET: &str = "runtime::disputes"; - /// Whether the dispute is local or remote. #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub enum DisputeLocation { @@ -266,6 +262,7 @@ pub trait DisputesHandler { /// accounting for maximum block weight. fn filter_dispute_data( statement_set: DisputeStatementSet, + max_spam_slots: u32, post_conclusion_acceptance_period: BlockNumber, verify_sigs: VerifyDisputeSignatures, ) -> Option; @@ -314,6 +311,7 @@ impl DisputesHandler for () { fn filter_dispute_data( _set: DisputeStatementSet, + _max_spam_slots: u32, _post_conclusion_acceptance_period: BlockNumber, _verify_sigs: VerifyDisputeSignatures, ) -> Option { @@ -363,12 +361,14 @@ where fn filter_dispute_data( set: DisputeStatementSet, + max_spam_slots: u32, post_conclusion_acceptance_period: T::BlockNumber, verify_sigs: VerifyDisputeSignatures, ) -> Option { pallet::Pallet::::filter_dispute_data( &set, post_conclusion_acceptance_period, + max_spam_slots, verify_sigs, ) .filter_statement_set(set) @@ -471,6 +471,14 @@ pub mod pallet { T::BlockNumber, >; + /// Maps session indices to a vector indicating the number of potentially-spam disputes + /// each validator is participating in. Potentially-spam disputes are remote disputes which have + /// fewer than `byzantine_threshold + 1` validators. + /// + /// The i'th entry of the vector corresponds to the i'th validator in the session. + #[pallet::storage] + pub(super) type SpamSlots = StorageMap<_, Twox64Concat, SessionIndex, Vec>; + /// Whether the chain is frozen. Starts as `None`. When this is `Some`, /// the chain will not accept any new parachain blocks for backing or inclusion, /// and its value indicates the last valid block number in the chain. @@ -509,15 +517,14 @@ pub mod pallet { InvalidSignature, /// Validator vote submitted more than once to dispute. DuplicateStatement, + /// Too many spam slots used by some specific validator. + PotentialSpam, /// A dispute where there are only votes on one side. SingleSidedDispute, - /// Unconfirmed dispute statement sets provided - UnconfirmedDispute, } #[pallet::call] impl Pallet { - #[pallet::call_index(0)] #[pallet::weight(::WeightInfo::force_unfreeze())] pub fn force_unfreeze(origin: OriginFor) -> DispatchResult { ensure_root(origin)?; @@ -566,9 +573,19 @@ impl DisputeStateFlags { } } +#[derive(PartialEq, RuntimeDebug)] +enum SpamSlotChange { + /// Add a `+1` to the spam slot for a particular validator index in this session. + Inc, + /// Subtract `-1` ... + Dec, +} + struct ImportSummary { /// The new state, with all votes imported. state: DisputeState, + /// Changes to spam slots. Validator index paired with directional change. + spam_slot_changes: Vec<(ValidatorIndex, SpamSlotChange)>, /// Validators to slash for being (wrongly) on the AGAINST side. slash_against: Vec, /// Validators to slash for being (wrongly) on the FOR side. @@ -681,7 +698,37 @@ impl DisputeStateImporter { let pre_post_contains = |flags| (pre_flags.contains(flags), post_flags.contains(flags)); - // 1. Check for fresh FOR supermajority. Only if not already concluded. + // 1. Act on confirmed flag state to inform spam slots changes. + let spam_slot_changes: Vec<_> = match pre_post_contains(DisputeStateFlags::CONFIRMED) { + (false, false) => { + // increment spam slots for all new participants. + self.new_participants + .iter_ones() + .map(|i| (ValidatorIndex(i as _), SpamSlotChange::Inc)) + .collect() + }, + (false, true) => { + // all participants, which are not new participants + let prev_participants = (self.state.validators_for.clone() | + self.state.validators_against.clone()) & + !self.new_participants.clone(); + + prev_participants + .iter_ones() + .map(|i| (ValidatorIndex(i as _), SpamSlotChange::Dec)) + .collect() + }, + (true, false) => { + log::error!("Dispute statements are never removed. This is a bug"); + Vec::new() + }, + (true, true) => { + // No change, nothing to do. + Vec::new() + }, + }; + + // 2. Check for fresh FOR supermajority. Only if not already concluded. let slash_against = if let (false, true) = pre_post_contains(DisputeStateFlags::FOR_SUPERMAJORITY) { if self.state.concluded_at.is_none() { @@ -698,7 +745,7 @@ impl DisputeStateImporter { Vec::new() }; - // 2. Check for fresh AGAINST supermajority. + // 3. Check for fresh AGAINST supermajority. let slash_for = if let (false, true) = pre_post_contains(DisputeStateFlags::AGAINST_SUPERMAJORITY) { if self.state.concluded_at.is_none() { @@ -713,6 +760,7 @@ impl DisputeStateImporter { ImportSummary { state: self.state, + spam_slot_changes, slash_against, slash_for, new_participants: self.new_participants, @@ -782,7 +830,32 @@ impl Pallet { dispute.concluded_at = Some(now); >::insert(session_index, candidate_hash, &dispute); - weight += T::DbWeight::get().writes(1); + if >::contains_key(&session_index, &candidate_hash) { + // Local disputes don't count towards spam. + + weight += T::DbWeight::get().reads_writes(1, 1); + continue + } + + // mildly punish all validators involved. they've failed to make + // data available to others, so this is most likely spam. + SpamSlots::::mutate(session_index, |spam_slots| { + let spam_slots = match spam_slots { + Some(ref mut s) => s, + None => return, + }; + + // also reduce spam slots for all validators involved, if the dispute was unconfirmed. + // this does open us up to more spam, but only for validators who are willing + // to be punished more. + // + // it would be unexpected for any change here to occur when the dispute has not concluded + // in time, as a dispute guaranteed to have at least one honest participant should + // conclude quickly. + let _participating = decrement_spam(spam_slots, &dispute); + }); + + weight += T::DbWeight::get().reads_writes(2, 2); } } @@ -820,6 +893,7 @@ impl Pallet { // TODO: https://github.com/paritytech/polkadot/issues/3469 #[allow(deprecated)] >::remove_prefix(to_prune, None); + SpamSlots::::remove(to_prune); } *last_pruned = Some(pruning_target); @@ -863,10 +937,10 @@ impl Pallet { // // Votes which are duplicate or already known by the chain are filtered out. // The entire set is removed if the dispute is both, ancient and concluded. - // Disputes without enough votes to get confirmed are also filtered out. fn filter_dispute_data( set: &DisputeStatementSet, post_conclusion_acceptance_period: ::BlockNumber, + max_spam_slots: u32, verify_sigs: VerifyDisputeSignatures, ) -> StatementSetFilter { let mut filter = StatementSetFilter::RemoveIndices(Vec::new()); @@ -885,26 +959,29 @@ impl Pallet { let n_validators = session_info.validators.len(); // Check for ancient. - let dispute_state = { + let (first_votes, dispute_state) = { if let Some(dispute_state) = >::get(&set.session, &set.candidate_hash) { if dispute_state.concluded_at.as_ref().map_or(false, |c| c < &oldest_accepted) { return StatementSetFilter::RemoveAll } - dispute_state + (false, dispute_state) } else { // No state in storage, this indicates it's the first dispute statement set as well. - DisputeState { - validators_for: bitvec![u8, BitOrderLsb0; 0; n_validators], - validators_against: bitvec![u8, BitOrderLsb0; 0; n_validators], - start: now, - concluded_at: None, - } + ( + true, + DisputeState { + validators_for: bitvec![u8, BitOrderLsb0; 0; n_validators], + validators_against: bitvec![u8, BitOrderLsb0; 0; n_validators], + start: now, + concluded_at: None, + }, + ) } }; // Check and import all votes. - let summary = { + let mut summary = { let mut importer = DisputeStateImporter::new(dispute_state, now); for (i, (statement, validator_index, signature)) in set.statements.iter().enumerate() { // assure the validator index and is present in the session info @@ -961,11 +1038,99 @@ impl Pallet { return StatementSetFilter::RemoveAll } - // Reject disputes containing less votes than needed for confirmation. - if (summary.state.validators_for.clone() | &summary.state.validators_against).count_ones() <= - byzantine_threshold(summary.state.validators_for.len()) - { - return StatementSetFilter::RemoveAll + // Apply spam slot changes. Bail early if too many occupied. + let is_local = >::contains_key(&set.session, &set.candidate_hash); + if !is_local { + let mut spam_slots: Vec = + SpamSlots::::get(&set.session).unwrap_or_else(|| vec![0; n_validators]); + let mut spam_filter_struck = false; + for (validator_index, spam_slot_change) in summary.spam_slot_changes { + let spam_slot = spam_slots + .get_mut(validator_index.0 as usize) + .expect("index is in-bounds, as checked above; qed"); + + if let SpamSlotChange::Inc = spam_slot_change { + if *spam_slot >= max_spam_slots { + spam_filter_struck = true; + + // Find the vote by this validator and filter it out. + let first_index_in_set = set + .statements + .iter() + .position(|(_statement, v_i, _signature)| &validator_index == v_i) + .expect( + "spam slots are only incremented when a new statement \ + from a validator is included; qed", + ); + + // Note that there may be many votes by the validator in the statement + // set. There are not supposed to be, but the purpose of this function + // is to filter out invalid submissions, after all. + // + // This is fine - we only need to handle the first one, because all + // subsequent votes' indices have been added to the filter already + // by the duplicate checks above. It's only the first one which + // may not already have been filtered out. + filter.remove_index(first_index_in_set); + + // Removing individual statments can cause the dispute to become onesided. + // Checking that (again) is done after the loop. Remove the bit indices. + summary.new_participants.set(validator_index.0 as _, false); + } + + // It's also worth noting that the `DisputeStateImporter` + // which produces these spam slot updates only produces + // one spam slot update per validator because it rejects + // duplicate votes. + // + // So we don't need to worry about spam slots being + // updated incorrectly after receiving duplicates. + *spam_slot += 1; + } else { + *spam_slot = spam_slot.saturating_sub(1); + } + } + + // We write the spam slots here because sequential calls to + // `filter_dispute_data` have a dependency on each other. + // + // For example, if a validator V occupies 1 spam slot and + // max is 2, then 2 sequential calls incrementing spam slot + // cannot be allowed. + // + // However, 3 sequential calls, where the first increments, + // the second decrements, and the third increments would be allowed. + SpamSlots::::insert(&set.session, spam_slots); + + // This is only relevant in cases where it's the first vote and the state + // would hence hold a onesided dispute. If a onesided dispute can never be + // started, by induction, we can never enter a state of a one sided dispute. + if spam_filter_struck && first_votes { + let mut vote_for_count = 0_u64; + let mut vote_against_count = 0_u64; + // Since this is the first set of statements for the dispute, + // it's sufficient to count the votes in the statement set after they + set.statements.iter().for_each(|(statement, v_i, _signature)| { + if Some(true) == + summary.new_participants.get(v_i.0 as usize).map(|b| b.as_ref().clone()) + { + match statement { + // `summary.new_flags` contains the spam free votes. + // Note that this does not distinguish between pro or con votes, + // since allowing both of them, even if the spam threshold would be reached + // is a good thing. + // Overflow of the counters is no concern, disputes are limited by weight. + DisputeStatement::Valid(_) => vote_for_count += 1, + DisputeStatement::Invalid(_) => vote_against_count += 1, + } + } + }); + if vote_for_count.is_zero() || vote_against_count.is_zero() { + // It wasn't one-sided before the spam filters, but now it is, + // so we need to be thorough and not import that dispute. + return StatementSetFilter::RemoveAll + } + } } filter @@ -1035,17 +1200,13 @@ impl Pallet { Error::::SingleSidedDispute, ); - // Reject disputes containing less votes than needed for confirmation. - ensure!( - (summary.state.validators_for.clone() | &summary.state.validators_against).count_ones() > - byzantine_threshold(summary.state.validators_for.len()), - Error::::UnconfirmedDispute, - ); - let DisputeStatementSet { ref session, ref candidate_hash, .. } = set; let session = *session; let candidate_hash = *candidate_hash; + // we can omit spam slot checks, `fn filter_disputes_data` is + // always called before calling this `fn`. + if fresh { let is_local = >::contains_key(&session, &candidate_hash); @@ -1121,7 +1282,15 @@ impl Pallet { >::insert(&session, &candidate_hash, revert_to); + // If we just included a block locally which has a live dispute, decrement spam slots + // for any involved validators, if the dispute is not already confirmed by f + 1. if let Some(state) = >::get(&session, candidate_hash) { + SpamSlots::::mutate(&session, |spam_slots| { + if let Some(ref mut spam_slots) = *spam_slots { + decrement_spam(spam_slots, &state); + } + }); + if has_supermajority_against(&state) { Self::revert_and_freeze(revert_to); } @@ -1167,6 +1336,29 @@ fn has_supermajority_against(dispute: &DisputeState) - dispute.validators_against.count_ones() >= supermajority_threshold } +// If the dispute had not enough validators to confirm, decrement spam slots for all the participating +// validators. +// +// Returns the set of participating validators as a bitvec. +fn decrement_spam( + spam_slots: &mut [u32], + dispute: &DisputeState, +) -> bitvec::vec::BitVec { + let byzantine_threshold = byzantine_threshold(spam_slots.len()); + + let participating = dispute.validators_for.clone() | dispute.validators_against.clone(); + let decrement_spam = participating.count_ones() <= byzantine_threshold; + for validator_index in participating.iter_ones() { + if decrement_spam { + if let Some(occupied) = spam_slots.get_mut(validator_index as usize) { + *occupied = occupied.saturating_sub(1); + } + } + } + + participating +} + fn check_signature( validator_public: &ValidatorId, candidate_hash: CandidateHash, diff --git a/runtime/parachains/src/disputes/migration.rs b/runtime/parachains/src/disputes/migration.rs deleted file mode 100644 index 584d4b33872e..000000000000 --- a/runtime/parachains/src/disputes/migration.rs +++ /dev/null @@ -1,98 +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 . - -//! Storage migration(s) related to disputes pallet - -use frame_support::traits::StorageVersion; - -/// The current storage version. -const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); - -pub mod v1 { - use super::*; - use crate::disputes::{Config, Pallet}; - use frame_support::{ - pallet_prelude::*, storage_alias, traits::OnRuntimeUpgrade, weights::Weight, - }; - use primitives::v2::SessionIndex; - use sp_std::prelude::*; - - #[storage_alias] - type SpamSlots = StorageMap, Twox64Concat, SessionIndex, Vec>; - - pub struct MigrateToV1(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateToV1 { - fn on_runtime_upgrade() -> Weight { - let mut weight: Weight = Weight::zero(); - - if StorageVersion::get::>() < STORAGE_VERSION { - log::info!(target: crate::disputes::LOG_TARGET, "Migrating disputes storage to v1"); - weight += migrate_to_v1::(); - STORAGE_VERSION.put::>(); - weight = weight.saturating_add(T::DbWeight::get().reads_writes(1, 1)); - } else { - log::info!( - target: crate::disputes::LOG_TARGET, - "Disputes storage up to date - no need for migration" - ); - } - - weight - } - - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - log::trace!( - target: crate::disputes::LOG_TARGET, - "SpamSlots before migration: {}", - SpamSlots::::iter().count() - ); - ensure!( - StorageVersion::get::>() == 0, - "Storage version should be less than `1` before the migration", - ); - Ok(Vec::new()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), &'static str> { - log::trace!(target: crate::disputes::LOG_TARGET, "Running post_upgrade()"); - ensure!( - StorageVersion::get::>() == STORAGE_VERSION, - "Storage version should be `1` after the migration" - ); - ensure!( - SpamSlots::::iter().count() == 0, - "SpamSlots should be empty after the migration" - ); - Ok(()) - } - } - - /// Migrates the pallet storage to the most recent version, checking and setting the `StorageVersion`. - pub fn migrate_to_v1() -> Weight { - let mut weight: Weight = Weight::zero(); - - // SpamSlots should not contain too many keys so removing everything at once should be safe - let res = SpamSlots::::clear(u32::MAX, None); - // `loops` is the number of iterations => used to calculate read weights - // `backend` is the number of keys removed from the backend => used to calculate write weights - weight = weight - .saturating_add(T::DbWeight::get().reads_writes(res.loops as u64, res.backend as u64)); - - weight - } -} diff --git a/runtime/parachains/src/disputes/slashing.rs b/runtime/parachains/src/disputes/slashing.rs index 419db8654d89..2dfdc87c4b4e 100644 --- a/runtime/parachains/src/disputes/slashing.rs +++ b/runtime/parachains/src/disputes/slashing.rs @@ -475,7 +475,6 @@ 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/disputes/tests.rs b/runtime/parachains/src/disputes/tests.rs index d1c785223ff6..4d8ac714cb7b 100644 --- a/runtime/parachains/src/disputes/tests.rs +++ b/runtime/parachains/src/disputes/tests.rs @@ -23,6 +23,7 @@ use crate::{ Test, PUNISH_VALIDATORS_AGAINST, PUNISH_VALIDATORS_FOR, REWARD_VALIDATORS, }, }; +use assert_matches::assert_matches; use frame_support::{ assert_err, assert_noop, assert_ok, traits::{OnFinalize, OnInitialize}, @@ -30,16 +31,20 @@ use frame_support::{ use primitives::v2::BlockNumber; use sp_core::{crypto::CryptoType, Pair}; -fn filter_dispute_set(stmts: MultiDisputeStatementSet) -> CheckedMultiDisputeStatementSet { +/// Filtering updates the spam slots, as such update them. +fn update_spam_slots(stmts: MultiDisputeStatementSet) -> CheckedMultiDisputeStatementSet { let config = >::config(); + let max_spam_slots = config.dispute_max_spam_slots; let post_conclusion_acceptance_period = config.dispute_post_conclusion_acceptance_period; stmts .into_iter() .filter_map(|set| { + // updates spam slots implicitly let filter = Pallet::::filter_dispute_data( &set, post_conclusion_acceptance_period, + max_spam_slots, VerifyDisputeSignatures::Skip, ); filter.filter_statement_set(set) @@ -130,7 +135,7 @@ fn test_dispute_state_flag_from_state() { } #[test] -fn test_import_new_participant() { +fn test_import_new_participant_spam_inc() { let mut importer = DisputeStateImporter::new( DisputeState { validators_for: bitvec![u8, BitOrderLsb0; 1, 0, 0, 0, 0, 0, 0, 0], @@ -166,13 +171,14 @@ fn test_import_new_participant() { concluded_at: None, }, ); + assert_eq!(summary.spam_slot_changes, vec![(ValidatorIndex(2), SpamSlotChange::Inc)]); assert!(summary.slash_for.is_empty()); assert!(summary.slash_against.is_empty()); assert_eq!(summary.new_participants, bitvec![u8, BitOrderLsb0; 0, 0, 1, 0, 0, 0, 0, 0]); } #[test] -fn test_import_prev_participant_confirmed() { +fn test_import_prev_participant_spam_dec_confirmed() { let mut importer = DisputeStateImporter::new( DisputeState { validators_for: bitvec![u8, BitOrderLsb0; 1, 0, 0, 0, 0, 0, 0, 0], @@ -195,7 +201,10 @@ fn test_import_prev_participant_confirmed() { concluded_at: None, }, ); - + assert_eq!( + summary.spam_slot_changes, + vec![(ValidatorIndex(0), SpamSlotChange::Dec), (ValidatorIndex(1), SpamSlotChange::Dec),], + ); assert!(summary.slash_for.is_empty()); assert!(summary.slash_against.is_empty()); assert_eq!(summary.new_participants, bitvec![u8, BitOrderLsb0; 0, 0, 1, 0, 0, 0, 0, 0]); @@ -203,7 +212,7 @@ fn test_import_prev_participant_confirmed() { } #[test] -fn test_import_prev_participant_confirmed_slash_for() { +fn test_import_prev_participant_spam_dec_confirmed_slash_for() { let mut importer = DisputeStateImporter::new( DisputeState { validators_for: bitvec![u8, BitOrderLsb0; 1, 0, 0, 0, 0, 0, 0, 0], @@ -231,7 +240,10 @@ fn test_import_prev_participant_confirmed_slash_for() { concluded_at: Some(0), }, ); - + assert_eq!( + summary.spam_slot_changes, + vec![(ValidatorIndex(0), SpamSlotChange::Dec), (ValidatorIndex(1), SpamSlotChange::Dec),], + ); assert_eq!(summary.slash_for, vec![ValidatorIndex(0), ValidatorIndex(2)]); assert!(summary.slash_against.is_empty()); assert_eq!(summary.new_participants, bitvec![u8, BitOrderLsb0; 0, 0, 1, 1, 1, 1, 1, 0]); @@ -269,12 +281,224 @@ fn test_import_slash_against() { concluded_at: Some(0), }, ); + assert!(summary.spam_slot_changes.is_empty()); assert!(summary.slash_for.is_empty()); assert_eq!(summary.slash_against, vec![ValidatorIndex(1), ValidatorIndex(5)]); assert_eq!(summary.new_participants, bitvec![u8, BitOrderLsb0; 0, 0, 0, 1, 1, 1, 1, 1]); assert_eq!(summary.new_flags, DisputeStateFlags::FOR_SUPERMAJORITY); } +fn generate_dispute_statement_set_entry( + session: u32, + candidate_hash: CandidateHash, + statement: DisputeStatement, + validator: &::Pair, +) -> (DisputeStatement, ValidatorSignature) { + let valid = match &statement { + DisputeStatement::Valid(_) => true, + _ => false, + }; + let signature_bytes = validator + .sign(&ExplicitDisputeStatement { valid, candidate_hash, session }.signing_payload()); + let signature = ValidatorSignature::try_from(signature_bytes).unwrap(); + (statement, signature) +} + +fn generate_dispute_statement_set( + session: SessionIndex, + candidate_hash: CandidateHash, + validators: &[::Pair], + vidxs: Vec<(usize, DisputeStatement)>, +) -> DisputeStatementSet { + let statements = vidxs + .into_iter() + .map(|(v_i, statement)| { + let validator_index = ValidatorIndex(v_i as u32); + let (statement, signature) = generate_dispute_statement_set_entry( + session, + candidate_hash.clone(), + statement, + &validators[v_i], + ); + (statement, validator_index, signature) + }) + .collect::>(); + DisputeStatementSet { candidate_hash: candidate_hash.clone(), session, statements } +} + +#[test] +fn dispute_statement_becoming_onesided_due_to_spamslots_is_accepted() { + let dispute_conclusion_by_time_out_period = 3; + let start = 10; + let session = start - 1; + let dispute_max_spam_slots = 2; + let post_conclusion_acceptance_period = 3; + + let mock_genesis_config = MockGenesisConfig { + configuration: crate::configuration::GenesisConfig { + config: HostConfiguration { + dispute_conclusion_by_time_out_period, + dispute_max_spam_slots, + ..Default::default() + }, + ..Default::default() + }, + ..Default::default() + }; + + new_test_ext(mock_genesis_config).execute_with(|| { + // We need 6 validators for the byzantine threshold to be 2 + static ACCOUNT_IDS: &[AccountId] = &[0, 1, 2, 3, 4, 5, 6, 7]; + let validators = std::iter::repeat(()) + .take(7) + .map(|_| ::Pair::generate().0) + .collect::>(); + let validators = &validators; + + // a new session at each block, but always the same validators + let session_change_callback = |block_number: u32| -> Option> { + let session_validators = + Vec::from_iter(ACCOUNT_IDS.iter().zip(validators.iter().map(|pair| pair.public()))); + Some((true, block_number, session_validators.clone(), Some(session_validators))) + }; + + run_to_block(start, session_change_callback); + + // Must be _foreign_ parachain candidate + // otherwise slots do not trigger. + let candidate_hash_a = CandidateHash(sp_core::H256::repeat_byte(0xA)); + let candidate_hash_b = CandidateHash(sp_core::H256::repeat_byte(0xB)); + let candidate_hash_c = CandidateHash(sp_core::H256::repeat_byte(0xC)); + let candidate_hash_d = CandidateHash(sp_core::H256::repeat_byte(0xD)); + + let stmts = vec![ + // a + generate_dispute_statement_set( + session, + candidate_hash_a, + validators, + vec![ + (3, DisputeStatement::Valid(ValidDisputeStatementKind::Explicit)), + (6, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit)), + ], + ), + // b + generate_dispute_statement_set( + session, + candidate_hash_b, + validators, + vec![ + (1, DisputeStatement::Valid(ValidDisputeStatementKind::Explicit)), + (6, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit)), + ], + ), + // c + generate_dispute_statement_set( + session, + candidate_hash_c, + validators, + vec![ + (2, DisputeStatement::Valid(ValidDisputeStatementKind::Explicit)), + (6, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit)), + ], + ), + // d + generate_dispute_statement_set( + session, + candidate_hash_d, + validators, + vec![ + (4, DisputeStatement::Valid(ValidDisputeStatementKind::Explicit)), + (5, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit)), + ], + ), + generate_dispute_statement_set( + session, + candidate_hash_d, + validators, + vec![(6, DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit))], + ), + ]; + + // no filtering happens, host config for `dispute_max_spam_slots: 2` is the default + // updates spam slots implicitly + let set = stmts[0].clone(); + let filter = Pallet::::filter_dispute_data( + &set, + post_conclusion_acceptance_period, + dispute_max_spam_slots, + VerifyDisputeSignatures::Skip, + ); + assert_matches!(&filter, StatementSetFilter::RemoveIndices(v) if v.is_empty()); + assert_matches!(filter.filter_statement_set(set.clone()), Some(modified) => { + assert_eq!(&set, modified.as_ref()); + }); + assert_eq!(SpamSlots::::get(session), Some(vec![0, 0, 0, 1, 0, 0, 1])); + + // <-----> + + // 2nd, still ok? Should be + let set = stmts[1].clone(); + let filter = Pallet::::filter_dispute_data( + &set, + post_conclusion_acceptance_period, + dispute_max_spam_slots, + VerifyDisputeSignatures::Skip, + ); + assert_matches!(&filter, StatementSetFilter::RemoveIndices(v) if v.is_empty()); + assert_matches!(filter.filter_statement_set(set.clone()), Some(modified) => { + assert_eq!(&set, modified.as_ref()); + }); + assert_eq!(SpamSlots::::get(session), Some(vec![0, 1, 0, 1, 0, 0, 2])); + + // <-----> + + // now this is the third spammy participation of validator 6 and hence + let set = stmts[2].clone(); + let filter = Pallet::::filter_dispute_data( + &set, + post_conclusion_acceptance_period, + dispute_max_spam_slots, + VerifyDisputeSignatures::Skip, + ); + assert_matches!(&filter, StatementSetFilter::RemoveAll); + // no need to apply the filter, + // we don't do anything with the result, and spam slots were updated already + + // <-----> + + // now there is no pariticipation in this dispute being initiated + // only validator 4 and 5 are part of it + // with 3 validators it's not a an unconfirmed dispute anymore + // so validator 6, while being considered spammy should work again + let set = stmts[3].clone(); + let filter = Pallet::::filter_dispute_data( + &set, + post_conclusion_acceptance_period, + dispute_max_spam_slots, + VerifyDisputeSignatures::Skip, + ); + assert_matches!(&filter, StatementSetFilter::RemoveIndices(v) if v.is_empty()); + // no need to apply the filter, + // we don't do anything with the result, and spam slots were updated already + + // <-----> + + // it's a spammy participant, so a new dispute will not be accepted being initiated by a spammer + let set = stmts[4].clone(); + let filter = Pallet::::filter_dispute_data( + &set, + post_conclusion_acceptance_period, + dispute_max_spam_slots, + VerifyDisputeSignatures::Skip, + ); + assert_matches!(&filter, StatementSetFilter::RemoveAll); + assert_matches!(filter.filter_statement_set(set.clone()), None); + + assert_eq!(SpamSlots::::get(session), Some(vec![0, 1, 1, 1, 1, 1, 3])); + }); +} + // Test that dispute timeout is handled correctly. #[test] fn test_dispute_timeout() { @@ -293,7 +517,7 @@ fn test_dispute_timeout() { }; new_test_ext(mock_genesis_config).execute_with(|| { - // We need 7 validators for the byzantine threshold to be 2 + // We need 6 validators for the byzantine threshold to be 2 let v0 = ::Pair::generate().0; let v1 = ::Pair::generate().0; let v2 = ::Pair::generate().0; @@ -330,12 +554,10 @@ fn test_dispute_timeout() { let candidate_hash = CandidateHash(sp_core::H256::repeat_byte(1)); - // v0 and v1 vote for 3, v2 against. We need f+1 votes (3) so that the dispute is - // confirmed. Otherwise It will be filtered out. - let session = start - 1; + // v0 votes for 3, v6 against. let stmts = vec![DisputeStatementSet { candidate_hash: candidate_hash.clone(), - session, + session: start - 1, statements: vec![ ( DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), @@ -349,18 +571,6 @@ fn test_dispute_timeout() { .signing_payload(), ), ), - ( - DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), - ValidatorIndex(1), - v1.sign( - &ExplicitDisputeStatement { - valid: true, - candidate_hash: candidate_hash.clone(), - session: start - 1, - } - .signing_payload(), - ), - ), ( DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), ValidatorIndex(6), @@ -376,7 +586,8 @@ fn test_dispute_timeout() { ], }]; - let stmts = filter_dispute_set(stmts); + let stmts = update_spam_slots(stmts); + assert_eq!(SpamSlots::::get(start - 1), Some(vec![1, 0, 0, 0, 0, 0, 1])); assert_ok!( Pallet::::process_checked_multi_dispute_data(stmts), @@ -385,20 +596,11 @@ fn test_dispute_timeout() { // Run to timeout period run_to_block(start + dispute_conclusion_by_time_out_period, |_| None); - assert!(>::get(&session, &candidate_hash) - .expect("dispute should exist") - .concluded_at - .is_none()); + assert_eq!(SpamSlots::::get(start - 1), Some(vec![1, 0, 0, 0, 0, 0, 1])); // Run to timeout + 1 in order to executive on_finalize(timeout) run_to_block(start + dispute_conclusion_by_time_out_period + 1, |_| None); - assert_eq!( - >::get(&session, &candidate_hash) - .expect("dispute should exist") - .concluded_at - .expect("dispute should have concluded"), - start + dispute_conclusion_by_time_out_period + 1 - ); + assert_eq!(SpamSlots::::get(start - 1), Some(vec![0, 0, 0, 0, 0, 0, 0])); }); } @@ -686,122 +888,12 @@ fn test_freeze_provided_against_supermajority_for_included() { }); } -mod unconfirmed_disputes { - use super::*; - use assert_matches::assert_matches; - use sp_runtime::ModuleError; - - // Shared initialization code between `test_unconfirmed_are_ignored` and `test_unconfirmed_disputes_cause_block_import_error` - fn generate_dispute_statement_set_and_run_to_block() -> DisputeStatementSet { - // 7 validators needed for byzantine threshold of 2. - let v0 = ::Pair::generate().0; - let v1 = ::Pair::generate().0; - let v2 = ::Pair::generate().0; - let v3 = ::Pair::generate().0; - let v4 = ::Pair::generate().0; - let v5 = ::Pair::generate().0; - let v6 = ::Pair::generate().0; - - // Mapping between key pair and `ValidatorIndex` - // v0 -> 0 - // v1 -> 3 - // v2 -> 6 - // v3 -> 5 - // v4 -> 1 - // v5 -> 4 - // v6 -> 2 - - run_to_block(6, |b| { - // a new session at each block - Some(( - true, - b, - vec![ - (&0, v0.public()), - (&1, v1.public()), - (&2, v2.public()), - (&3, v3.public()), - (&4, v4.public()), - (&5, v5.public()), - (&6, v6.public()), - ], - Some(vec![ - (&0, v0.public()), - (&1, v1.public()), - (&2, v2.public()), - (&3, v3.public()), - (&4, v4.public()), - (&5, v5.public()), - (&6, v6.public()), - ]), - )) - }); - - let candidate_hash = CandidateHash(sp_core::H256::repeat_byte(1)); - - // v0 votes for 4, v1 votes against 4. - DisputeStatementSet { - candidate_hash: candidate_hash.clone(), - session: 4, - statements: vec![ - ( - DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), - ValidatorIndex(0), - v0.sign( - &ExplicitDisputeStatement { - valid: true, - candidate_hash: candidate_hash.clone(), - session: 4, - } - .signing_payload(), - ), - ), - ( - DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), - ValidatorIndex(3), - v1.sign( - &ExplicitDisputeStatement { - valid: false, - candidate_hash: candidate_hash.clone(), - session: 4, - } - .signing_payload(), - ), - ), - ], - } - } - #[test] - fn test_unconfirmed_are_ignored() { - new_test_ext(Default::default()).execute_with(|| { - let stmts = vec![generate_dispute_statement_set_and_run_to_block()]; - let stmts = filter_dispute_set(stmts); - - // Not confirmed => should be filtered out - assert_ok!(Pallet::::process_checked_multi_dispute_data(stmts), vec![],); - }); - } - - #[test] - fn test_unconfirmed_disputes_cause_block_import_error() { - new_test_ext(Default::default()).execute_with(|| { - - let stmts = generate_dispute_statement_set_and_run_to_block(); - let stmts = vec![CheckedDisputeStatementSet::unchecked_from_unchecked(stmts)]; - - assert_matches!( - Pallet::::process_checked_multi_dispute_data(stmts), - Err(DispatchError::Module(ModuleError{index: _, error: _, message})) => assert_eq!(message, Some("UnconfirmedDispute")) - ); - - }); - } -} - // tests for: // * provide_multi_dispute: with success scenario // * disputes: correctness of datas // * could_be_invalid: correctness of datas +// * note_included: decrement spam correctly +// * spam slots: correctly incremented and decremented // * ensure rewards and punishment are correctly called. #[test] fn test_provide_multi_dispute_success_and_other() { @@ -815,7 +907,6 @@ fn test_provide_multi_dispute_success_and_other() { let v5 = ::Pair::generate().0; let v6 = ::Pair::generate().0; - // Mapping between key pair and `ValidatorIndex` // v0 -> 0 // v1 -> 3 // v2 -> 6 @@ -852,7 +943,7 @@ fn test_provide_multi_dispute_success_and_other() { let candidate_hash = CandidateHash(sp_core::H256::repeat_byte(1)); - // v0 and v1 vote for 3, v6 votes against + // v0 votes for 3, v6 votes against let stmts = vec![DisputeStatementSet { candidate_hash: candidate_hash.clone(), session: 3, @@ -881,7 +972,53 @@ fn test_provide_multi_dispute_success_and_other() { .signing_payload(), ), ), - ( + ], + }]; + + let stmts = update_spam_slots(stmts); + assert_eq!(SpamSlots::::get(3), Some(vec![1, 0, 1, 0, 0, 0, 0])); + + assert_ok!( + Pallet::::process_checked_multi_dispute_data(stmts), + vec![(3, candidate_hash.clone())], + ); + + // v1 votes for 4 and for 3, v6 votes against 4. + let stmts = vec![ + DisputeStatementSet { + candidate_hash: candidate_hash.clone(), + session: 4, + statements: vec![ + ( + DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), + ValidatorIndex(3), + v1.sign( + &ExplicitDisputeStatement { + valid: true, + candidate_hash: candidate_hash.clone(), + session: 4, + } + .signing_payload(), + ), + ), + ( + DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), + ValidatorIndex(2), + v6.sign( + &ExplicitDisputeStatement { + valid: false, + candidate_hash: candidate_hash.clone(), + session: 4, + } + .signing_payload(), + ), + ), + ], + }, + DisputeStatementSet { + candidate_hash: candidate_hash.clone(), + session: 3, + statements: vec![( DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), ValidatorIndex(3), v1.sign( @@ -892,18 +1029,20 @@ fn test_provide_multi_dispute_success_and_other() { } .signing_payload(), ), - ), - ], - }]; + )], + }, + ]; - let stmts = filter_dispute_set(stmts); + let stmts = update_spam_slots(stmts); assert_ok!( Pallet::::process_checked_multi_dispute_data(stmts), - vec![(3, candidate_hash.clone())], + vec![(4, candidate_hash.clone())], ); + assert_eq!(SpamSlots::::get(3), Some(vec![0, 0, 0, 0, 0, 0, 0])); // Confirmed as no longer spam + assert_eq!(SpamSlots::::get(4), Some(vec![0, 0, 1, 1, 0, 0, 0])); - // v3 votes against 3 and for 5, v2 and v6 vote against 5. + // v3 votes against 3 and for 5, v6 votes against 5. let stmts = vec![ DisputeStatementSet { candidate_hash: candidate_hash.clone(), @@ -937,18 +1076,6 @@ fn test_provide_multi_dispute_success_and_other() { .signing_payload(), ), ), - ( - DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), - ValidatorIndex(6), - v2.sign( - &ExplicitDisputeStatement { - valid: false, - candidate_hash: candidate_hash.clone(), - session: 5, - } - .signing_payload(), - ), - ), ( DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), ValidatorIndex(2), @@ -965,31 +1092,55 @@ fn test_provide_multi_dispute_success_and_other() { }, ]; - let stmts = filter_dispute_set(stmts); + let stmts = update_spam_slots(stmts); assert_ok!( Pallet::::process_checked_multi_dispute_data(stmts), vec![(5, candidate_hash.clone())], ); + assert_eq!(SpamSlots::::get(3), Some(vec![0, 0, 0, 0, 0, 0, 0])); + assert_eq!(SpamSlots::::get(4), Some(vec![0, 0, 1, 1, 0, 0, 0])); + assert_eq!(SpamSlots::::get(5), Some(vec![0, 0, 1, 0, 0, 1, 0])); - // v2 votes for 3 - let stmts = vec![DisputeStatementSet { - candidate_hash: candidate_hash.clone(), - session: 3, - statements: vec![( - DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), - ValidatorIndex(6), - v2.sign( - &ExplicitDisputeStatement { - valid: true, - candidate_hash: candidate_hash.clone(), - session: 3, - } - .signing_payload(), - ), - )], - }]; - let stmts = filter_dispute_set(stmts); + // v2 votes for 3 and against 5 + let stmts = vec![ + DisputeStatementSet { + candidate_hash: candidate_hash.clone(), + session: 3, + statements: vec![( + DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), + ValidatorIndex(6), + v2.sign( + &ExplicitDisputeStatement { + valid: true, + candidate_hash: candidate_hash.clone(), + session: 3, + } + .signing_payload(), + ), + )], + }, + DisputeStatementSet { + candidate_hash: candidate_hash.clone(), + session: 5, + statements: vec![( + DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), + ValidatorIndex(6), + v2.sign( + &ExplicitDisputeStatement { + valid: false, + candidate_hash: candidate_hash.clone(), + session: 5, + } + .signing_payload(), + ), + )], + }, + ]; + let stmts = update_spam_slots(stmts); assert_ok!(Pallet::::process_checked_multi_dispute_data(stmts), vec![]); + assert_eq!(SpamSlots::::get(3), Some(vec![0, 0, 0, 0, 0, 0, 0])); + assert_eq!(SpamSlots::::get(4), Some(vec![0, 0, 1, 1, 0, 0, 0])); + assert_eq!(SpamSlots::::get(5), Some(vec![0, 0, 0, 0, 0, 0, 0])); let stmts = vec![ // 0, 4, and 5 vote against 5 @@ -1067,7 +1218,7 @@ fn test_provide_multi_dispute_success_and_other() { ], }, ]; - let stmts = filter_dispute_set(stmts); + let stmts = update_spam_slots(stmts); assert_ok!(Pallet::::process_checked_multi_dispute_data(stmts), vec![]); assert_eq!( @@ -1093,6 +1244,16 @@ fn test_provide_multi_dispute_success_and_other() { concluded_at: Some(6), // 5 vote for } ), + ( + 4, + candidate_hash.clone(), + DisputeState { + validators_for: bitvec![u8, BitOrderLsb0; 0, 0, 0, 1, 0, 0, 0], + validators_against: bitvec![u8, BitOrderLsb0; 0, 0, 1, 0, 0, 0, 0], + start: 6, + concluded_at: None, + } + ), ] ); @@ -1100,14 +1261,22 @@ fn test_provide_multi_dispute_success_and_other() { assert!(!Pallet::::concluded_invalid(4, candidate_hash.clone())); assert!(Pallet::::concluded_invalid(5, candidate_hash.clone())); + // Ensure inclusion removes spam slots + assert_eq!(SpamSlots::::get(4), Some(vec![0, 0, 1, 1, 0, 0, 0])); + Pallet::::note_included(4, candidate_hash.clone(), 4); + assert_eq!(SpamSlots::::get(4), Some(vec![0, 0, 0, 0, 0, 0, 0])); + // Ensure the `reward_validator` function was correctly called assert_eq!( REWARD_VALIDATORS.with(|r| r.borrow().clone()), vec![ - (3, vec![ValidatorIndex(0), ValidatorIndex(2), ValidatorIndex(3)]), + (3, vec![ValidatorIndex(0), ValidatorIndex(2)]), + (4, vec![ValidatorIndex(2), ValidatorIndex(3)]), + (3, vec![ValidatorIndex(3)]), (3, vec![ValidatorIndex(5)]), - (5, vec![ValidatorIndex(2), ValidatorIndex(5), ValidatorIndex(6)]), + (5, vec![ValidatorIndex(2), ValidatorIndex(5)]), (3, vec![ValidatorIndex(6)]), + (5, vec![ValidatorIndex(6)]), (5, vec![ValidatorIndex(0), ValidatorIndex(1), ValidatorIndex(4)]), (3, vec![ValidatorIndex(1), ValidatorIndex(4)]), ], @@ -1117,11 +1286,14 @@ fn test_provide_multi_dispute_success_and_other() { assert_eq!( PUNISH_VALIDATORS_AGAINST.with(|r| r.borrow().clone()), vec![ + (3, vec![]), + (4, vec![]), (3, vec![]), (3, vec![]), (5, vec![]), (3, vec![]), (5, vec![]), + (5, vec![]), (3, vec![ValidatorIndex(2), ValidatorIndex(5)]), ], ); @@ -1130,10 +1302,13 @@ fn test_provide_multi_dispute_success_and_other() { assert_eq!( PUNISH_VALIDATORS_FOR.with(|r| r.borrow().clone()), vec![ + (3, vec![]), + (4, vec![]), (3, vec![]), (3, vec![]), (5, vec![]), (3, vec![]), + (5, vec![]), (5, vec![ValidatorIndex(5)]), (3, vec![]), ], @@ -1205,6 +1380,44 @@ fn test_has_supermajority_against() { ); } +#[test] +fn test_decrement_spam() { + let original_spam_slots = vec![0, 1, 2, 3, 4, 5, 6, 7]; + + // Test confirm is no-op + let mut spam_slots = original_spam_slots.clone(); + let dispute_state_confirm = DisputeState { + validators_for: bitvec![u8, BitOrderLsb0; 1, 1, 0, 0, 0, 0, 0, 0], + validators_against: bitvec![u8, BitOrderLsb0; 1, 0, 1, 0, 0, 0, 0, 0], + start: 0, + concluded_at: None, + }; + assert_eq!(DisputeStateFlags::from_state(&dispute_state_confirm), DisputeStateFlags::CONFIRMED); + assert_eq!( + decrement_spam(spam_slots.as_mut(), &dispute_state_confirm), + bitvec![u8, BitOrderLsb0; 1, 1, 1, 0, 0, 0, 0, 0], + ); + assert_eq!(spam_slots, original_spam_slots); + + // Test not confirm is decreasing spam + let mut spam_slots = original_spam_slots.clone(); + let dispute_state_no_confirm = DisputeState { + validators_for: bitvec![u8, BitOrderLsb0; 1, 0, 0, 0, 0, 0, 0, 0], + validators_against: bitvec![u8, BitOrderLsb0; 1, 0, 1, 0, 0, 0, 0, 0], + start: 0, + concluded_at: None, + }; + assert_eq!( + DisputeStateFlags::from_state(&dispute_state_no_confirm), + DisputeStateFlags::default() + ); + assert_eq!( + decrement_spam(spam_slots.as_mut(), &dispute_state_no_confirm), + bitvec![u8, BitOrderLsb0; 1, 0, 1, 0, 0, 0, 0, 0], + ); + assert_eq!(spam_slots, vec![0, 1, 1, 3, 4, 5, 6, 7]); +} + #[test] fn test_check_signature() { let validator_id = ::Pair::generate().0; @@ -1699,12 +1912,14 @@ fn apply_filter_all>( sets: I, ) -> Vec { let config = >::config(); + let max_spam_slots = config.dispute_max_spam_slots; let post_conclusion_acceptance_period = config.dispute_post_conclusion_acceptance_period; let mut acc = Vec::::new(); for dispute_statement in sets { if let Some(checked) = as DisputesHandler<::BlockNumber>>::filter_dispute_data( dispute_statement, + max_spam_slots, post_conclusion_acceptance_period, VerifyDisputeSignatures::Yes, ) { @@ -1778,11 +1993,13 @@ fn filter_removes_duplicates_within_set() { ], }; + let max_spam_slots = 10; let post_conclusion_acceptance_period = 10; let statements = as DisputesHandler< ::BlockNumber, >>::filter_dispute_data( statements, + max_spam_slots, post_conclusion_acceptance_period, VerifyDisputeSignatures::Yes, ); @@ -1868,6 +2085,151 @@ fn filter_bad_signatures_correctly_detects_single_sided() { }) } +#[test] +fn filter_correctly_accounts_spam_slots() { + let dispute_max_spam_slots = 2; + + let mock_genesis_config = MockGenesisConfig { + configuration: crate::configuration::GenesisConfig { + config: HostConfiguration { dispute_max_spam_slots, ..Default::default() }, + ..Default::default() + }, + ..Default::default() + }; + + new_test_ext(mock_genesis_config).execute_with(|| { + // We need 7 validators for the byzantine threshold to be 2 + let v0 = ::Pair::generate().0; + let v1 = ::Pair::generate().0; + let v2 = ::Pair::generate().0; + let v3 = ::Pair::generate().0; + let v4 = ::Pair::generate().0; + let v5 = ::Pair::generate().0; + let v6 = ::Pair::generate().0; + + run_to_block(3, |b| { + // a new session at each block + Some(( + true, + b, + vec![ + (&0, v0.public()), + (&1, v1.public()), + (&2, v2.public()), + (&3, v3.public()), + (&4, v4.public()), + (&5, v5.public()), + (&6, v6.public()), + ], + Some(vec![ + (&0, v0.public()), + (&1, v1.public()), + (&2, v2.public()), + (&3, v3.public()), + (&4, v4.public()), + (&5, v5.public()), + (&6, v6.public()), + ]), + )) + }); + + let candidate_hash_a = CandidateHash(sp_core::H256::repeat_byte(1)); + let candidate_hash_b = CandidateHash(sp_core::H256::repeat_byte(2)); + let candidate_hash_c = CandidateHash(sp_core::H256::repeat_byte(3)); + + let payload = |c_hash: &CandidateHash, valid| { + ExplicitDisputeStatement { valid, candidate_hash: c_hash.clone(), session: 1 } + .signing_payload() + }; + + let payload_a = payload(&candidate_hash_a, true); + let payload_b = payload(&candidate_hash_b, true); + let payload_c = payload(&candidate_hash_c, true); + + let payload_a_bad = payload(&candidate_hash_a, false); + let payload_b_bad = payload(&candidate_hash_b, false); + let payload_c_bad = payload(&candidate_hash_c, false); + + let sig_0a = v0.sign(&payload_a); + let sig_0b = v0.sign(&payload_b); + let sig_0c = v0.sign(&payload_c); + + let sig_1b = v1.sign(&payload_b); + + let sig_2a = v2.sign(&payload_a_bad); + let sig_2b = v2.sign(&payload_b_bad); + let sig_2c = v2.sign(&payload_c_bad); + + let statements = vec![ + // validators 0 and 2 get 1 spam slot from this. + DisputeStatementSet { + candidate_hash: candidate_hash_a.clone(), + session: 1, + statements: vec![ + ( + DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), + ValidatorIndex(0), + sig_0a.clone(), + ), + ( + DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), + ValidatorIndex(6), + sig_2a.clone(), + ), + ], + }, + // Validators 0, 2, and 3 get no spam slots for this + DisputeStatementSet { + candidate_hash: candidate_hash_b.clone(), + session: 1, + statements: vec![ + ( + DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), + ValidatorIndex(0), + sig_0b.clone(), + ), + ( + DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), + ValidatorIndex(3), + sig_1b.clone(), + ), + ( + DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), + ValidatorIndex(6), + sig_2b.clone(), + ), + ], + }, + // Validators 0 and 2 get an extra spam slot for this. + DisputeStatementSet { + candidate_hash: candidate_hash_c.clone(), + session: 1, + statements: vec![ + ( + DisputeStatement::Valid(ValidDisputeStatementKind::Explicit), + ValidatorIndex(0), + sig_0c.clone(), + ), + ( + DisputeStatement::Invalid(InvalidDisputeStatementKind::Explicit), + ValidatorIndex(6), + sig_2c.clone(), + ), + ], + }, + ]; + + let old_statements = statements + .clone() + .into_iter() + .map(CheckedDisputeStatementSet::unchecked_from_unchecked) + .collect::>(); + let statements = apply_filter_all::(statements); + + assert_eq!(statements, old_statements); + }) +} + #[test] fn filter_removes_session_out_of_bounds() { new_test_ext(Default::default()).execute_with(|| { diff --git a/runtime/parachains/src/hrmp.rs b/runtime/parachains/src/hrmp.rs index 4476f1f4a4da..53ad6781048f 100644 --- a/runtime/parachains/src/hrmp.rs +++ b/runtime/parachains/src/hrmp.rs @@ -465,7 +465,6 @@ 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, @@ -492,7 +491,6 @@ 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))?; @@ -505,7 +503,6 @@ 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, @@ -524,7 +521,6 @@ 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, @@ -543,7 +539,6 @@ 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)?; @@ -558,7 +553,6 @@ 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)?; @@ -574,7 +568,6 @@ 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, @@ -598,7 +591,6 @@ 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, @@ -759,10 +751,10 @@ impl Pallet { let ingress = ::HrmpIngressChannelsIndex::take(outgoing_para) .into_iter() - .map(|sender| HrmpChannelId { sender, recipient: *outgoing_para }); + .map(|sender| HrmpChannelId { sender, recipient: outgoing_para.clone() }); let egress = ::HrmpEgressChannelsIndex::take(outgoing_para) .into_iter() - .map(|recipient| HrmpChannelId { sender: *outgoing_para, recipient }); + .map(|recipient| HrmpChannelId { sender: outgoing_para.clone(), recipient }); let mut to_close = ingress.chain(egress).collect::>(); to_close.sort(); to_close.dedup(); @@ -1083,7 +1075,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.unwrap_or(Default::default()); + let prev_head = channel.mqc_head.clone().unwrap_or(Default::default()); let new_head = BlakeTwo256::hash_of(&( prev_head, inbound.sent_at, @@ -1157,11 +1149,11 @@ impl Pallet { let channel_id = HrmpChannelId { sender: origin, recipient }; ensure!( ::HrmpOpenChannelRequests::get(&channel_id).is_none(), - Error::::OpenHrmpChannelAlreadyRequested, + Error::::OpenHrmpChannelAlreadyExists, ); ensure!( ::HrmpChannels::get(&channel_id).is_none(), - Error::::OpenHrmpChannelAlreadyExists, + Error::::OpenHrmpChannelAlreadyRequested, ); let egress_cnt = diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index a4ac27c0baa0..32851a54d5b3 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -28,11 +28,7 @@ use crate::{ shared, }; use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec}; -use frame_support::{ - pallet_prelude::*, - traits::{Defensive, EnqueueMessage}, - BoundedSlice, -}; +use frame_support::{pallet_prelude::*, traits::EnqueueMessage, BoundedSlice}; use pallet_message_queue::OnQueueChanged; use parity_scale_codec::{Decode, Encode}; use primitives::v2::{ @@ -42,7 +38,7 @@ use primitives::v2::{ UpwardMessage, ValidatorId, ValidatorIndex, ValidityAttestation, }; use scale_info::TypeInfo; -use sp_runtime::{traits::One, DispatchError, SaturatedConversion}; +use sp_runtime::{traits::One, DispatchError}; use sp_std::{collections::btree_set::BTreeSet, fmt, prelude::*}; pub use pallet::*; @@ -136,7 +132,7 @@ impl CandidatePendingAvailability { /// Get the core index. pub(crate) fn core_occupied(&self) -> CoreIndex { - self.core + self.core.clone() } /// Get the candidate hash. @@ -213,33 +209,6 @@ pub fn minimum_backing_votes(n_validators: usize) -> usize { sp_std::cmp::min(n_validators, 2) } -/// Divides the [`Config::MessageQueue`] into sub queues which are serviced in a round-robin fashion. -/// -/// NOTE Ideally we want the queue pallet to be sub-queue aware since currently we waste PoV by introducing a lot of few-element queues by doing this. -/// -/// Changing this requires a migration of the queue pallet. -#[derive(Encode, Decode, Clone, Copy, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] -pub enum SubQueue { - UMP, - HRMP, - DMP, -} - -/// Over which `queue` and `from` which para-chain a message came in from. -/// -/// Changing this requires a migration of the queue pallet. -#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] -pub struct MessageOrigin { - pub queue: SubQueue, - pub para: ParaId, -} - -impl MessageOrigin { - pub const fn ump(para: ParaId) -> Self { - Self { queue: SubQueue::UMP, para } - } -} - #[frame_support::pallet] pub mod pallet { use super::*; @@ -264,9 +233,7 @@ pub mod pallet { type RewardValidators: RewardValidators; /// The system message queue. - /// - /// The message queue provides general queueing and processing functionality. Currently it replaces the old `UMP`, `HRMP` and `DMP` queue pallets. Since it provides a very generic kind of service; other use-cases can be implemented as well. - type MessageQueue: EnqueueMessage; + type MessageQueue: EnqueueMessage; } #[pallet::event] @@ -381,16 +348,11 @@ enum AcceptanceCheckErr { /// An error returned by [`check_upward_messages`] that indicates a violation of one of acceptance /// criteria rules. -#[cfg_attr(test, derive(PartialEq))] pub enum UmpAcceptanceCheckErr { - /// The maximal number of messages that can be submitted in one batch was exceeded. MoreMessagesThanPermitted { sent: u32, permitted: u32 }, - /// The maximal size of a single message was exceeded. MessageSize { idx: u32, msg_size: u32, max_size: u32 }, - /// The allowed number of messages in the queue was exceeded. - CapacityExceeded { count: u64, limit: u64 }, - /// The allowed combined message size in the queue was exceeded. - TotalSizeExceeded { total_size: u64, limit: u64 }, + CapacityExceeded { count: u32, limit: u32 }, + TotalSizeExceeded { total_size: u32, limit: u32 }, } impl fmt::Debug for UmpAcceptanceCheckErr { @@ -503,7 +465,7 @@ impl Pallet { let mut freed_cores = Vec::with_capacity(expected_bits); for (para_id, pending_availability) in assigned_paras_record .into_iter() - .flatten() + .filter_map(|x| x) .filter_map(|(id, p)| p.map(|p| (id, p))) { if pending_availability.availability_votes.count_ones() >= threshold { @@ -764,7 +726,8 @@ impl Pallet { }; // one more sweep for actually writing to storage. - let core_indices = core_indices_and_backers.iter().map(|&(ref c, _, _)| *c).collect(); + let core_indices = + core_indices_and_backers.iter().map(|&(ref c, _, _)| c.clone()).collect(); for (candidate, (core, backers, group)) in candidates.into_iter().zip(core_indices_and_backers) { @@ -915,56 +878,47 @@ impl Pallet { /// Check that all the upward messages sent by a candidate pass the acceptance criteria. Returns /// false, if any of the messages doesn't pass. - // FAIL-CI: TODO update docs pub(crate) fn check_upward_messages( config: &HostConfiguration, para: ParaId, upward_messages: &[UpwardMessage], ) -> Result<(), UmpAcceptanceCheckErr> { - let additional_msgs = upward_messages.len(); - if additional_msgs > config.max_upward_message_num_per_candidate as usize { + if upward_messages.len() as u32 > config.max_upward_message_num_per_candidate { return Err(UmpAcceptanceCheckErr::MoreMessagesThanPermitted { - sent: additional_msgs as u32, + sent: upward_messages.len() as u32, permitted: config.max_upward_message_num_per_candidate, }) } - let fp = T::MessageQueue::footprint(MessageOrigin::ump(para)); - let (para_queue_count, mut para_queue_size) = (fp.count, fp.size); - - if para_queue_count - .checked_add(additional_msgs as u64) - .map(|want| want > config.max_upward_queue_count as u64) - .unwrap_or(true) - { - return Err(UmpAcceptanceCheckErr::CapacityExceeded { - count: para_queue_count.saturating_add(additional_msgs as u64), - limit: config.max_upward_queue_count as u64, - }) - } + let fp = T::MessageQueue::footprint(para); + let (mut para_queue_count, mut para_queue_size) = (fp.count, fp.size); for (idx, msg) in upward_messages.into_iter().enumerate() { - let msg_size = msg.len(); - if msg_size > config.max_upward_message_size as usize { + let msg_size = msg.len() as u32; + if msg_size > config.max_upward_message_size { return Err(UmpAcceptanceCheckErr::MessageSize { idx: idx as u32, - msg_size: msg_size as u32, + msg_size, max_size: config.max_upward_message_size, }) } - // make sure that the queue is not overfilled. - // we do it here only once since returning false invalidates the whole relay-chain block. - if para_queue_size - .checked_add(msg_size as u64) - .map(|want| want > config.max_upward_queue_size as u64) - .unwrap_or(true) - { - return Err(UmpAcceptanceCheckErr::TotalSizeExceeded { - total_size: para_queue_size.saturating_add(msg_size as u64), - limit: config.max_upward_queue_size as u64, - }) - } - para_queue_size += msg_size as u64; + para_queue_count += 1; + para_queue_size += msg_size; + } + + // make sure that the queue is not overfilled. + // we do it here only once since returning false invalidates the whole relay-chain block. + if para_queue_count > config.max_upward_queue_count { + return Err(UmpAcceptanceCheckErr::CapacityExceeded { + count: para_queue_count, + limit: config.max_upward_queue_count, + }) + } + if para_queue_size > config.max_upward_queue_size { + return Err(UmpAcceptanceCheckErr::TotalSizeExceeded { + total_size: para_queue_size, + limit: config.max_upward_queue_size, + }) } Ok(()) @@ -976,15 +930,16 @@ impl Pallet { para: ParaId, upward_messages: Vec, ) -> Weight { - if upward_messages.is_empty() { - return Weight::zero() + if !upward_messages.is_empty() { + let count = upward_messages.len() as u32; + Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); + let messages = + upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); + T::MessageQueue::enqueue_messages(messages, para); + ::WeightInfo::receive_upward_messages(count) + } else { + Weight::zero() } - - let count = upward_messages.len() as u32; - Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); - let messages = upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); - T::MessageQueue::enqueue_messages(messages, MessageOrigin::ump(para)); - ::WeightInfo::receive_upward_messages(count) } /// Cleans up all paras pending availability that the predicate returns true for. @@ -1117,24 +1072,18 @@ impl AcceptanceCheckErr { } } -impl OnQueueChanged for Pallet { - fn on_queue_changed(queue: MessageOrigin, count: u64, size: u64) { - match queue { - MessageOrigin { queue: SubQueue::UMP, para } => { - // TODO maybe migrate this to u64 - let (count, size) = (count.saturated_into(), size.saturated_into()); - // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` - #[allow(deprecated)] - well_known_keys::relay_dispatch_queue_size_typed(para).set((count, size)); - - let config = >::config(); - let remaining_count = config.max_upward_queue_count.saturating_sub(count); - let remaining_size = config.max_upward_queue_size.saturating_sub(size); - well_known_keys::relay_dispatch_queue_remaining_capacity(para) - .set((remaining_count, remaining_size)); - }, - _ => todo!(), - } +impl OnQueueChanged for Pallet { + fn on_queue_changed(para: ParaId, count: u32, size: u32) { + // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` + #[allow(deprecated)] + let key = well_known_keys::relay_dispatch_queue_size(para); + (count, size).using_encoded(|d| sp_io::storage::set(&key, d)); + + let config = >::config(); + let key = well_known_keys::relay_dispatch_queue_remaining_capacity(para); + let remaining_count = config.max_upward_queue_count.saturating_sub(count); + let remaining_size = config.max_upward_queue_size.saturating_sub(size); + (remaining_count, remaining_size).using_encoded(|d| sp_io::storage::set(&key, d)); } } @@ -1173,13 +1122,12 @@ impl CandidateCheckContext { let relay_parent_number = now - One::one(); { + // this should never fail because the para is registered let persisted_validation_data = match crate::util::make_persisted_validation_data::( para_id, relay_parent_number, parent_storage_root, - ) - .defensive_proof("the para is registered") - { + ) { Some(l) => l, None => return Ok(Err(FailedToCreatePVD)), }; diff --git a/runtime/parachains/src/initializer.rs b/runtime/parachains/src/initializer.rs index 52d5fdbb27e7..f6539a8500b0 100644 --- a/runtime/parachains/src/initializer.rs +++ b/runtime/parachains/src/initializer.rs @@ -207,7 +207,6 @@ 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, @@ -245,7 +244,7 @@ impl Pallet { let validators = shared::Pallet::::initializer_on_new_session( session_index, - random_seed, + random_seed.clone(), &new_config, all_validators, ); diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 05712c900419..888690278491 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -17,9 +17,8 @@ //! Mocks for all the traits. use crate::{ - configuration, disputes, dmp, hrmp, - inclusion::{self, MessageOrigin, SubQueue}, - initializer, origin, paras, paras_inherent, scheduler, session_info, shared, ParaId, + configuration, disputes, dmp, hrmp, inclusion, initializer, origin, paras, paras_inherent, + scheduler, session_info, shared, ParaId, }; use frame_support::{ @@ -280,47 +279,42 @@ impl crate::disputes::SlashingHandler for Test { impl crate::scheduler::Config for Test {} -pub struct TestMessageQueueWeight; -impl pallet_message_queue::WeightInfo for TestMessageQueueWeight { - fn ready_ring_knit() -> Weight { - Weight::zero() - } - fn ready_ring_unknit() -> Weight { +pub struct TestWeightInfo; +impl pallet_message_queue::WeightInfo for TestWeightInfo { + fn service_page_base() -> Weight { Weight::zero() } fn service_queue_base() -> Weight { Weight::zero() } - fn service_page_base_completion() -> Weight { + fn service_page_process_message() -> Weight { Weight::zero() } - fn service_page_base_no_completion() -> Weight { + fn bump_service_head() -> Weight { Weight::zero() } fn service_page_item() -> Weight { Weight::zero() } - fn bump_service_head() -> Weight { + fn ready_ring_unknit() -> Weight { Weight::zero() } fn reap_page() -> Weight { Weight::zero() } - fn execute_overweight_page_removed() -> Weight { + fn execute_overweight() -> Weight { Weight::zero() } - fn execute_overweight_page_updated() -> Weight { + fn process_message_payload(_: u32) -> Weight { Weight::zero() } } -pub type MessageQueueSize = u32; - impl pallet_message_queue::Config for Test { type RuntimeEvent = RuntimeEvent; - type WeightInfo = TestMessageQueueWeight; + type WeightInfo = TestWeightInfo; type MessageProcessor = TestProcessMessage; - type Size = MessageQueueSize; + type Size = u32; type QueueChangeHandler = ParaInclusion; type HeapSize = ConstU32<65536>; type MaxStale = ConstU32<8>; @@ -409,8 +403,13 @@ pub fn availability_rewards() -> HashMap { AVAILABILITY_REWARDS.with(|r| r.borrow().clone()) } -parameter_types! { - pub static Processed: Vec<(ParaId, UpwardMessage)> = vec![]; +std::thread_local! { + static PROCESSED: RefCell> = RefCell::new(vec![]); +} + +/// Return which messages have been processed by `process_upward_message` and clear the buffer. +pub fn take_processed() -> Vec<(ParaId, UpwardMessage)> { + PROCESSED.with(|opt_hook| std::mem::take(&mut *opt_hook.borrow_mut())) } /// An implementation of a UMP sink that just records which messages were processed. @@ -419,24 +418,23 @@ parameter_types! { /// `u32`. pub struct TestProcessMessage; impl ProcessMessage for TestProcessMessage { - type Origin = MessageOrigin; + type Origin = ParaId; fn process_message( message: &[u8], - origin: MessageOrigin, + origin: ParaId, weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { let weight = match u32::decode(&mut &message[..]) { Ok(w) => Weight::from_parts(w as u64, w as u64), Err(_) => return Err(ProcessMessageError::Corrupt), // same as the real `ProcessMessage` }; - debug_assert!(origin.queue == SubQueue::UMP); if weight.any_gt(weight_limit) { return Err(ProcessMessageError::Overweight(weight)) } - let mut processed = Processed::get(); - processed.push((origin.para, message.to_vec())); - Processed::set(processed); + PROCESSED.with(|opt_hook| { + opt_hook.borrow_mut().push((origin, message.to_owned())); + }); Ok((true, weight)) } } diff --git a/runtime/parachains/src/paras/mod.rs b/runtime/parachains/src/paras/mod.rs index 0fca9a004099..3c5744b96546 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 approval checkers. + /// to keep it available for secondary checkers. #[pallet::storage] #[pallet::getter(fn past_code_meta)] pub(super) type PastCodeMeta = @@ -788,7 +788,6 @@ 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, @@ -816,7 +815,6 @@ 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, @@ -829,7 +827,6 @@ 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, @@ -845,7 +842,6 @@ 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, @@ -862,7 +858,6 @@ 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)?; @@ -889,7 +884,6 @@ 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, @@ -938,7 +932,6 @@ 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, @@ -953,7 +946,6 @@ 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 0f1c3c405829..0bcfedfdca08 100644 --- a/runtime/parachains/src/paras_inherent/mod.rs +++ b/runtime/parachains/src/paras_inherent/mod.rs @@ -277,7 +277,6 @@ 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(), @@ -349,6 +348,7 @@ impl Pallet { let (checked_disputes, total_consumed_weight) = { // Obtain config params.. let config = >::config(); + let max_spam_slots = config.dispute_max_spam_slots; let post_conclusion_acceptance_period = config.dispute_post_conclusion_acceptance_period; @@ -362,6 +362,7 @@ impl Pallet { let dispute_set_validity_check = move |set| { T::DisputesHandler::filter_dispute_data( set, + max_spam_slots, post_conclusion_acceptance_period, verify_dispute_sigs, ) @@ -512,7 +513,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(); + let parent_storage_root = parent_header.state_root().clone(); let inclusion::ProcessedCandidates::<::Hash> { core_indices: occupied, candidate_receipt_with_backing_validator_indices, @@ -589,6 +590,7 @@ impl Pallet { } let config = >::config(); + let max_spam_slots = config.dispute_max_spam_slots; let post_conclusion_acceptance_period = config.dispute_post_conclusion_acceptance_period; // TODO: Better if we can convert this to `with_transactional` and handle an error if @@ -602,6 +604,7 @@ impl Pallet { let dispute_statement_set_valid = move |set: DisputeStatementSet| { T::DisputesHandler::filter_dispute_data( set, + max_spam_slots, post_conclusion_acceptance_period, // `DisputeCoordinator` on the node side only forwards // valid dispute statement sets and hence this does not @@ -704,7 +707,7 @@ impl Pallet { let scheduled = >::scheduled(); let relay_parent_number = now - One::one(); - let parent_storage_root = *parent_header.state_root(); + let parent_storage_root = parent_header.state_root().clone(); let check_ctx = CandidateCheckContext::::new(now, relay_parent_number); let backed_candidates = sanitize_backed_candidates::( @@ -1194,7 +1197,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; + let mut entropy: [u8; 32] = CANDIDATE_SEED_SUBJECT.clone(); 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 f79ede5e05c9..fa877468ab75 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(); + let backed_in_number = pending_availability.backed_in_number().clone(); 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(); + let backed_in_number = pending_availability.backed_in_number().clone(); 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 6eb1b732705f..0185817b2aa1 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: core.clone(), 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: core.clone(), 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,9 +610,11 @@ impl Pallet { (at - session_start_block) / config.group_rotation_frequency.into(); let rotations_since_session_start = - >::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. + 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. + }; let group_idx = (core.0 as usize + rotations_since_session_start as usize) % validator_groups.len(); diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 23ace7df5348..08828f21ed14 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -14,12 +14,9 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use crate::{ - inclusion::{MessageOrigin, UmpAcceptanceCheckErr}, - mock::{ - assert_last_event, assert_last_events, new_test_ext, Configuration, MessageQueue, - MessageQueueSize, MockGenesisConfig, ParaInclusion, Processed, System, Test, - }, +use crate::mock::{ + assert_last_event, assert_last_events, new_test_ext, take_processed, Configuration, + MessageQueue, MockGenesisConfig, ParaInclusion, System, Test, }; use frame_support::{ assert_noop, assert_ok, @@ -27,7 +24,7 @@ use frame_support::{ traits::{ExecuteOverweightError, ServiceQueues}, weights::Weight, }; -use primitives::v2::{well_known_keys, Id as ParaId, UpwardMessage}; +use primitives::v2::{Id as ParaId, UpwardMessage}; use sp_runtime::traits::{Bounded, Hash}; use sp_std::prelude::*; @@ -50,10 +47,6 @@ impl Default for GenesisConfigBuilder { } impl GenesisConfigBuilder { - pub(super) fn large_queue_count() -> Self { - Self { max_upward_queue_count: 128, ..Default::default() } - } - pub(super) fn build(self) -> crate::mock::MockGenesisConfig { let mut genesis = default_genesis_config(); let config = &mut genesis.configuration.config; @@ -78,149 +71,12 @@ fn default_genesis_config() -> MockGenesisConfig { } } -// FAIL-CI: TODO add tests fn queue_upward_msg(para: ParaId, msg: UpwardMessage) { let msgs = vec![msg]; assert!(ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs).is_ok()); let _ = ParaInclusion::receive_upward_messages(&Configuration::config(), para, msgs); } -mod check_upward_messages { - use super::*; - - const P_0: ParaId = ParaId::new(0u32); - const P_1: ParaId = ParaId::new(1u32); - - // Currently its trivial since unbounded, but this function will be handy when we bound it. - fn msg(data: &str) -> UpwardMessage { - data.as_bytes().to_vec() - } - - // helper - fn check(para: ParaId, msgs: Vec, err: Option) { - assert_eq!( - ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs[..]).err(), - err - ); - } - - fn queue(para: ParaId, msgs: Vec) { - let _ = ParaInclusion::receive_upward_messages(&Configuration::config(), para, msgs); - } - - #[test] - fn basic_works() { - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - let _g = frame_support::StorageNoopGuard::default(); - check(P_0, vec![msg("p0m0")], None); - check(P_1, vec![msg("p1m0")], None); - check(P_0, vec![msg("p0m1")], None); - check(P_1, vec![msg("p1m1")], None); - }); - } - - #[test] - fn num_per_candidate_exceeded_error() { - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - let _g = frame_support::StorageNoopGuard::default(); - let permitted = Configuration::config().max_upward_message_num_per_candidate; - - for sent in 0..permitted + 1 { - check(P_0, vec![msg(""); sent as usize], None); - } - for sent in permitted + 1..permitted + 10 { - check( - P_0, - vec![msg(""); sent as usize], - Some(UmpAcceptanceCheckErr::MoreMessagesThanPermitted { sent, permitted }), - ); - } - }); - } - - #[test] - fn size_per_message_exceeded_error() { - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - let _g = frame_support::StorageNoopGuard::default(); - let max_size = Configuration::config().max_upward_message_size; - - for msg_size in 0..max_size + 1 { - check(P_0, vec![vec![0; msg_size as usize]], None); - } - // FAIL-CI: TODO test when the msg is not first - for msg_size in max_size + 1..max_size + 10 { - check( - P_0, - vec![vec![0; msg_size as usize]], - Some(UmpAcceptanceCheckErr::MessageSize { idx: 0, msg_size, max_size }), - ); - } - }); - } - - #[test] - fn queue_count_exceeded_error() { - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - let limit = Configuration::config().max_upward_queue_count as u64; - - for _ in 0..limit { - check(P_0, vec![msg("")], None); - queue(P_0, vec![msg("")]); - } - - check( - P_0, - vec![msg("")], - Some(UmpAcceptanceCheckErr::CapacityExceeded { count: limit + 1, limit }), - ); - check( - P_0, - vec![msg(""); 2], - Some(UmpAcceptanceCheckErr::CapacityExceeded { count: limit + 2, limit }), - ); - }); - } - - #[test] - fn queue_size_exceeded_error() { - new_test_ext(GenesisConfigBuilder::large_queue_count().build()).execute_with(|| { - let limit = Configuration::config().max_upward_queue_size as u64; - assert_eq!(pallet_message_queue::ItemHeader::::max_encoded_len(), 5); - - // FAIL-CI: TODO why is the item header overhead not taken into account? - for _ in 0..limit { - check(P_0, vec![msg("1")], None); - queue(P_0, vec![msg("1")]); - } - - check( - P_0, - vec![msg("1")], - Some(UmpAcceptanceCheckErr::TotalSizeExceeded { total_size: limit + 1, limit }), - ); - check( - P_0, - vec![msg("123456")], - Some(UmpAcceptanceCheckErr::TotalSizeExceeded { total_size: limit + 6, limit }), - ); - }); - } - - proptest::proptest! { - #[test] - fn check_and_receive_do_not_panic(enqueued: Vec, candidate: Vec) { - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - let cfg = Configuration::config(); - - let _ = ParaInclusion::check_upward_messages(&cfg, P_0, &enqueued); - ParaInclusion::receive_upward_messages(&cfg, P_0, enqueued); - let _ = ParaInclusion::check_upward_messages(&cfg, P_0, &candidate); - ParaInclusion::receive_upward_messages(&cfg, P_0, candidate); - }); - } - } -} - #[test] fn dispatch_empty() { new_test_ext(default_genesis_config()).execute_with(|| { @@ -237,7 +93,7 @@ fn dispatch_single_message() { new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { queue_upward_msg(a, msg.clone()); MessageQueue::service_queues(Weight::max_value()); - assert_eq!(Processed::take(), vec![(a, msg)]); + assert_eq!(take_processed(), vec![(a, msg)]); }); } @@ -261,17 +117,17 @@ fn dispatch_resume_after_exceeding_dispatch_stage_weight() { // we expect only two first messages to fit in the first iteration. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(Processed::take(), vec![(q, q_msg)]); + assert_eq!(take_processed(), vec![(q, q_msg)]); queue_upward_msg(c, c_msg_2.clone()); // second iteration should process the second message. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(Processed::take(), vec![(c, c_msg_1), (c, c_msg_2)]); + assert_eq!(take_processed(), vec![(c, c_msg_1), (c, c_msg_2)]); // 3rd iteration. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(Processed::take(), vec![(a, a_msg_1), (a, a_msg_2)]); + assert_eq!(take_processed(), vec![(a, a_msg_1), (a, a_msg_2)]); // finally, make sure that the queue is empty. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(Processed::take(), vec![]); + assert_eq!(take_processed(), vec![]); }); } @@ -288,13 +144,13 @@ fn dispatch_keeps_message_after_weight_exhausted() { // we expect only one message to fit in the first iteration. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(Processed::take(), vec![(a, a_msg_1)]); + assert_eq!(take_processed(), vec![(a, a_msg_1)]); // second iteration should process the remaining message. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(Processed::take(), vec![(a, a_msg_2)]); + assert_eq!(take_processed(), vec![(a, a_msg_2)]); // finally, make sure that the queue is empty. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(Processed::take(), vec![]); + assert_eq!(take_processed(), vec![]); }); } @@ -318,7 +174,7 @@ fn dispatch_correctly_handle_remove_of_latest() { queue_upward_msg(a, a_msg_2.clone()); queue_upward_msg(b, b_msg_1.clone()); MessageQueue::service_queues(Weight::from_parts(900, 900)); - assert_eq!(Processed::take(), vec![(a, a_msg_1), (a, a_msg_2), (b, b_msg_1)]); + assert_eq!(take_processed(), vec![(a, a_msg_1), (a, a_msg_2), (b, b_msg_1)]); }); } @@ -326,56 +182,27 @@ fn dispatch_correctly_handle_remove_of_latest() { fn verify_relay_dispatch_queue_size_is_externally_accessible() { // Make sure that the relay dispatch queue size storage entry is accessible via well known // keys and is decodable into a (u32, u32). + + use parity_scale_codec::Decode as _; + use primitives::v2::well_known_keys; + + let a = ParaId::from(228); + let msg = vec![1, 2, 3]; + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - let cfg = Configuration::config(); - - for para in 0..10 { - let para = para.into(); - queue_upward_msg(para, vec![0u8; 3]); - assert_queue_size(para, 1, 3); - assert_queue_remaining( - para, - cfg.max_upward_queue_count - 1, - cfg.max_upward_queue_size - 3, - ); - - queue_upward_msg(para, vec![0u8; 3]); - assert_queue_size(para, 2, 6); - assert_queue_remaining( - para, - cfg.max_upward_queue_count - 2, - cfg.max_upward_queue_size - 6, - ); - } - }); -} + queue_upward_msg(a, msg); -fn assert_queue_size(para: ParaId, count: u32, size: u32) { - #[allow(deprecated)] - let raw_queue_size = sp_io::storage::get(&well_known_keys::relay_dispatch_queue_size(para)).expect( - "enqueing a message should create the dispatch queue\ - and it should be accessible via the well known keys", - ); - let (c, s) = <(u32, u32)>::decode(&mut &raw_queue_size[..]) - .expect("the dispatch queue size should be decodable into (u32, u32)"); - assert_eq!((c, s), (count, size)); - - // Test the deprecated but at least type-safe `relay_dispatch_queue_size_typed`: - #[allow(deprecated)] - let (c, s) = well_known_keys::relay_dispatch_queue_size_typed(para).get().expect( - "enqueing a message should create the dispatch queue\ + #[allow(deprecated)] + let raw_queue_size = sp_io::storage::get(&well_known_keys::relay_dispatch_queue_size(a)).expect( + "enqueing a message should create the dispatch queue\ and it should be accessible via the well known keys", - ); - assert_eq!((c, s), (count, size)); -} + ); + let (cnt, size) = <(u32, u32)>::decode(&mut &raw_queue_size[..]) + .expect("the dispatch queue size should be decodable into (u32, u32)"); -fn assert_queue_remaining(para: ParaId, count: u32, size: u32) { - let (remaining_cnt, remaining_size) = - well_known_keys::relay_dispatch_queue_remaining_capacity(para) - .get() - .expect("No storage value"); - assert_eq!(count, remaining_cnt); - assert_eq!(size, remaining_size); + assert_eq!(cnt, 1); + assert_eq!(size, 3); + }); } #[test] @@ -385,8 +212,8 @@ fn service_overweight_unknown() { new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { assert_noop!( ::execute_overweight( - Weight::MAX, - (MessageOrigin::ump(0u32.into()), 0, 0) + Weight::from_ref_time(1000), + (0u32.into(), 0, 0) ), ExecuteOverweightError::NotFound, ); @@ -420,21 +247,21 @@ fn overweight_queue_works() { [ pallet_message_queue::Event::::Processed { hash: hash_1.clone(), - origin: MessageOrigin::ump(para_a), + origin: para_a, weight_used: Weight::from_parts(301, 301), success: true, } .into(), pallet_message_queue::Event::::OverweightEnqueued { hash: hash_2.clone(), - origin: MessageOrigin::ump(para_a), + origin: para_a, page_index: 0, message_index: 1, } .into(), pallet_message_queue::Event::::OverweightEnqueued { hash: hash_3.clone(), - origin: MessageOrigin::ump(para_a), + origin: para_a, page_index: 0, message_index: 2, } @@ -442,14 +269,14 @@ fn overweight_queue_works() { ] .into_iter(), ); - assert_eq!(Processed::take(), vec![(para_a, a_msg_1)]); + assert_eq!(take_processed(), vec![(para_a, a_msg_1)]); // Now verify that if we wanted to service this overweight message with less than enough // weight it will fail. assert_noop!( ::execute_overweight( Weight::from_parts(500, 500), - (MessageOrigin::ump(para_a), 0, 2) + (para_a, 0, 2) ), ExecuteOverweightError::InsufficientWeight, ); @@ -457,12 +284,12 @@ fn overweight_queue_works() { // ... and if we try to service it with just enough weight it will succeed as well. assert_ok!(::execute_overweight( Weight::from_parts(501, 501), - (MessageOrigin::ump(para_a), 0, 2) + (para_a, 0, 2) )); assert_last_event( pallet_message_queue::Event::::Processed { hash: hash_3, - origin: MessageOrigin::ump(para_a), + origin: para_a, weight_used: Weight::from_parts(501, 501), success: true, } @@ -474,7 +301,7 @@ fn overweight_queue_works() { assert_noop!( ::execute_overweight( Weight::from_parts(501, 501), - (MessageOrigin::ump(para_a), 0, 2) + (para_a, 0, 2) ), ExecuteOverweightError::NotFound, ); diff --git a/runtime/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index 07b821edc9df..9809fb8ff843 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"] } @@ -11,14 +11,14 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.139", default-features = false } +serde = { version = "1.0.137", default-features = false } serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" 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, package = "sp-beefy" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } 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 } @@ -54,7 +54,6 @@ pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "m 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-message-queue = { 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-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -101,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", package = "frame-remote-externalities" } -tokio = { version = "1.24.1", features = ["macros"] } +remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" } +tokio = { version = "1.19.2", features = ["macros"] } sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [build-dependencies] @@ -147,7 +146,6 @@ std = [ "pallet-im-online/std", "pallet-indices/std", "pallet-membership/std", - "pallet-message-queue/std", "pallet-multisig/std", "pallet-nomination-pools/std", "pallet-nomination-pools-runtime-api/std", @@ -204,7 +202,6 @@ runtime-benchmarks = [ "pallet-im-online/runtime-benchmarks", "pallet-indices/runtime-benchmarks", "pallet-membership/runtime-benchmarks", - "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-nomination-pools/runtime-benchmarks", "pallet-nomination-pools-benchmarking/runtime-benchmarks", @@ -250,7 +247,6 @@ try-runtime = [ "pallet-im-online/try-runtime", "pallet-indices/try-runtime", "pallet-membership/try-runtime", - "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-nomination-pools/try-runtime", "pallet-offences/try-runtime", diff --git a/runtime/polkadot/constants/Cargo.toml b/runtime/polkadot/constants/Cargo.toml index ad8159e7463d..953ff98c2d5b 100644 --- a/runtime/polkadot/constants/Cargo.toml +++ b/runtime/polkadot/constants/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-runtime-constants" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] smallvec = "1.8.0" @@ -10,17 +10,10 @@ 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", 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" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [features] default = ["std"] std = [ - "frame-support/std", - "primitives/std", - "runtime-common/std", - "sp-core/std", - "sp-runtime/std", - "sp-weights/std" + "sp-runtime/std" ] diff --git a/runtime/polkadot/constants/src/weights/block_weights.rs b/runtime/polkadot/constants/src/weights/block_weights.rs index b9f99d689a65..211cd595acba 100644 --- a/runtime/polkadot/constants/src/weights/block_weights.rs +++ b/runtime/polkadot/constants/src/weights/block_weights.rs @@ -1,26 +1,28 @@ -// Copyright 2017-2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Substrate. -// 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. +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 -// 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. +// 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. -// 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-11-16 (Y/M/D) -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-08-19 (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/polkadot/constants/src/weights/` -//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -32,32 +34,32 @@ // --weight-path=runtime/polkadot/constants/src/weights/ // --warmup=10 // --repeat=100 -// --header=./file_header.txt -use sp_core::parameter_types; -use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; +use frame_support::{ + parameter_types, + weights::{constants::WEIGHT_PER_NANOS, Weight}, +}; parameter_types! { /// Time to execute an empty block. - /// Calculated by multiplying the *Average* with `1.0` and adding `0`. + /// Calculated by multiplying the *Average* with `1` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 6_019_119, 6_263_448 - /// Average: 6_103_588 - /// Median: 6_099_366 - /// Std-Dev: 50562.05 + /// Min, Max: 5_736_651, 6_591_625 + /// Average: 5_849_907 + /// Median: 5_847_129 + /// Std-Dev: 109200.59 /// /// Percentiles nanoseconds: - /// 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)); + /// 99th: 6_131_246 + /// 95th: 5_988_921 + /// 75th: 5_885_724 + pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(5_849_907); } #[cfg(test)] mod test_weights { - use sp_weights::constants; + use frame_support::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, @@ -68,12 +70,12 @@ mod test_weights { // At least 100 µs. assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + w.ref_time() >= 100u64 * constants::WEIGHT_PER_MICROS.ref_time(), "Weight should be at least 100 µs." ); // At most 50 ms. assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, + w.ref_time() <= 50u64 * constants::WEIGHT_PER_MILLIS.ref_time(), "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 e56fc9108452..79f1e550d33f 100644 --- a/runtime/polkadot/constants/src/weights/extrinsic_weights.rs +++ b/runtime/polkadot/constants/src/weights/extrinsic_weights.rs @@ -1,26 +1,27 @@ -// Copyright 2017-2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Substrate. -// 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. +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 -// 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. +// 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. -// 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-11-16 (Y/M/D) -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-04-20 (Y/M/D) //! //! 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.0`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -32,32 +33,32 @@ // --weight-path=runtime/polkadot/constants/src/weights/ // --warmup=10 // --repeat=100 -// --header=./file_header.txt -use sp_core::parameter_types; -use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; +use frame_support::{ + parameter_types, + weights::{constants::WEIGHT_PER_NANOS, Weight}, +}; parameter_types! { /// Time to execute a NO-OP extrinsic, for example `System::remark`. - /// Calculated by multiplying the *Average* with `1.0` and adding `0`. + /// Calculated by multiplying the *Average* with `1` and adding `0`. /// - /// Stats nanoseconds: - /// Min, Max: 94_862, 96_847 - /// Average: 95_479 - /// Median: 95_465 - /// Std-Dev: 347.27 + /// Stats [NS]: + /// Min, Max: 84_940, 86_590 + /// Average: 85_212 + /// Median: 85_156 + /// Std-Dev: 243.25 /// - /// 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)); + /// Percentiles [NS]: + /// 99th: 86_269 + /// 95th: 85_510 + /// 75th: 85_216 + pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(85_212); } #[cfg(test)] mod test_weights { - use sp_weights::constants; + use frame_support::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, @@ -68,12 +69,12 @@ mod test_weights { // At least 10 µs. assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + w.ref_time() >= 10u64 * constants::WEIGHT_PER_MICROS.ref_time(), "Weight should be at least 10 µs." ); // At most 1 ms. assert!( - w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + w.ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "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 95c91e5182bd..9695b7bc7800 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_REF_TIME_PER_NANOS, + read: 11_826 * constants::WEIGHT_PER_NANOS.ref_time(), /// 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_REF_TIME_PER_NANOS, + write: 38_052 * constants::WEIGHT_PER_NANOS.ref_time(), }; } @@ -88,20 +88,20 @@ pub mod constants { fn bound() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "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 cfc480ce9461..1ed70431b9e3 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_REF_TIME_PER_NANOS, + read: 20_499 * constants::WEIGHT_PER_NANOS.ref_time(), /// 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_REF_TIME_PER_NANOS, + write: 83_471 * constants::WEIGHT_PER_NANOS.ref_time(), }; } @@ -87,20 +87,20 @@ pub mod constants { fn bound() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Write weight should be at most 1 ms." ); } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index a904759ad3be..25b142a13be1 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -32,7 +32,7 @@ use runtime_parachains::{ initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::v2 as parachains_runtime_api_impl, scheduler as parachains_scheduler, - session_info as parachains_session_info, shared as parachains_shared, + session_info as parachains_session_info, shared as parachains_shared, ump as parachains_ump, }; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; @@ -44,7 +44,7 @@ use frame_support::{ ConstU32, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, PrivilegeCmp, WithdrawReasons, }, - weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier}, + weights::ConstantMultiplier, PalletId, RuntimeDebug, }; use frame_system::EnsureRoot; @@ -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: 9330, + spec_version: 9310, 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: 17, + transaction_version: 16, state_version: 0, }; @@ -553,7 +553,7 @@ parameter_types! { pub const MaxNominations: u32 = ::LIMIT as u32; } -type StakingAdminOrigin = EitherOfDiverse< +type SlashCancelOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; @@ -578,6 +578,7 @@ 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), @@ -599,7 +600,8 @@ impl pallet_staking::Config for Runtime { type SessionsPerEra = SessionsPerEra; type BondingDuration = BondingDuration; type SlashDeferDuration = SlashDeferDuration; - type AdminOrigin = StakingAdminOrigin; + // A super-majority of the council can cancel the slash. + type SlashCancelOrigin = SlashCancelOrigin; type SessionInterface = Self; type EraPayout = EraPayout; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; @@ -1280,8 +1282,6 @@ impl parachains_inclusion::Config for Runtime { type RuntimeEvent = RuntimeEvent; type DisputesHandler = ParasDisputes; type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; - type MessageQueue = MessageQueue; - type WeightInfo = (); // FAIL-CI: TODO } parameter_types! { @@ -1295,44 +1295,17 @@ impl parachains_paras::Config for Runtime { type NextSessionRotation = Babe; } -// TODO does this make the slightest amount of sense? -pub struct ParaIdToJunction; -impl sp_runtime::traits::Convert - for ParaIdToJunction -{ - fn convert(o: parachains_inclusion::MessageOrigin) -> xcm::latest::Junction { - match o { - parachains_inclusion::MessageOrigin { - para, - queue: parachains_inclusion::SubQueue::UMP, - } => xcm::latest::Junction::Parachain(para.into()), - // FAIL-CI: Should be similar for the other *MP queues but check this as a TODO - _ => todo!(), - } - } -} - parameter_types! { - /// Amount of weigh which can be spent per block to service messages. - /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. - pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); + pub const FirstMessageFactorPercent: u64 = 100; } -impl pallet_message_queue::Config for Runtime { +impl parachains_ump::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type Size = u32; - type HeapSize = ConstU32<65_536>; - type MaxStale = ConstU32<8>; - type ServiceWeight = MessageQueueServiceWeight; - // TODO Is `ParaIdToJunction` correct here? - type MessageProcessor = xcm_builder::ProcessXcmMessage< - parachains_inclusion::MessageOrigin, - xcm_executor::XcmExecutor, - RuntimeCall, - ParaIdToJunction, - >; - type QueueChangeHandler = (); - type WeightInfo = (); // FAIL-CI: TODO + type UmpSink = + crate::parachains_ump::XcmSink, Runtime>; + type FirstMessageFactorPercent = FirstMessageFactorPercent; + type ExecuteOverweightOrigin = EnsureRoot; + type WeightInfo = parachains_ump::TestWeightInfo; } impl parachains_dmp::Config for Runtime {} @@ -1580,11 +1553,10 @@ construct_runtime! { Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, Dmp: parachains_dmp::{Pallet, Call, Storage} = 58, - // Ump 59 + Ump: parachains_ump::{Pallet, Call, Storage, Event} = 59, Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 63, // Parachain Onboarding Pallets. Start indices at 70 to leave room. Registrar: paras_registrar::{Pallet, Call, Storage, Event} = 70, @@ -1627,18 +1599,6 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { } } -/// All migrations that will run on the next runtime upgrade. -/// -/// Should be cleared after every release. -pub type Migrations = ( - pallet_balances::migration::MigrateToTrackInactive, - crowdloan::migration::MigrateToTrackInactive, - pallet_scheduler::migration::v4::CleanupAgendas, - pallet_staking::migrations::v13::MigrateToV13, - parachains_disputes::migration::v1::MigrateToV1, - parachains_configuration::migration::v5::MigrateToV5, -); - /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -1649,7 +1609,17 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, + ( + // "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, + ), >; /// The payload being signed in transactions. @@ -1694,7 +1664,6 @@ mod benches { [pallet_im_online, ImOnline] [pallet_indices, Indices] [pallet_membership, TechnicalMembership] - [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_nomination_pools, NominationPoolsBench::] [pallet_offences, OffencesBench::] @@ -1892,10 +1861,6 @@ 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, @@ -2052,21 +2017,21 @@ sp_api::impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + fn on_runtime_upgrade() -> (Weight, Weight) { log::info!("try-runtime::on_runtime_upgrade polkadot."); - let weight = Executive::try_runtime_upgrade(checks).unwrap(); + let weight = Executive::try_runtime_upgrade().unwrap(); (weight, BlockWeights::get().max_block) } - 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() + 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") } } @@ -2478,6 +2443,6 @@ mod remote_tests { .build() .await .unwrap(); - ext.execute_with(|| Runtime::on_runtime_upgrade(true)); + ext.execute_with(|| Runtime::on_runtime_upgrade()); } } diff --git a/runtime/polkadot/src/weights/frame_benchmarking_baseline.rs b/runtime/polkadot/src/weights/frame_benchmarking_baseline.rs index 3b6794f1f5ac..a7ff4faf911e 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,54 +46,44 @@ pub struct WeightInfo(PhantomData); impl frame_benchmarking::baseline::WeightInfo for WeightInfo { /// The range of component `i` is `[0, 1000000]`. fn addition(_i: u32, ) -> Weight { - // Minimum execution time: 103 nanoseconds. - Weight::from_ref_time(141_724 as u64) + Weight::from_ref_time(120_000 as u64) } /// The range of component `i` is `[0, 1000000]`. fn subtraction(_i: u32, ) -> Weight { - // Minimum execution time: 108 nanoseconds. - Weight::from_ref_time(134_768 as u64) + Weight::from_ref_time(116_000 as u64) } /// The range of component `i` is `[0, 1000000]`. fn multiplication(_i: u32, ) -> Weight { - // Minimum execution time: 102 nanoseconds. - Weight::from_ref_time(138_207 as u64) + Weight::from_ref_time(130_000 as u64) } /// The range of component `i` is `[0, 1000000]`. fn division(_i: u32, ) -> Weight { - // Minimum execution time: 104 nanoseconds. - Weight::from_ref_time(142_094 as u64) + Weight::from_ref_time(127_000 as u64) } /// The range of component `i` is `[0, 100]`. - 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)) + fn hashing(_i: u32, ) -> Weight { + Weight::from_ref_time(19_460_902_000 as u64) } - /// The range of component `i` is `[0, 100]`. + /// The range of component `i` is `[1, 100]`. fn sr25519_verification(i: u32, ) -> Weight { - // 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)) + 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)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[0, 1000]`. fn storage_read(i: u32, ) -> Weight { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 a8c6dfdc26bc..910a2884fcc5 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,22 +48,20 @@ 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 { - // 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)) + 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)) } /// 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 { - // 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)) + 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)) } } diff --git a/runtime/polkadot/src/weights/frame_system.rs b/runtime/polkadot/src/weights/frame_system.rs index 4f4a48a1ac98..9430d6d61902 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,59 +38,51 @@ #![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 { - // 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)) + fn remark(_b: u32, ) -> Weight { + Weight::from_ref_time(0 as u64) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - // Minimum execution time: 12_386 nanoseconds. - Weight::from_ref_time(12_695_000 as u64) + Weight::from_ref_time(0 as u64) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_871 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_ref_time(2_000 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 { - // Minimum execution time: 8_334 nanoseconds. - Weight::from_ref_time(8_584_000 as u64) + Weight::from_ref_time(7_394_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 `[0, 1000]`. + /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { - // 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)) + 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)) .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 `[0, 1000]`. + /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { - // 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)) + 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)) .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 `[0, 1000]`. + /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } } diff --git a/runtime/polkadot/src/weights/mod.rs b/runtime/polkadot/src/weights/mod.rs index 059b5a70b098..cef1ce83bd11 100644 --- a/runtime/polkadot/src/weights/mod.rs +++ b/runtime/polkadot/src/weights/mod.rs @@ -31,7 +31,6 @@ pub mod pallet_identity; pub mod pallet_im_online; pub mod pallet_indices; pub mod pallet_membership; -pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_nomination_pools; pub mod pallet_preimage; diff --git a/runtime/polkadot/src/weights/pallet_bags_list.rs b/runtime/polkadot/src/weights/pallet_bags_list.rs index 05f646ff0d31..b97bf973b60c 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,8 +49,7 @@ 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 { - // Minimum execution time: 64_054 nanoseconds. - Weight::from_ref_time(64_863_000 as u64) + Weight::from_ref_time(61_333_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -59,8 +58,7 @@ 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 { - // Minimum execution time: 68_386 nanoseconds. - Weight::from_ref_time(74_597_000 as u64) + Weight::from_ref_time(59_741_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -70,8 +68,7 @@ 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 { - // Minimum execution time: 71_132 nanoseconds. - Weight::from_ref_time(79_636_000 as u64) + Weight::from_ref_time(59_689_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 4c6a894714f6..45878e2701e5 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,50 +46,43 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - // Minimum execution time: 41_279 nanoseconds. - Weight::from_ref_time(41_738_000 as u64) + Weight::from_ref_time(39_352_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 { - // Minimum execution time: 30_237 nanoseconds. - Weight::from_ref_time(30_631_000 as u64) + Weight::from_ref_time(29_209_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 { - // Minimum execution time: 22_939 nanoseconds. - Weight::from_ref_time(23_320_000 as u64) + Weight::from_ref_time(21_928_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 { - // Minimum execution time: 25_940 nanoseconds. - Weight::from_ref_time(26_584_000 as u64) + Weight::from_ref_time(24_992_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 { - // Minimum execution time: 40_393 nanoseconds. - Weight::from_ref_time(40_921_000 as u64) + Weight::from_ref_time(39_081_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 { - // Minimum execution time: 35_485 nanoseconds. - Weight::from_ref_time(36_121_000 as u64) + Weight::from_ref_time(33_031_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 { - // Minimum execution time: 19_966 nanoseconds. - Weight::from_ref_time(20_434_000 as u64) + Weight::from_ref_time(18_389_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 8f6404894cee..a36e24bde2c6 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,49 +50,43 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 12_073 nanoseconds. - Weight::from_ref_time(12_863_000 as u64) + Weight::from_ref_time(11_513_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 { - // Minimum execution time: 11_317 nanoseconds. - Weight::from_ref_time(11_559_000 as u64) + Weight::from_ref_time(10_931_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 { - // Minimum execution time: 40_364 nanoseconds. - Weight::from_ref_time(40_970_000 as u64) + Weight::from_ref_time(39_279_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 { - // Minimum execution time: 28_522 nanoseconds. - Weight::from_ref_time(29_027_000 as u64) + Weight::from_ref_time(27_265_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 { - // Minimum execution time: 24_756 nanoseconds. - Weight::from_ref_time(25_056_000 as u64) + Weight::from_ref_time(23_378_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -101,8 +95,7 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: ChildBounties ChildrenCuratorFees (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn claim_bounty() -> Weight { - // Minimum execution time: 69_714 nanoseconds. - Weight::from_ref_time(70_332_000 as u64) + Weight::from_ref_time(67_940_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -111,8 +104,7 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_proposed() -> Weight { - // Minimum execution time: 44_853 nanoseconds. - Weight::from_ref_time(45_328_000 as u64) + Weight::from_ref_time(42_622_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -121,27 +113,24 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_active() -> Weight { - // Minimum execution time: 53_131 nanoseconds. - Weight::from_ref_time(53_605_000 as u64) + Weight::from_ref_time(51_906_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 { - // Minimum execution time: 21_458 nanoseconds. - Weight::from_ref_time(21_732_000 as u64) + Weight::from_ref_time(19_709_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:2 w:2) - // Storage: System Account (r:4 w:4) - /// The range of component `b` is `[0, 100]`. + // Storage: Bounties Bounties (r:1 w:1) + // Storage: System Account (r:2 w:2) + /// The range of component `b` is `[1, 100]`. fn spend_funds(b: u32, ) -> Weight { - // 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)) + 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)) .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 fdb9632d05b2..9032a46cf999 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,10 +52,9 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -63,8 +62,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 18_618 nanoseconds. - Weight::from_ref_time(19_241_000 as u64) + Weight::from_ref_time(18_172_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -72,8 +70,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 34_559 nanoseconds. - Weight::from_ref_time(34_899_000 as u64) + Weight::from_ref_time(32_032_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -81,16 +78,14 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 45_199 nanoseconds. - Weight::from_ref_time(45_846_000 as u64) + Weight::from_ref_time(43_630_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 { - // Minimum execution time: 28_459 nanoseconds. - Weight::from_ref_time(28_782_000 as u64) + Weight::from_ref_time(26_677_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -99,8 +94,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 68_148 nanoseconds. - Weight::from_ref_time(69_069_000 as u64) + Weight::from_ref_time(65_968_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -111,8 +105,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 51_256 nanoseconds. - Weight::from_ref_time(51_850_000 as u64) + Weight::from_ref_time(49_350_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -123,8 +116,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 62_367 nanoseconds. - Weight::from_ref_time(63_053_000 as u64) + Weight::from_ref_time(58_604_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 e44da780e45f..8ec2346b4c18 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,21 +46,20 @@ 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 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]`. + // 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]`. fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - // 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)) + 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)) .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)) @@ -72,12 +71,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Council Members (r:1 w:0) @@ -87,12 +85,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } // Storage: Council Members (r:1 w:0) @@ -107,14 +104,13 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -123,10 +119,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -139,12 +134,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -159,14 +153,13 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -180,12 +173,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -201,14 +193,13 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -218,10 +209,9 @@ 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 { - // 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)) + 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)) .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 024a7635897e..3ff7d72e0e57 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,21 +46,22 @@ 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 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_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)) + // 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)) .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)) @@ -72,12 +73,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: TechnicalCommittee Members (r:1 w:0) @@ -87,12 +87,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } // Storage: TechnicalCommittee Members (r:1 w:0) @@ -107,14 +106,13 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -123,10 +121,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -139,12 +136,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -159,14 +155,13 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -180,12 +175,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -201,14 +195,13 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -218,10 +211,9 @@ 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 { - // 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)) + 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)) .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 4c7de43d9512..136797abcf03 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-03, 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("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,15 +49,13 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:1 w:0) // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - // Minimum execution time: 42_967 nanoseconds. - Weight::from_ref_time(43_770_000 as u64) + Weight::from_ref_time(42_048_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 { - // Minimum execution time: 39_741 nanoseconds. - Weight::from_ref_time(41_106_000 as u64) + Weight::from_ref_time(38_631_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -65,8 +63,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_new() -> Weight { - // Minimum execution time: 50_419 nanoseconds. - Weight::from_ref_time(51_479_000 as u64) + Weight::from_ref_time(48_571_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -74,16 +71,14 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_existing() -> Weight { - // Minimum execution time: 51_170 nanoseconds. - Weight::from_ref_time(51_755_000 as u64) + Weight::from_ref_time(48_556_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 { - // Minimum execution time: 21_378 nanoseconds. - Weight::from_ref_time(21_957_000 as u64) + Weight::from_ref_time(20_104_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -94,45 +89,39 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy Blacklist (r:0 w:1) fn blacklist() -> Weight { - // Minimum execution time: 77_526 nanoseconds. - Weight::from_ref_time(79_470_000 as u64) + Weight::from_ref_time(75_289_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 { - // Minimum execution time: 16_498 nanoseconds. - Weight::from_ref_time(17_076_000 as u64) + Weight::from_ref_time(15_734_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 { - // Minimum execution time: 4_502 nanoseconds. - Weight::from_ref_time(4_690_000 as u64) + Weight::from_ref_time(4_507_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - // Minimum execution time: 4_599 nanoseconds. - Weight::from_ref_time(4_750_000 as u64) + Weight::from_ref_time(4_603_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 { - // Minimum execution time: 20_905 nanoseconds. - Weight::from_ref_time(21_387_000 as u64) + Weight::from_ref_time(19_816_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 { - // Minimum execution time: 26_946 nanoseconds. - Weight::from_ref_time(27_534_000 as u64) + Weight::from_ref_time(25_722_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -140,15 +129,13 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:1 w:1) fn cancel_proposal() -> Weight { - // Minimum execution time: 65_837 nanoseconds. - Weight::from_ref_time(66_889_000 as u64) + Weight::from_ref_time(63_768_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 { - // Minimum execution time: 13_714 nanoseconds. - Weight::from_ref_time(14_237_000 as u64) + Weight::from_ref_time(13_183_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy LowestUnbaked (r:1 w:1) @@ -156,10 +143,9 @@ 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 { - // 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)) + 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)) .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)) @@ -172,10 +158,9 @@ 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 { - // 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)) + 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)) .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)) @@ -185,10 +170,9 @@ 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 { - // 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)) + 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)) .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)) @@ -198,10 +182,9 @@ 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 { - // 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)) + 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)) .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)) @@ -209,8 +192,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { } // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - // Minimum execution time: 4_943 nanoseconds. - Weight::from_ref_time(5_130_000 as u64) + Weight::from_ref_time(5_070_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy VotingOf (r:1 w:1) @@ -218,10 +200,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -230,10 +211,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -241,10 +221,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -252,10 +231,9 @@ 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 { - // 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)) + 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)) .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 797b0037b070..4a7f68237716 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,38 +53,33 @@ 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 { - // Minimum execution time: 16_179 nanoseconds. - Weight::from_ref_time(16_599_000 as u64) + Weight::from_ref_time(15_195_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 { - // Minimum execution time: 15_355 nanoseconds. - Weight::from_ref_time(15_840_000 as u64) + Weight::from_ref_time(14_471_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 { - // Minimum execution time: 14_708 nanoseconds. - Weight::from_ref_time(15_094_000 as u64) + Weight::from_ref_time(13_680_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 { - // Minimum execution time: 29_850 nanoseconds. - Weight::from_ref_time(30_766_000 as u64) + Weight::from_ref_time(28_132_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 { - // Minimum execution time: 25_348 nanoseconds. - Weight::from_ref_time(26_069_000 as u64) + Weight::from_ref_time(21_833_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -93,11 +88,12 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) @@ -112,13 +108,10 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -129,8 +122,7 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) fn submit() -> Weight { - // Minimum execution time: 49_731 nanoseconds. - Weight::from_ref_time(50_382_000 as u64) + Weight::from_ref_time(47_621_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -145,13 +137,16 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -163,13 +158,16 @@ 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 { - // 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)) + 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)) .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 be3de6f45c91..508af82266fe 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,10 +51,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -65,10 +64,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -79,18 +77,16 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 42_081 nanoseconds. - Weight::from_ref_time(42_705_000 as u64) + Weight::from_ref_time(39_114_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -99,20 +95,18 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -122,21 +116,18 @@ 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 { - // Minimum execution time: 44_658 nanoseconds. - Weight::from_ref_time(46_150_000 as u64) + Weight::from_ref_time(44_892_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 { - // Minimum execution time: 34_466 nanoseconds. - Weight::from_ref_time(36_065_000 as u64) + Weight::from_ref_time(34_318_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) @@ -146,8 +137,7 @@ 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 { - // Minimum execution time: 59_328 nanoseconds. - Weight::from_ref_time(59_980_000 as u64) + Weight::from_ref_time(59_226_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -158,12 +148,13 @@ 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 `[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)) + /// 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)) .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))) @@ -181,16 +172,14 @@ 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 { - // 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)) + 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)) .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 6f1b4cb0d878..8752534c8a30 100644 --- a/runtime/polkadot/src/weights/pallet_fast_unstake.rs +++ b/runtime/polkadot/src/weights/pallet_fast_unstake.rs @@ -16,21 +16,22 @@ //! Autogenerated weights for `pallet_fast_unstake` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-27, 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_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/ @@ -49,72 +50,65 @@ 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: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) + // 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) fn on_idle_unstake() -> Weight { - // 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)) + 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)) } // 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:65 w:64) + // Storage: FastUnstake Queue (r:2 w:1) // 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(66 as u64)) + .saturating_add(T::DbWeight::get().writes(3 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:3 w:3) + // 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 { - // Minimum execution time: 125_199 nanoseconds. - Weight::from_ref_time(127_131_000 as u64) - .saturating_add(T::DbWeight::get().reads(15 as u64)) + Weight::from_ref_time(90_682_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 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 { - // Minimum execution time: 50_373 nanoseconds. - Weight::from_ref_time(51_451_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) + Weight::from_ref_time(23_926_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: FastUnstake ErasToCheckPerBlock (r:0 w:1) fn control() -> Weight { - // Minimum execution time: 4_124 nanoseconds. - Weight::from_ref_time(4_273_000 as u64) + Weight::from_ref_time(3_899_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 59ef2e0e29eb..f7e90a178a38 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,35 +47,32 @@ 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 { - // 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)) + 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)) .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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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:2 w:2) - /// The range of component `s` is `[0, 100]`. + // Storage: Identity SuperOf (r:1 w:1) + /// The range of component `s` is `[1, 100]`. fn set_subs_new(s: u32, ) -> Weight { - // 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)) + 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)) .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)) @@ -83,13 +80,12 @@ 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:2) - /// The range of component `p` is `[0, 100]`. + // Storage: Identity SuperOf (r:0 w:1) + /// The range of component `p` is `[1, 100]`. fn set_subs_old(p: u32, ) -> Weight { - // 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)) + 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)) .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))) @@ -98,17 +94,16 @@ 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 `[0, 100]`. - /// The range of component `x` is `[0, 100]`. + /// The range of component `s` is `[1, 100]`. + /// The range of component `x` is `[1, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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))) @@ -116,71 +111,65 @@ 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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -189,17 +178,14 @@ 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 `[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)) + /// 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)) .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))) @@ -207,12 +193,11 @@ 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 `[0, 99]`. + /// The range of component `s` is `[1, 99]`. fn add_sub(s: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -220,10 +205,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -232,21 +216,19 @@ 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 { - // 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)) + 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)) .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 `[0, 99]`. + /// The range of component `s` is `[1, 99]`. fn quit_sub(s: u32, ) -> Weight { - // 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)) + 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)) .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 eb2fbb22bcc7..67c03022b125 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,12 +52,11 @@ 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 { - // 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)) + 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)) .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 6f02c6e01041..2bfb79cf8ba4 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,38 +46,33 @@ pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - // Minimum execution time: 27_020 nanoseconds. - Weight::from_ref_time(27_507_000 as u64) + Weight::from_ref_time(24_909_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 { - // Minimum execution time: 32_499 nanoseconds. - Weight::from_ref_time(32_898_000 as u64) + Weight::from_ref_time(31_373_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 { - // Minimum execution time: 27_796 nanoseconds. - Weight::from_ref_time(28_283_000 as u64) + Weight::from_ref_time(25_840_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 { - // Minimum execution time: 28_389 nanoseconds. - Weight::from_ref_time(28_796_000 as u64) + Weight::from_ref_time(26_189_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 { - // Minimum execution time: 33_329 nanoseconds. - Weight::from_ref_time(34_108_000 as u64) + Weight::from_ref_time(31_330_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 86f88fa0984c..dccfed9e5f3b 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,10 +50,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -64,10 +63,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -78,10 +76,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -92,10 +89,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -106,10 +102,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -118,21 +113,17 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + fn clear_prime(_m: u32, ) -> Weight { + Weight::from_ref_time(4_708_000 as u64) .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/polkadot/src/weights/pallet_message_queue.rs b/runtime/polkadot/src/weights/pallet_message_queue.rs deleted file mode 100644 index cd9268ffde22..000000000000 --- a/runtime/polkadot/src/weights/pallet_message_queue.rs +++ /dev/null @@ -1,216 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) 2022 Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! Autogenerated weights for pallet_message_queue -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-08, 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("dev"), DB CACHE: 1024 - -// Executed Command: -// /home/benchbot/cargo_target_dir/production/substrate -// 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/substrate/.git/.artifacts/bench.json -// --pallet=pallet_message_queue -// --chain=dev -// --header=./HEADER-APACHE2 -// --output=./frame/message-queue/src/weights.rs -// --template=./.maintain/frame-weight-template.hbs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use sp_std::marker::PhantomData; - -/// Weight functions needed for pallet_message_queue. -pub trait WeightInfo { - fn ready_ring_knit() -> Weight; - fn ready_ring_unknit() -> Weight; - fn service_queue_base() -> Weight; - fn service_page_base_completion() -> Weight; - fn service_page_base_no_completion() -> Weight; - fn service_page_item() -> Weight; - fn bump_service_head() -> Weight; - fn reap_page() -> Weight; - fn execute_overweight_page_removed() -> Weight; - fn execute_overweight_page_updated() -> Weight; -} - -/// Weights for pallet_message_queue using the Substrate node and recommended hardware. -pub struct SubstrateWeight(PhantomData); -impl WeightInfo for SubstrateWeight { - // Storage: MessageQueue ServiceHead (r:1 w:0) - // Storage: MessageQueue BookStateFor (r:2 w:2) - fn ready_ring_knit() -> Weight { - // Minimum execution time: 12_330 nanoseconds. - Weight::from_ref_time(12_711_000) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - // Storage: MessageQueue BookStateFor (r:2 w:2) - // Storage: MessageQueue ServiceHead (r:1 w:1) - fn ready_ring_unknit() -> Weight { - // Minimum execution time: 12_322 nanoseconds. - Weight::from_ref_time(12_560_000) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - // Storage: MessageQueue BookStateFor (r:1 w:1) - fn service_queue_base() -> Weight { - // Minimum execution time: 4_652 nanoseconds. - Weight::from_ref_time(4_848_000) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - // Storage: MessageQueue Pages (r:1 w:1) - fn service_page_base_completion() -> Weight { - // Minimum execution time: 7_115 nanoseconds. - Weight::from_ref_time(7_407_000) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - // Storage: MessageQueue Pages (r:1 w:1) - fn service_page_base_no_completion() -> Weight { - // Minimum execution time: 6_974 nanoseconds. - Weight::from_ref_time(7_200_000) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - fn service_page_item() -> Weight { - // Minimum execution time: 79_657 nanoseconds. - Weight::from_ref_time(80_050_000) - } - // Storage: MessageQueue ServiceHead (r:1 w:1) - // Storage: MessageQueue BookStateFor (r:1 w:0) - fn bump_service_head() -> Weight { - // Minimum execution time: 7_598 nanoseconds. - Weight::from_ref_time(8_118_000) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - // Storage: MessageQueue BookStateFor (r:1 w:1) - // Storage: MessageQueue Pages (r:1 w:1) - fn reap_page() -> Weight { - // Minimum execution time: 60_562 nanoseconds. - Weight::from_ref_time(61_430_000) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - // Storage: MessageQueue BookStateFor (r:1 w:1) - // Storage: MessageQueue Pages (r:1 w:1) - fn execute_overweight_page_removed() -> Weight { - // Minimum execution time: 74_582 nanoseconds. - Weight::from_ref_time(75_445_000) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - // Storage: MessageQueue BookStateFor (r:1 w:1) - // Storage: MessageQueue Pages (r:1 w:1) - fn execute_overweight_page_updated() -> Weight { - // Minimum execution time: 87_526 nanoseconds. - Weight::from_ref_time(88_055_000) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} - -// For backwards compatibility and tests -impl WeightInfo for () { - // Storage: MessageQueue ServiceHead (r:1 w:0) - // Storage: MessageQueue BookStateFor (r:2 w:2) - fn ready_ring_knit() -> Weight { - // Minimum execution time: 12_330 nanoseconds. - Weight::from_ref_time(12_711_000) - .saturating_add(RocksDbWeight::get().reads(3)) - .saturating_add(RocksDbWeight::get().writes(2)) - } - // Storage: MessageQueue BookStateFor (r:2 w:2) - // Storage: MessageQueue ServiceHead (r:1 w:1) - fn ready_ring_unknit() -> Weight { - // Minimum execution time: 12_322 nanoseconds. - Weight::from_ref_time(12_560_000) - .saturating_add(RocksDbWeight::get().reads(3)) - .saturating_add(RocksDbWeight::get().writes(3)) - } - // Storage: MessageQueue BookStateFor (r:1 w:1) - fn service_queue_base() -> Weight { - // Minimum execution time: 4_652 nanoseconds. - Weight::from_ref_time(4_848_000) - .saturating_add(RocksDbWeight::get().reads(1)) - .saturating_add(RocksDbWeight::get().writes(1)) - } - // Storage: MessageQueue Pages (r:1 w:1) - fn service_page_base_completion() -> Weight { - // Minimum execution time: 7_115 nanoseconds. - Weight::from_ref_time(7_407_000) - .saturating_add(RocksDbWeight::get().reads(1)) - .saturating_add(RocksDbWeight::get().writes(1)) - } - // Storage: MessageQueue Pages (r:1 w:1) - fn service_page_base_no_completion() -> Weight { - // Minimum execution time: 6_974 nanoseconds. - Weight::from_ref_time(7_200_000) - .saturating_add(RocksDbWeight::get().reads(1)) - .saturating_add(RocksDbWeight::get().writes(1)) - } - fn service_page_item() -> Weight { - // Minimum execution time: 79_657 nanoseconds. - Weight::from_ref_time(80_050_000) - } - // Storage: MessageQueue ServiceHead (r:1 w:1) - // Storage: MessageQueue BookStateFor (r:1 w:0) - fn bump_service_head() -> Weight { - // Minimum execution time: 7_598 nanoseconds. - Weight::from_ref_time(8_118_000) - .saturating_add(RocksDbWeight::get().reads(2)) - .saturating_add(RocksDbWeight::get().writes(1)) - } - // Storage: MessageQueue BookStateFor (r:1 w:1) - // Storage: MessageQueue Pages (r:1 w:1) - fn reap_page() -> Weight { - // Minimum execution time: 60_562 nanoseconds. - Weight::from_ref_time(61_430_000) - .saturating_add(RocksDbWeight::get().reads(2)) - .saturating_add(RocksDbWeight::get().writes(2)) - } - // Storage: MessageQueue BookStateFor (r:1 w:1) - // Storage: MessageQueue Pages (r:1 w:1) - fn execute_overweight_page_removed() -> Weight { - // Minimum execution time: 74_582 nanoseconds. - Weight::from_ref_time(75_445_000) - .saturating_add(RocksDbWeight::get().reads(2)) - .saturating_add(RocksDbWeight::get().writes(2)) - } - // Storage: MessageQueue BookStateFor (r:1 w:1) - // Storage: MessageQueue Pages (r:1 w:1) - fn execute_overweight_page_updated() -> Weight { - // Minimum execution time: 87_526 nanoseconds. - Weight::from_ref_time(88_055_000) - .saturating_add(RocksDbWeight::get().reads(2)) - .saturating_add(RocksDbWeight::get().writes(2)) - } -} diff --git a/runtime/polkadot/src/weights/pallet_multisig.rs b/runtime/polkadot/src/weights/pallet_multisig.rs index 60270bfec009..cd8a795eeaa3 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-26, 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("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_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)) + // 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)) } // 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: 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)) + // 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)) // Standard Error: 7 - .saturating_add(Weight::from_ref_time(1_740 as u64).saturating_mul(z as u64)) + .saturating_add(Weight::from_ref_time(1_515 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: 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)) + // 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)) .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: 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)) + // 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)) .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: 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)) + // 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)) .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: 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)) + // 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)) .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: 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)) + // 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)) .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 fe5b0e1ec8c3..90024d6ef55a 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,19 +47,18 @@ 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 { - // Minimum execution time: 143_368 nanoseconds. - Weight::from_ref_time(147_813_000 as u64) + Weight::from_ref_time(138_999_000 as u64) .saturating_add(T::DbWeight::get().reads(17 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -67,14 +66,13 @@ 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 Bonded (r:1 w:0) // Storage: Staking Ledger (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 bond_extra_transfer() -> Weight { - // Minimum execution time: 141_294 nanoseconds. - Weight::from_ref_time(142_580_000 as u64) + Weight::from_ref_time(134_798_000 as u64) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -82,14 +80,13 @@ 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 Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // 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 { - // Minimum execution time: 145_976 nanoseconds. - Weight::from_ref_time(149_745_000 as u64) + Weight::from_ref_time(138_061_000 as u64) .saturating_add(T::DbWeight::get().reads(13 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -98,15 +95,13 @@ 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 { - // Minimum execution time: 54_743 nanoseconds. - Weight::from_ref_time(55_539_000 as u64) + Weight::from_ref_time(53_869_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) @@ -114,53 +109,49 @@ 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 { - // Minimum execution time: 143_857 nanoseconds. - Weight::from_ref_time(145_751_000 as u64) + Weight::from_ref_time(138_663_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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 Bonded (r:1 w:1) // Storage: Staking Ledger (r:1 w:1) + // Storage: Staking Bonded (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) @@ -176,28 +167,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 { - // 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)) + fn withdraw_unbonded_kill(_s: u32, ) -> Weight { + Weight::from_ref_time(144_919_000 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 Bonded (r:1 w:1) // Storage: Staking Ledger (r:1 w:1) + // Storage: Staking Bonded (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) @@ -206,40 +195,36 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn create() -> Weight { - // Minimum execution time: 131_307 nanoseconds. - Weight::from_ref_time(131_903_000 as u64) - .saturating_add(T::DbWeight::get().reads(21 as u64)) + Weight::from_ref_time(128_829_000 as u64) + .saturating_add(T::DbWeight::get().reads(22 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 39_822 nanoseconds. - Weight::from_ref_time(40_523_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) + Weight::from_ref_time(33_763_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) @@ -247,10 +232,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -260,19 +244,16 @@ 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 { - // Minimum execution time: 6_536 nanoseconds. - Weight::from_ref_time(6_677_000 as u64) + Weight::from_ref_time(7_525_000 as u64) .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: NominationPools BondedPools (r:1 w:1) fn update_roles() -> Weight { - // Minimum execution time: 26_150 nanoseconds. - Weight::from_ref_time(26_682_000 as u64) + Weight::from_ref_time(25_910_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) @@ -281,9 +262,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - // Minimum execution time: 65_307 nanoseconds. - Weight::from_ref_time(66_030_000 as u64) - .saturating_add(T::DbWeight::get().reads(9 as u64)) + Weight::from_ref_time(59_921_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 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 b8c1eb4e40a9..bd316e310277 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-03, 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("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,10 +48,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -59,10 +58,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -70,76 +68,66 @@ 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 { - // Minimum execution time: 19_543 nanoseconds. - Weight::from_ref_time(19_817_000 as u64) + Weight::from_ref_time(18_805_000 as u64) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(2_487 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_ref_time(2_116 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 { - // Minimum execution time: 41_035 nanoseconds. - Weight::from_ref_time(42_095_000 as u64) + Weight::from_ref_time(39_007_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 { - // Minimum execution time: 28_472 nanoseconds. - Weight::from_ref_time(30_030_000 as u64) + Weight::from_ref_time(27_523_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 { - // Minimum execution time: 28_034 nanoseconds. - Weight::from_ref_time(30_657_000 as u64) + Weight::from_ref_time(26_477_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 { - // Minimum execution time: 15_756 nanoseconds. - Weight::from_ref_time(16_707_000 as u64) + Weight::from_ref_time(13_236_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 { - // Minimum execution time: 17_491 nanoseconds. - Weight::from_ref_time(18_540_000 as u64) + Weight::from_ref_time(17_975_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 { - // Minimum execution time: 8_636 nanoseconds. - Weight::from_ref_time(9_055_000 as u64) + Weight::from_ref_time(8_295_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 { - // Minimum execution time: 28_146 nanoseconds. - Weight::from_ref_time(29_062_000 as u64) + Weight::from_ref_time(26_186_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 { - // Minimum execution time: 8_541 nanoseconds. - Weight::from_ref_time(8_992_000 as u64) + Weight::from_ref_time(8_176_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 { - // Minimum execution time: 8_558 nanoseconds. - Weight::from_ref_time(8_880_000 as u64) + Weight::from_ref_time(8_005_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 dd0d55a515a3..3897dadd865a 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,10 +47,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Proxy Proxies (r:1 w:0) @@ -59,12 +58,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -73,12 +71,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -87,12 +84,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -102,42 +98,38 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -145,20 +137,18 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 81d44bfc978b..9446fdc5efec 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-03, 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("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,61 +46,55 @@ pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler IncompleteSince (r:1 w:1) fn service_agendas_base() -> Weight { - // Minimum execution time: 4_885 nanoseconds. - Weight::from_ref_time(4_987_000 as u64) + Weight::from_ref_time(4_522_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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn service_task_base() -> Weight { - // Minimum execution time: 10_198 nanoseconds. - Weight::from_ref_time(10_441_000 as u64) + Weight::from_ref_time(12_288_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 { - // 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)) + 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)) .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 { - // Minimum execution time: 11_616 nanoseconds. - Weight::from_ref_time(11_798_000 as u64) + Weight::from_ref_time(13_382_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } + // Storage: Scheduler Agenda (r:1 w:1) fn service_task_periodic() -> Weight { - // Minimum execution time: 9_892 nanoseconds. - Weight::from_ref_time(10_084_000 as u64) + 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)) } fn execute_dispatch_signed() -> Weight { - // Minimum execution time: 4_250 nanoseconds. - Weight::from_ref_time(4_349_000 as u64) + Weight::from_ref_time(3_714_000 as u64) } fn execute_dispatch_unsigned() -> Weight { - // Minimum execution time: 4_195 nanoseconds. - Weight::from_ref_time(4_294_000 as u64) + Weight::from_ref_time(3_667_000 as u64) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -108,10 +102,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -119,10 +112,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -130,10 +122,9 @@ 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 { - // 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)) + 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)) .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 7512266e8c52..2b67806f65d6 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,8 +48,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:6 w:6) fn set_keys() -> Weight { - // Minimum execution time: 51_133 nanoseconds. - Weight::from_ref_time(52_762_000 as u64) + Weight::from_ref_time(50_181_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -57,8 +56,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:6) fn purge_keys() -> Weight { - // Minimum execution time: 38_703 nanoseconds. - Weight::from_ref_time(40_249_000 as u64) + Weight::from_ref_time(38_209_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 8cc7e5903e0f..f162b24405a6 100644 --- a/runtime/polkadot/src/weights/pallet_staking.rs +++ b/runtime/polkadot/src/weights/pallet_staking.rs @@ -16,23 +16,21 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-26, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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_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/ @@ -40,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_staking`. @@ -49,13 +47,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 { - // 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)) + 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)) } // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) @@ -63,10 +61,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra() -> Weight { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Nominators (r:1 w:0) @@ -78,10 +75,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListBags (r:2 w:2) fn unbond() -> Weight { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -89,12 +85,11 @@ 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 { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -109,16 +104,11 @@ 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 { - // 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()))) + 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)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinValidatorBond (r:1 w:0) @@ -132,22 +122,20 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForValidators (r:1 w:1) fn validate() -> Weight { - // 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)) + 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)) } // 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 { - // 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()))) + 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))) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinNominatorBond (r:1 w:0) @@ -162,13 +150,12 @@ 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 { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Validators (r:1 w:0) @@ -178,59 +165,51 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Payee (r:0 w:1) fn set_payee() -> Weight { - // 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)) + 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)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking Ledger (r:2 w:2) fn set_controller() -> Weight { - // 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)) + 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)) } // Storage: Staking ValidatorCount (r:0 w:1) fn set_validator_count() -> Weight { - // Minimum execution time: 4_303 nanoseconds. - Weight::from_ref_time(4_470_000) - .saturating_add(T::DbWeight::get().writes(1)) + Weight::from_ref_time(3_971_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking ForceEra (r:0 w:1) fn force_no_eras() -> Weight { - // Minimum execution time: 4_347 nanoseconds. - Weight::from_ref_time(4_522_000) - .saturating_add(T::DbWeight::get().writes(1)) + Weight::from_ref_time(3_980_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era() -> Weight { - // Minimum execution time: 4_313 nanoseconds. - Weight::from_ref_time(4_548_000) - .saturating_add(T::DbWeight::get().writes(1)) + Weight::from_ref_time(3_926_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era_always() -> Weight { - // Minimum execution time: 4_302 nanoseconds. - Weight::from_ref_time(4_487_000) - .saturating_add(T::DbWeight::get().writes(1)) + Weight::from_ref_time(4_043_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking Invulnerables (r:0 w:1) /// The range of component `v` is `[0, 1000]`. fn set_invulnerables(v: u32, ) -> Weight { - // 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)) + 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)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking SlashingSpans (r:1 w:0) @@ -247,64 +226,62 @@ 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 { - // 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()))) + 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))) } // Storage: Staking UnappliedSlashes (r:1 w:1) /// The range of component `s` is `[1, 1000]`. fn cancel_deferred_slash(s: u32, ) -> Weight { - // 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)) + 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)) } // 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:1 w:0) + // Storage: Staking Bonded (r:2 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:1 w:0) - // Storage: System Account (r:1 w:1) - /// The range of component `n` is `[0, 512]`. + // Storage: Staking Payee (r:2 w:0) + // Storage: System Account (r:2 w:2) + /// The range of component `n` is `[1, 256]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { - // 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()))) + 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))) } // 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:1 w:0) - // Storage: Staking Ledger (r:1 w:1) + // Storage: Staking Bonded (r:2 w:0) + // Storage: Staking Ledger (r:2 w:2) // 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: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]`. + // Storage: Staking Payee (r:2 w:0) + // Storage: System Account (r:2 w:2) + // Storage: Balances Locks (r:2 w:2) + /// The range of component `n` is `[1, 256]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { - // 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()))) + 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))) } // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) @@ -314,12 +291,11 @@ 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 { - // 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)) + 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)) } // Storage: System Account (r:1 w:1) // Storage: Staking Bonded (r:1 w:1) @@ -336,15 +312,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 { - // 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()))) + 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))) } // 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) @@ -356,28 +332,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 `[0, 100]`. + /// The range of component `n` is `[1, 100]`. fn new_era(v: u32, n: u32, ) -> Weight { - // 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()))) + 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))) } // 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) @@ -385,33 +361,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]`. - 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)) + /// 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)) } - // 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 { - // 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)) + 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)) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -420,9 +396,8 @@ 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 { - // Minimum execution time: 7_416 nanoseconds. - Weight::from_ref_time(7_844_000) - .saturating_add(T::DbWeight::get().writes(6)) + Weight::from_ref_time(7_146_000 as u64) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -431,9 +406,8 @@ 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 { - // Minimum execution time: 6_765 nanoseconds. - Weight::from_ref_time(7_042_000) - .saturating_add(T::DbWeight::get().writes(6)) + Weight::from_ref_time(6_698_000 as u64) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) @@ -446,23 +420,15 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill_other() -> Weight { - // 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)) + 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)) } // Storage: Staking MinCommission (r:1 w:0) // Storage: Staking Validators (r:1 w:1) fn force_apply_min_commission() -> Weight { - // 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)) + 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)) } } diff --git a/runtime/polkadot/src/weights/pallet_timestamp.rs b/runtime/polkadot/src/weights/pallet_timestamp.rs index a00a8500e187..bb9dc57e1149 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,13 +47,11 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Babe CurrentSlot (r:1 w:0) fn set() -> Weight { - // Minimum execution time: 9_473 nanoseconds. - Weight::from_ref_time(9_896_000 as u64) + Weight::from_ref_time(9_237_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 { - // Minimum execution time: 4_279 nanoseconds. - Weight::from_ref_time(4_529_000 as u64) + Weight::from_ref_time(3_851_000 as u64) } } diff --git a/runtime/polkadot/src/weights/pallet_tips.rs b/runtime/polkadot/src/weights/pallet_tips.rs index 8d5a80899b28..b43a9c45b965 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,18 +48,16 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 29_917 nanoseconds. - Weight::from_ref_time(30_436_000 as u64) + Weight::from_ref_time(27_830_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -69,12 +67,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -82,10 +79,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -95,10 +91,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -106,10 +101,9 @@ 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 { - // 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)) + 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)) .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 9a5e760241d4..9e30a9b8ed2f 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("polkadot-dev"), DB CACHE: 1024 // Executed Command: @@ -38,29 +38,26 @@ #![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 { - // Minimum execution time: 140 nanoseconds. - Weight::from_ref_time(192_000 as u64) + Weight::from_ref_time(159_000 as u64) } // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - // Minimum execution time: 27_339 nanoseconds. - Weight::from_ref_time(27_812_000 as u64) + Weight::from_ref_time(25_052_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 { - // Minimum execution time: 39_765 nanoseconds. - Weight::from_ref_time(40_401_000 as u64) + Weight::from_ref_time(37_455_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -68,17 +65,15 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 8_372 nanoseconds. - Weight::from_ref_time(8_582_000 as u64) + Weight::from_ref_time(7_745_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -88,10 +83,9 @@ 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 { - // 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)) + 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)) .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 648577ca1a2d..f7e6e51eff4d 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,31 +46,26 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - // 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)) + 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)) } fn as_derivative() -> Weight { - // Minimum execution time: 6_409 nanoseconds. - Weight::from_ref_time(6_892_000 as u64) + Weight::from_ref_time(5_533_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - // 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)) + 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)) } fn dispatch_as() -> Weight { - // Minimum execution time: 14_111 nanoseconds. - Weight::from_ref_time(14_347_000 as u64) + Weight::from_ref_time(13_247_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - // 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)) + 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)) } } diff --git a/runtime/polkadot/src/weights/pallet_vesting.rs b/runtime/polkadot/src/weights/pallet_vesting.rs index 4e1e4dd18d7b..e1052f38114e 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,12 +49,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -63,12 +62,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -78,12 +76,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -93,12 +90,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -108,12 +104,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -123,12 +118,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -138,12 +132,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -153,12 +146,11 @@ 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 { - // 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)) + 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)) .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 b63f0396b078..2f464845ebb3 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,8 +47,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions AuctionInfo (r:1 w:1) // Storage: Auctions AuctionCounter (r:1 w:1) fn new_auction() -> Weight { - // Minimum execution time: 17_695 nanoseconds. - Weight::from_ref_time(18_051_000 as u64) + Weight::from_ref_time(16_359_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -60,8 +59,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn bid() -> Weight { - // Minimum execution time: 73_260 nanoseconds. - Weight::from_ref_time(74_711_000 as u64) + Weight::from_ref_time(69_607_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -78,8 +76,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar Paras (r:1 w:1) fn on_initialize() -> Weight { - // Minimum execution time: 15_542_084 nanoseconds. - Weight::from_ref_time(15_830_065_000 as u64) + Weight::from_ref_time(15_111_005_000 as u64) .saturating_add(T::DbWeight::get().reads(3688 as u64)) .saturating_add(T::DbWeight::get().writes(3683 as u64)) } @@ -88,8 +85,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions Winning (r:0 w:3600) // Storage: Auctions AuctionInfo (r:0 w:1) fn cancel_auction() -> Weight { - // Minimum execution time: 4_685_796 nanoseconds. - Weight::from_ref_time(4_784_757_000 as u64) + Weight::from_ref_time(4_643_675_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 e435986978b3..0c9dc4c7ad7f 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,8 +52,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim() -> Weight { - // Minimum execution time: 144_499 nanoseconds. - Weight::from_ref_time(146_851_000 as u64) + Weight::from_ref_time(143_005_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -62,8 +61,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Claims (r:0 w:1) // Storage: Claims Signing (r:0 w:1) fn mint_claim() -> Weight { - // Minimum execution time: 11_557 nanoseconds. - Weight::from_ref_time(12_078_000 as u64) + Weight::from_ref_time(11_431_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -75,8 +73,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim_attest() -> Weight { - // Minimum execution time: 147_154 nanoseconds. - Weight::from_ref_time(150_718_000 as u64) + Weight::from_ref_time(145_634_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -89,8 +86,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn attest() -> Weight { - // Minimum execution time: 68_909 nanoseconds. - Weight::from_ref_time(71_077_000 as u64) + Weight::from_ref_time(66_979_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -99,8 +95,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Signing (r:1 w:2) // Storage: Claims Preclaims (r:1 w:1) fn move_claim() -> Weight { - // Minimum execution time: 22_310 nanoseconds. - Weight::from_ref_time(23_037_000 as u64) + Weight::from_ref_time(21_303_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 2b375f9fcafb..7151a55e943a 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,8 +49,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Paras ParaLifecycles (r:1 w:0) // Storage: Crowdloan NextFundIndex (r:1 w:1) fn create() -> Weight { - // Minimum execution time: 47_532 nanoseconds. - Weight::from_ref_time(49_107_000 as u64) + Weight::from_ref_time(46_657_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -62,8 +61,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan NewRaise (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - // Minimum execution time: 117_161 nanoseconds. - Weight::from_ref_time(118_612_000 as u64) + Weight::from_ref_time(116_256_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -71,18 +69,16 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) // Storage: unknown [0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0] (r:1 w:1) fn withdraw() -> Weight { - // Minimum execution time: 56_984 nanoseconds. - Weight::from_ref_time(57_919_000 as u64) + Weight::from_ref_time(54_668_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 { - // 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)) + 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)) .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)) @@ -91,31 +87,27 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan Funds (r:1 w:1) // Storage: System Account (r:1 w:1) fn dissolve() -> Weight { - // Minimum execution time: 37_332 nanoseconds. - Weight::from_ref_time(38_138_000 as u64) + Weight::from_ref_time(35_958_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 { - // Minimum execution time: 24_508 nanoseconds. - Weight::from_ref_time(24_887_000 as u64) + Weight::from_ref_time(23_705_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 { - // Minimum execution time: 34_804 nanoseconds. - Weight::from_ref_time(35_771_000 as u64) + Weight::from_ref_time(33_328_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 { - // Minimum execution time: 26_119 nanoseconds. - Weight::from_ref_time(26_830_000 as u64) + Weight::from_ref_time(25_527_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -131,10 +123,9 @@ 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 { - // 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)) + 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)) .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 f10c5b2bed1c..89a1c628c503 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,8 +48,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Registrar Paras (r:1 w:1) // Storage: Paras ParaLifecycles (r:1 w:0) fn reserve() -> Weight { - // Minimum execution time: 31_379 nanoseconds. - Weight::from_ref_time(32_013_000 as u64) + Weight::from_ref_time(29_429_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -64,8 +63,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn register() -> Weight { - // Minimum execution time: 7_838_268 nanoseconds. - Weight::from_ref_time(8_000_048_000 as u64) + Weight::from_ref_time(7_272_403_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -80,8 +78,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn force_register() -> Weight { - // Minimum execution time: 7_818_286 nanoseconds. - Weight::from_ref_time(7_962_262_000 as u64) + Weight::from_ref_time(7_255_583_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -92,8 +89,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar PendingSwap (r:0 w:1) fn deregister() -> Weight { - // Minimum execution time: 49_346 nanoseconds. - Weight::from_ref_time(50_242_000 as u64) + Weight::from_ref_time(47_678_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -105,14 +101,11 @@ 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 { - // Minimum execution time: 44_290 nanoseconds. - Weight::from_ref_time(44_983_000 as u64) + Weight::from_ref_time(42_298_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) @@ -121,22 +114,19 @@ 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) - /// The range of component `b` is `[1, 3145728]`. + // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) fn schedule_code_upgrade(b: u32, ) -> Weight { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 b077e6d1a114..fdd7f3ba693b 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,8 +47,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // Minimum execution time: 32_032 nanoseconds. - Weight::from_ref_time(32_759_000 as u64) + Weight::from_ref_time(29_433_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -61,12 +60,11 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // 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)) + 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)) .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))) @@ -77,8 +75,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // Minimum execution time: 94_049 nanoseconds. - Weight::from_ref_time(95_684_000 as u64) + Weight::from_ref_time(90_622_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -88,8 +85,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // Minimum execution time: 28_824 nanoseconds. - Weight::from_ref_time(29_892_000 as u64) + Weight::from_ref_time(28_143_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 f4daa292146f..a0db531f8346 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,8 +49,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_block_number() -> Weight { - // Minimum execution time: 11_517 nanoseconds. - Weight::from_ref_time(12_084_000 as u64) + Weight::from_ref_time(10_912_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -59,8 +58,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_u32() -> Weight { - // Minimum execution time: 11_579 nanoseconds. - Weight::from_ref_time(11_966_000 as u64) + Weight::from_ref_time(10_724_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -69,8 +67,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_option_u32() -> Weight { - // Minimum execution time: 11_441 nanoseconds. - Weight::from_ref_time(11_834_000 as u64) + Weight::from_ref_time(10_750_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -79,14 +76,12 @@ 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 { - // Minimum execution time: 11_406 nanoseconds. - Weight::from_ref_time(11_717_000 as u64) + Weight::from_ref_time(10_812_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) @@ -94,8 +89,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_balance() -> Weight { - // Minimum execution time: 11_631 nanoseconds. - Weight::from_ref_time(11_937_000 as u64) + Weight::from_ref_time(11_100_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 01292d51a830..e45401e40eca 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,8 +46,7 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::disputes::WeightInfo for WeightInfo { // Storage: ParasDisputes Frozen (r:0 w:1) fn force_unfreeze() -> Weight { - // Minimum execution time: 4_367 nanoseconds. - Weight::from_ref_time(4_690_000 as u64) + Weight::from_ref_time(3_751_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 d0e777bcb33b..576b25ddd718 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-2022 Parity Technologies (UK) Ltd. +// Copyright 2017-2021 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: 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 +//! 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 // Executed Command: -// ./target/production/polkadot +// target/release/polkadot // benchmark -// pallet -// --chain=polkadot-dev +// --chain=kusama-dev // --steps=50 // --repeat=20 // --pallet=runtime_parachains::hrmp // --extrinsic=* // --execution=wasm // --wasm-execution=compiled +// --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/polkadot/src/weights/runtime_parachains_hrmp.rs +// --output=./runtime/kusama/src/weights/runtime_parachains_hrmp.rs + #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -54,8 +54,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_init_open_channel() -> Weight { - // Minimum execution time: 41_505 nanoseconds. - Weight::from_ref_time(42_119_000 as u64) + Weight::from_ref_time(54_952_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -67,8 +66,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_accept_open_channel() -> Weight { - // Minimum execution time: 41_067 nanoseconds. - Weight::from_ref_time(41_634_000 as u64) + Weight::from_ref_time(47_965_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -79,8 +77,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_close_channel() -> Weight { - // Minimum execution time: 37_960 nanoseconds. - Weight::from_ref_time(38_224_000 as u64) + Weight::from_ref_time(44_369_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -90,15 +87,12 @@ 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 { - // 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)) + 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)) .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))) @@ -115,12 +109,10 @@ 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 { - // 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)) + 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)) .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)) @@ -132,44 +124,37 @@ 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 { - // 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)) + 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)) .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 HrmpOpenChannelRequestsList (r:1 w:1) // Storage: Hrmp HrmpOpenChannelRequests (r:1 w:1) + // Storage: Hrmp HrmpOpenChannelRequestsList (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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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) @@ -180,9 +165,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 { - // Minimum execution time: 52_512 nanoseconds. - Weight::from_ref_time(53_287_000 as u64) - .saturating_add(T::DbWeight::get().reads(14 as u64)) + Weight::from_ref_time(104_771_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/polkadot/src/weights/runtime_parachains_initializer.rs b/runtime/polkadot/src/weights/runtime_parachains_initializer.rs index 8e1dfd5a459b..15480b1c48a7 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,10 +47,9 @@ 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 { - // 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)) + 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)) .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 5cf3b86dc854..bf81061f31ef 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,20 +52,18 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Configuration ActiveConfig (r:1 w:0) @@ -81,10 +79,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -93,18 +90,16 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 24_134 nanoseconds. - Weight::from_ref_time(24_730_000 as u64) + Weight::from_ref_time(23_313_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -112,18 +107,16 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 6_839 nanoseconds. - Weight::from_ref_time(6_966_000 as u64) + Weight::from_ref_time(6_423_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -132,8 +125,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras PvfActiveVoteMap (r:1 w:1) fn include_pvf_check_statement() -> Weight { - // Minimum execution time: 92_622 nanoseconds. - Weight::from_ref_time(94_867_000 as u64) + Weight::from_ref_time(95_444_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -146,8 +138,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: System Digest (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { - // Minimum execution time: 637_636 nanoseconds. - Weight::from_ref_time(647_421_000 as u64) + Weight::from_ref_time(629_670_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(104 as u64)) } @@ -161,8 +152,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:100) // Storage: Paras FutureCodeHash (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { - // Minimum execution time: 593_660 nanoseconds. - Weight::from_ref_time(601_930_000 as u64) + Weight::from_ref_time(594_898_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(204 as u64)) } @@ -173,8 +163,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PvfActiveVoteList (r:1 w:1) // Storage: Paras ActionsQueue (r:1 w:1) fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight { - // Minimum execution time: 498_509 nanoseconds. - Weight::from_ref_time(505_284_000 as u64) + Weight::from_ref_time(497_417_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -189,8 +178,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CurrentCodeHash (r:0 w:100) // Storage: Paras UpcomingParasGenesis (r:0 w:100) fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight { - // Minimum execution time: 669_947 nanoseconds. - Weight::from_ref_time(676_418_000 as u64) + Weight::from_ref_time(667_000_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 dc6535472ace..7e7b020d5dfb 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, 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("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,7 +60,6 @@ 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) @@ -78,11 +77,10 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().writes(18 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -97,7 +95,6 @@ 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) @@ -117,9 +114,8 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_bitfields() -> Weight { - // Minimum execution time: 343_456 nanoseconds. - Weight::from_ref_time(351_684_000 as u64) - .saturating_add(T::DbWeight::get().reads(27 as u64)) + Weight::from_ref_time(322_987_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) @@ -134,7 +130,6 @@ 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) @@ -156,11 +151,10 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -175,7 +169,6 @@ 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) @@ -198,9 +191,8 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_backed_candidate_code_upgrade() -> Weight { - // 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)) + Weight::from_ref_time(38_004_269_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/polkadot/src/xcm_config.rs b/runtime/polkadot/src/xcm_config.rs index 39f7a337479a..846d98a59d99 100644 --- a/runtime/polkadot/src/xcm_config.rs +++ b/runtime/polkadot/src/xcm_config.rs @@ -107,12 +107,10 @@ 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 System parachains as teleporters. -pub type TrustedTeleporters = - (xcm_builder::Case, xcm_builder::Case); +/// Polkadot Relay recognizes/respects the Statemint chain as a teleporter. +pub type TrustedTeleporters = (xcm_builder::Case,); match_types! { pub type OnlyParachains: impl Contains = { diff --git a/runtime/rococo/Cargo.toml b/runtime/rococo/Cargo.toml index 2b944a508f8f..b79b2cf444be 100644 --- a/runtime/rococo/Cargo.toml +++ b/runtime/rococo/Cargo.toml @@ -1,22 +1,22 @@ [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"] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } -serde = { version = "1.0.139", default-features = false } +serde = { version = "1.0.137", default-features = false } serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" 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, package = "sp-beefy" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } 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 } @@ -77,7 +77,6 @@ pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false } pallet-xcm-benchmarks = { path = "../../xcm/pallet-xcm-benchmarks", default-features = false, optional = true } frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } hex-literal = { version = "0.3.4" } @@ -93,12 +92,9 @@ xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default [dev-dependencies] tiny-keccak = { version = "2.0.2", features = ["keccak"] } keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" } -remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } separator = "0.4.1" serde_json = "1.0.81" -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -tokio = { version = "1.24.1", features = ["macros"] } [build-dependencies] substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -134,7 +130,7 @@ std = [ "pallet-collective/std", "pallet-elections-phragmen/std", "pallet-democracy/std", - "pallet-nis/std", + "pallet-gilt/std", "pallet-grandpa/std", "pallet-identity/std", "pallet-im-online/std", @@ -172,7 +168,6 @@ std = [ "sp-session/std", "runtime-common/std", "runtime-parachains/std", - "frame-try-runtime/std", "beefy-primitives/std", "rococo-runtime-constants/std", "xcm/std", @@ -193,7 +188,7 @@ runtime-benchmarks = [ "pallet-collective/runtime-benchmarks", "pallet-democracy/runtime-benchmarks", "pallet-elections-phragmen/runtime-benchmarks", - "pallet-nis/runtime-benchmarks", + "pallet-gilt/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", "pallet-identity/runtime-benchmarks", "pallet-im-online/runtime-benchmarks", @@ -219,14 +214,10 @@ runtime-benchmarks = [ ] try-runtime = [ "frame-executive/try-runtime", - "frame-try-runtime", "frame-system/try-runtime", "pallet-authority-discovery/try-runtime", "pallet-authorship/try-runtime", "pallet-balances/try-runtime", - "pallet-babe/try-runtime", - "pallet-beefy/try-runtime", - "pallet-beefy-mmr/try-runtime", "pallet-bounties/try-runtime", "pallet-child-bounties/try-runtime", "pallet-transaction-payment/try-runtime", @@ -238,9 +229,7 @@ try-runtime = [ "pallet-im-online/try-runtime", "pallet-indices/try-runtime", "pallet-membership/try-runtime", - "pallet-mmr/try-runtime", "pallet-multisig/try-runtime", - "pallet-nis/try-runtime", "pallet-offences/try-runtime", "pallet-preimage/try-runtime", "pallet-proxy/try-runtime", @@ -250,15 +239,13 @@ try-runtime = [ "pallet-society/try-runtime", "pallet-sudo/try-runtime", "pallet-staking/try-runtime", - "pallet-state-trie-migration/try-runtime", "pallet-timestamp/try-runtime", "pallet-tips/try-runtime", "pallet-treasury/try-runtime", "pallet-utility/try-runtime", "pallet-vesting/try-runtime", - "pallet-xcm/try-runtime", + "pallet-babe/try-runtime", "runtime-common/try-runtime", - "runtime-parachains/try-runtime", ] # When enabled, the runtime API will not be build. # diff --git a/runtime/rococo/constants/Cargo.toml b/runtime/rococo/constants/Cargo.toml index 9383a9de6c68..ec520965684b 100644 --- a/runtime/rococo/constants/Cargo.toml +++ b/runtime/rococo/constants/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "rococo-runtime-constants" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] smallvec = "1.8.0" @@ -10,17 +10,10 @@ 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", 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" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [features] default = ["std"] std = [ - "frame-support/std", - "primitives/std", - "runtime-common/std", - "sp-core/std", - "sp-runtime/std", - "sp-weights/std" + "sp-runtime/std" ] diff --git a/runtime/rococo/constants/src/weights/block_weights.rs b/runtime/rococo/constants/src/weights/block_weights.rs index 8d0f096561c4..c33546f80a94 100644 --- a/runtime/rococo/constants/src/weights/block_weights.rs +++ b/runtime/rococo/constants/src/weights/block_weights.rs @@ -1,26 +1,28 @@ -// Copyright 2017-2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Substrate. -// 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. +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 -// 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. +// 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. -// 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-11-16 (Y/M/D) +//! DATE: 2022-08-19 (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.0`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -32,32 +34,32 @@ // --weight-path=runtime/rococo/constants/src/weights/ // --warmup=10 // --repeat=100 -// --header=./file_header.txt -use sp_core::parameter_types; -use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; +use frame_support::{ + parameter_types, + weights::{constants::WEIGHT_PER_NANOS, Weight}, +}; parameter_types! { /// Time to execute an empty block. - /// Calculated by multiplying the *Average* with `1.0` and adding `0`. + /// Calculated by multiplying the *Average* with `1` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 5_285_413, 5_582_840 - /// Average: 5_334_883 - /// Median: 5_320_357 - /// Std-Dev: 54133.56 + /// Min, Max: 4_039_227, 4_394_160 + /// Average: 4_084_738 + /// Median: 4_077_180 + /// Std-Dev: 44325.29 /// /// Percentiles nanoseconds: - /// 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)); + /// 99th: 4_189_094 + /// 95th: 4_152_261 + /// 75th: 4_098_529 + pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(4_084_738); } #[cfg(test)] mod test_weights { - use sp_weights::constants; + use frame_support::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, @@ -68,12 +70,12 @@ mod test_weights { // At least 100 µs. assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + w.ref_time() >= 100u64 * constants::WEIGHT_PER_MICROS.ref_time(), "Weight should be at least 100 µs." ); // At most 50 ms. assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, + w.ref_time() <= 50u64 * constants::WEIGHT_PER_MILLIS.ref_time(), "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 0993985292d8..53255ef6e8b0 100644 --- a/runtime/rococo/constants/src/weights/extrinsic_weights.rs +++ b/runtime/rococo/constants/src/weights/extrinsic_weights.rs @@ -1,26 +1,27 @@ -// Copyright 2017-2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Substrate. -// 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. +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 -// 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. +// 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. -// 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-11-16 (Y/M/D) -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-05-25 (Y/M/D) //! //! 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.0`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -32,32 +33,32 @@ // --weight-path=runtime/rococo/constants/src/weights/ // --warmup=10 // --repeat=100 -// --header=./file_header.txt -use sp_core::parameter_types; -use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; +use frame_support::{ + parameter_types, + weights::{constants::WEIGHT_PER_NANOS, Weight}, +}; parameter_types! { /// Time to execute a NO-OP extrinsic, for example `System::remark`. - /// Calculated by multiplying the *Average* with `1.0` and adding `0`. + /// Calculated by multiplying the *Average* with `1` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 86_780, 87_929 - /// Average: 87_092 - /// Median: 87_029 - /// Std-Dev: 244.16 + /// Min, Max: 77_945, 79_607 + /// Average: 78_269 + /// Median: 78_211 + /// Std-Dev: 259.27 /// /// Percentiles nanoseconds: - /// 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)); + /// 99th: 79_591 + /// 95th: 78_730 + /// 75th: 78_272 + pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(78_269); } #[cfg(test)] mod test_weights { - use sp_weights::constants; + use frame_support::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, @@ -68,12 +69,12 @@ mod test_weights { // At least 10 µs. assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + w.ref_time() >= 10u64 * constants::WEIGHT_PER_MICROS.ref_time(), "Weight should be at least 10 µs." ); // At most 1 ms. assert!( - w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + w.ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "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 4338d928d807..dca7d348310c 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_REF_TIME_PER_NANOS, - write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "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 1d115d963fac..87867ebfe177 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_REF_TIME_PER_NANOS, - write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Write weight should be at most 1 ms." ); } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 38d5ce28d167..b230832b7454 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -20,7 +20,6 @@ // `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, @@ -56,7 +55,7 @@ use frame_support::{ construct_runtime, parameter_types, traits::{ Contains, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, - PrivilegeCmp, StorageMapShim, WithdrawReasons, + PrivilegeCmp, WithdrawReasons, }, weights::ConstantMultiplier, PalletId, RuntimeDebug, @@ -66,7 +65,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::{ConstU128, OpaqueMetadata, H256}; +use sp_core::{OpaqueMetadata, H256}; use sp_mmr_primitives as mmr; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, @@ -109,7 +108,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: 9330, + spec_version: 9310, impl_version: 0, #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, @@ -955,7 +954,7 @@ impl InstanceFilter for ProxyType { RuntimeCall::Scheduler(..) | RuntimeCall::Proxy(..) | RuntimeCall::Multisig(..) | - RuntimeCall::Nis(..) | + RuntimeCall::Gilt(..) | RuntimeCall::Registrar(paras_registrar::Call::register {..}) | RuntimeCall::Registrar(paras_registrar::Call::deregister {..}) | // Specifically omitting Registrar `swap` @@ -1187,57 +1186,33 @@ 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 NisBasePeriod: BlockNumber = 30 * DAYS; - pub const MinBid: Balance = 100 * UNITS; - pub MinReceipt: Perquintill = Perquintill::from_rational(1u64, 10_000_000u64); + 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 IntakePeriod: BlockNumber = 5 * MINUTES; - 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 "); + pub const MaxIntakeBids: u32 = 100; } -impl pallet_nis::Config for Runtime { - type WeightInfo = weights::pallet_nis::WeightInfo; +impl pallet_gilt::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type CurrencyBalance = Balance; - type FundOrigin = frame_system::EnsureSigned; - type Counterpart = NisCounterpartBalances; - type CounterpartAmount = WithMaximumOf>; + type AdminOrigin = MoreThanHalfCouncil; type Deficit = (); // Mint + type Surplus = (); // Burn type IgnoredIssuance = IgnoredIssuance; - 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 QueueCount = QueueCount; + type MaxQueueLen = MaxQueueLen; + type FifoQueueLen = FifoQueueLen; + type Period = GiltPeriod; + type MinFreeze = MinFreeze; type IntakePeriod = IntakePeriod; - type MaxIntakeWeight = MaxIntakeWeight; - type ThawThrottle = ThawThrottle; + type MaxIntakeBids = MaxIntakeBids; + type WeightInfo = weights::pallet_gilt::WeightInfo; } impl pallet_beefy::Config for Runtime { @@ -1249,7 +1224,7 @@ impl pallet_beefy::Config for Runtime { type MmrHash = ::Output; impl pallet_mmr::Config for Runtime { - const INDEXING_PREFIX: &'static [u8] = mmr::INDEXING_PREFIX; + const INDEXING_PREFIX: &'static [u8] = b"mmr"; type Hashing = Keccak256; type Hash = MmrHash; type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; @@ -1400,10 +1375,8 @@ construct_runtime! { // Tips module. Tips: pallet_tips::{Pallet, Call, Storage, Event} = 36, - // NIS pallet. - Nis: pallet_nis::{Pallet, Call, Storage, Event} = 38, -// pub type NisCounterpartInstance = pallet_balances::Instance2; - NisCounterpartBalances: pallet_balances:: = 45, + // Gilts pallet. + Gilt: pallet_gilt::{Pallet, Call, Storage, Event, Config} = 38, // Parachains pallets. Start indices at 50 to leave room. ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50, @@ -1476,18 +1449,6 @@ pub type SignedExtra = ( /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; - -/// All migrations that will run on the next runtime upgrade. -/// -/// Should be cleared after every release. -pub type Migrations = ( - pallet_balances::migration::MigrateToTrackInactive, - crowdloan::migration::MigrateToTrackInactive, - pallet_scheduler::migration::v4::CleanupAgendas, - parachains_disputes::migration::v1::MigrateToV1, - parachains_configuration::migration::v4::MigrateToV4, -); - /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -1495,7 +1456,15 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, + ( + // "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, + ), >; /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; @@ -1549,7 +1518,6 @@ mod benches { [runtime_parachains::ump, Ump] // Substrate [pallet_balances, Balances] - [pallet_balances, NisCounterpartBalances] [frame_benchmarking::baseline, Baseline::] [pallet_bounties, Bounties] [pallet_child_bounties, ChildBounties] @@ -1557,7 +1525,7 @@ mod benches { [pallet_collective, TechnicalCommittee] [pallet_democracy, Democracy] [pallet_elections_phragmen, PhragmenElection] - [pallet_nis, Nis] + [pallet_gilt, Gilt] [pallet_identity, Identity] [pallet_im_online, ImOnline] [pallet_indices, Indices] @@ -1755,10 +1723,6 @@ 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, @@ -1928,26 +1892,6 @@ sp_api::impl_runtime_apis! { } } - #[cfg(feature = "try-runtime")] - impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { - log::info!("try-runtime::on_runtime_upgrade rococo."); - let weight = Executive::try_runtime_upgrade(checks).unwrap(); - (weight, BlockWeights::get().max_block) - } - - 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() - } - } - #[cfg(feature = "runtime-benchmarks")] impl frame_benchmarking::Benchmark for Runtime { fn benchmark_metadata(extra: bool) -> ( @@ -2069,38 +2013,3 @@ sp_api::impl_runtime_apis! { } } } - -#[cfg(all(test, feature = "try-runtime"))] -mod remote_tests { - use super::*; - use frame_try_runtime::runtime_decl_for_TryRuntime::TryRuntime; - use remote_externalities::{ - Builder, Mode, OfflineConfig, OnlineConfig, SnapshotConfig, Transport, - }; - use std::env::var; - - #[tokio::test] - async fn run_migrations() { - sp_tracing::try_init_simple(); - let transport: Transport = - var("WS").unwrap_or("wss://rococo-rpc.polkadot.io:443".to_string()).into(); - let maybe_state_snapshot: Option = var("SNAP").map(|s| s.into()).ok(); - let mut ext = Builder::::default() - .mode(if let Some(state_snapshot) = maybe_state_snapshot { - Mode::OfflineOrElseOnline( - OfflineConfig { state_snapshot: state_snapshot.clone() }, - OnlineConfig { - transport, - state_snapshot: Some(state_snapshot), - ..Default::default() - }, - ) - } else { - Mode::Online(OnlineConfig { transport, ..Default::default() }) - }) - .build() - .await - .unwrap(); - ext.execute_with(|| Runtime::on_runtime_upgrade(true)); - } -} diff --git a/runtime/rococo/src/validator_manager.rs b/runtime/rococo/src/validator_manager.rs index 55b1878cbc7f..bb13bc823ca4 100644 --- a/runtime/rococo/src/validator_manager.rs +++ b/runtime/rococo/src/validator_manager.rs @@ -66,7 +66,6 @@ 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, @@ -83,7 +82,6 @@ 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 a567ef8e0758..93b1cf101dec 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 @@ -46,52 +46,46 @@ pub struct WeightInfo(PhantomData); impl frame_benchmarking::baseline::WeightInfo for WeightInfo { /// The range of component `i` is `[0, 1000000]`. fn addition(_i: u32, ) -> Weight { - // Minimum execution time: 104 nanoseconds. - Weight::from_ref_time(136_098 as u64) + (126_000 as Weight) } /// The range of component `i` is `[0, 1000000]`. fn subtraction(_i: u32, ) -> Weight { - // Minimum execution time: 101 nanoseconds. - Weight::from_ref_time(141_859 as u64) + (117_000 as Weight) } /// The range of component `i` is `[0, 1000000]`. fn multiplication(_i: u32, ) -> Weight { - // Minimum execution time: 106 nanoseconds. - Weight::from_ref_time(142_767 as u64) + (132_000 as Weight) } /// The range of component `i` is `[0, 1000000]`. fn division(_i: u32, ) -> Weight { - // Minimum execution time: 107 nanoseconds. - Weight::from_ref_time(145_251 as u64) + (132_000 as Weight) } /// The range of component `i` is `[0, 100]`. - fn hashing(_i: u32, ) -> Weight { - // Minimum execution time: 19_899_457 nanoseconds. - Weight::from_ref_time(20_127_184_762 as u64) + fn hashing(i: u32, ) -> Weight { + (19_331_786_000 as Weight) + // Standard Error: 113_000 + .saturating_add((410_000 as Weight).saturating_mul(i as Weight)) } - /// The range of component `i` is `[0, 100]`. + /// The range of component `i` is `[1, 100]`. fn sr25519_verification(i: u32, ) -> 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)) + (0 as Weight) + // Standard Error: 15_000 + .saturating_add((47_597_000 as Weight).saturating_mul(i as Weight)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[0, 1000]`. fn storage_read(i: u32, ) -> Weight { - // 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))) + (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))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[0, 1000]`. fn storage_write(i: u32, ) -> 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))) + (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))) } } diff --git a/runtime/rococo/src/weights/frame_system.rs b/runtime/rococo/src/weights/frame_system.rs index 5eaa7efcc22c..ec919ac946fc 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,59 +38,51 @@ #![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 { - // 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)) + fn remark(_b: u32, ) -> Weight { + Weight::from_ref_time(0 as u64) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - // Minimum execution time: 12_989 nanoseconds. - Weight::from_ref_time(13_133_000 as u64) + Weight::from_ref_time(0 as u64) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_758 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_ref_time(2_000 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 { - // Minimum execution time: 8_329 nanoseconds. - Weight::from_ref_time(8_576_000 as u64) + Weight::from_ref_time(8_025_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 `[0, 1000]`. + /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { - // 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)) + 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)) .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 `[0, 1000]`. + /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { - // 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)) + 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)) .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 `[0, 1000]`. + /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - // 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)) + 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)) .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 f1657f95aa19..712783bc3e6c 100644 --- a/runtime/rococo/src/weights/mod.rs +++ b/runtime/rococo/src/weights/mod.rs @@ -17,19 +17,18 @@ 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 9e6af9772680..16c0b483836e 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,50 +46,43 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - // Minimum execution time: 40_106 nanoseconds. - Weight::from_ref_time(40_750_000 as u64) + Weight::from_ref_time(40_460_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 { - // Minimum execution time: 30_737 nanoseconds. - Weight::from_ref_time(31_295_000 as u64) + Weight::from_ref_time(29_508_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 { - // Minimum execution time: 23_902 nanoseconds. - Weight::from_ref_time(24_338_000 as u64) + Weight::from_ref_time(22_142_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 { - // Minimum execution time: 26_492 nanoseconds. - Weight::from_ref_time(26_866_000 as u64) + Weight::from_ref_time(25_653_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 { - // Minimum execution time: 40_384 nanoseconds. - Weight::from_ref_time(41_000_000 as u64) + Weight::from_ref_time(39_913_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 { - // Minimum execution time: 35_115 nanoseconds. - Weight::from_ref_time(35_696_000 as u64) + Weight::from_ref_time(34_497_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 { - // Minimum execution time: 20_274 nanoseconds. - Weight::from_ref_time(20_885_000 as u64) + Weight::from_ref_time(19_749_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 deleted file mode 100644 index 70be4fc4b642..000000000000 --- a/runtime/rococo/src/weights/pallet_balances_nis_counterpart_balances.rs +++ /dev/null @@ -1,105 +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_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 d58fbd470a57..b8d21b4291ab 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights/ +// --output=./runtime/rococo/src/weights/pallet_bounties.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,49 +50,43 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 12_228 nanoseconds. - Weight::from_ref_time(12_490_000 as u64) + Weight::from_ref_time(9_776_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 { - // Minimum execution time: 11_809 nanoseconds. - Weight::from_ref_time(12_202_000 as u64) + Weight::from_ref_time(8_350_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 { - // Minimum execution time: 40_307 nanoseconds. - Weight::from_ref_time(41_570_000 as u64) + Weight::from_ref_time(34_804_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 { - // Minimum execution time: 28_140 nanoseconds. - Weight::from_ref_time(28_829_000 as u64) + Weight::from_ref_time(23_414_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 { - // Minimum execution time: 24_585 nanoseconds. - Weight::from_ref_time(24_912_000 as u64) + Weight::from_ref_time(20_148_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -101,8 +95,7 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: ChildBounties ChildrenCuratorFees (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn claim_bounty() -> Weight { - // Minimum execution time: 67_397 nanoseconds. - Weight::from_ref_time(67_955_000 as u64) + Weight::from_ref_time(64_115_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -111,8 +104,7 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_proposed() -> Weight { - // Minimum execution time: 44_196 nanoseconds. - Weight::from_ref_time(44_904_000 as u64) + Weight::from_ref_time(39_628_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -121,27 +113,24 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: Bounties BountyDescriptions (r:0 w:1) fn close_bounty_active() -> Weight { - // Minimum execution time: 52_882 nanoseconds. - Weight::from_ref_time(53_466_000 as u64) + Weight::from_ref_time(47_429_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 { - // Minimum execution time: 21_567 nanoseconds. - Weight::from_ref_time(21_852_000 as u64) + Weight::from_ref_time(17_322_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:2 w:2) - // Storage: System Account (r:4 w:4) - /// The range of component `b` is `[0, 100]`. + // Storage: Bounties Bounties (r:1 w:1) + // Storage: System Account (r:2 w:2) + /// The range of component `b` is `[1, 100]`. fn spend_funds(b: u32, ) -> Weight { - // 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)) + 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)) .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 07bb34136d6b..dd6dc2b1fd2b 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights/ +// --output=./runtime/rococo/src/weights/pallet_child_bounties.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -52,10 +52,9 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -63,8 +62,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 19_145 nanoseconds. - Weight::from_ref_time(19_689_000 as u64) + Weight::from_ref_time(14_114_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -72,8 +70,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 33_904 nanoseconds. - Weight::from_ref_time(34_574_000 as u64) + Weight::from_ref_time(26_807_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -81,16 +78,14 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 45_501 nanoseconds. - Weight::from_ref_time(46_140_000 as u64) + Weight::from_ref_time(39_640_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 { - // Minimum execution time: 27_533 nanoseconds. - Weight::from_ref_time(27_896_000 as u64) + Weight::from_ref_time(21_445_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -99,8 +94,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 66_026 nanoseconds. - Weight::from_ref_time(68_035_000 as u64) + Weight::from_ref_time(65_771_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -111,8 +105,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 50_711 nanoseconds. - Weight::from_ref_time(51_291_000 as u64) + Weight::from_ref_time(46_230_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -123,8 +116,7 @@ impl pallet_child_bounties::WeightInfo for WeightInfo Weight { - // Minimum execution time: 60_553 nanoseconds. - Weight::from_ref_time(61_323_000 as u64) + Weight::from_ref_time(56_148_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 7b5860d6fbd0..f50dce94e01f 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-2022 Parity Technologies (UK) Ltd. +// Copyright 2017-2021 Parity Technologies (UK) Ltd. // This file is part of Polkadot. // Polkadot is free software: you can redistribute it and/or modify @@ -16,14 +16,12 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! 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 +//! 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 // Executed Command: -// ./target/production/polkadot +// target/release/polkadot // benchmark -// pallet // --chain=rococo-dev // --steps=50 // --repeat=20 @@ -31,9 +29,11 @@ // --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,184 +44,132 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_collective`. 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 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)) + // 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)) .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: 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]`. + // Storage: Instance1Collective Members (r:1 w:0) fn execute(b: u32, m: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } - // 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]`. + // Storage: Instance1Collective Members (r:1 w:0) + // Storage: Instance1Collective ProposalOf (r:1 w:0) fn propose_execute(b: u32, m: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } - // 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]`. + // 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) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // 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]`. + // Storage: Instance1Collective Members (r:1 w:0) + // Storage: Instance1Collective Voting (r:1 w:1) fn vote(m: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // 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]`. + // 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) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // 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]`. + // 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) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // 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]`. + // 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) fn close_disapproved(m: u32, p: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // 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]`. + // 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) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // 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]`. + // Storage: Instance1Collective Proposals (r:1 w:1) + // Storage: Instance1Collective Voting (r:0 w:1) + // Storage: Instance1Collective ProposalOf (r:0 w:1) fn disapprove_proposal(p: u32, ) -> Weight { - // 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)) + 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)) .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 58cc7d2403e6..acdced982d94 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-2022 Parity Technologies (UK) Ltd. +// Copyright 2017-2021 Parity Technologies (UK) Ltd. // This file is part of Polkadot. // Polkadot is free software: you can redistribute it and/or modify @@ -16,14 +16,12 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! 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 +//! 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 // Executed Command: -// ./target/production/polkadot +// target/release/polkadot // benchmark -// pallet // --chain=rococo-dev // --steps=50 // --repeat=20 @@ -31,9 +29,11 @@ // --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,184 +44,132 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_collective`. 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 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)) + // 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)) .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: 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]`. + // Storage: Instance2Collective Members (r:1 w:0) fn execute(b: u32, m: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } - // 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]`. + // Storage: Instance2Collective Members (r:1 w:0) + // Storage: Instance2Collective ProposalOf (r:1 w:0) fn propose_execute(b: u32, m: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) } - // 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]`. + // 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) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // 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]`. + // Storage: Instance2Collective Members (r:1 w:0) + // Storage: Instance2Collective Voting (r:1 w:1) fn vote(m: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // 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]`. + // 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) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // 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]`. + // 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) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // 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]`. + // 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) fn close_disapproved(m: u32, p: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // 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]`. + // 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) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // 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]`. + // Storage: Instance2Collective Proposals (r:1 w:1) + // Storage: Instance2Collective Voting (r:0 w:1) + // Storage: Instance2Collective ProposalOf (r:0 w:1) fn disapprove_proposal(p: u32, ) -> Weight { - // 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)) + 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)) .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 6af048b15824..453385b594e7 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-03, 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: @@ -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,15 +49,13 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy Blacklist (r:1 w:0) // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - // Minimum execution time: 41_715 nanoseconds. - Weight::from_ref_time(42_171_000 as u64) + Weight::from_ref_time(41_783_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 { - // Minimum execution time: 38_899 nanoseconds. - Weight::from_ref_time(39_822_000 as u64) + Weight::from_ref_time(38_362_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -65,8 +63,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_new() -> Weight { - // Minimum execution time: 50_150 nanoseconds. - Weight::from_ref_time(50_792_000 as u64) + Weight::from_ref_time(48_307_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -74,16 +71,14 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_existing() -> Weight { - // Minimum execution time: 50_121 nanoseconds. - Weight::from_ref_time(50_881_000 as u64) + Weight::from_ref_time(48_500_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 { - // Minimum execution time: 21_124 nanoseconds. - Weight::from_ref_time(21_631_000 as u64) + Weight::from_ref_time(20_294_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -94,45 +89,39 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy Blacklist (r:0 w:1) fn blacklist() -> Weight { - // Minimum execution time: 75_761 nanoseconds. - Weight::from_ref_time(76_872_000 as u64) + Weight::from_ref_time(75_191_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 { - // Minimum execution time: 17_213 nanoseconds. - Weight::from_ref_time(17_695_000 as u64) + Weight::from_ref_time(16_369_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 { - // Minimum execution time: 4_818 nanoseconds. - Weight::from_ref_time(5_020_000 as u64) + Weight::from_ref_time(4_767_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - // Minimum execution time: 4_924 nanoseconds. - Weight::from_ref_time(5_123_000 as u64) + Weight::from_ref_time(4_866_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 { - // Minimum execution time: 20_512 nanoseconds. - Weight::from_ref_time(21_249_000 as u64) + Weight::from_ref_time(19_986_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 { - // Minimum execution time: 26_321 nanoseconds. - Weight::from_ref_time(26_795_000 as u64) + Weight::from_ref_time(25_291_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -140,15 +129,13 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:1 w:1) fn cancel_proposal() -> Weight { - // Minimum execution time: 64_453 nanoseconds. - Weight::from_ref_time(65_189_000 as u64) + Weight::from_ref_time(63_703_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 { - // Minimum execution time: 13_447 nanoseconds. - Weight::from_ref_time(14_027_000 as u64) + Weight::from_ref_time(13_235_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy LowestUnbaked (r:1 w:1) @@ -156,10 +143,9 @@ 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 { - // 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)) + 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)) .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)) @@ -172,10 +158,9 @@ 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 { - // 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)) + 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)) .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)) @@ -185,10 +170,9 @@ 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 { - // 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)) + 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)) .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)) @@ -198,10 +182,9 @@ 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 { - // 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)) + 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)) .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)) @@ -209,8 +192,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { } // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - // Minimum execution time: 5_512 nanoseconds. - Weight::from_ref_time(5_670_000 as u64) + Weight::from_ref_time(5_811_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Democracy VotingOf (r:1 w:1) @@ -218,10 +200,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -230,10 +211,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -241,10 +221,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -252,10 +231,9 @@ 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 { - // 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)) + 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)) .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 888489e52990..c4c015fe4412 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights/ +// --output=./runtime/rococo/src/weights/pallet_elections_phragmen.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,10 +51,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -65,10 +64,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -79,18 +77,16 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 39_806 nanoseconds. - Weight::from_ref_time(40_625_000 as u64) + Weight::from_ref_time(33_035_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -99,20 +95,18 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -122,21 +116,18 @@ 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 { - // Minimum execution time: 44_808 nanoseconds. - Weight::from_ref_time(45_734_000 as u64) + Weight::from_ref_time(41_502_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 { - // Minimum execution time: 34_375 nanoseconds. - Weight::from_ref_time(34_942_000 as u64) + Weight::from_ref_time(30_791_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) @@ -146,8 +137,7 @@ 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 { - // Minimum execution time: 58_977 nanoseconds. - Weight::from_ref_time(59_738_000 as u64) + Weight::from_ref_time(57_184_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -158,12 +148,11 @@ 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 `[0, 5000]`. + /// The range of component `d` is `[1, 5000]`. fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight { - // 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)) + 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)) .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))) @@ -181,16 +170,14 @@ 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 { - // 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)) + 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)) .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 new file mode 100644 index 000000000000..b873684e2311 --- /dev/null +++ b/runtime/rococo/src/weights/pallet_gilt.rs @@ -0,0 +1,119 @@ +// 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 56a6b55557fa..57c18f391f4b 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights/ +// --output=./runtime/rococo/src/weights/pallet_identity.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -47,35 +47,32 @@ 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 { - // 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)) + 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)) .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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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:2 w:2) - /// The range of component `s` is `[0, 100]`. + // Storage: Identity SuperOf (r:1 w:1) + /// The range of component `s` is `[1, 100]`. fn set_subs_new(s: u32, ) -> Weight { - // 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)) + 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)) .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)) @@ -83,13 +80,12 @@ 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:2) - /// The range of component `p` is `[0, 100]`. + // Storage: Identity SuperOf (r:0 w:1) + /// The range of component `p` is `[1, 100]`. fn set_subs_old(p: u32, ) -> Weight { - // 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)) + 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)) .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))) @@ -98,17 +94,16 @@ 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 `[0, 100]`. - /// The range of component `x` is `[0, 100]`. + /// The range of component `s` is `[1, 100]`. + /// The range of component `x` is `[1, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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))) @@ -116,71 +111,65 @@ 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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -189,17 +178,12 @@ 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 `[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)) + /// 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)) .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))) @@ -207,12 +191,11 @@ 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 `[0, 99]`. + /// The range of component `s` is `[1, 99]`. fn add_sub(s: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -220,10 +203,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -232,21 +214,19 @@ 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 { - // 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)) + 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)) .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 `[0, 99]`. + /// The range of component `s` is `[1, 99]`. fn quit_sub(s: u32, ) -> Weight { - // 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)) + 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)) .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 5893eab66f3f..7c4a52f28835 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,12 +53,11 @@ 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 { - // 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)) + 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)) .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 941844189792..18ccdaef5a97 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,38 +46,33 @@ pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - // Minimum execution time: 26_092 nanoseconds. - Weight::from_ref_time(26_602_000 as u64) + Weight::from_ref_time(24_885_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 { - // Minimum execution time: 33_052 nanoseconds. - Weight::from_ref_time(33_482_000 as u64) + Weight::from_ref_time(31_127_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 { - // Minimum execution time: 27_445 nanoseconds. - Weight::from_ref_time(27_664_000 as u64) + Weight::from_ref_time(26_683_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 { - // Minimum execution time: 27_087 nanoseconds. - Weight::from_ref_time(27_630_000 as u64) + Weight::from_ref_time(26_689_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 { - // Minimum execution time: 32_690 nanoseconds. - Weight::from_ref_time(33_186_000 as u64) + Weight::from_ref_time(31_554_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 5f11f882b063..9e2966caa9ba 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -38,101 +38,94 @@ #![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: 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) + // 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) /// The range of component `m` is `[1, 99]`. fn add_member(m: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // 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) + // 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) /// The range of component `m` is `[2, 100]`. fn remove_member(m: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // 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) + // 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) /// The range of component `m` is `[2, 100]`. fn swap_member(m: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // 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) + // 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) /// The range of component `m` is `[1, 100]`. fn reset_member(m: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } - // 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) + // 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) /// The range of component `m` is `[1, 100]`. fn change_key(m: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } - // Storage: TechnicalMembership Members (r:1 w:0) - // Storage: TechnicalMembership Prime (r:0 w:1) - // Storage: TechnicalCommittee Prime (r:0 w:1) + // Storage: Membership Members (r:1 w:0) + // Storage: Membership Prime (r:0 w:1) + // Storage: Collective Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn set_prime(m: u32, ) -> Weight { - // 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)) + 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)) .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) + // Storage: Membership Prime (r:0 w:1) + // Storage: Collective Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn clear_prime(m: u32, ) -> Weight { - // 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)) + 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)) .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 a0a9ad560d39..300e4704ef8d 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-26, 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: @@ -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: 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)) + // 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)) } // 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_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)) + // 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)) .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: 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)) + // 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)) .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_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)) + // 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)) .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_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)) + // 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)) .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_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)) + // 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)) .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_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)) + // 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)) .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 deleted file mode 100644 index f7126cc77d95..000000000000 --- a/runtime/rococo/src/weights/pallet_nis.rs +++ /dev/null @@ -1,122 +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_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 4d081f470a8e..1755de2b34e6 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-03, 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: @@ -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,10 +48,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -59,10 +58,9 @@ 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 { - // Minimum execution time: 21_455 nanoseconds. - Weight::from_ref_time(21_546_000 as u64) + Weight::from_ref_time(19_793_000 as u64) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(2_319 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_ref_time(2_115 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)) } @@ -70,76 +68,66 @@ 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 { - // Minimum execution time: 19_753 nanoseconds. - Weight::from_ref_time(20_023_000 as u64) + Weight::from_ref_time(18_854_000 as u64) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(2_316 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_ref_time(2_115 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 { - // Minimum execution time: 40_762 nanoseconds. - Weight::from_ref_time(41_809_000 as u64) + Weight::from_ref_time(38_886_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 { - // Minimum execution time: 28_346 nanoseconds. - Weight::from_ref_time(29_180_000 as u64) + Weight::from_ref_time(27_017_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 { - // Minimum execution time: 26_524 nanoseconds. - Weight::from_ref_time(28_080_000 as u64) + Weight::from_ref_time(25_041_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 { - // Minimum execution time: 13_976 nanoseconds. - Weight::from_ref_time(14_955_000 as u64) + Weight::from_ref_time(13_933_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 { - // Minimum execution time: 18_310 nanoseconds. - Weight::from_ref_time(19_036_000 as u64) + Weight::from_ref_time(17_760_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 { - // Minimum execution time: 9_617 nanoseconds. - Weight::from_ref_time(9_815_000 as u64) + Weight::from_ref_time(8_816_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 { - // Minimum execution time: 26_975 nanoseconds. - Weight::from_ref_time(28_077_000 as u64) + Weight::from_ref_time(25_068_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 { - // Minimum execution time: 9_407 nanoseconds. - Weight::from_ref_time(9_773_000 as u64) + Weight::from_ref_time(8_917_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 { - // Minimum execution time: 9_423 nanoseconds. - Weight::from_ref_time(9_784_000 as u64) + Weight::from_ref_time(8_915_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 123c7b5ca3c3..b671d154e768 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,10 +47,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Proxy Proxies (r:1 w:0) @@ -59,12 +58,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -73,12 +71,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -86,11 +83,12 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -100,42 +98,38 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -143,20 +137,18 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 996bc8bf3e24..ae9dc6426622 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-03, 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: @@ -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,61 +46,55 @@ pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler IncompleteSince (r:1 w:1) fn service_agendas_base() -> Weight { - // Minimum execution time: 5_124 nanoseconds. - Weight::from_ref_time(5_271_000 as u64) + Weight::from_ref_time(4_700_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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn service_task_base() -> Weight { - // Minimum execution time: 9_413 nanoseconds. - Weight::from_ref_time(9_664_000 as u64) + Weight::from_ref_time(12_316_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 { - // 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)) + 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)) .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 { - // Minimum execution time: 10_371 nanoseconds. - Weight::from_ref_time(10_726_000 as u64) + Weight::from_ref_time(13_408_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } + // Storage: Scheduler Agenda (r:1 w:1) fn service_task_periodic() -> Weight { - // Minimum execution time: 9_409 nanoseconds. - Weight::from_ref_time(9_630_000 as u64) + 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)) } fn execute_dispatch_signed() -> Weight { - // Minimum execution time: 4_306 nanoseconds. - Weight::from_ref_time(4_607_000 as u64) + Weight::from_ref_time(3_885_000 as u64) } fn execute_dispatch_unsigned() -> Weight { - // Minimum execution time: 4_322 nanoseconds. - Weight::from_ref_time(4_513_000 as u64) + Weight::from_ref_time(4_037_000 as u64) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -108,10 +102,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -119,10 +112,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -130,10 +122,9 @@ 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 { - // 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)) + 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)) .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 8a77164c8646..943b7d69c83e 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,13 +47,11 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Babe CurrentSlot (r:1 w:0) fn set() -> Weight { - // Minimum execution time: 9_895 nanoseconds. - Weight::from_ref_time(10_121_000 as u64) + Weight::from_ref_time(9_814_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 { - // Minimum execution time: 4_368 nanoseconds. - Weight::from_ref_time(4_472_000 as u64) + Weight::from_ref_time(3_846_000 as u64) } } diff --git a/runtime/rococo/src/weights/pallet_tips.rs b/runtime/rococo/src/weights/pallet_tips.rs index dfde0f04d210..9d737bfa5a1b 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights/ +// --output=./runtime/rococo/src/weights/pallet_tips.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -48,18 +48,16 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 29_249 nanoseconds. - Weight::from_ref_time(30_138_000 as u64) + Weight::from_ref_time(26_017_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -69,12 +67,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -82,10 +79,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -95,10 +91,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -106,10 +101,9 @@ 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 { - // 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)) + 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)) .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 ce22b3168c8a..09a0d3c819cb 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights/ +// --output=./runtime/rococo/src/weights/pallet_treasury.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,22 +45,19 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { fn spend() -> Weight { - // Minimum execution time: 165 nanoseconds. - Weight::from_ref_time(203_000 as u64) + Weight::from_ref_time(153_000 as u64) } // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - // Minimum execution time: 27_032 nanoseconds. - Weight::from_ref_time(27_706_000 as u64) + Weight::from_ref_time(25_149_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 { - // Minimum execution time: 38_448 nanoseconds. - Weight::from_ref_time(39_295_000 as u64) + Weight::from_ref_time(35_748_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -68,17 +65,15 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 8_743 nanoseconds. - Weight::from_ref_time(9_030_000 as u64) + Weight::from_ref_time(5_612_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -88,10 +83,9 @@ 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 { - // 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)) + 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)) .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 a6e201a51c5d..63396be46e9c 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,31 +46,26 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - // 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)) + 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)) } fn as_derivative() -> Weight { - // Minimum execution time: 6_311 nanoseconds. - Weight::from_ref_time(6_502_000 as u64) + Weight::from_ref_time(6_175_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - // 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)) + 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)) } fn dispatch_as() -> Weight { - // Minimum execution time: 14_094 nanoseconds. - Weight::from_ref_time(14_446_000 as u64) + Weight::from_ref_time(13_444_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - // 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)) + 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)) } } diff --git a/runtime/rococo/src/weights/pallet_vesting.rs b/runtime/rococo/src/weights/pallet_vesting.rs index 7966658038ad..32f07f0bc98b 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -32,7 +32,7 @@ // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt -// --output=./runtime/rococo/src/weights/ +// --output=./runtime/rococo/src/weights/pallet_vesting.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -49,12 +49,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -63,12 +62,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -78,12 +76,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -93,12 +90,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -108,12 +104,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -123,12 +118,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -138,12 +132,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -153,12 +146,11 @@ 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 { - // 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)) + 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)) .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 712dd1485ca1..61dae37398e1 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +47,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions AuctionInfo (r:1 w:1) // Storage: Auctions AuctionCounter (r:1 w:1) fn new_auction() -> Weight { - // Minimum execution time: 17_416 nanoseconds. - Weight::from_ref_time(18_096_000 as u64) + Weight::from_ref_time(16_735_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -60,8 +59,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn bid() -> Weight { - // Minimum execution time: 72_229 nanoseconds. - Weight::from_ref_time(73_919_000 as u64) + Weight::from_ref_time(71_032_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -69,28 +67,26 @@ 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:3600 w:3600) + // Storage: Auctions Winning (r:600 w:600) // Storage: Auctions ReservedAmounts (r:37 w:36) // Storage: System Account (r:36 w:36) - // Storage: Slots Leases (r:2 w:2) + // Storage: Slots Leases (r:7 w:7) // 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 { - // 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)) + 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)) } // Storage: Auctions ReservedAmounts (r:37 w:36) // Storage: System Account (r:36 w:36) - // Storage: Auctions Winning (r:0 w:3600) + // Storage: Auctions Winning (r:0 w:600) // Storage: Auctions AuctionInfo (r:0 w:1) fn cancel_auction() -> Weight { - // Minimum execution time: 4_725_156 nanoseconds. - Weight::from_ref_time(4_776_126_000 as u64) + Weight::from_ref_time(1_167_630_000 as u64) .saturating_add(T::DbWeight::get().reads(73 as u64)) - .saturating_add(T::DbWeight::get().writes(3673 as u64)) + .saturating_add(T::DbWeight::get().writes(673 as u64)) } } diff --git a/runtime/rococo/src/weights/runtime_common_claims.rs b/runtime/rococo/src/weights/runtime_common_claims.rs index 57d26efdd819..510592b2ed09 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! 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: @@ -52,8 +52,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim() -> Weight { - // Minimum execution time: 141_490 nanoseconds. - Weight::from_ref_time(143_346_000 as u64) + Weight::from_ref_time(139_399_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -62,8 +61,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Claims (r:0 w:1) // Storage: Claims Signing (r:0 w:1) fn mint_claim() -> Weight { - // Minimum execution time: 11_578 nanoseconds. - Weight::from_ref_time(12_009_000 as u64) + Weight::from_ref_time(9_284_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -75,8 +73,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn claim_attest() -> Weight { - // Minimum execution time: 145_783 nanoseconds. - Weight::from_ref_time(147_533_000 as u64) + Weight::from_ref_time(143_329_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(6 as u64)) } @@ -89,8 +86,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: System Account (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn attest() -> Weight { - // Minimum execution time: 66_536 nanoseconds. - Weight::from_ref_time(68_172_000 as u64) + Weight::from_ref_time(63_456_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -99,8 +95,7 @@ impl runtime_common::claims::WeightInfo for WeightInfo< // Storage: Claims Signing (r:1 w:2) // Storage: Claims Preclaims (r:1 w:1) fn move_claim() -> Weight { - // Minimum execution time: 21_997 nanoseconds. - Weight::from_ref_time(22_443_000 as u64) + Weight::from_ref_time(19_434_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 6483b3f0ff09..307647658c9b 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +49,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Paras ParaLifecycles (r:1 w:0) // Storage: Crowdloan NextFundIndex (r:1 w:1) fn create() -> Weight { - // Minimum execution time: 47_458 nanoseconds. - Weight::from_ref_time(48_284_000 as u64) + Weight::from_ref_time(48_864_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -62,8 +61,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan NewRaise (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - // Minimum execution time: 115_881 nanoseconds. - Weight::from_ref_time(117_274_000 as u64) + Weight::from_ref_time(117_031_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -71,18 +69,16 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) // Storage: unknown [0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0] (r:1 w:1) fn withdraw() -> Weight { - // Minimum execution time: 54_993 nanoseconds. - Weight::from_ref_time(56_432_000 as u64) + Weight::from_ref_time(54_273_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]`. + /// The range of component `k` is `[0, 500]`. fn refund(k: u32, ) -> Weight { - // 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)) + 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)) .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)) @@ -91,31 +87,27 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan Funds (r:1 w:1) // Storage: System Account (r:1 w:1) fn dissolve() -> Weight { - // Minimum execution time: 36_619 nanoseconds. - Weight::from_ref_time(37_672_000 as u64) + Weight::from_ref_time(35_254_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 { - // Minimum execution time: 24_847 nanoseconds. - Weight::from_ref_time(25_990_000 as u64) + Weight::from_ref_time(24_432_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 { - // Minimum execution time: 33_113 nanoseconds. - Weight::from_ref_time(33_692_000 as u64) + Weight::from_ref_time(30_987_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 { - // Minimum execution time: 25_008 nanoseconds. - Weight::from_ref_time(25_759_000 as u64) + Weight::from_ref_time(25_181_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -131,10 +123,9 @@ 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 { - // 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)) + 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)) .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 24f3d86ec899..5afe490ae1ff 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +48,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Registrar Paras (r:1 w:1) // Storage: Paras ParaLifecycles (r:1 w:0) fn reserve() -> Weight { - // Minimum execution time: 31_954 nanoseconds. - Weight::from_ref_time(32_827_000 as u64) + Weight::from_ref_time(31_235_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -64,8 +63,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn register() -> Weight { - // Minimum execution time: 7_424_164 nanoseconds. - Weight::from_ref_time(7_467_965_000 as u64) + Weight::from_ref_time(8_138_589_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -80,8 +78,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn force_register() -> Weight { - // Minimum execution time: 7_388_087 nanoseconds. - Weight::from_ref_time(7_440_577_000 as u64) + Weight::from_ref_time(8_105_111_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -92,8 +89,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar PendingSwap (r:0 w:1) fn deregister() -> Weight { - // Minimum execution time: 49_786 nanoseconds. - Weight::from_ref_time(51_246_000 as u64) + Weight::from_ref_time(50_153_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -105,14 +101,11 @@ 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 { - // Minimum execution time: 44_651 nanoseconds. - Weight::from_ref_time(46_029_000 as u64) + Weight::from_ref_time(44_912_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) @@ -121,22 +114,19 @@ 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) - /// The range of component `b` is `[1, 3145728]`. + // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) fn schedule_code_upgrade(b: u32, ) -> Weight { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 ca7c9242366e..53c4a94600ea 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +47,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // Minimum execution time: 30_856 nanoseconds. - Weight::from_ref_time(31_310_000 as u64) + Weight::from_ref_time(30_562_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -61,12 +60,11 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // 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)) + 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)) .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))) @@ -77,8 +75,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // Minimum execution time: 93_285 nanoseconds. - Weight::from_ref_time(94_547_000 as u64) + Weight::from_ref_time(92_497_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -88,8 +85,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // Minimum execution time: 29_974 nanoseconds. - Weight::from_ref_time(30_875_000 as u64) + Weight::from_ref_time(29_439_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 a530cab551b1..2ff2c3130b04 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +49,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_block_number() -> Weight { - // Minimum execution time: 12_888 nanoseconds. - Weight::from_ref_time(13_364_000 as u64) + Weight::from_ref_time(12_392_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -59,8 +58,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_u32() -> Weight { - // Minimum execution time: 12_480 nanoseconds. - Weight::from_ref_time(12_877_000 as u64) + Weight::from_ref_time(11_753_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -69,8 +67,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_option_u32() -> Weight { - // Minimum execution time: 12_415 nanoseconds. - Weight::from_ref_time(12_679_000 as u64) + Weight::from_ref_time(11_682_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -79,14 +76,12 @@ 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 { - // Minimum execution time: 12_662 nanoseconds. - Weight::from_ref_time(12_963_000 as u64) + Weight::from_ref_time(12_019_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) @@ -94,8 +89,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_balance() -> Weight { - // Minimum execution time: 12_757 nanoseconds. - Weight::from_ref_time(13_102_000 as u64) + Weight::from_ref_time(12_097_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 8116febf8208..9e1d5b373cf4 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +46,7 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::disputes::WeightInfo for WeightInfo { // Storage: ParasDisputes Frozen (r:0 w:1) fn force_unfreeze() -> Weight { - // Minimum execution time: 4_616 nanoseconds. - Weight::from_ref_time(4_769_000 as u64) + Weight::from_ref_time(4_507_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 9d376464f3bb..04db94e8f76a 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +54,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_init_open_channel() -> Weight { - // Minimum execution time: 40_837 nanoseconds. - Weight::from_ref_time(41_080_000 as u64) + Weight::from_ref_time(40_520_000 as u64) .saturating_add(T::DbWeight::get().reads(10 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -67,8 +66,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_accept_open_channel() -> Weight { - // Minimum execution time: 41_440 nanoseconds. - Weight::from_ref_time(41_921_000 as u64) + Weight::from_ref_time(39_646_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -79,8 +77,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_close_channel() -> Weight { - // Minimum execution time: 37_947 nanoseconds. - Weight::from_ref_time(38_595_000 as u64) + Weight::from_ref_time(36_691_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -93,12 +90,11 @@ 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 { - // 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)) + 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)) .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))) @@ -117,10 +113,9 @@ 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 { - // 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)) + 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)) .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)) @@ -134,10 +129,9 @@ 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 { - // 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)) + 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)) .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)) @@ -148,10 +142,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -159,17 +152,15 @@ 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 { - // 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)) + 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)) .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) @@ -180,9 +171,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 { - // Minimum execution time: 51_572 nanoseconds. - Weight::from_ref_time(52_378_000 as u64) - .saturating_add(T::DbWeight::get().reads(14 as u64)) + Weight::from_ref_time(104_771_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/rococo/src/weights/runtime_parachains_initializer.rs b/runtime/rococo/src/weights/runtime_parachains_initializer.rs index 183a6a88b70c..017ebf0c49b8 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,10 +47,9 @@ 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 { - // 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)) + 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)) .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 d11279842694..ebc8ea4c6909 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,20 +52,18 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Configuration ActiveConfig (r:1 w:0) @@ -81,10 +79,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -93,18 +90,16 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 24_940 nanoseconds. - Weight::from_ref_time(25_445_000 as u64) + Weight::from_ref_time(24_187_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -112,18 +107,16 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 7_165 nanoseconds. - Weight::from_ref_time(7_398_000 as u64) + Weight::from_ref_time(7_273_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -132,8 +125,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras PvfActiveVoteMap (r:1 w:1) fn include_pvf_check_statement() -> Weight { - // Minimum execution time: 93_512 nanoseconds. - Weight::from_ref_time(97_654_000 as u64) + Weight::from_ref_time(96_047_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -146,8 +138,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: System Digest (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { - // Minimum execution time: 635_584 nanoseconds. - Weight::from_ref_time(644_490_000 as u64) + Weight::from_ref_time(630_640_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(104 as u64)) } @@ -161,8 +152,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:100) // Storage: Paras FutureCodeHash (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { - // Minimum execution time: 599_005 nanoseconds. - Weight::from_ref_time(603_141_000 as u64) + Weight::from_ref_time(599_325_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(204 as u64)) } @@ -173,8 +163,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PvfActiveVoteList (r:1 w:1) // Storage: Paras ActionsQueue (r:1 w:1) fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight { - // Minimum execution time: 501_883 nanoseconds. - Weight::from_ref_time(505_926_000 as u64) + Weight::from_ref_time(505_499_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -189,8 +178,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CurrentCodeHash (r:0 w:100) // Storage: Paras UpcomingParasGenesis (r:0 w:100) fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight { - // Minimum execution time: 661_757 nanoseconds. - Weight::from_ref_time(669_986_000 as u64) + Weight::from_ref_time(668_669_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 a82fd5dbee60..ff9b55ec24b2 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -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,25 +46,22 @@ 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 { - // 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)) + 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)) } // 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 { - // Minimum execution time: 8_932 nanoseconds. - Weight::from_ref_time(9_171_000 as u64) + Weight::from_ref_time(8_658_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 { - // Minimum execution time: 25_129 nanoseconds. - Weight::from_ref_time(25_441_000 as u64) + Weight::from_ref_time(24_318_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 0bb3b1954f9b..e05ee85c6250 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"] } @@ -11,13 +11,13 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -serde = { version = "1.0.139", default-features = false } +serde = { version = "1.0.137", default-features = false } serde_derive = { version = "1.0.117", optional = true } 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, package = "sp-beefy" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", 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 } 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 d96de0a0f9c1..4f6f144c2b61 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] smallvec = "1.8.0" @@ -10,14 +10,10 @@ 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", 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" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [features] default = ["std"] std = [ - "sp-core/std", - "sp-runtime/std", - "sp-weights/std" + "sp-runtime/std" ] diff --git a/runtime/test-runtime/constants/src/weights/block_weights.rs b/runtime/test-runtime/constants/src/weights/block_weights.rs index ea8a341b58bb..c004307336d9 100644 --- a/runtime/test-runtime/constants/src/weights/block_weights.rs +++ b/runtime/test-runtime/constants/src/weights/block_weights.rs @@ -23,8 +23,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. - pub const BlockExecutionWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000)); + pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.saturating_mul(5_000_000); } #[cfg(test)] @@ -40,12 +39,12 @@ pub mod constants { // At least 100 µs. assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + w.ref_time() >= 100u64 * constants::WEIGHT_PER_MICROS.ref_time(), "Weight should be at least 100 µs." ); // At most 50 ms. assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, + w.ref_time() <= 50u64 * constants::WEIGHT_PER_MILLIS.ref_time(), "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 0512efb60e2a..3ce6b73d5844 100644 --- a/runtime/test-runtime/constants/src/weights/extrinsic_weights.rs +++ b/runtime/test-runtime/constants/src/weights/extrinsic_weights.rs @@ -23,8 +23,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. - pub const ExtrinsicBaseWeight: Weight = - Weight::from_ref_time(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000)); + pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.saturating_mul(125_000); } #[cfg(test)] @@ -40,12 +39,12 @@ pub mod constants { // At least 10 µs. assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + w.ref_time() >= 10u64 * constants::WEIGHT_PER_MICROS.ref_time(), "Weight should be at least 10 µs." ); // At most 1 ms. assert!( - w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + w.ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "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 4338d928d807..dca7d348310c 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_REF_TIME_PER_NANOS, - write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "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 1d115d963fac..87867ebfe177 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_REF_TIME_PER_NANOS, - write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "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 83c0b3b05b53..0210f1ecd8b7 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -348,7 +348,8 @@ impl pallet_staking::Config for Runtime { type SessionsPerEra = SessionsPerEra; type BondingDuration = BondingDuration; type SlashDeferDuration = SlashDeferDuration; - type AdminOrigin = frame_system::EnsureNever<()>; + // A majority of the council can cancel the slash. + type SlashCancelOrigin = frame_system::EnsureNever<()>; type SessionInterface = Self; type EraPayout = pallet_staking::ConvertCurve; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; @@ -620,7 +621,6 @@ 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,7 +635,6 @@ 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)?; @@ -653,7 +652,6 @@ pub mod pallet_test_notifier { Ok(()) } - #[pallet::call_index(2)] #[pallet::weight(1_000_000)] pub fn notification_received( origin: OriginFor, @@ -746,7 +744,6 @@ 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, @@ -933,10 +930,6 @@ 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 76f45bd5306e..d5efbb28d5a4 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"] } @@ -11,13 +11,13 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } rustc-hex = { version = "2.1.0", default-features = false } -serde = { version = "1.0.139", default-features = false } +serde = { version = "1.0.137", default-features = false } serde_derive = { version = "1.0.117", optional = true } 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, package = "sp-beefy" } +beefy-primitives = { 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 } 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", package = "frame-remote-externalities" } -tokio = { version = "1.24.1", features = ["macros"] } +remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" } +tokio = { version = "1.19.2", 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 c6fac15dca32..d891ea0aa3a3 100644 --- a/runtime/westend/constants/Cargo.toml +++ b/runtime/westend/constants/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "westend-runtime-constants" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [dependencies] smallvec = "1.8.0" @@ -10,17 +10,10 @@ 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", 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" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [features] default = ["std"] std = [ - "frame-support/std", - "primitives/std", - "runtime-common/std", - "sp-core/std", - "sp-runtime/std", - "sp-weights/std" + "sp-runtime/std" ] diff --git a/runtime/westend/constants/src/weights/block_weights.rs b/runtime/westend/constants/src/weights/block_weights.rs index dd2e447a409a..a1bcebc89654 100644 --- a/runtime/westend/constants/src/weights/block_weights.rs +++ b/runtime/westend/constants/src/weights/block_weights.rs @@ -1,26 +1,28 @@ -// Copyright 2017-2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Substrate. -// 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. +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 -// 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. +// 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. -// 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-11-16 (Y/M/D) +//! DATE: 2022-08-19 (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.0`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -32,32 +34,32 @@ // --weight-path=runtime/westend/constants/src/weights/ // --warmup=10 // --repeat=100 -// --header=./file_header.txt -use sp_core::parameter_types; -use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; +use frame_support::{ + parameter_types, + weights::{constants::WEIGHT_PER_NANOS, Weight}, +}; parameter_types! { /// Time to execute an empty block. - /// Calculated by multiplying the *Average* with `1.0` and adding `0`. + /// Calculated by multiplying the *Average* with `1` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 5_165_500, 5_422_922 - /// Average: 5_208_926 - /// Median: 5_196_288 - /// Std-Dev: 52022.65 + /// Min, Max: 4_929_970, 5_140_248 + /// Average: 4_970_728 + /// Median: 4_964_665 + /// Std-Dev: 37170.72 /// /// Percentiles nanoseconds: - /// 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)); + /// 99th: 5_084_427 + /// 95th: 5_039_369 + /// 75th: 4_991_020 + pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(4_970_728); } #[cfg(test)] mod test_weights { - use sp_weights::constants; + use frame_support::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, @@ -68,12 +70,12 @@ mod test_weights { // At least 100 µs. assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + w.ref_time() >= 100u64 * constants::WEIGHT_PER_MICROS.ref_time(), "Weight should be at least 100 µs." ); // At most 50 ms. assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, + w.ref_time() <= 50u64 * constants::WEIGHT_PER_MILLIS.ref_time(), "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 c077d17a73c9..9feca5255c82 100644 --- a/runtime/westend/constants/src/weights/extrinsic_weights.rs +++ b/runtime/westend/constants/src/weights/extrinsic_weights.rs @@ -1,26 +1,27 @@ -// Copyright 2017-2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. +// This file is part of Substrate. -// 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. +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 -// 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. +// 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. -// 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-11-16 (Y/M/D) -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-05-26 (Y/M/D) //! //! 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.0`, WEIGHT-ADD: `0` +//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1`, WEIGHT-ADD: `0` // Executed Command: // ./target/production/polkadot @@ -32,32 +33,32 @@ // --weight-path=runtime/westend/constants/src/weights/ // --warmup=10 // --repeat=100 -// --header=./file_header.txt -use sp_core::parameter_types; -use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; +use frame_support::{ + parameter_types, + weights::{constants::WEIGHT_PER_NANOS, Weight}, +}; parameter_types! { /// Time to execute a NO-OP extrinsic, for example `System::remark`. - /// Calculated by multiplying the *Average* with `1.0` and adding `0`. + /// Calculated by multiplying the *Average* with `1` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 86_956, 88_275 - /// Average: 87_248 - /// Median: 87_179 - /// Std-Dev: 239.45 + /// Min, Max: 78_822, 82_445 + /// Average: 79_088 + /// Median: 79_012 + /// Std-Dev: 422.84 /// /// Percentiles nanoseconds: - /// 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)); + /// 99th: 80_770 + /// 95th: 79_394 + /// 75th: 79_071 + pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(79_088); } #[cfg(test)] mod test_weights { - use sp_weights::constants; + use frame_support::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, @@ -68,12 +69,12 @@ mod test_weights { // At least 10 µs. assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, + w.ref_time() >= 10u64 * constants::WEIGHT_PER_MICROS.ref_time(), "Weight should be at least 10 µs." ); // At most 1 ms. assert!( - w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + w.ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "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 4338d928d807..dca7d348310c 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_REF_TIME_PER_NANOS, - write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "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 1d115d963fac..87867ebfe177 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_REF_TIME_PER_NANOS, - write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS, + read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(), + write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } @@ -42,20 +42,20 @@ pub mod constants { fn sane() { // At least 1 µs. assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, + W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, + W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Write weight should be at most 1 ms." ); } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index b10f76a2700d..a7930ff06ea6 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: 9330, + spec_version: 9310, 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: 14, state_version: 0, }; @@ -509,7 +509,8 @@ impl pallet_staking::Config for Runtime { type SessionsPerEra = SessionsPerEra; type BondingDuration = BondingDuration; type SlashDeferDuration = SlashDeferDuration; - type AdminOrigin = EnsureRoot; + // A majority of the council can cancel the slash. + type SlashCancelOrigin = EnsureRoot; type SessionInterface = Self; type EraPayout = pallet_staking::ConvertCurve; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; @@ -1211,18 +1212,6 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { } } -/// All migrations that will run on the next runtime upgrade. -/// -/// Should be cleared after every release. -pub type Migrations = ( - pallet_balances::migration::MigrateToTrackInactive, - crowdloan::migration::MigrateToTrackInactive, - pallet_scheduler::migration::v4::CleanupAgendas, - pallet_staking::migrations::v13::MigrateToV13, - parachains_disputes::migration::v1::MigrateToV1, - parachains_configuration::migration::v4::MigrateToV4, -); - /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -1233,7 +1222,16 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, + ( + // "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, + ), >; /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; @@ -1461,10 +1459,7 @@ 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) } @@ -1636,21 +1631,21 @@ sp_api::impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { + fn on_runtime_upgrade() -> (Weight, Weight) { log::info!("try-runtime::on_runtime_upgrade westend."); - let weight = Executive::try_runtime_upgrade(checks).unwrap(); + let weight = Executive::try_runtime_upgrade().unwrap(); (weight, BlockWeights::get().max_block) } - 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() + 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") } } @@ -1838,6 +1833,6 @@ mod remote_tests { .build() .await .unwrap(); - ext.execute_with(|| Runtime::on_runtime_upgrade(true)); + ext.execute_with(|| Runtime::on_runtime_upgrade()); } } diff --git a/runtime/westend/src/weights/frame_election_provider_support.rs b/runtime/westend/src/weights/frame_election_provider_support.rs index 6b498f069353..9725bac63a4a 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,22 +48,20 @@ 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 { - // 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)) + 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)) } /// 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 { - // 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)) + 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)) } } diff --git a/runtime/westend/src/weights/frame_system.rs b/runtime/westend/src/weights/frame_system.rs index 2d42b9df80ab..fd6b7ee31748 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -38,59 +38,51 @@ #![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 { - // 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)) + fn remark(_b: u32, ) -> Weight { + Weight::from_ref_time(0 as u64) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - // Minimum execution time: 12_934 nanoseconds. - Weight::from_ref_time(13_170_000 as u64) + Weight::from_ref_time(0 as u64) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_758 as u64).saturating_mul(b as u64)) + .saturating_add(Weight::from_ref_time(2_000 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 { - // Minimum execution time: 8_550 nanoseconds. - Weight::from_ref_time(8_837_000 as u64) + Weight::from_ref_time(7_880_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 `[0, 1000]`. + /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { - // 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)) + 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)) .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 `[0, 1000]`. + /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { - // 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)) + 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)) .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 `[0, 1000]`. + /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - // 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)) + 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)) .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 3888392da0e3..29653d3f7b9d 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +49,7 @@ 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 { - // Minimum execution time: 64_437 nanoseconds. - Weight::from_ref_time(65_304_000 as u64) + Weight::from_ref_time(60_419_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -59,8 +58,7 @@ 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 { - // Minimum execution time: 63_586 nanoseconds. - Weight::from_ref_time(64_301_000 as u64) + Weight::from_ref_time(59_082_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -70,8 +68,7 @@ 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 { - // Minimum execution time: 63_247 nanoseconds. - Weight::from_ref_time(64_507_000 as u64) + Weight::from_ref_time(59_623_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 5192faad0141..c91b0c4c540a 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,50 +46,43 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - // Minimum execution time: 42_147 nanoseconds. - Weight::from_ref_time(42_914_000 as u64) + Weight::from_ref_time(39_143_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 { - // Minimum execution time: 31_276 nanoseconds. - Weight::from_ref_time(31_701_000 as u64) + Weight::from_ref_time(30_428_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 { - // Minimum execution time: 24_241 nanoseconds. - Weight::from_ref_time(24_686_000 as u64) + Weight::from_ref_time(22_859_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 { - // Minimum execution time: 26_470 nanoseconds. - Weight::from_ref_time(27_095_000 as u64) + Weight::from_ref_time(25_454_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 { - // Minimum execution time: 41_420 nanoseconds. - Weight::from_ref_time(42_067_000 as u64) + Weight::from_ref_time(40_355_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 { - // Minimum execution time: 35_961 nanoseconds. - Weight::from_ref_time(36_373_000 as u64) + Weight::from_ref_time(34_280_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 { - // Minimum execution time: 20_742 nanoseconds. - Weight::from_ref_time(21_132_000 as u64) + Weight::from_ref_time(19_325_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 6a444f269836..01e0f1363280 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,38 +53,33 @@ 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 { - // Minimum execution time: 15_062 nanoseconds. - Weight::from_ref_time(15_395_000 as u64) + Weight::from_ref_time(14_647_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 { - // Minimum execution time: 14_243 nanoseconds. - Weight::from_ref_time(14_487_000 as u64) + Weight::from_ref_time(12_864_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 { - // Minimum execution time: 13_434 nanoseconds. - Weight::from_ref_time(13_686_000 as u64) + Weight::from_ref_time(12_700_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 { - // Minimum execution time: 29_144 nanoseconds. - Weight::from_ref_time(29_867_000 as u64) + Weight::from_ref_time(27_641_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 { - // Minimum execution time: 23_284 nanoseconds. - Weight::from_ref_time(23_541_000 as u64) + Weight::from_ref_time(21_520_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -93,11 +88,12 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) @@ -113,12 +109,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -129,8 +124,7 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1) // Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1) fn submit() -> Weight { - // Minimum execution time: 57_338 nanoseconds. - Weight::from_ref_time(58_651_000 as u64) + Weight::from_ref_time(55_478_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -145,13 +139,16 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -163,13 +160,16 @@ 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 { - // 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)) + 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)) .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 521ea577c18e..1fc7a2580978 100644 --- a/runtime/westend/src/weights/pallet_fast_unstake.rs +++ b/runtime/westend/src/weights/pallet_fast_unstake.rs @@ -16,21 +16,22 @@ //! Autogenerated weights for `pallet_fast_unstake` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-28, 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_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/ @@ -49,57 +50,53 @@ 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: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) + // 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) fn on_idle_unstake() -> Weight { - // 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)) + 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)) } // 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:65 w:64) + // Storage: FastUnstake Queue (r:2 w:1) // 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64))) - .saturating_add(T::DbWeight::get().writes(66 as u64)) + .saturating_add(T::DbWeight::get().writes(3 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 ListNodes (r:1 w:1) // 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 { - // 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)) + 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)) } // Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0) // Storage: Staking Ledger (r:1 w:0) @@ -107,15 +104,13 @@ impl pallet_fast_unstake::WeightInfo for WeightInfo // Storage: FastUnstake Head (r:1 w:0) // Storage: FastUnstake CounterForQueue (r:1 w:1) fn deregister() -> Weight { - // Minimum execution time: 50_138 nanoseconds. - Weight::from_ref_time(51_813_000 as u64) + Weight::from_ref_time(40_994_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 { - // Minimum execution time: 4_661 nanoseconds. - Weight::from_ref_time(4_778_000 as u64) + Weight::from_ref_time(4_420_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 90d07dc99e2e..0fdbe3edc23c 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,35 +47,32 @@ 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 { - // 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)) + 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)) .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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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:2 w:2) - /// The range of component `s` is `[0, 100]`. + // Storage: Identity SuperOf (r:1 w:1) + /// The range of component `s` is `[1, 100]`. fn set_subs_new(s: u32, ) -> Weight { - // 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)) + 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)) .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)) @@ -83,13 +80,12 @@ 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:2) - /// The range of component `p` is `[0, 100]`. + // Storage: Identity SuperOf (r:0 w:1) + /// The range of component `p` is `[1, 100]`. fn set_subs_old(p: u32, ) -> Weight { - // 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)) + 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)) .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))) @@ -98,17 +94,16 @@ 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 `[0, 100]`. - /// The range of component `x` is `[0, 100]`. + /// The range of component `s` is `[1, 100]`. + /// The range of component `x` is `[1, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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))) @@ -116,71 +111,65 @@ 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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 `[0, 100]`. + /// The range of component `x` is `[1, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -189,17 +178,12 @@ 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 `[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)) + /// 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)) .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))) @@ -207,12 +191,11 @@ 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 `[0, 99]`. + /// The range of component `s` is `[1, 99]`. fn add_sub(s: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -220,10 +203,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -232,21 +214,19 @@ 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 { - // 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)) + 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)) .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 `[0, 99]`. + /// The range of component `s` is `[1, 99]`. fn quit_sub(s: u32, ) -> Weight { - // 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)) + 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)) .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 aa800c3832fd..7d83ee69c824 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,12 +52,11 @@ 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 { - // 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)) + 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)) .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 9194fd0e9d92..48dcf2d0c1ea 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,38 +46,33 @@ pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { // Storage: Indices Accounts (r:1 w:1) fn claim() -> Weight { - // Minimum execution time: 27_006 nanoseconds. - Weight::from_ref_time(27_436_000 as u64) + Weight::from_ref_time(25_477_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 { - // Minimum execution time: 32_199 nanoseconds. - Weight::from_ref_time(32_827_000 as u64) + Weight::from_ref_time(32_237_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 { - // Minimum execution time: 27_961 nanoseconds. - Weight::from_ref_time(28_227_000 as u64) + Weight::from_ref_time(27_019_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 { - // Minimum execution time: 27_795 nanoseconds. - Weight::from_ref_time(28_425_000 as u64) + Weight::from_ref_time(26_805_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 { - // Minimum execution time: 33_395 nanoseconds. - Weight::from_ref_time(33_824_000 as u64) + Weight::from_ref_time(32_450_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 d4ee0291febd..e15f0973adae 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-26, 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("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: 15_271 nanoseconds. - Weight::from_ref_time(15_773_573 as u64) + // Minimum execution time: 14_417 nanoseconds. + Weight::from_ref_time(14_932_092 as u64) // Standard Error: 2 - .saturating_add(Weight::from_ref_time(579 as u64).saturating_mul(z as u64)) + .saturating_add(Weight::from_ref_time(482 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_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)) + // 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)) .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: 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)) + // 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)) .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: 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)) + // 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)) .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_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)) + // 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)) .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: 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)) + // 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)) .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: 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)) + // 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)) .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 a8ac042edc76..aee227af0e1c 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,19 +47,18 @@ 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 { - // Minimum execution time: 142_360 nanoseconds. - Weight::from_ref_time(143_773_000 as u64) + Weight::from_ref_time(138_670_000 as u64) .saturating_add(T::DbWeight::get().reads(17 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -67,14 +66,13 @@ 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 Bonded (r:1 w:0) // Storage: Staking Ledger (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 bond_extra_transfer() -> Weight { - // Minimum execution time: 140_103 nanoseconds. - Weight::from_ref_time(141_199_000 as u64) + Weight::from_ref_time(138_922_000 as u64) .saturating_add(T::DbWeight::get().reads(14 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -82,14 +80,13 @@ 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 Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) + // Storage: Staking Bonded (r:1 w:0) // 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 { - // Minimum execution time: 142_664 nanoseconds. - Weight::from_ref_time(145_348_000 as u64) + Weight::from_ref_time(139_673_000 as u64) .saturating_add(T::DbWeight::get().reads(13 as u64)) .saturating_add(T::DbWeight::get().writes(12 as u64)) } @@ -98,15 +95,13 @@ 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 { - // Minimum execution time: 54_355 nanoseconds. - Weight::from_ref_time(54_950_000 as u64) + Weight::from_ref_time(55_421_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) @@ -114,53 +109,49 @@ 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 { - // Minimum execution time: 142_734 nanoseconds. - Weight::from_ref_time(143_730_000 as u64) + Weight::from_ref_time(140_347_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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 Bonded (r:1 w:1) // Storage: Staking Ledger (r:1 w:1) + // Storage: Staking Bonded (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) @@ -176,26 +167,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 { - // Minimum execution time: 146_514 nanoseconds. - Weight::from_ref_time(150_150_119 as u64) + 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)) .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 Bonded (r:1 w:1) // Storage: Staking Ledger (r:1 w:1) + // Storage: Staking Bonded (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) @@ -204,40 +197,36 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: NominationPools BondedPools (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn create() -> Weight { - // Minimum execution time: 129_468 nanoseconds. - Weight::from_ref_time(130_634_000 as u64) - .saturating_add(T::DbWeight::get().reads(21 as u64)) + Weight::from_ref_time(131_800_000 as u64) + .saturating_add(T::DbWeight::get().reads(22 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 39_824 nanoseconds. - Weight::from_ref_time(40_580_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) + Weight::from_ref_time(35_755_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: NominationPools BondedPools (r:1 w:0) @@ -245,10 +234,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -258,19 +246,16 @@ 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 { - // Minimum execution time: 6_763 nanoseconds. - Weight::from_ref_time(7_029_000 as u64) + Weight::from_ref_time(7_744_000 as u64) .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: NominationPools BondedPools (r:1 w:1) fn update_roles() -> Weight { - // Minimum execution time: 25_305 nanoseconds. - Weight::from_ref_time(26_044_000 as u64) + Weight::from_ref_time(26_398_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) @@ -279,9 +264,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - // Minimum execution time: 66_812 nanoseconds. - Weight::from_ref_time(67_339_000 as u64) - .saturating_add(T::DbWeight::get().reads(9 as u64)) + Weight::from_ref_time(61_574_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 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 7327bfd49255..97f066d7d40b 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-03, 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("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,10 +48,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -59,10 +58,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -70,76 +68,66 @@ 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 { - // Minimum execution time: 20_420 nanoseconds. - Weight::from_ref_time(20_617_000 as u64) + Weight::from_ref_time(19_203_000 as u64) // Standard Error: 1 - .saturating_add(Weight::from_ref_time(2_368 as u64).saturating_mul(s as u64)) + .saturating_add(Weight::from_ref_time(2_115 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 { - // Minimum execution time: 40_628 nanoseconds. - Weight::from_ref_time(42_418_000 as u64) + Weight::from_ref_time(41_563_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 { - // Minimum execution time: 27_950 nanoseconds. - Weight::from_ref_time(28_924_000 as u64) + Weight::from_ref_time(28_606_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 { - // Minimum execution time: 26_777 nanoseconds. - Weight::from_ref_time(28_552_000 as u64) + Weight::from_ref_time(27_447_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 { - // Minimum execution time: 14_306 nanoseconds. - Weight::from_ref_time(15_302_000 as u64) + Weight::from_ref_time(14_862_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 { - // Minimum execution time: 18_820 nanoseconds. - Weight::from_ref_time(19_834_000 as u64) + Weight::from_ref_time(18_337_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 { - // Minimum execution time: 9_887 nanoseconds. - Weight::from_ref_time(10_209_000 as u64) + Weight::from_ref_time(9_074_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 { - // Minimum execution time: 26_855 nanoseconds. - Weight::from_ref_time(28_503_000 as u64) + Weight::from_ref_time(28_192_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 { - // Minimum execution time: 9_450 nanoseconds. - Weight::from_ref_time(9_924_000 as u64) + Weight::from_ref_time(9_012_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 { - // Minimum execution time: 9_420 nanoseconds. - Weight::from_ref_time(9_972_000 as u64) + Weight::from_ref_time(8_961_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 8a1fa3eeba47..5713094eb5c5 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,10 +47,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) } // Storage: Proxy Proxies (r:1 w:0) @@ -59,12 +58,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -73,12 +71,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -87,12 +84,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -102,42 +98,38 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -145,20 +137,18 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 571f925d8aba..f325f2311093 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-10-03, 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("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,61 +46,55 @@ pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { // Storage: Scheduler IncompleteSince (r:1 w:1) fn service_agendas_base() -> Weight { - // Minimum execution time: 4_854 nanoseconds. - Weight::from_ref_time(5_006_000 as u64) + Weight::from_ref_time(4_399_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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn service_task_base() -> Weight { - // Minimum execution time: 10_249 nanoseconds. - Weight::from_ref_time(10_443_000 as u64) + Weight::from_ref_time(12_651_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 { - // 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)) + 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)) .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 { - // Minimum execution time: 11_503 nanoseconds. - Weight::from_ref_time(11_763_000 as u64) + Weight::from_ref_time(13_929_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } + // Storage: Scheduler Agenda (r:1 w:1) fn service_task_periodic() -> Weight { - // Minimum execution time: 10_001 nanoseconds. - Weight::from_ref_time(10_201_000 as u64) + 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)) } fn execute_dispatch_signed() -> Weight { - // Minimum execution time: 4_582 nanoseconds. - Weight::from_ref_time(4_733_000 as u64) + Weight::from_ref_time(4_026_000 as u64) } fn execute_dispatch_unsigned() -> Weight { - // Minimum execution time: 4_671 nanoseconds. - Weight::from_ref_time(4_762_000 as u64) + Weight::from_ref_time(4_078_000 as u64) } // Storage: Scheduler Agenda (r:1 w:1) /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -108,10 +102,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -119,10 +112,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -130,10 +122,9 @@ 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 { - // 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)) + 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)) .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 46e42d078c10..4349e1aecd06 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +48,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:6 w:6) fn set_keys() -> Weight { - // Minimum execution time: 51_716 nanoseconds. - Weight::from_ref_time(52_472_000 as u64) + Weight::from_ref_time(50_037_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -57,8 +56,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:6) fn purge_keys() -> Weight { - // Minimum execution time: 39_736 nanoseconds. - Weight::from_ref_time(41_579_000 as u64) + Weight::from_ref_time(38_037_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 7fe992e49ce3..86f33610fafb 100644 --- a/runtime/westend/src/weights/pallet_staking.rs +++ b/runtime/westend/src/weights/pallet_staking.rs @@ -16,23 +16,21 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: -// /home/benchbot/cargo_target_dir/production/polkadot +// ./target/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/ @@ -40,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_staking`. @@ -49,13 +47,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 { - // 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)) + 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)) } // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) @@ -63,10 +61,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra() -> Weight { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Nominators (r:1 w:0) @@ -78,10 +75,9 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListBags (r:2 w:2) fn unbond() -> Weight { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -89,12 +85,11 @@ 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 { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -109,16 +104,11 @@ 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 { - // 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()))) + 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)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinValidatorBond (r:1 w:0) @@ -132,22 +122,20 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForValidators (r:1 w:1) fn validate() -> Weight { - // 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)) + 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)) } // 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 { - // 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()))) + 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))) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinNominatorBond (r:1 w:0) @@ -162,13 +150,12 @@ 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 { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Validators (r:1 w:0) @@ -178,59 +165,51 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - // 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)) + 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)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Payee (r:0 w:1) fn set_payee() -> Weight { - // 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)) + 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)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking Ledger (r:2 w:2) fn set_controller() -> Weight { - // 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)) + 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)) } // Storage: Staking ValidatorCount (r:0 w:1) fn set_validator_count() -> Weight { - // Minimum execution time: 4_658 nanoseconds. - Weight::from_ref_time(4_781_000) - .saturating_add(T::DbWeight::get().writes(1)) + Weight::from_ref_time(4_350_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking ForceEra (r:0 w:1) fn force_no_eras() -> Weight { - // Minimum execution time: 4_881 nanoseconds. - Weight::from_ref_time(5_148_000) - .saturating_add(T::DbWeight::get().writes(1)) + Weight::from_ref_time(4_465_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era() -> Weight { - // Minimum execution time: 4_713 nanoseconds. - Weight::from_ref_time(4_874_000) - .saturating_add(T::DbWeight::get().writes(1)) + Weight::from_ref_time(4_503_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era_always() -> Weight { - // Minimum execution time: 4_864 nanoseconds. - Weight::from_ref_time(5_081_000) - .saturating_add(T::DbWeight::get().writes(1)) + Weight::from_ref_time(4_480_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Staking Invulnerables (r:0 w:1) /// The range of component `v` is `[0, 1000]`. fn set_invulnerables(v: u32, ) -> Weight { - // 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)) + 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)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking SlashingSpans (r:1 w:0) @@ -247,64 +226,62 @@ 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 { - // 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()))) + 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))) } // Storage: Staking UnappliedSlashes (r:1 w:1) /// The range of component `s` is `[1, 1000]`. fn cancel_deferred_slash(s: u32, ) -> Weight { - // 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)) + 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)) } // 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:1 w:0) + // Storage: Staking Bonded (r:2 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:1 w:0) - // Storage: System Account (r:1 w:1) - /// The range of component `n` is `[0, 64]`. + // Storage: Staking Payee (r:2 w:0) + // Storage: System Account (r:2 w:2) + /// The range of component `n` is `[1, 64]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { - // 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()))) + 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))) } // 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:1 w:0) - // Storage: Staking Ledger (r:1 w:1) + // Storage: Staking Bonded (r:2 w:0) + // Storage: Staking Ledger (r:2 w:2) // 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: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]`. + // Storage: Staking Payee (r:2 w:0) + // Storage: System Account (r:2 w:2) + // Storage: Balances Locks (r:2 w:2) + /// The range of component `n` is `[1, 64]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { - // 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()))) + 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))) } // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) @@ -314,12 +291,11 @@ 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 { - // 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)) + 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)) } // Storage: System Account (r:1 w:1) // Storage: Staking Bonded (r:1 w:1) @@ -336,15 +312,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 { - // 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()))) + 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))) } // 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) @@ -356,28 +332,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 `[0, 100]`. + /// The range of component `n` is `[1, 100]`. fn new_era(v: u32, n: u32, ) -> Weight { - // 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()))) + 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))) } // 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) @@ -385,33 +361,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]`. - 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)) + /// 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)) } - // 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 { - // 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)) + 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)) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -420,9 +396,8 @@ 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 { - // Minimum execution time: 8_259 nanoseconds. - Weight::from_ref_time(8_629_000) - .saturating_add(T::DbWeight::get().writes(6)) + Weight::from_ref_time(7_514_000 as u64) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -431,9 +406,8 @@ 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 { - // Minimum execution time: 7_335 nanoseconds. - Weight::from_ref_time(7_594_000) - .saturating_add(T::DbWeight::get().writes(6)) + Weight::from_ref_time(7_012_000 as u64) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) @@ -446,23 +420,15 @@ impl pallet_staking::WeightInfo for WeightInfo { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill_other() -> Weight { - // 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)) + 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)) } // Storage: Staking MinCommission (r:1 w:0) // Storage: Staking Validators (r:1 w:1) fn force_apply_min_commission() -> Weight { - // 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)) + 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)) } } diff --git a/runtime/westend/src/weights/pallet_timestamp.rs b/runtime/westend/src/weights/pallet_timestamp.rs index 141e2f3d924b..ba2cce1c5981 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,13 +47,11 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Storage: Babe CurrentSlot (r:1 w:0) fn set() -> Weight { - // Minimum execution time: 10_153 nanoseconds. - Weight::from_ref_time(10_579_000 as u64) + Weight::from_ref_time(9_508_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 { - // Minimum execution time: 4_289 nanoseconds. - Weight::from_ref_time(4_440_000 as u64) + Weight::from_ref_time(3_854_000 as u64) } } diff --git a/runtime/westend/src/weights/pallet_utility.rs b/runtime/westend/src/weights/pallet_utility.rs index 205e762f1957..5c89f6ccf59d 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,31 +46,26 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - // 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)) + 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)) } fn as_derivative() -> Weight { - // Minimum execution time: 6_100 nanoseconds. - Weight::from_ref_time(6_336_000 as u64) + Weight::from_ref_time(5_955_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - // 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)) + 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)) } fn dispatch_as() -> Weight { - // Minimum execution time: 14_279 nanoseconds. - Weight::from_ref_time(14_621_000 as u64) + Weight::from_ref_time(13_475_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - // 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)) + 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)) } } diff --git a/runtime/westend/src/weights/pallet_vesting.rs b/runtime/westend/src/weights/pallet_vesting.rs index 378870a875be..bf003d9799fb 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,12 +49,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -63,12 +62,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -78,12 +76,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -93,12 +90,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -108,12 +104,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -123,12 +118,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -138,12 +132,11 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -153,12 +146,11 @@ 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 { - // 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)) + 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)) .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 088f365e7986..30fe377312d9 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +47,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions AuctionInfo (r:1 w:1) // Storage: Auctions AuctionCounter (r:1 w:1) fn new_auction() -> Weight { - // Minimum execution time: 17_288 nanoseconds. - Weight::from_ref_time(17_985_000 as u64) + Weight::from_ref_time(17_108_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -60,8 +59,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions ReservedAmounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn bid() -> Weight { - // Minimum execution time: 73_535 nanoseconds. - Weight::from_ref_time(75_064_000 as u64) + Weight::from_ref_time(70_333_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -78,8 +76,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar Paras (r:1 w:1) fn on_initialize() -> Weight { - // Minimum execution time: 15_672_246 nanoseconds. - Weight::from_ref_time(16_047_763_000 as u64) + Weight::from_ref_time(15_569_290_000 as u64) .saturating_add(T::DbWeight::get().reads(3688 as u64)) .saturating_add(T::DbWeight::get().writes(3683 as u64)) } @@ -88,8 +85,7 @@ impl runtime_common::auctions::WeightInfo for WeightInf // Storage: Auctions Winning (r:0 w:3600) // Storage: Auctions AuctionInfo (r:0 w:1) fn cancel_auction() -> Weight { - // Minimum execution time: 4_654_031 nanoseconds. - Weight::from_ref_time(4_736_028_000 as u64) + Weight::from_ref_time(4_675_785_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 7ff12034a1f0..d569e9696e91 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +49,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Paras ParaLifecycles (r:1 w:0) // Storage: Crowdloan NextFundIndex (r:1 w:1) fn create() -> Weight { - // Minimum execution time: 49_547 nanoseconds. - Weight::from_ref_time(51_304_000 as u64) + Weight::from_ref_time(46_894_000 as u64) .saturating_add(T::DbWeight::get().reads(4 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -62,8 +61,7 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan NewRaise (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - // Minimum execution time: 115_314 nanoseconds. - Weight::from_ref_time(116_381_000 as u64) + Weight::from_ref_time(113_396_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -71,18 +69,16 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: System Account (r:2 w:2) // Storage: unknown [0xc85982571aa615c788ef9b2c16f54f25773fd439e8ee1ed2aa3ae43d48e880f0] (r:1 w:1) fn withdraw() -> Weight { - // Minimum execution time: 55_447 nanoseconds. - Weight::from_ref_time(56_653_000 as u64) + Weight::from_ref_time(52_598_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 { - // 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)) + 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)) .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)) @@ -91,31 +87,27 @@ impl runtime_common::crowdloan::WeightInfo for WeightIn // Storage: Crowdloan Funds (r:1 w:1) // Storage: System Account (r:1 w:1) fn dissolve() -> Weight { - // Minimum execution time: 37_208 nanoseconds. - Weight::from_ref_time(38_133_000 as u64) + Weight::from_ref_time(36_019_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 { - // Minimum execution time: 26_446 nanoseconds. - Weight::from_ref_time(27_193_000 as u64) + Weight::from_ref_time(24_837_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 { - // Minimum execution time: 33_570 nanoseconds. - Weight::from_ref_time(34_862_000 as u64) + Weight::from_ref_time(31_340_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 { - // Minimum execution time: 26_059 nanoseconds. - Weight::from_ref_time(27_073_000 as u64) + Weight::from_ref_time(25_223_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -131,10 +123,9 @@ 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 { - // 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)) + 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)) .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 990173341004..e52924381cd7 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-11-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +48,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Registrar Paras (r:1 w:1) // Storage: Paras ParaLifecycles (r:1 w:0) fn reserve() -> Weight { - // Minimum execution time: 33_216 nanoseconds. - Weight::from_ref_time(33_774_000 as u64) + Weight::from_ref_time(30_965_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -63,8 +62,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn register() -> Weight { - // Minimum execution time: 7_610_660 nanoseconds. - Weight::from_ref_time(7_680_278_000 as u64) + Weight::from_ref_time(7_411_024_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -78,8 +76,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras CurrentCodeHash (r:0 w:1) // Storage: Paras UpcomingParasGenesis (r:0 w:1) fn force_register() -> Weight { - // Minimum execution time: 7_576_126 nanoseconds. - Weight::from_ref_time(7_632_431_000 as u64) + Weight::from_ref_time(7_355_259_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(7 as u64)) } @@ -90,8 +87,7 @@ impl runtime_common::paras_registrar::WeightInfo for We // Storage: Paras ActionsQueue (r:1 w:1) // Storage: Registrar PendingSwap (r:0 w:1) fn deregister() -> Weight { - // Minimum execution time: 49_734 nanoseconds. - Weight::from_ref_time(50_945_000 as u64) + Weight::from_ref_time(48_776_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -103,13 +99,11 @@ 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 { - // Minimum execution time: 44_434 nanoseconds. - Weight::from_ref_time(45_553_000 as u64) + Weight::from_ref_time(42_830_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) @@ -118,22 +112,19 @@ 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) - /// The range of component `b` is `[1, 3145728]`. + // Storage: Paras UpgradeRestrictionSignal (r:0 w:1) fn schedule_code_upgrade(b: u32, ) -> Weight { - // 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)) + 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)) .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 { - // 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)) + 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)) .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 6f13925773f1..bd2cf35258bb 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +47,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // Minimum execution time: 31_957 nanoseconds. - Weight::from_ref_time(32_370_000 as u64) + Weight::from_ref_time(30_227_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -61,12 +60,11 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // 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)) + 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)) .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))) @@ -77,8 +75,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // Minimum execution time: 94_359 nanoseconds. - Weight::from_ref_time(95_058_000 as u64) + Weight::from_ref_time(91_801_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(9 as u64)) } @@ -88,8 +85,7 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - // Minimum execution time: 29_605 nanoseconds. - Weight::from_ref_time(31_180_000 as u64) + Weight::from_ref_time(28_756_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 21ffcbe3ab3e..3d7021f73da9 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +48,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_block_number() -> Weight { - // Minimum execution time: 12_337 nanoseconds. - Weight::from_ref_time(12_771_000 as u64) + Weight::from_ref_time(11_077_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -57,8 +56,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_u32() -> Weight { - // Minimum execution time: 12_317 nanoseconds. - Weight::from_ref_time(13_005_000 as u64) + Weight::from_ref_time(11_628_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -66,8 +64,7 @@ impl runtime_parachains::configuration::WeightInfo for // Storage: Configuration BypassConsistencyCheck (r:1 w:0) // Storage: ParasShared CurrentSessionIndex (r:1 w:0) fn set_config_with_option_u32() -> Weight { - // Minimum execution time: 12_566 nanoseconds. - Weight::from_ref_time(13_063_000 as u64) + Weight::from_ref_time(11_476_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -75,22 +72,19 @@ 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 { - // Minimum execution time: 12_626 nanoseconds. - Weight::from_ref_time(12_946_000 as u64) + Weight::from_ref_time(11_361_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 { - // Minimum execution time: 12_697 nanoseconds. - Weight::from_ref_time(13_051_000 as u64) + Weight::from_ref_time(11_601_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 fe983117b01b..85090f4ed620 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +46,7 @@ pub struct WeightInfo(PhantomData); impl runtime_parachains::disputes::WeightInfo for WeightInfo { // Storage: ParasDisputes Frozen (r:0 w:1) fn force_unfreeze() -> Weight { - // Minimum execution time: 4_805 nanoseconds. - Weight::from_ref_time(5_035_000 as u64) + Weight::from_ref_time(4_357_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 97780dd04c88..868be3969728 100644 --- a/runtime/westend/src/weights/runtime_parachains_disputes_slashing.rs +++ b/runtime/westend/src/weights/runtime_parachains_disputes_slashing.rs @@ -16,21 +16,22 @@ //! Autogenerated weights for `runtime_parachains::disputes::slashing` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-08-31, 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=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 @@ -48,6 +49,8 @@ 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) @@ -58,11 +61,10 @@ 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 { - // 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)) + 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)) .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 b0104b86148a..5cb4754daa02 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,8 +53,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_init_open_channel() -> Weight { - // Minimum execution time: 42_236 nanoseconds. - Weight::from_ref_time(42_643_000 as u64) + Weight::from_ref_time(38_897_000 as u64) .saturating_add(T::DbWeight::get().reads(9 as u64)) .saturating_add(T::DbWeight::get().writes(5 as u64)) } @@ -65,8 +64,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_accept_open_channel() -> Weight { - // Minimum execution time: 42_348 nanoseconds. - Weight::from_ref_time(45_358_000 as u64) + Weight::from_ref_time(38_657_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -76,8 +74,7 @@ impl runtime_parachains::hrmp::WeightInfo for WeightInf // Storage: Dmp DownwardMessageQueueHeads (r:1 w:1) // Storage: Dmp DownwardMessageQueues (r:1 w:1) fn hrmp_close_channel() -> Weight { - // Minimum execution time: 44_696 nanoseconds. - Weight::from_ref_time(46_077_000 as u64) + Weight::from_ref_time(35_977_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } @@ -90,12 +87,11 @@ 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 { - // 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)) + 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)) .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,10 +109,9 @@ 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 { - // 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)) + 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)) .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)) @@ -130,10 +125,9 @@ 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 { - // 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)) + 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)) .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)) @@ -144,10 +138,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -155,10 +148,9 @@ 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 { - // 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)) + 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)) .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)) @@ -175,8 +167,7 @@ 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 { - // Minimum execution time: 52_246 nanoseconds. - Weight::from_ref_time(52_759_000 as u64) + Weight::from_ref_time(104_771_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 be7737424cbf..a7d569364b07 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,10 +47,9 @@ 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 { - // 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)) + 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)) .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 58336118c946..62de4f872ba9 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,20 +52,18 @@ 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 { - // 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)) + 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)) .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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Paras FutureCodeHash (r:1 w:1) @@ -80,10 +78,9 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(8 as u64)) } @@ -92,18 +89,16 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 24_774 nanoseconds. - Weight::from_ref_time(25_196_000 as u64) + Weight::from_ref_time(23_089_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -111,18 +106,16 @@ 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 { - // 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)) + 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)) .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 { - // Minimum execution time: 7_298 nanoseconds. - Weight::from_ref_time(7_449_000 as u64) + Weight::from_ref_time(6_855_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -130,8 +123,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: ParasShared CurrentSessionIndex (r:1 w:0) // Storage: Paras PvfActiveVoteMap (r:1 w:1) fn include_pvf_check_statement() -> Weight { - // Minimum execution time: 93_045 nanoseconds. - Weight::from_ref_time(94_976_000 as u64) + Weight::from_ref_time(92_275_000 as u64) .saturating_add(T::DbWeight::get().reads(3 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -143,8 +135,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: System Digest (r:1 w:1) // Storage: Paras FutureCodeUpgrades (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight { - // Minimum execution time: 642_157 nanoseconds. - Weight::from_ref_time(646_001_000 as u64) + Weight::from_ref_time(637_301_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(104 as u64)) } @@ -157,8 +148,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras UpgradeGoAheadSignal (r:0 w:100) // Storage: Paras FutureCodeHash (r:0 w:100) fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight { - // Minimum execution time: 590_509 nanoseconds. - Weight::from_ref_time(593_930_000 as u64) + Weight::from_ref_time(602_283_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(204 as u64)) } @@ -168,8 +158,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras PvfActiveVoteList (r:1 w:1) // Storage: Paras ActionsQueue (r:1 w:1) fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight { - // Minimum execution time: 494_553 nanoseconds. - Weight::from_ref_time(499_464_000 as u64) + Weight::from_ref_time(509_697_000 as u64) .saturating_add(T::DbWeight::get().reads(5 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -183,8 +172,7 @@ impl runtime_parachains::paras::WeightInfo for WeightIn // Storage: Paras CurrentCodeHash (r:0 w:100) // Storage: Paras UpcomingParasGenesis (r:0 w:100) fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight { - // Minimum execution time: 657_723 nanoseconds. - Weight::from_ref_time(664_673_000 as u64) + Weight::from_ref_time(678_895_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 f48eac260b0e..176213574750 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,15 +53,14 @@ 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) @@ -75,15 +74,12 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Hrmp HrmpWatermarks (r:0 w:1) // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) - // 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().writes(18 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -97,7 +93,6 @@ 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) @@ -117,9 +112,8 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_bitfields() -> Weight { - // Minimum execution time: 339_897 nanoseconds. - Weight::from_ref_time(345_687_000 as u64) - .saturating_add(T::DbWeight::get().reads(26 as u64)) + Weight::from_ref_time(319_428_000 as u64) + .saturating_add(T::DbWeight::get().reads(25 as u64)) .saturating_add(T::DbWeight::get().writes(17 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -133,7 +127,6 @@ 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) @@ -155,11 +148,10 @@ 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 { - // 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)) + 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)) .saturating_add(T::DbWeight::get().writes(16 as u64)) } // Storage: ParaInherent Included (r:1 w:1) @@ -173,7 +165,6 @@ 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) @@ -196,9 +187,8 @@ impl runtime_parachains::paras_inherent::WeightInfo for // Storage: Paras Heads (r:0 w:1) // Storage: Paras UpgradeGoAheadSignal (r:0 w:1) fn enter_backed_candidate_code_upgrade() -> Weight { - // 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)) + Weight::from_ref_time(37_417_873_000 as u64) + .saturating_add(T::DbWeight::get().reads(30 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 6afe1a8685dc..887be07dd4b8 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-11-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 // Executed Command: @@ -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,25 +46,22 @@ 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 { - // 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)) + 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)) } // 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 { - // Minimum execution time: 9_499 nanoseconds. - Weight::from_ref_time(9_800_000 as u64) + Weight::from_ref_time(8_684_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 { - // Minimum execution time: 26_656 nanoseconds. - Weight::from_ref_time(27_122_000 as u64) + Weight::from_ref_time(23_672_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 a2f64af1cbd6..3a19233a8fb9 100644 --- a/scripts/ci/gitlab/lingua.dic +++ b/scripts/ci/gitlab/lingua.dic @@ -209,7 +209,6 @@ 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 38b47942f1de..c6fe5916c3b6 100644 --- a/scripts/ci/gitlab/pipeline/build.yml +++ b/scripts/ci/gitlab/pipeline/build.yml @@ -22,6 +22,7 @@ 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 @@ -39,6 +40,24 @@ build-linux-stable: - echo -n "v${RELEASE_VERSION}" > ./artifacts/BUILD_RELEASE_VERSION - cp -r scripts/* ./artifacts +check-transaction-versions: + stage: build + extends: + - .docker-env + - .test-refs + image: node:15 + needs: + - job: build-linux-stable + artifacts: true + before_script: + - apt-get -y update; apt-get -y install jq lsof + - 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 + script: + - ./scripts/ci/gitlab/check_extrinsics_ordering.sh + build-test-collators: stage: build # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs @@ -54,6 +73,7 @@ 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/. @@ -78,6 +98,7 @@ 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/. @@ -144,18 +165,17 @@ build-implementers-guide: - job: test-deterministic-wasm artifacts: false extends: - - .kubernetes-env + - .docker-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 19d4bfcededf..0e435d604821 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 with E1 label -.check-runtime-migration: +# Works only in PRs +check-runtime-migration: stage: check extends: - .docker-env @@ -62,51 +62,15 @@ check-try-runtime: - | 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 "E0-runtime_migration" | wc -l) + https://api.github.com/repos/paritytech/polkadot/issues/$CI_COMMIT_REF_NAME/labels | grep "E1" | wc -l) - | if [[ $has_runtimemigration_label != 0 ]]; then - echo "Found label runtime_migration. Running tests" + echo "Found label runtimemigration. Running tests" export RUST_LOG=remote-ext=debug,runtime=debug - 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 + time cargo test --release -p westend-runtime -p polkadot-runtime -p kusama-runtime --features try-runtime else - echo "runtime_migration label not found. Skipping" + echo "runtimemigration 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 3484fcae336e..12e087e188d1 100644 --- a/scripts/ci/gitlab/pipeline/publish.yml +++ b/scripts/ci/gitlab/pipeline/publish.yml @@ -7,7 +7,6 @@ publish-polkadot-debug-image: stage: publish extends: - - .kubernetes-env - .build-push-image rules: # Don't run when triggered from another pipeline @@ -19,7 +18,6 @@ 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} @@ -44,11 +42,9 @@ 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} @@ -72,11 +68,9 @@ 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} @@ -99,11 +93,9 @@ 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 @@ -122,8 +114,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: @@ -160,8 +152,9 @@ publish-rustdoc: stage: publish extends: - .kubernetes-env + image: paritytech/tools:latest variables: - CI_IMAGE: paritytech/tools:latest + GIT_DEPTH: 100 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 3a21a77d90f2..9a3dd0270fbb 100644 --- a/scripts/ci/gitlab/pipeline/test.yml +++ b/scripts/ci/gitlab/pipeline/test.yml @@ -72,18 +72,3 @@ 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 13c17df851f1..14d62fbb9ad6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,11 +20,6 @@ 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 81f2f90e0998..81b4be51c8e4 100644 --- a/statement-table/Cargo.toml +++ b/statement-table/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-statement-table" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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 dc3b174599a9..ee68d43b2aa5 100644 --- a/tests/benchmark_block.rs +++ b/tests/benchmark_block.rs @@ -32,7 +32,7 @@ use tempfile::tempdir; pub mod common; -static RUNTIMES: [&str; 4] = ["polkadot", "kusama", "westend", "rococo"]; +static RUNTIMES: [&'static 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 79a7d4c45322..c112a8c023f8 100644 --- a/tests/benchmark_extrinsic.rs +++ b/tests/benchmark_extrinsic.rs @@ -17,9 +17,10 @@ use assert_cmd::cargo::cargo_bin; use std::{process::Command, result::Result}; -static RUNTIMES: [&str; 4] = ["polkadot", "kusama", "westend", "rococo"]; +static RUNTIMES: [&'static str; 4] = ["polkadot", "kusama", "westend", "rococo"]; -static EXTRINSICS: [(&str, &str); 2] = [("system", "remark"), ("balances", "transfer_keep_alive")]; +static EXTRINSICS: [(&'static str, &'static str); 2] = + [("system", "remark"), ("balances", "transfer_keep_alive")]; /// `benchmark extrinsic` works for all dev runtimes and some extrinsics. #[test] @@ -42,8 +43,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 10582870168e..a3b4ed1160ea 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: [&str; 4] = ["polkadot", "kusama", "westend", "rococo"]; +static RUNTIMES: [&'static 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 7c9e40b9d0b9..f5e2851f250f 100644 --- a/tests/benchmark_storage_works.rs +++ b/tests/benchmark_storage_works.rs @@ -14,8 +14,6 @@ // 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, @@ -40,7 +38,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 6a41975f87fa..3f040208972c 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -91,13 +91,11 @@ 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)) }) - .unwrap_or_else(|| { - panic!("Could not find WebSocket address in process output:\n{}", &data) - }); + .expect(&format!("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 f8dc32a82a26..f205e935ab95 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 ab3ee506b60a..c69d8cc4a81a 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 5b0e6ec8b013..895db534bc5c 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 2038dc94a1ea..8f2d8e79e1e5 100644 --- a/utils/generate-bags/Cargo.toml +++ b/utils/generate-bags/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "polkadot-voter-bags" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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 f8b08767f898..20dc36fd5385 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.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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.24.1", features = ["macros"] } +tokio = { version = "1.19.2", features = ["macros"] } diff --git a/utils/staking-miner/Cargo.toml b/utils/staking-miner/Cargo.toml index 20d19451489a..45cb5fec6d1a 100644 --- a/utils/staking-miner/Cargo.toml +++ b/utils/staking-miner/Cargo.toml @@ -1,21 +1,21 @@ [package] name = "staking-miner" -version.workspace = true -authors.workspace = true -edition.workspace = true +version = "0.9.31" +authors = ["Parity Technologies "] +edition = "2021" [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.16.2", features = ["ws-client", "macros"] } +jsonrpsee = { version = "0.15.1", 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.24.1", features = ["macros", "rt-multi-thread", "sync"] } -remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } +tokio = { version = "1.19.2", features = ["macros", "rt-multi-thread", "sync"] } +remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" } 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 84c57bc6d2e8..8c134874f297 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 + DeserializeOwned, + B: BlockT, B::Header: DeserializeOwned, { use frame_support::{storage::generator::StorageMap, traits::PalletInfo}; @@ -317,14 +317,13 @@ 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 4b653131b77b..5a2e6813b0b4 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." -version.workspace = true -authors.workspace = true -edition.workspace = true +edition = "2021" [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 0cbcba63bf43..a4fd91004e66 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.workspace = true -edition.workspace = true -version.workspace = true +authors = ["Parity Technologies "] +edition = "2021" +version = "0.9.31" [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 4eb1c558b8ce..a5b6ad7de395 100644 --- a/xcm/pallet-xcm/Cargo.toml +++ b/xcm/pallet-xcm/Cargo.toml @@ -1,9 +1,8 @@ [package] +authors = ["Parity Technologies "] +edition = "2021" name = "pallet-xcm" -authors.workspace = true -edition.workspace = true -version.workspace = true - +version = "0.9.31" [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 3502c79b5d25..78dc5087d960 100644 --- a/xcm/pallet-xcm/src/lib.rs +++ b/xcm/pallet-xcm/src/lib.rs @@ -458,7 +458,6 @@ pub mod pallet { #[pallet::call] impl Pallet { - #[pallet::call_index(0)] #[pallet::weight(100_000_000)] pub fn send( origin: OriginFor, @@ -494,7 +493,6 @@ 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(); @@ -536,7 +534,6 @@ 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)) => { @@ -577,7 +574,6 @@ 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, @@ -606,7 +602,6 @@ 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, @@ -629,7 +624,6 @@ 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, @@ -644,7 +638,6 @@ 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, @@ -668,7 +661,6 @@ 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, @@ -704,7 +696,6 @@ 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)) => { @@ -752,7 +743,6 @@ 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(); @@ -1527,19 +1517,6 @@ 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 10a04034862b..7652a395b47b 100644 --- a/xcm/pallet-xcm/src/mock.rs +++ b/xcm/pallet-xcm/src/mock.rs @@ -73,7 +73,6 @@ 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)?; @@ -88,7 +87,6 @@ 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)?; @@ -106,7 +104,6 @@ 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 22ec39077c97..14a7d068db68 100644 --- a/xcm/procedural/Cargo.toml +++ b/xcm/procedural/Cargo.toml @@ -1,8 +1,8 @@ [package] +authors = ["Parity Technologies "] name = "xcm-procedural" -authors.workspace = true -edition.workspace = true -version.workspace = true +version = "0.9.31" +edition = "2021" [lib] proc-macro = true diff --git a/xcm/src/v0/junction.rs b/xcm/src/v0/junction.rs index 450e882ac3e8..67f17f464a37 100644 --- a/xcm/src/v0/junction.rs +++ b/xcm/src/v0/junction.rs @@ -52,15 +52,6 @@ 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 1bf49ad841a6..0491e27d644f 100644 --- a/xcm/src/v0/multi_location.rs +++ b/xcm/src/v0/multi_location.rs @@ -356,28 +356,15 @@ impl MultiLocation { /// # } /// ``` pub fn match_and_split(&self, prefix: &MultiLocation) -> Option<&Junction> { - if prefix.len() + 1 != self.len() || !self.starts_with(prefix) { + if prefix.len() + 1 != self.len() { 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 + for i in 0..prefix.len() { + if prefix.at(i) != self.at(i) { + return None + } } - prefix.iter().zip(self.iter()).all(|(l, r)| l == r) + return self.at(prefix.len()) } /// Mutates `self`, suffixing it with `new`. Returns `Err` in case of overflow. @@ -614,24 +601,6 @@ 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 83cf0095c3b8..0c2b2da31698 100644 --- a/xcm/src/v1/multilocation.rs +++ b/xcm/src/v1/multilocation.rs @@ -253,24 +253,6 @@ 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. @@ -819,29 +801,15 @@ impl Junctions { /// # } /// ``` pub fn match_and_split(&self, prefix: &Junctions) -> Option<&Junction> { - if prefix.len() + 1 != self.len() || !self.starts_with(prefix) { + if prefix.len() + 1 != self.len() { 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 + for i in 0..prefix.len() { + if prefix.at(i) != self.at(i) { + return None + } } - prefix.iter().zip(self.iter()).all(|(l, r)| l == r) + return self.at(prefix.len()) } } @@ -961,26 +929,6 @@ 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 a8089fcf2ead..152b2eaf8b40 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." -authors.workspace = true -edition.workspace = true -version.workspace = true +version = "0.9.31" [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 f231bf1094b4..5e259195c4a0 100644 --- a/xcm/xcm-builder/src/currency_adapter.rs +++ b/xcm/xcm-builder/src/currency_adapter.rs @@ -125,9 +125,6 @@ impl< AllowDeath, ) .is_ok(); - if ok { - Currency::reactivate(amount); - } debug_assert!( ok, "`can_check_in` must have returned `true` immediately prior; qed" @@ -141,7 +138,6 @@ 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 9285d3bb4acd..a1bba7014a34 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, - OriginToPluralityVoice, ParentAsSuperuser, RelayChainAsNative, SiblingParachainAsNative, + 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 4d024a9d12c2..9fe50eaf9c3f 100644 --- a/xcm/xcm-builder/src/origin_conversion.rs +++ b/xcm/xcm-builder/src/origin_conversion.rs @@ -321,20 +321,3 @@ 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/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index 7b0305a41bc2..2c506fb95428 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -27,15 +27,14 @@ use sp_std::{fmt::Debug, marker::PhantomData}; use sp_weights::Weight; use xcm::prelude::*; -pub struct ProcessXcmMessage( - PhantomData<(MessageOrigin, XcmExecutor, Call, MessageToDispatchOrigin)>, +pub struct ProcessXcmMessage( + PhantomData<(MessageOrigin, XcmExecutor, Call)>, ); impl< - MessageOrigin: FullCodec + MaxEncodedLen + Clone + Eq + PartialEq + TypeInfo + Debug, + MessageOrigin: Into + FullCodec + MaxEncodedLen + Clone + Eq + PartialEq + TypeInfo + Debug, XcmExecutor: ExecuteXcm, Call, - MessageToDispatchOrigin: sp_runtime::traits::Convert, - > ProcessMessage for ProcessXcmMessage + > ProcessMessage for ProcessXcmMessage { type Origin = MessageOrigin; @@ -43,33 +42,20 @@ impl< fn process_message( message: &[u8], origin: Self::Origin, - _weight_limit: Weight, + weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { - let _hash = blake2_256(message); + let hash = blake2_256(message); let versioned_message = VersionedXcm::::decode(&mut &message[..]) .map_err(|_| ProcessMessageError::Corrupt)?; let message = Xcm::::try_from(versioned_message) .map_err(|_| ProcessMessageError::Unsupported)?; - // FIXME: Needs XCMv3 for pre-dispatch message weight extraction - // - /* let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; + let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; let weight = Weight::from_ref_time(pre.weight_of()); ensure!(weight.all_lte(weight_limit), ProcessMessageError::Overweight(weight)); match XcmExecutor::execute(origin.into(), pre, hash, 0) { Outcome::Complete(w) => Ok((true, Weight::from_ref_time(w))), Outcome::Incomplete(w, _) => Ok((false, Weight::from_ref_time(w))), Outcome::Error(_) => Err(ProcessMessageError::Unsupported), - }*/ - // Do not merge this… - let outcome = XcmExecutor::execute_xcm( - MessageToDispatchOrigin::convert(origin).into(), - message, - u64::MAX, - ); - match outcome { - Outcome::Error(XcmError::WeightLimitReached(_required)) => - Err(ProcessMessageError::Unsupported), - _outcome => Ok((true, Weight::MAX)), } } } diff --git a/xcm/xcm-builder/src/tests.rs b/xcm/xcm-builder/src/tests.rs index d26a2f008884..fe3f144e95c9 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_REF_TIME_PER_SECOND}; +use frame_support::{assert_err, weights::constants::WEIGHT_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_REF_TIME_PER_SECOND.into()); - pub static PARA1WeightPrice: (AssetId, u128) = (PARA_1.into(), WEIGHT_REF_TIME_PER_SECOND.into()); + 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()); } type Traders = ( diff --git a/xcm/xcm-builder/src/weight.rs b/xcm/xcm-builder/src/weight.rs index 2ab8afde2da5..2a86f30d632b 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_REF_TIME_PER_SECOND, WeightToFee as WeightToFeeT}, + weights::{constants::WEIGHT_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_REF_TIME_PER_SECOND as u128); + let amount = units_per_second * (weight as u128) / (WEIGHT_PER_SECOND.ref_time() 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_REF_TIME_PER_SECOND as u128); + let amount = units_per_second * (weight as u128) / (WEIGHT_PER_SECOND.ref_time() 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_REF_TIME_PER_SECOND as u128); + let amount = units_per_second * (weight as u128) / (WEIGHT_PER_SECOND.ref_time() 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_REF_TIME_PER_SECOND as u128); + let amount = units_per_second * (weight as u128) / (WEIGHT_PER_SECOND.ref_time() 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 a87bb02283f3..1f9842887eae 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." -authors.workspace = true -edition.workspace = true -version.workspace = true +version = "0.9.31" [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 4fff3952a05d..9e5adab26286 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" -authors.workspace = true -edition.workspace = true -version.workspace = true +version = "0.9.31" [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 6ecbf0e0cf44..324e92dce9ff 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(&self) -> impl Iterator + '_ { + pub fn fungible_assets_iter<'a>(&'a self) -> impl Iterator + 'a { 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(&self) -> impl Iterator + '_ { + pub fn non_fungible_assets_iter<'a>(&'a self) -> impl Iterator + 'a { 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(&self) -> impl Iterator + '_ { + pub fn assets_iter<'a>(&'a self) -> impl Iterator + 'a { 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 b18b709dbbf3..4c3c45c404b7 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" -version.workspace = true -authors.workspace = true -edition.workspace = true +edition = "2021" [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 bdc7ea9eb138..7fa6ade69fc5 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." -authors.workspace = true -edition.workspace = true -version.workspace = true +edition = "2021" [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 d638867c281f..ff435a9238fd 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_REF_TIME_PER_SECOND, Weight}, + weights::{constants::WEIGHT_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::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)); + pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND.saturating_div(4); + pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.saturating_div(4); } parameter_types! { diff --git a/xcm/xcm-simulator/fuzzer/Cargo.toml b/xcm/xcm-simulator/fuzzer/Cargo.toml index 5a24c34f2b30..7ecff2f8c021 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." -version.workspace = true -authors.workspace = true -edition.workspace = true +edition = "2021" [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 ce2a2698d00c..b8b51e57e853 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_REF_TIME_PER_SECOND, Weight}, + weights::{constants::WEIGHT_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::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)); + pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND.saturating_div(4); + pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.saturating_div(4); } parameter_types! { From 8e2e4c3cc02675365be7a38ee040b5bd8a12cd94 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:30:31 +0100 Subject: [PATCH 030/182] Update remove-weight migration The migration got touched on master; just resolving conflicts here. Signed-off-by: Oliver Tale-Yazdi --- .../parachains/src/configuration/migration.rs | 116 +++++++++--------- 1 file changed, 56 insertions(+), 60 deletions(-) diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs index a41bd461fcc6..6cfab4e2c02f 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -16,7 +16,7 @@ //! A module that is responsible for migration of storage. -use crate::configuration::{self, Config, Pallet, Store, MAX_POV_SIZE}; +use crate::configuration::{self, Config, Pallet, Store}; use frame_support::{pallet_prelude::*, traits::StorageVersion, weights::Weight}; use frame_system::pallet_prelude::BlockNumberFor; @@ -173,14 +173,14 @@ pub mod v4 { } } -fn migrate_to_v4() -> Weight { +fn migrate_to_v5() -> Weight { // Unusual formatting is justified: // - make it easier to verify that fields assign what they supposed to assign. // - this code is transient and will be removed after all migrations are done. // - this code is important enough to optimize for legibility sacrificing consistency. #[rustfmt::skip] let translate = - |pre: v4::OldHostConfiguration>| -> + |pre: v5::OldHostConfiguration>| -> configuration::HostConfiguration> { super::HostConfiguration { @@ -195,7 +195,6 @@ validation_upgrade_cooldown : pre.validation_upgrade_cooldown, validation_upgrade_delay : pre.validation_upgrade_delay, max_pov_size : pre.max_pov_size, max_downward_message_size : pre.max_downward_message_size, -ump_service_total_weight : pre.ump_service_total_weight, hrmp_max_parachain_outbound_channels : pre.hrmp_max_parachain_outbound_channels, hrmp_max_parathread_outbound_channels : pre.hrmp_max_parathread_outbound_channels, hrmp_sender_deposit : pre.hrmp_sender_deposit, @@ -222,7 +221,6 @@ n_delay_tranches : pre.n_delay_tranches, zeroth_delay_tranche_width : pre.zeroth_delay_tranche_width, needed_approvals : pre.needed_approvals, relay_vrf_modulo_samples : pre.relay_vrf_modulo_samples, -ump_max_individual_weight : pre.ump_max_individual_weight, pvf_checking_enabled : pre.pvf_checking_enabled, pvf_voting_ttl : pre.pvf_voting_ttl, minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, @@ -237,7 +235,7 @@ minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, // to be unlikely to be caused by this. So we just log. Maybe it'll work out still? log::error!( target: configuration::LOG_TARGET, - "unexpected error when performing translation of the configuration type during storage upgrade to v4." + "unexpected error when performing translation of the configuration type during storage upgrade to v5." ); } @@ -275,17 +273,17 @@ mod tests { // We check only a sample of the values here. If we missed any fields or messed up data types // that would skew all the fields coming after. - assert_eq!(v3.max_code_size, 10_485_760); - assert_eq!(v3.validation_upgrade_cooldown, 3600); - assert_eq!(v3.max_pov_size, 5_242_880); - assert_eq!(v3.hrmp_channel_max_message_size, 102_400); - assert_eq!(v3.n_delay_tranches, 89); - assert_eq!(v3.ump_max_individual_weight, Weight::from_parts(20_000_000_000, 5_242_880)); - assert_eq!(v3.minimum_validation_upgrade_delay, 20); + assert_eq!(v4.max_code_size, 10_485_760); + assert_eq!(v4.validation_upgrade_cooldown, 3600); + assert_eq!(v4.max_pov_size, 5_242_880); + assert_eq!(v4.hrmp_channel_max_message_size, 102_400); + assert_eq!(v4.n_delay_tranches, 89); + assert_eq!(v4.ump_max_individual_weight, Weight::zero()); + assert_eq!(v4.minimum_validation_upgrade_delay, 20); } #[test] - fn test_migrate_to_v4() { + fn test_migrate_to_v5() { // Host configuration has lots of fields. However, in this migration we add only a couple of // fields. The most important part to check are a couple of the last fields. We also pick // extra fields to check arbitrarily, e.g. depending on their position (i.e. the middle) and @@ -306,60 +304,58 @@ mod tests { }; new_test_ext(Default::default()).execute_with(|| { - // Implant the v3 version in the state. + // Implant the v4 version in the state. frame_support::storage::unhashed::put_raw( &configuration::ActiveConfig::::hashed_key(), - &v3.encode(), + &v4.encode(), ); - migrate_to_v4::(); + migrate_to_v5::(); - let v4 = configuration::ActiveConfig::::get(); + let v5 = configuration::ActiveConfig::::get(); #[rustfmt::skip] { - assert_eq!(v3.max_code_size , v4.max_code_size); - assert_eq!(v3.max_head_data_size , v4.max_head_data_size); - assert_eq!(v3.max_upward_queue_count , v4.max_upward_queue_count); - assert_eq!(v3.max_upward_queue_size , v4.max_upward_queue_size); - assert_eq!(v3.max_upward_message_size , v4.max_upward_message_size); - assert_eq!(v3.max_upward_message_num_per_candidate , v4.max_upward_message_num_per_candidate); - assert_eq!(v3.hrmp_max_message_num_per_candidate , v4.hrmp_max_message_num_per_candidate); - assert_eq!(v3.validation_upgrade_cooldown , v4.validation_upgrade_cooldown); - assert_eq!(v3.validation_upgrade_delay , v4.validation_upgrade_delay); - assert_eq!(v3.max_pov_size , v4.max_pov_size); - assert_eq!(v3.max_downward_message_size , v4.max_downward_message_size); - assert_eq!(v3.hrmp_max_parachain_outbound_channels , v4.hrmp_max_parachain_outbound_channels); - assert_eq!(v3.hrmp_max_parathread_outbound_channels , v4.hrmp_max_parathread_outbound_channels); - assert_eq!(v3.hrmp_sender_deposit , v4.hrmp_sender_deposit); - assert_eq!(v3.hrmp_recipient_deposit , v4.hrmp_recipient_deposit); - assert_eq!(v3.hrmp_channel_max_capacity , v4.hrmp_channel_max_capacity); - assert_eq!(v3.hrmp_channel_max_total_size , v4.hrmp_channel_max_total_size); - assert_eq!(v3.hrmp_max_parachain_inbound_channels , v4.hrmp_max_parachain_inbound_channels); - assert_eq!(v3.hrmp_max_parathread_inbound_channels , v4.hrmp_max_parathread_inbound_channels); - assert_eq!(v3.hrmp_channel_max_message_size , v4.hrmp_channel_max_message_size); - assert_eq!(v3.code_retention_period , v4.code_retention_period); - assert_eq!(v3.parathread_cores , v4.parathread_cores); - assert_eq!(v3.parathread_retries , v4.parathread_retries); - assert_eq!(v3.group_rotation_frequency , v4.group_rotation_frequency); - assert_eq!(v3.chain_availability_period , v4.chain_availability_period); - assert_eq!(v3.thread_availability_period , v4.thread_availability_period); - assert_eq!(v3.scheduling_lookahead , v4.scheduling_lookahead); - assert_eq!(v3.max_validators_per_core , v4.max_validators_per_core); - assert_eq!(v3.max_validators , v4.max_validators); - assert_eq!(v3.dispute_period , v4.dispute_period); - assert_eq!(v3.dispute_post_conclusion_acceptance_period, v4.dispute_post_conclusion_acceptance_period); - assert_eq!(v3.dispute_conclusion_by_time_out_period , v4.dispute_conclusion_by_time_out_period); - assert_eq!(v3.no_show_slots , v4.no_show_slots); - assert_eq!(v3.n_delay_tranches , v4.n_delay_tranches); - assert_eq!(v3.zeroth_delay_tranche_width , v4.zeroth_delay_tranche_width); - assert_eq!(v3.needed_approvals , v4.needed_approvals); - assert_eq!(v3.relay_vrf_modulo_samples , v4.relay_vrf_modulo_samples); - assert_eq!(v3.ump_max_individual_weight , v4.ump_max_individual_weight); - assert_eq!(v3.pvf_checking_enabled , v4.pvf_checking_enabled); - assert_eq!(v3.pvf_voting_ttl , v4.pvf_voting_ttl); - assert_eq!(v3.minimum_validation_upgrade_delay , v4.minimum_validation_upgrade_delay); - + assert_eq!(v4.max_code_size , v5.max_code_size); + assert_eq!(v4.max_head_data_size , v5.max_head_data_size); + assert_eq!(v4.max_upward_queue_count , v5.max_upward_queue_count); + assert_eq!(v4.max_upward_queue_size , v5.max_upward_queue_size); + assert_eq!(v4.max_upward_message_size , v5.max_upward_message_size); + assert_eq!(v4.max_upward_message_num_per_candidate , v5.max_upward_message_num_per_candidate); + assert_eq!(v4.hrmp_max_message_num_per_candidate , v5.hrmp_max_message_num_per_candidate); + assert_eq!(v4.validation_upgrade_cooldown , v5.validation_upgrade_cooldown); + assert_eq!(v4.validation_upgrade_delay , v5.validation_upgrade_delay); + assert_eq!(v4.max_pov_size , v5.max_pov_size); + assert_eq!(v4.max_downward_message_size , v5.max_downward_message_size); + assert_eq!(v4.hrmp_max_parachain_outbound_channels , v5.hrmp_max_parachain_outbound_channels); + assert_eq!(v4.hrmp_max_parathread_outbound_channels , v5.hrmp_max_parathread_outbound_channels); + assert_eq!(v4.hrmp_sender_deposit , v5.hrmp_sender_deposit); + assert_eq!(v4.hrmp_recipient_deposit , v5.hrmp_recipient_deposit); + assert_eq!(v4.hrmp_channel_max_capacity , v5.hrmp_channel_max_capacity); + assert_eq!(v4.hrmp_channel_max_total_size , v5.hrmp_channel_max_total_size); + assert_eq!(v4.hrmp_max_parachain_inbound_channels , v5.hrmp_max_parachain_inbound_channels); + assert_eq!(v4.hrmp_max_parathread_inbound_channels , v5.hrmp_max_parathread_inbound_channels); + assert_eq!(v4.hrmp_channel_max_message_size , v5.hrmp_channel_max_message_size); + assert_eq!(v4.code_retention_period , v5.code_retention_period); + assert_eq!(v4.parathread_cores , v5.parathread_cores); + assert_eq!(v4.parathread_retries , v5.parathread_retries); + assert_eq!(v4.group_rotation_frequency , v5.group_rotation_frequency); + assert_eq!(v4.chain_availability_period , v5.chain_availability_period); + assert_eq!(v4.thread_availability_period , v5.thread_availability_period); + assert_eq!(v4.scheduling_lookahead , v5.scheduling_lookahead); + assert_eq!(v4.max_validators_per_core , v5.max_validators_per_core); + assert_eq!(v4.max_validators , v5.max_validators); + assert_eq!(v4.dispute_period , v5.dispute_period); + assert_eq!(v4.dispute_post_conclusion_acceptance_period, v5.dispute_post_conclusion_acceptance_period); + assert_eq!(v4.dispute_conclusion_by_time_out_period , v5.dispute_conclusion_by_time_out_period); + assert_eq!(v4.no_show_slots , v5.no_show_slots); + assert_eq!(v4.n_delay_tranches , v5.n_delay_tranches); + assert_eq!(v4.zeroth_delay_tranche_width , v5.zeroth_delay_tranche_width); + assert_eq!(v4.needed_approvals , v5.needed_approvals); + assert_eq!(v4.relay_vrf_modulo_samples , v5.relay_vrf_modulo_samples); + assert_eq!(v4.pvf_checking_enabled , v5.pvf_checking_enabled); + assert_eq!(v4.pvf_voting_ttl , v5.pvf_voting_ttl); + assert_eq!(v4.minimum_validation_upgrade_delay , v5.minimum_validation_upgrade_delay); }; // ; makes this a statement. `rustfmt::skip` cannot be put on an expression. }); } From be65a1d8650d77ffad63a138b07132ea6901dafc Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:32:12 +0100 Subject: [PATCH 031/182] Add message- to dispatch-origin conversion for XCM processing Just using the `impl Into` was a bit inflexible. Like this, the Relaychain can convert `UMP(para)` to a MultiLocation `para`. Signed-off-by: Oliver Tale-Yazdi --- xcm/xcm-builder/src/process_xcm_message.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index 2c506fb95428..05d3dce5e912 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -27,14 +27,15 @@ use sp_std::{fmt::Debug, marker::PhantomData}; use sp_weights::Weight; use xcm::prelude::*; -pub struct ProcessXcmMessage( - PhantomData<(MessageOrigin, XcmExecutor, Call)>, +pub struct ProcessXcmMessage( + PhantomData<(MessageOrigin, XcmExecutor, Call, MessageToDispatchOrigin)>, ); impl< - MessageOrigin: Into + FullCodec + MaxEncodedLen + Clone + Eq + PartialEq + TypeInfo + Debug, + MessageOrigin: FullCodec + MaxEncodedLen + Clone + Eq + PartialEq + TypeInfo + Debug, XcmExecutor: ExecuteXcm, Call, - > ProcessMessage for ProcessXcmMessage + MessageToDispatchOrigin: sp_runtime::traits::Convert, + > ProcessMessage for ProcessXcmMessage { type Origin = MessageOrigin; From 42b5eed5615af421dead5643077ac742113a620b Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:33:54 +0100 Subject: [PATCH 032/182] DNM: Temporarily comment code since XCMv3 is not merged yet Signed-off-by: Oliver Tale-Yazdi --- xcm/xcm-builder/src/process_xcm_message.rs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index 05d3dce5e912..7b0305a41bc2 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -43,20 +43,33 @@ impl< fn process_message( message: &[u8], origin: Self::Origin, - weight_limit: Weight, + _weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { - let hash = blake2_256(message); + let _hash = blake2_256(message); let versioned_message = VersionedXcm::::decode(&mut &message[..]) .map_err(|_| ProcessMessageError::Corrupt)?; let message = Xcm::::try_from(versioned_message) .map_err(|_| ProcessMessageError::Unsupported)?; - let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; + // FIXME: Needs XCMv3 for pre-dispatch message weight extraction + // + /* let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; let weight = Weight::from_ref_time(pre.weight_of()); ensure!(weight.all_lte(weight_limit), ProcessMessageError::Overweight(weight)); match XcmExecutor::execute(origin.into(), pre, hash, 0) { Outcome::Complete(w) => Ok((true, Weight::from_ref_time(w))), Outcome::Incomplete(w, _) => Ok((false, Weight::from_ref_time(w))), Outcome::Error(_) => Err(ProcessMessageError::Unsupported), + }*/ + // Do not merge this… + let outcome = XcmExecutor::execute_xcm( + MessageToDispatchOrigin::convert(origin).into(), + message, + u64::MAX, + ); + match outcome { + Outcome::Error(XcmError::WeightLimitReached(_required)) => + Err(ProcessMessageError::Unsupported), + _outcome => Ok((true, Weight::MAX)), } } } From 5047b69b58a12e61a5104531a8fa1f22e029fc99 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:39:02 +0100 Subject: [PATCH 033/182] Use u64 for queue-wide limits on UmpAcceptanceCheckErr Using u32 here was one audit finding for the queue pallet. Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index a634f88c5a54..772eba5d81d8 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -348,11 +348,16 @@ enum AcceptanceCheckErr { /// An error returned by [`check_upward_messages`] that indicates a violation of one of acceptance /// criteria rules. +#[cfg_attr(test, derive(PartialEq))] pub enum UmpAcceptanceCheckErr { + /// The maximal number of messages that can be submitted in one batch was exceeded. MoreMessagesThanPermitted { sent: u32, permitted: u32 }, + /// The maximal size of a single message was exceeded. MessageSize { idx: u32, msg_size: u32, max_size: u32 }, - CapacityExceeded { count: u32, limit: u32 }, - TotalSizeExceeded { total_size: u32, limit: u32 }, + /// The allowed number of messages in the queue was exceeded. + CapacityExceeded { count: u64, limit: u64 }, + /// The allowed combined message size in the queue was exceeded. + TotalSizeExceeded { total_size: u64, limit: u64 }, } impl fmt::Debug for UmpAcceptanceCheckErr { From 567358e4f9a4f1604294d55254b47b630d5b4b8b Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:46:06 +0100 Subject: [PATCH 034/182] Define one sub-queue per *MP queue Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 63 +++++++++++++++++++------ 1 file changed, 49 insertions(+), 14 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 772eba5d81d8..9f6b477581b5 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -38,7 +38,7 @@ use primitives::{ ValidatorIndex, ValidityAttestation, }; use scale_info::TypeInfo; -use sp_runtime::{traits::One, DispatchError}; +use sp_runtime::{traits::One, DispatchError, SaturatedConversion}; use sp_std::{collections::btree_set::BTreeSet, fmt, prelude::*}; pub use pallet::*; @@ -209,6 +209,33 @@ pub fn minimum_backing_votes(n_validators: usize) -> usize { sp_std::cmp::min(n_validators, 2) } +/// Divides the [`Config::MessageQueue`] into sub queues which are serviced in a round-robin fashion. +/// +/// NOTE Ideally we want the queue pallet to be sub-queue aware since currently we waste PoV by introducing a lot of few-element queues by doing this. +/// +/// Changing this requires a migration of the queue pallet. +#[derive(Encode, Decode, Clone, Copy, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +pub enum SubQueue { + UMP, + HRMP, + DMP, +} + +/// Over which `queue` and `from` which para-chain a message came in from. +/// +/// Changing this requires a migration of the queue pallet. +#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +pub struct MessageOrigin { + pub queue: SubQueue, + pub para: ParaId, +} + +impl MessageOrigin { + pub const fn ump(para: ParaId) -> Self { + Self { queue: SubQueue::UMP, para } + } +} + #[frame_support::pallet] pub mod pallet { use super::*; @@ -233,7 +260,9 @@ pub mod pallet { type RewardValidators: RewardValidators; /// The system message queue. - type MessageQueue: EnqueueMessage; + /// + /// The message queue provides general queueing and processing functionality. Currently it replaces the old `UMP`, `HRMP` and `DMP` queue pallets. Since it provides a very generic kind of service; other use-cases can be implemented as well. + type MessageQueue: EnqueueMessage; } #[pallet::event] @@ -1076,18 +1105,24 @@ impl AcceptanceCheckErr { } } -impl OnQueueChanged for Pallet { - fn on_queue_changed(para: ParaId, count: u32, size: u32) { - // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` - #[allow(deprecated)] - let key = well_known_keys::relay_dispatch_queue_size(para); - (count, size).using_encoded(|d| sp_io::storage::set(&key, d)); - - let config = >::config(); - let key = well_known_keys::relay_dispatch_queue_remaining_capacity(para); - let remaining_count = config.max_upward_queue_count.saturating_sub(count); - let remaining_size = config.max_upward_queue_size.saturating_sub(size); - (remaining_count, remaining_size).using_encoded(|d| sp_io::storage::set(&key, d)); +impl OnQueueChanged for Pallet { + fn on_queue_changed(queue: MessageOrigin, count: u64, size: u64) { + match queue { + MessageOrigin { queue: SubQueue::UMP, para } => { + // TODO maybe migrate this to u64 + let (count, size) = (count.saturated_into(), size.saturated_into()); + // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` + #[allow(deprecated)] + well_known_keys::relay_dispatch_queue_size_typed(para).set((count, size)); + + let config = >::config(); + let remaining_count = config.max_upward_queue_count.saturating_sub(count); + let remaining_size = config.max_upward_queue_size.saturating_sub(size); + well_known_keys::relay_dispatch_queue_remaining_capacity(para) + .set((remaining_count, remaining_size)); + }, + _ => todo!(), + } } } From 41182cc467b66329e9e2a24122c4c75abb63bddf Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:51:27 +0100 Subject: [PATCH 035/182] Harden check_upward_messages Using safe math and casts. Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 57 ++++++++++++++----------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 9f6b477581b5..03c5988c91ae 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -911,47 +911,56 @@ impl Pallet { /// Check that all the upward messages sent by a candidate pass the acceptance criteria. Returns /// false, if any of the messages doesn't pass. + // FAIL-CI: TODO update docs pub(crate) fn check_upward_messages( config: &HostConfiguration, para: ParaId, upward_messages: &[UpwardMessage], ) -> Result<(), UmpAcceptanceCheckErr> { - if upward_messages.len() as u32 > config.max_upward_message_num_per_candidate { + let additional_msgs = upward_messages.len(); + if additional_msgs > config.max_upward_message_num_per_candidate as usize { return Err(UmpAcceptanceCheckErr::MoreMessagesThanPermitted { - sent: upward_messages.len() as u32, + sent: additional_msgs as u32, permitted: config.max_upward_message_num_per_candidate, }) } - let fp = T::MessageQueue::footprint(para); - let (mut para_queue_count, mut para_queue_size) = (fp.count, fp.size); + let fp = T::MessageQueue::footprint(MessageOrigin::ump(para)); + let (para_queue_count, mut para_queue_size) = (fp.count, fp.size); + + if para_queue_count + .checked_add(additional_msgs as u64) + .map(|want| want > config.max_upward_queue_count as u64) + .unwrap_or(true) + { + return Err(UmpAcceptanceCheckErr::CapacityExceeded { + count: para_queue_count.saturating_add(additional_msgs as u64), + limit: config.max_upward_queue_count as u64, + }) + } for (idx, msg) in upward_messages.into_iter().enumerate() { - let msg_size = msg.len() as u32; - if msg_size > config.max_upward_message_size { + let msg_size = msg.len(); + if msg_size > config.max_upward_message_size as usize { return Err(UmpAcceptanceCheckErr::MessageSize { idx: idx as u32, - msg_size, + msg_size: msg_size as u32, max_size: config.max_upward_message_size, }) } - para_queue_count += 1; - para_queue_size += msg_size; - } - - // make sure that the queue is not overfilled. - // we do it here only once since returning false invalidates the whole relay-chain block. - if para_queue_count > config.max_upward_queue_count { - return Err(UmpAcceptanceCheckErr::CapacityExceeded { - count: para_queue_count, - limit: config.max_upward_queue_count, - }) - } - if para_queue_size > config.max_upward_queue_size { - return Err(UmpAcceptanceCheckErr::TotalSizeExceeded { - total_size: para_queue_size, - limit: config.max_upward_queue_size, - }) + // make sure that the queue is not overfilled. + // we do it here only once since returning false invalidates the whole relay-chain block. + if para_queue_size + .checked_add(msg_size as u64) + .map(|want| want > config.max_upward_queue_size as u64) + .unwrap_or(true) + { + return Err(UmpAcceptanceCheckErr::TotalSizeExceeded { + total_size: para_queue_size.saturating_add(msg_size as u64), + limit: config.max_upward_queue_size as u64, + }) + } + para_queue_size += msg_size as u64; } Ok(()) From 76721c037a58c477737bbb15b5591ffe96fae6b5 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:52:10 +0100 Subject: [PATCH 036/182] Add type-safe well_known_keys Signed-off-by: Oliver Tale-Yazdi --- primitives/src/v2/mod.rs | 47 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/primitives/src/v2/mod.rs b/primitives/src/v2/mod.rs index 02704cc03b61..b031d6159737 100644 --- a/primitives/src/v2/mod.rs +++ b/primitives/src/v2/mod.rs @@ -133,7 +133,7 @@ pub type ValidatorSignature = validator_app::Signature; /// A declarations of storage keys where an external observer can find some interesting data. pub mod well_known_keys { - use super::{HrmpChannelId, Id}; + use super::{HrmpChannelId, Id, WellKnownKey}; use hex_literal::hex; use parity_scale_codec::Encode as _; use sp_io::hashing::twox_64; @@ -208,6 +208,13 @@ pub mod well_known_keys { }) } + /// Type safe version of `relay_dispatch_queue_size`. + #[deprecated = "Use `relay_dispatch_queue_remaining_capacity` instead"] + pub fn relay_dispatch_queue_size_typed(para: Id) -> WellKnownKey<(u32, u32)> { + #[allow(deprecated)] + relay_dispatch_queue_size(para).into() + } + /// The upward message dispatch queue remaining capacity for the given para id. /// /// The storage entry stores a tuple of two values: @@ -215,8 +222,8 @@ pub mod well_known_keys { /// - `count: u32`, the number of additional messages which may be enqueued for the given para, /// - `total_size: u32`, the total size of additional messages which may be enqueued for the /// given para. - pub fn relay_dispatch_queue_remaining_capacity(para_id: Id) -> Vec { - (b":relay_dispatch_queue_remaining_capacity", para_id).encode() + pub fn relay_dispatch_queue_remaining_capacity(para_id: Id) -> WellKnownKey<(u32, u32)> { + (b":relay_dispatch_queue_remaining_capacity", para_id).encode().into() } /// The HRMP channel for the given identifier. @@ -1698,6 +1705,40 @@ impl PvfCheckStatement { } } +/// A well-known and typed storage key. +pub struct WellKnownKey { + /// The raw storage key. + pub key: Vec, + _p: sp_std::marker::PhantomData, +} + +impl From> for WellKnownKey { + fn from(key: Vec) -> Self { + Self { key, _p: Default::default() } + } +} + +impl AsRef<[u8]> for WellKnownKey { + fn as_ref(&self) -> &[u8] { + self.key.as_ref() + } +} + +impl WellKnownKey { + /// Gets the value or `None` if it does not exist or decoding failed. + pub fn get(&self) -> Option { + sp_io::storage::get(&self.key).and_then(|raw| + parity_scale_codec::DecodeAll::decode_all(&mut raw.as_ref()).ok()) + } +} + +impl WellKnownKey { + /// Sets the value. + pub fn set(&self, value: T) { + sp_io::storage::set(&self.key, &value.encode()); + } +} + /// Old, v1-style info about session info. Only needed for limited /// backwards-compatibility. #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] From 1d4ab90366aba70507ca4ea327543339d4f53b9a Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:52:57 +0100 Subject: [PATCH 037/182] Add message-queue weights Signed-off-by: Oliver Tale-Yazdi --- runtime/polkadot/src/weights/mod.rs | 1 + .../src/weights/pallet_message_queue.rs | 216 ++++++++++++++++++ 2 files changed, 217 insertions(+) create mode 100644 runtime/polkadot/src/weights/pallet_message_queue.rs diff --git a/runtime/polkadot/src/weights/mod.rs b/runtime/polkadot/src/weights/mod.rs index cef1ce83bd11..059b5a70b098 100644 --- a/runtime/polkadot/src/weights/mod.rs +++ b/runtime/polkadot/src/weights/mod.rs @@ -31,6 +31,7 @@ pub mod pallet_identity; pub mod pallet_im_online; pub mod pallet_indices; pub mod pallet_membership; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_nomination_pools; pub mod pallet_preimage; diff --git a/runtime/polkadot/src/weights/pallet_message_queue.rs b/runtime/polkadot/src/weights/pallet_message_queue.rs new file mode 100644 index 000000000000..cd9268ffde22 --- /dev/null +++ b/runtime/polkadot/src/weights/pallet_message_queue.rs @@ -0,0 +1,216 @@ +// This file is part of Substrate. + +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for pallet_message_queue +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-12-08, 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("dev"), DB CACHE: 1024 + +// Executed Command: +// /home/benchbot/cargo_target_dir/production/substrate +// 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/substrate/.git/.artifacts/bench.json +// --pallet=pallet_message_queue +// --chain=dev +// --header=./HEADER-APACHE2 +// --output=./frame/message-queue/src/weights.rs +// --template=./.maintain/frame-weight-template.hbs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +/// Weight functions needed for pallet_message_queue. +pub trait WeightInfo { + fn ready_ring_knit() -> Weight; + fn ready_ring_unknit() -> Weight; + fn service_queue_base() -> Weight; + fn service_page_base_completion() -> Weight; + fn service_page_base_no_completion() -> Weight; + fn service_page_item() -> Weight; + fn bump_service_head() -> Weight; + fn reap_page() -> Weight; + fn execute_overweight_page_removed() -> Weight; + fn execute_overweight_page_updated() -> Weight; +} + +/// Weights for pallet_message_queue using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl WeightInfo for SubstrateWeight { + // Storage: MessageQueue ServiceHead (r:1 w:0) + // Storage: MessageQueue BookStateFor (r:2 w:2) + fn ready_ring_knit() -> Weight { + // Minimum execution time: 12_330 nanoseconds. + Weight::from_ref_time(12_711_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: MessageQueue BookStateFor (r:2 w:2) + // Storage: MessageQueue ServiceHead (r:1 w:1) + fn ready_ring_unknit() -> Weight { + // Minimum execution time: 12_322 nanoseconds. + Weight::from_ref_time(12_560_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + fn service_queue_base() -> Weight { + // Minimum execution time: 4_652 nanoseconds. + Weight::from_ref_time(4_848_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: MessageQueue Pages (r:1 w:1) + fn service_page_base_completion() -> Weight { + // Minimum execution time: 7_115 nanoseconds. + Weight::from_ref_time(7_407_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: MessageQueue Pages (r:1 w:1) + fn service_page_base_no_completion() -> Weight { + // Minimum execution time: 6_974 nanoseconds. + Weight::from_ref_time(7_200_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Minimum execution time: 79_657 nanoseconds. + Weight::from_ref_time(80_050_000) + } + // Storage: MessageQueue ServiceHead (r:1 w:1) + // Storage: MessageQueue BookStateFor (r:1 w:0) + fn bump_service_head() -> Weight { + // Minimum execution time: 7_598 nanoseconds. + Weight::from_ref_time(8_118_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + // Storage: MessageQueue Pages (r:1 w:1) + fn reap_page() -> Weight { + // Minimum execution time: 60_562 nanoseconds. + Weight::from_ref_time(61_430_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + // Storage: MessageQueue Pages (r:1 w:1) + fn execute_overweight_page_removed() -> Weight { + // Minimum execution time: 74_582 nanoseconds. + Weight::from_ref_time(75_445_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + // Storage: MessageQueue Pages (r:1 w:1) + fn execute_overweight_page_updated() -> Weight { + // Minimum execution time: 87_526 nanoseconds. + Weight::from_ref_time(88_055_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} + +// For backwards compatibility and tests +impl WeightInfo for () { + // Storage: MessageQueue ServiceHead (r:1 w:0) + // Storage: MessageQueue BookStateFor (r:2 w:2) + fn ready_ring_knit() -> Weight { + // Minimum execution time: 12_330 nanoseconds. + Weight::from_ref_time(12_711_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: MessageQueue BookStateFor (r:2 w:2) + // Storage: MessageQueue ServiceHead (r:1 w:1) + fn ready_ring_unknit() -> Weight { + // Minimum execution time: 12_322 nanoseconds. + Weight::from_ref_time(12_560_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + fn service_queue_base() -> Weight { + // Minimum execution time: 4_652 nanoseconds. + Weight::from_ref_time(4_848_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: MessageQueue Pages (r:1 w:1) + fn service_page_base_completion() -> Weight { + // Minimum execution time: 7_115 nanoseconds. + Weight::from_ref_time(7_407_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: MessageQueue Pages (r:1 w:1) + fn service_page_base_no_completion() -> Weight { + // Minimum execution time: 6_974 nanoseconds. + Weight::from_ref_time(7_200_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Minimum execution time: 79_657 nanoseconds. + Weight::from_ref_time(80_050_000) + } + // Storage: MessageQueue ServiceHead (r:1 w:1) + // Storage: MessageQueue BookStateFor (r:1 w:0) + fn bump_service_head() -> Weight { + // Minimum execution time: 7_598 nanoseconds. + Weight::from_ref_time(8_118_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + // Storage: MessageQueue Pages (r:1 w:1) + fn reap_page() -> Weight { + // Minimum execution time: 60_562 nanoseconds. + Weight::from_ref_time(61_430_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + // Storage: MessageQueue Pages (r:1 w:1) + fn execute_overweight_page_removed() -> Weight { + // Minimum execution time: 74_582 nanoseconds. + Weight::from_ref_time(75_445_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + // Storage: MessageQueue BookStateFor (r:1 w:1) + // Storage: MessageQueue Pages (r:1 w:1) + fn execute_overweight_page_updated() -> Weight { + // Minimum execution time: 87_526 nanoseconds. + Weight::from_ref_time(88_055_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } +} From 694200c0ec1eb6358de8eb3c074430d4022657bd Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:55:08 +0100 Subject: [PATCH 038/182] Deploy MessageQueue to Polkadot Signed-off-by: Oliver Tale-Yazdi --- runtime/polkadot/src/lib.rs | 51 +++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 3a1c211bf028..c66439866cc7 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -32,7 +32,7 @@ use runtime_parachains::{ initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::v2 as parachains_runtime_api_impl, scheduler as parachains_scheduler, - session_info as parachains_session_info, shared as parachains_shared, ump as parachains_ump, + session_info as parachains_session_info, shared as parachains_shared, }; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; @@ -44,7 +44,7 @@ use frame_support::{ ConstU32, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, PrivilegeCmp, WithdrawReasons, }, - weights::ConstantMultiplier, + weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier}, PalletId, RuntimeDebug, }; use frame_system::EnsureRoot; @@ -1280,6 +1280,8 @@ impl parachains_inclusion::Config for Runtime { type RuntimeEvent = RuntimeEvent; type DisputesHandler = ParasDisputes; type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; + type MessageQueue = MessageQueue; + type WeightInfo = (); // FAIL-CI: TODO } parameter_types! { @@ -1293,17 +1295,44 @@ impl parachains_paras::Config for Runtime { type NextSessionRotation = Babe; } +// TODO does this make the slightest amount of sense? +pub struct ParaIdToJunction; +impl sp_runtime::traits::Convert + for ParaIdToJunction +{ + fn convert(o: parachains_inclusion::MessageOrigin) -> xcm::latest::Junction { + match o { + parachains_inclusion::MessageOrigin { + para, + queue: parachains_inclusion::SubQueue::UMP, + } => xcm::latest::Junction::Parachain(para.into()), + // FAIL-CI: Should be similar for the other *MP queues but check this as a TODO + _ => todo!(), + } + } +} + parameter_types! { - pub const FirstMessageFactorPercent: u64 = 100; + /// Amount of weigh which can be spent per block to service messages. + /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. + pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); } -impl parachains_ump::Config for Runtime { +impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type UmpSink = - crate::parachains_ump::XcmSink, Runtime>; - type FirstMessageFactorPercent = FirstMessageFactorPercent; - type ExecuteOverweightOrigin = EnsureRoot; - type WeightInfo = parachains_ump::TestWeightInfo; + type Size = u32; + type HeapSize = ConstU32<65_536>; + type MaxStale = ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; + // TODO Is `ParaIdToJunction` correct here? + type MessageProcessor = xcm_builder::ProcessXcmMessage< + parachains_inclusion::MessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + ParaIdToJunction, + >; + type QueueChangeHandler = (); + type WeightInfo = (); // FAIL-CI: TODO } impl parachains_dmp::Config for Runtime {} @@ -1551,10 +1580,11 @@ construct_runtime! { Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, Dmp: parachains_dmp::{Pallet, Call, Storage} = 58, - Ump: parachains_ump::{Pallet, Call, Storage, Event} = 59, + // Ump 59 Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 63, // Parachain Onboarding Pallets. Start indices at 70 to leave room. Registrar: paras_registrar::{Pallet, Call, Storage, Event} = 70, @@ -1666,6 +1696,7 @@ mod benches { [pallet_im_online, ImOnline] [pallet_indices, Indices] [pallet_membership, TechnicalMembership] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_nomination_pools, NominationPoolsBench::] [pallet_offences, OffencesBench::] From 19ec4eb4455f9ff3260faacd3895cbf4354f8cfe Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:55:40 +0100 Subject: [PATCH 039/182] Update Cargo.toml Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/Cargo.toml | 13 ++++++++++++- runtime/polkadot/Cargo.toml | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/runtime/parachains/Cargo.toml b/runtime/parachains/Cargo.toml index 9cad350459e6..7f1b6995b775 100644 --- a/runtime/parachains/Cargo.toml +++ b/runtime/parachains/Cargo.toml @@ -30,6 +30,7 @@ pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -58,7 +59,7 @@ sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master thousands = "0.2.0" assert_matches = "1" serde_json = "1.0.85" -pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master" } +proptest = "1.0.0" [features] default = ["std"] @@ -80,9 +81,11 @@ std = [ "sp-runtime/std", "sp-session/std", "sp-staking/std", + "pallet-authority-discovery/std", "pallet-authorship/std", "pallet-babe/std", "pallet-balances/std", + "pallet-message-queue/std", "pallet-session/std", "pallet-staking/std", "pallet-timestamp/std", @@ -97,15 +100,23 @@ runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", + "pallet-babe/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-staking/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-vesting/runtime-benchmarks", "primitives/runtime-benchmarks", "static_assertions", "sp-application-crypto", ] try-runtime = [ "frame-support/try-runtime", + "pallet-authority-discovery/try-runtime", "pallet-authorship/try-runtime", + "pallet-babe/try-runtime", "pallet-balances/try-runtime", + "pallet-message-queue/try-runtime", "pallet-session/try-runtime", "pallet-staking/try-runtime", "pallet-timestamp/try-runtime", diff --git a/runtime/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index 8c715491cbf4..07b821edc9df 100644 --- a/runtime/polkadot/Cargo.toml +++ b/runtime/polkadot/Cargo.toml @@ -54,6 +54,7 @@ pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "m 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-message-queue = { 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-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -146,6 +147,7 @@ std = [ "pallet-im-online/std", "pallet-indices/std", "pallet-membership/std", + "pallet-message-queue/std", "pallet-multisig/std", "pallet-nomination-pools/std", "pallet-nomination-pools-runtime-api/std", @@ -202,6 +204,7 @@ runtime-benchmarks = [ "pallet-im-online/runtime-benchmarks", "pallet-indices/runtime-benchmarks", "pallet-membership/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-nomination-pools/runtime-benchmarks", "pallet-nomination-pools-benchmarking/runtime-benchmarks", @@ -247,6 +250,7 @@ try-runtime = [ "pallet-im-online/try-runtime", "pallet-indices/try-runtime", "pallet-membership/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-nomination-pools/try-runtime", "pallet-offences/try-runtime", From 55e889aabcf1fa91390d07996272483886d38a04 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:56:27 +0100 Subject: [PATCH 040/182] Migrate to parachain config V5 Signed-off-by: Oliver Tale-Yazdi --- runtime/polkadot/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index c66439866cc7..f0f95f74aeff 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1638,7 +1638,7 @@ pub type Migrations = ( pallet_scheduler::migration::v4::CleanupAgendas, pallet_staking::migrations::v13::MigrateToV13, parachains_disputes::migration::v1::MigrateToV1, - parachains_configuration::migration::v4::MigrateToV4, + parachains_configuration::migration::v5::MigrateToV5, ); /// Unchecked extrinsic type as expected by this runtime. From 4f6a7239537decc150982c02f02b915c6973d073 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:58:29 +0100 Subject: [PATCH 041/182] Update UMP tests Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/mock.rs | 50 +++--- runtime/parachains/src/ump_tests.rs | 253 +++++++++++++++++++++++----- 2 files changed, 239 insertions(+), 64 deletions(-) diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 10750845f876..1f9075de9eb5 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -17,8 +17,9 @@ //! Mocks for all the traits. use crate::{ - configuration, disputes, dmp, hrmp, inclusion, initializer, origin, paras, paras_inherent, - scheduler, session_info, shared, ParaId, + configuration, disputes, dmp, hrmp, + inclusion::{self, MessageOrigin, SubQueue}, + initializer, origin, paras, paras_inherent, scheduler, session_info, shared, ParaId, }; use frame_support::{ @@ -279,42 +280,47 @@ impl crate::disputes::SlashingHandler for Test { impl crate::scheduler::Config for Test {} -pub struct TestWeightInfo; -impl pallet_message_queue::WeightInfo for TestWeightInfo { - fn service_page_base() -> Weight { +pub struct TestMessageQueueWeight; +impl pallet_message_queue::WeightInfo for TestMessageQueueWeight { + fn ready_ring_knit() -> Weight { + Weight::zero() + } + fn ready_ring_unknit() -> Weight { Weight::zero() } fn service_queue_base() -> Weight { Weight::zero() } - fn service_page_process_message() -> Weight { + fn service_page_base_completion() -> Weight { Weight::zero() } - fn bump_service_head() -> Weight { + fn service_page_base_no_completion() -> Weight { Weight::zero() } fn service_page_item() -> Weight { Weight::zero() } - fn ready_ring_unknit() -> Weight { + fn bump_service_head() -> Weight { Weight::zero() } fn reap_page() -> Weight { Weight::zero() } - fn execute_overweight() -> Weight { + fn execute_overweight_page_removed() -> Weight { Weight::zero() } - fn process_message_payload(_: u32) -> Weight { + fn execute_overweight_page_updated() -> Weight { Weight::zero() } } +pub type MessageQueueSize = u32; + impl pallet_message_queue::Config for Test { type RuntimeEvent = RuntimeEvent; - type WeightInfo = TestWeightInfo; + type WeightInfo = TestMessageQueueWeight; type MessageProcessor = TestProcessMessage; - type Size = u32; + type Size = MessageQueueSize; type QueueChangeHandler = ParaInclusion; type HeapSize = ConstU32<65536>; type MaxStale = ConstU32<8>; @@ -403,13 +409,8 @@ pub fn availability_rewards() -> HashMap { AVAILABILITY_REWARDS.with(|r| r.borrow().clone()) } -std::thread_local! { - static PROCESSED: RefCell> = RefCell::new(vec![]); -} - -/// Return which messages have been processed by `process_upward_message` and clear the buffer. -pub fn take_processed() -> Vec<(ParaId, UpwardMessage)> { - PROCESSED.with(|opt_hook| std::mem::take(&mut *opt_hook.borrow_mut())) +parameter_types! { + pub static Processed: Vec<(ParaId, UpwardMessage)> = vec![]; } /// An implementation of a UMP sink that just records which messages were processed. @@ -418,23 +419,24 @@ pub fn take_processed() -> Vec<(ParaId, UpwardMessage)> { /// `u32`. pub struct TestProcessMessage; impl ProcessMessage for TestProcessMessage { - type Origin = ParaId; + type Origin = MessageOrigin; fn process_message( message: &[u8], - origin: ParaId, + origin: MessageOrigin, weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { let weight = match u32::decode(&mut &message[..]) { Ok(w) => Weight::from_parts(w as u64, w as u64), Err(_) => return Err(ProcessMessageError::Corrupt), // same as the real `ProcessMessage` }; + debug_assert!(origin.queue == SubQueue::UMP); if weight.any_gt(weight_limit) { return Err(ProcessMessageError::Overweight(weight)) } - PROCESSED.with(|opt_hook| { - opt_hook.borrow_mut().push((origin, message.to_owned())); - }); + let mut processed = Processed::get(); + processed.push((origin.para, message.to_vec())); + Processed::set(processed); Ok((true, weight)) } } diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 2e36b2c063c3..23ace7df5348 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -14,9 +14,12 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -use crate::mock::{ - assert_last_event, assert_last_events, new_test_ext, take_processed, Configuration, - MessageQueue, MockGenesisConfig, ParaInclusion, System, Test, +use crate::{ + inclusion::{MessageOrigin, UmpAcceptanceCheckErr}, + mock::{ + assert_last_event, assert_last_events, new_test_ext, Configuration, MessageQueue, + MessageQueueSize, MockGenesisConfig, ParaInclusion, Processed, System, Test, + }, }; use frame_support::{ assert_noop, assert_ok, @@ -24,7 +27,7 @@ use frame_support::{ traits::{ExecuteOverweightError, ServiceQueues}, weights::Weight, }; -use primitives::v2::{Id as ParaId, UpwardMessage}; +use primitives::v2::{well_known_keys, Id as ParaId, UpwardMessage}; use sp_runtime::traits::{Bounded, Hash}; use sp_std::prelude::*; @@ -47,6 +50,10 @@ impl Default for GenesisConfigBuilder { } impl GenesisConfigBuilder { + pub(super) fn large_queue_count() -> Self { + Self { max_upward_queue_count: 128, ..Default::default() } + } + pub(super) fn build(self) -> crate::mock::MockGenesisConfig { let mut genesis = default_genesis_config(); let config = &mut genesis.configuration.config; @@ -71,12 +78,149 @@ fn default_genesis_config() -> MockGenesisConfig { } } +// FAIL-CI: TODO add tests fn queue_upward_msg(para: ParaId, msg: UpwardMessage) { let msgs = vec![msg]; assert!(ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs).is_ok()); let _ = ParaInclusion::receive_upward_messages(&Configuration::config(), para, msgs); } +mod check_upward_messages { + use super::*; + + const P_0: ParaId = ParaId::new(0u32); + const P_1: ParaId = ParaId::new(1u32); + + // Currently its trivial since unbounded, but this function will be handy when we bound it. + fn msg(data: &str) -> UpwardMessage { + data.as_bytes().to_vec() + } + + // helper + fn check(para: ParaId, msgs: Vec, err: Option) { + assert_eq!( + ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs[..]).err(), + err + ); + } + + fn queue(para: ParaId, msgs: Vec) { + let _ = ParaInclusion::receive_upward_messages(&Configuration::config(), para, msgs); + } + + #[test] + fn basic_works() { + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + let _g = frame_support::StorageNoopGuard::default(); + check(P_0, vec![msg("p0m0")], None); + check(P_1, vec![msg("p1m0")], None); + check(P_0, vec![msg("p0m1")], None); + check(P_1, vec![msg("p1m1")], None); + }); + } + + #[test] + fn num_per_candidate_exceeded_error() { + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + let _g = frame_support::StorageNoopGuard::default(); + let permitted = Configuration::config().max_upward_message_num_per_candidate; + + for sent in 0..permitted + 1 { + check(P_0, vec![msg(""); sent as usize], None); + } + for sent in permitted + 1..permitted + 10 { + check( + P_0, + vec![msg(""); sent as usize], + Some(UmpAcceptanceCheckErr::MoreMessagesThanPermitted { sent, permitted }), + ); + } + }); + } + + #[test] + fn size_per_message_exceeded_error() { + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + let _g = frame_support::StorageNoopGuard::default(); + let max_size = Configuration::config().max_upward_message_size; + + for msg_size in 0..max_size + 1 { + check(P_0, vec![vec![0; msg_size as usize]], None); + } + // FAIL-CI: TODO test when the msg is not first + for msg_size in max_size + 1..max_size + 10 { + check( + P_0, + vec![vec![0; msg_size as usize]], + Some(UmpAcceptanceCheckErr::MessageSize { idx: 0, msg_size, max_size }), + ); + } + }); + } + + #[test] + fn queue_count_exceeded_error() { + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + let limit = Configuration::config().max_upward_queue_count as u64; + + for _ in 0..limit { + check(P_0, vec![msg("")], None); + queue(P_0, vec![msg("")]); + } + + check( + P_0, + vec![msg("")], + Some(UmpAcceptanceCheckErr::CapacityExceeded { count: limit + 1, limit }), + ); + check( + P_0, + vec![msg(""); 2], + Some(UmpAcceptanceCheckErr::CapacityExceeded { count: limit + 2, limit }), + ); + }); + } + + #[test] + fn queue_size_exceeded_error() { + new_test_ext(GenesisConfigBuilder::large_queue_count().build()).execute_with(|| { + let limit = Configuration::config().max_upward_queue_size as u64; + assert_eq!(pallet_message_queue::ItemHeader::::max_encoded_len(), 5); + + // FAIL-CI: TODO why is the item header overhead not taken into account? + for _ in 0..limit { + check(P_0, vec![msg("1")], None); + queue(P_0, vec![msg("1")]); + } + + check( + P_0, + vec![msg("1")], + Some(UmpAcceptanceCheckErr::TotalSizeExceeded { total_size: limit + 1, limit }), + ); + check( + P_0, + vec![msg("123456")], + Some(UmpAcceptanceCheckErr::TotalSizeExceeded { total_size: limit + 6, limit }), + ); + }); + } + + proptest::proptest! { + #[test] + fn check_and_receive_do_not_panic(enqueued: Vec, candidate: Vec) { + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + let cfg = Configuration::config(); + + let _ = ParaInclusion::check_upward_messages(&cfg, P_0, &enqueued); + ParaInclusion::receive_upward_messages(&cfg, P_0, enqueued); + let _ = ParaInclusion::check_upward_messages(&cfg, P_0, &candidate); + ParaInclusion::receive_upward_messages(&cfg, P_0, candidate); + }); + } + } +} + #[test] fn dispatch_empty() { new_test_ext(default_genesis_config()).execute_with(|| { @@ -93,7 +237,7 @@ fn dispatch_single_message() { new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { queue_upward_msg(a, msg.clone()); MessageQueue::service_queues(Weight::max_value()); - assert_eq!(take_processed(), vec![(a, msg)]); + assert_eq!(Processed::take(), vec![(a, msg)]); }); } @@ -117,17 +261,17 @@ fn dispatch_resume_after_exceeding_dispatch_stage_weight() { // we expect only two first messages to fit in the first iteration. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(take_processed(), vec![(q, q_msg)]); + assert_eq!(Processed::take(), vec![(q, q_msg)]); queue_upward_msg(c, c_msg_2.clone()); // second iteration should process the second message. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(take_processed(), vec![(c, c_msg_1), (c, c_msg_2)]); + assert_eq!(Processed::take(), vec![(c, c_msg_1), (c, c_msg_2)]); // 3rd iteration. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(take_processed(), vec![(a, a_msg_1), (a, a_msg_2)]); + assert_eq!(Processed::take(), vec![(a, a_msg_1), (a, a_msg_2)]); // finally, make sure that the queue is empty. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(take_processed(), vec![]); + assert_eq!(Processed::take(), vec![]); }); } @@ -144,13 +288,13 @@ fn dispatch_keeps_message_after_weight_exhausted() { // we expect only one message to fit in the first iteration. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(take_processed(), vec![(a, a_msg_1)]); + assert_eq!(Processed::take(), vec![(a, a_msg_1)]); // second iteration should process the remaining message. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(take_processed(), vec![(a, a_msg_2)]); + assert_eq!(Processed::take(), vec![(a, a_msg_2)]); // finally, make sure that the queue is empty. MessageQueue::service_queues(Weight::from_parts(500, 500)); - assert_eq!(take_processed(), vec![]); + assert_eq!(Processed::take(), vec![]); }); } @@ -174,7 +318,7 @@ fn dispatch_correctly_handle_remove_of_latest() { queue_upward_msg(a, a_msg_2.clone()); queue_upward_msg(b, b_msg_1.clone()); MessageQueue::service_queues(Weight::from_parts(900, 900)); - assert_eq!(take_processed(), vec![(a, a_msg_1), (a, a_msg_2), (b, b_msg_1)]); + assert_eq!(Processed::take(), vec![(a, a_msg_1), (a, a_msg_2), (b, b_msg_1)]); }); } @@ -182,27 +326,56 @@ fn dispatch_correctly_handle_remove_of_latest() { fn verify_relay_dispatch_queue_size_is_externally_accessible() { // Make sure that the relay dispatch queue size storage entry is accessible via well known // keys and is decodable into a (u32, u32). - - use parity_scale_codec::Decode as _; - use primitives::well_known_keys; - - let a = ParaId::from(228); - let msg = vec![1, 2, 3]; - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - queue_upward_msg(a, msg); + let cfg = Configuration::config(); + + for para in 0..10 { + let para = para.into(); + queue_upward_msg(para, vec![0u8; 3]); + assert_queue_size(para, 1, 3); + assert_queue_remaining( + para, + cfg.max_upward_queue_count - 1, + cfg.max_upward_queue_size - 3, + ); + + queue_upward_msg(para, vec![0u8; 3]); + assert_queue_size(para, 2, 6); + assert_queue_remaining( + para, + cfg.max_upward_queue_count - 2, + cfg.max_upward_queue_size - 6, + ); + } + }); +} - #[allow(deprecated)] - let raw_queue_size = sp_io::storage::get(&well_known_keys::relay_dispatch_queue_size(a)).expect( - "enqueing a message should create the dispatch queue\ +fn assert_queue_size(para: ParaId, count: u32, size: u32) { + #[allow(deprecated)] + let raw_queue_size = sp_io::storage::get(&well_known_keys::relay_dispatch_queue_size(para)).expect( + "enqueing a message should create the dispatch queue\ and it should be accessible via the well known keys", - ); - let (cnt, size) = <(u32, u32)>::decode(&mut &raw_queue_size[..]) - .expect("the dispatch queue size should be decodable into (u32, u32)"); + ); + let (c, s) = <(u32, u32)>::decode(&mut &raw_queue_size[..]) + .expect("the dispatch queue size should be decodable into (u32, u32)"); + assert_eq!((c, s), (count, size)); + + // Test the deprecated but at least type-safe `relay_dispatch_queue_size_typed`: + #[allow(deprecated)] + let (c, s) = well_known_keys::relay_dispatch_queue_size_typed(para).get().expect( + "enqueing a message should create the dispatch queue\ + and it should be accessible via the well known keys", + ); + assert_eq!((c, s), (count, size)); +} - assert_eq!(cnt, 1); - assert_eq!(size, 3); - }); +fn assert_queue_remaining(para: ParaId, count: u32, size: u32) { + let (remaining_cnt, remaining_size) = + well_known_keys::relay_dispatch_queue_remaining_capacity(para) + .get() + .expect("No storage value"); + assert_eq!(count, remaining_cnt); + assert_eq!(size, remaining_size); } #[test] @@ -212,8 +385,8 @@ fn service_overweight_unknown() { new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { assert_noop!( ::execute_overweight( - Weight::from_ref_time(1000), - (0u32.into(), 0, 0) + Weight::MAX, + (MessageOrigin::ump(0u32.into()), 0, 0) ), ExecuteOverweightError::NotFound, ); @@ -247,21 +420,21 @@ fn overweight_queue_works() { [ pallet_message_queue::Event::::Processed { hash: hash_1.clone(), - origin: para_a, + origin: MessageOrigin::ump(para_a), weight_used: Weight::from_parts(301, 301), success: true, } .into(), pallet_message_queue::Event::::OverweightEnqueued { hash: hash_2.clone(), - origin: para_a, + origin: MessageOrigin::ump(para_a), page_index: 0, message_index: 1, } .into(), pallet_message_queue::Event::::OverweightEnqueued { hash: hash_3.clone(), - origin: para_a, + origin: MessageOrigin::ump(para_a), page_index: 0, message_index: 2, } @@ -269,14 +442,14 @@ fn overweight_queue_works() { ] .into_iter(), ); - assert_eq!(take_processed(), vec![(para_a, a_msg_1)]); + assert_eq!(Processed::take(), vec![(para_a, a_msg_1)]); // Now verify that if we wanted to service this overweight message with less than enough // weight it will fail. assert_noop!( ::execute_overweight( Weight::from_parts(500, 500), - (para_a, 0, 2) + (MessageOrigin::ump(para_a), 0, 2) ), ExecuteOverweightError::InsufficientWeight, ); @@ -284,12 +457,12 @@ fn overweight_queue_works() { // ... and if we try to service it with just enough weight it will succeed as well. assert_ok!(::execute_overweight( Weight::from_parts(501, 501), - (para_a, 0, 2) + (MessageOrigin::ump(para_a), 0, 2) )); assert_last_event( pallet_message_queue::Event::::Processed { hash: hash_3, - origin: para_a, + origin: MessageOrigin::ump(para_a), weight_used: Weight::from_parts(501, 501), success: true, } @@ -301,7 +474,7 @@ fn overweight_queue_works() { assert_noop!( ::execute_overweight( Weight::from_parts(501, 501), - (para_a, 0, 2) + (MessageOrigin::ump(para_a), 0, 2) ), ExecuteOverweightError::NotFound, ); From 3448b00900705850e3bbad216b998d845e8a3cbc Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 15:59:00 +0100 Subject: [PATCH 042/182] Cleanup Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 03c5988c91ae..04bb8c02bbd0 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -972,16 +972,15 @@ impl Pallet { para: ParaId, upward_messages: Vec, ) -> Weight { - if !upward_messages.is_empty() { - let count = upward_messages.len() as u32; - Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); - let messages = - upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); - T::MessageQueue::enqueue_messages(messages, para); - ::WeightInfo::receive_upward_messages(count) - } else { - Weight::zero() + if upward_messages.is_empty() { + return Weight::zero() } + + let count = upward_messages.len() as u32; + Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); + let messages = upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); + T::MessageQueue::enqueue_messages(messages, MessageOrigin::ump(para)); + ::WeightInfo::receive_upward_messages(count) } /// Cleans up all paras pending availability that the predicate returns true for. @@ -1170,12 +1169,13 @@ impl CandidateCheckContext { let relay_parent_number = now - One::one(); { - // this should never fail because the para is registered let persisted_validation_data = match crate::util::make_persisted_validation_data::( para_id, relay_parent_number, parent_storage_root, - ) { + ) + .defensive_proof("the para is registered") + { Some(l) => l, None => return Ok(Err(FailedToCreatePVD)), }; From b88f96204f47b03c19d7e4397f592dda456608cd Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 16:00:09 +0100 Subject: [PATCH 043/182] fmt Signed-off-by: Oliver Tale-Yazdi --- primitives/src/v2/mod.rs | 4 ++-- runtime/common/src/paras_sudo_wrapper.rs | 7 ++----- runtime/parachains/src/configuration.rs | 2 +- runtime/parachains/src/inclusion/mod.rs | 6 +++++- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/primitives/src/v2/mod.rs b/primitives/src/v2/mod.rs index b031d6159737..af1427b3ec29 100644 --- a/primitives/src/v2/mod.rs +++ b/primitives/src/v2/mod.rs @@ -1727,8 +1727,8 @@ impl AsRef<[u8]> for WellKnownKey { impl WellKnownKey { /// Gets the value or `None` if it does not exist or decoding failed. pub fn get(&self) -> Option { - sp_io::storage::get(&self.key).and_then(|raw| - parity_scale_codec::DecodeAll::decode_all(&mut raw.as_ref()).ok()) + sp_io::storage::get(&self.key) + .and_then(|raw| parity_scale_codec::DecodeAll::decode_all(&mut raw.as_ref()).ok()) } } diff --git a/runtime/common/src/paras_sudo_wrapper.rs b/runtime/common/src/paras_sudo_wrapper.rs index 5cf6e74e28a6..4b30d771521c 100644 --- a/runtime/common/src/paras_sudo_wrapper.rs +++ b/runtime/common/src/paras_sudo_wrapper.rs @@ -24,7 +24,7 @@ use primitives::Id as ParaId; use runtime_parachains::{ configuration, dmp, hrmp, paras::{self, ParaGenesisArgs}, - ump, ParaLifecycle, + ParaLifecycle, }; use sp_std::boxed::Box; @@ -38,10 +38,7 @@ pub mod pallet { #[pallet::config] #[pallet::disable_frame_system_supertrait_check] - pub trait Config: - configuration::Config + paras::Config + dmp::Config + ump::Config + hrmp::Config - { - } + pub trait Config: configuration::Config + paras::Config + dmp::Config + hrmp::Config {} #[pallet::error] pub enum Error { diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index 9a113bf48d67..d3263baadb02 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_REF_TIME_PER_MILLIS}; +use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; use parity_scale_codec::{Decode, Encode}; use primitives::{Balance, SessionIndex, MAX_CODE_SIZE, MAX_HEAD_DATA_SIZE, MAX_POV_SIZE}; diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 04bb8c02bbd0..c34a89a6f9ba 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -28,7 +28,11 @@ use crate::{ shared, }; use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec}; -use frame_support::{pallet_prelude::*, traits::EnqueueMessage, BoundedSlice}; +use frame_support::{ + pallet_prelude::*, + traits::{Defensive, EnqueueMessage}, + BoundedSlice, +}; use pallet_message_queue::OnQueueChanged; use parity_scale_codec::{Decode, Encode}; use primitives::{ From 2fce623d303a6de90c76072ffe07d04024c583a3 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 11 Jan 2023 16:35:31 +0100 Subject: [PATCH 044/182] Make stuff compile Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 447 +++++++++++------- .../parachains/src/configuration/migration.rs | 14 +- runtime/parachains/src/inclusion/mod.rs | 8 +- xcm/xcm-builder/src/process_xcm_message.rs | 5 +- 4 files changed, 275 insertions(+), 199 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 90701f6a7566..c2fa8629b6ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -437,7 +437,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "array-bytes", "async-trait", @@ -471,7 +471,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "beefy-gadget", "futures", @@ -490,7 +490,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "sp-api", "sp-beefy", @@ -525,6 +525,21 @@ dependencies = [ "shlex", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" @@ -2084,9 +2099,9 @@ dependencies = [ [[package]] name = "finality-grandpa" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b22349c6a11563a202d95772a68e0fcf56119e74ea8a2a19cf2301460fcd0df5" +checksum = "e24e6c429951433ccb7c87fd528c60084834dcd14763182c1f83291bcde24c34" dependencies = [ "either", "futures", @@ -2174,7 +2189,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", ] @@ -2198,7 +2213,7 @@ checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "frame-system", @@ -2221,7 +2236,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "Inflector", "array-bytes", @@ -2268,7 +2283,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2279,7 +2294,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2296,7 +2311,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "frame-system", @@ -2325,7 +2340,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "futures", "log", @@ -2341,7 +2356,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "bitflags", "frame-metadata", @@ -2373,7 +2388,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "Inflector", "cfg-expr", @@ -2387,7 +2402,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2399,7 +2414,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "proc-macro2", "quote", @@ -2409,7 +2424,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2432,7 +2447,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "frame-system", @@ -2443,7 +2458,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "log", @@ -2461,7 +2476,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -2476,7 +2491,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "sp-api", @@ -2485,7 +2500,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "parity-scale-codec", @@ -2656,7 +2671,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "chrono", "frame-election-provider-support", @@ -4376,7 +4391,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "futures", "log", @@ -4395,7 +4410,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "anyhow", "jsonrpsee", @@ -4940,7 +4955,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -4955,7 +4970,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "frame-system", @@ -4971,7 +4986,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "frame-system", @@ -4986,7 +5001,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5010,7 +5025,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5030,7 +5045,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5049,7 +5064,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5064,7 +5079,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "frame-system", @@ -5080,7 +5095,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "array-bytes", "beefy-merkle-tree", @@ -5103,7 +5118,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5121,7 +5136,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5140,7 +5155,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5157,7 +5172,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5174,7 +5189,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5192,7 +5207,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5215,7 +5230,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5228,7 +5243,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5246,7 +5261,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5264,7 +5279,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5287,7 +5302,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5303,7 +5318,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5323,7 +5338,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5340,7 +5355,24 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-message-queue" +version = "7.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5348,16 +5380,18 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", + "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", "sp-std", + "sp-weights", ] [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5374,7 +5408,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5390,7 +5424,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5406,7 +5440,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "frame-system", @@ -5423,7 +5457,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5443,7 +5477,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "sp-api", @@ -5453,7 +5487,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "frame-system", @@ -5470,7 +5504,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5493,7 +5527,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5510,7 +5544,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5525,7 +5559,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5543,7 +5577,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5558,7 +5592,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5577,7 +5611,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5594,7 +5628,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "frame-system", @@ -5615,7 +5649,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5631,7 +5665,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "frame-system", @@ -5645,7 +5679,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5668,7 +5702,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5679,7 +5713,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "log", "sp-arithmetic", @@ -5688,7 +5722,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5705,7 +5739,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "frame-system", @@ -5719,7 +5753,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5737,7 +5771,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5756,7 +5790,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-support", "frame-system", @@ -5772,7 +5806,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5788,7 +5822,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5800,7 +5834,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5817,7 +5851,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5833,7 +5867,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -5848,7 +5882,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-benchmarking", "frame-support", @@ -7194,6 +7228,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7351,6 +7386,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -7359,6 +7395,7 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-runtime-metrics", + "proptest", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", @@ -7959,6 +7996,26 @@ dependencies = [ "regex", ] +[[package]] +name = "proptest" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" +dependencies = [ + "bit-set", + "bitflags", + "byteorder", + "lazy_static", + "num-traits", + "quick-error 2.0.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax", + "rusty-fork", + "tempfile", +] + [[package]] name = "prost" version = "0.11.0" @@ -8193,6 +8250,15 @@ dependencies = [ "rand_core 0.6.3", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.3", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -8708,6 +8774,18 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error 1.2.3", + "tempfile", + "wait-timeout", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -8737,7 +8815,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "log", "sp-core", @@ -8748,7 +8826,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "futures", @@ -8775,7 +8853,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "futures", "futures-timer", @@ -8798,7 +8876,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8814,7 +8892,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -8829,7 +8907,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8840,7 +8918,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "array-bytes", "chrono", @@ -8880,7 +8958,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "fnv", "futures", @@ -8906,7 +8984,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "hash-db", "kvdb", @@ -8931,7 +9009,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "futures", @@ -8956,7 +9034,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "fork-tree", @@ -8994,7 +9072,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "futures", "jsonrpsee", @@ -9016,7 +9094,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9029,7 +9107,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "futures", @@ -9052,7 +9130,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "lru", "parity-scale-codec", @@ -9076,7 +9154,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9089,7 +9167,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "log", "sc-allocator", @@ -9102,7 +9180,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "cfg-if", "libc", @@ -9119,7 +9197,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "ahash", "array-bytes", @@ -9159,7 +9237,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "finality-grandpa", "futures", @@ -9179,7 +9257,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "ansi_term", "futures", @@ -9194,7 +9272,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "array-bytes", "async-trait", @@ -9209,7 +9287,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "array-bytes", "async-trait", @@ -9251,7 +9329,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "cid", "futures", @@ -9270,7 +9348,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "bitflags", @@ -9296,7 +9374,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "ahash", "futures", @@ -9314,7 +9392,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "array-bytes", "futures", @@ -9335,7 +9413,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "array-bytes", "async-trait", @@ -9367,7 +9445,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "array-bytes", "futures", @@ -9386,7 +9464,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "array-bytes", "bytes", @@ -9416,7 +9494,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "futures", "libp2p", @@ -9429,7 +9507,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9438,7 +9516,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "futures", "jsonrpsee", @@ -9467,7 +9545,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9486,7 +9564,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "http", "jsonrpsee", @@ -9501,7 +9579,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "array-bytes", "futures", @@ -9527,7 +9605,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "directories", @@ -9592,7 +9670,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "log", "parity-scale-codec", @@ -9603,7 +9681,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9622,7 +9700,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "futures", "libc", @@ -9641,7 +9719,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "chrono", "futures", @@ -9660,7 +9738,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "ansi_term", "atty", @@ -9691,7 +9769,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9702,7 +9780,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "futures", @@ -9728,7 +9806,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "futures", @@ -9742,7 +9820,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "backtrace", "futures", @@ -10238,7 +10316,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "hash-db", "log", @@ -10256,7 +10334,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "blake2", "proc-macro-crate", @@ -10268,7 +10346,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "scale-info", @@ -10281,7 +10359,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "integer-sqrt", "num-traits", @@ -10295,7 +10373,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "scale-info", @@ -10308,7 +10386,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "parity-scale-codec", @@ -10320,7 +10398,7 @@ dependencies = [ [[package]] name = "sp-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "scale-info", @@ -10337,7 +10415,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "sp-api", @@ -10349,7 +10427,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "futures", "log", @@ -10367,7 +10445,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "futures", @@ -10385,7 +10463,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "merlin", @@ -10408,7 +10486,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "scale-info", @@ -10420,7 +10498,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "scale-info", @@ -10433,7 +10511,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "array-bytes", "base58", @@ -10475,7 +10553,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "blake2", "byteorder", @@ -10489,7 +10567,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "proc-macro2", "quote", @@ -10500,7 +10578,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10509,7 +10587,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "proc-macro2", "quote", @@ -10519,7 +10597,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "environmental", "parity-scale-codec", @@ -10530,7 +10608,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "finality-grandpa", "log", @@ -10548,7 +10626,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10562,7 +10640,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "bytes", "ed25519", @@ -10587,7 +10665,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "lazy_static", "sp-core", @@ -10598,7 +10676,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "futures", @@ -10615,7 +10693,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "thiserror", "zstd", @@ -10624,7 +10702,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -10642,7 +10720,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "scale-info", @@ -10656,7 +10734,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "sp-api", "sp-core", @@ -10666,7 +10744,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "backtrace", "lazy_static", @@ -10676,7 +10754,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "rustc-hash", "serde", @@ -10686,7 +10764,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "either", "hash256-std-hasher", @@ -10708,7 +10786,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10726,7 +10804,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "Inflector", "proc-macro-crate", @@ -10738,7 +10816,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "scale-info", @@ -10752,7 +10830,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "scale-info", @@ -10764,7 +10842,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "hash-db", "log", @@ -10784,12 +10862,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10802,7 +10880,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "futures-timer", @@ -10817,7 +10895,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "sp-std", @@ -10829,7 +10907,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "sp-api", "sp-runtime", @@ -10838,7 +10916,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "log", @@ -10854,7 +10932,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "ahash", "hash-db", @@ -10877,7 +10955,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10894,7 +10972,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10905,7 +10983,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "impl-trait-for-tuples", "log", @@ -10918,7 +10996,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "parity-scale-codec", "scale-info", @@ -11151,7 +11229,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "platforms", ] @@ -11159,7 +11237,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11178,7 +11256,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "hyper", "log", @@ -11190,7 +11268,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "async-trait", "jsonrpsee", @@ -11203,7 +11281,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "jsonrpsee", "log", @@ -11222,7 +11300,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "array-bytes", "async-trait", @@ -11248,7 +11326,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11258,7 +11336,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11269,7 +11347,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "ansi_term", "build-helper", @@ -12064,7 +12142,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#934d42aefb51b797ee9ef41270bc041b1c1c6025" +source = "git+https://github.com/paritytech/substrate?branch=master#293c1f24e968a8d956250324fb7e91b7df4507df" dependencies = [ "clap", "frame-remote-externalities", @@ -12094,9 +12172,9 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.61" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc92f558afb6d1d7c6f175eb8d615b8ef49c227543e68e19c123d4ee43d8a7d" +checksum = "f1212c215a87a183687a7cc7065901b1a98da6b37277d51a1b5faedbb4efd4f3" dependencies = [ "dissimilar", "glob", @@ -13450,6 +13528,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", "xcm", "xcm-executor", ] diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs index 6cfab4e2c02f..204944f7cf94 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -30,9 +30,9 @@ use frame_system::pallet_prelude::BlockNumberFor; // TODO pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(4); -pub mod v4 { +pub mod v5 { use super::*; - use frame_support::{traits::OnRuntimeUpgrade, weights::constants::WEIGHT_REF_TIME_PER_MILLIS}; + use frame_support::traits::OnRuntimeUpgrade; use primitives::{Balance, SessionIndex}; #[cfg(feature = "try-runtime")] use sp_std::prelude::*; @@ -136,8 +136,8 @@ pub mod v4 { } } - pub struct MigrateToV4(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateToV4 { + pub struct MigrateToV5(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for MigrateToV5 { #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, &'static str> { log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade()"); @@ -148,7 +148,7 @@ pub mod v4 { fn on_runtime_upgrade() -> Weight { if StorageVersion::get::>() == 3 { - let weight_consumed = migrate_to_v4::(); + let weight_consumed = migrate_to_v5::(); log::info!(target: configuration::LOG_TARGET, "MigrateToV4 executed successfully"); STORAGE_VERSION.put::>(); @@ -268,7 +268,7 @@ mod tests { // doesn't need to be read and also leaving it as one line allows to easily copy it. let raw_config = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c800000700e8764817020040011e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c8000000060000005802000002000000580200000200000059000000000000001e000000280000000700c817a80402004001000200000014000000"]; - let v3 = v4::OldHostConfiguration::::decode(&mut &raw_config[..]) + let v4 = v5::OldHostConfiguration::::decode(&mut &raw_config[..]) .unwrap(); // We check only a sample of the values here. If we missed any fields or messed up data types @@ -292,7 +292,7 @@ mod tests { // We specify only the picked fields and the rest should be provided by the `Default` // implementation. That implementation is copied over between the two types and should work // fine. - let v3 = v4::OldHostConfiguration:: { + let v4 = v5::OldHostConfiguration:: { ump_max_individual_weight: Weight::from_parts(0x71616e6f6e0au64, 0x71616e6f6e0au64), needed_approvals: 69, thread_availability_period: 55, diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index c34a89a6f9ba..1465b6bf478c 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -36,10 +36,10 @@ use frame_support::{ use pallet_message_queue::OnQueueChanged; use parity_scale_codec::{Decode, Encode}; use primitives::{ - AvailabilityBitfield, BackedCandidate, CandidateCommitments, CandidateDescriptor, - CandidateHash, CandidateReceipt, CommittedCandidateReceipt, CoreIndex, GroupIndex, Hash, - HeadData, Id as ParaId, SigningContext, UncheckedSignedAvailabilityBitfields, ValidatorId, - ValidatorIndex, ValidityAttestation, + well_known_keys, AvailabilityBitfield, BackedCandidate, CandidateCommitments, + CandidateDescriptor, CandidateHash, CandidateReceipt, CommittedCandidateReceipt, CoreIndex, + GroupIndex, Hash, HeadData, Id as ParaId, SigningContext, UncheckedSignedAvailabilityBitfields, + UpwardMessage, ValidatorId, ValidatorIndex, ValidityAttestation, }; use scale_info::TypeInfo; use sp_runtime::{traits::One, DispatchError, SaturatedConversion}; diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index 7b0305a41bc2..5d2b33a1b169 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -16,10 +16,7 @@ //! Implementation of `ProcessMessage` for an `ExecuteXcm` implementation. -use frame_support::{ - ensure, - traits::{ProcessMessage, ProcessMessageError}, -}; +use frame_support::traits::{ProcessMessage, ProcessMessageError}; use parity_scale_codec::{Decode, FullCodec, MaxEncodedLen}; use scale_info::TypeInfo; use sp_io::hashing::blake2_256; From c3471d43ab1e6aa4e02cdf3bdb81dd0e25a6861a Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 24 Jan 2023 22:57:40 +0100 Subject: [PATCH 045/182] Move DMP and HRMP messages to the MessageQueue It currently does not compile in the CIbecause of some local tweaks to Substrate. Signed-off-by: Oliver Tale-Yazdi --- node/service/src/chain_spec.rs | 5 +- parachain/src/primitives.rs | 4 +- runtime/common/src/paras_sudo_wrapper.rs | 26 +- runtime/common/src/xcm_sender.rs | 20 +- runtime/parachains/src/configuration.rs | 9 +- .../parachains/src/configuration/migration.rs | 5 +- runtime/parachains/src/hrmp.rs | 273 ++++++++++----- runtime/parachains/src/inclusion/mod.rs | 321 +++++++++++++++--- runtime/parachains/src/initializer.rs | 7 +- runtime/parachains/src/lib.rs | 2 +- runtime/parachains/src/mock.rs | 2 +- runtime/parachains/src/runtime_api_impl/v2.rs | 18 +- runtime/polkadot/src/lib.rs | 41 ++- runtime/polkadot/src/weights/mod.rs | 1 - .../src/weights/runtime_parachains_ump.rs | 74 ---- xcm/xcm-builder/src/process_xcm_message.rs | 34 +- 16 files changed, 568 insertions(+), 274 deletions(-) delete mode 100644 runtime/polkadot/src/weights/runtime_parachains_ump.rs diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index 35208fb79342..a58e43d278dc 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -188,9 +188,12 @@ fn default_parachains_host_configuration( thread_availability_period: 4, max_upward_queue_count: 8, max_upward_queue_size: 1024 * 1024, - max_downward_message_size: 1024 * 1024, max_upward_message_size: 50 * 1024, max_upward_message_num_per_candidate: 5, + max_downward_queue_count: 1024, + max_downward_queue_size: 1024 * 1024, + max_downward_message_size: 50 * 1024, + max_downward_message_num_per_candidate: 5, hrmp_sender_deposit: 0, hrmp_recipient_deposit: 0, hrmp_channel_max_capacity: 8, diff --git a/parachain/src/primitives.rs b/parachain/src/primitives.rs index e638b83c2d7c..6fdf7c93e8ce 100644 --- a/parachain/src/primitives.rs +++ b/parachain/src/primitives.rs @@ -274,7 +274,9 @@ impl IsSystem for Sibling { /// is allowed between two participants in one direction, i.e. there cannot be 2 different channels /// identified by `(A, B)`. A channel with the same para id in sender and recipient is invalid. That /// is, however, not enforced. -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive( + Clone, PartialEq, Eq, PartialOrd, Ord, Encode, Decode, MaxEncodedLen, RuntimeDebug, TypeInfo, +)] #[cfg_attr(feature = "std", derive(Hash))] pub struct HrmpChannelId { /// The para that acts as the sender in this channel. diff --git a/runtime/common/src/paras_sudo_wrapper.rs b/runtime/common/src/paras_sudo_wrapper.rs index 4b30d771521c..dfa506fde42a 100644 --- a/runtime/common/src/paras_sudo_wrapper.rs +++ b/runtime/common/src/paras_sudo_wrapper.rs @@ -22,7 +22,8 @@ pub use pallet::*; use parity_scale_codec::Encode; use primitives::Id as ParaId; use runtime_parachains::{ - configuration, dmp, hrmp, + configuration, hrmp, inclusion, + inclusion::DmpLink, paras::{self, ParaGenesisArgs}, ParaLifecycle, }; @@ -38,7 +39,14 @@ pub mod pallet { #[pallet::config] #[pallet::disable_frame_system_supertrait_check] - pub trait Config: configuration::Config + paras::Config + dmp::Config + hrmp::Config {} + pub trait Config: + configuration::Config + paras::Config + inclusion::Config + hrmp::Config + { + /// Link to the DMP queue as provided by `pallet-parachain-inclusion`. + /// + /// This is a weaker coupling than inheriting the `inclusion::Config` which makes it easier for mocking. + type DmpLink: inclusion::DmpLink; + } #[pallet::error] pub enum Error { @@ -140,11 +148,15 @@ pub mod pallet { ensure_root(origin)?; ensure!(>::is_valid_para(id), Error::::ParaDoesntExist); let config = >::config(); - >::queue_downward_message(&config, id, xcm.encode()).map_err(|e| match e - { - dmp::QueueDownwardMessageError::ExceedsMaxMessageSize => - Error::::ExceedsMaxMessageSize.into(), - }) + use inclusion::DmpAcceptanceCheckErr::*; + ::DmpLink::try_receive_downward_message(&config, id, xcm.encode()) + .map_err(|e| match e { + MoreMessagesThanPermitted { .. } | + MessageSize { .. } | + CapacityExceeded { .. } | + TotalSizeExceeded { .. } => Error::::ExceedsMaxMessageSize.into(), + }) + .map(|_| ()) } /// Forcefully establish a channel from the sender to the recipient. diff --git a/runtime/common/src/xcm_sender.rs b/runtime/common/src/xcm_sender.rs index 392f0a40a087..67408419f794 100644 --- a/runtime/common/src/xcm_sender.rs +++ b/runtime/common/src/xcm_sender.rs @@ -21,7 +21,7 @@ use parity_scale_codec::Encode; use primitives::v2::Id as ParaId; use runtime_parachains::{ configuration::{self, HostConfiguration}, - dmp, + inclusion, }; use sp_std::{marker::PhantomData, prelude::*}; use xcm::prelude::*; @@ -50,8 +50,11 @@ impl> PriceForParachainDelivery for ConstantPrice { /// XCM sender for relay chain. It only sends downward message. pub struct ChildParachainRouter(PhantomData<(T, W, P)>); -impl - SendXcm for ChildParachainRouter +impl< + T: configuration::Config + inclusion::Config, + W: xcm::WrapVersion, + P: PriceForParachainDelivery, + > SendXcm for ChildParachainRouter { type Ticket = (HostConfiguration, ParaId, Vec); @@ -73,7 +76,7 @@ impl>::can_queue_downward_message(&config, ¶, &blob) + >::check_downward_messages(&config, ¶, &[&blob]) .map_err(Into::::into)?; Ok(((config, para, blob), price)) @@ -83,8 +86,11 @@ impl, ParaId, Vec), ) -> Result { let hash = sp_io::hashing::blake2_256(&blob[..]); - >::queue_downward_message(&config, para, blob) - .map(|()| hash) - .map_err(|_| SendError::Transport(&"Error placing into DMP queue")) + >::try_receive_downward_message(&config, para, blob) + .map(|_weight| hash) + .map_err(|_| { + frame_support::defensive!("Should have been checked before receiving."); + SendError::Transport(&"Error placing into DMP queue") + }) } } diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index d3263baadb02..6ed4958255bb 100644 --- a/runtime/parachains/src/configuration.rs +++ b/runtime/parachains/src/configuration.rs @@ -119,6 +119,9 @@ pub struct HostConfiguration { /// The maximum POV block size, in bytes. pub max_pov_size: u32, + + pub max_downward_queue_count: u32, + pub max_downward_queue_size: u32, /// The maximum size of a message that can be put in a downward message queue. /// /// Since we require receiving at least one DMP message the obvious upper bound of the size is @@ -126,6 +129,7 @@ pub struct HostConfiguration { /// decide to do with its PoV so this value in practice will be picked as a fraction of the PoV /// size. pub max_downward_message_size: u32, + pub max_downward_message_num_per_candidate: u32, /// The maximum number of outbound HRMP channels a parachain is allowed to open. pub hrmp_max_parachain_outbound_channels: u32, /// The maximum number of outbound HRMP channels a parathread is allowed to open. @@ -260,9 +264,12 @@ impl> Default for HostConfiguration Weight; fn hrmp_accept_open_channel() -> Weight; @@ -134,14 +143,15 @@ pub struct HrmpChannel { /// The total size in bytes of all message payloads in the channel. /// Invariant: should be less or equal to `max_total_size`. pub total_size: u32, - /// A head of the Message Queue Chain for this channel. Each link in this chain has a form: - /// `(prev_head, B, H(M))`, where - /// - `prev_head`: is the previous value of `mqc_head` or zero if none. - /// - `B`: is the [relay-chain] block number in which a message was appended - /// - `H(M)`: is the hash of the message being appended. - /// This value is initialized to a special value that consists of all zeroes which indicates - /// that no messages were previously added. - pub mqc_head: Option, + // FAIL-CI remove + // A head of the Message Queue Chain for this channel. Each link in this chain has a form: + // `(prev_head, B, H(M))`, where + // - `prev_head`: is the previous value of `mqc_head` or zero if none. + // - `B`: is the [relay-chain] block number in which a message was appended + // - `H(M)`: is the hash of the message being appended. + // This value is initialized to a special value that consists of all zeroes which indicates + // that no messages were previously added. + //pub mqc_head: Option, /// The amount that the sender supplied as a deposit when opening this channel. pub sender_deposit: Balance, /// The amount that the recipient supplied as a deposit when accepting opening this channel. @@ -239,9 +249,7 @@ pub mod pallet { pub struct Pallet(_); #[pallet::config] - pub trait Config: - frame_system::Config + configuration::Config + paras::Config + dmp::Config - { + pub trait Config: frame_system::Config + configuration::Config + paras::Config { /// The outer event type. type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -256,6 +264,15 @@ pub mod pallet { /// implementation should be the same as `Balance` as used in the `Configuration`. type Currency: ReservableCurrency; + /// Contains the contents of all HRMP channels. + /// FAIL-CI use the convert here + /// Formerly known as `HrmpChannelContents`. The origin here is a `HrmpChannelId` instead of `MessageOrigin` as in the inclusion pallet. You can use the adapter type `EnqueueMessageOriginConvert` to plug it in here. + type MessageQueue: EnqueueMessage; + + type MessageQueueReader: QueueIntrospect; + + type DmpLink: inclusion::DmpLink; + /// Something that provides the weight of this pallet. type WeightInfo: WeightInfo; } @@ -298,18 +315,30 @@ pub mod pallet { OpenHrmpChannelAlreadyRequested, /// The sender already has the maximum number of allowed outbound channels. OpenHrmpChannelLimitExceeded, + /// The recipient's DMP queue is full. + OpenHrmpChannelDmpFull, + /// The recipient's DMP queue rejected the request because it was too long. + OpenHrmpChannelDmpMessageSizeExceeded, /// The channel from the sender to the origin doesn't exist. AcceptHrmpChannelDoesntExist, /// The channel is already confirmed. AcceptHrmpChannelAlreadyConfirmed, /// The recipient already has the maximum number of allowed inbound channels. AcceptHrmpChannelLimitExceeded, + /// The recipient's DMP queue is full. + AcceptHrmpChannelDmpFull, + /// The recipient's DMP queue rejected the request because it was too long. + AcceptHrmpChannelDmpMessageSizeExceeded, /// The origin tries to close a channel where it is neither the sender nor the recipient. CloseHrmpChannelUnauthorized, /// The channel to be closed doesn't exist. CloseHrmpChannelDoesntExist, /// The channel close request is already requested. CloseHrmpChannelAlreadyUnderway, + /// The recipient's DMP queue is full. + CloseHrmpChannelDmpFull, + /// The recipient's DMP queue rejected the request because it was too long. + CloseHrmpChannelDmpMessageSizeExceeded, /// Canceling is requested by neither the sender nor recipient of the open channel request. CancelHrmpOpenChannelUnauthorized, /// The open request doesn't exist. @@ -401,15 +430,15 @@ pub mod pallet { StorageMap<_, Twox64Concat, ParaId, Vec, ValueQuery>; /// Storage for the messages for each channel. - /// Invariant: cannot be non-empty if the corresponding channel in `HrmpChannels` is `None`. - #[pallet::storage] - pub type HrmpChannelContents = StorageMap< - _, - Twox64Concat, - HrmpChannelId, - Vec>, - ValueQuery, - >; + /// Invariant: must be empty if the corresponding channel in `HrmpChannels` is `None`. + //#[pallet::storage] + //pub type HrmpChannelContents = StorageMap< + // _, + // Twox64Concat, + // HrmpChannelId, + // Vec>, + // ValueQuery, + //>; /// Maintains a mapping that can be used to answer the question: What paras sent a message at /// the given block number for a given receiver. Invariants: @@ -453,6 +482,19 @@ pub mod pallet { } } + #[pallet::hooks] + impl Hooks> for Pallet { + fn integrity_test() { + todo!(); + } + + #[cfg(feature = "try-runtime")] + fn try_state(_: BlockNumberFor) -> Result<(), &'static str> { + todo!("Test that the msg_count is equal to the footprint"); + todo!("Test that there exists a queue iff HrmpChannels is Some"); + } + } + #[pallet::call] impl Pallet { /// Initiate opening a channel from a parachain to a given recipient with given channel @@ -811,7 +853,6 @@ impl Pallet { max_message_size: request.max_message_size, msg_count: 0, total_size: 0, - mqc_head: None, }, ); @@ -867,7 +908,9 @@ impl Pallet { ); } - ::HrmpChannelContents::remove(channel_id); + //::HrmpChannelContents::remove(channel_id); + // FAIL-CI TODO force remove of queues + T::MessageQueue::sweep_queue(channel_id.clone()); ::HrmpEgressChannelsIndex::mutate(&channel_id.sender, |v| { if let Ok(i) = v.binary_search(&channel_id.recipient) { @@ -882,7 +925,7 @@ impl Pallet { } /// Check that the candidate of the given recipient controls the HRMP watermark properly. - pub(crate) fn check_hrmp_watermark( + pub(crate) fn check_hrmp_advancement( recipient: ParaId, relay_chain_parent_number: T::BlockNumber, new_hrmp_watermark: T::BlockNumber, @@ -1014,7 +1057,7 @@ impl Pallet { weight += T::DbWeight::get().reads_writes(1, 1); // having all senders we can trivially find out the channels which we need to prune. - let channels_to_prune = + /*let channels_to_prune = senders.into_iter().map(|sender| HrmpChannelId { sender, recipient }); for channel_id in channels_to_prune { // prune each channel up to the new watermark keeping track how many messages we removed @@ -1046,7 +1089,7 @@ impl Pallet { }); weight += T::DbWeight::get().reads_writes(2, 2); - } + }*/ ::HrmpWatermarks::insert(&recipient, new_hrmp_watermark); weight += T::DbWeight::get().reads_writes(0, 1); @@ -1061,38 +1104,46 @@ impl Pallet { sender: ParaId, out_hrmp_msgs: Vec>, ) -> Weight { - let mut weight = Weight::zero(); let now = >::block_number(); + // FAIL-CI chunk this by channel-id for out_msg in out_hrmp_msgs { let channel_id = HrmpChannelId { sender, recipient: out_msg.recipient }; - let mut channel = match ::HrmpChannels::get(&channel_id) { - Some(channel) => channel, - None => { - // apparently, that since acceptance of this candidate the recipient was - // offboarded and the channel no longer exists. - continue - }, - }; - + // FAIL-CI remove now done by on_queue_changed + //let mut channel = match ::HrmpChannels::get(&channel_id) { + // Some(channel) => channel, + // None => { + // // apparently, that since acceptance of this candidate the recipient was + // // offboarded and the channel no longer exists. + // // FAIL-CI test this in invariant try_state + // continue + // }, + //}; + // let inbound = InboundHrmpMessage { sent_at: now, data: out_msg.data }; - - // book keeping - channel.msg_count += 1; - channel.total_size += inbound.data.len() as u32; - - // compute the new MQC head of the channel - let prev_head = channel.mqc_head.unwrap_or(Default::default()); - let new_head = BlakeTwo256::hash_of(&( - prev_head, - inbound.sent_at, - T::Hashing::hash_of(&inbound.data), - )); - channel.mqc_head = Some(new_head); - - ::HrmpChannels::insert(&channel_id, channel); - ::HrmpChannelContents::append(&channel_id, inbound); + // + //// book keeping + //channel.msg_count += 1; + //channel.total_size += inbound.data.len() as u32; + // + //// compute the new MQC head of the channel + //let prev_head = channel.mqc_head.unwrap_or(Default::default()); + //let new_head = BlakeTwo256::hash_of(&( + // prev_head, + // inbound.sent_at, + // T::Hashing::hash_of(&inbound.data), + //)); + //channel.mqc_head = Some(new_head); + // + //::HrmpChannels::insert(&channel_id, channel); + //::HrmpChannelContents::append(&channel_id, inbound); + let encoded = inbound.encode(); + let Ok(bounded_message) = BoundedSlice::try_from(&encoded[..]) else { + defensive!("inbound HRMP message is too large"); + continue; + }; + T::MessageQueue::enqueue_message(bounded_message, channel_id.clone()); // The digests are sorted in ascending by block number order. Assuming absence of // contextual execution, there are only two possible scenarios here: @@ -1118,11 +1169,9 @@ impl Pallet { recipient_digest.push((now, vec![sender])); } ::HrmpChannelDigests::insert(&channel_id.recipient, recipient_digest); - - weight += T::DbWeight::get().reads_writes(2, 2); } - weight + Weight::zero() // FAIL-CI benchmark } /// Initiate opening a channel from a parachain to a given recipient with given channel @@ -1209,18 +1258,29 @@ impl Pallet { }])) .encode() }; - if let Err(dmp::QueueDownwardMessageError::ExceedsMaxMessageSize) = - >::queue_downward_message(&config, recipient, notification_bytes) - { - // this should never happen unless the max downward message size is configured to an - // jokingly small number. - log::error!( - target: "runtime::hrmp", - "sending 'init_open_channel::notification_bytes' failed." - ); - debug_assert!(false); + + use DmpAcceptanceCheckErr::*; + match T::DmpLink::check_downward_message(&config, &recipient, ¬ification_bytes) { + Ok(()) => (), + Err(MessageSize { .. }) => { + defensive!("DMP message size to small to accept HRMP channel"); + return Err(Error::::OpenHrmpChannelDmpMessageSizeExceeded.into()) + }, + Err( + TotalSizeExceeded { .. } | + MoreMessagesThanPermitted { .. } | + CapacityExceeded { .. }, + ) => { + log::info!( + target: LOG_TARGET, + "DMP queue cannot accept HRMP channel. Please retry.", + ); + return Err(Error::::OpenHrmpChannelDmpFull.into()) + }, } + T::DmpLink::receive_downward_message(&config, recipient, notification_bytes); + Ok(()) } @@ -1267,18 +1327,29 @@ impl Pallet { let xcm = Xcm(vec![HrmpChannelAccepted { recipient: u32::from(origin) }]); VersionedXcm::from(xcm).encode() }; - if let Err(dmp::QueueDownwardMessageError::ExceedsMaxMessageSize) = - >::queue_downward_message(&config, sender, notification_bytes) - { - // this should never happen unless the max downward message size is configured to an - // jokingly small number. - log::error!( - target: "runtime::hrmp", - "sending 'accept_open_channel::notification_bytes' failed." - ); - debug_assert!(false); + use DmpAcceptanceCheckErr::*; + match T::DmpLink::check_downward_message(&config, &sender, ¬ification_bytes) { + Ok(()) => (), + Err(MessageSize { .. }) => { + // This is a configuration error. + defensive!("DMP message size to small to ever HRMP channel"); + return Err(Error::::AcceptHrmpChannelDmpMessageSizeExceeded.into()) + }, + Err( + TotalSizeExceeded { .. } | + MoreMessagesThanPermitted { .. } | + CapacityExceeded { .. }, + ) => { + log::info!( + target: LOG_TARGET, + "DMP queue cannot accept HRMP channel. Please retry.", + ); + return Err(Error::::AcceptHrmpChannelDmpFull.into()) + }, } + T::DmpLink::receive_downward_message(&config, sender, notification_bytes); + Ok(()) } @@ -1345,18 +1416,28 @@ impl Pallet { }; let opposite_party = if origin == channel_id.sender { channel_id.recipient } else { channel_id.sender }; - if let Err(dmp::QueueDownwardMessageError::ExceedsMaxMessageSize) = - >::queue_downward_message(&config, opposite_party, notification_bytes) - { - // this should never happen unless the max downward message size is configured to an - // jokingly small number. - log::error!( - target: "runtime::hrmp", - "sending 'close_channel::notification_bytes' failed." - ); - debug_assert!(false); + use DmpAcceptanceCheckErr::*; + match T::DmpLink::check_downward_message(&config, &opposite_party, ¬ification_bytes) { + Ok(()) => (), + Err(MessageSize { .. }) => { + defensive!("DMP message size to small to close HRMP channel"); + return Err(Error::::CloseHrmpChannelDmpMessageSizeExceeded.into()) + }, + Err( + TotalSizeExceeded { .. } | + MoreMessagesThanPermitted { .. } | + CapacityExceeded { .. }, + ) => { + log::info!( + target: LOG_TARGET, + "DMP queue cannot close HRMP channel. Please retry." + ); + return Err(Error::::CloseHrmpChannelDmpFull.into()) + }, } + T::DmpLink::receive_downward_message(&config, opposite_party, notification_bytes); + Ok(()) } @@ -1386,16 +1467,17 @@ impl Pallet { pub(crate) fn inbound_hrmp_channels_contents( recipient: ParaId, ) -> BTreeMap>> { - let sender_set = ::HrmpIngressChannelsIndex::get(&recipient); + /*let sender_set = ::HrmpIngressChannelsIndex::get(&recipient); let mut inbound_hrmp_channels_contents = BTreeMap::new(); for sender in sender_set { let channel_contents = - ::HrmpChannelContents::get(&HrmpChannelId { sender, recipient }); + //::HrmpChannelContents::get(&HrmpChannelId { sender, recipient }); inbound_hrmp_channels_contents.insert(sender, channel_contents); } - inbound_hrmp_channels_contents + inbound_hrmp_channels_contents*/ + BTreeMap::new() } } @@ -1587,3 +1669,16 @@ impl Pallet { } } } + +impl OnQueueChanged for Pallet { + fn on_queue_changed(channel_id: HrmpChannelId, items_count: u64, items_size: u64) { + // Update the HrmpChannelDigests + let Some(mut channel) = HrmpChannels::::get(&channel_id) else { + defensive!("HRMP Channel {:?} is not registered", channel_id); + return; + }; + channel.msg_count = items_count as u32; // FAIL-CI: defensive_saturated_into + channel.total_size = items_size as u32; + HrmpChannels::::insert(&channel_id, channel); + } +} diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 1465b6bf478c..be2621ddac03 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -22,24 +22,25 @@ use crate::{ configuration::{self, HostConfiguration}, - disputes, dmp, hrmp, paras, + disputes, hrmp, paras, paras_inherent::DisputedBitfield, scheduler::CoreAssignment, shared, }; use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec}; use frame_support::{ + defensive, pallet_prelude::*, - traits::{Defensive, EnqueueMessage}, + traits::{Defensive, EnqueueMessage, OnQueueChanged}, BoundedSlice, }; -use pallet_message_queue::OnQueueChanged; use parity_scale_codec::{Decode, Encode}; use primitives::{ well_known_keys, AvailabilityBitfield, BackedCandidate, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateReceipt, CommittedCandidateReceipt, CoreIndex, - GroupIndex, Hash, HeadData, Id as ParaId, SigningContext, UncheckedSignedAvailabilityBitfields, - UpwardMessage, ValidatorId, ValidatorIndex, ValidityAttestation, + DownwardMessage, GroupIndex, Hash, HeadData, HrmpChannelId, Id as ParaId, SigningContext, + UncheckedSignedAvailabilityBitfields, UpwardMessage, ValidatorId, ValidatorIndex, + ValidityAttestation, }; use scale_info::TypeInfo; use sp_runtime::{traits::One, DispatchError, SaturatedConversion}; @@ -218,25 +219,40 @@ pub fn minimum_backing_votes(n_validators: usize) -> usize { /// NOTE Ideally we want the queue pallet to be sub-queue aware since currently we waste PoV by introducing a lot of few-element queues by doing this. /// /// Changing this requires a migration of the queue pallet. -#[derive(Encode, Decode, Clone, Copy, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] pub enum SubQueue { - UMP, - HRMP, - DMP, + UMP { from: ParaId }, + HRMP { channel: HrmpChannelId }, + DMP { to: ParaId }, } /// Over which `queue` and `from` which para-chain a message came in from. /// /// Changing this requires a migration of the queue pallet. #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] -pub struct MessageOrigin { - pub queue: SubQueue, - pub para: ParaId, +pub enum MessageOrigin { + /// A message in on of the UMP/DMP/HRMP queues. + MQ(SubQueue), + // Can be extended here for none-MP use-cases. } impl MessageOrigin { - pub const fn ump(para: ParaId) -> Self { - Self { queue: SubQueue::UMP, para } + pub const fn ump(from: ParaId) -> Self { + Self::MQ(SubQueue::UMP { from }) + } + pub const fn dmp(to: ParaId) -> Self { + Self::MQ(SubQueue::DMP { to }) + } + pub const fn hrmp(channel: HrmpChannelId) -> Self { + Self::MQ(SubQueue::HRMP { channel }) + } +} + +use sp_runtime::traits::Convert; +pub struct HrmpToMessageOriginConverter; +impl Convert for HrmpToMessageOriginConverter { + fn convert(channel_id: HrmpChannelId) -> MessageOrigin { + MessageOrigin::hrmp(channel_id) } } @@ -251,12 +267,7 @@ pub mod pallet { #[pallet::config] pub trait Config: - frame_system::Config - + shared::Config - + paras::Config - + dmp::Config - + hrmp::Config - + configuration::Config + frame_system::Config + shared::Config + paras::Config + hrmp::Config + configuration::Config { type WeightInfo: WeightInfo; type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -280,6 +291,8 @@ pub mod pallet { CandidateTimedOut(CandidateReceipt, HeadData, CoreIndex), /// Some upward messages have been received and will be processed. UpwardMessagesReceived { from: ParaId, count: u32 }, + /// Some downward messages have been received and will be processed. + DownwardMessagesReceived { to: ParaId, count: u32 }, } #[pallet::error] @@ -332,6 +345,8 @@ pub mod pallet { IncorrectDownwardMessageHandling, /// At least one upward message sent does not pass the acceptance criteria. InvalidUpwardMessages, + /// At least one downward message sent does not pass the acceptance criteria. + InvalidDownwardMessages, /// The candidate didn't follow the rules of HRMP watermark advancement. HrmpWatermarkMishandling, /// The HRMP messages sent by the candidate is not valid. @@ -373,8 +388,9 @@ enum AcceptanceCheckErr { HeadDataTooLarge, PrematureCodeUpgrade, NewCodeTooLarge, - ProcessedDownwardMessages(dmp::ProcessedDownwardMessagesAcceptanceErr), + ProcessedDownwardMessages(ProcessedDownwardMessagesAcceptanceErr), UpwardMessages(UmpAcceptanceCheckErr), + DownwardMessages(DmpAcceptanceCheckErr), HrmpWatermark(hrmp::HrmpWatermarkAcceptanceErr), OutboundHrmp(hrmp::OutboundHrmpAcceptanceErr), } @@ -393,6 +409,42 @@ pub enum UmpAcceptanceCheckErr { TotalSizeExceeded { total_size: u64, limit: u64 }, } +/// An error returned by [`check_downward_messages`] that indicates a violation of one of acceptance +/// criteria rules. +#[derive(Debug)] +#[cfg_attr(test, derive(PartialEq))] +pub enum DmpAcceptanceCheckErr { + /// The maximal number of messages that can be submitted in one batch was exceeded. + MoreMessagesThanPermitted { sent: u32, permitted: u32 }, + /// The maximal size of a single message was exceeded. + MessageSize { idx: u32, msg_size: u32, max_size: u32 }, + /// The allowed number of messages in the queue was exceeded. + CapacityExceeded { count: u64, limit: u64 }, + /// The allowed combined message size in the queue was exceeded. + TotalSizeExceeded { total_size: u64, limit: u64 }, +} + +use xcm::latest::SendError; +impl From for SendError { + fn from(err: DmpAcceptanceCheckErr) -> Self { + match err { + // FAIL-CI todo + _ => SendError::ExceedsMaxMessageSize, + } + } +} + +/// An error returned by [`check_processed_downward_messages`] that indicates an acceptance check +/// didn't pass. +#[derive(derive_more::From, Debug)] +#[cfg_attr(test, derive(PartialEq))] +pub enum ProcessedDownwardMessagesAcceptanceErr { + /// If there are pending messages then `processed_downward_messages` should be at least 1, + AdvancementRule, + /// `processed_downward_messages` should not be greater than the number of pending messages. + Underflow { processed_downward_messages: u32, dmq_length: u32 }, +} + impl fmt::Debug for UmpAcceptanceCheckErr { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { match *self { @@ -879,20 +931,21 @@ impl Pallet { ); } - // enact the messaging facet of the candidate. - weight += >::prune_dmq( - receipt.descriptor.para_id, - commitments.processed_downward_messages, - ); + // FAIL-CI remove Now done by the message queue + //weight += >::prune_dmq( + // receipt.descriptor.para_id, + // commitments.processed_downward_messages, + //); weight += Self::receive_upward_messages( &config, receipt.descriptor.para_id, commitments.upward_messages, ); - weight += >::prune_hrmp( - receipt.descriptor.para_id, - T::BlockNumber::from(commitments.hrmp_watermark), - ); + // FAIL-CI remove Now done by the queue pallet + //weight += >::prune_hrmp( + // receipt.descriptor.para_id, + // T::BlockNumber::from(commitments.hrmp_watermark), + //); weight += >::queue_outbound_hrmp( receipt.descriptor.para_id, commitments.horizontal_messages, @@ -929,7 +982,7 @@ impl Pallet { }) } - let fp = T::MessageQueue::footprint(MessageOrigin::ump(para)); + let fp = ::MessageQueue::footprint(MessageOrigin::ump(para)); let (para_queue_count, mut para_queue_size) = (fp.count, fp.size); if para_queue_count @@ -983,10 +1036,100 @@ impl Pallet { let count = upward_messages.len() as u32; Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); let messages = upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); - T::MessageQueue::enqueue_messages(messages, MessageOrigin::ump(para)); + ::MessageQueue::enqueue_messages(messages, MessageOrigin::ump(para)); ::WeightInfo::receive_upward_messages(count) } + pub fn try_receive_downward_message( + config: &HostConfiguration, + para: ParaId, + downward_messages: DownwardMessage, + ) -> Result { + if let Err(err) = Self::check_downward_message(config, ¶, &downward_messages) { + return Err(err) + } + Ok(Self::receive_downward_message(config, para, downward_messages)) + } + + /// Determine whether enqueuing these downward messages to a specific recipient para would result + /// in an error. If this returns `Ok(())` the caller can be certain that a call to + /// `receive_downward_message` with the same parameters will be successful. + pub fn check_downward_messages( + config: &HostConfiguration, + para: &ParaId, + downward_messages: &[&DownwardMessage], + ) -> Result<(), DmpAcceptanceCheckErr> { + // FAIL-CI: TODO merge this with `check_upward_messages` + let additional_msgs = downward_messages.len(); + if additional_msgs > config.max_downward_message_num_per_candidate as usize { + return Err(DmpAcceptanceCheckErr::MoreMessagesThanPermitted { + sent: additional_msgs as u32, + permitted: config.max_downward_message_num_per_candidate, + }) + } + + let fp = ::MessageQueue::footprint(MessageOrigin::dmp(para.clone())); + let (para_queue_count, mut para_queue_size) = (fp.count, fp.size); + + if para_queue_count + .checked_add(additional_msgs as u64) + .map(|want| want > config.max_downward_queue_count as u64) + .unwrap_or(true) + { + return Err(DmpAcceptanceCheckErr::CapacityExceeded { + count: para_queue_count.saturating_add(additional_msgs as u64), + limit: config.max_downward_queue_count as u64, + }) + } + + for (idx, msg) in downward_messages.into_iter().enumerate() { + let msg_size = msg.len(); + if msg_size > config.max_downward_message_size as usize { + return Err(DmpAcceptanceCheckErr::MessageSize { + idx: idx as u32, + msg_size: msg_size as u32, + max_size: config.max_downward_message_size, + }) + } + // make sure that the queue is not overfilled. + // we do it here only once since returning false invalidates the whole relay-chain block. + if para_queue_size + .checked_add(msg_size as u64) + .map(|want| want > config.max_downward_queue_size as u64) + .unwrap_or(true) + { + return Err(DmpAcceptanceCheckErr::TotalSizeExceeded { + total_size: para_queue_size.saturating_add(msg_size as u64), + limit: config.max_downward_queue_size as u64, + }) + } + para_queue_size += msg_size as u64; + } + + Ok(()) + } + + /// Enqueues `upward_messages` from a `para`'s accepted candidate block. + /// + /// ALWAYS CHECK [`check_downward_messages`] BEFORE CALLING THIS. + pub fn receive_downward_messages( + config: &HostConfiguration, + para: ParaId, + downward_messages: &[DownwardMessage], + ) -> Weight { + if downward_messages.is_empty() { + return Weight::zero() + } + + let count = downward_messages.len() as u32; + Self::deposit_event(Event::DownwardMessagesReceived { to: para, count }); + // FAIL-CI bubble up bounded requirement + let messages = downward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); + ::MessageQueue::enqueue_messages(messages, MessageOrigin::dmp(para)); + // FAIL-CI::WeightInfo::receive_downward_messages(count) + Weight::zero() + } + /// Cleans up all paras pending availability that the predicate returns true for. /// /// The predicate accepts the index of the core and the block number the core has been occupied @@ -1028,6 +1171,38 @@ impl Pallet { cleaned_up_cores } + pub(crate) fn check_dmp_advancement( + para: ParaId, + processed_downward_messages: u32, + ) -> Result<(), ProcessedDownwardMessagesAcceptanceErr> { + let dmq_length = ::MessageQueue::footprint(MessageOrigin::dmp(para)).count; + + if dmq_length > 0 && processed_downward_messages == 0 { + log::error!( + target: LOG_TARGET, + "Parachain {:?} processed none of its {} DMP messages", + para, + dmq_length, + ); + return Err(ProcessedDownwardMessagesAcceptanceErr::AdvancementRule) + } + if processed_downward_messages as u64 > dmq_length { + log::error!( + target: LOG_TARGET, + "Parachain {:?} processed more DMP messages than available, {} > {}", + para, + processed_downward_messages, + dmq_length, + ); + return Err(ProcessedDownwardMessagesAcceptanceErr::Underflow { + processed_downward_messages, + dmq_length: dmq_length as u32, + }) + } + + Ok(()) + } + /// Cleans up all paras pending availability that are in the given list of disputed candidates. /// /// Returns a vector of cleaned-up core IDs. @@ -1111,6 +1286,7 @@ impl AcceptanceCheckErr { NewCodeTooLarge => Error::::NewCodeTooLarge, ProcessedDownwardMessages(_) => Error::::IncorrectDownwardMessageHandling, UpwardMessages(_) => Error::::InvalidUpwardMessages, + DownwardMessages(_) => Error::::InvalidDownwardMessages, HrmpWatermark(_) => Error::::HrmpWatermarkMishandling, OutboundHrmp(_) => Error::::InvalidOutboundHrmp, } @@ -1118,20 +1294,21 @@ impl AcceptanceCheckErr { } impl OnQueueChanged for Pallet { - fn on_queue_changed(queue: MessageOrigin, count: u64, size: u64) { + fn on_queue_changed(queue: MessageOrigin, items_count: u64, items_size: u64) { + let MessageOrigin::MQ(queue) = queue else { + defensive!("Unexpected message origin: {:?}", queue); + return; + }; + match queue { - MessageOrigin { queue: SubQueue::UMP, para } => { - // TODO maybe migrate this to u64 - let (count, size) = (count.saturated_into(), size.saturated_into()); - // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` - #[allow(deprecated)] - well_known_keys::relay_dispatch_queue_size_typed(para).set((count, size)); - - let config = >::config(); - let remaining_count = config.max_upward_queue_count.saturating_sub(count); - let remaining_size = config.max_upward_queue_size.saturating_sub(size); - well_known_keys::relay_dispatch_queue_remaining_capacity(para) - .set((remaining_count, remaining_size)); + SubQueue::UMP { from: para } => { + todo!("Implement UMP message handling"); + }, + SubQueue::DMP { to: para } => { + todo!("Implement DMP message handling"); + }, + SubQueue::HRMP { channel } => { + hrmp::Pallet::::on_queue_changed(channel, items_count, items_size); }, _ => todo!(), } @@ -1267,11 +1444,61 @@ impl CandidateCheckContext { } // check if the candidate passes the messaging acceptance criteria - >::check_processed_downward_messages(para_id, processed_downward_messages)?; + Pallet::::check_dmp_advancement(para_id, processed_downward_messages)?; Pallet::::check_upward_messages(&self.config, para_id, upward_messages)?; - >::check_hrmp_watermark(para_id, self.relay_parent_number, hrmp_watermark)?; + >::check_hrmp_advancement( + para_id, + self.relay_parent_number, + hrmp_watermark, + )?; >::check_outbound_hrmp(&self.config, para_id, horizontal_messages)?; Ok(()) } } + +pub trait DmpLink { + fn check_downward_message( + config: &HostConfiguration, + para: &ParaId, + downward_messages: &DownwardMessage, + ) -> Result<(), DmpAcceptanceCheckErr>; + + fn receive_downward_message( + config: &HostConfiguration, + para: ParaId, + downward_messages: DownwardMessage, + ) -> Weight; + + fn try_receive_downward_message( + config: &HostConfiguration, + para: ParaId, + downward_messages: DownwardMessage, + ) -> Result; +} + +impl DmpLink<::BlockNumber> for Pallet { + fn check_downward_message( + config: &HostConfiguration, + para: &ParaId, + downward_messages: &DownwardMessage, + ) -> Result<(), DmpAcceptanceCheckErr> { + Self::check_downward_messages(config, para, &[downward_messages]) + } + + fn receive_downward_message( + config: &HostConfiguration, + para: ParaId, + downward_messages: DownwardMessage, + ) -> Weight { + Self::receive_downward_messages(config, para, &[downward_messages]) + } + + fn try_receive_downward_message( + config: &HostConfiguration, + para: ParaId, + downward_messages: DownwardMessage, + ) -> Result { + Self::try_receive_downward_message(config, para, downward_messages) + } +} diff --git a/runtime/parachains/src/initializer.rs b/runtime/parachains/src/initializer.rs index e78b113fce5c..b41d4c11bcc0 100644 --- a/runtime/parachains/src/initializer.rs +++ b/runtime/parachains/src/initializer.rs @@ -22,7 +22,7 @@ use crate::{ configuration::{self, HostConfiguration}, disputes::{self, DisputesHandler as _, SlashingHandler as _}, - dmp, hrmp, inclusion, paras, scheduler, session_info, shared, + hrmp, inclusion, paras, scheduler, session_info, shared, }; use frame_support::{ traits::{OneSessionHandler, Randomness}, @@ -113,7 +113,6 @@ pub mod pallet { + inclusion::Config + session_info::Config + disputes::Config - + dmp::Config + hrmp::Config { /// A randomness beacon. @@ -167,7 +166,6 @@ pub mod pallet { session_info::Pallet::::initializer_initialize(now) + T::DisputesHandler::initializer_initialize(now) + T::SlashingHandler::initializer_initialize(now) + - dmp::Pallet::::initializer_initialize(now) + hrmp::Pallet::::initializer_initialize(now); HasInitialized::::set(Some(())); @@ -178,7 +176,6 @@ pub mod pallet { fn on_finalize(now: T::BlockNumber) { // reverse initialization order. hrmp::Pallet::::initializer_finalize(); - dmp::Pallet::::initializer_finalize(); T::SlashingHandler::initializer_finalize(); T::DisputesHandler::initializer_finalize(); session_info::Pallet::::initializer_finalize(); @@ -265,7 +262,7 @@ impl Pallet { session_info::Pallet::::initializer_on_new_session(¬ification); T::DisputesHandler::initializer_on_new_session(¬ification); T::SlashingHandler::initializer_on_new_session(session_index); - dmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); + //dmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); // ump::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); hrmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); } diff --git a/runtime/parachains/src/lib.rs b/runtime/parachains/src/lib.rs index 8672e1efd13b..da0bdf7156ff 100644 --- a/runtime/parachains/src/lib.rs +++ b/runtime/parachains/src/lib.rs @@ -25,7 +25,7 @@ pub mod configuration; pub mod disputes; -pub mod dmp; +//pub mod dmp; pub mod hrmp; pub mod inclusion; pub mod initializer; diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index e24a1885c07c..77f45e4df198 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -17,7 +17,7 @@ //! Mocks for all the traits. use crate::{ - configuration, disputes, dmp, hrmp, + configuration, disputes, hrmp, inclusion::{self, MessageOrigin, SubQueue}, initializer, origin, paras, paras_inherent, scheduler, session_info, shared, ParaId, }; diff --git a/runtime/parachains/src/runtime_api_impl/v2.rs b/runtime/parachains/src/runtime_api_impl/v2.rs index e4be8101146d..6c1c7e0f4756 100644 --- a/runtime/parachains/src/runtime_api_impl/v2.rs +++ b/runtime/parachains/src/runtime_api_impl/v2.rs @@ -18,8 +18,8 @@ //! functions. use crate::{ - configuration, dmp, hrmp, inclusion, initializer, paras, paras_inherent, scheduler, - session_info, shared, + configuration, hrmp, inclusion, initializer, paras, paras_inherent, scheduler, session_info, + shared, }; use primitives::{ AuthorityDiscoveryId, CandidateEvent, CommittedCandidateReceipt, CoreIndex, CoreOccupied, @@ -340,6 +340,8 @@ where CandidateEvent::CandidateTimedOut(c, h, core), // Not needed for candidate events. RawEvent::::UpwardMessagesReceived { .. } => return None, + // FAIL-CI: correct? + RawEvent::::DownwardMessagesReceived { .. } => return None, RawEvent::::__Ignore(_, _) => unreachable!("__Ignore cannot be used"), }) }) @@ -351,12 +353,12 @@ pub fn session_info(index: SessionIndex) -> Option>::session_info(index) } -/// Implementation for the `dmq_contents` function of the runtime API. -pub fn dmq_contents( - recipient: ParaId, -) -> Vec> { - >::dmq_contents(recipient) -} +// Implementation for the `dmq_contents` function of the runtime API. +//pub fn dmq_contents( +// recipient: ParaId, +//) -> Vec> { +// >::dmq_contents(recipient) +//} /// Implementation for the `inbound_hrmp_channels_contents` function of the runtime API. pub fn inbound_hrmp_channels_contents( diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 4498781a375e..fbe28cf73e16 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -28,7 +28,7 @@ use runtime_common::{ use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, - dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, + hrmp as parachains_hrmp, inclusion as parachains_inclusion, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::v2 as parachains_runtime_api_impl, scheduler as parachains_scheduler, @@ -1302,11 +1302,14 @@ impl sp_runtime::traits::Convert xcm::latest::Junction { - match o { - parachains_inclusion::MessageOrigin { - para, - queue: parachains_inclusion::SubQueue::UMP, - } => xcm::latest::Junction::Parachain(para.into()), + let parachains_inclusion::MessageOrigin::MQ(queue) = o else { + unreachable!("Wrong origin type"); + }; + match queue { + parachains_inclusion::SubQueue::UMP { from } => + xcm::latest::Junction::Parachain(from.into()), + parachains_inclusion::SubQueue::DMP { to } => + xcm::latest::Junction::Parachain(to.into()), // FAIL-CI: Should be similar for the other *MP queues but check this as a TODO _ => todo!(), } @@ -1336,12 +1339,31 @@ impl pallet_message_queue::Config for Runtime { type WeightInfo = (); // FAIL-CI: TODO } -impl parachains_dmp::Config for Runtime {} +use frame_support::traits::TransformOrigin; +use primitives::HrmpChannelId; +use runtime_parachains::inclusion::{DmpLink, HrmpToMessageOriginConverter, MessageOrigin}; + +// FAIL-CI clean this up +pub struct MockedQueueIntrospect; +impl frame_support::traits::QueueIntrospect for MockedQueueIntrospect { + type MaxMessageLen = pallet_message_queue::MaxMessageLenOf; + + fn messages( + origin: HrmpChannelId, + ) -> Result>, ()> { + Err(()) + } +} impl parachains_hrmp::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; type Currency = Balances; + type MessageQueue = + TransformOrigin; + type MessageQueueReader = MockedQueueIntrospect; // FAIL-CI only needed for runtime-API + // The inclusion pallet manages the DMP queue. + type DmpLink = ParaInclusion; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; } @@ -1580,7 +1602,7 @@ construct_runtime! { ParaScheduler: parachains_scheduler::{Pallet, Storage} = 55, Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, - Dmp: parachains_dmp::{Pallet, Call, Storage} = 58, + // Dmp 58 // Ump 59 Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, @@ -1850,7 +1872,8 @@ sp_api::impl_runtime_apis! { } fn dmq_contents(recipient: ParaId) -> Vec> { - parachains_runtime_api_impl::dmq_contents::(recipient) + //parachains_runtime_api_impl::dmq_contents::(recipient) + unimplemented!() // FAIL-CI } fn inbound_hrmp_channels_contents( diff --git a/runtime/polkadot/src/weights/mod.rs b/runtime/polkadot/src/weights/mod.rs index 99c2b1b52109..d8f8bda90dd6 100644 --- a/runtime/polkadot/src/weights/mod.rs +++ b/runtime/polkadot/src/weights/mod.rs @@ -56,4 +56,3 @@ pub mod runtime_parachains_hrmp; pub mod runtime_parachains_initializer; pub mod runtime_parachains_paras; pub mod runtime_parachains_paras_inherent; -pub mod runtime_parachains_ump; diff --git a/runtime/polkadot/src/weights/runtime_parachains_ump.rs b/runtime/polkadot/src/weights/runtime_parachains_ump.rs deleted file mode 100644 index 8f1eb2d54749..000000000000 --- a/runtime/polkadot/src/weights/runtime_parachains_ump.rs +++ /dev/null @@ -1,74 +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 `runtime_parachains::ump` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-16, 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: -// /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=runtime_parachains::ump -// --chain=polkadot-dev -// --header=./file_header.txt -// --output=./runtime/polkadot/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 `runtime_parachains::ump`. -pub struct WeightInfo(PhantomData); -impl runtime_parachains::ump::WeightInfo for WeightInfo { - /// The range of component `s` is `[0, 51200]`. - fn process_upward_message(s: u32, ) -> Weight { - // Minimum execution time: 10_291 nanoseconds. - Weight::from_ref_time(4_272_368) - // Standard Error: 12 - .saturating_add(Weight::from_ref_time(1_872).saturating_mul(s.into())) - } - // 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 { - // Minimum execution time: 9_837 nanoseconds. - Weight::from_ref_time(9_951_000) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(4)) - } - // Storage: Ump Overweight (r:1 w:1) - // Storage: Ump CounterForOverweight (r:1 w:1) - fn service_overweight() -> Weight { - // Minimum execution time: 29_540 nanoseconds. - Weight::from_ref_time(29_889_000) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index 5d2b33a1b169..e67044b6b492 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -16,7 +16,10 @@ //! Implementation of `ProcessMessage` for an `ExecuteXcm` implementation. -use frame_support::traits::{ProcessMessage, ProcessMessageError}; +use frame_support::{ + ensure, + traits::{ProcessMessage, ProcessMessageError}, +}; use parity_scale_codec::{Decode, FullCodec, MaxEncodedLen}; use scale_info::TypeInfo; use sp_io::hashing::blake2_256; @@ -40,33 +43,22 @@ impl< fn process_message( message: &[u8], origin: Self::Origin, - _weight_limit: Weight, + weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { - let _hash = blake2_256(message); + let hash = blake2_256(message); let versioned_message = VersionedXcm::::decode(&mut &message[..]) .map_err(|_| ProcessMessageError::Corrupt)?; let message = Xcm::::try_from(versioned_message) .map_err(|_| ProcessMessageError::Unsupported)?; - // FIXME: Needs XCMv3 for pre-dispatch message weight extraction - // - /* let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; - let weight = Weight::from_ref_time(pre.weight_of()); + let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; + let weight = pre.weight_of(); ensure!(weight.all_lte(weight_limit), ProcessMessageError::Overweight(weight)); - match XcmExecutor::execute(origin.into(), pre, hash, 0) { - Outcome::Complete(w) => Ok((true, Weight::from_ref_time(w))), - Outcome::Incomplete(w, _) => Ok((false, Weight::from_ref_time(w))), + // FAIL-CI why max? + match XcmExecutor::execute(MessageToDispatchOrigin::convert(origin), pre, hash, Weight::MAX) + { + Outcome::Complete(w) => Ok((true, w)), + Outcome::Incomplete(w, _) => Ok((false, w)), Outcome::Error(_) => Err(ProcessMessageError::Unsupported), - }*/ - // Do not merge this… - let outcome = XcmExecutor::execute_xcm( - MessageToDispatchOrigin::convert(origin).into(), - message, - u64::MAX, - ); - match outcome { - Outcome::Error(XcmError::WeightLimitReached(_required)) => - Err(ProcessMessageError::Unsupported), - _outcome => Ok((true, Weight::MAX)), } } } From f23dec349f990ee83cae11619c9b7c2a781da709 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 24 Jan 2023 22:58:49 +0100 Subject: [PATCH 046/182] Diener for CI Signed-off-by: Oliver Tale-Yazdi --- Cargo.toml | 2 +- cli/Cargo.toml | 22 +-- core-primitives/Cargo.toml | 6 +- erasure-coding/Cargo.toml | 4 +- node/client/Cargo.toml | 56 +++---- node/collation-generation/Cargo.toml | 4 +- node/core/approval-voting/Cargo.toml | 18 +-- node/core/av-store/Cargo.toml | 4 +- node/core/backing/Cargo.toml | 12 +- node/core/bitfield-signing/Cargo.toml | 2 +- node/core/candidate-validation/Cargo.toml | 6 +- node/core/chain-api/Cargo.toml | 8 +- node/core/chain-selection/Cargo.toml | 2 +- node/core/dispute-coordinator/Cargo.toml | 12 +- node/core/parachains-inherent/Cargo.toml | 4 +- node/core/provisioner/Cargo.toml | 4 +- node/core/pvf-checker/Cargo.toml | 12 +- node/core/pvf/Cargo.toml | 18 +-- node/core/runtime-api/Cargo.toml | 10 +- node/jaeger/Cargo.toml | 4 +- node/malus/Cargo.toml | 6 +- node/metrics/Cargo.toml | 16 +- node/network/approval-distribution/Cargo.toml | 4 +- .../availability-distribution/Cargo.toml | 12 +- node/network/availability-recovery/Cargo.toml | 10 +- node/network/bitfield-distribution/Cargo.toml | 10 +- node/network/bridge/Cargo.toml | 10 +- node/network/collator-protocol/Cargo.toml | 12 +- node/network/dispute-distribution/Cargo.toml | 12 +- node/network/gossip-support/Cargo.toml | 16 +- node/network/protocol/Cargo.toml | 6 +- .../network/statement-distribution/Cargo.toml | 20 +-- node/overseer/Cargo.toml | 8 +- node/primitives/Cargo.toml | 12 +- node/service/Cargo.toml | 102 ++++++------ node/subsystem-test-helpers/Cargo.toml | 10 +- node/subsystem-types/Cargo.toml | 10 +- node/subsystem-util/Cargo.toml | 6 +- node/test/client/Cargo.toml | 28 ++-- node/test/service/Cargo.toml | 64 ++++---- parachain/Cargo.toml | 8 +- parachain/test-parachains/Cargo.toml | 2 +- parachain/test-parachains/adder/Cargo.toml | 6 +- .../test-parachains/adder/collator/Cargo.toml | 12 +- parachain/test-parachains/halt/Cargo.toml | 2 +- parachain/test-parachains/undying/Cargo.toml | 6 +- .../undying/collator/Cargo.toml | 12 +- primitives/Cargo.toml | 24 +-- primitives/test-helpers/Cargo.toml | 8 +- rpc/Cargo.toml | 46 +++--- runtime/common/Cargo.toml | 62 ++++---- runtime/common/slot_range_helper/Cargo.toml | 4 +- runtime/kusama/Cargo.toml | 150 +++++++++--------- runtime/kusama/constants/Cargo.toml | 8 +- runtime/metrics/Cargo.toml | 4 +- runtime/parachains/Cargo.toml | 54 +++---- runtime/polkadot/Cargo.toml | 138 ++++++++-------- runtime/polkadot/constants/Cargo.toml | 8 +- runtime/rococo/Cargo.toml | 130 +++++++-------- runtime/rococo/constants/Cargo.toml | 8 +- runtime/test-runtime/Cargo.toml | 78 ++++----- runtime/test-runtime/constants/Cargo.toml | 8 +- runtime/westend/Cargo.toml | 138 ++++++++-------- runtime/westend/constants/Cargo.toml | 8 +- statement-table/Cargo.toml | 2 +- utils/generate-bags/Cargo.toml | 4 +- utils/remote-ext-tests/bags-list/Cargo.toml | 8 +- utils/staking-miner/Cargo.toml | 28 ++-- xcm/Cargo.toml | 6 +- xcm/pallet-xcm-benchmarks/Cargo.toml | 20 +-- xcm/pallet-xcm/Cargo.toml | 16 +- xcm/xcm-builder/Cargo.toml | 20 +-- xcm/xcm-executor/Cargo.toml | 16 +- xcm/xcm-executor/integration-tests/Cargo.toml | 14 +- xcm/xcm-simulator/Cargo.toml | 6 +- xcm/xcm-simulator/example/Cargo.toml | 18 +-- xcm/xcm-simulator/fuzzer/Cargo.toml | 14 +- 77 files changed, 840 insertions(+), 840 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 35333e78ec80..90b66d3a19f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ assert_cmd = "2.0.4" nix = "0.24.1" tempfile = "3.2.0" tokio = "1.24.1" -substrate-rpc-client = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-rpc-client = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-core-primitives = { path = "core-primitives" } [workspace] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 0d1c55187400..4aadad2be35c 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -25,20 +25,20 @@ polkadot-client = { path = "../node/client", optional = true } 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 } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", optional = true , branch = "oty-mp-queue" } +try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = true , branch = "oty-mp-queue" } +sc-cli = { git = "https://github.com/paritytech/substrate", optional = true , branch = "oty-mp-queue" } +sc-service = { git = "https://github.com/paritytech/substrate", optional = true , branch = "oty-mp-queue" } 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" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-tracing = { git = "https://github.com/paritytech/substrate", optional = true , branch = "oty-mp-queue" } +sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [features] default = ["db", "cli", "hostperfcheck", "full-node", "polkadot-native"] diff --git a/core-primitives/Cargo.toml b/core-primitives/Cargo.toml index bad5533f9d1d..94f16a42b532 100644 --- a/core-primitives/Cargo.toml +++ b/core-primitives/Cargo.toml @@ -5,9 +5,9 @@ authors.workspace = true edition.workspace = true [dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } parity-scale-codec = { version = "3.1.5", default-features = false, features = [ "derive" ] } diff --git a/erasure-coding/Cargo.toml b/erasure-coding/Cargo.toml index 868d1197efd7..c436b0c402ca 100644 --- a/erasure-coding/Cargo.toml +++ b/erasure-coding/Cargo.toml @@ -9,8 +9,8 @@ polkadot-primitives = { path = "../primitives" } polkadot-node-primitives = { package = "polkadot-node-primitives", path = "../node/primitives" } novelpoly = { package = "reed-solomon-novelpoly", version = "1.0.0" } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["std", "derive"] } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-trie = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } thiserror = "1.0.31" [dev-dependencies] diff --git a/node/client/Cargo.toml b/node/client/Cargo.toml index b07447ef3396..397801324d71 100644 --- a/node/client/Cargo.toml +++ b/node/client/Cargo.toml @@ -7,37 +7,37 @@ 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" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-storage = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-offchain = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-storage = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-offchain = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-service = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", package = "sp-beefy" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", package = "sp-beefy" , branch = "oty-mp-queue" } # Polkadot Runtimes polkadot-runtime = { path = "../../runtime/polkadot", optional = true } diff --git a/node/collation-generation/Cargo.toml b/node/collation-generation/Cargo.toml index 93b06f315b5f..d16667a03da0 100644 --- a/node/collation-generation/Cargo.toml +++ b/node/collation-generation/Cargo.toml @@ -12,8 +12,8 @@ polkadot-node-primitives = { path = "../primitives" } polkadot-node-subsystem = { path = "../subsystem" } polkadot-node-subsystem-util = { path = "../subsystem-util" } polkadot-primitives = { path = "../../primitives" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } thiserror = "1.0.31" parity-scale-codec = { version = "3.1.5", default-features = false, features = ["bit-vec", "derive"] } diff --git a/node/core/approval-voting/Cargo.toml b/node/core/approval-voting/Cargo.toml index 75737f9a2fb0..4b2b7ab71f1c 100644 --- a/node/core/approval-voting/Cargo.toml +++ b/node/core/approval-voting/Cargo.toml @@ -24,20 +24,20 @@ polkadot-primitives = { path = "../../../primitives" } polkadot-node-primitives = { path = "../../primitives" } polkadot-node-jaeger = { path = "../../jaeger" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = ["full_crypto"] } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sc-keystore = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-consensus = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-consensus-slots = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["full_crypto"] , branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } [dev-dependencies] async-trait = "0.1.57" parking_lot = "0.12.0" rand_core = "0.5.1" # should match schnorrkel -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } assert_matches = "1.4.0" kvdb-memorydb = "0.13.0" diff --git a/node/core/av-store/Cargo.toml b/node/core/av-store/Cargo.toml index 73cdb72d8012..6fdc996584ed 100644 --- a/node/core/av-store/Cargo.toml +++ b/node/core/av-store/Cargo.toml @@ -26,9 +26,9 @@ env_logger = "0.9.0" assert_matches = "1.4.0" kvdb-memorydb = "0.13.0" -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } parking_lot = "0.12.0" test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } diff --git a/node/core/backing/Cargo.toml b/node/core/backing/Cargo.toml index 7428372eec62..ca49df31e147 100644 --- a/node/core/backing/Cargo.toml +++ b/node/core/backing/Cargo.toml @@ -6,7 +6,7 @@ edition.workspace = true [dependencies] futures = "0.3.21" -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-primitives = { path = "../../../primitives" } polkadot-node-primitives = { path = "../../primitives" } polkadot-node-subsystem = {path = "../../subsystem" } @@ -19,11 +19,11 @@ thiserror = "1.0.31" fatality = "0.0.6" [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } futures = { version = "0.3.21", features = ["thread-pool"] } assert_matches = "1.4.0" polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } diff --git a/node/core/bitfield-signing/Cargo.toml b/node/core/bitfield-signing/Cargo.toml index b94cc6708c74..ed3ed47397ca 100644 --- a/node/core/bitfield-signing/Cargo.toml +++ b/node/core/bitfield-signing/Cargo.toml @@ -10,7 +10,7 @@ gum = { package = "tracing-gum", path = "../../gum" } polkadot-primitives = { path = "../../../primitives" } polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } wasm-timer = "0.2.5" thiserror = "1.0.31" diff --git a/node/core/candidate-validation/Cargo.toml b/node/core/candidate-validation/Cargo.toml index 28731e1f25b8..924ec44c574e 100644 --- a/node/core/candidate-validation/Cargo.toml +++ b/node/core/candidate-validation/Cargo.toml @@ -10,7 +10,7 @@ futures = "0.3.21" futures-timer = "3.0.2" gum = { package = "tracing-gum", path = "../../gum" } -sp-maybe-compressed-blob = { package = "sp-maybe-compressed-blob", git = "https://github.com/paritytech/substrate", branch = "master" } +sp-maybe-compressed-blob = { package = "sp-maybe-compressed-blob", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["bit-vec", "derive"] } polkadot-primitives = { path = "../../../primitives" } @@ -23,10 +23,10 @@ polkadot-node-metrics = { path = "../../metrics" } polkadot-node-core-pvf = { path = "../pvf" } [dev-dependencies] -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } futures = { version = "0.3.21", features = ["thread-pool"] } assert_matches = "1.4.0" polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } diff --git a/node/core/chain-api/Cargo.toml b/node/core/chain-api/Cargo.toml index ec4d0bc9a3d6..730cc1daaa53 100644 --- a/node/core/chain-api/Cargo.toml +++ b/node/core/chain-api/Cargo.toml @@ -7,12 +7,12 @@ edition.workspace = true [dependencies] futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-primitives = { path = "../../../primitives" } polkadot-node-metrics = { path = "../../metrics" } polkadot-node-subsystem = {path = "../../subsystem" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [dev-dependencies] futures = { version = "0.3.21", features = ["thread-pool"] } @@ -20,4 +20,4 @@ maplit = "1.0.2" parity-scale-codec = "3.1.5" polkadot-node-primitives = { path = "../../primitives" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } diff --git a/node/core/chain-selection/Cargo.toml b/node/core/chain-selection/Cargo.toml index 8d4145461b94..4746c2d09c88 100644 --- a/node/core/chain-selection/Cargo.toml +++ b/node/core/chain-selection/Cargo.toml @@ -19,7 +19,7 @@ parity-scale-codec = "3.1.5" [dev-dependencies] polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } parking_lot = "0.12.0" assert_matches = "1" kvdb-memorydb = "0.13.0" diff --git a/node/core/dispute-coordinator/Cargo.toml b/node/core/dispute-coordinator/Cargo.toml index 6152645e209d..62caa8a4e904 100644 --- a/node/core/dispute-coordinator/Cargo.toml +++ b/node/core/dispute-coordinator/Cargo.toml @@ -18,20 +18,20 @@ polkadot-node-primitives = { path = "../../primitives" } polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [dev-dependencies] 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" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } assert_matches = "1.4.0" test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } futures-timer = "3.0.2" -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [features] # If not enabled, the dispute coordinator will do nothing. diff --git a/node/core/parachains-inherent/Cargo.toml b/node/core/parachains-inherent/Cargo.toml index d4301cb22270..c4b0f97c384b 100644 --- a/node/core/parachains-inherent/Cargo.toml +++ b/node/core/parachains-inherent/Cargo.toml @@ -13,5 +13,5 @@ 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-blockchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } diff --git a/node/core/provisioner/Cargo.toml b/node/core/provisioner/Cargo.toml index c6d78582cfc9..a8d6b80789b7 100644 --- a/node/core/provisioner/Cargo.toml +++ b/node/core/provisioner/Cargo.toml @@ -18,7 +18,7 @@ futures-timer = "3.0.2" fatality = "0.0.6" [dev-dependencies] -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } diff --git a/node/core/pvf-checker/Cargo.toml b/node/core/pvf-checker/Cargo.toml index d41955d9bac5..a167000ae4e9 100644 --- a/node/core/pvf-checker/Cargo.toml +++ b/node/core/pvf-checker/Cargo.toml @@ -15,14 +15,14 @@ polkadot-primitives = { path = "../../../primitives" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-overseer = { path = "../../overseer" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers"} test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } futures-timer = "3.0.2" diff --git a/node/core/pvf/Cargo.toml b/node/core/pvf/Cargo.toml index e00092826428..7d962de3364a 100644 --- a/node/core/pvf/Cargo.toml +++ b/node/core/pvf/Cargo.toml @@ -28,15 +28,15 @@ 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" } -sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-wasm-interface = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-executor-wasmtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-executor-common = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-wasm-interface = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [dev-dependencies] adder = { package = "test-parachain-adder", path = "../../../parachain/test-parachains/adder" } diff --git a/node/core/runtime-api/Cargo.toml b/node/core/runtime-api/Cargo.toml index 31c1386cbd7f..5d9b9ab87674 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -9,7 +9,7 @@ futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } lru = "0.9" -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-primitives = { path = "../../../primitives" } polkadot-node-metrics = { path = "../../metrics" } @@ -17,10 +17,10 @@ polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem-types = { path = "../../subsystem-types" } [dev-dependencies] -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } futures = { version = "0.3.21", features = ["thread-pool"] } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } polkadot-node-primitives = { path = "../../primitives" } diff --git a/node/jaeger/Cargo.toml b/node/jaeger/Cargo.toml index 938ae3853e39..a2f74774a38e 100644 --- a/node/jaeger/Cargo.toml +++ b/node/jaeger/Cargo.toml @@ -11,8 +11,8 @@ lazy_static = "1.4" parking_lot = "0.12.0" polkadot-primitives = { path = "../../primitives" } 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" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } thiserror = "1.0.31" tokio = "1.24.1" log = "0.4.17" diff --git a/node/malus/Cargo.toml b/node/malus/Cargo.toml index c783693ca527..514fbfaf8515 100644 --- a/node/malus/Cargo.toml +++ b/node/malus/Cargo.toml @@ -26,8 +26,8 @@ polkadot-node-core-pvf = { path = "../core/pvf" } color-eyre = { version = "0.6.1", default-features = false } assert_matches = "1.5" async-trait = "0.1.57" -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } clap = { version = "4.0.9", features = ["derive"] } futures = "0.3.21" futures-timer = "3.0.2" @@ -40,5 +40,5 @@ default = [] [dev-dependencies] polkadot-node-subsystem-test-helpers = { path = "../subsystem-test-helpers" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } futures = { version = "0.3.21", features = ["thread-pool"] } diff --git a/node/metrics/Cargo.toml b/node/metrics/Cargo.toml index 815df94a8488..42a30b0137cb 100644 --- a/node/metrics/Cargo.toml +++ b/node/metrics/Cargo.toml @@ -13,11 +13,11 @@ gum = { package = "tracing-gum", path = "../gum" } metered = { package = "prioritized-metered-channel", version = "0.2.0" } # Both `sc-service` and `sc-cli` are required by runtime metrics `logger_hook()`. -sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } codec = { package = "parity-scale-codec", version = "3.0.0" } primitives = { package = "polkadot-primitives", path = "../../primitives/" } bs58 = { version = "0.4.0", features = ["alloc"] } @@ -30,10 +30,10 @@ tempfile = "3.2.0" hyper = { version = "0.14.20", default-features = false, features = ["http1", "tcp"] } tokio = "1.24.1" 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" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } prometheus-parse = {version = "0.2.2"} [features] diff --git a/node/network/approval-distribution/Cargo.toml b/node/network/approval-distribution/Cargo.toml index 6df854072aa6..f8d1818a1cbd 100644 --- a/node/network/approval-distribution/Cargo.toml +++ b/node/network/approval-distribution/Cargo.toml @@ -16,8 +16,8 @@ futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } [dev-dependencies] -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["std"] } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", features = ["std"] , branch = "oty-mp-queue" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } diff --git a/node/network/availability-distribution/Cargo.toml b/node/network/availability-distribution/Cargo.toml index c9881f270132..3a13613ea03a 100644 --- a/node/network/availability-distribution/Cargo.toml +++ b/node/network/availability-distribution/Cargo.toml @@ -14,8 +14,8 @@ polkadot-node-network-protocol = { path = "../../network/protocol" } polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-primitives = { path = "../../primitives" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["std"] } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", features = ["std"] , branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } thiserror = "1.0.31" rand = "0.8.5" derive_more = "0.99.17" @@ -24,10 +24,10 @@ fatality = "0.0.6" [dev-dependencies] polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["std"] } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", features = ["std"] , branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } futures-timer = "3.0.2" assert_matches = "1.4.0" polkadot-primitives-test-helpers = { path = "../../../primitives/test-helpers" } diff --git a/node/network/availability-recovery/Cargo.toml b/node/network/availability-recovery/Cargo.toml index b76a73d38b9d..b5d1fe3d5027 100644 --- a/node/network/availability-recovery/Cargo.toml +++ b/node/network/availability-recovery/Cargo.toml @@ -19,7 +19,7 @@ polkadot-node-subsystem = {path = "../../subsystem" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-network-protocol = { path = "../../network/protocol" } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [dev-dependencies] assert_matches = "1.4.0" @@ -27,10 +27,10 @@ env_logger = "0.9.0" futures-timer = "3.0.2" log = "0.4.17" -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } polkadot-primitives-test-helpers = { path = "../../../primitives/test-helpers" } diff --git a/node/network/bitfield-distribution/Cargo.toml b/node/network/bitfield-distribution/Cargo.toml index 8ac7c2ac6bfb..9adfe11b4848 100644 --- a/node/network/bitfield-distribution/Cargo.toml +++ b/node/network/bitfield-distribution/Cargo.toml @@ -16,11 +16,11 @@ rand = "0.8" [dev-dependencies] polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } maplit = "1.0.2" log = "0.4.17" env_logger = "0.9.0" diff --git a/node/network/bridge/Cargo.toml b/node/network/bridge/Cargo.toml index 2d68cdb4d808..beca0f209eaa 100644 --- a/node/network/bridge/Cargo.toml +++ b/node/network/bridge/Cargo.toml @@ -11,9 +11,9 @@ futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } polkadot-primitives = { path = "../../../primitives" } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-node-metrics = { path = "../../metrics"} polkadot-node-network-protocol = { path = "../protocol" } polkadot-node-subsystem = {path = "../../subsystem" } @@ -27,7 +27,7 @@ thiserror = "1" assert_matches = "1.4.0" polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } polkadot-node-subsystem-util = { path = "../../subsystem-util"} -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } futures-timer = "3" polkadot-primitives-test-helpers = { path = "../../../primitives/test-helpers" } diff --git a/node/network/collator-protocol/Cargo.toml b/node/network/collator-protocol/Cargo.toml index c7618baa3cd7..783dc6bb1c13 100644 --- a/node/network/collator-protocol/Cargo.toml +++ b/node/network/collator-protocol/Cargo.toml @@ -11,9 +11,9 @@ futures = "0.3.21" futures-timer = "3" gum = { package = "tracing-gum", path = "../../gum" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-primitives = { path = "../../../primitives" } polkadot-node-network-protocol = { path = "../../network/protocol" } @@ -28,9 +28,9 @@ log = "0.4.17" env_logger = "0.9.0" assert_matches = "1.4.0" -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["std"] } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", features = ["std"] , branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } parity-scale-codec = { version = "3.1.5", features = ["std"] } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } diff --git a/node/network/dispute-distribution/Cargo.toml b/node/network/dispute-distribution/Cargo.toml index f3f9a9133769..9384b10840ff 100644 --- a/node/network/dispute-distribution/Cargo.toml +++ b/node/network/dispute-distribution/Cargo.toml @@ -16,9 +16,9 @@ polkadot-node-subsystem = {path = "../../subsystem" } polkadot-node-network-protocol = { path = "../../network/protocol" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-primitives = { path = "../../primitives" } -sc-network = { 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" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } thiserror = "1.0.31" fatality = "0.0.6" lru = "0.9.0" @@ -27,9 +27,9 @@ indexmap = "1.9.1" [dev-dependencies] async-trait = "0.1.57" polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } futures-timer = "3.0.2" assert_matches = "1.4.0" lazy_static = "1.4.0" diff --git a/node/network/gossip-support/Cargo.toml b/node/network/gossip-support/Cargo.toml index 2236b72d3c77..c59e45d95a38 100644 --- a/node/network/gossip-support/Cargo.toml +++ b/node/network/gossip-support/Cargo.toml @@ -5,10 +5,10 @@ authors.workspace = true edition.workspace = true [dependencies] -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-node-network-protocol = { path = "../protocol" } polkadot-node-subsystem = { path = "../../subsystem" } @@ -22,10 +22,10 @@ rand_chacha = { version = "0.3.1", default-features = false } gum = { package = "tracing-gum", path = "../../gum" } [dev-dependencies] -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } diff --git a/node/network/protocol/Cargo.toml b/node/network/protocol/Cargo.toml index 2cfe1ce58e61..5dff9f58e91d 100644 --- a/node/network/protocol/Cargo.toml +++ b/node/network/protocol/Cargo.toml @@ -12,9 +12,9 @@ polkadot-primitives = { path = "../../../primitives" } polkadot-node-primitives = { path = "../../primitives" } polkadot-node-jaeger = { path = "../../jaeger" } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } strum = { version = "0.24", features = ["derive"] } futures = "0.3.21" thiserror = "1.0.31" diff --git a/node/network/statement-distribution/Cargo.toml b/node/network/statement-distribution/Cargo.toml index 5ebdcd01b7ab..d561a957dfe1 100644 --- a/node/network/statement-distribution/Cargo.toml +++ b/node/network/statement-distribution/Cargo.toml @@ -9,8 +9,8 @@ edition.workspace = true futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } polkadot-primitives = { path = "../../../primitives" } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-node-subsystem = {path = "../../subsystem" } polkadot-node-primitives = { path = "../../primitives" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } @@ -24,13 +24,13 @@ fatality = "0.0.6" [dev-dependencies] polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } assert_matches = "1.4.0" -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -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" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } futures-timer = "3.0.2" polkadot-primitives-test-helpers = { path = "../../../primitives/test-helpers" } diff --git a/node/overseer/Cargo.toml b/node/overseer/Cargo.toml index 262eddeec61e..f218eacef320 100644 --- a/node/overseer/Cargo.toml +++ b/node/overseer/Cargo.toml @@ -5,8 +5,8 @@ authors.workspace = true edition.workspace = true [dependencies] -client = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "master" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +client = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } futures = "0.3.21" futures-timer = "3.0.2" parking_lot = "0.12.0" @@ -18,14 +18,14 @@ polkadot-primitives = { path = "../../primitives" } orchestra = "0.0.4" gum = { package = "tracing-gum", path = "../gum" } lru = "0.9" -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } async-trait = "0.1.57" tikv-jemalloc-ctl = "0.5.0" [dev-dependencies] metered = { package = "prioritized-metered-channel", version = "0.2.0" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } futures = { version = "0.3.21", features = ["thread-pool"] } femme = "2.2.1" assert_matches = "1.4.0" diff --git a/node/primitives/Cargo.toml b/node/primitives/Cargo.toml index b865298f8467..df45c3ce11d0 100644 --- a/node/primitives/Cargo.toml +++ b/node/primitives/Cargo.toml @@ -10,12 +10,12 @@ bounded-vec = "0.6" futures = "0.3.21" polkadot-primitives = { path = "../../primitives" } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus-vrf = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-consensus-vrf = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-parachain = { path = "../../parachain", default-features = false } schnorrkel = "0.9.1" thiserror = "1.0.31" diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index 6f48b4be5150..65278c241f67 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -7,63 +7,63 @@ 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", package = "sp-beefy" } -beefy-gadget = { 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" } -sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "master" } -service = { package = "sc-service", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -telemetry = { package = "sc-telemetry", git = "https://github.com/paritytech/substrate", branch = "master" } +sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +babe = { package = "sc-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", package = "sp-beefy" , branch = "oty-mp-queue" } +beefy-gadget = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +grandpa = { package = "sc-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +mmr-gadget = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +service = { package = "sc-service", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +telemetry = { package = "sc-telemetry", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } # Substrate Primitives -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } -consensus_common = { package = "sp-consensus", git = "https://github.com/paritytech/substrate", branch = "master" } -grandpa_primitives = { package = "sp-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" } -inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-block-builder = { 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" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-offchain = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-storage = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +consensus_common = { package = "sp-consensus", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +grandpa_primitives = { package = "sp-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-offchain = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-storage = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-trie = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } # Substrate Pallets -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } # Substrate Other -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "master" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } # External Crates futures = "0.3.21" diff --git a/node/subsystem-test-helpers/Cargo.toml b/node/subsystem-test-helpers/Cargo.toml index 41c48d7f31e1..1fed9b1cd217 100644 --- a/node/subsystem-test-helpers/Cargo.toml +++ b/node/subsystem-test-helpers/Cargo.toml @@ -12,11 +12,11 @@ parking_lot = "0.12.0" polkadot-node-subsystem = { path = "../subsystem" } polkadot-node-subsystem-util = { path = "../subsystem-util" } polkadot-primitives = { path = "../../primitives" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [dev-dependencies] polkadot-overseer = { path = "../overseer" } diff --git a/node/subsystem-types/Cargo.toml b/node/subsystem-types/Cargo.toml index 22528503ccc4..06a3df7be322 100644 --- a/node/subsystem-types/Cargo.toml +++ b/node/subsystem-types/Cargo.toml @@ -14,11 +14,11 @@ polkadot-node-network-protocol = { path = "../network/protocol" } polkadot-statement-table = { path = "../../statement-table" } polkadot-node-jaeger = { path = "../jaeger" } 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" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } smallvec = "1.8.0" -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } thiserror = "1.0.31" async-trait = "0.1.57" diff --git a/node/subsystem-util/Cargo.toml b/node/subsystem-util/Cargo.toml index 51a054f99464..2cd75e169a89 100644 --- a/node/subsystem-util/Cargo.toml +++ b/node/subsystem-util/Cargo.toml @@ -29,9 +29,9 @@ polkadot-node-primitives = { path = "../primitives" } polkadot-overseer = { path = "../overseer" } metered = { package = "prioritized-metered-channel", version = "0.2.0" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } kvdb = "0.13.0" parity-db = { version = "0.4.2"} diff --git a/node/test/client/Cargo.toml b/node/test/client/Cargo.toml index af9357d64382..3348a3122e67 100644 --- a/node/test/client/Cargo.toml +++ b/node/test/client/Cargo.toml @@ -14,22 +14,22 @@ polkadot-primitives = { path = "../../../primitives" } polkadot-node-subsystem = { path = "../../subsystem" } # Substrate dependencies -substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [dev-dependencies] -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } futures = "0.3.21" [features] diff --git a/node/test/service/Cargo.toml b/node/test/service/Cargo.toml index 1dbf7f9cf124..3ae659433495 100644 --- a/node/test/service/Cargo.toml +++ b/node/test/service/Cargo.toml @@ -26,41 +26,41 @@ test-runtime-constants = { path = "../../../runtime/test-runtime/constants" } polkadot-runtime-parachains = { path = "../../../runtime/parachains" } # Substrate dependencies -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } -babe = { package = "sc-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master" } -babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master" } -consensus_common = { package = "sp-consensus", git = "https://github.com/paritytech/substrate", branch = "master" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } -grandpa = { package = "sc-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" } -grandpa_primitives = { package = "sp-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" } -inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-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 } -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" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "master" } -substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +babe = { package = "sc-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +consensus_common = { package = "sp-consensus", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +grandpa = { package = "sc-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +grandpa_primitives = { package = "sp-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-service = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } serde_json = "1.0.81" -substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } tokio = { version = "1.24.1", features = ["macros"] } [features] diff --git a/parachain/Cargo.toml b/parachain/Cargo.toml index d203bd3ed9f6..ad75d4c932e0 100644 --- a/parachain/Cargo.toml +++ b/parachain/Cargo.toml @@ -11,10 +11,10 @@ version.workspace = true # various unnecessary Substrate-specific endpoints. parity-scale-codec = { version = "3.1.5", default-features = false, features = [ "derive" ] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } polkadot-core-primitives = { path = "../core-primitives", default-features = false } derive_more = "0.99.11" diff --git a/parachain/test-parachains/Cargo.toml b/parachain/test-parachains/Cargo.toml index d023fb6be6ea..fb44ec019bb4 100644 --- a/parachain/test-parachains/Cargo.toml +++ b/parachain/test-parachains/Cargo.toml @@ -13,7 +13,7 @@ adder = { package = "test-parachain-adder", path = "adder" } halt = { package = "test-parachain-halt", path = "halt" } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/parachain/test-parachains/adder/Cargo.toml b/parachain/test-parachains/adder/Cargo.toml index 4b29da55c1cf..2bbbcc503c18 100644 --- a/parachain/test-parachains/adder/Cargo.toml +++ b/parachain/test-parachains/adder/Cargo.toml @@ -9,15 +9,15 @@ authors.workspace = true [dependencies] parachain = { package = "polkadot-parachain", path = "../../", default-features = false, features = [ "wasm-api" ] } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } tiny-keccak = { version = "2.0.2", features = ["keccak"] } dlmalloc = { version = "0.2.4", features = [ "global" ] } # We need to make sure the global allocator is disabled until we have support of full substrate externalities -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = [ "disable_allocator" ] } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, features = [ "disable_allocator" ] , branch = "oty-mp-queue" } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [features] default = [ "std" ] diff --git a/parachain/test-parachains/adder/collator/Cargo.toml b/parachain/test-parachains/adder/collator/Cargo.toml index 51b9ccad8097..e482bb1d3f72 100644 --- a/parachain/test-parachains/adder/collator/Cargo.toml +++ b/parachain/test-parachains/adder/collator/Cargo.toml @@ -27,9 +27,9 @@ polkadot-service = { path = "../../../../node/service", features = ["rococo-nati polkadot-node-primitives = { path = "../../../../node/primitives" } polkadot-node-subsystem = { path = "../../../../node/subsystem" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } # This one is tricky. Even though it is not used directly by the collator, we still need it for the # `puppet_worker` binary, which is required for the integration test. However, this shouldn't be @@ -40,8 +40,8 @@ polkadot-node-core-pvf = { path = "../../../../node/core/pvf" } polkadot-parachain = { path = "../../.." } polkadot-test-service = { path = "../../../../node/test/service" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } tokio = { version = "1.24.1", features = ["macros"] } diff --git a/parachain/test-parachains/halt/Cargo.toml b/parachain/test-parachains/halt/Cargo.toml index 05df7e7d592f..c9e561681bdb 100644 --- a/parachain/test-parachains/halt/Cargo.toml +++ b/parachain/test-parachains/halt/Cargo.toml @@ -9,7 +9,7 @@ edition.workspace = true [dependencies] [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [features] default = [ "std" ] diff --git a/parachain/test-parachains/undying/Cargo.toml b/parachain/test-parachains/undying/Cargo.toml index 1cc5595ec7a5..9cd5af052e9c 100644 --- a/parachain/test-parachains/undying/Cargo.toml +++ b/parachain/test-parachains/undying/Cargo.toml @@ -9,16 +9,16 @@ edition.workspace = true [dependencies] parachain = { package = "polkadot-parachain", path = "../../", default-features = false, features = [ "wasm-api" ] } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } tiny-keccak = { version = "2.0.2", features = ["keccak"] } dlmalloc = { version = "0.2.4", features = [ "global" ] } log = { version = "0.4.17", default-features = false } # We need to make sure the global allocator is disabled until we have support of full substrate externalities -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = [ "disable_allocator" ] } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, features = [ "disable_allocator" ] , branch = "oty-mp-queue" } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [features] default = [ "std" ] diff --git a/parachain/test-parachains/undying/collator/Cargo.toml b/parachain/test-parachains/undying/collator/Cargo.toml index 36a40cb779ec..1a6567edf1ad 100644 --- a/parachain/test-parachains/undying/collator/Cargo.toml +++ b/parachain/test-parachains/undying/collator/Cargo.toml @@ -27,9 +27,9 @@ polkadot-service = { path = "../../../../node/service", features = ["rococo-nati polkadot-node-primitives = { path = "../../../../node/primitives" } polkadot-node-subsystem = { path = "../../../../node/subsystem" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } # This one is tricky. Even though it is not used directly by the collator, we still need it for the # `puppet_worker` binary, which is required for the integration test. However, this shouldn't be @@ -40,8 +40,8 @@ polkadot-node-core-pvf = { path = "../../../../node/core/pvf" } polkadot-parachain = { path = "../../.." } polkadot-test-service = { path = "../../../../node/test/service" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } tokio = { version = "1.24.1", features = ["macros"] } diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 43df39e26bde..a929fd3b6a7c 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -11,18 +11,18 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ scale-info = { version = "2.1.2", default-features = false, features = ["bit-vec", "derive"] } serde = { version = "1.0.137", optional = true, features = ["derive"] } -application-crypto = { package = "sp-application-crypto", 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 } -primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -runtime_primitives = { package = "sp-runtime", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } -sp-staking = { 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 } +application-crypto = { package = "sp-application-crypto", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +runtime_primitives = { package = "sp-runtime", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-consensus-slots = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", optional = true , branch = "oty-mp-queue" } +sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } polkadot-core-primitives = { path = "../core-primitives", default-features = false } polkadot-parachain = { path = "../parachain", default-features = false } diff --git a/primitives/test-helpers/Cargo.toml b/primitives/test-helpers/Cargo.toml index 917e5f3babdb..808fd57323a7 100644 --- a/primitives/test-helpers/Cargo.toml +++ b/primitives/test-helpers/Cargo.toml @@ -5,9 +5,9 @@ authors.workspace = true edition.workspace = true [dependencies] -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-application-crypto = { package = "sp-application-crypto", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["std"] } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-application-crypto = { package = "sp-application-crypto", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", features = ["std"] , branch = "oty-mp-queue" } polkadot-primitives = { path = "../" } rand = "0.8.5" diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index a641afd12496..95185ed87125 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -7,26 +7,26 @@ edition.workspace = true [dependencies] 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" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } -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" } -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" } -beefy-gadget-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } -substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +txpool-api = { package = "sc-transaction-pool-api", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +mmr-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +beefy-gadget = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +beefy-gadget-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 2fbc67eb974d..7ad214c2fba0 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -15,35 +15,35 @@ serde = { version = "1.0.139", 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, 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 } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +beefy-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, package = "sp-beefy" , branch = "oty-mp-queue" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-staking-reward-fn = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-staking-reward-fn = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-bags-list = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false } libsecp256k1 = { version = "0.7.0", default-features = false } @@ -54,10 +54,10 @@ xcm = { path = "../../xcm", default-features = false } [dev-dependencies] hex-literal = "0.3.4" -frame-support-test = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-support-test = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } serde_json = "1.0.81" libsecp256k1 = "0.7.0" test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../primitives/test-helpers" } diff --git a/runtime/common/slot_range_helper/Cargo.toml b/runtime/common/slot_range_helper/Cargo.toml index c6d8452be79d..c74ca11ba101 100644 --- a/runtime/common/slot_range_helper/Cargo.toml +++ b/runtime/common/slot_range_helper/Cargo.toml @@ -8,8 +8,8 @@ edition.workspace = true paste = "1.0" enumn = "0.1.5" parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/runtime/kusama/Cargo.toml b/runtime/kusama/Cargo.toml index d53082803f8e..253be84e3e75 100644 --- a/runtime/kusama/Cargo.toml +++ b/runtime/kusama/Cargo.toml @@ -16,81 +16,81 @@ serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" 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, package = "sp-beefy" } +authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, package = "sp-beefy" , branch = "oty-mp-queue" } 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 } -offchain-primitives = { package = "sp-offchain", 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 } -sp-arithmetic = { package = "sp-arithmetic", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-arithmetic = { package = "sp-arithmetic", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-version = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-conviction-voting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -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-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 } -pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-ranked-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-referenda = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-society = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system = {git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-tips = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-whitelist = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-bags-list = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-bounties = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-child-bounties = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-conviction-voting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-nis = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-im-online = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-indices = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-offences = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-ranked-collective = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-recovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-referenda = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-society = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-system = {git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-tips = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-whitelist = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false } pallet-xcm-benchmarks = { path = "../../xcm/pallet-xcm-benchmarks", default-features = false, optional = true } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } hex-literal = { version = "0.3.4", optional = true } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false } @@ -104,16 +104,16 @@ xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default [dev-dependencies] hex-literal = "0.3.4" 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" } +keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-trie = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } separator = "0.4.1" serde_json = "1.0.81" -remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } +remote-externalities = { git = "https://github.com/paritytech/substrate", package = "frame-remote-externalities" , branch = "oty-mp-queue" } tokio = { version = "1.24.1", features = ["macros"] } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/runtime/kusama/constants/Cargo.toml b/runtime/kusama/constants/Cargo.toml index 6d5dc406586c..bea3d2da9c48 100644 --- a/runtime/kusama/constants/Cargo.toml +++ b/runtime/kusama/constants/Cargo.toml @@ -7,12 +7,12 @@ edition.workspace = true [dependencies] smallvec = "1.8.0" -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } 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", 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" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/runtime/metrics/Cargo.toml b/runtime/metrics/Cargo.toml index 99d7878d99e8..5bf4c060db3d 100644 --- a/runtime/metrics/Cargo.toml +++ b/runtime/metrics/Cargo.toml @@ -5,8 +5,8 @@ authors.workspace = true edition.workspace = true [dependencies] -sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false} -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false, branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } parity-scale-codec = { version = "3.1.5", default-features = false } primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false } diff --git a/runtime/parachains/Cargo.toml b/runtime/parachains/Cargo.toml index 7f1b6995b775..2ac0840c8a94 100644 --- a/runtime/parachains/Cargo.toml +++ b/runtime/parachains/Cargo.toml @@ -14,30 +14,30 @@ serde = { version = "1.0.139", features = [ "derive" ], optional = true } derive_more = "0.99.17" bitflags = "1.3.2" -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 } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", optional = true , branch = "oty-mp-queue" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-message-queue = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } xcm = { package = "xcm", path = "../../xcm", default-features = false } xcm-executor = { package = "xcm-executor", path = "../../xcm/xcm-executor", default-features = false } @@ -51,11 +51,11 @@ polkadot-runtime-metrics = { path = "../metrics", default-features = false} [dev-dependencies] futures = "0.3.21" hex-literal = "0.3.4" -keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" } -frame-support-test = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-support-test = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../primitives/test-helpers"} -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } thousands = "0.2.0" assert_matches = "1" serde_json = "1.0.85" diff --git a/runtime/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index 07b821edc9df..8f75c1039900 100644 --- a/runtime/polkadot/Cargo.toml +++ b/runtime/polkadot/Cargo.toml @@ -16,74 +16,74 @@ serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" 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, 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 } -tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, package = "sp-beefy" , branch = "oty-mp-queue" } +block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-version = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -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-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-message-queue = { 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-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-nomination-pools-runtime-api = { 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 } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "master" } -frame-system = {git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-bags-list = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-bounties = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-child-bounties = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-im-online = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-indices = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-message-queue = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-offences = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-system = {git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } polkadot-runtime-constants = { package = "polkadot-runtime-constants", path = "./constants", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-tips = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-tips = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } hex-literal = { version = "0.3.4", optional = true } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false } @@ -97,16 +97,16 @@ xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default [dev-dependencies] hex-literal = "0.3.4" 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" } +keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-trie = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } serde_json = "1.0.81" separator = "0.4.1" -remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } +remote-externalities = { git = "https://github.com/paritytech/substrate", package = "frame-remote-externalities" , branch = "oty-mp-queue" } tokio = { version = "1.24.1", features = ["macros"] } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/runtime/polkadot/constants/Cargo.toml b/runtime/polkadot/constants/Cargo.toml index ad8159e7463d..123e651f9ee8 100644 --- a/runtime/polkadot/constants/Cargo.toml +++ b/runtime/polkadot/constants/Cargo.toml @@ -7,12 +7,12 @@ edition.workspace = true [dependencies] smallvec = "1.8.0" -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } 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", 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" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/runtime/rococo/Cargo.toml b/runtime/rococo/Cargo.toml index 2b944a508f8f..ac9263fcd3cc 100644 --- a/runtime/rococo/Cargo.toml +++ b/runtime/rococo/Cargo.toml @@ -14,71 +14,71 @@ serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" 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, package = "sp-beefy" } -beefy-merkle-tree = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, package = "sp-beefy" , branch = "oty-mp-queue" } +beefy-merkle-tree = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } 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 } -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-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-version = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-beefy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-state-trie-migration = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -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-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 } -pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-society = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system = {git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-tips = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-beefy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-bounties = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-child-bounties = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-state-trie-migration = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-im-online = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-indices = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-mmr = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-nis = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-offences = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-recovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-society = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-system = {git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-tips = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false } pallet-xcm-benchmarks = { path = "../../xcm/pallet-xcm-benchmarks", default-features = false, optional = true } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } hex-literal = { version = "0.3.4" } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false } @@ -92,16 +92,16 @@ xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default [dev-dependencies] tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" } -remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } -sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } +keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +remote-externalities = { git = "https://github.com/paritytech/substrate", package = "frame-remote-externalities" , branch = "oty-mp-queue" } +sp-trie = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } separator = "0.4.1" serde_json = "1.0.81" -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } tokio = { version = "1.24.1", features = ["macros"] } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/runtime/rococo/constants/Cargo.toml b/runtime/rococo/constants/Cargo.toml index 9383a9de6c68..bb7e0b9f8a3d 100644 --- a/runtime/rococo/constants/Cargo.toml +++ b/runtime/rococo/constants/Cargo.toml @@ -7,12 +7,12 @@ edition.workspace = true [dependencies] smallvec = "1.8.0" -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } 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", 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" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/runtime/test-runtime/Cargo.toml b/runtime/test-runtime/Cargo.toml index e32107a69b48..5de89c660e91 100644 --- a/runtime/test-runtime/Cargo.toml +++ b/runtime/test-runtime/Cargo.toml @@ -15,44 +15,44 @@ serde = { version = "1.0.139", default-features = false } serde_derive = { version = "1.0.117", optional = true } 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, 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 } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, package = "sp-beefy" , branch = "oty-mp-queue" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-version = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { 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-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "master" } -frame-system = {git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-indices = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-offences = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-system = {git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } test-runtime-constants = { package = "test-runtime-constants", path = "./constants", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false } primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false } @@ -66,12 +66,12 @@ xcm = { path = "../../xcm", default-features = false } [dev-dependencies] hex-literal = "0.3.4" 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" } +keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-trie = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } serde_json = "1.0.81" [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/runtime/test-runtime/constants/Cargo.toml b/runtime/test-runtime/constants/Cargo.toml index d96de0a0f9c1..c39765c313d9 100644 --- a/runtime/test-runtime/constants/Cargo.toml +++ b/runtime/test-runtime/constants/Cargo.toml @@ -7,12 +7,12 @@ edition.workspace = true [dependencies] smallvec = "1.8.0" -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } 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", 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" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/runtime/westend/Cargo.toml b/runtime/westend/Cargo.toml index 024a8f3e89c0..ecdb5abd9833 100644 --- a/runtime/westend/Cargo.toml +++ b/runtime/westend/Cargo.toml @@ -15,75 +15,75 @@ serde = { version = "1.0.139", default-features = false } serde_derive = { version = "1.0.117", optional = true } 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, 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 } -sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +beefy-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, package = "sp-beefy" , branch = "oty-mp-queue" } +inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-version = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } westend-runtime-constants = { package = "westend-runtime-constants", path = "./constants", default-features = false } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-fast-unstake = { 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-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-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-society = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-staking-reward-curve = { package = "pallet-staking-reward-curve", git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-state-trie-migration = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-bags-list = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-im-online = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-indices = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-offences = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-recovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-society = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-staking-reward-curve = { package = "pallet-staking-reward-curve", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-state-trie-migration = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false } pallet-xcm-benchmarks = { path = "../../xcm/pallet-xcm-benchmarks", default-features = false, optional = true } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } hex-literal = { version = "0.3.4", optional = true } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false } @@ -98,15 +98,15 @@ xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default [dev-dependencies] hex-literal = "0.3.4" 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" } +keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-trie = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } serde_json = "1.0.81" -remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } +remote-externalities = { git = "https://github.com/paritytech/substrate", package = "frame-remote-externalities" , branch = "oty-mp-queue" } tokio = { version = "1.24.1", features = ["macros"] } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/runtime/westend/constants/Cargo.toml b/runtime/westend/constants/Cargo.toml index c6fac15dca32..4becf57e4f95 100644 --- a/runtime/westend/constants/Cargo.toml +++ b/runtime/westend/constants/Cargo.toml @@ -7,12 +7,12 @@ edition.workspace = true [dependencies] smallvec = "1.8.0" -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } 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", 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" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/statement-table/Cargo.toml b/statement-table/Cargo.toml index 81f2f90e0998..7663e092ba2f 100644 --- a/statement-table/Cargo.toml +++ b/statement-table/Cargo.toml @@ -6,5 +6,5 @@ edition.workspace = true [dependencies] parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } primitives = { package = "polkadot-primitives", path = "../primitives" } diff --git a/utils/generate-bags/Cargo.toml b/utils/generate-bags/Cargo.toml index 2038dc94a1ea..7bbb2ff9b23b 100644 --- a/utils/generate-bags/Cargo.toml +++ b/utils/generate-bags/Cargo.toml @@ -7,8 +7,8 @@ edition.workspace = true [dependencies] clap = { version = "4.0.9", features = ["derive"] } -generate-bags = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } +generate-bags = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } westend-runtime = { path = "../../runtime/westend" } kusama-runtime = { path = "../../runtime/kusama" } diff --git a/utils/remote-ext-tests/bags-list/Cargo.toml b/utils/remote-ext-tests/bags-list/Cargo.toml index f8b08767f898..eb9b611c4e16 100644 --- a/utils/remote-ext-tests/bags-list/Cargo.toml +++ b/utils/remote-ext-tests/bags-list/Cargo.toml @@ -12,10 +12,10 @@ polkadot-runtime-constants = { path = "../../../runtime/polkadot/constants" } kusama-runtime-constants = { path = "../../../runtime/kusama/constants" } westend-runtime-constants = { path = "../../../runtime/westend/constants" } -pallet-bags-list-remote-tests = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-bags-list-remote-tests = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } clap = { version = "4.0.9", features = ["derive"] } log = "0.4.17" diff --git a/utils/staking-miner/Cargo.toml b/utils/staking-miner/Cargo.toml index 20d19451489a..0ecf02c2f96c 100644 --- a/utils/staking-miner/Cargo.toml +++ b/utils/staking-miner/Cargo.toml @@ -15,22 +15,22 @@ serde = "1.0.137" serde_json = "1.0" thiserror = "1.0.31" tokio = { version = "1.24.1", features = ["macros", "rt-multi-thread", "sync"] } -remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } +remote-externalities = { git = "https://github.com/paritytech/substrate", package = "frame-remote-externalities" , branch = "oty-mp-queue" } 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" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } core-primitives = { package = "polkadot-core-primitives", path = "../../core-primitives" } diff --git a/xcm/Cargo.toml b/xcm/Cargo.toml index d66e25748bce..e1ac1ad1e319 100644 --- a/xcm/Cargo.toml +++ b/xcm/Cargo.toml @@ -11,13 +11,13 @@ impl-trait-for-tuples = "0.2.2" log = { version = "0.4.17", default-features = false } parity-scale-codec = { version = "3.1.5", default-features = false, features = [ "derive", "max-encoded-len" ] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-weights = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } serde = { version = "1.0.136", optional = true, features = ["derive"] } xcm-procedural = { path = "procedural" } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/xcm/pallet-xcm-benchmarks/Cargo.toml b/xcm/pallet-xcm-benchmarks/Cargo.toml index 6999f6aaffb2..db902c8755a3 100644 --- a/xcm/pallet-xcm-benchmarks/Cargo.toml +++ b/xcm/pallet-xcm-benchmarks/Cargo.toml @@ -10,22 +10,22 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-support = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } -frame-system = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } -sp-runtime = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } -sp-std = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } -sp-io = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } xcm-executor = { path = "../xcm-executor", default-features = false } -frame-benchmarking = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } xcm = { path = "..", default-features = false } xcm-builder = { path = "../xcm-builder", default-features = false } log = "0.4.17" [dev-dependencies] -pallet-balances = { branch = "master", git = "https://github.com/paritytech/substrate" } -pallet-assets = { branch = "master", git = "https://github.com/paritytech/substrate" } -sp-core = { branch = "master", git = "https://github.com/paritytech/substrate" } -sp-tracing = { branch = "master", git = "https://github.com/paritytech/substrate" } +pallet-balances = { git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } +pallet-assets = { git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } xcm = { path = ".." } # temp pallet-xcm = { path = "../pallet-xcm" } diff --git a/xcm/pallet-xcm/Cargo.toml b/xcm/pallet-xcm/Cargo.toml index 1b9de5fd5d44..f3bd3f8f07d2 100644 --- a/xcm/pallet-xcm/Cargo.toml +++ b/xcm/pallet-xcm/Cargo.toml @@ -11,19 +11,19 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.137", optional = true, features = ["derive"] } log = { version = "0.4.17", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "oty-mp-queue" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "oty-mp-queue" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "oty-mp-queue" } xcm = { path = "..", default-features = false } xcm-executor = { path = "../xcm-executor", default-features = false } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } polkadot-runtime-parachains = { path = "../../runtime/parachains" } polkadot-parachain = { path = "../../parachain" } xcm-builder = { path = "../xcm-builder" } diff --git a/xcm/xcm-builder/Cargo.toml b/xcm/xcm-builder/Cargo.toml index d1b0cd5ecbbd..a7bdfa970ac9 100644 --- a/xcm/xcm-builder/Cargo.toml +++ b/xcm/xcm-builder/Cargo.toml @@ -11,22 +11,22 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } xcm = { path = "..", default-features = false } xcm-executor = { path = "../xcm-executor", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-weights = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } log = { version = "0.4.17", default-features = false } # Polkadot dependencies polkadot-parachain = { path = "../../parachain", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } pallet-xcm = { path = "../pallet-xcm" } polkadot-runtime-parachains = { path = "../../runtime/parachains" } assert_matches = "1.5.0" diff --git a/xcm/xcm-executor/Cargo.toml b/xcm/xcm-executor/Cargo.toml index ecbff92a46ec..ef93699d3327 100644 --- a/xcm/xcm-executor/Cargo.toml +++ b/xcm/xcm-executor/Cargo.toml @@ -10,15 +10,15 @@ impl-trait-for-tuples = "0.2.2" environmental = { version = "1.1.4", default-features = false } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } xcm = { path = "..", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-weights = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } log = { version = "0.4.17", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false, optional = true } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/xcm/xcm-executor/integration-tests/Cargo.toml b/xcm/xcm-executor/integration-tests/Cargo.toml index 4fff3952a05d..ca77978bf714 100644 --- a/xcm/xcm-executor/integration-tests/Cargo.toml +++ b/xcm/xcm-executor/integration-tests/Cargo.toml @@ -6,20 +6,20 @@ edition.workspace = true version.workspace = true [dependencies] -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } futures = "0.3.21" pallet-xcm = { path = "../../pallet-xcm" } polkadot-test-client = { path = "../../../node/test/client" } polkadot-test-runtime = { path = "../../../runtime/test-runtime" } polkadot-test-service = { path = "../../../node/test/service" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } xcm = { path = "../..", default-features = false } xcm-executor = { path = ".." } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } [features] default = ["std"] diff --git a/xcm/xcm-simulator/Cargo.toml b/xcm/xcm-simulator/Cargo.toml index b18b709dbbf3..52ef2ffc9334 100644 --- a/xcm/xcm-simulator/Cargo.toml +++ b/xcm/xcm-simulator/Cargo.toml @@ -9,9 +9,9 @@ edition.workspace = true codec = { package = "parity-scale-codec", version = "3.0.0" } paste = "1.0.7" -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } xcm = { path = "../" } xcm-executor = { path = "../xcm-executor" } diff --git a/xcm/xcm-simulator/example/Cargo.toml b/xcm/xcm-simulator/example/Cargo.toml index 54db1b731ca1..cd246d6bf67f 100644 --- a/xcm/xcm-simulator/example/Cargo.toml +++ b/xcm/xcm-simulator/example/Cargo.toml @@ -10,15 +10,15 @@ codec = { package = "parity-scale-codec", version = "3.0.0" } scale-info = { version = "2.1.2", features = ["derive"] } log = { version = "0.4.14", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } xcm = { path = "../../" } xcm-simulator = { path = "../" } diff --git a/xcm/xcm-simulator/fuzzer/Cargo.toml b/xcm/xcm-simulator/fuzzer/Cargo.toml index 25767fb429b0..4483e61c47c7 100644 --- a/xcm/xcm-simulator/fuzzer/Cargo.toml +++ b/xcm/xcm-simulator/fuzzer/Cargo.toml @@ -10,13 +10,13 @@ codec = { package = "parity-scale-codec", version = "3.0.0" } honggfuzz = "0.5.55" scale-info = { version = "2.1.2", features = ["derive"] } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } xcm = { path = "../../" } xcm-simulator = { path = "../" } From 5aa44a5cfcbed83c9160ae4ae908168d5252450e Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 24 Jan 2023 23:05:05 +0100 Subject: [PATCH 047/182] diener update cargo.lock Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 505 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 319 insertions(+), 186 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cad29e3b3f94..62df5ad710dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -455,7 +455,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "array-bytes", "async-trait", @@ -489,7 +489,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "beefy-gadget", "futures", @@ -508,7 +508,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "sp-api", "sp-beefy", @@ -543,6 +543,21 @@ dependencies = [ "shlex", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" @@ -1322,7 +1337,7 @@ dependencies = [ "cfg-if", "crossbeam-utils", "lazy_static", - "memoffset", + "memoffset 0.6.4", "scopeguard", ] @@ -1635,6 +1650,17 @@ dependencies = [ "syn", ] +[[package]] +name = "derive-syn-parse" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "derive_builder" version = "0.11.2" @@ -2280,7 +2306,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", ] @@ -2304,7 +2330,7 @@ checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support", "frame-system", @@ -2327,7 +2353,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "Inflector", "array-bytes", @@ -2374,7 +2400,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2385,7 +2411,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2402,7 +2428,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support", "frame-system", @@ -2431,7 +2457,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "futures", "log", @@ -2447,7 +2473,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "bitflags", "frame-metadata", @@ -2473,16 +2499,18 @@ dependencies = [ "sp-std", "sp-tracing", "sp-weights", + "static_assertions", "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "Inflector", "cfg-expr", + "derive-syn-parse", "frame-support-procedural-tools", "itertools", "proc-macro2", @@ -2493,7 +2521,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2505,7 +2533,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "proc-macro2", "quote", @@ -2515,8 +2543,9 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ + "frame-benchmarking", "frame-support", "frame-support-test-pallet", "frame-system", @@ -2538,7 +2567,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support", "frame-system", @@ -2549,7 +2578,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support", "log", @@ -2567,7 +2596,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -2582,7 +2611,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "sp-api", @@ -2591,7 +2620,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support", "parity-scale-codec", @@ -2762,7 +2791,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "chrono", "frame-election-provider-support", @@ -4421,6 +4450,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + [[package]] name = "memory-db" version = "0.31.0" @@ -4506,7 +4544,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "futures", "log", @@ -4525,7 +4563,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "anyhow", "jsonrpsee", @@ -4783,7 +4821,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "memoffset", + "memoffset 0.6.4", ] [[package]] @@ -4795,7 +4833,21 @@ dependencies = [ "bitflags", "cfg-if", "libc", - "memoffset", + "memoffset 0.6.4", +] + +[[package]] +name = "nix" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +dependencies = [ + "bitflags", + "cfg-if", + "libc", + "memoffset 0.7.1", + "pin-utils", + "static_assertions", ] [[package]] @@ -5076,7 +5128,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5091,7 +5143,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support", "frame-system", @@ -5107,7 +5159,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support", "frame-system", @@ -5122,7 +5174,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5146,7 +5198,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5166,7 +5218,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5185,7 +5237,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5200,7 +5252,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support", "frame-system", @@ -5216,7 +5268,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "array-bytes", "beefy-merkle-tree", @@ -5239,7 +5291,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5257,7 +5309,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5276,7 +5328,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5293,7 +5345,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5310,7 +5362,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5328,7 +5380,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5351,7 +5403,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5364,7 +5416,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5382,7 +5434,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5400,7 +5452,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5423,7 +5475,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5439,7 +5491,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5459,7 +5511,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5476,7 +5528,24 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-message-queue" +version = "7.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5484,16 +5553,18 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", + "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", "sp-std", + "sp-weights", ] [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5510,7 +5581,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5526,7 +5597,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5542,7 +5613,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support", "frame-system", @@ -5559,7 +5630,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5579,7 +5650,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "sp-api", @@ -5589,7 +5660,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support", "frame-system", @@ -5606,7 +5677,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5630,7 +5701,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5647,7 +5718,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5662,7 +5733,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5680,7 +5751,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5695,7 +5766,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5714,7 +5785,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5731,7 +5802,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support", "frame-system", @@ -5752,7 +5823,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5768,7 +5839,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support", "frame-system", @@ -5782,7 +5853,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5805,7 +5876,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5816,7 +5887,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "log", "sp-arithmetic", @@ -5825,7 +5896,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5842,7 +5913,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support", "frame-system", @@ -5856,7 +5927,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5874,7 +5945,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5893,7 +5964,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-support", "frame-system", @@ -5909,7 +5980,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5925,7 +5996,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5937,7 +6008,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5954,7 +6025,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5969,7 +6040,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -5985,7 +6056,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -6000,7 +6071,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-benchmarking", "frame-support", @@ -7348,6 +7419,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7505,6 +7577,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -7513,6 +7586,7 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-runtime-metrics", + "proptest", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", @@ -8114,6 +8188,26 @@ dependencies = [ "regex", ] +[[package]] +name = "proptest" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" +dependencies = [ + "bit-set", + "bitflags", + "byteorder", + "lazy_static", + "num-traits", + "quick-error 2.0.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax", + "rusty-fork", + "tempfile", +] + [[package]] name = "prost" version = "0.11.0" @@ -8348,6 +8442,15 @@ dependencies = [ "rand_core 0.6.3", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.3", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -8863,6 +8966,18 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error 1.2.3", + "tempfile", + "wait-timeout", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -8892,7 +9007,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "log", "sp-core", @@ -8903,7 +9018,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "futures", @@ -8930,7 +9045,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "futures", "futures-timer", @@ -8953,7 +9068,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8969,7 +9084,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -8984,7 +9099,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8995,7 +9110,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "array-bytes", "chrono", @@ -9035,7 +9150,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "fnv", "futures", @@ -9061,7 +9176,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "hash-db", "kvdb", @@ -9087,7 +9202,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "futures", @@ -9112,7 +9227,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "fork-tree", @@ -9150,7 +9265,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "futures", "jsonrpsee", @@ -9172,7 +9287,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9185,7 +9300,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "futures", @@ -9208,7 +9323,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -9232,7 +9347,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9245,7 +9360,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "log", "sc-allocator", @@ -9258,7 +9373,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "cfg-if", "libc", @@ -9275,7 +9390,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "ahash 0.7.6", "array-bytes", @@ -9315,7 +9430,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "finality-grandpa", "futures", @@ -9335,7 +9450,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "ansi_term", "futures", @@ -9350,7 +9465,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "array-bytes", "async-trait", @@ -9365,7 +9480,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "array-bytes", "async-trait", @@ -9407,7 +9522,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "cid", "futures", @@ -9426,7 +9541,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "bitflags", @@ -9452,7 +9567,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "ahash 0.7.6", "futures", @@ -9470,7 +9585,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "array-bytes", "futures", @@ -9491,7 +9606,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "array-bytes", "async-trait", @@ -9523,7 +9638,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "array-bytes", "futures", @@ -9542,7 +9657,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "array-bytes", "bytes", @@ -9572,7 +9687,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "futures", "libp2p", @@ -9585,7 +9700,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9594,7 +9709,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "futures", "jsonrpsee", @@ -9624,7 +9739,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9643,7 +9758,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "http", "jsonrpsee", @@ -9658,7 +9773,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "array-bytes", "futures", @@ -9684,7 +9799,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "directories", @@ -9715,6 +9830,7 @@ dependencies = [ "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", + "sc-storage-monitor", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -9749,7 +9865,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "log", "parity-scale-codec", @@ -9757,10 +9873,26 @@ dependencies = [ "sp-core", ] +[[package]] +name = "sc-storage-monitor" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +dependencies = [ + "clap 4.0.15", + "futures", + "log", + "nix 0.26.2", + "sc-client-db", + "sc-utils", + "sp-core", + "thiserror", + "tokio", +] + [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9779,7 +9911,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "futures", "libc", @@ -9798,7 +9930,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "chrono", "futures", @@ -9817,7 +9949,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "ansi_term", "atty", @@ -9848,7 +9980,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9859,7 +9991,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "futures", @@ -9886,7 +10018,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "futures", @@ -9900,7 +10032,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "backtrace", "futures", @@ -10407,7 +10539,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "hash-db", "log", @@ -10425,7 +10557,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "blake2", "proc-macro-crate", @@ -10437,7 +10569,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "scale-info", @@ -10450,7 +10582,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "integer-sqrt", "num-traits", @@ -10464,7 +10596,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "scale-info", @@ -10477,7 +10609,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "parity-scale-codec", @@ -10489,7 +10621,7 @@ dependencies = [ [[package]] name = "sp-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "scale-info", @@ -10506,7 +10638,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "sp-api", @@ -10518,7 +10650,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "futures", "log", @@ -10536,7 +10668,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "futures", @@ -10554,7 +10686,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "merlin", @@ -10577,7 +10709,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "scale-info", @@ -10589,7 +10721,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "scale-info", @@ -10602,7 +10734,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "array-bytes", "base58", @@ -10644,7 +10776,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "blake2", "byteorder", @@ -10658,7 +10790,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "proc-macro2", "quote", @@ -10669,7 +10801,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10678,7 +10810,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "proc-macro2", "quote", @@ -10688,7 +10820,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "environmental", "parity-scale-codec", @@ -10699,7 +10831,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "finality-grandpa", "log", @@ -10717,7 +10849,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10731,7 +10863,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "bytes", "ed25519", @@ -10756,7 +10888,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "lazy_static", "sp-core", @@ -10767,7 +10899,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "futures", @@ -10784,7 +10916,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "thiserror", "zstd", @@ -10793,7 +10925,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -10811,7 +10943,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "scale-info", @@ -10825,7 +10957,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "sp-api", "sp-core", @@ -10835,7 +10967,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "backtrace", "lazy_static", @@ -10845,7 +10977,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "rustc-hash", "serde", @@ -10855,7 +10987,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "either", "hash256-std-hasher", @@ -10877,7 +11009,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10895,7 +11027,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "Inflector", "proc-macro-crate", @@ -10907,7 +11039,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "scale-info", @@ -10921,7 +11053,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "scale-info", @@ -10933,7 +11065,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "hash-db", "log", @@ -10953,12 +11085,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10971,7 +11103,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "futures-timer", @@ -10986,7 +11118,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "sp-std", @@ -10998,7 +11130,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "sp-api", "sp-runtime", @@ -11007,7 +11139,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "log", @@ -11023,7 +11155,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "ahash 0.7.6", "hash-db", @@ -11046,7 +11178,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11063,7 +11195,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11074,7 +11206,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "impl-trait-for-tuples", "log", @@ -11087,7 +11219,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "parity-scale-codec", "scale-info", @@ -11320,7 +11452,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "platforms", ] @@ -11328,7 +11460,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11347,7 +11479,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "hyper", "log", @@ -11359,7 +11491,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "async-trait", "jsonrpsee", @@ -11372,7 +11504,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "jsonrpsee", "log", @@ -11391,7 +11523,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "array-bytes", "async-trait", @@ -11417,7 +11549,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11427,7 +11559,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11438,7 +11570,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "ansi_term", "build-helper", @@ -12239,7 +12371,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" dependencies = [ "clap 4.0.15", "frame-remote-externalities", @@ -12335,7 +12467,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.3", - "rand 0.7.3", + "rand 0.8.5", "static_assertions", ] @@ -12880,7 +13012,7 @@ dependencies = [ "log", "mach", "memfd", - "memoffset", + "memoffset 0.6.4", "paste", "rand 0.8.5", "rustix", @@ -13630,6 +13762,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", "xcm", "xcm-executor", ] From 628d55f269a64ca282a5733ae9a23f131876ce0b Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 24 Jan 2023 23:05:13 +0100 Subject: [PATCH 048/182] Cleanup Signed-off-by: Oliver Tale-Yazdi --- runtime/common/src/paras_sudo_wrapper.rs | 4 +- runtime/parachains/src/hrmp.rs | 71 ++---------------------- runtime/parachains/src/lib.rs | 1 - 3 files changed, 5 insertions(+), 71 deletions(-) diff --git a/runtime/common/src/paras_sudo_wrapper.rs b/runtime/common/src/paras_sudo_wrapper.rs index dfa506fde42a..ef899c8dfc4f 100644 --- a/runtime/common/src/paras_sudo_wrapper.rs +++ b/runtime/common/src/paras_sudo_wrapper.rs @@ -39,9 +39,7 @@ pub mod pallet { #[pallet::config] #[pallet::disable_frame_system_supertrait_check] - pub trait Config: - configuration::Config + paras::Config + inclusion::Config + hrmp::Config - { + pub trait Config: configuration::Config + paras::Config + hrmp::Config { /// Link to the DMP queue as provided by `pallet-parachain-inclusion`. /// /// This is a weaker coupling than inheriting the `inclusion::Config` which makes it easier for mocking. diff --git a/runtime/parachains/src/hrmp.rs b/runtime/parachains/src/hrmp.rs index 4bc32cc423b4..b6ed1dd31fbf 100644 --- a/runtime/parachains/src/hrmp.rs +++ b/runtime/parachains/src/hrmp.rs @@ -265,8 +265,8 @@ pub mod pallet { type Currency: ReservableCurrency; /// Contains the contents of all HRMP channels. - /// FAIL-CI use the convert here - /// Formerly known as `HrmpChannelContents`. The origin here is a `HrmpChannelId` instead of `MessageOrigin` as in the inclusion pallet. You can use the adapter type `EnqueueMessageOriginConvert` to plug it in here. + /// + /// Formerly known as `HrmpChannelContents`. The origin here is a `HrmpChannelId` instead of `MessageOrigin` as in the inclusion pallet. You can use the `TransformOrigin` adapter to plug it in here. type MessageQueue: EnqueueMessage; type MessageQueueReader: QueueIntrospect; @@ -908,7 +908,6 @@ impl Pallet { ); } - //::HrmpChannelContents::remove(channel_id); // FAIL-CI TODO force remove of queues T::MessageQueue::sweep_queue(channel_id.clone()); @@ -1056,41 +1055,6 @@ impl Pallet { }); weight += T::DbWeight::get().reads_writes(1, 1); - // having all senders we can trivially find out the channels which we need to prune. - /*let channels_to_prune = - senders.into_iter().map(|sender| HrmpChannelId { sender, recipient }); - for channel_id in channels_to_prune { - // prune each channel up to the new watermark keeping track how many messages we removed - // and what is the total byte size of them. - let (mut pruned_cnt, mut pruned_size) = (0, 0); - - let contents = ::HrmpChannelContents::get(&channel_id); - let mut leftover = Vec::with_capacity(contents.len()); - for msg in contents { - if msg.sent_at <= new_hrmp_watermark { - pruned_cnt += 1; - pruned_size += msg.data.len(); - } else { - leftover.push(msg); - } - } - if !leftover.is_empty() { - ::HrmpChannelContents::insert(&channel_id, leftover); - } else { - ::HrmpChannelContents::remove(&channel_id); - } - - // update the channel metadata. - ::HrmpChannels::mutate(&channel_id, |channel| { - if let Some(ref mut channel) = channel { - channel.msg_count -= pruned_cnt as u32; - channel.total_size -= pruned_size as u32; - } - }); - - weight += T::DbWeight::get().reads_writes(2, 2); - }*/ - ::HrmpWatermarks::insert(&recipient, new_hrmp_watermark); weight += T::DbWeight::get().reads_writes(0, 1); @@ -1109,35 +1073,7 @@ impl Pallet { // FAIL-CI chunk this by channel-id for out_msg in out_hrmp_msgs { let channel_id = HrmpChannelId { sender, recipient: out_msg.recipient }; - - // FAIL-CI remove now done by on_queue_changed - //let mut channel = match ::HrmpChannels::get(&channel_id) { - // Some(channel) => channel, - // None => { - // // apparently, that since acceptance of this candidate the recipient was - // // offboarded and the channel no longer exists. - // // FAIL-CI test this in invariant try_state - // continue - // }, - //}; - // let inbound = InboundHrmpMessage { sent_at: now, data: out_msg.data }; - // - //// book keeping - //channel.msg_count += 1; - //channel.total_size += inbound.data.len() as u32; - // - //// compute the new MQC head of the channel - //let prev_head = channel.mqc_head.unwrap_or(Default::default()); - //let new_head = BlakeTwo256::hash_of(&( - // prev_head, - // inbound.sent_at, - // T::Hashing::hash_of(&inbound.data), - //)); - //channel.mqc_head = Some(new_head); - // - //::HrmpChannels::insert(&channel_id, channel); - //::HrmpChannelContents::append(&channel_id, inbound); let encoded = inbound.encode(); let Ok(bounded_message) = BoundedSlice::try_from(&encoded[..]) else { defensive!("inbound HRMP message is too large"); @@ -1477,7 +1413,8 @@ impl Pallet { } inbound_hrmp_channels_contents*/ - BTreeMap::new() + // FAIL-CI + unimplemented!() } } diff --git a/runtime/parachains/src/lib.rs b/runtime/parachains/src/lib.rs index da0bdf7156ff..08b86fe92cf7 100644 --- a/runtime/parachains/src/lib.rs +++ b/runtime/parachains/src/lib.rs @@ -25,7 +25,6 @@ pub mod configuration; pub mod disputes; -//pub mod dmp; pub mod hrmp; pub mod inclusion; pub mod initializer; From 0947c3c520039a22e7d87982bdb0073092ee8d6f Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 1 Feb 2023 20:56:28 +0100 Subject: [PATCH 049/182] Revert wrong changes Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 505 +++++++----------- Cargo.toml | 2 +- cli/Cargo.toml | 22 +- core-primitives/Cargo.toml | 6 +- erasure-coding/Cargo.toml | 4 +- node/client/Cargo.toml | 56 +- node/collation-generation/Cargo.toml | 4 +- node/core/approval-voting/Cargo.toml | 18 +- node/core/av-store/Cargo.toml | 4 +- node/core/backing/Cargo.toml | 12 +- node/core/bitfield-signing/Cargo.toml | 2 +- node/core/candidate-validation/Cargo.toml | 6 +- node/core/chain-api/Cargo.toml | 8 +- node/core/chain-selection/Cargo.toml | 2 +- node/core/dispute-coordinator/Cargo.toml | 12 +- node/core/parachains-inherent/Cargo.toml | 4 +- node/core/provisioner/Cargo.toml | 4 +- node/core/pvf-checker/Cargo.toml | 12 +- node/core/pvf/Cargo.toml | 18 +- node/core/runtime-api/Cargo.toml | 10 +- node/jaeger/Cargo.toml | 4 +- node/malus/Cargo.toml | 6 +- node/metrics/Cargo.toml | 16 +- node/network/approval-distribution/Cargo.toml | 4 +- .../availability-distribution/Cargo.toml | 12 +- node/network/availability-recovery/Cargo.toml | 10 +- node/network/bitfield-distribution/Cargo.toml | 10 +- node/network/bridge/Cargo.toml | 10 +- node/network/collator-protocol/Cargo.toml | 12 +- node/network/dispute-distribution/Cargo.toml | 12 +- node/network/gossip-support/Cargo.toml | 16 +- node/network/protocol/Cargo.toml | 6 +- .../network/statement-distribution/Cargo.toml | 20 +- node/overseer/Cargo.toml | 8 +- node/primitives/Cargo.toml | 12 +- node/service/Cargo.toml | 102 ++-- node/service/src/chain_spec.rs | 5 +- node/subsystem-test-helpers/Cargo.toml | 10 +- node/subsystem-types/Cargo.toml | 10 +- node/subsystem-util/Cargo.toml | 6 +- node/test/client/Cargo.toml | 28 +- node/test/service/Cargo.toml | 64 +-- parachain/Cargo.toml | 8 +- parachain/src/primitives.rs | 4 +- parachain/test-parachains/Cargo.toml | 2 +- parachain/test-parachains/adder/Cargo.toml | 6 +- .../test-parachains/adder/collator/Cargo.toml | 12 +- parachain/test-parachains/halt/Cargo.toml | 2 +- parachain/test-parachains/undying/Cargo.toml | 6 +- .../undying/collator/Cargo.toml | 12 +- primitives/Cargo.toml | 24 +- primitives/test-helpers/Cargo.toml | 8 +- rpc/Cargo.toml | 46 +- runtime/common/Cargo.toml | 62 +-- runtime/common/slot_range_helper/Cargo.toml | 4 +- runtime/common/src/paras_sudo_wrapper.rs | 24 +- runtime/common/src/xcm_sender.rs | 20 +- runtime/kusama/Cargo.toml | 150 +++--- runtime/kusama/constants/Cargo.toml | 8 +- runtime/metrics/Cargo.toml | 4 +- runtime/parachains/Cargo.toml | 54 +- runtime/parachains/src/configuration.rs | 9 +- .../parachains/src/configuration/migration.rs | 5 +- runtime/parachains/src/hrmp.rs | 278 +++++----- runtime/parachains/src/inclusion/mod.rs | 321 ++--------- runtime/parachains/src/initializer.rs | 7 +- runtime/parachains/src/lib.rs | 1 + runtime/parachains/src/mock.rs | 2 +- runtime/parachains/src/runtime_api_impl/v2.rs | 18 +- runtime/polkadot/Cargo.toml | 138 ++--- runtime/polkadot/constants/Cargo.toml | 8 +- runtime/polkadot/src/lib.rs | 41 +- runtime/polkadot/src/weights/mod.rs | 1 + .../src/weights/runtime_parachains_ump.rs | 74 +++ runtime/rococo/Cargo.toml | 130 ++--- runtime/rococo/constants/Cargo.toml | 8 +- runtime/test-runtime/Cargo.toml | 78 +-- runtime/test-runtime/constants/Cargo.toml | 8 +- runtime/westend/Cargo.toml | 138 ++--- runtime/westend/constants/Cargo.toml | 8 +- statement-table/Cargo.toml | 2 +- utils/generate-bags/Cargo.toml | 4 +- utils/remote-ext-tests/bags-list/Cargo.toml | 8 +- utils/staking-miner/Cargo.toml | 28 +- xcm/Cargo.toml | 6 +- xcm/pallet-xcm-benchmarks/Cargo.toml | 20 +- xcm/pallet-xcm/Cargo.toml | 16 +- xcm/xcm-builder/Cargo.toml | 20 +- xcm/xcm-builder/src/process_xcm_message.rs | 34 +- xcm/xcm-executor/Cargo.toml | 16 +- xcm/xcm-executor/integration-tests/Cargo.toml | 14 +- xcm/xcm-simulator/Cargo.toml | 6 +- xcm/xcm-simulator/example/Cargo.toml | 18 +- xcm/xcm-simulator/fuzzer/Cargo.toml | 14 +- 94 files changed, 1334 insertions(+), 1695 deletions(-) create mode 100644 runtime/polkadot/src/weights/runtime_parachains_ump.rs diff --git a/Cargo.lock b/Cargo.lock index 62df5ad710dd..cad29e3b3f94 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -455,7 +455,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "array-bytes", "async-trait", @@ -489,7 +489,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "beefy-gadget", "futures", @@ -508,7 +508,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "sp-api", "sp-beefy", @@ -543,21 +543,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bitflags" version = "1.3.2" @@ -1337,7 +1322,7 @@ dependencies = [ "cfg-if", "crossbeam-utils", "lazy_static", - "memoffset 0.6.4", + "memoffset", "scopeguard", ] @@ -1650,17 +1635,6 @@ dependencies = [ "syn", ] -[[package]] -name = "derive-syn-parse" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "derive_builder" version = "0.11.2" @@ -2306,7 +2280,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", ] @@ -2330,7 +2304,7 @@ checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support", "frame-system", @@ -2353,7 +2327,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "Inflector", "array-bytes", @@ -2400,7 +2374,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2411,7 +2385,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2428,7 +2402,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support", "frame-system", @@ -2457,7 +2431,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "futures", "log", @@ -2473,7 +2447,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "bitflags", "frame-metadata", @@ -2499,18 +2473,16 @@ dependencies = [ "sp-std", "sp-tracing", "sp-weights", - "static_assertions", "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "Inflector", "cfg-expr", - "derive-syn-parse", "frame-support-procedural-tools", "itertools", "proc-macro2", @@ -2521,7 +2493,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2533,7 +2505,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "proc-macro2", "quote", @@ -2543,9 +2515,8 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ - "frame-benchmarking", "frame-support", "frame-support-test-pallet", "frame-system", @@ -2567,7 +2538,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support", "frame-system", @@ -2578,7 +2549,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support", "log", @@ -2596,7 +2567,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -2611,7 +2582,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "sp-api", @@ -2620,7 +2591,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support", "parity-scale-codec", @@ -2791,7 +2762,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "chrono", "frame-election-provider-support", @@ -4450,15 +4421,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - [[package]] name = "memory-db" version = "0.31.0" @@ -4544,7 +4506,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "futures", "log", @@ -4563,7 +4525,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "anyhow", "jsonrpsee", @@ -4821,7 +4783,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "memoffset 0.6.4", + "memoffset", ] [[package]] @@ -4833,21 +4795,7 @@ dependencies = [ "bitflags", "cfg-if", "libc", - "memoffset 0.6.4", -] - -[[package]] -name = "nix" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" -dependencies = [ - "bitflags", - "cfg-if", - "libc", - "memoffset 0.7.1", - "pin-utils", - "static_assertions", + "memoffset", ] [[package]] @@ -5128,7 +5076,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5143,7 +5091,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support", "frame-system", @@ -5159,7 +5107,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support", "frame-system", @@ -5174,7 +5122,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5198,7 +5146,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5218,7 +5166,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5237,7 +5185,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5252,7 +5200,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support", "frame-system", @@ -5268,7 +5216,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "array-bytes", "beefy-merkle-tree", @@ -5291,7 +5239,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5309,7 +5257,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5328,7 +5276,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5345,7 +5293,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5362,7 +5310,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5380,7 +5328,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5403,7 +5351,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5416,7 +5364,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5434,7 +5382,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5452,7 +5400,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5475,7 +5423,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5491,7 +5439,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5511,7 +5459,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5528,24 +5476,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-message-queue" -version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5553,18 +5484,16 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", "sp-std", - "sp-weights", ] [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5581,7 +5510,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5597,7 +5526,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5613,7 +5542,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support", "frame-system", @@ -5630,7 +5559,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5650,7 +5579,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "sp-api", @@ -5660,7 +5589,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support", "frame-system", @@ -5677,7 +5606,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5701,7 +5630,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5718,7 +5647,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5733,7 +5662,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5751,7 +5680,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5766,7 +5695,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5785,7 +5714,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5802,7 +5731,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support", "frame-system", @@ -5823,7 +5752,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5839,7 +5768,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support", "frame-system", @@ -5853,7 +5782,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5876,7 +5805,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5887,7 +5816,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "log", "sp-arithmetic", @@ -5896,7 +5825,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5913,7 +5842,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support", "frame-system", @@ -5927,7 +5856,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5945,7 +5874,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5964,7 +5893,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-support", "frame-system", @@ -5980,7 +5909,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5996,7 +5925,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6008,7 +5937,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6025,7 +5954,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6040,7 +5969,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6056,7 +5985,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6071,7 +6000,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7419,7 +7348,6 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", - "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7577,7 +7505,6 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", - "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -7586,7 +7513,6 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-runtime-metrics", - "proptest", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", @@ -8188,26 +8114,6 @@ dependencies = [ "regex", ] -[[package]] -name = "proptest" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" -dependencies = [ - "bit-set", - "bitflags", - "byteorder", - "lazy_static", - "num-traits", - "quick-error 2.0.1", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_xorshift", - "regex-syntax", - "rusty-fork", - "tempfile", -] - [[package]] name = "prost" version = "0.11.0" @@ -8442,15 +8348,6 @@ dependencies = [ "rand_core 0.6.3", ] -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core 0.6.3", -] - [[package]] name = "rawpointer" version = "0.2.1" @@ -8966,18 +8863,6 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error 1.2.3", - "tempfile", - "wait-timeout", -] - [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -9007,7 +8892,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "log", "sp-core", @@ -9018,7 +8903,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "futures", @@ -9045,7 +8930,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "futures", "futures-timer", @@ -9068,7 +8953,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9084,7 +8969,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9099,7 +8984,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9110,7 +8995,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "array-bytes", "chrono", @@ -9150,7 +9035,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "fnv", "futures", @@ -9176,7 +9061,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "hash-db", "kvdb", @@ -9202,7 +9087,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "futures", @@ -9227,7 +9112,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "fork-tree", @@ -9265,7 +9150,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "futures", "jsonrpsee", @@ -9287,7 +9172,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9300,7 +9185,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "futures", @@ -9323,7 +9208,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -9347,7 +9232,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9360,7 +9245,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "log", "sc-allocator", @@ -9373,7 +9258,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "cfg-if", "libc", @@ -9390,7 +9275,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "ahash 0.7.6", "array-bytes", @@ -9430,7 +9315,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "finality-grandpa", "futures", @@ -9450,7 +9335,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "ansi_term", "futures", @@ -9465,7 +9350,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "array-bytes", "async-trait", @@ -9480,7 +9365,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "array-bytes", "async-trait", @@ -9522,7 +9407,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "cid", "futures", @@ -9541,7 +9426,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "bitflags", @@ -9567,7 +9452,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "ahash 0.7.6", "futures", @@ -9585,7 +9470,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "array-bytes", "futures", @@ -9606,7 +9491,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "array-bytes", "async-trait", @@ -9638,7 +9523,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "array-bytes", "futures", @@ -9657,7 +9542,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "array-bytes", "bytes", @@ -9687,7 +9572,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "futures", "libp2p", @@ -9700,7 +9585,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9709,7 +9594,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "futures", "jsonrpsee", @@ -9739,7 +9624,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9758,7 +9643,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "http", "jsonrpsee", @@ -9773,7 +9658,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "array-bytes", "futures", @@ -9799,7 +9684,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "directories", @@ -9830,7 +9715,6 @@ dependencies = [ "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", - "sc-storage-monitor", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -9865,7 +9749,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "log", "parity-scale-codec", @@ -9873,26 +9757,10 @@ dependencies = [ "sp-core", ] -[[package]] -name = "sc-storage-monitor" -version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" -dependencies = [ - "clap 4.0.15", - "futures", - "log", - "nix 0.26.2", - "sc-client-db", - "sc-utils", - "sp-core", - "thiserror", - "tokio", -] - [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9911,7 +9779,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "futures", "libc", @@ -9930,7 +9798,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "chrono", "futures", @@ -9949,7 +9817,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "ansi_term", "atty", @@ -9980,7 +9848,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9991,7 +9859,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "futures", @@ -10018,7 +9886,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "futures", @@ -10032,7 +9900,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "backtrace", "futures", @@ -10539,7 +10407,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "hash-db", "log", @@ -10557,7 +10425,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "blake2", "proc-macro-crate", @@ -10569,7 +10437,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "scale-info", @@ -10582,7 +10450,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "integer-sqrt", "num-traits", @@ -10596,7 +10464,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "scale-info", @@ -10609,7 +10477,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "parity-scale-codec", @@ -10621,7 +10489,7 @@ dependencies = [ [[package]] name = "sp-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "scale-info", @@ -10638,7 +10506,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "sp-api", @@ -10650,7 +10518,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "futures", "log", @@ -10668,7 +10536,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "futures", @@ -10686,7 +10554,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "merlin", @@ -10709,7 +10577,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "scale-info", @@ -10721,7 +10589,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "scale-info", @@ -10734,7 +10602,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "array-bytes", "base58", @@ -10776,7 +10644,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "blake2", "byteorder", @@ -10790,7 +10658,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "proc-macro2", "quote", @@ -10801,7 +10669,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10810,7 +10678,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "proc-macro2", "quote", @@ -10820,7 +10688,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "environmental", "parity-scale-codec", @@ -10831,7 +10699,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "finality-grandpa", "log", @@ -10849,7 +10717,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10863,7 +10731,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "bytes", "ed25519", @@ -10888,7 +10756,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "lazy_static", "sp-core", @@ -10899,7 +10767,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "futures", @@ -10916,7 +10784,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "thiserror", "zstd", @@ -10925,7 +10793,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -10943,7 +10811,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "scale-info", @@ -10957,7 +10825,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "sp-api", "sp-core", @@ -10967,7 +10835,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "backtrace", "lazy_static", @@ -10977,7 +10845,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "rustc-hash", "serde", @@ -10987,7 +10855,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "either", "hash256-std-hasher", @@ -11009,7 +10877,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11027,7 +10895,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "Inflector", "proc-macro-crate", @@ -11039,7 +10907,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "scale-info", @@ -11053,7 +10921,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "scale-info", @@ -11065,7 +10933,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "hash-db", "log", @@ -11085,12 +10953,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11103,7 +10971,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "futures-timer", @@ -11118,7 +10986,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "sp-std", @@ -11130,7 +10998,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "sp-api", "sp-runtime", @@ -11139,7 +11007,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "log", @@ -11155,7 +11023,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "ahash 0.7.6", "hash-db", @@ -11178,7 +11046,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11195,7 +11063,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11206,7 +11074,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "impl-trait-for-tuples", "log", @@ -11219,7 +11087,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "parity-scale-codec", "scale-info", @@ -11452,7 +11320,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "platforms", ] @@ -11460,7 +11328,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11479,7 +11347,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "hyper", "log", @@ -11491,7 +11359,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "async-trait", "jsonrpsee", @@ -11504,7 +11372,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "jsonrpsee", "log", @@ -11523,7 +11391,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "array-bytes", "async-trait", @@ -11549,7 +11417,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11559,7 +11427,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11570,7 +11438,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "ansi_term", "build-helper", @@ -12371,7 +12239,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=oty-mp-queue#2159ce9d33efcf3299844b92039f180a946b5e22" +source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" dependencies = [ "clap 4.0.15", "frame-remote-externalities", @@ -12467,7 +12335,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.3", - "rand 0.8.5", + "rand 0.7.3", "static_assertions", ] @@ -13012,7 +12880,7 @@ dependencies = [ "log", "mach", "memfd", - "memoffset 0.6.4", + "memoffset", "paste", "rand 0.8.5", "rustix", @@ -13762,7 +13630,6 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "sp-weights", "xcm", "xcm-executor", ] diff --git a/Cargo.toml b/Cargo.toml index 90b66d3a19f9..35333e78ec80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ assert_cmd = "2.0.4" nix = "0.24.1" tempfile = "3.2.0" tokio = "1.24.1" -substrate-rpc-client = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-rpc-client = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-core-primitives = { path = "core-primitives" } [workspace] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 4aadad2be35c..0d1c55187400 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -25,20 +25,20 @@ polkadot-client = { path = "../node/client", optional = true } 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 = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", optional = true , branch = "oty-mp-queue" } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = true , branch = "oty-mp-queue" } -sc-cli = { git = "https://github.com/paritytech/substrate", optional = true , branch = "oty-mp-queue" } -sc-service = { git = "https://github.com/paritytech/substrate", optional = true , branch = "oty-mp-queue" } +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 } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } polkadot-node-metrics = { path = "../node/metrics" } -sc-tracing = { git = "https://github.com/paritytech/substrate", optional = true , branch = "oty-mp-queue" } -sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } +sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = ["db", "cli", "hostperfcheck", "full-node", "polkadot-native"] diff --git a/core-primitives/Cargo.toml b/core-primitives/Cargo.toml index 94f16a42b532..bad5533f9d1d 100644 --- a/core-primitives/Cargo.toml +++ b/core-primitives/Cargo.toml @@ -5,9 +5,9 @@ authors.workspace = true edition.workspace = true [dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } parity-scale-codec = { version = "3.1.5", default-features = false, features = [ "derive" ] } diff --git a/erasure-coding/Cargo.toml b/erasure-coding/Cargo.toml index c436b0c402ca..868d1197efd7 100644 --- a/erasure-coding/Cargo.toml +++ b/erasure-coding/Cargo.toml @@ -9,8 +9,8 @@ polkadot-primitives = { path = "../primitives" } polkadot-node-primitives = { package = "polkadot-node-primitives", path = "../node/primitives" } novelpoly = { package = "reed-solomon-novelpoly", version = "1.0.0" } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["std", "derive"] } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-trie = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } thiserror = "1.0.31" [dev-dependencies] diff --git a/node/client/Cargo.toml b/node/client/Cargo.toml index 397801324d71..b07447ef3396 100644 --- a/node/client/Cargo.toml +++ b/node/client/Cargo.toml @@ -7,37 +7,37 @@ edition.workspace = true [dependencies] async-trait = "0.1.57" futures = "0.3.21" -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +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" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-storage = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-offchain = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-storage = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-offchain = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-service = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } +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", package = "sp-beefy" , branch = "oty-mp-queue" } +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/collation-generation/Cargo.toml b/node/collation-generation/Cargo.toml index d16667a03da0..93b06f315b5f 100644 --- a/node/collation-generation/Cargo.toml +++ b/node/collation-generation/Cargo.toml @@ -12,8 +12,8 @@ polkadot-node-primitives = { path = "../primitives" } polkadot-node-subsystem = { path = "../subsystem" } polkadot-node-subsystem-util = { path = "../subsystem-util" } polkadot-primitives = { path = "../../primitives" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "master" } thiserror = "1.0.31" parity-scale-codec = { version = "3.1.5", default-features = false, features = ["bit-vec", "derive"] } diff --git a/node/core/approval-voting/Cargo.toml b/node/core/approval-voting/Cargo.toml index 4b2b7ab71f1c..75737f9a2fb0 100644 --- a/node/core/approval-voting/Cargo.toml +++ b/node/core/approval-voting/Cargo.toml @@ -24,20 +24,20 @@ polkadot-primitives = { path = "../../../primitives" } polkadot-node-primitives = { path = "../../primitives" } polkadot-node-jaeger = { path = "../../jaeger" } -sc-keystore = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-consensus = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-consensus-slots = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["full_crypto"] , branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = ["full_crypto"] } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [dev-dependencies] async-trait = "0.1.57" parking_lot = "0.12.0" rand_core = "0.5.1" # should match schnorrkel -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } assert_matches = "1.4.0" kvdb-memorydb = "0.13.0" diff --git a/node/core/av-store/Cargo.toml b/node/core/av-store/Cargo.toml index 6fdc996584ed..73cdb72d8012 100644 --- a/node/core/av-store/Cargo.toml +++ b/node/core/av-store/Cargo.toml @@ -26,9 +26,9 @@ env_logger = "0.9.0" assert_matches = "1.4.0" kvdb-memorydb = "0.13.0" -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } parking_lot = "0.12.0" test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } diff --git a/node/core/backing/Cargo.toml b/node/core/backing/Cargo.toml index ca49df31e147..7428372eec62 100644 --- a/node/core/backing/Cargo.toml +++ b/node/core/backing/Cargo.toml @@ -6,7 +6,7 @@ edition.workspace = true [dependencies] futures = "0.3.21" -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-primitives = { path = "../../../primitives" } polkadot-node-primitives = { path = "../../primitives" } polkadot-node-subsystem = {path = "../../subsystem" } @@ -19,11 +19,11 @@ thiserror = "1.0.31" fatality = "0.0.6" [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } futures = { version = "0.3.21", features = ["thread-pool"] } assert_matches = "1.4.0" polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } diff --git a/node/core/bitfield-signing/Cargo.toml b/node/core/bitfield-signing/Cargo.toml index ed3ed47397ca..b94cc6708c74 100644 --- a/node/core/bitfield-signing/Cargo.toml +++ b/node/core/bitfield-signing/Cargo.toml @@ -10,7 +10,7 @@ gum = { package = "tracing-gum", path = "../../gum" } polkadot-primitives = { path = "../../../primitives" } polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } wasm-timer = "0.2.5" thiserror = "1.0.31" diff --git a/node/core/candidate-validation/Cargo.toml b/node/core/candidate-validation/Cargo.toml index 924ec44c574e..28731e1f25b8 100644 --- a/node/core/candidate-validation/Cargo.toml +++ b/node/core/candidate-validation/Cargo.toml @@ -10,7 +10,7 @@ futures = "0.3.21" futures-timer = "3.0.2" gum = { package = "tracing-gum", path = "../../gum" } -sp-maybe-compressed-blob = { package = "sp-maybe-compressed-blob", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-maybe-compressed-blob = { package = "sp-maybe-compressed-blob", git = "https://github.com/paritytech/substrate", branch = "master" } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["bit-vec", "derive"] } polkadot-primitives = { path = "../../../primitives" } @@ -23,10 +23,10 @@ polkadot-node-metrics = { path = "../../metrics" } polkadot-node-core-pvf = { path = "../pvf" } [dev-dependencies] -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } futures = { version = "0.3.21", features = ["thread-pool"] } assert_matches = "1.4.0" polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } diff --git a/node/core/chain-api/Cargo.toml b/node/core/chain-api/Cargo.toml index 730cc1daaa53..ec4d0bc9a3d6 100644 --- a/node/core/chain-api/Cargo.toml +++ b/node/core/chain-api/Cargo.toml @@ -7,12 +7,12 @@ edition.workspace = true [dependencies] futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-primitives = { path = "../../../primitives" } polkadot-node-metrics = { path = "../../metrics" } polkadot-node-subsystem = {path = "../../subsystem" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } [dev-dependencies] futures = { version = "0.3.21", features = ["thread-pool"] } @@ -20,4 +20,4 @@ maplit = "1.0.2" parity-scale-codec = "3.1.5" polkadot-node-primitives = { path = "../../primitives" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/core/chain-selection/Cargo.toml b/node/core/chain-selection/Cargo.toml index 4746c2d09c88..8d4145461b94 100644 --- a/node/core/chain-selection/Cargo.toml +++ b/node/core/chain-selection/Cargo.toml @@ -19,7 +19,7 @@ parity-scale-codec = "3.1.5" [dev-dependencies] polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } parking_lot = "0.12.0" assert_matches = "1" kvdb-memorydb = "0.13.0" diff --git a/node/core/dispute-coordinator/Cargo.toml b/node/core/dispute-coordinator/Cargo.toml index 62caa8a4e904..6152645e209d 100644 --- a/node/core/dispute-coordinator/Cargo.toml +++ b/node/core/dispute-coordinator/Cargo.toml @@ -18,20 +18,20 @@ polkadot-node-primitives = { path = "../../primitives" } polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } [dev-dependencies] kvdb-memorydb = "0.13.0" polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } assert_matches = "1.4.0" test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } futures-timer = "3.0.2" -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] # If not enabled, the dispute coordinator will do nothing. diff --git a/node/core/parachains-inherent/Cargo.toml b/node/core/parachains-inherent/Cargo.toml index c4b0f97c384b..d4301cb22270 100644 --- a/node/core/parachains-inherent/Cargo.toml +++ b/node/core/parachains-inherent/Cargo.toml @@ -13,5 +13,5 @@ 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 = "oty-mp-queue" } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/core/provisioner/Cargo.toml b/node/core/provisioner/Cargo.toml index a8d6b80789b7..c6d78582cfc9 100644 --- a/node/core/provisioner/Cargo.toml +++ b/node/core/provisioner/Cargo.toml @@ -18,7 +18,7 @@ futures-timer = "3.0.2" fatality = "0.0.6" [dev-dependencies] -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } diff --git a/node/core/pvf-checker/Cargo.toml b/node/core/pvf-checker/Cargo.toml index a167000ae4e9..d41955d9bac5 100644 --- a/node/core/pvf-checker/Cargo.toml +++ b/node/core/pvf-checker/Cargo.toml @@ -15,14 +15,14 @@ polkadot-primitives = { path = "../../../primitives" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-overseer = { path = "../../overseer" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers"} test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } futures-timer = "3.0.2" diff --git a/node/core/pvf/Cargo.toml b/node/core/pvf/Cargo.toml index 7d962de3364a..e00092826428 100644 --- a/node/core/pvf/Cargo.toml +++ b/node/core/pvf/Cargo.toml @@ -28,15 +28,15 @@ polkadot-parachain = { path = "../../../parachain" } polkadot-core-primitives = { path = "../../../core-primitives" } polkadot-node-metrics = { path = "../../metrics"} -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-executor-wasmtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-executor-common = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-wasm-interface = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +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" } +sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-wasm-interface = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } [dev-dependencies] adder = { package = "test-parachain-adder", path = "../../../parachain/test-parachains/adder" } diff --git a/node/core/runtime-api/Cargo.toml b/node/core/runtime-api/Cargo.toml index 5d9b9ab87674..31c1386cbd7f 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -9,7 +9,7 @@ futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } lru = "0.9" -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-primitives = { path = "../../../primitives" } polkadot-node-metrics = { path = "../../metrics" } @@ -17,10 +17,10 @@ polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem-types = { path = "../../subsystem-types" } [dev-dependencies] -sp-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } futures = { version = "0.3.21", features = ["thread-pool"] } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } polkadot-node-primitives = { path = "../../primitives" } diff --git a/node/jaeger/Cargo.toml b/node/jaeger/Cargo.toml index a2f74774a38e..938ae3853e39 100644 --- a/node/jaeger/Cargo.toml +++ b/node/jaeger/Cargo.toml @@ -11,8 +11,8 @@ lazy_static = "1.4" parking_lot = "0.12.0" polkadot-primitives = { path = "../../primitives" } polkadot-node-primitives = { path = "../primitives" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +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.24.1" log = "0.4.17" diff --git a/node/malus/Cargo.toml b/node/malus/Cargo.toml index 514fbfaf8515..c783693ca527 100644 --- a/node/malus/Cargo.toml +++ b/node/malus/Cargo.toml @@ -26,8 +26,8 @@ polkadot-node-core-pvf = { path = "../core/pvf" } color-eyre = { version = "0.6.1", default-features = false } assert_matches = "1.5" async-trait = "0.1.57" -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } clap = { version = "4.0.9", features = ["derive"] } futures = "0.3.21" futures-timer = "3.0.2" @@ -40,5 +40,5 @@ default = [] [dev-dependencies] polkadot-node-subsystem-test-helpers = { path = "../subsystem-test-helpers" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } futures = { version = "0.3.21", features = ["thread-pool"] } diff --git a/node/metrics/Cargo.toml b/node/metrics/Cargo.toml index 42a30b0137cb..815df94a8488 100644 --- a/node/metrics/Cargo.toml +++ b/node/metrics/Cargo.toml @@ -13,11 +13,11 @@ gum = { package = "tracing-gum", path = "../gum" } metered = { package = "prioritized-metered-channel", version = "0.2.0" } # Both `sc-service` and `sc-cli` are required by runtime metrics `logger_hook()`. -sc-service = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } codec = { package = "parity-scale-codec", version = "3.0.0" } primitives = { package = "polkadot-primitives", path = "../../primitives/" } bs58 = { version = "0.4.0", features = ["alloc"] } @@ -30,10 +30,10 @@ tempfile = "3.2.0" hyper = { version = "0.14.20", default-features = false, features = ["http1", "tcp"] } tokio = "1.24.1" polkadot-test-service = { path = "../test/service", features=["runtime-metrics"]} -substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } prometheus-parse = {version = "0.2.2"} [features] diff --git a/node/network/approval-distribution/Cargo.toml b/node/network/approval-distribution/Cargo.toml index f8d1818a1cbd..6df854072aa6 100644 --- a/node/network/approval-distribution/Cargo.toml +++ b/node/network/approval-distribution/Cargo.toml @@ -16,8 +16,8 @@ futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } [dev-dependencies] -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", features = ["std"] , branch = "oty-mp-queue" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["std"] } polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } diff --git a/node/network/availability-distribution/Cargo.toml b/node/network/availability-distribution/Cargo.toml index 3a13613ea03a..c9881f270132 100644 --- a/node/network/availability-distribution/Cargo.toml +++ b/node/network/availability-distribution/Cargo.toml @@ -14,8 +14,8 @@ polkadot-node-network-protocol = { path = "../../network/protocol" } polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-primitives = { path = "../../primitives" } -sp-core = { git = "https://github.com/paritytech/substrate", features = ["std"] , branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["std"] } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } thiserror = "1.0.31" rand = "0.8.5" derive_more = "0.99.17" @@ -24,10 +24,10 @@ fatality = "0.0.6" [dev-dependencies] polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } -sp-core = { git = "https://github.com/paritytech/substrate", features = ["std"] , branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["std"] } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } futures-timer = "3.0.2" assert_matches = "1.4.0" polkadot-primitives-test-helpers = { path = "../../../primitives/test-helpers" } diff --git a/node/network/availability-recovery/Cargo.toml b/node/network/availability-recovery/Cargo.toml index b5d1fe3d5027..b76a73d38b9d 100644 --- a/node/network/availability-recovery/Cargo.toml +++ b/node/network/availability-recovery/Cargo.toml @@ -19,7 +19,7 @@ polkadot-node-subsystem = {path = "../../subsystem" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-network-protocol = { path = "../../network/protocol" } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } [dev-dependencies] assert_matches = "1.4.0" @@ -27,10 +27,10 @@ env_logger = "0.9.0" futures-timer = "3.0.2" log = "0.4.17" -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } polkadot-primitives-test-helpers = { path = "../../../primitives/test-helpers" } diff --git a/node/network/bitfield-distribution/Cargo.toml b/node/network/bitfield-distribution/Cargo.toml index 9adfe11b4848..8ac7c2ac6bfb 100644 --- a/node/network/bitfield-distribution/Cargo.toml +++ b/node/network/bitfield-distribution/Cargo.toml @@ -16,11 +16,11 @@ rand = "0.8" [dev-dependencies] polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } maplit = "1.0.2" log = "0.4.17" env_logger = "0.9.0" diff --git a/node/network/bridge/Cargo.toml b/node/network/bridge/Cargo.toml index beca0f209eaa..2d68cdb4d808 100644 --- a/node/network/bridge/Cargo.toml +++ b/node/network/bridge/Cargo.toml @@ -11,9 +11,9 @@ futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } polkadot-primitives = { path = "../../../primitives" } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-node-metrics = { path = "../../metrics"} polkadot-node-network-protocol = { path = "../protocol" } polkadot-node-subsystem = {path = "../../subsystem" } @@ -27,7 +27,7 @@ thiserror = "1" assert_matches = "1.4.0" polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } polkadot-node-subsystem-util = { path = "../../subsystem-util"} -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } futures-timer = "3" polkadot-primitives-test-helpers = { path = "../../../primitives/test-helpers" } diff --git a/node/network/collator-protocol/Cargo.toml b/node/network/collator-protocol/Cargo.toml index 783dc6bb1c13..c7618baa3cd7 100644 --- a/node/network/collator-protocol/Cargo.toml +++ b/node/network/collator-protocol/Cargo.toml @@ -11,9 +11,9 @@ futures = "0.3.21" futures-timer = "3" gum = { package = "tracing-gum", path = "../../gum" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-primitives = { path = "../../../primitives" } polkadot-node-network-protocol = { path = "../../network/protocol" } @@ -28,9 +28,9 @@ log = "0.4.17" env_logger = "0.9.0" assert_matches = "1.4.0" -sp-core = { git = "https://github.com/paritytech/substrate", features = ["std"] , branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["std"] } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } parity-scale-codec = { version = "3.1.5", features = ["std"] } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } diff --git a/node/network/dispute-distribution/Cargo.toml b/node/network/dispute-distribution/Cargo.toml index 9384b10840ff..f3f9a9133769 100644 --- a/node/network/dispute-distribution/Cargo.toml +++ b/node/network/dispute-distribution/Cargo.toml @@ -16,9 +16,9 @@ polkadot-node-subsystem = {path = "../../subsystem" } polkadot-node-network-protocol = { path = "../../network/protocol" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-primitives = { path = "../../primitives" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network = { 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" } thiserror = "1.0.31" fatality = "0.0.6" lru = "0.9.0" @@ -27,9 +27,9 @@ indexmap = "1.9.1" [dev-dependencies] async-trait = "0.1.57" polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } futures-timer = "3.0.2" assert_matches = "1.4.0" lazy_static = "1.4.0" diff --git a/node/network/gossip-support/Cargo.toml b/node/network/gossip-support/Cargo.toml index c59e45d95a38..2236b72d3c77 100644 --- a/node/network/gossip-support/Cargo.toml +++ b/node/network/gossip-support/Cargo.toml @@ -5,10 +5,10 @@ authors.workspace = true edition.workspace = true [dependencies] -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-node-network-protocol = { path = "../protocol" } polkadot-node-subsystem = { path = "../../subsystem" } @@ -22,10 +22,10 @@ rand_chacha = { version = "0.3.1", default-features = false } gum = { package = "tracing-gum", path = "../../gum" } [dev-dependencies] -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } diff --git a/node/network/protocol/Cargo.toml b/node/network/protocol/Cargo.toml index 5dff9f58e91d..2cfe1ce58e61 100644 --- a/node/network/protocol/Cargo.toml +++ b/node/network/protocol/Cargo.toml @@ -12,9 +12,9 @@ polkadot-primitives = { path = "../../../primitives" } polkadot-node-primitives = { path = "../../primitives" } polkadot-node-jaeger = { path = "../../jaeger" } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } strum = { version = "0.24", features = ["derive"] } futures = "0.3.21" thiserror = "1.0.31" diff --git a/node/network/statement-distribution/Cargo.toml b/node/network/statement-distribution/Cargo.toml index d561a957dfe1..5ebdcd01b7ab 100644 --- a/node/network/statement-distribution/Cargo.toml +++ b/node/network/statement-distribution/Cargo.toml @@ -9,8 +9,8 @@ edition.workspace = true futures = "0.3.21" gum = { package = "tracing-gum", path = "../../gum" } polkadot-primitives = { path = "../../../primitives" } -sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-node-subsystem = {path = "../../subsystem" } polkadot-node-primitives = { path = "../../primitives" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } @@ -24,13 +24,13 @@ fatality = "0.0.6" [dev-dependencies] polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } assert_matches = "1.4.0" -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +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" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } futures-timer = "3.0.2" polkadot-primitives-test-helpers = { path = "../../../primitives/test-helpers" } diff --git a/node/overseer/Cargo.toml b/node/overseer/Cargo.toml index f218eacef320..262eddeec61e 100644 --- a/node/overseer/Cargo.toml +++ b/node/overseer/Cargo.toml @@ -5,8 +5,8 @@ authors.workspace = true edition.workspace = true [dependencies] -client = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +client = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "master" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } futures = "0.3.21" futures-timer = "3.0.2" parking_lot = "0.12.0" @@ -18,14 +18,14 @@ polkadot-primitives = { path = "../../primitives" } orchestra = "0.0.4" gum = { package = "tracing-gum", path = "../gum" } lru = "0.9" -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +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" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } futures = { version = "0.3.21", features = ["thread-pool"] } femme = "2.2.1" assert_matches = "1.4.0" diff --git a/node/primitives/Cargo.toml b/node/primitives/Cargo.toml index df45c3ce11d0..b865298f8467 100644 --- a/node/primitives/Cargo.toml +++ b/node/primitives/Cargo.toml @@ -10,12 +10,12 @@ bounded-vec = "0.6" futures = "0.3.21" polkadot-primitives = { path = "../../primitives" } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-consensus-vrf = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-vrf = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-parachain = { path = "../../parachain", default-features = false } schnorrkel = "0.9.1" thiserror = "1.0.31" diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index 5bc85433996a..58298481444e 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -7,63 +7,63 @@ edition.workspace = true [dependencies] # Substrate Client -sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -babe = { package = "sc-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -beefy-primitives = { git = "https://github.com/paritytech/substrate", package = "sp-beefy" , branch = "oty-mp-queue" } -beefy-gadget = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -grandpa = { package = "sc-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -mmr-gadget = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -service = { package = "sc-service", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -telemetry = { package = "sc-telemetry", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +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", package = "sp-beefy" } +beefy-gadget = { 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" } +sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "master" } +service = { package = "sc-service", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +telemetry = { package = "sc-telemetry", git = "https://github.com/paritytech/substrate", branch = "master" } # Substrate Primitives -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -consensus_common = { package = "sp-consensus", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -grandpa_primitives = { package = "sp-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-offchain = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-storage = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-trie = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } +consensus_common = { package = "sp-consensus", git = "https://github.com/paritytech/substrate", branch = "master" } +grandpa_primitives = { package = "sp-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" } +inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-block-builder = { 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" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-offchain = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-storage = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "master" } # Substrate Pallets -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" } # Substrate Other -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "master" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } # External Crates futures = "0.3.21" diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index a58e43d278dc..35208fb79342 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -188,12 +188,9 @@ fn default_parachains_host_configuration( thread_availability_period: 4, max_upward_queue_count: 8, max_upward_queue_size: 1024 * 1024, + max_downward_message_size: 1024 * 1024, max_upward_message_size: 50 * 1024, max_upward_message_num_per_candidate: 5, - max_downward_queue_count: 1024, - max_downward_queue_size: 1024 * 1024, - max_downward_message_size: 50 * 1024, - max_downward_message_num_per_candidate: 5, hrmp_sender_deposit: 0, hrmp_recipient_deposit: 0, hrmp_channel_max_capacity: 8, diff --git a/node/subsystem-test-helpers/Cargo.toml b/node/subsystem-test-helpers/Cargo.toml index 1fed9b1cd217..41c48d7f31e1 100644 --- a/node/subsystem-test-helpers/Cargo.toml +++ b/node/subsystem-test-helpers/Cargo.toml @@ -12,11 +12,11 @@ parking_lot = "0.12.0" polkadot-node-subsystem = { path = "../subsystem" } polkadot-node-subsystem-util = { path = "../subsystem-util" } polkadot-primitives = { path = "../../primitives" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } [dev-dependencies] polkadot-overseer = { path = "../overseer" } diff --git a/node/subsystem-types/Cargo.toml b/node/subsystem-types/Cargo.toml index 06a3df7be322..22528503ccc4 100644 --- a/node/subsystem-types/Cargo.toml +++ b/node/subsystem-types/Cargo.toml @@ -14,11 +14,11 @@ polkadot-node-network-protocol = { path = "../network/protocol" } polkadot-statement-table = { path = "../../statement-table" } polkadot-node-jaeger = { path = "../jaeger" } orchestra = "0.0.4" -sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +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" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } smallvec = "1.8.0" -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "master" } thiserror = "1.0.31" async-trait = "0.1.57" diff --git a/node/subsystem-util/Cargo.toml b/node/subsystem-util/Cargo.toml index ebe66ef1f37d..a3ab67fe4dd4 100644 --- a/node/subsystem-util/Cargo.toml +++ b/node/subsystem-util/Cargo.toml @@ -29,9 +29,9 @@ polkadot-node-primitives = { path = "../primitives" } polkadot-overseer = { path = "../overseer" } metered = { package = "prioritized-metered-channel", version = "0.2.0" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +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.13.0" parity-db = { version = "0.4.3"} diff --git a/node/test/client/Cargo.toml b/node/test/client/Cargo.toml index 3348a3122e67..af9357d64382 100644 --- a/node/test/client/Cargo.toml +++ b/node/test/client/Cargo.toml @@ -14,22 +14,22 @@ polkadot-primitives = { path = "../../../primitives" } polkadot-node-subsystem = { path = "../../subsystem" } # Substrate dependencies -substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "master" } [dev-dependencies] -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } futures = "0.3.21" [features] diff --git a/node/test/service/Cargo.toml b/node/test/service/Cargo.toml index 3ae659433495..1dbf7f9cf124 100644 --- a/node/test/service/Cargo.toml +++ b/node/test/service/Cargo.toml @@ -26,41 +26,41 @@ test-runtime-constants = { path = "../../../runtime/test-runtime/constants" } polkadot-runtime-parachains = { path = "../../../runtime/parachains" } # Substrate dependencies -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -babe = { package = "sc-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -consensus_common = { package = "sp-consensus", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -grandpa = { package = "sc-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -grandpa_primitives = { package = "sp-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-service = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } +babe = { package = "sc-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master" } +babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master" } +consensus_common = { package = "sp-consensus", git = "https://github.com/paritytech/substrate", branch = "master" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } +grandpa = { package = "sc-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" } +grandpa_primitives = { package = "sp-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" } +inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-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 } +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" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-test-client = { git = "https://github.com/paritytech/substrate", branch = "master" } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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 = "oty-mp-queue" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } tokio = { version = "1.24.1", features = ["macros"] } [features] diff --git a/parachain/Cargo.toml b/parachain/Cargo.toml index ad75d4c932e0..d203bd3ed9f6 100644 --- a/parachain/Cargo.toml +++ b/parachain/Cargo.toml @@ -11,10 +11,10 @@ version.workspace = true # various unnecessary Substrate-specific endpoints. parity-scale-codec = { version = "3.1.5", default-features = false, features = [ "derive" ] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } polkadot-core-primitives = { path = "../core-primitives", default-features = false } derive_more = "0.99.11" diff --git a/parachain/src/primitives.rs b/parachain/src/primitives.rs index 6fdf7c93e8ce..e638b83c2d7c 100644 --- a/parachain/src/primitives.rs +++ b/parachain/src/primitives.rs @@ -274,9 +274,7 @@ impl IsSystem for Sibling { /// is allowed between two participants in one direction, i.e. there cannot be 2 different channels /// identified by `(A, B)`. A channel with the same para id in sender and recipient is invalid. That /// is, however, not enforced. -#[derive( - Clone, PartialEq, Eq, PartialOrd, Ord, Encode, Decode, MaxEncodedLen, RuntimeDebug, TypeInfo, -)] +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Encode, Decode, RuntimeDebug, TypeInfo)] #[cfg_attr(feature = "std", derive(Hash))] pub struct HrmpChannelId { /// The para that acts as the sender in this channel. diff --git a/parachain/test-parachains/Cargo.toml b/parachain/test-parachains/Cargo.toml index fb44ec019bb4..d023fb6be6ea 100644 --- a/parachain/test-parachains/Cargo.toml +++ b/parachain/test-parachains/Cargo.toml @@ -13,7 +13,7 @@ adder = { package = "test-parachain-adder", path = "adder" } halt = { package = "test-parachain-halt", path = "halt" } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = ["std"] diff --git a/parachain/test-parachains/adder/Cargo.toml b/parachain/test-parachains/adder/Cargo.toml index 2bbbcc503c18..4b29da55c1cf 100644 --- a/parachain/test-parachains/adder/Cargo.toml +++ b/parachain/test-parachains/adder/Cargo.toml @@ -9,15 +9,15 @@ authors.workspace = true [dependencies] parachain = { package = "polkadot-parachain", path = "../../", default-features = false, features = [ "wasm-api" ] } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } tiny-keccak = { version = "2.0.2", features = ["keccak"] } dlmalloc = { version = "0.2.4", features = [ "global" ] } # We need to make sure the global allocator is disabled until we have support of full substrate externalities -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, features = [ "disable_allocator" ] , branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = [ "disable_allocator" ] } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = [ "std" ] diff --git a/parachain/test-parachains/adder/collator/Cargo.toml b/parachain/test-parachains/adder/collator/Cargo.toml index e482bb1d3f72..51b9ccad8097 100644 --- a/parachain/test-parachains/adder/collator/Cargo.toml +++ b/parachain/test-parachains/adder/collator/Cargo.toml @@ -27,9 +27,9 @@ polkadot-service = { path = "../../../../node/service", features = ["rococo-nati polkadot-node-primitives = { path = "../../../../node/primitives" } polkadot-node-subsystem = { path = "../../../../node/subsystem" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } # This one is tricky. Even though it is not used directly by the collator, we still need it for the # `puppet_worker` binary, which is required for the integration test. However, this shouldn't be @@ -40,8 +40,8 @@ polkadot-node-core-pvf = { path = "../../../../node/core/pvf" } polkadot-parachain = { path = "../../.." } polkadot-test-service = { path = "../../../../node/test/service" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } tokio = { version = "1.24.1", features = ["macros"] } diff --git a/parachain/test-parachains/halt/Cargo.toml b/parachain/test-parachains/halt/Cargo.toml index c9e561681bdb..05df7e7d592f 100644 --- a/parachain/test-parachains/halt/Cargo.toml +++ b/parachain/test-parachains/halt/Cargo.toml @@ -9,7 +9,7 @@ edition.workspace = true [dependencies] [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = [ "std" ] diff --git a/parachain/test-parachains/undying/Cargo.toml b/parachain/test-parachains/undying/Cargo.toml index 9cd5af052e9c..1cc5595ec7a5 100644 --- a/parachain/test-parachains/undying/Cargo.toml +++ b/parachain/test-parachains/undying/Cargo.toml @@ -9,16 +9,16 @@ edition.workspace = true [dependencies] parachain = { package = "polkadot-parachain", path = "../../", default-features = false, features = [ "wasm-api" ] } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } tiny-keccak = { version = "2.0.2", features = ["keccak"] } dlmalloc = { version = "0.2.4", features = [ "global" ] } log = { version = "0.4.17", default-features = false } # We need to make sure the global allocator is disabled until we have support of full substrate externalities -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, features = [ "disable_allocator" ] , branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = [ "disable_allocator" ] } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = [ "std" ] diff --git a/parachain/test-parachains/undying/collator/Cargo.toml b/parachain/test-parachains/undying/collator/Cargo.toml index 1a6567edf1ad..36a40cb779ec 100644 --- a/parachain/test-parachains/undying/collator/Cargo.toml +++ b/parachain/test-parachains/undying/collator/Cargo.toml @@ -27,9 +27,9 @@ polkadot-service = { path = "../../../../node/service", features = ["rococo-nati polkadot-node-primitives = { path = "../../../../node/primitives" } polkadot-node-subsystem = { path = "../../../../node/subsystem" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } # This one is tricky. Even though it is not used directly by the collator, we still need it for the # `puppet_worker` binary, which is required for the integration test. However, this shouldn't be @@ -40,8 +40,8 @@ polkadot-node-core-pvf = { path = "../../../../node/core/pvf" } polkadot-parachain = { path = "../../.." } polkadot-test-service = { path = "../../../../node/test/service" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } tokio = { version = "1.24.1", features = ["macros"] } diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index a929fd3b6a7c..43df39e26bde 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -11,18 +11,18 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ scale-info = { version = "2.1.2", default-features = false, features = ["bit-vec", "derive"] } serde = { version = "1.0.137", optional = true, features = ["derive"] } -application-crypto = { package = "sp-application-crypto", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -runtime_primitives = { package = "sp-runtime", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-consensus-slots = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", optional = true , branch = "oty-mp-queue" } -sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +application-crypto = { package = "sp-application-crypto", 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 } +primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +runtime_primitives = { package = "sp-runtime", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } +sp-staking = { 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 } polkadot-core-primitives = { path = "../core-primitives", default-features = false } polkadot-parachain = { path = "../parachain", default-features = false } diff --git a/primitives/test-helpers/Cargo.toml b/primitives/test-helpers/Cargo.toml index 808fd57323a7..917e5f3babdb 100644 --- a/primitives/test-helpers/Cargo.toml +++ b/primitives/test-helpers/Cargo.toml @@ -5,9 +5,9 @@ authors.workspace = true edition.workspace = true [dependencies] -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-application-crypto = { package = "sp-application-crypto", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", features = ["std"] , branch = "oty-mp-queue" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-application-crypto = { package = "sp-application-crypto", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["std"] } polkadot-primitives = { path = "../" } rand = "0.8.5" diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 95185ed87125..a641afd12496 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -7,26 +7,26 @@ edition.workspace = true [dependencies] jsonrpsee = { version = "0.16.2", features = ["server"] } polkadot-primitives = { path = "../primitives" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -txpool-api = { package = "sc-transaction-pool-api", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -mmr-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -beefy-gadget = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -beefy-gadget-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } +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" } +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" } +beefy-gadget-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } +substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 7ad214c2fba0..2fbc67eb974d 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -15,35 +15,35 @@ serde = { version = "1.0.139", default-features = false } serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" -beefy-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, package = "sp-beefy" , branch = "oty-mp-queue" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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 } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-staking-reward-fn = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-bags-list = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-staking-reward-fn = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false } libsecp256k1 = { version = "0.7.0", default-features = false } @@ -54,10 +54,10 @@ xcm = { path = "../../xcm", default-features = false } [dev-dependencies] hex-literal = "0.3.4" -frame-support-test = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-support-test = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } serde_json = "1.0.81" libsecp256k1 = "0.7.0" test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../primitives/test-helpers" } diff --git a/runtime/common/slot_range_helper/Cargo.toml b/runtime/common/slot_range_helper/Cargo.toml index c74ca11ba101..c6d8452be79d 100644 --- a/runtime/common/slot_range_helper/Cargo.toml +++ b/runtime/common/slot_range_helper/Cargo.toml @@ -8,8 +8,8 @@ edition.workspace = true paste = "1.0" enumn = "0.1.5" parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { package = "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 } [features] default = ["std"] diff --git a/runtime/common/src/paras_sudo_wrapper.rs b/runtime/common/src/paras_sudo_wrapper.rs index ef899c8dfc4f..4b30d771521c 100644 --- a/runtime/common/src/paras_sudo_wrapper.rs +++ b/runtime/common/src/paras_sudo_wrapper.rs @@ -22,8 +22,7 @@ pub use pallet::*; use parity_scale_codec::Encode; use primitives::Id as ParaId; use runtime_parachains::{ - configuration, hrmp, inclusion, - inclusion::DmpLink, + configuration, dmp, hrmp, paras::{self, ParaGenesisArgs}, ParaLifecycle, }; @@ -39,12 +38,7 @@ pub mod pallet { #[pallet::config] #[pallet::disable_frame_system_supertrait_check] - pub trait Config: configuration::Config + paras::Config + hrmp::Config { - /// Link to the DMP queue as provided by `pallet-parachain-inclusion`. - /// - /// This is a weaker coupling than inheriting the `inclusion::Config` which makes it easier for mocking. - type DmpLink: inclusion::DmpLink; - } + pub trait Config: configuration::Config + paras::Config + dmp::Config + hrmp::Config {} #[pallet::error] pub enum Error { @@ -146,15 +140,11 @@ pub mod pallet { ensure_root(origin)?; ensure!(>::is_valid_para(id), Error::::ParaDoesntExist); let config = >::config(); - use inclusion::DmpAcceptanceCheckErr::*; - ::DmpLink::try_receive_downward_message(&config, id, xcm.encode()) - .map_err(|e| match e { - MoreMessagesThanPermitted { .. } | - MessageSize { .. } | - CapacityExceeded { .. } | - TotalSizeExceeded { .. } => Error::::ExceedsMaxMessageSize.into(), - }) - .map(|_| ()) + >::queue_downward_message(&config, id, xcm.encode()).map_err(|e| match e + { + dmp::QueueDownwardMessageError::ExceedsMaxMessageSize => + Error::::ExceedsMaxMessageSize.into(), + }) } /// Forcefully establish a channel from the sender to the recipient. diff --git a/runtime/common/src/xcm_sender.rs b/runtime/common/src/xcm_sender.rs index 67408419f794..392f0a40a087 100644 --- a/runtime/common/src/xcm_sender.rs +++ b/runtime/common/src/xcm_sender.rs @@ -21,7 +21,7 @@ use parity_scale_codec::Encode; use primitives::v2::Id as ParaId; use runtime_parachains::{ configuration::{self, HostConfiguration}, - inclusion, + dmp, }; use sp_std::{marker::PhantomData, prelude::*}; use xcm::prelude::*; @@ -50,11 +50,8 @@ impl> PriceForParachainDelivery for ConstantPrice { /// XCM sender for relay chain. It only sends downward message. pub struct ChildParachainRouter(PhantomData<(T, W, P)>); -impl< - T: configuration::Config + inclusion::Config, - W: xcm::WrapVersion, - P: PriceForParachainDelivery, - > SendXcm for ChildParachainRouter +impl + SendXcm for ChildParachainRouter { type Ticket = (HostConfiguration, ParaId, Vec); @@ -76,7 +73,7 @@ impl< let para = id.into(); let price = P::price_for_parachain_delivery(para, &xcm); let blob = W::wrap_version(&d, xcm).map_err(|()| DestinationUnsupported)?.encode(); - >::check_downward_messages(&config, ¶, &[&blob]) + >::can_queue_downward_message(&config, ¶, &blob) .map_err(Into::::into)?; Ok(((config, para, blob), price)) @@ -86,11 +83,8 @@ impl< (config, para, blob): (HostConfiguration, ParaId, Vec), ) -> Result { let hash = sp_io::hashing::blake2_256(&blob[..]); - >::try_receive_downward_message(&config, para, blob) - .map(|_weight| hash) - .map_err(|_| { - frame_support::defensive!("Should have been checked before receiving."); - SendError::Transport(&"Error placing into DMP queue") - }) + >::queue_downward_message(&config, para, blob) + .map(|()| hash) + .map_err(|_| SendError::Transport(&"Error placing into DMP queue")) } } diff --git a/runtime/kusama/Cargo.toml b/runtime/kusama/Cargo.toml index 253be84e3e75..d53082803f8e 100644 --- a/runtime/kusama/Cargo.toml +++ b/runtime/kusama/Cargo.toml @@ -16,81 +16,81 @@ serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" smallvec = "1.8.0" -authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -beefy-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, package = "sp-beefy" , branch = "oty-mp-queue" } +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, package = "sp-beefy" } kusama-runtime-constants = { package = "kusama-runtime-constants", path = "./constants", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-arithmetic = { package = "sp-arithmetic", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-version = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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 } +sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-arithmetic = { package = "sp-arithmetic", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-bags-list = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-bounties = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-child-bounties = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-conviction-voting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-nis = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-im-online = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-indices = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-offences = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-ranked-collective = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-recovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-referenda = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-society = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-system = {git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-tips = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-whitelist = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-conviction-voting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +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-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 } +pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-ranked-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-referenda = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-society = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-system = {git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-tips = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-whitelist = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false } pallet-xcm-benchmarks = { path = "../../xcm/pallet-xcm-benchmarks", default-features = false, optional = true } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } hex-literal = { version = "0.3.4", optional = true } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false } @@ -104,16 +104,16 @@ xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default [dev-dependencies] hex-literal = "0.3.4" tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-trie = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" } +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", package = "frame-remote-externalities" , branch = "oty-mp-queue" } +remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } tokio = { version = "1.24.1", features = ["macros"] } -sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = ["std"] diff --git a/runtime/kusama/constants/Cargo.toml b/runtime/kusama/constants/Cargo.toml index bea3d2da9c48..6d5dc406586c 100644 --- a/runtime/kusama/constants/Cargo.toml +++ b/runtime/kusama/constants/Cargo.toml @@ -7,12 +7,12 @@ edition.workspace = true [dependencies] smallvec = "1.8.0" -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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", default-features = false , branch = "oty-mp-queue" } -sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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"] diff --git a/runtime/metrics/Cargo.toml b/runtime/metrics/Cargo.toml index 5bf4c060db3d..99d7878d99e8 100644 --- a/runtime/metrics/Cargo.toml +++ b/runtime/metrics/Cargo.toml @@ -5,8 +5,8 @@ authors.workspace = true edition.workspace = true [dependencies] -sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false, branch = "oty-mp-queue" } -sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false} +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } parity-scale-codec = { version = "3.1.5", default-features = false } primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false } diff --git a/runtime/parachains/Cargo.toml b/runtime/parachains/Cargo.toml index 2ac0840c8a94..7f1b6995b775 100644 --- a/runtime/parachains/Cargo.toml +++ b/runtime/parachains/Cargo.toml @@ -14,30 +14,30 @@ serde = { version = "1.0.139", features = [ "derive" ], optional = true } derive_more = "0.99.17" bitflags = "1.3.2" -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-keystore = { git = "https://github.com/paritytech/substrate", optional = true , branch = "oty-mp-queue" } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +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 } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-message-queue = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } xcm = { package = "xcm", path = "../../xcm", default-features = false } xcm-executor = { package = "xcm-executor", path = "../../xcm/xcm-executor", default-features = false } @@ -51,11 +51,11 @@ polkadot-runtime-metrics = { path = "../metrics", default-features = false} [dev-dependencies] futures = "0.3.21" hex-literal = "0.3.4" -keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-support-test = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" } +frame-support-test = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../primitives/test-helpers"} -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } thousands = "0.2.0" assert_matches = "1" serde_json = "1.0.85" diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index 6ed4958255bb..d3263baadb02 100644 --- a/runtime/parachains/src/configuration.rs +++ b/runtime/parachains/src/configuration.rs @@ -119,9 +119,6 @@ pub struct HostConfiguration { /// The maximum POV block size, in bytes. pub max_pov_size: u32, - - pub max_downward_queue_count: u32, - pub max_downward_queue_size: u32, /// The maximum size of a message that can be put in a downward message queue. /// /// Since we require receiving at least one DMP message the obvious upper bound of the size is @@ -129,7 +126,6 @@ pub struct HostConfiguration { /// decide to do with its PoV so this value in practice will be picked as a fraction of the PoV /// size. pub max_downward_message_size: u32, - pub max_downward_message_num_per_candidate: u32, /// The maximum number of outbound HRMP channels a parachain is allowed to open. pub hrmp_max_parachain_outbound_channels: u32, /// The maximum number of outbound HRMP channels a parathread is allowed to open. @@ -264,12 +260,9 @@ impl> Default for HostConfiguration Weight; fn hrmp_accept_open_channel() -> Weight; @@ -143,15 +134,14 @@ pub struct HrmpChannel { /// The total size in bytes of all message payloads in the channel. /// Invariant: should be less or equal to `max_total_size`. pub total_size: u32, - // FAIL-CI remove - // A head of the Message Queue Chain for this channel. Each link in this chain has a form: - // `(prev_head, B, H(M))`, where - // - `prev_head`: is the previous value of `mqc_head` or zero if none. - // - `B`: is the [relay-chain] block number in which a message was appended - // - `H(M)`: is the hash of the message being appended. - // This value is initialized to a special value that consists of all zeroes which indicates - // that no messages were previously added. - //pub mqc_head: Option, + /// A head of the Message Queue Chain for this channel. Each link in this chain has a form: + /// `(prev_head, B, H(M))`, where + /// - `prev_head`: is the previous value of `mqc_head` or zero if none. + /// - `B`: is the [relay-chain] block number in which a message was appended + /// - `H(M)`: is the hash of the message being appended. + /// This value is initialized to a special value that consists of all zeroes which indicates + /// that no messages were previously added. + pub mqc_head: Option, /// The amount that the sender supplied as a deposit when opening this channel. pub sender_deposit: Balance, /// The amount that the recipient supplied as a deposit when accepting opening this channel. @@ -249,7 +239,9 @@ pub mod pallet { pub struct Pallet(_); #[pallet::config] - pub trait Config: frame_system::Config + configuration::Config + paras::Config { + pub trait Config: + frame_system::Config + configuration::Config + paras::Config + dmp::Config + { /// The outer event type. type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -264,15 +256,6 @@ pub mod pallet { /// implementation should be the same as `Balance` as used in the `Configuration`. type Currency: ReservableCurrency; - /// Contains the contents of all HRMP channels. - /// - /// Formerly known as `HrmpChannelContents`. The origin here is a `HrmpChannelId` instead of `MessageOrigin` as in the inclusion pallet. You can use the `TransformOrigin` adapter to plug it in here. - type MessageQueue: EnqueueMessage; - - type MessageQueueReader: QueueIntrospect; - - type DmpLink: inclusion::DmpLink; - /// Something that provides the weight of this pallet. type WeightInfo: WeightInfo; } @@ -315,30 +298,18 @@ pub mod pallet { OpenHrmpChannelAlreadyRequested, /// The sender already has the maximum number of allowed outbound channels. OpenHrmpChannelLimitExceeded, - /// The recipient's DMP queue is full. - OpenHrmpChannelDmpFull, - /// The recipient's DMP queue rejected the request because it was too long. - OpenHrmpChannelDmpMessageSizeExceeded, /// The channel from the sender to the origin doesn't exist. AcceptHrmpChannelDoesntExist, /// The channel is already confirmed. AcceptHrmpChannelAlreadyConfirmed, /// The recipient already has the maximum number of allowed inbound channels. AcceptHrmpChannelLimitExceeded, - /// The recipient's DMP queue is full. - AcceptHrmpChannelDmpFull, - /// The recipient's DMP queue rejected the request because it was too long. - AcceptHrmpChannelDmpMessageSizeExceeded, /// The origin tries to close a channel where it is neither the sender nor the recipient. CloseHrmpChannelUnauthorized, /// The channel to be closed doesn't exist. CloseHrmpChannelDoesntExist, /// The channel close request is already requested. CloseHrmpChannelAlreadyUnderway, - /// The recipient's DMP queue is full. - CloseHrmpChannelDmpFull, - /// The recipient's DMP queue rejected the request because it was too long. - CloseHrmpChannelDmpMessageSizeExceeded, /// Canceling is requested by neither the sender nor recipient of the open channel request. CancelHrmpOpenChannelUnauthorized, /// The open request doesn't exist. @@ -430,15 +401,15 @@ pub mod pallet { StorageMap<_, Twox64Concat, ParaId, Vec, ValueQuery>; /// Storage for the messages for each channel. - /// Invariant: must be empty if the corresponding channel in `HrmpChannels` is `None`. - //#[pallet::storage] - //pub type HrmpChannelContents = StorageMap< - // _, - // Twox64Concat, - // HrmpChannelId, - // Vec>, - // ValueQuery, - //>; + /// Invariant: cannot be non-empty if the corresponding channel in `HrmpChannels` is `None`. + #[pallet::storage] + pub type HrmpChannelContents = StorageMap< + _, + Twox64Concat, + HrmpChannelId, + Vec>, + ValueQuery, + >; /// Maintains a mapping that can be used to answer the question: What paras sent a message at /// the given block number for a given receiver. Invariants: @@ -482,19 +453,6 @@ pub mod pallet { } } - #[pallet::hooks] - impl Hooks> for Pallet { - fn integrity_test() { - todo!(); - } - - #[cfg(feature = "try-runtime")] - fn try_state(_: BlockNumberFor) -> Result<(), &'static str> { - todo!("Test that the msg_count is equal to the footprint"); - todo!("Test that there exists a queue iff HrmpChannels is Some"); - } - } - #[pallet::call] impl Pallet { /// Initiate opening a channel from a parachain to a given recipient with given channel @@ -853,6 +811,7 @@ impl Pallet { max_message_size: request.max_message_size, msg_count: 0, total_size: 0, + mqc_head: None, }, ); @@ -908,8 +867,7 @@ impl Pallet { ); } - // FAIL-CI TODO force remove of queues - T::MessageQueue::sweep_queue(channel_id.clone()); + ::HrmpChannelContents::remove(channel_id); ::HrmpEgressChannelsIndex::mutate(&channel_id.sender, |v| { if let Ok(i) = v.binary_search(&channel_id.recipient) { @@ -924,7 +882,7 @@ impl Pallet { } /// Check that the candidate of the given recipient controls the HRMP watermark properly. - pub(crate) fn check_hrmp_advancement( + pub(crate) fn check_hrmp_watermark( recipient: ParaId, relay_chain_parent_number: T::BlockNumber, new_hrmp_watermark: T::BlockNumber, @@ -1055,6 +1013,41 @@ impl Pallet { }); weight += T::DbWeight::get().reads_writes(1, 1); + // having all senders we can trivially find out the channels which we need to prune. + let channels_to_prune = + senders.into_iter().map(|sender| HrmpChannelId { sender, recipient }); + for channel_id in channels_to_prune { + // prune each channel up to the new watermark keeping track how many messages we removed + // and what is the total byte size of them. + let (mut pruned_cnt, mut pruned_size) = (0, 0); + + let contents = ::HrmpChannelContents::get(&channel_id); + let mut leftover = Vec::with_capacity(contents.len()); + for msg in contents { + if msg.sent_at <= new_hrmp_watermark { + pruned_cnt += 1; + pruned_size += msg.data.len(); + } else { + leftover.push(msg); + } + } + if !leftover.is_empty() { + ::HrmpChannelContents::insert(&channel_id, leftover); + } else { + ::HrmpChannelContents::remove(&channel_id); + } + + // update the channel metadata. + ::HrmpChannels::mutate(&channel_id, |channel| { + if let Some(ref mut channel) = channel { + channel.msg_count -= pruned_cnt as u32; + channel.total_size -= pruned_size as u32; + } + }); + + weight += T::DbWeight::get().reads_writes(2, 2); + } + ::HrmpWatermarks::insert(&recipient, new_hrmp_watermark); weight += T::DbWeight::get().reads_writes(0, 1); @@ -1068,18 +1061,38 @@ impl Pallet { sender: ParaId, out_hrmp_msgs: Vec>, ) -> Weight { + let mut weight = Weight::zero(); let now = >::block_number(); - // FAIL-CI chunk this by channel-id for out_msg in out_hrmp_msgs { let channel_id = HrmpChannelId { sender, recipient: out_msg.recipient }; - let inbound = InboundHrmpMessage { sent_at: now, data: out_msg.data }; - let encoded = inbound.encode(); - let Ok(bounded_message) = BoundedSlice::try_from(&encoded[..]) else { - defensive!("inbound HRMP message is too large"); - continue; + + let mut channel = match ::HrmpChannels::get(&channel_id) { + Some(channel) => channel, + None => { + // apparently, that since acceptance of this candidate the recipient was + // offboarded and the channel no longer exists. + continue + }, }; - T::MessageQueue::enqueue_message(bounded_message, channel_id.clone()); + + let inbound = InboundHrmpMessage { sent_at: now, data: out_msg.data }; + + // book keeping + channel.msg_count += 1; + channel.total_size += inbound.data.len() as u32; + + // compute the new MQC head of the channel + let prev_head = channel.mqc_head.unwrap_or(Default::default()); + let new_head = BlakeTwo256::hash_of(&( + prev_head, + inbound.sent_at, + T::Hashing::hash_of(&inbound.data), + )); + channel.mqc_head = Some(new_head); + + ::HrmpChannels::insert(&channel_id, channel); + ::HrmpChannelContents::append(&channel_id, inbound); // The digests are sorted in ascending by block number order. Assuming absence of // contextual execution, there are only two possible scenarios here: @@ -1105,9 +1118,11 @@ impl Pallet { recipient_digest.push((now, vec![sender])); } ::HrmpChannelDigests::insert(&channel_id.recipient, recipient_digest); + + weight += T::DbWeight::get().reads_writes(2, 2); } - Weight::zero() // FAIL-CI benchmark + weight } /// Initiate opening a channel from a parachain to a given recipient with given channel @@ -1194,29 +1209,18 @@ impl Pallet { }])) .encode() }; - - use DmpAcceptanceCheckErr::*; - match T::DmpLink::check_downward_message(&config, &recipient, ¬ification_bytes) { - Ok(()) => (), - Err(MessageSize { .. }) => { - defensive!("DMP message size to small to accept HRMP channel"); - return Err(Error::::OpenHrmpChannelDmpMessageSizeExceeded.into()) - }, - Err( - TotalSizeExceeded { .. } | - MoreMessagesThanPermitted { .. } | - CapacityExceeded { .. }, - ) => { - log::info!( - target: LOG_TARGET, - "DMP queue cannot accept HRMP channel. Please retry.", - ); - return Err(Error::::OpenHrmpChannelDmpFull.into()) - }, + if let Err(dmp::QueueDownwardMessageError::ExceedsMaxMessageSize) = + >::queue_downward_message(&config, recipient, notification_bytes) + { + // this should never happen unless the max downward message size is configured to an + // jokingly small number. + log::error!( + target: "runtime::hrmp", + "sending 'init_open_channel::notification_bytes' failed." + ); + debug_assert!(false); } - T::DmpLink::receive_downward_message(&config, recipient, notification_bytes); - Ok(()) } @@ -1263,29 +1267,18 @@ impl Pallet { let xcm = Xcm(vec![HrmpChannelAccepted { recipient: u32::from(origin) }]); VersionedXcm::from(xcm).encode() }; - use DmpAcceptanceCheckErr::*; - match T::DmpLink::check_downward_message(&config, &sender, ¬ification_bytes) { - Ok(()) => (), - Err(MessageSize { .. }) => { - // This is a configuration error. - defensive!("DMP message size to small to ever HRMP channel"); - return Err(Error::::AcceptHrmpChannelDmpMessageSizeExceeded.into()) - }, - Err( - TotalSizeExceeded { .. } | - MoreMessagesThanPermitted { .. } | - CapacityExceeded { .. }, - ) => { - log::info!( - target: LOG_TARGET, - "DMP queue cannot accept HRMP channel. Please retry.", - ); - return Err(Error::::AcceptHrmpChannelDmpFull.into()) - }, + if let Err(dmp::QueueDownwardMessageError::ExceedsMaxMessageSize) = + >::queue_downward_message(&config, sender, notification_bytes) + { + // this should never happen unless the max downward message size is configured to an + // jokingly small number. + log::error!( + target: "runtime::hrmp", + "sending 'accept_open_channel::notification_bytes' failed." + ); + debug_assert!(false); } - T::DmpLink::receive_downward_message(&config, sender, notification_bytes); - Ok(()) } @@ -1352,28 +1345,18 @@ impl Pallet { }; let opposite_party = if origin == channel_id.sender { channel_id.recipient } else { channel_id.sender }; - use DmpAcceptanceCheckErr::*; - match T::DmpLink::check_downward_message(&config, &opposite_party, ¬ification_bytes) { - Ok(()) => (), - Err(MessageSize { .. }) => { - defensive!("DMP message size to small to close HRMP channel"); - return Err(Error::::CloseHrmpChannelDmpMessageSizeExceeded.into()) - }, - Err( - TotalSizeExceeded { .. } | - MoreMessagesThanPermitted { .. } | - CapacityExceeded { .. }, - ) => { - log::info!( - target: LOG_TARGET, - "DMP queue cannot close HRMP channel. Please retry." - ); - return Err(Error::::CloseHrmpChannelDmpFull.into()) - }, + if let Err(dmp::QueueDownwardMessageError::ExceedsMaxMessageSize) = + >::queue_downward_message(&config, opposite_party, notification_bytes) + { + // this should never happen unless the max downward message size is configured to an + // jokingly small number. + log::error!( + target: "runtime::hrmp", + "sending 'close_channel::notification_bytes' failed." + ); + debug_assert!(false); } - T::DmpLink::receive_downward_message(&config, opposite_party, notification_bytes); - Ok(()) } @@ -1403,18 +1386,16 @@ impl Pallet { pub(crate) fn inbound_hrmp_channels_contents( recipient: ParaId, ) -> BTreeMap>> { - /*let sender_set = ::HrmpIngressChannelsIndex::get(&recipient); + let sender_set = ::HrmpIngressChannelsIndex::get(&recipient); let mut inbound_hrmp_channels_contents = BTreeMap::new(); for sender in sender_set { let channel_contents = - //::HrmpChannelContents::get(&HrmpChannelId { sender, recipient }); + ::HrmpChannelContents::get(&HrmpChannelId { sender, recipient }); inbound_hrmp_channels_contents.insert(sender, channel_contents); } - inbound_hrmp_channels_contents*/ - // FAIL-CI - unimplemented!() + inbound_hrmp_channels_contents } } @@ -1606,16 +1587,3 @@ impl Pallet { } } } - -impl OnQueueChanged for Pallet { - fn on_queue_changed(channel_id: HrmpChannelId, items_count: u64, items_size: u64) { - // Update the HrmpChannelDigests - let Some(mut channel) = HrmpChannels::::get(&channel_id) else { - defensive!("HRMP Channel {:?} is not registered", channel_id); - return; - }; - channel.msg_count = items_count as u32; // FAIL-CI: defensive_saturated_into - channel.total_size = items_size as u32; - HrmpChannels::::insert(&channel_id, channel); - } -} diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index be2621ddac03..1465b6bf478c 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -22,25 +22,24 @@ use crate::{ configuration::{self, HostConfiguration}, - disputes, hrmp, paras, + disputes, dmp, hrmp, paras, paras_inherent::DisputedBitfield, scheduler::CoreAssignment, shared, }; use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec}; use frame_support::{ - defensive, pallet_prelude::*, - traits::{Defensive, EnqueueMessage, OnQueueChanged}, + traits::{Defensive, EnqueueMessage}, BoundedSlice, }; +use pallet_message_queue::OnQueueChanged; use parity_scale_codec::{Decode, Encode}; use primitives::{ well_known_keys, AvailabilityBitfield, BackedCandidate, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateReceipt, CommittedCandidateReceipt, CoreIndex, - DownwardMessage, GroupIndex, Hash, HeadData, HrmpChannelId, Id as ParaId, SigningContext, - UncheckedSignedAvailabilityBitfields, UpwardMessage, ValidatorId, ValidatorIndex, - ValidityAttestation, + GroupIndex, Hash, HeadData, Id as ParaId, SigningContext, UncheckedSignedAvailabilityBitfields, + UpwardMessage, ValidatorId, ValidatorIndex, ValidityAttestation, }; use scale_info::TypeInfo; use sp_runtime::{traits::One, DispatchError, SaturatedConversion}; @@ -219,40 +218,25 @@ pub fn minimum_backing_votes(n_validators: usize) -> usize { /// NOTE Ideally we want the queue pallet to be sub-queue aware since currently we waste PoV by introducing a lot of few-element queues by doing this. /// /// Changing this requires a migration of the queue pallet. -#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, Clone, Copy, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] pub enum SubQueue { - UMP { from: ParaId }, - HRMP { channel: HrmpChannelId }, - DMP { to: ParaId }, + UMP, + HRMP, + DMP, } /// Over which `queue` and `from` which para-chain a message came in from. /// /// Changing this requires a migration of the queue pallet. #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] -pub enum MessageOrigin { - /// A message in on of the UMP/DMP/HRMP queues. - MQ(SubQueue), - // Can be extended here for none-MP use-cases. +pub struct MessageOrigin { + pub queue: SubQueue, + pub para: ParaId, } impl MessageOrigin { - pub const fn ump(from: ParaId) -> Self { - Self::MQ(SubQueue::UMP { from }) - } - pub const fn dmp(to: ParaId) -> Self { - Self::MQ(SubQueue::DMP { to }) - } - pub const fn hrmp(channel: HrmpChannelId) -> Self { - Self::MQ(SubQueue::HRMP { channel }) - } -} - -use sp_runtime::traits::Convert; -pub struct HrmpToMessageOriginConverter; -impl Convert for HrmpToMessageOriginConverter { - fn convert(channel_id: HrmpChannelId) -> MessageOrigin { - MessageOrigin::hrmp(channel_id) + pub const fn ump(para: ParaId) -> Self { + Self { queue: SubQueue::UMP, para } } } @@ -267,7 +251,12 @@ pub mod pallet { #[pallet::config] pub trait Config: - frame_system::Config + shared::Config + paras::Config + hrmp::Config + configuration::Config + frame_system::Config + + shared::Config + + paras::Config + + dmp::Config + + hrmp::Config + + configuration::Config { type WeightInfo: WeightInfo; type RuntimeEvent: From> + IsType<::RuntimeEvent>; @@ -291,8 +280,6 @@ pub mod pallet { CandidateTimedOut(CandidateReceipt, HeadData, CoreIndex), /// Some upward messages have been received and will be processed. UpwardMessagesReceived { from: ParaId, count: u32 }, - /// Some downward messages have been received and will be processed. - DownwardMessagesReceived { to: ParaId, count: u32 }, } #[pallet::error] @@ -345,8 +332,6 @@ pub mod pallet { IncorrectDownwardMessageHandling, /// At least one upward message sent does not pass the acceptance criteria. InvalidUpwardMessages, - /// At least one downward message sent does not pass the acceptance criteria. - InvalidDownwardMessages, /// The candidate didn't follow the rules of HRMP watermark advancement. HrmpWatermarkMishandling, /// The HRMP messages sent by the candidate is not valid. @@ -388,9 +373,8 @@ enum AcceptanceCheckErr { HeadDataTooLarge, PrematureCodeUpgrade, NewCodeTooLarge, - ProcessedDownwardMessages(ProcessedDownwardMessagesAcceptanceErr), + ProcessedDownwardMessages(dmp::ProcessedDownwardMessagesAcceptanceErr), UpwardMessages(UmpAcceptanceCheckErr), - DownwardMessages(DmpAcceptanceCheckErr), HrmpWatermark(hrmp::HrmpWatermarkAcceptanceErr), OutboundHrmp(hrmp::OutboundHrmpAcceptanceErr), } @@ -409,42 +393,6 @@ pub enum UmpAcceptanceCheckErr { TotalSizeExceeded { total_size: u64, limit: u64 }, } -/// An error returned by [`check_downward_messages`] that indicates a violation of one of acceptance -/// criteria rules. -#[derive(Debug)] -#[cfg_attr(test, derive(PartialEq))] -pub enum DmpAcceptanceCheckErr { - /// The maximal number of messages that can be submitted in one batch was exceeded. - MoreMessagesThanPermitted { sent: u32, permitted: u32 }, - /// The maximal size of a single message was exceeded. - MessageSize { idx: u32, msg_size: u32, max_size: u32 }, - /// The allowed number of messages in the queue was exceeded. - CapacityExceeded { count: u64, limit: u64 }, - /// The allowed combined message size in the queue was exceeded. - TotalSizeExceeded { total_size: u64, limit: u64 }, -} - -use xcm::latest::SendError; -impl From for SendError { - fn from(err: DmpAcceptanceCheckErr) -> Self { - match err { - // FAIL-CI todo - _ => SendError::ExceedsMaxMessageSize, - } - } -} - -/// An error returned by [`check_processed_downward_messages`] that indicates an acceptance check -/// didn't pass. -#[derive(derive_more::From, Debug)] -#[cfg_attr(test, derive(PartialEq))] -pub enum ProcessedDownwardMessagesAcceptanceErr { - /// If there are pending messages then `processed_downward_messages` should be at least 1, - AdvancementRule, - /// `processed_downward_messages` should not be greater than the number of pending messages. - Underflow { processed_downward_messages: u32, dmq_length: u32 }, -} - impl fmt::Debug for UmpAcceptanceCheckErr { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { match *self { @@ -931,21 +879,20 @@ impl Pallet { ); } - // FAIL-CI remove Now done by the message queue - //weight += >::prune_dmq( - // receipt.descriptor.para_id, - // commitments.processed_downward_messages, - //); + // enact the messaging facet of the candidate. + weight += >::prune_dmq( + receipt.descriptor.para_id, + commitments.processed_downward_messages, + ); weight += Self::receive_upward_messages( &config, receipt.descriptor.para_id, commitments.upward_messages, ); - // FAIL-CI remove Now done by the queue pallet - //weight += >::prune_hrmp( - // receipt.descriptor.para_id, - // T::BlockNumber::from(commitments.hrmp_watermark), - //); + weight += >::prune_hrmp( + receipt.descriptor.para_id, + T::BlockNumber::from(commitments.hrmp_watermark), + ); weight += >::queue_outbound_hrmp( receipt.descriptor.para_id, commitments.horizontal_messages, @@ -982,7 +929,7 @@ impl Pallet { }) } - let fp = ::MessageQueue::footprint(MessageOrigin::ump(para)); + let fp = T::MessageQueue::footprint(MessageOrigin::ump(para)); let (para_queue_count, mut para_queue_size) = (fp.count, fp.size); if para_queue_count @@ -1036,100 +983,10 @@ impl Pallet { let count = upward_messages.len() as u32; Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); let messages = upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); - ::MessageQueue::enqueue_messages(messages, MessageOrigin::ump(para)); + T::MessageQueue::enqueue_messages(messages, MessageOrigin::ump(para)); ::WeightInfo::receive_upward_messages(count) } - pub fn try_receive_downward_message( - config: &HostConfiguration, - para: ParaId, - downward_messages: DownwardMessage, - ) -> Result { - if let Err(err) = Self::check_downward_message(config, ¶, &downward_messages) { - return Err(err) - } - Ok(Self::receive_downward_message(config, para, downward_messages)) - } - - /// Determine whether enqueuing these downward messages to a specific recipient para would result - /// in an error. If this returns `Ok(())` the caller can be certain that a call to - /// `receive_downward_message` with the same parameters will be successful. - pub fn check_downward_messages( - config: &HostConfiguration, - para: &ParaId, - downward_messages: &[&DownwardMessage], - ) -> Result<(), DmpAcceptanceCheckErr> { - // FAIL-CI: TODO merge this with `check_upward_messages` - let additional_msgs = downward_messages.len(); - if additional_msgs > config.max_downward_message_num_per_candidate as usize { - return Err(DmpAcceptanceCheckErr::MoreMessagesThanPermitted { - sent: additional_msgs as u32, - permitted: config.max_downward_message_num_per_candidate, - }) - } - - let fp = ::MessageQueue::footprint(MessageOrigin::dmp(para.clone())); - let (para_queue_count, mut para_queue_size) = (fp.count, fp.size); - - if para_queue_count - .checked_add(additional_msgs as u64) - .map(|want| want > config.max_downward_queue_count as u64) - .unwrap_or(true) - { - return Err(DmpAcceptanceCheckErr::CapacityExceeded { - count: para_queue_count.saturating_add(additional_msgs as u64), - limit: config.max_downward_queue_count as u64, - }) - } - - for (idx, msg) in downward_messages.into_iter().enumerate() { - let msg_size = msg.len(); - if msg_size > config.max_downward_message_size as usize { - return Err(DmpAcceptanceCheckErr::MessageSize { - idx: idx as u32, - msg_size: msg_size as u32, - max_size: config.max_downward_message_size, - }) - } - // make sure that the queue is not overfilled. - // we do it here only once since returning false invalidates the whole relay-chain block. - if para_queue_size - .checked_add(msg_size as u64) - .map(|want| want > config.max_downward_queue_size as u64) - .unwrap_or(true) - { - return Err(DmpAcceptanceCheckErr::TotalSizeExceeded { - total_size: para_queue_size.saturating_add(msg_size as u64), - limit: config.max_downward_queue_size as u64, - }) - } - para_queue_size += msg_size as u64; - } - - Ok(()) - } - - /// Enqueues `upward_messages` from a `para`'s accepted candidate block. - /// - /// ALWAYS CHECK [`check_downward_messages`] BEFORE CALLING THIS. - pub fn receive_downward_messages( - config: &HostConfiguration, - para: ParaId, - downward_messages: &[DownwardMessage], - ) -> Weight { - if downward_messages.is_empty() { - return Weight::zero() - } - - let count = downward_messages.len() as u32; - Self::deposit_event(Event::DownwardMessagesReceived { to: para, count }); - // FAIL-CI bubble up bounded requirement - let messages = downward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); - ::MessageQueue::enqueue_messages(messages, MessageOrigin::dmp(para)); - // FAIL-CI::WeightInfo::receive_downward_messages(count) - Weight::zero() - } - /// Cleans up all paras pending availability that the predicate returns true for. /// /// The predicate accepts the index of the core and the block number the core has been occupied @@ -1171,38 +1028,6 @@ impl Pallet { cleaned_up_cores } - pub(crate) fn check_dmp_advancement( - para: ParaId, - processed_downward_messages: u32, - ) -> Result<(), ProcessedDownwardMessagesAcceptanceErr> { - let dmq_length = ::MessageQueue::footprint(MessageOrigin::dmp(para)).count; - - if dmq_length > 0 && processed_downward_messages == 0 { - log::error!( - target: LOG_TARGET, - "Parachain {:?} processed none of its {} DMP messages", - para, - dmq_length, - ); - return Err(ProcessedDownwardMessagesAcceptanceErr::AdvancementRule) - } - if processed_downward_messages as u64 > dmq_length { - log::error!( - target: LOG_TARGET, - "Parachain {:?} processed more DMP messages than available, {} > {}", - para, - processed_downward_messages, - dmq_length, - ); - return Err(ProcessedDownwardMessagesAcceptanceErr::Underflow { - processed_downward_messages, - dmq_length: dmq_length as u32, - }) - } - - Ok(()) - } - /// Cleans up all paras pending availability that are in the given list of disputed candidates. /// /// Returns a vector of cleaned-up core IDs. @@ -1286,7 +1111,6 @@ impl AcceptanceCheckErr { NewCodeTooLarge => Error::::NewCodeTooLarge, ProcessedDownwardMessages(_) => Error::::IncorrectDownwardMessageHandling, UpwardMessages(_) => Error::::InvalidUpwardMessages, - DownwardMessages(_) => Error::::InvalidDownwardMessages, HrmpWatermark(_) => Error::::HrmpWatermarkMishandling, OutboundHrmp(_) => Error::::InvalidOutboundHrmp, } @@ -1294,21 +1118,20 @@ impl AcceptanceCheckErr { } impl OnQueueChanged for Pallet { - fn on_queue_changed(queue: MessageOrigin, items_count: u64, items_size: u64) { - let MessageOrigin::MQ(queue) = queue else { - defensive!("Unexpected message origin: {:?}", queue); - return; - }; - + fn on_queue_changed(queue: MessageOrigin, count: u64, size: u64) { match queue { - SubQueue::UMP { from: para } => { - todo!("Implement UMP message handling"); - }, - SubQueue::DMP { to: para } => { - todo!("Implement DMP message handling"); - }, - SubQueue::HRMP { channel } => { - hrmp::Pallet::::on_queue_changed(channel, items_count, items_size); + MessageOrigin { queue: SubQueue::UMP, para } => { + // TODO maybe migrate this to u64 + let (count, size) = (count.saturated_into(), size.saturated_into()); + // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` + #[allow(deprecated)] + well_known_keys::relay_dispatch_queue_size_typed(para).set((count, size)); + + let config = >::config(); + let remaining_count = config.max_upward_queue_count.saturating_sub(count); + let remaining_size = config.max_upward_queue_size.saturating_sub(size); + well_known_keys::relay_dispatch_queue_remaining_capacity(para) + .set((remaining_count, remaining_size)); }, _ => todo!(), } @@ -1444,61 +1267,11 @@ impl CandidateCheckContext { } // check if the candidate passes the messaging acceptance criteria - Pallet::::check_dmp_advancement(para_id, processed_downward_messages)?; + >::check_processed_downward_messages(para_id, processed_downward_messages)?; Pallet::::check_upward_messages(&self.config, para_id, upward_messages)?; - >::check_hrmp_advancement( - para_id, - self.relay_parent_number, - hrmp_watermark, - )?; + >::check_hrmp_watermark(para_id, self.relay_parent_number, hrmp_watermark)?; >::check_outbound_hrmp(&self.config, para_id, horizontal_messages)?; Ok(()) } } - -pub trait DmpLink { - fn check_downward_message( - config: &HostConfiguration, - para: &ParaId, - downward_messages: &DownwardMessage, - ) -> Result<(), DmpAcceptanceCheckErr>; - - fn receive_downward_message( - config: &HostConfiguration, - para: ParaId, - downward_messages: DownwardMessage, - ) -> Weight; - - fn try_receive_downward_message( - config: &HostConfiguration, - para: ParaId, - downward_messages: DownwardMessage, - ) -> Result; -} - -impl DmpLink<::BlockNumber> for Pallet { - fn check_downward_message( - config: &HostConfiguration, - para: &ParaId, - downward_messages: &DownwardMessage, - ) -> Result<(), DmpAcceptanceCheckErr> { - Self::check_downward_messages(config, para, &[downward_messages]) - } - - fn receive_downward_message( - config: &HostConfiguration, - para: ParaId, - downward_messages: DownwardMessage, - ) -> Weight { - Self::receive_downward_messages(config, para, &[downward_messages]) - } - - fn try_receive_downward_message( - config: &HostConfiguration, - para: ParaId, - downward_messages: DownwardMessage, - ) -> Result { - Self::try_receive_downward_message(config, para, downward_messages) - } -} diff --git a/runtime/parachains/src/initializer.rs b/runtime/parachains/src/initializer.rs index b41d4c11bcc0..e78b113fce5c 100644 --- a/runtime/parachains/src/initializer.rs +++ b/runtime/parachains/src/initializer.rs @@ -22,7 +22,7 @@ use crate::{ configuration::{self, HostConfiguration}, disputes::{self, DisputesHandler as _, SlashingHandler as _}, - hrmp, inclusion, paras, scheduler, session_info, shared, + dmp, hrmp, inclusion, paras, scheduler, session_info, shared, }; use frame_support::{ traits::{OneSessionHandler, Randomness}, @@ -113,6 +113,7 @@ pub mod pallet { + inclusion::Config + session_info::Config + disputes::Config + + dmp::Config + hrmp::Config { /// A randomness beacon. @@ -166,6 +167,7 @@ pub mod pallet { session_info::Pallet::::initializer_initialize(now) + T::DisputesHandler::initializer_initialize(now) + T::SlashingHandler::initializer_initialize(now) + + dmp::Pallet::::initializer_initialize(now) + hrmp::Pallet::::initializer_initialize(now); HasInitialized::::set(Some(())); @@ -176,6 +178,7 @@ pub mod pallet { fn on_finalize(now: T::BlockNumber) { // reverse initialization order. hrmp::Pallet::::initializer_finalize(); + dmp::Pallet::::initializer_finalize(); T::SlashingHandler::initializer_finalize(); T::DisputesHandler::initializer_finalize(); session_info::Pallet::::initializer_finalize(); @@ -262,7 +265,7 @@ impl Pallet { session_info::Pallet::::initializer_on_new_session(¬ification); T::DisputesHandler::initializer_on_new_session(¬ification); T::SlashingHandler::initializer_on_new_session(session_index); - //dmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); + dmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); // ump::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); hrmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); } diff --git a/runtime/parachains/src/lib.rs b/runtime/parachains/src/lib.rs index 08b86fe92cf7..8672e1efd13b 100644 --- a/runtime/parachains/src/lib.rs +++ b/runtime/parachains/src/lib.rs @@ -25,6 +25,7 @@ pub mod configuration; pub mod disputes; +pub mod dmp; pub mod hrmp; pub mod inclusion; pub mod initializer; diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 77f45e4df198..e24a1885c07c 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -17,7 +17,7 @@ //! Mocks for all the traits. use crate::{ - configuration, disputes, hrmp, + configuration, disputes, dmp, hrmp, inclusion::{self, MessageOrigin, SubQueue}, initializer, origin, paras, paras_inherent, scheduler, session_info, shared, ParaId, }; diff --git a/runtime/parachains/src/runtime_api_impl/v2.rs b/runtime/parachains/src/runtime_api_impl/v2.rs index 6c1c7e0f4756..e4be8101146d 100644 --- a/runtime/parachains/src/runtime_api_impl/v2.rs +++ b/runtime/parachains/src/runtime_api_impl/v2.rs @@ -18,8 +18,8 @@ //! functions. use crate::{ - configuration, hrmp, inclusion, initializer, paras, paras_inherent, scheduler, session_info, - shared, + configuration, dmp, hrmp, inclusion, initializer, paras, paras_inherent, scheduler, + session_info, shared, }; use primitives::{ AuthorityDiscoveryId, CandidateEvent, CommittedCandidateReceipt, CoreIndex, CoreOccupied, @@ -340,8 +340,6 @@ where CandidateEvent::CandidateTimedOut(c, h, core), // Not needed for candidate events. RawEvent::::UpwardMessagesReceived { .. } => return None, - // FAIL-CI: correct? - RawEvent::::DownwardMessagesReceived { .. } => return None, RawEvent::::__Ignore(_, _) => unreachable!("__Ignore cannot be used"), }) }) @@ -353,12 +351,12 @@ pub fn session_info(index: SessionIndex) -> Option>::session_info(index) } -// Implementation for the `dmq_contents` function of the runtime API. -//pub fn dmq_contents( -// recipient: ParaId, -//) -> Vec> { -// >::dmq_contents(recipient) -//} +/// Implementation for the `dmq_contents` function of the runtime API. +pub fn dmq_contents( + recipient: ParaId, +) -> Vec> { + >::dmq_contents(recipient) +} /// Implementation for the `inbound_hrmp_channels_contents` function of the runtime API. pub fn inbound_hrmp_channels_contents( diff --git a/runtime/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index 8f75c1039900..07b821edc9df 100644 --- a/runtime/polkadot/Cargo.toml +++ b/runtime/polkadot/Cargo.toml @@ -16,74 +16,74 @@ serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" smallvec = "1.8.0" -authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -beefy-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, package = "sp-beefy" , branch = "oty-mp-queue" } -block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-version = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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, 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 } +tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-bags-list = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-bounties = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-child-bounties = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-im-online = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-indices = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-message-queue = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-offences = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-system = {git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +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-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-message-queue = { 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-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-nomination-pools-runtime-api = { 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 } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-system = {git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } polkadot-runtime-constants = { package = "polkadot-runtime-constants", path = "./constants", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-tips = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-tips = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } hex-literal = { version = "0.3.4", optional = true } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false } @@ -97,16 +97,16 @@ xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default [dev-dependencies] hex-literal = "0.3.4" tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-trie = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +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" separator = "0.4.1" -remote-externalities = { git = "https://github.com/paritytech/substrate", package = "frame-remote-externalities" , branch = "oty-mp-queue" } +remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } tokio = { version = "1.24.1", features = ["macros"] } -sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = ["std"] diff --git a/runtime/polkadot/constants/Cargo.toml b/runtime/polkadot/constants/Cargo.toml index 123e651f9ee8..ad8159e7463d 100644 --- a/runtime/polkadot/constants/Cargo.toml +++ b/runtime/polkadot/constants/Cargo.toml @@ -7,12 +7,12 @@ edition.workspace = true [dependencies] smallvec = "1.8.0" -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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", default-features = false , branch = "oty-mp-queue" } -sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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"] diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index fbe28cf73e16..4498781a375e 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -28,7 +28,7 @@ use runtime_common::{ use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, - hrmp as parachains_hrmp, inclusion as parachains_inclusion, + dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::v2 as parachains_runtime_api_impl, scheduler as parachains_scheduler, @@ -1302,14 +1302,11 @@ impl sp_runtime::traits::Convert xcm::latest::Junction { - let parachains_inclusion::MessageOrigin::MQ(queue) = o else { - unreachable!("Wrong origin type"); - }; - match queue { - parachains_inclusion::SubQueue::UMP { from } => - xcm::latest::Junction::Parachain(from.into()), - parachains_inclusion::SubQueue::DMP { to } => - xcm::latest::Junction::Parachain(to.into()), + match o { + parachains_inclusion::MessageOrigin { + para, + queue: parachains_inclusion::SubQueue::UMP, + } => xcm::latest::Junction::Parachain(para.into()), // FAIL-CI: Should be similar for the other *MP queues but check this as a TODO _ => todo!(), } @@ -1339,31 +1336,12 @@ impl pallet_message_queue::Config for Runtime { type WeightInfo = (); // FAIL-CI: TODO } -use frame_support::traits::TransformOrigin; -use primitives::HrmpChannelId; -use runtime_parachains::inclusion::{DmpLink, HrmpToMessageOriginConverter, MessageOrigin}; - -// FAIL-CI clean this up -pub struct MockedQueueIntrospect; -impl frame_support::traits::QueueIntrospect for MockedQueueIntrospect { - type MaxMessageLen = pallet_message_queue::MaxMessageLenOf; - - fn messages( - origin: HrmpChannelId, - ) -> Result>, ()> { - Err(()) - } -} +impl parachains_dmp::Config for Runtime {} impl parachains_hrmp::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; type Currency = Balances; - type MessageQueue = - TransformOrigin; - type MessageQueueReader = MockedQueueIntrospect; // FAIL-CI only needed for runtime-API - // The inclusion pallet manages the DMP queue. - type DmpLink = ParaInclusion; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; } @@ -1602,7 +1580,7 @@ construct_runtime! { ParaScheduler: parachains_scheduler::{Pallet, Storage} = 55, Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, - // Dmp 58 + Dmp: parachains_dmp::{Pallet, Call, Storage} = 58, // Ump 59 Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, @@ -1872,8 +1850,7 @@ sp_api::impl_runtime_apis! { } fn dmq_contents(recipient: ParaId) -> Vec> { - //parachains_runtime_api_impl::dmq_contents::(recipient) - unimplemented!() // FAIL-CI + parachains_runtime_api_impl::dmq_contents::(recipient) } fn inbound_hrmp_channels_contents( diff --git a/runtime/polkadot/src/weights/mod.rs b/runtime/polkadot/src/weights/mod.rs index d8f8bda90dd6..99c2b1b52109 100644 --- a/runtime/polkadot/src/weights/mod.rs +++ b/runtime/polkadot/src/weights/mod.rs @@ -56,3 +56,4 @@ pub mod runtime_parachains_hrmp; pub mod runtime_parachains_initializer; pub mod runtime_parachains_paras; pub mod runtime_parachains_paras_inherent; +pub mod runtime_parachains_ump; diff --git a/runtime/polkadot/src/weights/runtime_parachains_ump.rs b/runtime/polkadot/src/weights/runtime_parachains_ump.rs new file mode 100644 index 000000000000..8f1eb2d54749 --- /dev/null +++ b/runtime/polkadot/src/weights/runtime_parachains_ump.rs @@ -0,0 +1,74 @@ +// 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 `runtime_parachains::ump` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-01-16, 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: +// /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=runtime_parachains::ump +// --chain=polkadot-dev +// --header=./file_header.txt +// --output=./runtime/polkadot/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 `runtime_parachains::ump`. +pub struct WeightInfo(PhantomData); +impl runtime_parachains::ump::WeightInfo for WeightInfo { + /// The range of component `s` is `[0, 51200]`. + fn process_upward_message(s: u32, ) -> Weight { + // Minimum execution time: 10_291 nanoseconds. + Weight::from_ref_time(4_272_368) + // Standard Error: 12 + .saturating_add(Weight::from_ref_time(1_872).saturating_mul(s.into())) + } + // 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 { + // Minimum execution time: 9_837 nanoseconds. + Weight::from_ref_time(9_951_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: Ump Overweight (r:1 w:1) + // Storage: Ump CounterForOverweight (r:1 w:1) + fn service_overweight() -> Weight { + // Minimum execution time: 29_540 nanoseconds. + Weight::from_ref_time(29_889_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/runtime/rococo/Cargo.toml b/runtime/rococo/Cargo.toml index ac9263fcd3cc..2b944a508f8f 100644 --- a/runtime/rococo/Cargo.toml +++ b/runtime/rococo/Cargo.toml @@ -14,71 +14,71 @@ serde_derive = { version = "1.0.117", optional = true } static_assertions = "1.1.0" smallvec = "1.8.0" -authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -beefy-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, package = "sp-beefy" , branch = "oty-mp-queue" } -beefy-merkle-tree = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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, 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", default-features = false , branch = "oty-mp-queue" } -inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-version = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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 } +sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-beefy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-bounties = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-child-bounties = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-state-trie-migration = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-im-online = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-indices = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-mmr = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-nis = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-offences = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-recovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-society = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-system = {git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-tips = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-beefy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-state-trie-migration = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +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-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 } +pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-society = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-system = {git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-tips = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false } pallet-xcm-benchmarks = { path = "../../xcm/pallet-xcm-benchmarks", default-features = false, optional = true } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } hex-literal = { version = "0.3.4" } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false } @@ -92,16 +92,16 @@ xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default [dev-dependencies] tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -remote-externalities = { git = "https://github.com/paritytech/substrate", package = "frame-remote-externalities" , branch = "oty-mp-queue" } -sp-trie = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" } +remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } +sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } separator = "0.4.1" serde_json = "1.0.81" -sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } tokio = { version = "1.24.1", features = ["macros"] } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = ["std"] diff --git a/runtime/rococo/constants/Cargo.toml b/runtime/rococo/constants/Cargo.toml index bb7e0b9f8a3d..9383a9de6c68 100644 --- a/runtime/rococo/constants/Cargo.toml +++ b/runtime/rococo/constants/Cargo.toml @@ -7,12 +7,12 @@ edition.workspace = true [dependencies] smallvec = "1.8.0" -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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", default-features = false , branch = "oty-mp-queue" } -sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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"] diff --git a/runtime/test-runtime/Cargo.toml b/runtime/test-runtime/Cargo.toml index 5de89c660e91..e32107a69b48 100644 --- a/runtime/test-runtime/Cargo.toml +++ b/runtime/test-runtime/Cargo.toml @@ -15,44 +15,44 @@ serde = { version = "1.0.139", default-features = false } serde_derive = { version = "1.0.117", optional = true } smallvec = "1.8.0" -authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -beefy-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, package = "sp-beefy" , branch = "oty-mp-queue" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-version = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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, 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 } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-indices = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-offences = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-system = {git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { 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-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-system = {git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } test-runtime-constants = { package = "test-runtime-constants", path = "./constants", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false } primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false } @@ -66,12 +66,12 @@ xcm = { path = "../../xcm", default-features = false } [dev-dependencies] hex-literal = "0.3.4" tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-trie = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +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" [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = ["std"] diff --git a/runtime/test-runtime/constants/Cargo.toml b/runtime/test-runtime/constants/Cargo.toml index c39765c313d9..d96de0a0f9c1 100644 --- a/runtime/test-runtime/constants/Cargo.toml +++ b/runtime/test-runtime/constants/Cargo.toml @@ -7,12 +7,12 @@ edition.workspace = true [dependencies] smallvec = "1.8.0" -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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", default-features = false , branch = "oty-mp-queue" } -sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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"] diff --git a/runtime/westend/Cargo.toml b/runtime/westend/Cargo.toml index ecdb5abd9833..024a8f3e89c0 100644 --- a/runtime/westend/Cargo.toml +++ b/runtime/westend/Cargo.toml @@ -15,75 +15,75 @@ serde = { version = "1.0.139", default-features = false } serde_derive = { version = "1.0.117", optional = true } smallvec = "1.8.0" -authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -beefy-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, package = "sp-beefy" , branch = "oty-mp-queue" } -inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-version = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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, 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 } +sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } westend-runtime-constants = { package = "westend-runtime-constants", path = "./constants", default-features = false } -pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-bags-list = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-democracy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-im-online = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-indices = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-membership = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-multisig = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-offences = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-proxy = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-recovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-society = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-staking-reward-curve = { package = "pallet-staking-reward-curve", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-state-trie-migration = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-vesting = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-bags-list = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-fast-unstake = { 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-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-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-society = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-staking-reward-curve = { package = "pallet-staking-reward-curve", git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-state-trie-migration = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false } pallet-xcm-benchmarks = { path = "../../xcm/pallet-xcm-benchmarks", default-features = false, optional = true } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } hex-literal = { version = "0.3.4", optional = true } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false } @@ -98,15 +98,15 @@ xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default [dev-dependencies] hex-literal = "0.3.4" tiny-keccak = { version = "2.0.2", features = ["keccak"] } -keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-trie = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +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", package = "frame-remote-externalities" , branch = "oty-mp-queue" } +remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master", package = "frame-remote-externalities" } tokio = { version = "1.24.1", features = ["macros"] } -sp-tracing = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = ["std"] diff --git a/runtime/westend/constants/Cargo.toml b/runtime/westend/constants/Cargo.toml index 4becf57e4f95..c6fac15dca32 100644 --- a/runtime/westend/constants/Cargo.toml +++ b/runtime/westend/constants/Cargo.toml @@ -7,12 +7,12 @@ edition.workspace = true [dependencies] smallvec = "1.8.0" -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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", default-features = false , branch = "oty-mp-queue" } -sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +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"] diff --git a/statement-table/Cargo.toml b/statement-table/Cargo.toml index 7663e092ba2f..81f2f90e0998 100644 --- a/statement-table/Cargo.toml +++ b/statement-table/Cargo.toml @@ -6,5 +6,5 @@ edition.workspace = true [dependencies] parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } primitives = { package = "polkadot-primitives", path = "../primitives" } diff --git a/utils/generate-bags/Cargo.toml b/utils/generate-bags/Cargo.toml index 7bbb2ff9b23b..2038dc94a1ea 100644 --- a/utils/generate-bags/Cargo.toml +++ b/utils/generate-bags/Cargo.toml @@ -7,8 +7,8 @@ edition.workspace = true [dependencies] clap = { version = "4.0.9", features = ["derive"] } -generate-bags = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +generate-bags = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } westend-runtime = { path = "../../runtime/westend" } kusama-runtime = { path = "../../runtime/kusama" } diff --git a/utils/remote-ext-tests/bags-list/Cargo.toml b/utils/remote-ext-tests/bags-list/Cargo.toml index eb9b611c4e16..f8b08767f898 100644 --- a/utils/remote-ext-tests/bags-list/Cargo.toml +++ b/utils/remote-ext-tests/bags-list/Cargo.toml @@ -12,10 +12,10 @@ polkadot-runtime-constants = { path = "../../../runtime/polkadot/constants" } kusama-runtime-constants = { path = "../../../runtime/kusama/constants" } westend-runtime-constants = { path = "../../../runtime/westend/constants" } -pallet-bags-list-remote-tests = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-bags-list-remote-tests = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } clap = { version = "4.0.9", features = ["derive"] } log = "0.4.17" diff --git a/utils/staking-miner/Cargo.toml b/utils/staking-miner/Cargo.toml index 0ecf02c2f96c..20d19451489a 100644 --- a/utils/staking-miner/Cargo.toml +++ b/utils/staking-miner/Cargo.toml @@ -15,22 +15,22 @@ serde = "1.0.137" serde_json = "1.0" thiserror = "1.0.31" tokio = { version = "1.24.1", features = ["macros", "rt-multi-thread", "sync"] } -remote-externalities = { git = "https://github.com/paritytech/substrate", package = "frame-remote-externalities" , branch = "oty-mp-queue" } +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 = "oty-mp-queue" } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-npos-elections = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master" } core-primitives = { package = "polkadot-core-primitives", path = "../../core-primitives" } diff --git a/xcm/Cargo.toml b/xcm/Cargo.toml index e1ac1ad1e319..d66e25748bce 100644 --- a/xcm/Cargo.toml +++ b/xcm/Cargo.toml @@ -11,13 +11,13 @@ impl-trait-for-tuples = "0.2.2" log = { version = "0.4.17", default-features = false } parity-scale-codec = { version = "3.1.5", default-features = false, features = [ "derive", "max-encoded-len" ] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-weights = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } serde = { version = "1.0.136", optional = true, features = ["derive"] } xcm-procedural = { path = "procedural" } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = ["std"] diff --git a/xcm/pallet-xcm-benchmarks/Cargo.toml b/xcm/pallet-xcm-benchmarks/Cargo.toml index db902c8755a3..6999f6aaffb2 100644 --- a/xcm/pallet-xcm-benchmarks/Cargo.toml +++ b/xcm/pallet-xcm-benchmarks/Cargo.toml @@ -10,22 +10,22 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } +frame-support = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } +frame-system = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } +sp-runtime = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } +sp-std = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } +sp-io = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } xcm-executor = { path = "../xcm-executor", default-features = false } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } +frame-benchmarking = { default-features = false, branch = "master", git = "https://github.com/paritytech/substrate" } xcm = { path = "..", default-features = false } xcm-builder = { path = "../xcm-builder", default-features = false } log = "0.4.17" [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } -pallet-assets = { git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } -sp-tracing = { git = "https://github.com/paritytech/substrate" , branch = "oty-mp-queue" } +pallet-balances = { branch = "master", git = "https://github.com/paritytech/substrate" } +pallet-assets = { branch = "master", git = "https://github.com/paritytech/substrate" } +sp-core = { branch = "master", git = "https://github.com/paritytech/substrate" } +sp-tracing = { branch = "master", git = "https://github.com/paritytech/substrate" } xcm = { path = ".." } # temp pallet-xcm = { path = "../pallet-xcm" } diff --git a/xcm/pallet-xcm/Cargo.toml b/xcm/pallet-xcm/Cargo.toml index f3bd3f8f07d2..1b9de5fd5d44 100644 --- a/xcm/pallet-xcm/Cargo.toml +++ b/xcm/pallet-xcm/Cargo.toml @@ -11,19 +11,19 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.137", optional = true, features = ["derive"] } log = { version = "0.4.17", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "oty-mp-queue" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "oty-mp-queue" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "oty-mp-queue" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } xcm = { path = "..", default-features = false } xcm-executor = { path = "../xcm-executor", default-features = false } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-runtime-parachains = { path = "../../runtime/parachains" } polkadot-parachain = { path = "../../parachain" } xcm-builder = { path = "../xcm-builder" } diff --git a/xcm/xcm-builder/Cargo.toml b/xcm/xcm-builder/Cargo.toml index a7bdfa970ac9..d1b0cd5ecbbd 100644 --- a/xcm/xcm-builder/Cargo.toml +++ b/xcm/xcm-builder/Cargo.toml @@ -11,22 +11,22 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } xcm = { path = "..", default-features = false } xcm-executor = { path = "../xcm-executor", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-weights = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } log = { version = "0.4.17", default-features = false } # Polkadot dependencies polkadot-parachain = { path = "../../parachain", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-xcm = { path = "../pallet-xcm" } polkadot-runtime-parachains = { path = "../../runtime/parachains" } assert_matches = "1.5.0" diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index e67044b6b492..5d2b33a1b169 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -16,10 +16,7 @@ //! Implementation of `ProcessMessage` for an `ExecuteXcm` implementation. -use frame_support::{ - ensure, - traits::{ProcessMessage, ProcessMessageError}, -}; +use frame_support::traits::{ProcessMessage, ProcessMessageError}; use parity_scale_codec::{Decode, FullCodec, MaxEncodedLen}; use scale_info::TypeInfo; use sp_io::hashing::blake2_256; @@ -43,22 +40,33 @@ impl< fn process_message( message: &[u8], origin: Self::Origin, - weight_limit: Weight, + _weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { - let hash = blake2_256(message); + let _hash = blake2_256(message); let versioned_message = VersionedXcm::::decode(&mut &message[..]) .map_err(|_| ProcessMessageError::Corrupt)?; let message = Xcm::::try_from(versioned_message) .map_err(|_| ProcessMessageError::Unsupported)?; - let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; - let weight = pre.weight_of(); + // FIXME: Needs XCMv3 for pre-dispatch message weight extraction + // + /* let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; + let weight = Weight::from_ref_time(pre.weight_of()); ensure!(weight.all_lte(weight_limit), ProcessMessageError::Overweight(weight)); - // FAIL-CI why max? - match XcmExecutor::execute(MessageToDispatchOrigin::convert(origin), pre, hash, Weight::MAX) - { - Outcome::Complete(w) => Ok((true, w)), - Outcome::Incomplete(w, _) => Ok((false, w)), + match XcmExecutor::execute(origin.into(), pre, hash, 0) { + Outcome::Complete(w) => Ok((true, Weight::from_ref_time(w))), + Outcome::Incomplete(w, _) => Ok((false, Weight::from_ref_time(w))), Outcome::Error(_) => Err(ProcessMessageError::Unsupported), + }*/ + // Do not merge this… + let outcome = XcmExecutor::execute_xcm( + MessageToDispatchOrigin::convert(origin).into(), + message, + u64::MAX, + ); + match outcome { + Outcome::Error(XcmError::WeightLimitReached(_required)) => + Err(ProcessMessageError::Unsupported), + _outcome => Ok((true, Weight::MAX)), } } } diff --git a/xcm/xcm-executor/Cargo.toml b/xcm/xcm-executor/Cargo.toml index ef93699d3327..ecbff92a46ec 100644 --- a/xcm/xcm-executor/Cargo.toml +++ b/xcm/xcm-executor/Cargo.toml @@ -10,15 +10,15 @@ impl-trait-for-tuples = "0.2.2" environmental = { version = "1.1.4", default-features = false } parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] } xcm = { path = "..", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-weights = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-weights = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } log = { version = "0.4.17", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "oty-mp-queue" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false, optional = true } [features] default = ["std"] diff --git a/xcm/xcm-executor/integration-tests/Cargo.toml b/xcm/xcm-executor/integration-tests/Cargo.toml index ca77978bf714..4fff3952a05d 100644 --- a/xcm/xcm-executor/integration-tests/Cargo.toml +++ b/xcm/xcm-executor/integration-tests/Cargo.toml @@ -6,20 +6,20 @@ edition.workspace = true version.workspace = true [dependencies] -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } futures = "0.3.21" pallet-xcm = { path = "../../pallet-xcm" } polkadot-test-client = { path = "../../../node/test/client" } polkadot-test-runtime = { path = "../../../runtime/test-runtime" } polkadot-test-service = { path = "../../../node/test/service" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "oty-mp-queue" } -sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "master" } xcm = { path = "../..", default-features = false } xcm-executor = { path = ".." } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] default = ["std"] diff --git a/xcm/xcm-simulator/Cargo.toml b/xcm/xcm-simulator/Cargo.toml index 52ef2ffc9334..b18b709dbbf3 100644 --- a/xcm/xcm-simulator/Cargo.toml +++ b/xcm/xcm-simulator/Cargo.toml @@ -9,9 +9,9 @@ edition.workspace = true codec = { package = "parity-scale-codec", version = "3.0.0" } paste = "1.0.7" -frame-support = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master" } xcm = { path = "../" } xcm-executor = { path = "../xcm-executor" } diff --git a/xcm/xcm-simulator/example/Cargo.toml b/xcm/xcm-simulator/example/Cargo.toml index cd246d6bf67f..54db1b731ca1 100644 --- a/xcm/xcm-simulator/example/Cargo.toml +++ b/xcm/xcm-simulator/example/Cargo.toml @@ -10,15 +10,15 @@ codec = { package = "parity-scale-codec", version = "3.0.0" } scale-info = { version = "2.1.2", features = ["derive"] } log = { version = "0.4.14", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } xcm = { path = "../../" } xcm-simulator = { path = "../" } diff --git a/xcm/xcm-simulator/fuzzer/Cargo.toml b/xcm/xcm-simulator/fuzzer/Cargo.toml index 4483e61c47c7..25767fb429b0 100644 --- a/xcm/xcm-simulator/fuzzer/Cargo.toml +++ b/xcm/xcm-simulator/fuzzer/Cargo.toml @@ -10,13 +10,13 @@ codec = { package = "parity-scale-codec", version = "3.0.0" } honggfuzz = "0.5.55" scale-info = { version = "2.1.2", features = ["derive"] } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "oty-mp-queue" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } xcm = { path = "../../" } xcm-simulator = { path = "../" } From 02bf965f75d42268084249a98e8e7679fa1d97e8 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 1 Feb 2023 21:00:24 +0100 Subject: [PATCH 050/182] Revert "DNM: Temporarily comment code since XCMv3 is not merged yet" This reverts commit 130a48abdb83ca6a224c39b59b55462c11eeee7a. --- xcm/xcm-builder/src/process_xcm_message.rs | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index 5d2b33a1b169..dc2878c55c26 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -40,33 +40,20 @@ impl< fn process_message( message: &[u8], origin: Self::Origin, - _weight_limit: Weight, + weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { - let _hash = blake2_256(message); + let hash = blake2_256(message); let versioned_message = VersionedXcm::::decode(&mut &message[..]) .map_err(|_| ProcessMessageError::Corrupt)?; let message = Xcm::::try_from(versioned_message) .map_err(|_| ProcessMessageError::Unsupported)?; - // FIXME: Needs XCMv3 for pre-dispatch message weight extraction - // - /* let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; + let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; let weight = Weight::from_ref_time(pre.weight_of()); ensure!(weight.all_lte(weight_limit), ProcessMessageError::Overweight(weight)); match XcmExecutor::execute(origin.into(), pre, hash, 0) { Outcome::Complete(w) => Ok((true, Weight::from_ref_time(w))), Outcome::Incomplete(w, _) => Ok((false, Weight::from_ref_time(w))), Outcome::Error(_) => Err(ProcessMessageError::Unsupported), - }*/ - // Do not merge this… - let outcome = XcmExecutor::execute_xcm( - MessageToDispatchOrigin::convert(origin).into(), - message, - u64::MAX, - ); - match outcome { - Outcome::Error(XcmError::WeightLimitReached(_required)) => - Err(ProcessMessageError::Unsupported), - _outcome => Ok((true, Weight::MAX)), } } } From 11745adebcad12f09489b4a06e8738659e794411 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 1 Feb 2023 21:43:53 +0100 Subject: [PATCH 051/182] Make compile Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 537 +++++++++++++-------- runtime/parachains/src/inclusion/mod.rs | 43 +- runtime/polkadot/src/lib.rs | 53 +- xcm/xcm-builder/src/process_xcm_message.rs | 19 +- 4 files changed, 378 insertions(+), 274 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cad29e3b3f94..2d8e5c84016d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -455,7 +455,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "async-trait", @@ -489,7 +489,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "beefy-gadget", "futures", @@ -508,7 +508,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "sp-api", "sp-beefy", @@ -543,6 +543,21 @@ dependencies = [ "shlex", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" @@ -1322,7 +1337,7 @@ dependencies = [ "cfg-if", "crossbeam-utils", "lazy_static", - "memoffset", + "memoffset 0.6.4", "scopeguard", ] @@ -1635,6 +1650,17 @@ dependencies = [ "syn", ] +[[package]] +name = "derive-syn-parse" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "derive_builder" version = "0.11.2" @@ -2280,7 +2306,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", ] @@ -2304,9 +2330,10 @@ checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", + "frame-support-procedural", "frame-system", "linregress", "log", @@ -2322,12 +2349,13 @@ dependencies = [ "sp-runtime-interface", "sp-std", "sp-storage", + "static_assertions", ] [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "Inflector", "array-bytes", @@ -2374,7 +2402,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2385,7 +2413,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2402,7 +2430,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -2431,7 +2459,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "log", @@ -2447,7 +2475,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "bitflags", "frame-metadata", @@ -2479,10 +2507,11 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "Inflector", "cfg-expr", + "derive-syn-parse", "frame-support-procedural-tools", "itertools", "proc-macro2", @@ -2493,7 +2522,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2505,7 +2534,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro2", "quote", @@ -2515,8 +2544,9 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ + "frame-benchmarking", "frame-support", "frame-support-test-pallet", "frame-system", @@ -2538,7 +2568,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -2549,7 +2579,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "log", @@ -2567,7 +2597,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -2582,7 +2612,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "sp-api", @@ -2591,7 +2621,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "parity-scale-codec", @@ -2762,7 +2792,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "chrono", "frame-election-provider-support", @@ -4421,6 +4451,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + [[package]] name = "memory-db" version = "0.31.0" @@ -4506,7 +4545,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "log", @@ -4525,7 +4564,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "anyhow", "jsonrpsee", @@ -4783,7 +4822,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "memoffset", + "memoffset 0.6.4", ] [[package]] @@ -4795,7 +4834,21 @@ dependencies = [ "bitflags", "cfg-if", "libc", - "memoffset", + "memoffset 0.6.4", +] + +[[package]] +name = "nix" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +dependencies = [ + "bitflags", + "cfg-if", + "libc", + "memoffset 0.7.1", + "pin-utils", + "static_assertions", ] [[package]] @@ -5076,7 +5129,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5091,7 +5144,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5107,14 +5160,13 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-authorship", "sp-runtime", "sp-std", ] @@ -5122,7 +5174,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5146,7 +5198,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5166,7 +5218,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5185,7 +5237,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5200,7 +5252,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5216,7 +5268,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "beefy-merkle-tree", @@ -5239,7 +5291,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5257,7 +5309,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5276,7 +5328,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5293,7 +5345,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5310,7 +5362,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5328,7 +5380,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5351,7 +5403,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5364,7 +5416,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5382,7 +5434,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5400,7 +5452,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5423,7 +5475,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5439,7 +5491,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5459,7 +5511,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5476,7 +5528,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5490,10 +5542,29 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-message-queue" +version = "7.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", +] + [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5510,7 +5581,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5526,7 +5597,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5542,7 +5613,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5559,7 +5630,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5579,7 +5650,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "sp-api", @@ -5589,7 +5660,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5606,7 +5677,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5630,7 +5701,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5647,7 +5718,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5662,7 +5733,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5680,7 +5751,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5695,7 +5766,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5714,7 +5785,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5731,7 +5802,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5752,7 +5823,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5768,7 +5839,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5782,7 +5853,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5805,7 +5876,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5816,7 +5887,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "log", "sp-arithmetic", @@ -5825,7 +5896,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5842,7 +5913,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5856,7 +5927,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5874,7 +5945,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5893,7 +5964,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5909,7 +5980,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5925,7 +5996,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5937,7 +6008,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5954,7 +6025,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5969,7 +6040,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5985,7 +6056,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -6000,7 +6071,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -7348,6 +7419,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7505,6 +7577,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -7513,6 +7586,7 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-runtime-metrics", + "proptest", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", @@ -8114,6 +8188,26 @@ dependencies = [ "regex", ] +[[package]] +name = "proptest" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" +dependencies = [ + "bit-set", + "bitflags", + "byteorder", + "lazy_static", + "num-traits", + "quick-error 2.0.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax", + "rusty-fork", + "tempfile", +] + [[package]] name = "prost" version = "0.11.0" @@ -8348,6 +8442,15 @@ dependencies = [ "rand_core 0.6.3", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.3", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -8863,6 +8966,18 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error 1.2.3", + "tempfile", + "wait-timeout", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -8892,7 +9007,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "log", "sp-core", @@ -8903,7 +9018,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures", @@ -8930,7 +9045,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "futures-timer", @@ -8953,7 +9068,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8969,7 +9084,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -8984,7 +9099,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8995,7 +9110,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "chrono", @@ -9035,7 +9150,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "fnv", "futures", @@ -9061,7 +9176,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "hash-db", "kvdb", @@ -9087,7 +9202,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures", @@ -9112,7 +9227,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "fork-tree", @@ -9150,7 +9265,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "jsonrpsee", @@ -9172,7 +9287,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9185,7 +9300,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures", @@ -9208,7 +9323,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -9232,7 +9347,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9245,7 +9360,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "log", "sc-allocator", @@ -9258,7 +9373,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "cfg-if", "libc", @@ -9275,9 +9390,9 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ - "ahash 0.7.6", + "ahash 0.8.2", "array-bytes", "async-trait", "dyn-clone", @@ -9315,7 +9430,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "finality-grandpa", "futures", @@ -9335,7 +9450,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "ansi_term", "futures", @@ -9350,7 +9465,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "async-trait", @@ -9365,7 +9480,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "async-trait", @@ -9407,7 +9522,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "cid", "futures", @@ -9426,7 +9541,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "bitflags", @@ -9452,9 +9567,9 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ - "ahash 0.7.6", + "ahash 0.8.2", "futures", "futures-timer", "libp2p", @@ -9470,7 +9585,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "futures", @@ -9491,7 +9606,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "async-trait", @@ -9523,7 +9638,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "futures", @@ -9542,7 +9657,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "bytes", @@ -9572,7 +9687,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "libp2p", @@ -9585,7 +9700,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9594,7 +9709,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "jsonrpsee", @@ -9624,7 +9739,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9643,7 +9758,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "http", "jsonrpsee", @@ -9658,7 +9773,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "futures", @@ -9684,7 +9799,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "directories", @@ -9715,6 +9830,7 @@ dependencies = [ "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", + "sc-storage-monitor", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -9749,7 +9865,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "log", "parity-scale-codec", @@ -9757,10 +9873,26 @@ dependencies = [ "sp-core", ] +[[package]] +name = "sc-storage-monitor" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +dependencies = [ + "clap 4.0.15", + "futures", + "log", + "nix 0.26.2", + "sc-client-db", + "sc-utils", + "sp-core", + "thiserror", + "tokio", +] + [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9779,7 +9911,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "libc", @@ -9798,7 +9930,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "chrono", "futures", @@ -9817,7 +9949,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "ansi_term", "atty", @@ -9848,7 +9980,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9859,7 +9991,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures", @@ -9886,7 +10018,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures", @@ -9900,7 +10032,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "backtrace", "futures", @@ -10407,7 +10539,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "hash-db", "log", @@ -10425,7 +10557,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "blake2", "proc-macro-crate", @@ -10437,7 +10569,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10450,7 +10582,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "integer-sqrt", "num-traits", @@ -10464,7 +10596,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10474,22 +10606,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-authorship" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" -dependencies = [ - "async-trait", - "parity-scale-codec", - "sp-inherents", - "sp-runtime", - "sp-std", -] - [[package]] name = "sp-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10506,7 +10626,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "sp-api", @@ -10518,7 +10638,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "log", @@ -10536,7 +10656,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures", @@ -10554,7 +10674,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "merlin", @@ -10577,7 +10697,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10589,7 +10709,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10602,7 +10722,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "base58", @@ -10644,7 +10764,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "blake2", "byteorder", @@ -10658,7 +10778,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro2", "quote", @@ -10669,7 +10789,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10678,7 +10798,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro2", "quote", @@ -10688,7 +10808,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "environmental", "parity-scale-codec", @@ -10699,7 +10819,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "finality-grandpa", "log", @@ -10717,7 +10837,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10731,7 +10851,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "bytes", "ed25519", @@ -10756,7 +10876,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "lazy_static", "sp-core", @@ -10767,7 +10887,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures", @@ -10784,7 +10904,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "thiserror", "zstd", @@ -10793,7 +10913,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -10811,7 +10931,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10825,7 +10945,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "sp-api", "sp-core", @@ -10835,7 +10955,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "backtrace", "lazy_static", @@ -10845,7 +10965,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "rustc-hash", "serde", @@ -10855,7 +10975,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "either", "hash256-std-hasher", @@ -10877,7 +10997,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10895,7 +11015,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "Inflector", "proc-macro-crate", @@ -10907,7 +11027,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10921,7 +11041,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10933,7 +11053,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "hash-db", "log", @@ -10953,12 +11073,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10971,7 +11091,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures-timer", @@ -10986,7 +11106,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "sp-std", @@ -10998,7 +11118,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "sp-api", "sp-runtime", @@ -11007,7 +11127,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "log", @@ -11023,18 +11143,18 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ - "ahash 0.7.6", + "ahash 0.8.2", "hash-db", "hashbrown 0.12.3", "lazy_static", - "lru 0.8.1", "memory-db", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", "scale-info", + "schnellru", "sp-core", "sp-std", "thiserror", @@ -11046,7 +11166,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11063,7 +11183,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11074,7 +11194,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "impl-trait-for-tuples", "log", @@ -11087,7 +11207,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -11320,7 +11440,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "platforms", ] @@ -11328,7 +11448,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11347,7 +11467,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "hyper", "log", @@ -11359,7 +11479,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "jsonrpsee", @@ -11372,7 +11492,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "jsonrpsee", "log", @@ -11391,7 +11511,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "async-trait", @@ -11417,7 +11537,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11427,7 +11547,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11438,7 +11558,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "ansi_term", "build-helper", @@ -12239,7 +12359,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#355e4a9c87f85637185c0852bda9aeb3db404b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "clap 4.0.15", "frame-remote-externalities", @@ -12335,7 +12455,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.3", - "rand 0.7.3", + "rand 0.8.5", "static_assertions", ] @@ -12637,9 +12757,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.110.2" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68e8037b4daf711393f4be2056246d12d975651b14d581520ad5d1f19219cec" +checksum = "84a303793cbc01fb96551badfc7367db6007396bba6bac97936b3c8b6f7fdb41" dependencies = [ "anyhow", "libc", @@ -12653,9 +12773,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.110.2" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91adbad477e97bba3fbd21dd7bfb594e7ad5ceb9169ab1c93ab9cb0ada636b6f" +checksum = "d9c9deb56f8a9f2ec177b3bd642a8205621835944ed5da55f2388ef216aca5a4" dependencies = [ "anyhow", "cxx", @@ -12665,9 +12785,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.110.2" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4fa5a322a4e6ac22fd141f498d56afbdbf9df5debeac32380d2dcaa3e06941" +checksum = "4432e28b542738a9776cedf92e8a99d8991c7b4667ee2c7ccddfb479dd2856a7" dependencies = [ "anyhow", "cc", @@ -12880,7 +13000,7 @@ dependencies = [ "log", "mach", "memfd", - "memoffset", + "memoffset 0.6.4", "paste", "rand 0.8.5", "rustix", @@ -13630,6 +13750,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", "xcm", "xcm-executor", ] diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 1465b6bf478c..ff1fe65fa005 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -213,31 +213,13 @@ pub fn minimum_backing_votes(n_validators: usize) -> usize { sp_std::cmp::min(n_validators, 2) } -/// Divides the [`Config::MessageQueue`] into sub queues which are serviced in a round-robin fashion. +/// The queues of the [Config::MessageQueue]. /// -/// NOTE Ideally we want the queue pallet to be sub-queue aware since currently we waste PoV by introducing a lot of few-element queues by doing this. -/// -/// Changing this requires a migration of the queue pallet. -#[derive(Encode, Decode, Clone, Copy, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] -pub enum SubQueue { - UMP, - HRMP, - DMP, -} - -/// Over which `queue` and `from` which para-chain a message came in from. -/// -/// Changing this requires a migration of the queue pallet. +/// Changes to this necessitate a migration. #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] -pub struct MessageOrigin { - pub queue: SubQueue, - pub para: ParaId, -} - -impl MessageOrigin { - pub const fn ump(para: ParaId) -> Self { - Self { queue: SubQueue::UMP, para } - } +pub enum ProcessQueue { + /// UMP messages from `inner` awaiting dispatch. + UMP(ParaId), } #[frame_support::pallet] @@ -265,8 +247,8 @@ pub mod pallet { /// The system message queue. /// - /// The message queue provides general queueing and processing functionality. Currently it replaces the old `UMP`, `HRMP` and `DMP` queue pallets. Since it provides a very generic kind of service; other use-cases can be implemented as well. - type MessageQueue: EnqueueMessage; + /// The message queue provides general queueing and processing functionality. Currently it replaces the old `UMP` dispatch queue. Other use-cases can be implemented as well. + type MessageQueue: EnqueueMessage; } #[pallet::event] @@ -929,7 +911,7 @@ impl Pallet { }) } - let fp = T::MessageQueue::footprint(MessageOrigin::ump(para)); + let fp = T::MessageQueue::footprint(ProcessQueue::UMP(para)); let (para_queue_count, mut para_queue_size) = (fp.count, fp.size); if para_queue_count @@ -983,7 +965,7 @@ impl Pallet { let count = upward_messages.len() as u32; Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); let messages = upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); - T::MessageQueue::enqueue_messages(messages, MessageOrigin::ump(para)); + T::MessageQueue::enqueue_messages(messages, ProcessQueue::UMP(para)); ::WeightInfo::receive_upward_messages(count) } @@ -1117,10 +1099,10 @@ impl AcceptanceCheckErr { } } -impl OnQueueChanged for Pallet { - fn on_queue_changed(queue: MessageOrigin, count: u64, size: u64) { +impl OnQueueChanged for Pallet { + fn on_queue_changed(queue: ProcessQueue, count: u64, size: u64) { match queue { - MessageOrigin { queue: SubQueue::UMP, para } => { + ProcessQueue::UMP(para) => { // TODO maybe migrate this to u64 let (count, size) = (count.saturated_into(), size.saturated_into()); // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` @@ -1133,7 +1115,6 @@ impl OnQueueChanged for Pallet { well_known_keys::relay_dispatch_queue_remaining_capacity(para) .set((remaining_count, remaining_size)); }, - _ => todo!(), } } } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 4498781a375e..636e42c66704 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1296,44 +1296,47 @@ impl parachains_paras::Config for Runtime { type NextSessionRotation = Babe; } -// TODO does this make the slightest amount of sense? -pub struct ParaIdToJunction; -impl sp_runtime::traits::Convert - for ParaIdToJunction -{ - fn convert(o: parachains_inclusion::MessageOrigin) -> xcm::latest::Junction { - match o { - parachains_inclusion::MessageOrigin { - para, - queue: parachains_inclusion::SubQueue::UMP, - } => xcm::latest::Junction::Parachain(para.into()), - // FAIL-CI: Should be similar for the other *MP queues but check this as a TODO - _ => todo!(), - } - } -} - parameter_types! { /// Amount of weigh which can be spent per block to service messages. /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); } +use frame_support::traits::ProcessMessage; +use parachains_inclusion::ProcessQueue; +use frame_support::traits::ProcessMessageError; + +pub struct MessageProcessor; +impl ProcessMessage for MessageProcessor { + type Origin = ProcessQueue; + + fn process_message( + message: &[u8], + origin: Self::Origin, + weight_limit: Weight, + ) -> Result<(bool, Weight), ProcessMessageError> { + match origin { + // Delegate all UMP messages to the XCM executor. + ProcessQueue::UMP(from_para) => { + xcm_builder::ProcessXcmMessage::< + xcm::v3::Junction, + xcm_executor::XcmExecutor, + RuntimeCall, + >::process_message(message, from_para.into(), weight_limit) + }, + } + } +} + impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Size = u32; type HeapSize = ConstU32<65_536>; type MaxStale = ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; - // TODO Is `ParaIdToJunction` correct here? - type MessageProcessor = xcm_builder::ProcessXcmMessage< - parachains_inclusion::MessageOrigin, - xcm_executor::XcmExecutor, - RuntimeCall, - ParaIdToJunction, - >; + type MessageProcessor = MessageProcessor; type QueueChangeHandler = (); - type WeightInfo = (); // FAIL-CI: TODO + type WeightInfo = weights::pallet_message_queue::WeightInfo; } impl parachains_dmp::Config for Runtime {} diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index dc2878c55c26..9af449d9e9cf 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -16,7 +16,7 @@ //! Implementation of `ProcessMessage` for an `ExecuteXcm` implementation. -use frame_support::traits::{ProcessMessage, ProcessMessageError}; +use frame_support::{ensure, traits::{ProcessMessage, ProcessMessageError}}; use parity_scale_codec::{Decode, FullCodec, MaxEncodedLen}; use scale_info::TypeInfo; use sp_io::hashing::blake2_256; @@ -24,15 +24,14 @@ use sp_std::{fmt::Debug, marker::PhantomData}; use sp_weights::Weight; use xcm::prelude::*; -pub struct ProcessXcmMessage( - PhantomData<(MessageOrigin, XcmExecutor, Call, MessageToDispatchOrigin)>, +pub struct ProcessXcmMessage( + PhantomData<(MessageOrigin, XcmExecutor, Call)>, ); impl< - MessageOrigin: FullCodec + MaxEncodedLen + Clone + Eq + PartialEq + TypeInfo + Debug, + MessageOrigin: Into + FullCodec + MaxEncodedLen + Clone + Eq + PartialEq + TypeInfo + Debug, XcmExecutor: ExecuteXcm, Call, - MessageToDispatchOrigin: sp_runtime::traits::Convert, - > ProcessMessage for ProcessXcmMessage + > ProcessMessage for ProcessXcmMessage { type Origin = MessageOrigin; @@ -48,11 +47,11 @@ impl< let message = Xcm::::try_from(versioned_message) .map_err(|_| ProcessMessageError::Unsupported)?; let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; - let weight = Weight::from_ref_time(pre.weight_of()); + let weight = pre.weight_of(); ensure!(weight.all_lte(weight_limit), ProcessMessageError::Overweight(weight)); - match XcmExecutor::execute(origin.into(), pre, hash, 0) { - Outcome::Complete(w) => Ok((true, Weight::from_ref_time(w))), - Outcome::Incomplete(w, _) => Ok((false, Weight::from_ref_time(w))), + match XcmExecutor::execute(origin.into(), pre, hash, Weight::zero()) { + Outcome::Complete(w) => Ok((true, w)), + Outcome::Incomplete(w, _) => Ok((false, w)), Outcome::Error(_) => Err(ProcessMessageError::Unsupported), } } From 82a8bc163fa1d629d2d8b4f2b47788e703475e65 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 1 Feb 2023 23:14:50 +0100 Subject: [PATCH 052/182] Fixup runtimes Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 444 +++++++++++------- node/service/src/chain_spec.rs | 1 - node/test/performance-test/Cargo.toml | 1 - runtime/kusama/Cargo.toml | 4 + runtime/kusama/src/lib.rs | 48 +- runtime/kusama/src/weights/mod.rs | 1 - .../src/weights/runtime_parachains_ump.rs | 72 --- runtime/parachains/src/inclusion/mod.rs | 45 +- runtime/polkadot/src/lib.rs | 40 +- runtime/polkadot/src/weights/mod.rs | 1 - .../src/weights/runtime_parachains_ump.rs | 74 --- runtime/rococo/Cargo.toml | 4 + runtime/rococo/src/lib.rs | 54 ++- runtime/rococo/src/weights/mod.rs | 1 - .../src/weights/runtime_parachains_ump.rs | 72 --- runtime/test-runtime/src/lib.rs | 1 - runtime/westend/Cargo.toml | 5 + runtime/westend/src/lib.rs | 55 ++- runtime/westend/src/weights/mod.rs | 1 - .../src/weights/runtime_parachains_ump.rs | 72 --- xcm/xcm-builder/src/process_xcm_message.rs | 5 +- 21 files changed, 421 insertions(+), 580 deletions(-) delete mode 100644 runtime/kusama/src/weights/runtime_parachains_ump.rs delete mode 100644 runtime/polkadot/src/weights/runtime_parachains_ump.rs delete mode 100644 runtime/rococo/src/weights/runtime_parachains_ump.rs delete mode 100644 runtime/westend/src/weights/runtime_parachains_ump.rs diff --git a/Cargo.lock b/Cargo.lock index 5182eaad8832..bba11367093b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -455,7 +455,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "async-trait", @@ -489,7 +489,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "beefy-gadget", "futures", @@ -508,7 +508,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "sp-api", "sp-beefy", @@ -543,6 +543,21 @@ dependencies = [ "shlex", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" @@ -2291,7 +2306,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", ] @@ -2315,7 +2330,7 @@ checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-support-procedural", @@ -2340,7 +2355,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "Inflector", "array-bytes", @@ -2387,7 +2402,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2398,7 +2413,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2415,7 +2430,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -2444,7 +2459,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "log", @@ -2460,7 +2475,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "bitflags", "frame-metadata", @@ -2492,7 +2507,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "Inflector", "cfg-expr", @@ -2507,7 +2522,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2519,7 +2534,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro2", "quote", @@ -2529,7 +2544,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -2553,7 +2568,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -2564,7 +2579,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "log", @@ -2582,7 +2597,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -2597,7 +2612,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "sp-api", @@ -2606,7 +2621,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "parity-scale-codec", @@ -2777,7 +2792,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "chrono", "frame-election-provider-support", @@ -3583,6 +3598,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nis", "pallet-nomination-pools", @@ -4530,7 +4546,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "log", @@ -4549,7 +4565,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "anyhow", "jsonrpsee", @@ -5114,7 +5130,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5129,7 +5145,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5145,7 +5161,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5159,7 +5175,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5183,7 +5199,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5203,7 +5219,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5222,7 +5238,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5237,7 +5253,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5253,7 +5269,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "beefy-merkle-tree", @@ -5276,7 +5292,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5294,7 +5310,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5313,7 +5329,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5330,7 +5346,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5347,7 +5363,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5365,7 +5381,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5388,7 +5404,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5401,7 +5417,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5419,7 +5435,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5437,7 +5453,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5460,7 +5476,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5476,7 +5492,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5496,7 +5512,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5513,7 +5529,24 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-message-queue" +version = "7.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5521,16 +5554,18 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", + "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", "sp-std", + "sp-weights", ] [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5547,7 +5582,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5563,7 +5598,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5579,7 +5614,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5596,7 +5631,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5616,7 +5651,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "sp-api", @@ -5626,7 +5661,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5643,7 +5678,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5667,7 +5702,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5684,7 +5719,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5699,7 +5734,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5717,7 +5752,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5732,7 +5767,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5751,7 +5786,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5768,7 +5803,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5789,7 +5824,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5805,7 +5840,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5819,7 +5854,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5842,7 +5877,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5853,7 +5888,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "log", "sp-arithmetic", @@ -5862,7 +5897,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5879,7 +5914,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5893,7 +5928,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5911,7 +5946,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5930,7 +5965,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-support", "frame-system", @@ -5946,7 +5981,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5962,7 +5997,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5974,7 +6009,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -5991,7 +6026,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -6006,7 +6041,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -6022,7 +6057,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -6037,7 +6072,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-benchmarking", "frame-support", @@ -7385,6 +7420,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7543,6 +7579,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -7551,6 +7588,7 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-runtime-metrics", + "proptest", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", @@ -8152,6 +8190,26 @@ dependencies = [ "regex", ] +[[package]] +name = "proptest" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" +dependencies = [ + "bit-set", + "bitflags", + "byteorder", + "lazy_static", + "num-traits", + "quick-error 2.0.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax", + "rusty-fork", + "tempfile", +] + [[package]] name = "prost" version = "0.11.0" @@ -8386,6 +8444,15 @@ dependencies = [ "rand_core 0.6.3", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.3", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -8674,6 +8741,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -8901,6 +8969,18 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error 1.2.3", + "tempfile", + "wait-timeout", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -8930,7 +9010,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "log", "sp-core", @@ -8941,7 +9021,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures", @@ -8968,7 +9048,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "futures-timer", @@ -8991,7 +9071,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9007,7 +9087,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9022,7 +9102,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9033,7 +9113,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "chrono", @@ -9073,7 +9153,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "fnv", "futures", @@ -9099,7 +9179,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "hash-db", "kvdb", @@ -9125,7 +9205,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures", @@ -9150,7 +9230,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "fork-tree", @@ -9188,7 +9268,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "jsonrpsee", @@ -9210,7 +9290,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9223,7 +9303,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures", @@ -9246,7 +9326,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -9270,7 +9350,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9283,7 +9363,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "log", "sc-allocator", @@ -9296,7 +9376,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "cfg-if", "libc", @@ -9313,7 +9393,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "ahash 0.8.2", "array-bytes", @@ -9353,7 +9433,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "finality-grandpa", "futures", @@ -9373,7 +9453,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "ansi_term", "futures", @@ -9388,7 +9468,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "async-trait", @@ -9403,7 +9483,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "async-trait", @@ -9445,7 +9525,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "cid", "futures", @@ -9464,7 +9544,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "bitflags", @@ -9490,7 +9570,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "ahash 0.8.2", "futures", @@ -9508,7 +9588,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "futures", @@ -9529,7 +9609,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "async-trait", @@ -9561,7 +9641,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "futures", @@ -9580,7 +9660,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "bytes", @@ -9610,7 +9690,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "libp2p", @@ -9623,7 +9703,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9632,7 +9712,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "jsonrpsee", @@ -9662,7 +9742,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9681,7 +9761,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "http", "jsonrpsee", @@ -9696,7 +9776,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "futures", @@ -9722,7 +9802,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "directories", @@ -9788,7 +9868,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "log", "parity-scale-codec", @@ -9799,7 +9879,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "clap 4.0.15", "futures", @@ -9815,7 +9895,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9834,7 +9914,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "libc", @@ -9853,7 +9933,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "chrono", "futures", @@ -9872,7 +9952,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "ansi_term", "atty", @@ -9903,7 +9983,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9914,7 +9994,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures", @@ -9941,7 +10021,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures", @@ -9955,7 +10035,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "backtrace", "futures", @@ -10462,7 +10542,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "hash-db", "log", @@ -10480,7 +10560,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "blake2", "proc-macro-crate", @@ -10492,7 +10572,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10505,7 +10585,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "integer-sqrt", "num-traits", @@ -10519,7 +10599,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10532,7 +10612,7 @@ dependencies = [ [[package]] name = "sp-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10549,7 +10629,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "sp-api", @@ -10561,7 +10641,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "log", @@ -10579,7 +10659,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures", @@ -10597,7 +10677,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "merlin", @@ -10620,7 +10700,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10632,7 +10712,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10645,7 +10725,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "base58", @@ -10687,7 +10767,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "blake2", "byteorder", @@ -10701,7 +10781,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro2", "quote", @@ -10712,7 +10792,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10721,7 +10801,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro2", "quote", @@ -10731,7 +10811,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "environmental", "parity-scale-codec", @@ -10742,7 +10822,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "finality-grandpa", "log", @@ -10760,7 +10840,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10774,7 +10854,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "bytes", "ed25519", @@ -10799,7 +10879,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "lazy_static", "sp-core", @@ -10810,7 +10890,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures", @@ -10827,7 +10907,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "thiserror", "zstd", @@ -10836,7 +10916,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -10854,7 +10934,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10868,7 +10948,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "sp-api", "sp-core", @@ -10878,7 +10958,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "backtrace", "lazy_static", @@ -10888,7 +10968,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "rustc-hash", "serde", @@ -10898,7 +10978,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "either", "hash256-std-hasher", @@ -10920,7 +11000,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10938,7 +11018,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "Inflector", "proc-macro-crate", @@ -10950,7 +11030,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10964,7 +11044,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -10976,7 +11056,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "hash-db", "log", @@ -10996,12 +11076,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11014,7 +11094,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "futures-timer", @@ -11029,7 +11109,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "sp-std", @@ -11041,7 +11121,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "sp-api", "sp-runtime", @@ -11050,7 +11130,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "log", @@ -11066,7 +11146,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "ahash 0.8.2", "hash-db", @@ -11089,7 +11169,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11106,7 +11186,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11117,7 +11197,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "impl-trait-for-tuples", "log", @@ -11130,7 +11210,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "parity-scale-codec", "scale-info", @@ -11363,7 +11443,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "platforms", ] @@ -11371,7 +11451,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11390,7 +11470,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "hyper", "log", @@ -11402,7 +11482,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "async-trait", "jsonrpsee", @@ -11415,7 +11495,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "jsonrpsee", "log", @@ -11434,7 +11514,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "array-bytes", "async-trait", @@ -11460,7 +11540,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11470,7 +11550,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11481,7 +11561,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "ansi_term", "build-helper", @@ -12282,7 +12362,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#129fee774a6d185d117a57fd1e81b3d0d05ad747" +source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" dependencies = [ "clap 4.0.15", "frame-remote-externalities", @@ -13238,6 +13318,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -13673,6 +13754,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", "xcm", "xcm-executor", ] diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index 35208fb79342..24429b459b59 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -17,7 +17,6 @@ //! Polkadot chain configurations. use beefy_primitives::crypto::AuthorityId as BeefyId; -use frame_support::weights::Weight; use grandpa::AuthorityId as GrandpaId; #[cfg(feature = "kusama-native")] use kusama_runtime as kusama; diff --git a/node/test/performance-test/Cargo.toml b/node/test/performance-test/Cargo.toml index 7fddccfd5b13..95da89662579 100644 --- a/node/test/performance-test/Cargo.toml +++ b/node/test/performance-test/Cargo.toml @@ -21,5 +21,4 @@ name = "gen-ref-constants" path = "src/gen_ref_constants.rs" [features] -default = [ "runtime-benchmarks" ] runtime-benchmarks = ["kusama-runtime/runtime-benchmarks"] diff --git a/runtime/kusama/Cargo.toml b/runtime/kusama/Cargo.toml index d53082803f8e..ad1d70ad024c 100644 --- a/runtime/kusama/Cargo.toml +++ b/runtime/kusama/Cargo.toml @@ -59,6 +59,7 @@ pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "m 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-message-queue = { 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-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -156,6 +157,7 @@ std = [ "pallet-im-online/std", "pallet-indices/std", "pallet-membership/std", + "pallet-message-queue/std", "pallet-multisig/std", "pallet-nomination-pools/std", "pallet-nomination-pools-runtime-api/std", @@ -222,6 +224,7 @@ runtime-benchmarks = [ "pallet-im-online/runtime-benchmarks", "pallet-indices/runtime-benchmarks", "pallet-membership/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-nomination-pools/runtime-benchmarks", "pallet-nomination-pools-benchmarking/runtime-benchmarks", @@ -273,6 +276,7 @@ try-runtime = [ "pallet-im-online/try-runtime", "pallet-indices/try-runtime", "pallet-membership/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-nomination-pools/try-runtime", "pallet-offences/try-runtime", diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index b63790bd2263..ef289c9d3c4d 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -42,7 +42,7 @@ use runtime_parachains::{ initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::v2 as parachains_runtime_api_impl, scheduler as parachains_scheduler, - session_info as parachains_session_info, shared as parachains_shared, ump as parachains_ump, + session_info as parachains_session_info, shared as parachains_shared, }; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; @@ -60,6 +60,9 @@ use frame_support::{ PalletId, RuntimeDebug, }; use frame_system::EnsureRoot; +use frame_support::traits::{ProcessMessage, ProcessMessageError}; +use frame_support::weights::constants::WEIGHT_REF_TIME_PER_MILLIS; +use xcm::latest::Junction; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_session::historical as session_historical; @@ -1124,6 +1127,8 @@ impl parachains_inclusion::Config for Runtime { type RuntimeEvent = RuntimeEvent; type DisputesHandler = ParasDisputes; type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; + type MessageQueue = MessageQueue; + type WeightInfo = (); // FAIL-CI: TODO } parameter_types! { @@ -1138,16 +1143,39 @@ impl parachains_paras::Config for Runtime { } parameter_types! { - pub const FirstMessageFactorPercent: u64 = 100; + /// Amount of weigh which can be spent per block to service messages. + /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. + pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); +} + +pub struct MessageProcessor; +impl ProcessMessage for MessageProcessor { + type Origin = ParaId; + + fn process_message( + message: &[u8], + origin: Self::Origin, + weight_limit: Weight, + ) -> Result<(bool, Weight), ProcessMessageError> { + xcm_builder::ProcessXcmMessage::< + Junction, + xcm_executor::XcmExecutor, + RuntimeCall, + // FAIL-CI why does `Parachain` not accept a `ParaId`? + >::process_message(message, Junction::Parachain(origin.into()), weight_limit) + } } -impl parachains_ump::Config for Runtime { +impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type UmpSink = - crate::parachains_ump::XcmSink, Runtime>; - type FirstMessageFactorPercent = FirstMessageFactorPercent; - type ExecuteOverweightOrigin = EnsureRoot; - type WeightInfo = weights::runtime_parachains_ump::WeightInfo; + type Size = u32; + type HeapSize = ConstU32<65_536>; + type MaxStale = ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; + type MessageProcessor = MessageProcessor; + type QueueChangeHandler = (); + // FAIL-CI + type WeightInfo = (); } impl parachains_dmp::Config for Runtime {} @@ -1437,10 +1465,10 @@ construct_runtime! { Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, Dmp: parachains_dmp::{Pallet, Call, Storage} = 58, - Ump: parachains_ump::{Pallet, Call, Storage, Event} = 59, Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 63, // Parachain Onboarding Pallets. Start indices at 70 to leave room. Registrar: paras_registrar::{Pallet, Call, Storage, Event} = 70, @@ -1488,7 +1516,6 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { pub type Migrations = ( // "Use 2D weights in XCM v3" pallet_xcm::migration::v1::MigrateToV1, - parachains_ump::migration::v1::MigrateToV1, // Remove stale entries in the set id -> session index storage map (after // this release they will be properly pruned after the bonding duration has // elapsed) @@ -1531,7 +1558,6 @@ mod benches { [runtime_parachains::initializer, Initializer] [runtime_parachains::paras_inherent, ParaInherent] [runtime_parachains::paras, Paras] - [runtime_parachains::ump, Ump] // Substrate [pallet_balances, Balances] [pallet_balances, NisCounterpartBalances] diff --git a/runtime/kusama/src/weights/mod.rs b/runtime/kusama/src/weights/mod.rs index 014204074484..0cb5def7ea93 100644 --- a/runtime/kusama/src/weights/mod.rs +++ b/runtime/kusama/src/weights/mod.rs @@ -62,5 +62,4 @@ pub mod runtime_parachains_hrmp; pub mod runtime_parachains_initializer; pub mod runtime_parachains_paras; pub mod runtime_parachains_paras_inherent; -pub mod runtime_parachains_ump; pub mod xcm; diff --git a/runtime/kusama/src/weights/runtime_parachains_ump.rs b/runtime/kusama/src/weights/runtime_parachains_ump.rs deleted file mode 100644 index 25af256ec76a..000000000000 --- a/runtime/kusama/src/weights/runtime_parachains_ump.rs +++ /dev/null @@ -1,72 +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 `runtime_parachains::ump` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-24, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `runner-b3zmxxc-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! 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=runtime_parachains::ump -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/kusama/src/weights/runtime_parachains_ump.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 `runtime_parachains::ump`. -pub struct WeightInfo(PhantomData); -impl runtime_parachains::ump::WeightInfo for WeightInfo { - /// The range of component `s` is `[0, 51200]`. - fn process_upward_message(s: u32, ) -> Weight { - // Minimum execution time: 10_988 nanoseconds. - Weight::from_ref_time(2_555_693) - // Standard Error: 15 - .saturating_add(Weight::from_ref_time(2_393).saturating_mul(s.into())) - } - // 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 { - // Minimum execution time: 9_226 nanoseconds. - Weight::from_ref_time(9_749_000) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(4)) - } - // Storage: Ump Overweight (r:1 w:1) - // Storage: Ump CounterForOverweight (r:1 w:1) - fn service_overweight() -> Weight { - // Minimum execution time: 29_394 nanoseconds. - Weight::from_ref_time(30_165_000) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index ff1fe65fa005..e9b7f367a19f 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -213,15 +213,6 @@ pub fn minimum_backing_votes(n_validators: usize) -> usize { sp_std::cmp::min(n_validators, 2) } -/// The queues of the [Config::MessageQueue]. -/// -/// Changes to this necessitate a migration. -#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] -pub enum ProcessQueue { - /// UMP messages from `inner` awaiting dispatch. - UMP(ParaId), -} - #[frame_support::pallet] pub mod pallet { use super::*; @@ -248,7 +239,7 @@ pub mod pallet { /// The system message queue. /// /// The message queue provides general queueing and processing functionality. Currently it replaces the old `UMP` dispatch queue. Other use-cases can be implemented as well. - type MessageQueue: EnqueueMessage; + type MessageQueue: EnqueueMessage; } #[pallet::event] @@ -911,7 +902,7 @@ impl Pallet { }) } - let fp = T::MessageQueue::footprint(ProcessQueue::UMP(para)); + let fp = T::MessageQueue::footprint(para); let (para_queue_count, mut para_queue_size) = (fp.count, fp.size); if para_queue_count @@ -965,7 +956,7 @@ impl Pallet { let count = upward_messages.len() as u32; Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); let messages = upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); - T::MessageQueue::enqueue_messages(messages, ProcessQueue::UMP(para)); + T::MessageQueue::enqueue_messages(messages, para); ::WeightInfo::receive_upward_messages(count) } @@ -1099,23 +1090,19 @@ impl AcceptanceCheckErr { } } -impl OnQueueChanged for Pallet { - fn on_queue_changed(queue: ProcessQueue, count: u64, size: u64) { - match queue { - ProcessQueue::UMP(para) => { - // TODO maybe migrate this to u64 - let (count, size) = (count.saturated_into(), size.saturated_into()); - // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` - #[allow(deprecated)] - well_known_keys::relay_dispatch_queue_size_typed(para).set((count, size)); - - let config = >::config(); - let remaining_count = config.max_upward_queue_count.saturating_sub(count); - let remaining_size = config.max_upward_queue_size.saturating_sub(size); - well_known_keys::relay_dispatch_queue_remaining_capacity(para) - .set((remaining_count, remaining_size)); - }, - } +impl OnQueueChanged for Pallet { + fn on_queue_changed(para: ParaId, count: u64, size: u64) { + // TODO maybe migrate this to u64 + let (count, size) = (count.saturated_into(), size.saturated_into()); + // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` + #[allow(deprecated)] + well_known_keys::relay_dispatch_queue_size_typed(para).set((count, size)); + + let config = >::config(); + let remaining_count = config.max_upward_queue_count.saturating_sub(count); + let remaining_size = config.max_upward_queue_size.saturating_sub(size); + well_known_keys::relay_dispatch_queue_remaining_capacity(para) + .set((remaining_count, remaining_size)); } } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 1490a88e0296..96c1051bf59a 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -42,7 +42,7 @@ use frame_support::{ construct_runtime, parameter_types, traits::{ ConstU32, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, - PrivilegeCmp, WithdrawReasons, + PrivilegeCmp, ProcessMessage, ProcessMessageError, WithdrawReasons, }, weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier}, PalletId, RuntimeDebug, @@ -79,6 +79,7 @@ use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; use sp_version::NativeVersion; use sp_version::RuntimeVersion; use static_assertions::const_assert; +use xcm::latest::Junction; pub use frame_system::Call as SystemCall; pub use pallet_balances::Call as BalancesCall; @@ -1302,29 +1303,21 @@ parameter_types! { pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); } -use frame_support::traits::ProcessMessage; -use parachains_inclusion::ProcessQueue; -use frame_support::traits::ProcessMessageError; - pub struct MessageProcessor; impl ProcessMessage for MessageProcessor { - type Origin = ProcessQueue; + type Origin = ParaId; fn process_message( message: &[u8], origin: Self::Origin, weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { - match origin { - // Delegate all UMP messages to the XCM executor. - ProcessQueue::UMP(from_para) => { - xcm_builder::ProcessXcmMessage::< - xcm::v3::Junction, - xcm_executor::XcmExecutor, - RuntimeCall, - >::process_message(message, from_para.into(), weight_limit) - }, - } + xcm_builder::ProcessXcmMessage::< + Junction, + xcm_executor::XcmExecutor, + RuntimeCall, + // FAIL-CI why does `Parachain` not accept a `ParaId`? + >::process_message(message, Junction::Parachain(origin.into()), weight_limit) } } @@ -1336,7 +1329,8 @@ impl pallet_message_queue::Config for Runtime { type ServiceWeight = MessageQueueServiceWeight; type MessageProcessor = MessageProcessor; type QueueChangeHandler = (); - type WeightInfo = weights::pallet_message_queue::WeightInfo; + // FAIL-CI + type WeightInfo = (); } impl parachains_dmp::Config for Runtime {} @@ -1634,17 +1628,7 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { /// All migrations that will run on the next runtime upgrade. /// /// Should be cleared after every release. -pub type Migrations = ( - // "Use 2D weights in XCM v3" - pallet_xcm::migration::v1::MigrateToV1, - parachains_ump::migration::v1::MigrateToV1, - // Remove stale entries in the set id -> session index storage map (after - // this release they will be properly pruned after the bonding duration has - // elapsed) - pallet_grandpa::migrations::CleanupSetIdSessionMap, - - parachains_configuration::migration::v5::MigrateToV5, -); +pub type Migrations = (parachains_configuration::migration::v5::MigrateToV5,); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = diff --git a/runtime/polkadot/src/weights/mod.rs b/runtime/polkadot/src/weights/mod.rs index 99c2b1b52109..d8f8bda90dd6 100644 --- a/runtime/polkadot/src/weights/mod.rs +++ b/runtime/polkadot/src/weights/mod.rs @@ -56,4 +56,3 @@ pub mod runtime_parachains_hrmp; pub mod runtime_parachains_initializer; pub mod runtime_parachains_paras; pub mod runtime_parachains_paras_inherent; -pub mod runtime_parachains_ump; diff --git a/runtime/polkadot/src/weights/runtime_parachains_ump.rs b/runtime/polkadot/src/weights/runtime_parachains_ump.rs deleted file mode 100644 index 8f1eb2d54749..000000000000 --- a/runtime/polkadot/src/weights/runtime_parachains_ump.rs +++ /dev/null @@ -1,74 +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 `runtime_parachains::ump` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-16, 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: -// /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=runtime_parachains::ump -// --chain=polkadot-dev -// --header=./file_header.txt -// --output=./runtime/polkadot/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 `runtime_parachains::ump`. -pub struct WeightInfo(PhantomData); -impl runtime_parachains::ump::WeightInfo for WeightInfo { - /// The range of component `s` is `[0, 51200]`. - fn process_upward_message(s: u32, ) -> Weight { - // Minimum execution time: 10_291 nanoseconds. - Weight::from_ref_time(4_272_368) - // Standard Error: 12 - .saturating_add(Weight::from_ref_time(1_872).saturating_mul(s.into())) - } - // 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 { - // Minimum execution time: 9_837 nanoseconds. - Weight::from_ref_time(9_951_000) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(4)) - } - // Storage: Ump Overweight (r:1 w:1) - // Storage: Ump CounterForOverweight (r:1 w:1) - fn service_overweight() -> Weight { - // Minimum execution time: 29_540 nanoseconds. - Weight::from_ref_time(29_889_000) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/runtime/rococo/Cargo.toml b/runtime/rococo/Cargo.toml index 2b944a508f8f..124430e862f9 100644 --- a/runtime/rococo/Cargo.toml +++ b/runtime/rococo/Cargo.toml @@ -53,6 +53,7 @@ pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "m 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-message-queue = { 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 } @@ -140,6 +141,7 @@ std = [ "pallet-im-online/std", "pallet-indices/std", "pallet-membership/std", + "pallet-message-queue/std", "pallet-mmr/std", "pallet-multisig/std", "pallet-offences/std", @@ -199,6 +201,7 @@ runtime-benchmarks = [ "pallet-im-online/runtime-benchmarks", "pallet-indices/runtime-benchmarks", "pallet-membership/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-preimage/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", @@ -238,6 +241,7 @@ try-runtime = [ "pallet-im-online/try-runtime", "pallet-indices/try-runtime", "pallet-membership/try-runtime", + "pallet-message-queue/try-runtime", "pallet-mmr/try-runtime", "pallet-multisig/try-runtime", "pallet-nis/try-runtime", diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 8af3991e330e..96315851d231 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -43,7 +43,7 @@ use runtime_parachains::{ origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, runtime_api_impl::v2 as parachains_runtime_api_impl, scheduler as parachains_scheduler, - session_info as parachains_session_info, shared as parachains_shared, ump as parachains_ump, + session_info as parachains_session_info, shared as parachains_shared, }; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; @@ -68,6 +68,9 @@ use pallet_session::historical as session_historical; use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo}; use sp_core::{ConstU128, OpaqueMetadata, H256}; use sp_mmr_primitives as mmr; +use frame_support::traits::{ProcessMessage, ProcessMessageError}; +use frame_support::weights::constants::WEIGHT_REF_TIME_PER_MILLIS; +use xcm::latest::Junction; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ @@ -1041,6 +1044,8 @@ impl parachains_inclusion::Config for Runtime { type RuntimeEvent = RuntimeEvent; type DisputesHandler = ParasDisputes; type RewardValidators = RewardValidators; + type MessageQueue = MessageQueue; + type WeightInfo = (); // FAIL-CI: TODO } parameter_types! { @@ -1055,16 +1060,39 @@ impl parachains_paras::Config for Runtime { } parameter_types! { - pub const FirstMessageFactorPercent: u64 = 100; + /// Amount of weigh which can be spent per block to service messages. + /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. + pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); +} + +pub struct MessageProcessor; +impl ProcessMessage for MessageProcessor { + type Origin = ParaId; + + fn process_message( + message: &[u8], + origin: Self::Origin, + weight_limit: Weight, + ) -> Result<(bool, Weight), ProcessMessageError> { + xcm_builder::ProcessXcmMessage::< + Junction, + xcm_executor::XcmExecutor, + RuntimeCall, + // FAIL-CI why does `Parachain` not accept a `ParaId`? + >::process_message(message, Junction::Parachain(origin.into()), weight_limit) + } } -impl parachains_ump::Config for Runtime { +impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type UmpSink = - crate::parachains_ump::XcmSink, Runtime>; - type FirstMessageFactorPercent = FirstMessageFactorPercent; - type ExecuteOverweightOrigin = EnsureRoot; - type WeightInfo = weights::runtime_parachains_ump::WeightInfo; + type Size = u32; + type HeapSize = ConstU32<65_536>; + type MaxStale = ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; + type MessageProcessor = MessageProcessor; + type QueueChangeHandler = (); + // FAIL-CI + type WeightInfo = (); } impl parachains_dmp::Config for Runtime {} @@ -1418,11 +1446,12 @@ construct_runtime! { Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, Dmp: parachains_dmp::{Pallet, Call, Storage} = 58, - Ump: parachains_ump::{Pallet, Call, Storage, Event} = 59, + // RIP Ump 59 Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62, ParasSlashing: parachains_slashing::{Pallet, Call, Storage, ValidateUnsigned} = 63, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 64, // Parachain Onboarding Pallets. Start indices at 70 to leave room. Registrar: paras_registrar::{Pallet, Call, Storage, Event, Config} = 70, @@ -1483,13 +1512,6 @@ pub type UncheckedExtrinsic = /// /// Should be cleared after every release. pub type Migrations = ( - // "Use 2D weights in XCM v3" - pallet_xcm::migration::v1::MigrateToV1, - parachains_ump::migration::v1::MigrateToV1, - // Remove stale entries in the set id -> session index storage map (after - // this release they will be properly pruned after the bonding duration has - // elapsed) - pallet_grandpa::migrations::CleanupSetIdSessionMap, ); /// Executive: handles dispatch to the various modules. diff --git a/runtime/rococo/src/weights/mod.rs b/runtime/rococo/src/weights/mod.rs index e6b345c37b84..414cd9e71d9b 100644 --- a/runtime/rococo/src/weights/mod.rs +++ b/runtime/rococo/src/weights/mod.rs @@ -51,5 +51,4 @@ pub mod runtime_parachains_hrmp; pub mod runtime_parachains_initializer; pub mod runtime_parachains_paras; pub mod runtime_parachains_paras_inherent; -pub mod runtime_parachains_ump; pub mod xcm; diff --git a/runtime/rococo/src/weights/runtime_parachains_ump.rs b/runtime/rococo/src/weights/runtime_parachains_ump.rs deleted file mode 100644 index b797d3d7b79c..000000000000 --- a/runtime/rococo/src/weights/runtime_parachains_ump.rs +++ /dev/null @@ -1,72 +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 `runtime_parachains::ump` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `runner-b3zmxxc-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! 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=runtime_parachains::ump -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/rococo/src/weights/runtime_parachains_ump.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 `runtime_parachains::ump`. -pub struct WeightInfo(PhantomData); -impl runtime_parachains::ump::WeightInfo for WeightInfo { - /// The range of component `s` is `[0, 51200]`. - fn process_upward_message(s: u32, ) -> Weight { - // Minimum execution time: 10_641 nanoseconds. - Weight::from_ref_time(1_992_129) - // Standard Error: 16 - .saturating_add(Weight::from_ref_time(2_373).saturating_mul(s.into())) - } - // 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 { - // Minimum execution time: 8_510 nanoseconds. - Weight::from_ref_time(9_067_000) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(4)) - } - // Storage: Ump Overweight (r:1 w:1) - // Storage: Ump CounterForOverweight (r:1 w:1) - fn service_overweight() -> Weight { - // Minimum execution time: 28_966 nanoseconds. - Weight::from_ref_time(29_910_000) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 16cee9f63704..e6613ba9123b 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -684,7 +684,6 @@ construct_runtime! { ParasOrigin: parachains_origin::{Pallet, Origin}, ParaSessionInfo: parachains_session_info::{Pallet, Storage}, Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event}, - Ump: parachains_ump::{Pallet, Call, Storage, Event}, Dmp: parachains_dmp::{Pallet, Call, Storage}, Xcm: pallet_xcm::{Pallet, Call, Event, Origin}, ParasDisputes: parachains_disputes::{Pallet, Storage, Event}, diff --git a/runtime/westend/Cargo.toml b/runtime/westend/Cargo.toml index 024a8f3e89c0..8f864d1fa4aa 100644 --- a/runtime/westend/Cargo.toml +++ b/runtime/westend/Cargo.toml @@ -54,6 +54,7 @@ pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "m 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-message-queue = { 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-nomination-pools = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -144,6 +145,7 @@ std = [ "pallet-im-online/std", "pallet-indices/std", "pallet-membership/std", + "pallet-message-queue/std", "beefy-primitives/std", "pallet-multisig/std", "pallet-nomination-pools/std", @@ -205,6 +207,8 @@ runtime-benchmarks = [ "pallet-identity/runtime-benchmarks", "pallet-im-online/runtime-benchmarks", "pallet-indices/runtime-benchmarks", + "pallet-membership/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-nomination-pools-benchmarking/runtime-benchmarks", "pallet-preimage/runtime-benchmarks", @@ -247,6 +251,7 @@ try-runtime = [ "pallet-im-online/try-runtime", "pallet-indices/try-runtime", "pallet-membership/try-runtime", + "pallet-message-queue/try-runtime", "pallet-multisig/try-runtime", "pallet-nomination-pools/try-runtime", "pallet-offences/try-runtime", diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 02129a8901bb..fa22beb67f5d 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -42,6 +42,9 @@ use primitives::{ PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, Signature, ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, }; +use frame_support::traits::{ProcessMessage, ProcessMessageError}; +use frame_support::weights::constants::WEIGHT_REF_TIME_PER_MILLIS; +use xcm::latest::Junction; use runtime_common::{ assigned_slots, auctions, crowdloan, elections::OnChainAccuracy, impl_runtime_weights, impls::ToAuthor, paras_registrar, paras_sudo_wrapper, prod_or_fast, slots, BalanceToU256, @@ -54,7 +57,7 @@ use runtime_parachains::{ origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::v2 as parachains_runtime_api_impl, scheduler as parachains_scheduler, - session_info as parachains_session_info, shared as parachains_shared, ump as parachains_ump, + session_info as parachains_session_info, shared as parachains_shared, }; use scale_info::TypeInfo; use sp_core::{OpaqueMetadata, RuntimeDebug}; @@ -904,6 +907,8 @@ impl parachains_inclusion::Config for Runtime { type RuntimeEvent = RuntimeEvent; type DisputesHandler = ParasDisputes; type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; + type MessageQueue = MessageQueue; + type WeightInfo = (); // FAIL-CI: TODO } parameter_types! { @@ -918,16 +923,39 @@ impl parachains_paras::Config for Runtime { } parameter_types! { - pub const FirstMessageFactorPercent: u64 = 100; + /// Amount of weigh which can be spent per block to service messages. + /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. + pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); +} + +pub struct MessageProcessor; +impl ProcessMessage for MessageProcessor { + type Origin = ParaId; + + fn process_message( + message: &[u8], + origin: Self::Origin, + weight_limit: Weight, + ) -> Result<(bool, Weight), ProcessMessageError> { + xcm_builder::ProcessXcmMessage::< + Junction, + xcm_executor::XcmExecutor, + RuntimeCall, + // FAIL-CI why does `Parachain` not accept a `ParaId`? + >::process_message(message, Junction::Parachain(origin.into()), weight_limit) + } } -impl parachains_ump::Config for Runtime { +impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type UmpSink = - crate::parachains_ump::XcmSink, Runtime>; - type FirstMessageFactorPercent = FirstMessageFactorPercent; - type ExecuteOverweightOrigin = EnsureRoot; - type WeightInfo = weights::runtime_parachains_ump::WeightInfo; + type Size = u32; + type HeapSize = ConstU32<65_536>; + type MaxStale = ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; + type MessageProcessor = MessageProcessor; + type QueueChangeHandler = (); + // FAIL-CI + type WeightInfo = (); } impl parachains_dmp::Config for Runtime {} @@ -1187,7 +1215,7 @@ construct_runtime! { Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 47, Initializer: parachains_initializer::{Pallet, Call, Storage} = 48, Dmp: parachains_dmp::{Pallet, Call, Storage} = 49, - Ump: parachains_ump::{Pallet, Call, Storage, Event} = 50, + // RIP Ump 50 Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 51, ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 52, ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 53, @@ -1200,6 +1228,7 @@ construct_runtime! { Auctions: auctions::{Pallet, Call, Storage, Event} = 63, Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 64, AssignedSlots: assigned_slots::{Pallet, Call, Storage, Event} = 65, + MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 66, // Pallet for sending XCM. XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, @@ -1239,14 +1268,6 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { /// /// Should be cleared after every release. pub type Migrations = ( - init_state_migration::InitMigrate, - // "Use 2D weights in XCM v3" - pallet_xcm::migration::v1::MigrateToV1, - parachains_ump::migration::v1::MigrateToV1, - // Remove stale entries in the set id -> session index storage map (after - // this release they will be properly pruned after the bonding duration has - // elapsed) - pallet_grandpa::migrations::CleanupSetIdSessionMap, ); /// Unchecked extrinsic type as expected by this runtime. diff --git a/runtime/westend/src/weights/mod.rs b/runtime/westend/src/weights/mod.rs index 5ca093c618d5..041cea38a43c 100644 --- a/runtime/westend/src/weights/mod.rs +++ b/runtime/westend/src/weights/mod.rs @@ -46,5 +46,4 @@ pub mod runtime_parachains_hrmp; pub mod runtime_parachains_initializer; pub mod runtime_parachains_paras; pub mod runtime_parachains_paras_inherent; -pub mod runtime_parachains_ump; pub mod xcm; diff --git a/runtime/westend/src/weights/runtime_parachains_ump.rs b/runtime/westend/src/weights/runtime_parachains_ump.rs deleted file mode 100644 index e4e07737734b..000000000000 --- a/runtime/westend/src/weights/runtime_parachains_ump.rs +++ /dev/null @@ -1,72 +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 `runtime_parachains::ump` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-01-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `runner-b3zmxxc-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/production/polkadot -// benchmark -// pallet -// --chain=westend-dev -// --steps=50 -// --repeat=20 -// --pallet=runtime_parachains::ump -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/westend/src/weights/runtime_parachains_ump.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 `runtime_parachains::ump`. -pub struct WeightInfo(PhantomData); -impl runtime_parachains::ump::WeightInfo for WeightInfo { - /// The range of component `s` is `[0, 51200]`. - fn process_upward_message(s: u32, ) -> Weight { - // Minimum execution time: 10_863 nanoseconds. - Weight::from_ref_time(2_547_047) - // Standard Error: 16 - .saturating_add(Weight::from_ref_time(2_339).saturating_mul(s.into())) - } - // 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 { - // Minimum execution time: 9_385 nanoseconds. - Weight::from_ref_time(9_784_000) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(4)) - } - // Storage: Ump Overweight (r:1 w:1) - // Storage: Ump CounterForOverweight (r:1 w:1) - fn service_overweight() -> Weight { - // Minimum execution time: 29_452 nanoseconds. - Weight::from_ref_time(31_140_000) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index 9af449d9e9cf..8e4468c23b94 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -16,7 +16,10 @@ //! Implementation of `ProcessMessage` for an `ExecuteXcm` implementation. -use frame_support::{ensure, traits::{ProcessMessage, ProcessMessageError}}; +use frame_support::{ + ensure, + traits::{ProcessMessage, ProcessMessageError}, +}; use parity_scale_codec::{Decode, FullCodec, MaxEncodedLen}; use scale_info::TypeInfo; use sp_io::hashing::blake2_256; From ed0f03404f041d4bcf2c9c816c1357a5bd20b369 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 1 Feb 2023 23:14:58 +0100 Subject: [PATCH 053/182] fmt Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 9 ++++----- runtime/rococo/src/lib.rs | 11 ++++------- runtime/westend/src/lib.rs | 16 ++++++++-------- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index ef289c9d3c4d..495ae457de20 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -54,15 +54,13 @@ use frame_support::{ construct_runtime, parameter_types, traits::{ ConstU32, Contains, EitherOf, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, - LockIdentifier, PrivilegeCmp, StorageMapShim, WithdrawReasons, + LockIdentifier, PrivilegeCmp, ProcessMessage, ProcessMessageError, StorageMapShim, + WithdrawReasons, }, - weights::ConstantMultiplier, + weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier}, PalletId, RuntimeDebug, }; use frame_system::EnsureRoot; -use frame_support::traits::{ProcessMessage, ProcessMessageError}; -use frame_support::weights::constants::WEIGHT_REF_TIME_PER_MILLIS; -use xcm::latest::Junction; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_session::historical as session_historical; @@ -83,6 +81,7 @@ use sp_staking::SessionIndex; use sp_version::NativeVersion; use sp_version::RuntimeVersion; use static_assertions::const_assert; +use xcm::latest::Junction; pub use frame_system::Call as SystemCall; pub use pallet_balances::Call as BalancesCall; diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 96315851d231..a0b9a069aec7 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -56,9 +56,9 @@ use frame_support::{ construct_runtime, parameter_types, traits::{ Contains, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, - PrivilegeCmp, StorageMapShim, WithdrawReasons, + PrivilegeCmp, ProcessMessage, ProcessMessageError, StorageMapShim, WithdrawReasons, }, - weights::ConstantMultiplier, + weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier}, PalletId, RuntimeDebug, }; use frame_system::EnsureRoot; @@ -68,9 +68,6 @@ use pallet_session::historical as session_historical; use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo}; use sp_core::{ConstU128, OpaqueMetadata, H256}; use sp_mmr_primitives as mmr; -use frame_support::traits::{ProcessMessage, ProcessMessageError}; -use frame_support::weights::constants::WEIGHT_REF_TIME_PER_MILLIS; -use xcm::latest::Junction; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ @@ -85,6 +82,7 @@ use sp_staking::SessionIndex; use sp_version::NativeVersion; use sp_version::RuntimeVersion; use static_assertions::const_assert; +use xcm::latest::Junction; pub use frame_system::Call as SystemCall; pub use pallet_balances::Call as BalancesCall; @@ -1511,8 +1509,7 @@ pub type UncheckedExtrinsic = /// All migrations that will run on the next runtime upgrade. /// /// Should be cleared after every release. -pub type Migrations = ( -); +pub type Migrations = (); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index fa22beb67f5d..494b0a4756c6 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -25,8 +25,11 @@ use beefy_primitives::crypto::AuthorityId as BeefyId; use frame_election_provider_support::{onchain, SequentialPhragmen}; use frame_support::{ construct_runtime, parameter_types, - traits::{ConstU32, InstanceFilter, KeyOwnerProofSystem, WithdrawReasons}, - weights::ConstantMultiplier, + traits::{ + ConstU32, InstanceFilter, KeyOwnerProofSystem, ProcessMessage, ProcessMessageError, + WithdrawReasons, + }, + weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier}, PalletId, }; use frame_system::EnsureRoot; @@ -42,9 +45,6 @@ use primitives::{ PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, Signature, ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, }; -use frame_support::traits::{ProcessMessage, ProcessMessageError}; -use frame_support::weights::constants::WEIGHT_REF_TIME_PER_MILLIS; -use xcm::latest::Junction; use runtime_common::{ assigned_slots, auctions, crowdloan, elections::OnChainAccuracy, impl_runtime_weights, impls::ToAuthor, paras_registrar, paras_sudo_wrapper, prod_or_fast, slots, BalanceToU256, @@ -57,7 +57,7 @@ use runtime_parachains::{ origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::v2 as parachains_runtime_api_impl, scheduler as parachains_scheduler, - session_info as parachains_session_info, shared as parachains_shared, + session_info as parachains_session_info, shared as parachains_shared, }; use scale_info::TypeInfo; use sp_core::{OpaqueMetadata, RuntimeDebug}; @@ -78,6 +78,7 @@ use sp_std::{collections::btree_map::BTreeMap, prelude::*}; #[cfg(any(feature = "std", test))] use sp_version::NativeVersion; use sp_version::RuntimeVersion; +use xcm::latest::Junction; pub use frame_system::Call as SystemCall; pub use pallet_balances::Call as BalancesCall; @@ -1267,8 +1268,7 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { /// All migrations that will run on the next runtime upgrade. /// /// Should be cleared after every release. -pub type Migrations = ( -); +pub type Migrations = (); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = From a810818a0c93263b0856ab6c41242fd14b3ecee2 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 1 Feb 2023 23:19:46 +0100 Subject: [PATCH 054/182] Define benchmarks Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 2 ++ runtime/polkadot/src/lib.rs | 1 - runtime/rococo/src/lib.rs | 2 +- runtime/westend/src/lib.rs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 495ae457de20..4d3da8a5f301 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1464,6 +1464,7 @@ construct_runtime! { Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, Dmp: parachains_dmp::{Pallet, Call, Storage} = 58, + // RIP Ump 59 Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62, @@ -1577,6 +1578,7 @@ mod benches { [pallet_im_online, ImOnline] [pallet_indices, Indices] [pallet_membership, TechnicalMembership] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_nomination_pools, NominationPoolsBench::] [pallet_offences, OffencesBench::] diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 96c1051bf59a..023d295c6ad2 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1667,7 +1667,6 @@ mod benches { [runtime_parachains::initializer, Initializer] [runtime_parachains::paras, Paras] [runtime_parachains::paras_inherent, ParaInherent] - [runtime_parachains::ump, Ump] // Substrate [pallet_bags_list, VoterList] [pallet_balances, Balances] diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index a0b9a069aec7..866474463cb2 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1569,7 +1569,6 @@ mod benches { [runtime_parachains::initializer, Initializer] [runtime_parachains::paras_inherent, ParaInherent] [runtime_parachains::paras, Paras] - [runtime_parachains::ump, Ump] // Substrate [pallet_balances, Balances] [pallet_balances, NisCounterpartBalances] @@ -1585,6 +1584,7 @@ mod benches { [pallet_im_online, ImOnline] [pallet_indices, Indices] [pallet_membership, TechnicalMembership] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_preimage, Preimage] [pallet_proxy, Proxy] diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 494b0a4756c6..8c444411d341 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1306,7 +1306,6 @@ mod benches { [runtime_parachains::initializer, Initializer] [runtime_parachains::paras, Paras] [runtime_parachains::paras_inherent, ParaInherent] - [runtime_parachains::ump, Ump] // Substrate [pallet_bags_list, VoterList] [pallet_balances, Balances] @@ -1316,6 +1315,7 @@ mod benches { [pallet_identity, Identity] [pallet_im_online, ImOnline] [pallet_indices, Indices] + [pallet_message_queue, MessageQueue] [pallet_multisig, Multisig] [pallet_nomination_pools, NominationPoolsBench::] [pallet_offences, OffencesBench::] From 1d091a5c809d9c2dd1bda2f505280235d958f196 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 2 Feb 2023 12:22:47 +0100 Subject: [PATCH 055/182] Cleanup Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 8 ++------ runtime/parachains/src/initializer.rs | 2 +- runtime/parachains/src/ump_tests.rs | 1 + runtime/polkadot/src/lib.rs | 8 ++------ runtime/rococo/src/lib.rs | 8 ++------ runtime/westend/src/lib.rs | 8 ++------ xcm/xcm-builder/src/process_xcm_message.rs | 4 +++- 7 files changed, 13 insertions(+), 26 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 4d3da8a5f301..643e8055da71 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1142,7 +1142,7 @@ impl parachains_paras::Config for Runtime { } parameter_types! { - /// Amount of weigh which can be spent per block to service messages. + /// Amount of weight that can be spent per block to service messages. /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); } @@ -1537,13 +1537,9 @@ pub type Executive = frame_executive::Executive< /// The payload being signed in the transactions. pub type SignedPayload = generic::SignedPayload; -#[cfg(feature = "runtime-benchmarks")] -#[macro_use] -extern crate frame_benchmarking; - #[cfg(feature = "runtime-benchmarks")] mod benches { - define_benchmarks!( + frame_benchmarking::define_benchmarks!( // Polkadot // NOTE: Make sure to prefix these with `runtime_common::` so // that the path resolves correctly in the generated file. diff --git a/runtime/parachains/src/initializer.rs b/runtime/parachains/src/initializer.rs index e78b113fce5c..c664cd83e7ec 100644 --- a/runtime/parachains/src/initializer.rs +++ b/runtime/parachains/src/initializer.rs @@ -266,7 +266,7 @@ impl Pallet { T::DisputesHandler::initializer_on_new_session(¬ification); T::SlashingHandler::initializer_on_new_session(session_index); dmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); - // ump::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); + // ump::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); hrmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); } diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 23ace7df5348..51cab3dcf6b1 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -207,6 +207,7 @@ mod check_upward_messages { } proptest::proptest! { + /// Takes random `enqueued` and `candidate` messages and checks that neither `check_upward_messages` nor `receive_upward_messages` panic. #[test] fn check_and_receive_do_not_panic(enqueued: Vec, candidate: Vec) { new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 023d295c6ad2..d587dad8c4c7 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1298,7 +1298,7 @@ impl parachains_paras::Config for Runtime { } parameter_types! { - /// Amount of weigh which can be spent per block to service messages. + /// Amount of weight that can be spent per block to service messages. /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); } @@ -1646,13 +1646,9 @@ pub type Executive = frame_executive::Executive< /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; -#[cfg(feature = "runtime-benchmarks")] -#[macro_use] -extern crate frame_benchmarking; - #[cfg(feature = "runtime-benchmarks")] mod benches { - define_benchmarks!( + frame_benchmarking::define_benchmarks!( // Polkadot // NOTE: Make sure to prefix these with `runtime_common::` so // the that path resolves correctly in the generated file. diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 866474463cb2..a13131e5efca 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1058,7 +1058,7 @@ impl parachains_paras::Config for Runtime { } parameter_types! { - /// Amount of weigh which can be spent per block to service messages. + /// Amount of weight that can be spent per block to service messages. /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); } @@ -1548,13 +1548,9 @@ frame_support::ord_parameter_types! { pub const MigController: AccountId = AccountId::from(hex_literal::hex!("52bc71c1eca5353749542dfdf0af97bf764f9c2f44e860cd485f1cd86400f649")); } -#[cfg(feature = "runtime-benchmarks")] -#[macro_use] -extern crate frame_benchmarking; - #[cfg(feature = "runtime-benchmarks")] mod benches { - define_benchmarks!( + frame_benchmarking::define_benchmarks!( // Polkadot // NOTE: Make sure to prefix these with `runtime_common::` so // the that path resolves correctly in the generated file. diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 8c444411d341..c65d72341324 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -924,7 +924,7 @@ impl parachains_paras::Config for Runtime { } parameter_types! { - /// Amount of weigh which can be spent per block to service messages. + /// Amount of weight that can be spent per block to service messages. /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); } @@ -1285,13 +1285,9 @@ pub type Executive = frame_executive::Executive< /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; -#[cfg(feature = "runtime-benchmarks")] -#[macro_use] -extern crate frame_benchmarking; - #[cfg(feature = "runtime-benchmarks")] mod benches { - define_benchmarks!( + frame_benchmarking::define_benchmarks!( // Polkadot // NOTE: Make sure to prefix these with `runtime_common::` so // the that path resolves correctly in the generated file. diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index 8e4468c23b94..f2fab9ab3416 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -63,5 +63,7 @@ impl< #[cfg(test)] mod tests { #[test] - fn process_message_works() {} + fn process_message_works() { + // FAIL-CI todo + } } From 91e523fdd10be8a307d8012c06ae06e08810e586 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 2 Feb 2023 13:12:20 +0100 Subject: [PATCH 056/182] Fix migration Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 8 +-- .../parachains/src/configuration/migration.rs | 65 ++++++++++--------- runtime/parachains/src/mock.rs | 10 +-- runtime/parachains/src/ump_tests.rs | 21 +++--- runtime/polkadot/src/lib.rs | 5 +- runtime/rococo/src/lib.rs | 5 +- runtime/westend/src/lib.rs | 5 +- 7 files changed, 64 insertions(+), 55 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 643e8055da71..c159fe567fd9 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1514,12 +1514,8 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { /// /// Should be cleared after every release. pub type Migrations = ( - // "Use 2D weights in XCM v3" - pallet_xcm::migration::v1::MigrateToV1, - // Remove stale entries in the set id -> session index storage map (after - // this release they will be properly pruned after the bonding duration has - // elapsed) - pallet_grandpa::migrations::CleanupSetIdSessionMap, + // Remove UMP dispatch queue + parachains_configuration::migration::MigrateV4ToV5, ); /// Unchecked extrinsic type as expected by this runtime. diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs index 204944f7cf94..f29d9877650a 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -20,15 +20,16 @@ use crate::configuration::{self, Config, Pallet, Store}; use frame_support::{pallet_prelude::*, traits::StorageVersion, weights::Weight}; use frame_system::pallet_prelude::BlockNumberFor; +pub use v5::MigrateV4ToV5; + /// The current storage version. /// /// v0-v1: /// v1-v2: -/// v2-v3: -/// v3-v4: (remove weights) -/// v3-v4: -// TODO -pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(4); +/// v2-v3: (remove weights) +/// v3-v4: (remove spam slots) +/// v4-v5: (remove UMP dispatch queue) +pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(5); pub mod v5 { use super::*; @@ -37,10 +38,8 @@ pub mod v5 { #[cfg(feature = "try-runtime")] use sp_std::prelude::*; - // Copied over from configuration.rs @ de9e147695b9f1be8bd44e07861a31e483c8343a and removed - // all the comments, and changed the Weight struct to Weight #[derive(parity_scale_codec::Encode, parity_scale_codec::Decode, Debug)] - pub struct OldHostConfiguration { + pub struct V4HostConfiguration { pub max_code_size: u32, pub max_head_data_size: u32, pub max_upward_queue_count: u32, @@ -86,7 +85,7 @@ pub mod v5 { pub minimum_validation_upgrade_delay: BlockNumber, } - impl> Default for OldHostConfiguration { + impl> Default for V4HostConfiguration { fn default() -> Self { Self { group_rotation_frequency: 1u32.into(), @@ -136,26 +135,29 @@ pub mod v5 { } } - pub struct MigrateToV5(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateToV5 { + pub struct MigrateV4ToV5(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for MigrateV4ToV5 { #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, &'static str> { log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade()"); - ensure!(StorageVersion::get::>() == 3, "The migration requires version 3"); + ensure!(StorageVersion::get::>() == 4, "The migration requires version 4"); Ok(Vec::new()) } fn on_runtime_upgrade() -> Weight { - if StorageVersion::get::>() == 3 { - let weight_consumed = migrate_to_v5::(); + if StorageVersion::get::>() == 4 { + let weight_consumed = migrate_v4_to_v5::(); - log::info!(target: configuration::LOG_TARGET, "MigrateToV4 executed successfully"); + log::info!( + target: configuration::LOG_TARGET, + "MigrateV4ToV5 executed successfully" + ); STORAGE_VERSION.put::>(); weight_consumed } else { - log::warn!(target: configuration::LOG_TARGET, "MigrateToV4 should be removed."); + log::warn!(target: configuration::LOG_TARGET, "MigrateV4ToV5 should be removed."); T::DbWeight::get().reads(1) } } @@ -165,7 +167,7 @@ pub mod v5 { log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade()"); ensure!( StorageVersion::get::>() == STORAGE_VERSION, - "Storage version should be 4 after the migration" + "Storage version should be 5 after the migration" ); Ok(()) @@ -173,14 +175,14 @@ pub mod v5 { } } -fn migrate_to_v5() -> Weight { +fn migrate_v4_to_v5() -> Weight { // Unusual formatting is justified: // - make it easier to verify that fields assign what they supposed to assign. // - this code is transient and will be removed after all migrations are done. // - this code is important enough to optimize for legibility sacrificing consistency. #[rustfmt::skip] let translate = - |pre: v5::OldHostConfiguration>| -> + |pre: v5::V4HostConfiguration>| -> configuration::HostConfiguration> { super::HostConfiguration { @@ -244,31 +246,33 @@ minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, #[cfg(test)] mod tests { + use frame_support::weights::constants::{WEIGHT_PROOF_SIZE_PER_MB, WEIGHT_REF_TIME_PER_MILLIS}; + use super::*; use crate::mock::{new_test_ext, Test}; #[test] - fn v3_deserialized_from_actual_data() { + fn v4_deserialized_from_actual_data() { // Example how to get new `raw_config`: - // We'll obtain the raw_config hes for block - // 15,772,152 (0xf89d3ab5312c5f70d396dc59612f0aa65806c798346f9db4b35278baed2e0e53) on Kusama. + // We'll obtain the raw_config for block + // 16,459,112 (0x6e19600753afca856aa6222e18d49abe8bcd9ac219d526ee07a119a8f5ef6d52) on Kusama. // Steps: // 1. Go to Polkadot.js -> Developer -> Chain state -> Storage: https://polkadot.js.org/apps/#/chainstate // 2. Set these parameters: // 2.1. selected state query: configuration; activeConfig(): PolkadotRuntimeParachainsConfigurationHostConfiguration - // 2.2. blockhash to query at: 0xf89d3ab5312c5f70d396dc59612f0aa65806c798346f9db4b35278baed2e0e53 (the hash of the block) + // 2.2. blockhash to query at: 0x6e19600753afca856aa6222e18d49abe8bcd9ac219d526ee07a119a8f5ef6d52 (the hash of the block) // 2.3. Note the value of encoded storage key -> 0x06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385 for the referenced block. // 2.4. You'll also need the decoded values to update the test. // 3. Go to Polkadot.js -> Developer -> Chain state -> Raw storage // 3.1 Enter the encoded storage key and you get the raw config. - // Fetched at Kusama 15,772,152 (0xf89d3ab5312c5f70d396dc59612f0aa65806c798346f9db4b35278baed2e0e53) + // Fetched at Kusama 16,459,112 (0x6e19600753afca856aa6222e18d49abe8bcd9ac219d526ee07a119a8f5ef6d52) // // This exceeds the maximal line width length, but that's fine, since this is not code and // doesn't need to be read and also leaving it as one line allows to easily copy it. let raw_config = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c800000700e8764817020040011e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c8000000060000005802000002000000580200000200000059000000000000001e000000280000000700c817a80402004001000200000014000000"]; - let v4 = v5::OldHostConfiguration::::decode(&mut &raw_config[..]) + let v4 = v5::V4HostConfiguration::::decode(&mut &raw_config[..]) .unwrap(); // We check only a sample of the values here. If we missed any fields or messed up data types @@ -278,12 +282,15 @@ mod tests { assert_eq!(v4.max_pov_size, 5_242_880); assert_eq!(v4.hrmp_channel_max_message_size, 102_400); assert_eq!(v4.n_delay_tranches, 89); - assert_eq!(v4.ump_max_individual_weight, Weight::zero()); + assert_eq!( + v4.ump_max_individual_weight, + Weight::from_parts(20 * WEIGHT_REF_TIME_PER_MILLIS, 5 * WEIGHT_PROOF_SIZE_PER_MB) + ); assert_eq!(v4.minimum_validation_upgrade_delay, 20); } #[test] - fn test_migrate_to_v5() { + fn test_migrate_v4_to_v5() { // Host configuration has lots of fields. However, in this migration we add only a couple of // fields. The most important part to check are a couple of the last fields. We also pick // extra fields to check arbitrarily, e.g. depending on their position (i.e. the middle) and @@ -292,7 +299,7 @@ mod tests { // We specify only the picked fields and the rest should be provided by the `Default` // implementation. That implementation is copied over between the two types and should work // fine. - let v4 = v5::OldHostConfiguration:: { + let v4 = v5::V4HostConfiguration:: { ump_max_individual_weight: Weight::from_parts(0x71616e6f6e0au64, 0x71616e6f6e0au64), needed_approvals: 69, thread_availability_period: 55, @@ -310,7 +317,7 @@ mod tests { &v4.encode(), ); - migrate_to_v5::(); + migrate_v4_to_v5::(); let v5 = configuration::ActiveConfig::::get(); diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 1f2e872df121..c716de419069 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -18,7 +18,7 @@ use crate::{ configuration, disputes, dmp, hrmp, - inclusion::{self, MessageOrigin, SubQueue}, + inclusion::{self}, initializer, origin, paras, paras_inherent, scheduler, session_info, shared, ParaId, }; @@ -424,23 +424,23 @@ parameter_types! { /// `u32`. pub struct TestProcessMessage; impl ProcessMessage for TestProcessMessage { - type Origin = MessageOrigin; + type Origin = ParaId; + fn process_message( message: &[u8], - origin: MessageOrigin, + origin: ParaId, weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { let weight = match u32::decode(&mut &message[..]) { Ok(w) => Weight::from_parts(w as u64, w as u64), Err(_) => return Err(ProcessMessageError::Corrupt), // same as the real `ProcessMessage` }; - debug_assert!(origin.queue == SubQueue::UMP); if weight.any_gt(weight_limit) { return Err(ProcessMessageError::Overweight(weight)) } let mut processed = Processed::get(); - processed.push((origin.para, message.to_vec())); + processed.push((origin, message.to_vec())); Processed::set(processed); Ok((true, weight)) } diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 51cab3dcf6b1..96189428229f 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see . use crate::{ - inclusion::{MessageOrigin, UmpAcceptanceCheckErr}, + inclusion::UmpAcceptanceCheckErr, mock::{ assert_last_event, assert_last_events, new_test_ext, Configuration, MessageQueue, MessageQueueSize, MockGenesisConfig, ParaInclusion, Processed, System, Test, @@ -385,10 +385,7 @@ fn service_overweight_unknown() { // the next test. new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { assert_noop!( - ::execute_overweight( - Weight::MAX, - (MessageOrigin::ump(0u32.into()), 0, 0) - ), + ::execute_overweight(Weight::MAX, (0u32.into(), 0, 0)), ExecuteOverweightError::NotFound, ); }); @@ -421,21 +418,21 @@ fn overweight_queue_works() { [ pallet_message_queue::Event::::Processed { hash: hash_1.clone(), - origin: MessageOrigin::ump(para_a), + origin: para_a, weight_used: Weight::from_parts(301, 301), success: true, } .into(), pallet_message_queue::Event::::OverweightEnqueued { hash: hash_2.clone(), - origin: MessageOrigin::ump(para_a), + origin: para_a, page_index: 0, message_index: 1, } .into(), pallet_message_queue::Event::::OverweightEnqueued { hash: hash_3.clone(), - origin: MessageOrigin::ump(para_a), + origin: para_a, page_index: 0, message_index: 2, } @@ -450,7 +447,7 @@ fn overweight_queue_works() { assert_noop!( ::execute_overweight( Weight::from_parts(500, 500), - (MessageOrigin::ump(para_a), 0, 2) + (para_a, 0, 2) ), ExecuteOverweightError::InsufficientWeight, ); @@ -458,12 +455,12 @@ fn overweight_queue_works() { // ... and if we try to service it with just enough weight it will succeed as well. assert_ok!(::execute_overweight( Weight::from_parts(501, 501), - (MessageOrigin::ump(para_a), 0, 2) + (para_a, 0, 2) )); assert_last_event( pallet_message_queue::Event::::Processed { hash: hash_3, - origin: MessageOrigin::ump(para_a), + origin: para_a, weight_used: Weight::from_parts(501, 501), success: true, } @@ -475,7 +472,7 @@ fn overweight_queue_works() { assert_noop!( ::execute_overweight( Weight::from_parts(501, 501), - (MessageOrigin::ump(para_a), 0, 2) + (para_a, 0, 2) ), ExecuteOverweightError::NotFound, ); diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index d587dad8c4c7..e3b39c147a2e 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1628,7 +1628,10 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { /// All migrations that will run on the next runtime upgrade. /// /// Should be cleared after every release. -pub type Migrations = (parachains_configuration::migration::v5::MigrateToV5,); +pub type Migrations = ( + // Remove UMP dispatch queue + parachains_configuration::migration::MigrateV4ToV5, +); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index a13131e5efca..5e1eb59645c3 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1509,7 +1509,10 @@ pub type UncheckedExtrinsic = /// All migrations that will run on the next runtime upgrade. /// /// Should be cleared after every release. -pub type Migrations = (); +pub type Migrations = ( + // Remove UMP dispatch queue + parachains_configuration::migration::MigrateV4ToV5, +); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index c65d72341324..ecf6661fb0e9 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1268,7 +1268,10 @@ impl Get<&'static str> for StakingMigrationV11OldPallet { /// All migrations that will run on the next runtime upgrade. /// /// Should be cleared after every release. -pub type Migrations = (); +pub type Migrations = ( + // Remove UMP dispatch queue + parachains_configuration::migration::MigrateV4ToV5, +); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = From 0da1bc1ecb0b214788f6319a0bc58af27bdcf546 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 2 Feb 2023 20:37:24 +0100 Subject: [PATCH 057/182] Use master Cargo.lock Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 444 ++++++++++++++++++++++------------------------------- 1 file changed, 181 insertions(+), 263 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bba11367093b..9c0db863c3ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -455,7 +455,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "array-bytes", "async-trait", @@ -489,7 +489,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "beefy-gadget", "futures", @@ -508,7 +508,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "sp-api", "sp-beefy", @@ -543,21 +543,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bitflags" version = "1.3.2" @@ -2306,7 +2291,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", ] @@ -2330,7 +2315,7 @@ checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support", "frame-support-procedural", @@ -2355,7 +2340,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "Inflector", "array-bytes", @@ -2402,7 +2387,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2413,7 +2398,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2430,7 +2415,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support", "frame-system", @@ -2459,7 +2444,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "futures", "log", @@ -2475,7 +2460,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "bitflags", "frame-metadata", @@ -2507,7 +2492,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "Inflector", "cfg-expr", @@ -2522,7 +2507,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2534,7 +2519,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "proc-macro2", "quote", @@ -2544,7 +2529,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -2568,7 +2553,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support", "frame-system", @@ -2579,7 +2564,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support", "log", @@ -2597,7 +2582,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -2612,7 +2597,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "sp-api", @@ -2621,7 +2606,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support", "parity-scale-codec", @@ -2792,7 +2777,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "chrono", "frame-election-provider-support", @@ -3598,7 +3583,6 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", - "pallet-message-queue", "pallet-multisig", "pallet-nis", "pallet-nomination-pools", @@ -4546,7 +4530,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "futures", "log", @@ -4565,7 +4549,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "anyhow", "jsonrpsee", @@ -5130,7 +5114,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5145,7 +5129,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support", "frame-system", @@ -5161,7 +5145,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support", "frame-system", @@ -5175,7 +5159,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5199,7 +5183,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5219,7 +5203,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5238,7 +5222,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5253,7 +5237,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support", "frame-system", @@ -5269,7 +5253,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "array-bytes", "beefy-merkle-tree", @@ -5292,7 +5276,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5310,7 +5294,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5329,7 +5313,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5346,7 +5330,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5363,7 +5347,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5381,7 +5365,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5404,7 +5388,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5417,7 +5401,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5435,7 +5419,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5453,7 +5437,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5476,7 +5460,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5492,7 +5476,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5512,7 +5496,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5529,24 +5513,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-message-queue" -version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5554,18 +5521,16 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", "sp-std", - "sp-weights", ] [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5582,7 +5547,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5598,7 +5563,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5614,7 +5579,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support", "frame-system", @@ -5631,7 +5596,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5651,7 +5616,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "sp-api", @@ -5661,7 +5626,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support", "frame-system", @@ -5678,7 +5643,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5702,7 +5667,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5719,7 +5684,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5734,7 +5699,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5752,7 +5717,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5767,7 +5732,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5786,7 +5751,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5803,7 +5768,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support", "frame-system", @@ -5824,7 +5789,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5840,7 +5805,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support", "frame-system", @@ -5854,7 +5819,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5877,7 +5842,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5888,7 +5853,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "log", "sp-arithmetic", @@ -5897,7 +5862,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5914,7 +5879,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support", "frame-system", @@ -5928,7 +5893,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5946,7 +5911,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -5965,7 +5930,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-support", "frame-system", @@ -5981,7 +5946,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5997,7 +5962,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6009,7 +5974,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -6026,7 +5991,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -6041,7 +6006,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -6057,7 +6022,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -6072,7 +6037,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-benchmarking", "frame-support", @@ -7420,7 +7385,6 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", - "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7579,7 +7543,6 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", - "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -7588,7 +7551,6 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-runtime-metrics", - "proptest", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", @@ -8190,26 +8152,6 @@ dependencies = [ "regex", ] -[[package]] -name = "proptest" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" -dependencies = [ - "bit-set", - "bitflags", - "byteorder", - "lazy_static", - "num-traits", - "quick-error 2.0.1", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_xorshift", - "regex-syntax", - "rusty-fork", - "tempfile", -] - [[package]] name = "prost" version = "0.11.0" @@ -8444,15 +8386,6 @@ dependencies = [ "rand_core 0.6.3", ] -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core 0.6.3", -] - [[package]] name = "rawpointer" version = "0.2.1" @@ -8741,7 +8674,6 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", - "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -8969,18 +8901,6 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error 1.2.3", - "tempfile", - "wait-timeout", -] - [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -9010,7 +8930,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "log", "sp-core", @@ -9021,7 +8941,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "futures", @@ -9048,7 +8968,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "futures", "futures-timer", @@ -9071,7 +8991,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9087,7 +9007,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9102,7 +9022,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9113,7 +9033,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "array-bytes", "chrono", @@ -9153,7 +9073,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "fnv", "futures", @@ -9179,7 +9099,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "hash-db", "kvdb", @@ -9205,7 +9125,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "futures", @@ -9230,7 +9150,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "fork-tree", @@ -9268,7 +9188,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "futures", "jsonrpsee", @@ -9290,7 +9210,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9303,7 +9223,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "futures", @@ -9326,7 +9246,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -9350,7 +9270,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9363,7 +9283,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "log", "sc-allocator", @@ -9376,7 +9296,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "cfg-if", "libc", @@ -9393,7 +9313,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "ahash 0.8.2", "array-bytes", @@ -9433,7 +9353,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "finality-grandpa", "futures", @@ -9453,7 +9373,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "ansi_term", "futures", @@ -9468,7 +9388,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "array-bytes", "async-trait", @@ -9483,7 +9403,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "array-bytes", "async-trait", @@ -9525,7 +9445,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "cid", "futures", @@ -9544,7 +9464,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "bitflags", @@ -9570,7 +9490,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "ahash 0.8.2", "futures", @@ -9588,7 +9508,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "array-bytes", "futures", @@ -9609,7 +9529,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "array-bytes", "async-trait", @@ -9641,7 +9561,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "array-bytes", "futures", @@ -9660,7 +9580,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "array-bytes", "bytes", @@ -9690,7 +9610,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "futures", "libp2p", @@ -9703,7 +9623,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9712,7 +9632,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "futures", "jsonrpsee", @@ -9742,7 +9662,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9761,7 +9681,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "http", "jsonrpsee", @@ -9776,7 +9696,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "array-bytes", "futures", @@ -9802,7 +9722,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "directories", @@ -9868,7 +9788,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "log", "parity-scale-codec", @@ -9879,7 +9799,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "clap 4.0.15", "futures", @@ -9895,7 +9815,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9914,7 +9834,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "futures", "libc", @@ -9933,7 +9853,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "chrono", "futures", @@ -9952,7 +9872,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "ansi_term", "atty", @@ -9983,7 +9903,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9994,7 +9914,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "futures", @@ -10021,7 +9941,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "futures", @@ -10035,7 +9955,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "backtrace", "futures", @@ -10542,7 +10462,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "hash-db", "log", @@ -10560,7 +10480,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "blake2", "proc-macro-crate", @@ -10572,7 +10492,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "scale-info", @@ -10585,7 +10505,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "integer-sqrt", "num-traits", @@ -10599,7 +10519,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "scale-info", @@ -10612,7 +10532,7 @@ dependencies = [ [[package]] name = "sp-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "scale-info", @@ -10629,7 +10549,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "sp-api", @@ -10641,7 +10561,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "futures", "log", @@ -10659,7 +10579,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "futures", @@ -10677,7 +10597,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "merlin", @@ -10700,7 +10620,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "scale-info", @@ -10712,7 +10632,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "scale-info", @@ -10725,7 +10645,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "array-bytes", "base58", @@ -10767,7 +10687,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "blake2", "byteorder", @@ -10781,7 +10701,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "proc-macro2", "quote", @@ -10792,7 +10712,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10801,7 +10721,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "proc-macro2", "quote", @@ -10811,7 +10731,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "environmental", "parity-scale-codec", @@ -10822,7 +10742,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "finality-grandpa", "log", @@ -10840,7 +10760,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10854,7 +10774,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "bytes", "ed25519", @@ -10879,7 +10799,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "lazy_static", "sp-core", @@ -10890,7 +10810,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "futures", @@ -10907,7 +10827,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "thiserror", "zstd", @@ -10916,7 +10836,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -10934,7 +10854,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "scale-info", @@ -10948,7 +10868,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "sp-api", "sp-core", @@ -10958,7 +10878,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "backtrace", "lazy_static", @@ -10968,7 +10888,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "rustc-hash", "serde", @@ -10978,7 +10898,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "either", "hash256-std-hasher", @@ -11000,7 +10920,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11018,7 +10938,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "Inflector", "proc-macro-crate", @@ -11030,7 +10950,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "scale-info", @@ -11044,7 +10964,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "scale-info", @@ -11056,7 +10976,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "hash-db", "log", @@ -11076,12 +10996,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11094,7 +11014,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "futures-timer", @@ -11109,7 +11029,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "sp-std", @@ -11121,7 +11041,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "sp-api", "sp-runtime", @@ -11130,7 +11050,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "log", @@ -11146,7 +11066,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "ahash 0.8.2", "hash-db", @@ -11169,7 +11089,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11186,7 +11106,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11197,7 +11117,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "impl-trait-for-tuples", "log", @@ -11210,7 +11130,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "parity-scale-codec", "scale-info", @@ -11443,7 +11363,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "platforms", ] @@ -11451,7 +11371,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11470,7 +11390,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "hyper", "log", @@ -11482,7 +11402,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "async-trait", "jsonrpsee", @@ -11495,7 +11415,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "jsonrpsee", "log", @@ -11514,7 +11434,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "array-bytes", "async-trait", @@ -11540,7 +11460,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11550,7 +11470,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11561,7 +11481,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "ansi_term", "build-helper", @@ -12362,7 +12282,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3bc3742d5c0c5269353d7809d9f8f91104a93273" +source = "git+https://github.com/paritytech/substrate?branch=master#68d00e2d5132ef32e564e0320e89dfac57e1c46e" dependencies = [ "clap 4.0.15", "frame-remote-externalities", @@ -13318,7 +13238,6 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", - "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -13754,7 +13673,6 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "sp-weights", "xcm", "xcm-executor", ] From c08a7a0a658ab7759604feed85874de8063d7fac Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 2 Feb 2023 21:03:50 +0100 Subject: [PATCH 058/182] Lockfile Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index d1fafa7ba0b8..3697134b91a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -542,6 +542,21 @@ dependencies = [ "shlex", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" @@ -3582,6 +3597,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nis", "pallet-nomination-pools", @@ -5527,6 +5543,25 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-message-queue" +version = "7.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#83de5099a3cae683ccbaf2ab7a4d688e2d602f57" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", +] + [[package]] name = "pallet-mmr" version = "4.0.0-dev" @@ -7385,6 +7420,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7543,6 +7579,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -7551,6 +7588,7 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-runtime-metrics", + "proptest", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", @@ -8152,6 +8190,26 @@ dependencies = [ "regex", ] +[[package]] +name = "proptest" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" +dependencies = [ + "bit-set", + "bitflags", + "byteorder", + "lazy_static", + "num-traits", + "quick-error 2.0.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax", + "rusty-fork", + "tempfile", +] + [[package]] name = "prost" version = "0.11.0" @@ -8386,6 +8444,15 @@ dependencies = [ "rand_core 0.6.3", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.3", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -8674,6 +8741,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -8901,6 +8969,18 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error 1.2.3", + "tempfile", + "wait-timeout", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -13240,6 +13320,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -13675,6 +13756,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", "xcm", "xcm-executor", ] From 5c42d8ef02ba9476abd95b17c7e3fa58edcf34b1 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 2 Feb 2023 21:22:44 +0100 Subject: [PATCH 059/182] Fix test Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 2 +- runtime/polkadot/src/lib.rs | 2 +- runtime/rococo/src/lib.rs | 2 +- runtime/test-runtime/src/lib.rs | 12 +++--------- runtime/westend/src/lib.rs | 2 +- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index c159fe567fd9..b0e8713cfa05 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1143,7 +1143,7 @@ impl parachains_paras::Config for Runtime { parameter_types! { /// Amount of weight that can be spent per block to service messages. - /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. + /// FAIL-CI: Pretty random value. pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index e3b39c147a2e..e2acb8d7742e 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1299,7 +1299,7 @@ impl parachains_paras::Config for Runtime { parameter_types! { /// Amount of weight that can be spent per block to service messages. - /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. + /// FAIL-CI: Pretty random value. pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index ff81c956be54..1ecf4f85445e 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1059,7 +1059,7 @@ impl parachains_paras::Config for Runtime { parameter_types! { /// Amount of weight that can be spent per block to service messages. - /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. + /// FAIL-CI: Pretty random value. pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); } diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index e6613ba9123b..8a58761898b9 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -30,7 +30,7 @@ use polkadot_runtime_parachains::{ initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, runtime_api_impl::v2 as runtime_impl, scheduler as parachains_scheduler, session_info as parachains_session_info, - shared as parachains_shared, ump as parachains_ump, + shared as parachains_shared, }; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; @@ -488,6 +488,8 @@ impl parachains_inclusion::Config for Runtime { type RuntimeEvent = RuntimeEvent; type DisputesHandler = ParasDisputes; type RewardValidators = RewardValidatorsWithEraPoints; + type MessageQueue = (); + type WeightInfo = (); // FAIL-CI todo } impl parachains_disputes::Config for Runtime { @@ -528,14 +530,6 @@ parameter_types! { pub const FirstMessageFactorPercent: u64 = 100; } -impl parachains_ump::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type UmpSink = (); - type FirstMessageFactorPercent = FirstMessageFactorPercent; - type ExecuteOverweightOrigin = frame_system::EnsureRoot; - type WeightInfo = parachains_ump::TestWeightInfo; -} - impl parachains_hrmp::Config for Runtime { type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index ecf6661fb0e9..ca0841a7535c 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -925,7 +925,7 @@ impl parachains_paras::Config for Runtime { parameter_types! { /// Amount of weight that can be spent per block to service messages. - /// FAIL-CI: Pretty random value. Should eventually be the sum of `UMP+DMP+HRMP`. + /// FAIL-CI: Pretty random value. pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); } From 541c79004512077e2319d1404111a35cf276fe5c Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 23 Feb 2023 11:03:48 +0100 Subject: [PATCH 060/182] Add AggregateMessageOrigin This enum currently only holds one value, but having it will make it easier in the future to extend. Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 24 +++++++++++++++++------ runtime/parachains/src/inclusion/tests.rs | 10 ++++++++++ runtime/parachains/src/mock.rs | 9 +++++++-- runtime/parachains/src/ump_tests.rs | 18 ++++++++--------- 4 files changed, 44 insertions(+), 17 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index e9b7f367a19f..99151e5e29a2 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -213,6 +213,15 @@ pub fn minimum_backing_votes(n_validators: usize) -> usize { sp_std::cmp::min(n_validators, 2) } +/// Aggregate message origin for the `MessageQueue` pallet. +/// +/// Can be extended to serve further use-cases besides just UMP. Changing this possibly requires a migration. +#[derive(Encode, Decode, Clone, MaxEncodedLen, Eq, PartialEq, RuntimeDebug, TypeInfo)] +pub enum AggregateMessageOrigin { + /// Incoming upwards message from a parachain. + UMP(ParaId), +} + #[frame_support::pallet] pub mod pallet { use super::*; @@ -238,8 +247,8 @@ pub mod pallet { /// The system message queue. /// - /// The message queue provides general queueing and processing functionality. Currently it replaces the old `UMP` dispatch queue. Other use-cases can be implemented as well. - type MessageQueue: EnqueueMessage; + /// The message queue provides general queueing and processing functionality. Currently it replaces the old `UMP` dispatch queue. Other use-cases can be implemented as well by adding new variants to `AggregateMessageOrigin`. + type MessageQueue: EnqueueMessage; } #[pallet::event] @@ -902,7 +911,7 @@ impl Pallet { }) } - let fp = T::MessageQueue::footprint(para); + let fp = T::MessageQueue::footprint(AggregateMessageOrigin::UMP(para)); let (para_queue_count, mut para_queue_size) = (fp.count, fp.size); if para_queue_count @@ -956,7 +965,7 @@ impl Pallet { let count = upward_messages.len() as u32; Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); let messages = upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); - T::MessageQueue::enqueue_messages(messages, para); + T::MessageQueue::enqueue_messages(messages, AggregateMessageOrigin::UMP(para)); ::WeightInfo::receive_upward_messages(count) } @@ -1090,8 +1099,11 @@ impl AcceptanceCheckErr { } } -impl OnQueueChanged for Pallet { - fn on_queue_changed(para: ParaId, count: u64, size: u64) { +impl OnQueueChanged for Pallet { + fn on_queue_changed(origin: AggregateMessageOrigin, count: u64, size: u64) { + let para = match origin { + AggregateMessageOrigin::UMP(p) => p, + }; // TODO maybe migrate this to u64 let (count, size) = (count.saturated_into(), size.saturated_into()); // TODO paritytech/polkadot#6283: Remove all usages of `relay_dispatch_queue_size` diff --git a/runtime/parachains/src/inclusion/tests.rs b/runtime/parachains/src/inclusion/tests.rs index 818058d460f8..5d7cfe486492 100644 --- a/runtime/parachains/src/inclusion/tests.rs +++ b/runtime/parachains/src/inclusion/tests.rs @@ -43,6 +43,8 @@ use test_helpers::{ dummy_candidate_receipt, dummy_collator, dummy_collator_signature, dummy_hash, dummy_validation_code, }; +use hex_literal::hex; +use parity_scale_codec::DecodeAll; fn default_config() -> HostConfiguration { let mut config = HostConfiguration::default(); @@ -1968,3 +1970,11 @@ fn session_change_wipes() { assert!(>::iter().collect::>().is_empty()); }); } + +#[test] +fn aggregate_origin_decode_regression_check() { + let ump = AggregateMessageOrigin::UMP(u32::MAX.into()); + let raw = hex!("00ffffffff"); + let decoded = AggregateMessageOrigin::decode_all(&mut &raw[..]); + assert_eq!(decoded, Ok(ump), "Migration needed for AggregateMessageOrigin"); +} diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index c716de419069..9fbd1d24fe20 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -21,6 +21,7 @@ use crate::{ inclusion::{self}, initializer, origin, paras, paras_inherent, scheduler, session_info, shared, ParaId, }; +use crate::inclusion::AggregateMessageOrigin; use frame_support::{ parameter_types, @@ -424,13 +425,17 @@ parameter_types! { /// `u32`. pub struct TestProcessMessage; impl ProcessMessage for TestProcessMessage { - type Origin = ParaId; + type Origin = AggregateMessageOrigin; fn process_message( message: &[u8], - origin: ParaId, + origin: AggregateMessageOrigin, weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { + let origin = match origin { + AggregateMessageOrigin::UMP(o) => o, + }; + let weight = match u32::decode(&mut &message[..]) { Ok(w) => Weight::from_parts(w as u64, w as u64), Err(_) => return Err(ProcessMessageError::Corrupt), // same as the real `ProcessMessage` diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 96189428229f..bb0af0cfcb02 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see . use crate::{ - inclusion::UmpAcceptanceCheckErr, + inclusion::{UmpAcceptanceCheckErr, AggregateMessageOrigin::UMP}, mock::{ assert_last_event, assert_last_events, new_test_ext, Configuration, MessageQueue, MessageQueueSize, MockGenesisConfig, ParaInclusion, Processed, System, Test, @@ -385,7 +385,7 @@ fn service_overweight_unknown() { // the next test. new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { assert_noop!( - ::execute_overweight(Weight::MAX, (0u32.into(), 0, 0)), + ::execute_overweight(Weight::MAX, (UMP(0u32.into()), 0, 0)), ExecuteOverweightError::NotFound, ); }); @@ -418,21 +418,21 @@ fn overweight_queue_works() { [ pallet_message_queue::Event::::Processed { hash: hash_1.clone(), - origin: para_a, + origin: UMP(para_a), weight_used: Weight::from_parts(301, 301), success: true, } .into(), pallet_message_queue::Event::::OverweightEnqueued { hash: hash_2.clone(), - origin: para_a, + origin: UMP(para_a), page_index: 0, message_index: 1, } .into(), pallet_message_queue::Event::::OverweightEnqueued { hash: hash_3.clone(), - origin: para_a, + origin: UMP(para_a), page_index: 0, message_index: 2, } @@ -447,7 +447,7 @@ fn overweight_queue_works() { assert_noop!( ::execute_overweight( Weight::from_parts(500, 500), - (para_a, 0, 2) + (UMP(para_a), 0, 2) ), ExecuteOverweightError::InsufficientWeight, ); @@ -455,12 +455,12 @@ fn overweight_queue_works() { // ... and if we try to service it with just enough weight it will succeed as well. assert_ok!(::execute_overweight( Weight::from_parts(501, 501), - (para_a, 0, 2) + (UMP(para_a), 0, 2) )); assert_last_event( pallet_message_queue::Event::::Processed { hash: hash_3, - origin: para_a, + origin: UMP(para_a), weight_used: Weight::from_parts(501, 501), success: true, } @@ -472,7 +472,7 @@ fn overweight_queue_works() { assert_noop!( ::execute_overweight( Weight::from_parts(501, 501), - (para_a, 0, 2) + (UMP(para_a), 0, 2) ), ExecuteOverweightError::NotFound, ); From fe5df72abac5fa1315f3ff13c2d6bcf7784b70c2 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 23 Feb 2023 11:05:08 +0100 Subject: [PATCH 061/182] Forbid UMP for off-boarding paras - Reject candidates with UMP messages for off-boarding paras - Forbid scheduling off-boarding when a para has unprocess UMPs Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 30 +++++++++++++++++++++++++ runtime/parachains/src/mock.rs | 1 + runtime/parachains/src/paras/mod.rs | 15 +++++++++++-- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 99151e5e29a2..9f406761fc45 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -213,6 +213,16 @@ pub fn minimum_backing_votes(n_validators: usize) -> usize { sp_std::cmp::min(n_validators, 2) } +pub trait UmpQueueTracker { + fn message_count(para: ParaId) -> u64; +} + +impl UmpQueueTracker for () { + fn message_count(_: ParaId) -> u64 { + 0 + } +} + /// Aggregate message origin for the `MessageQueue` pallet. /// /// Can be extended to serve further use-cases besides just UMP. Changing this possibly requires a migration. @@ -373,6 +383,8 @@ pub enum UmpAcceptanceCheckErr { CapacityExceeded { count: u64, limit: u64 }, /// The allowed combined message size in the queue was exceeded. TotalSizeExceeded { total_size: u64, limit: u64 }, + /// A para-chain cannot send UMP messages while it is offboarding. + IsOffboarding, } impl fmt::Debug for UmpAcceptanceCheckErr { @@ -398,6 +410,10 @@ impl fmt::Debug for UmpAcceptanceCheckErr { "the ump queue would have grown past the max size permitted by config ({} > {})", total_size, limit, ), + UmpAcceptanceCheckErr::IsOffboarding => write!( + fmt, + "upward message rejected because the para is off-boarding", + ), } } } @@ -903,6 +919,14 @@ impl Pallet { para: ParaId, upward_messages: &[UpwardMessage], ) -> Result<(), UmpAcceptanceCheckErr> { + // Cannot send UMP messages while off-boarding. + if >::lifecycle(para).map_or(false, |l| l.is_offboarding()) { + ensure!( + upward_messages.is_empty(), + UmpAcceptanceCheckErr::IsOffboarding, + ); + } + let additional_msgs = upward_messages.len(); if additional_msgs > config.max_upward_message_num_per_candidate as usize { return Err(UmpAcceptanceCheckErr::MoreMessagesThanPermitted { @@ -1255,3 +1279,9 @@ impl CandidateCheckContext { Ok(()) } } + +impl UmpQueueTracker for Pallet { + fn message_count(para: ParaId) -> u64 { + T::MessageQueue::footprint(AggregateMessageOrigin::UMP(para)).count + } +} diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 9fbd1d24fe20..3f9659131d0e 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -214,6 +214,7 @@ impl crate::paras::Config for Test { type RuntimeEvent = RuntimeEvent; type WeightInfo = crate::paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; + type UmpQueueTracker = ParaInclusion; type NextSessionRotation = TestNextSessionRotation; } diff --git a/runtime/parachains/src/paras/mod.rs b/runtime/parachains/src/paras/mod.rs index e5297bd64f6c..4a7f6889af52 100644 --- a/runtime/parachains/src/paras/mod.rs +++ b/runtime/parachains/src/paras/mod.rs @@ -108,6 +108,7 @@ //! use crate::{configuration, initializer::SessionChangeNotification, shared}; +use crate::inclusion::UmpQueueTracker; use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec}; use frame_support::{pallet_prelude::*, traits::EstimateNextSessionRotation}; use frame_system::pallet_prelude::*; @@ -551,6 +552,11 @@ pub mod pallet { type NextSessionRotation: EstimateNextSessionRotation; + /// Retrieve how many UMP messages are enqueued for this para-chain. + /// + /// This is used to judge whether or not a para-chain can offboard. Per default this should be set to the `ParaInclusion` pallet. + type UmpQueueTracker: UmpQueueTracker; + /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; } @@ -1672,12 +1678,13 @@ impl Pallet { /// /// - para is not a stable parachain or parathread (i.e. [`ParaLifecycle::is_stable`] is `false`) /// - para has a pending upgrade. + /// - para has unprocessed messages in its UMP queue. /// /// No-op if para is not registered at all. pub(crate) fn schedule_para_cleanup(id: ParaId) -> DispatchResult { // Disallow offboarding in case there is a PVF pre-checking in progress. // - // This is not a fundamential limitation but rather simplification: it allows us to get + // This is not a fundamental limitation but rather simplification: it allows us to get // away without introducing additional logic for pruning and, more importantly, enacting // ongoing PVF pre-checking votes. It also removes some nasty edge cases. // @@ -1702,7 +1709,7 @@ impl Pallet { Some(ParaLifecycle::Parachain) => { ParaLifecycles::::insert(&id, ParaLifecycle::OffboardingParachain); }, - _ => return Err(Error::::CannotOffboard)?, + _ => return Err(Error::::CannotOffboard.into()), } let scheduled_session = Self::scheduled_session(); @@ -1712,6 +1719,10 @@ impl Pallet { } }); + if ::UmpQueueTracker::message_count(id) != 0 { + return Err(Error::::CannotOffboard.into()) + } + Ok(()) } From b8f01e17258ea167ed2f88ec3a80028ef4903d4f Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 23 Feb 2023 11:20:03 +0100 Subject: [PATCH 062/182] Delete stupid test Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 57 ----------------------------- runtime/parachains/Cargo.toml | 1 - runtime/parachains/src/ump_tests.rs | 15 -------- 3 files changed, 73 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0382d459947a..3814da211520 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -542,21 +542,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bitflags" version = "1.3.2" @@ -7634,7 +7619,6 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-runtime-metrics", - "proptest", "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", @@ -8236,26 +8220,6 @@ dependencies = [ "regex", ] -[[package]] -name = "proptest" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" -dependencies = [ - "bit-set", - "bitflags", - "byteorder", - "lazy_static", - "num-traits", - "quick-error 2.0.1", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_xorshift", - "regex-syntax", - "rusty-fork", - "tempfile", -] - [[package]] name = "prost" version = "0.11.0" @@ -8480,15 +8444,6 @@ dependencies = [ "rand_core 0.6.3", ] -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core 0.6.3", -] - [[package]] name = "rawpointer" version = "0.2.1" @@ -9005,18 +8960,6 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error 1.2.3", - "tempfile", - "wait-timeout", -] - [[package]] name = "rw-stream-sink" version = "0.3.0" diff --git a/runtime/parachains/Cargo.toml b/runtime/parachains/Cargo.toml index 49a53971bb20..b68e0cc31b25 100644 --- a/runtime/parachains/Cargo.toml +++ b/runtime/parachains/Cargo.toml @@ -60,7 +60,6 @@ sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master thousands = "0.2.0" assert_matches = "1" serde_json = "1.0.85" -proptest = "1.0.0" [features] default = ["std"] diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 577731e087ee..8ed3344428e7 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -205,21 +205,6 @@ mod check_upward_messages { ); }); } - - proptest::proptest! { - /// Takes random `enqueued` and `candidate` messages and checks that neither `check_upward_messages` nor `receive_upward_messages` panic. - #[test] - fn check_and_receive_do_not_panic(enqueued: Vec, candidate: Vec) { - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - let cfg = Configuration::config(); - - let _ = ParaInclusion::check_upward_messages(&cfg, P_0, &enqueued); - ParaInclusion::receive_upward_messages(&cfg, P_0, enqueued); - let _ = ParaInclusion::check_upward_messages(&cfg, P_0, &candidate); - ParaInclusion::receive_upward_messages(&cfg, P_0, candidate); - }); - } - } } #[test] From 86f1782590d9fc2039a04d018945b87e08c1e81c Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 23 Feb 2023 11:20:29 +0100 Subject: [PATCH 063/182] Use BoundedVec for upward messages Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 3 ++- runtime/parachains/src/ump_tests.rs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 9898571c8de7..a5599bb12d0a 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -41,6 +41,7 @@ use primitives::{ GroupIndex, Hash, HeadData, Id as ParaId, SigningContext, UncheckedSignedAvailabilityBitfields, UpwardMessage, ValidatorId, ValidatorIndex, ValidityAttestation, }; +use polkadot_parachain::primitives::UpwardMessages; use scale_info::TypeInfo; use sp_runtime::{traits::One, DispatchError, SaturatedConversion}; use sp_std::{collections::btree_set::BTreeSet, fmt, prelude::*}; @@ -975,7 +976,7 @@ impl Pallet { pub(crate) fn receive_upward_messages( _config: &HostConfiguration, para: ParaId, - upward_messages: Vec, + upward_messages: UpwardMessages, ) -> Weight { if upward_messages.is_empty() { return Weight::zero() diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 8ed3344428e7..d375b5340fb2 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -82,7 +82,7 @@ fn default_genesis_config() -> MockGenesisConfig { fn queue_upward_msg(para: ParaId, msg: UpwardMessage) { let msgs = vec![msg]; assert!(ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs).is_ok()); - let _ = ParaInclusion::receive_upward_messages(&Configuration::config(), para, msgs); + let _ = ParaInclusion::receive_upward_messages(&Configuration::config(), para, msgs.try_into().unwrap()); } mod check_upward_messages { @@ -105,7 +105,7 @@ mod check_upward_messages { } fn queue(para: ParaId, msgs: Vec) { - let _ = ParaInclusion::receive_upward_messages(&Configuration::config(), para, msgs); + let _ = ParaInclusion::receive_upward_messages(&Configuration::config(), para, msgs.try_into().unwrap()); } #[test] From d7b325b8b57601007867d560b223acb078d96273 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 23 Feb 2023 12:49:15 +0100 Subject: [PATCH 064/182] Add weights and fix MessageProcessor Signed-off-by: Oliver Tale-Yazdi --- primitives/src/v2/mod.rs | 2 + runtime/kusama/src/lib.rs | 14 ++-- runtime/kusama/src/weights/mod.rs | 1 + .../weights/runtime_parachains_inclusion.rs | 66 +++++++++++++++++++ .../parachains/src/inclusion/benchmarking.rs | 4 +- runtime/parachains/src/inclusion/mod.rs | 10 ++- runtime/parachains/src/ump_tests.rs | 12 +++- runtime/polkadot/src/lib.rs | 16 +++-- runtime/polkadot/src/weights/mod.rs | 1 + .../weights/runtime_parachains_inclusion.rs | 66 +++++++++++++++++++ runtime/rococo/src/lib.rs | 14 ++-- runtime/rococo/src/weights/mod.rs | 1 + .../weights/runtime_parachains_inclusion.rs | 66 +++++++++++++++++++ runtime/westend/src/lib.rs | 14 ++-- runtime/westend/src/weights/mod.rs | 1 + .../weights/runtime_parachains_inclusion.rs | 66 +++++++++++++++++++ 16 files changed, 332 insertions(+), 22 deletions(-) create mode 100644 runtime/kusama/src/weights/runtime_parachains_inclusion.rs create mode 100644 runtime/polkadot/src/weights/runtime_parachains_inclusion.rs create mode 100644 runtime/rococo/src/weights/runtime_parachains_inclusion.rs create mode 100644 runtime/westend/src/weights/runtime_parachains_inclusion.rs diff --git a/primitives/src/v2/mod.rs b/primitives/src/v2/mod.rs index 2dd216e7e2b4..8ebebecfd5cc 100644 --- a/primitives/src/v2/mod.rs +++ b/primitives/src/v2/mod.rs @@ -1706,6 +1706,8 @@ impl PvfCheckStatement { } /// A well-known and typed storage key. +/// +/// Allows for type-safe access to raw well-known storage keys. pub struct WellKnownKey { /// The raw storage key. pub key: Vec, diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 90548b8e52f8..c88869a26d1c 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -39,7 +39,8 @@ use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, - initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, + inclusion::AggregateMessageOrigin, initializer as parachains_initializer, + origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::v2 as parachains_runtime_api_impl, scheduler as parachains_scheduler, session_info as parachains_session_info, shared as parachains_shared, @@ -1127,7 +1128,7 @@ impl parachains_inclusion::Config for Runtime { type DisputesHandler = ParasDisputes; type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; type MessageQueue = MessageQueue; - type WeightInfo = (); // FAIL-CI: TODO + type WeightInfo = weights::runtime_parachains_inclusion::WeightInfo; } parameter_types! { @@ -1138,6 +1139,7 @@ impl parachains_paras::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::runtime_parachains_paras::WeightInfo; type UnsignedPriority = ParasUnsignedPriority; + type UmpQueueTracker = ParaInclusion; type NextSessionRotation = Babe; } @@ -1149,19 +1151,22 @@ parameter_types! { pub struct MessageProcessor; impl ProcessMessage for MessageProcessor { - type Origin = ParaId; + type Origin = AggregateMessageOrigin; fn process_message( message: &[u8], origin: Self::Origin, weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { + let para = match origin { + AggregateMessageOrigin::UMP(para) => para, + }; xcm_builder::ProcessXcmMessage::< Junction, xcm_executor::XcmExecutor, RuntimeCall, // FAIL-CI why does `Parachain` not accept a `ParaId`? - >::process_message(message, Junction::Parachain(origin.into()), weight_limit) + >::process_message(message, Junction::Parachain(para.into()), weight_limit) } } @@ -1547,6 +1552,7 @@ mod benches { [runtime_parachains::configuration, Configuration] [runtime_parachains::hrmp, Hrmp] [runtime_parachains::disputes, ParasDisputes] + [runtime_parachains::inclusion, ParaInclusion] [runtime_parachains::initializer, Initializer] [runtime_parachains::paras_inherent, ParaInherent] [runtime_parachains::paras, Paras] diff --git a/runtime/kusama/src/weights/mod.rs b/runtime/kusama/src/weights/mod.rs index 0cb5def7ea93..9768180c1a30 100644 --- a/runtime/kusama/src/weights/mod.rs +++ b/runtime/kusama/src/weights/mod.rs @@ -59,6 +59,7 @@ pub mod runtime_common_slots; pub mod runtime_parachains_configuration; pub mod runtime_parachains_disputes; pub mod runtime_parachains_hrmp; +pub mod runtime_parachains_inclusion; pub mod runtime_parachains_initializer; pub mod runtime_parachains_paras; pub mod runtime_parachains_paras_inherent; diff --git a/runtime/kusama/src/weights/runtime_parachains_inclusion.rs b/runtime/kusama/src/weights/runtime_parachains_inclusion.rs new file mode 100644 index 000000000000..df8186c18a4d --- /dev/null +++ b/runtime/kusama/src/weights/runtime_parachains_inclusion.rs @@ -0,0 +1,66 @@ +// 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 `runtime_parachains::inclusion` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-02-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot +// benchmark +// pallet +// --chain=kusama-dev +// --steps=50 +// --repeat=20 +// --pallet=runtime_parachains::inclusion +// --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 `runtime_parachains::inclusion`. +pub struct WeightInfo(PhantomData); +impl runtime_parachains::inclusion::WeightInfo for WeightInfo { + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:999) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `i` is `[1, 1000]`. + fn receive_upward_messages(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `51490` + // Estimated: `70587` + // Minimum execution time: 47_556 nanoseconds. + Weight::from_ref_time(48_839_000) + .saturating_add(Weight::from_proof_size(70587)) + // Standard Error: 49_019 + .saturating_add(Weight::from_ref_time(43_136_059).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } +} diff --git a/runtime/parachains/src/inclusion/benchmarking.rs b/runtime/parachains/src/inclusion/benchmarking.rs index e49b04254ec1..d5cc67b4a1ca 100644 --- a/runtime/parachains/src/inclusion/benchmarking.rs +++ b/runtime/parachains/src/inclusion/benchmarking.rs @@ -23,8 +23,8 @@ benchmarks! { let config = configuration::ActiveConfig::::get(); let para = 42u32.into(); // not especially important. - let upward_messages = vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND as usize]; i as usize]; - Pallet::::receive_upward_messages(&config, para, vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND as usize]; 1]); + let upward_messages = vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND as usize]; i as usize].try_into().unwrap(); + Pallet::::receive_upward_messages(&config, para, vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND as usize]; 1].try_into().unwrap()); }: { Pallet::::receive_upward_messages(&config, para, upward_messages) } impl_benchmark_test_suite!( diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index a5599bb12d0a..ca231b19856f 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -35,13 +35,13 @@ use frame_support::{ }; use pallet_message_queue::OnQueueChanged; use parity_scale_codec::{Decode, Encode}; +use polkadot_parachain::primitives::UpwardMessages; use primitives::{ well_known_keys, AvailabilityBitfield, BackedCandidate, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateReceipt, CommittedCandidateReceipt, CoreIndex, GroupIndex, Hash, HeadData, Id as ParaId, SigningContext, UncheckedSignedAvailabilityBitfields, UpwardMessage, ValidatorId, ValidatorIndex, ValidityAttestation, }; -use polkadot_parachain::primitives::UpwardMessages; use scale_info::TypeInfo; use sp_runtime::{traits::One, DispatchError, SaturatedConversion}; use sp_std::{collections::btree_set::BTreeSet, fmt, prelude::*}; @@ -233,6 +233,14 @@ pub enum AggregateMessageOrigin { UMP(ParaId), } +#[cfg(feature = "runtime-benchmarks")] +impl From for AggregateMessageOrigin { + fn from(n: u32) -> Self { + // Some dummy for the benchmarks. + Self::UMP(n.into()) + } +} + #[frame_support::pallet] pub mod pallet { use super::*; diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index d375b5340fb2..dce0338d816c 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -82,7 +82,11 @@ fn default_genesis_config() -> MockGenesisConfig { fn queue_upward_msg(para: ParaId, msg: UpwardMessage) { let msgs = vec![msg]; assert!(ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs).is_ok()); - let _ = ParaInclusion::receive_upward_messages(&Configuration::config(), para, msgs.try_into().unwrap()); + let _ = ParaInclusion::receive_upward_messages( + &Configuration::config(), + para, + msgs.try_into().unwrap(), + ); } mod check_upward_messages { @@ -105,7 +109,11 @@ mod check_upward_messages { } fn queue(para: ParaId, msgs: Vec) { - let _ = ParaInclusion::receive_upward_messages(&Configuration::config(), para, msgs.try_into().unwrap()); + let _ = ParaInclusion::receive_upward_messages( + &Configuration::config(), + para, + msgs.try_into().unwrap(), + ); } #[test] diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index c624dac0fcbc..a5980149fb6f 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -29,7 +29,8 @@ use runtime_common::{ use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, - initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, + inclusion::AggregateMessageOrigin, initializer as parachains_initializer, + origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::v2 as parachains_runtime_api_impl, scheduler as parachains_scheduler, session_info as parachains_session_info, shared as parachains_shared, @@ -1288,7 +1289,7 @@ impl parachains_inclusion::Config for Runtime { type DisputesHandler = ParasDisputes; type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; type MessageQueue = MessageQueue; - type WeightInfo = (); // FAIL-CI: TODO + type WeightInfo = weights::runtime_parachains_inclusion::WeightInfo; } parameter_types! { @@ -1299,6 +1300,7 @@ impl parachains_paras::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::runtime_parachains_paras::WeightInfo; type UnsignedPriority = ParasUnsignedPriority; + type UmpQueueTracker = ParaInclusion; type NextSessionRotation = Babe; } @@ -1310,19 +1312,22 @@ parameter_types! { pub struct MessageProcessor; impl ProcessMessage for MessageProcessor { - type Origin = ParaId; + type Origin = AggregateMessageOrigin; fn process_message( message: &[u8], origin: Self::Origin, weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { + let para = match origin { + AggregateMessageOrigin::UMP(para) => para, + }; xcm_builder::ProcessXcmMessage::< Junction, xcm_executor::XcmExecutor, RuntimeCall, - // FAIL-CI why does `Parachain` not accept a `ParaId`? - >::process_message(message, Junction::Parachain(origin.into()), weight_limit) + // FAIL-CI why is the `into` needed? + >::process_message(message, Junction::Parachain(para.into()), weight_limit) } } @@ -1668,6 +1673,7 @@ mod benches { [runtime_parachains::configuration, Configuration] [runtime_parachains::disputes, ParasDisputes] [runtime_parachains::hrmp, Hrmp] + [runtime_parachains::inclusion, ParaInclusion] [runtime_parachains::initializer, Initializer] [runtime_parachains::paras, Paras] [runtime_parachains::paras_inherent, ParaInherent] diff --git a/runtime/polkadot/src/weights/mod.rs b/runtime/polkadot/src/weights/mod.rs index d8f8bda90dd6..09c7eb83a3b7 100644 --- a/runtime/polkadot/src/weights/mod.rs +++ b/runtime/polkadot/src/weights/mod.rs @@ -53,6 +53,7 @@ pub mod runtime_common_slots; pub mod runtime_parachains_configuration; pub mod runtime_parachains_disputes; pub mod runtime_parachains_hrmp; +pub mod runtime_parachains_inclusion; pub mod runtime_parachains_initializer; pub mod runtime_parachains_paras; pub mod runtime_parachains_paras_inherent; diff --git a/runtime/polkadot/src/weights/runtime_parachains_inclusion.rs b/runtime/polkadot/src/weights/runtime_parachains_inclusion.rs new file mode 100644 index 000000000000..fe192fddf37a --- /dev/null +++ b/runtime/polkadot/src/weights/runtime_parachains_inclusion.rs @@ -0,0 +1,66 @@ +// 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 `runtime_parachains::inclusion` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-02-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot +// benchmark +// pallet +// --chain=polkadot-dev +// --steps=50 +// --repeat=20 +// --pallet=runtime_parachains::inclusion +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --header=./file_header.txt +// --output=./runtime/polkadot/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 `runtime_parachains::inclusion`. +pub struct WeightInfo(PhantomData); +impl runtime_parachains::inclusion::WeightInfo for WeightInfo { + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:999) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `i` is `[1, 1000]`. + fn receive_upward_messages(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `51490` + // Estimated: `70587` + // Minimum execution time: 50_423 nanoseconds. + Weight::from_ref_time(160_584_092) + .saturating_add(Weight::from_proof_size(70587)) + // Standard Error: 75_127 + .saturating_add(Weight::from_ref_time(41_929_458).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } +} diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 747b2c554985..14780bb3e552 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -40,13 +40,14 @@ use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, + inclusion::AggregateMessageOrigin, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, runtime_api_impl::{ v2 as parachains_runtime_api_impl, vstaging as parachains_runtime_api_impl_staging, }, scheduler as parachains_scheduler, session_info as parachains_session_info, - shared as parachains_shared, ump as parachains_ump, + shared as parachains_shared, }; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; @@ -1051,7 +1052,7 @@ impl parachains_inclusion::Config for Runtime { type DisputesHandler = ParasDisputes; type RewardValidators = RewardValidators; type MessageQueue = MessageQueue; - type WeightInfo = (); // FAIL-CI: TODO + type WeightInfo = weights::runtime_parachains_inclusion::WeightInfo; } parameter_types! { @@ -1062,6 +1063,7 @@ impl parachains_paras::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::runtime_parachains_paras::WeightInfo; type UnsignedPriority = ParasUnsignedPriority; + type UmpQueueTracker = ParaInclusion; type NextSessionRotation = Babe; } @@ -1073,19 +1075,22 @@ parameter_types! { pub struct MessageProcessor; impl ProcessMessage for MessageProcessor { - type Origin = ParaId; + type Origin = AggregateMessageOrigin; fn process_message( message: &[u8], origin: Self::Origin, weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { + let para = match origin { + AggregateMessageOrigin::UMP(para) => para, + }; xcm_builder::ProcessXcmMessage::< Junction, xcm_executor::XcmExecutor, RuntimeCall, // FAIL-CI why does `Parachain` not accept a `ParaId`? - >::process_message(message, Junction::Parachain(origin.into()), weight_limit) + >::process_message(message, Junction::Parachain(para.into()), weight_limit) } } @@ -1592,6 +1597,7 @@ mod benches { [runtime_parachains::configuration, Configuration] [runtime_parachains::hrmp, Hrmp] [runtime_parachains::disputes, ParasDisputes] + [runtime_parachains::inclusion, ParaInclusion] [runtime_parachains::initializer, Initializer] [runtime_parachains::paras_inherent, ParaInherent] [runtime_parachains::paras, Paras] diff --git a/runtime/rococo/src/weights/mod.rs b/runtime/rococo/src/weights/mod.rs index 414cd9e71d9b..c9d1ccf920c8 100644 --- a/runtime/rococo/src/weights/mod.rs +++ b/runtime/rococo/src/weights/mod.rs @@ -48,6 +48,7 @@ pub mod runtime_common_slots; pub mod runtime_parachains_configuration; pub mod runtime_parachains_disputes; pub mod runtime_parachains_hrmp; +pub mod runtime_parachains_inclusion; pub mod runtime_parachains_initializer; pub mod runtime_parachains_paras; pub mod runtime_parachains_paras_inherent; diff --git a/runtime/rococo/src/weights/runtime_parachains_inclusion.rs b/runtime/rococo/src/weights/runtime_parachains_inclusion.rs new file mode 100644 index 000000000000..9a4dc44145e9 --- /dev/null +++ b/runtime/rococo/src/weights/runtime_parachains_inclusion.rs @@ -0,0 +1,66 @@ +// 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 `runtime_parachains::inclusion` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-02-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot +// benchmark +// pallet +// --chain=rococo-dev +// --steps=50 +// --repeat=20 +// --pallet=runtime_parachains::inclusion +// --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 `runtime_parachains::inclusion`. +pub struct WeightInfo(PhantomData); +impl runtime_parachains::inclusion::WeightInfo for WeightInfo { + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:999) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `i` is `[1, 1000]`. + fn receive_upward_messages(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `51490` + // Estimated: `70587` + // Minimum execution time: 48_782 nanoseconds. + Weight::from_ref_time(49_384_000) + .saturating_add(Weight::from_proof_size(70587)) + // Standard Error: 32_635 + .saturating_add(Weight::from_ref_time(43_384_796).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } +} diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 4069cb3b5c79..84e72ca530a1 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -55,13 +55,14 @@ use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, + inclusion::AggregateMessageOrigin, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::{ v2 as parachains_runtime_api_impl, vstaging as parachains_runtime_api_impl_staging, }, scheduler as parachains_scheduler, session_info as parachains_session_info, - shared as parachains_shared, ump as parachains_ump, + shared as parachains_shared, }; use scale_info::TypeInfo; use sp_core::{OpaqueMetadata, RuntimeDebug}; @@ -913,7 +914,7 @@ impl parachains_inclusion::Config for Runtime { type DisputesHandler = ParasDisputes; type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; type MessageQueue = MessageQueue; - type WeightInfo = (); // FAIL-CI: TODO + type WeightInfo = weights::runtime_parachains_inclusion::WeightInfo; } parameter_types! { @@ -924,6 +925,7 @@ impl parachains_paras::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::runtime_parachains_paras::WeightInfo; type UnsignedPriority = ParasUnsignedPriority; + type UmpQueueTracker = ParaInclusion; type NextSessionRotation = Babe; } @@ -935,19 +937,22 @@ parameter_types! { pub struct MessageProcessor; impl ProcessMessage for MessageProcessor { - type Origin = ParaId; + type Origin = AggregateMessageOrigin; fn process_message( message: &[u8], origin: Self::Origin, weight_limit: Weight, ) -> Result<(bool, Weight), ProcessMessageError> { + let para = match origin { + AggregateMessageOrigin::UMP(para) => para, + }; xcm_builder::ProcessXcmMessage::< Junction, xcm_executor::XcmExecutor, RuntimeCall, // FAIL-CI why does `Parachain` not accept a `ParaId`? - >::process_message(message, Junction::Parachain(origin.into()), weight_limit) + >::process_message(message, Junction::Parachain(para.into()), weight_limit) } } @@ -1290,6 +1295,7 @@ mod benches { [runtime_parachains::disputes, ParasDisputes] [runtime_parachains::disputes::slashing, ParasSlashing] [runtime_parachains::hrmp, Hrmp] + [runtime_parachains::inclusion, ParaInclusion] [runtime_parachains::initializer, Initializer] [runtime_parachains::paras, Paras] [runtime_parachains::paras_inherent, ParaInherent] diff --git a/runtime/westend/src/weights/mod.rs b/runtime/westend/src/weights/mod.rs index 041cea38a43c..e28152d9db49 100644 --- a/runtime/westend/src/weights/mod.rs +++ b/runtime/westend/src/weights/mod.rs @@ -43,6 +43,7 @@ pub mod runtime_parachains_configuration; pub mod runtime_parachains_disputes; pub mod runtime_parachains_disputes_slashing; pub mod runtime_parachains_hrmp; +pub mod runtime_parachains_inclusion; pub mod runtime_parachains_initializer; pub mod runtime_parachains_paras; pub mod runtime_parachains_paras_inherent; diff --git a/runtime/westend/src/weights/runtime_parachains_inclusion.rs b/runtime/westend/src/weights/runtime_parachains_inclusion.rs new file mode 100644 index 000000000000..4fd7e2fea1ae --- /dev/null +++ b/runtime/westend/src/weights/runtime_parachains_inclusion.rs @@ -0,0 +1,66 @@ +// 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 `runtime_parachains::inclusion` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-02-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot +// benchmark +// pallet +// --chain=westend-dev +// --steps=50 +// --repeat=20 +// --pallet=runtime_parachains::inclusion +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --header=./file_header.txt +// --output=./runtime/westend/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 `runtime_parachains::inclusion`. +pub struct WeightInfo(PhantomData); +impl runtime_parachains::inclusion::WeightInfo for WeightInfo { + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:999) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// The range of component `i` is `[1, 1000]`. + fn receive_upward_messages(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `51490` + // Estimated: `70587` + // Minimum execution time: 49_053 nanoseconds. + Weight::from_ref_time(49_506_000) + .saturating_add(Weight::from_proof_size(70587)) + // Standard Error: 62_734 + .saturating_add(Weight::from_ref_time(43_511_974).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + } +} From dd0ee2df664c1ccd91c11081e269dea69ca1edca Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 23 Feb 2023 14:13:41 +0100 Subject: [PATCH 065/182] Bound receive_upward_messages and check bound in configuration pallet Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration.rs | 4 ++- .../parachains/src/inclusion/benchmarking.rs | 7 ++--- runtime/parachains/src/inclusion/mod.rs | 28 ++++++++++++------- runtime/parachains/src/initializer.rs | 2 +- 4 files changed, 25 insertions(+), 16 deletions(-) diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index f5817b97509b..b3893f132c00 100644 --- a/runtime/parachains/src/configuration.rs +++ b/runtime/parachains/src/configuration.rs @@ -18,7 +18,7 @@ //! //! Configuration can change only at session boundaries and is buffered until then. -use crate::shared; +use crate::{inclusion::MAX_UPWARD_MESSAGE_SIZE_BOUND, shared}; use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; use parity_scale_codec::{Decode, Encode}; @@ -856,6 +856,8 @@ pub mod pallet { ))] pub fn set_max_upward_queue_size(origin: OriginFor, new: u32) -> DispatchResult { ensure_root(origin)?; + ensure!(new <= MAX_UPWARD_MESSAGE_SIZE_BOUND, Error::::InvalidNewValue); + Self::schedule_config_update(|config| { config.max_upward_queue_size = new; }) diff --git a/runtime/parachains/src/inclusion/benchmarking.rs b/runtime/parachains/src/inclusion/benchmarking.rs index d5cc67b4a1ca..700ea440c1ea 100644 --- a/runtime/parachains/src/inclusion/benchmarking.rs +++ b/runtime/parachains/src/inclusion/benchmarking.rs @@ -21,11 +21,10 @@ benchmarks! { receive_upward_messages { let i in 1 .. 1000; - let config = configuration::ActiveConfig::::get(); let para = 42u32.into(); // not especially important. - let upward_messages = vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND as usize]; i as usize].try_into().unwrap(); - Pallet::::receive_upward_messages(&config, para, vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND as usize]; 1].try_into().unwrap()); - }: { Pallet::::receive_upward_messages(&config, para, upward_messages) } + let upward_messages = vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND as usize]; i as usize]; + Pallet::::receive_upward_messages(para, vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND as usize]; 1].as_slice()); + }: { Pallet::::receive_upward_messages(para, upward_messages.as_slice()) } impl_benchmark_test_suite!( Pallet, diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index ca231b19856f..8bb97072176f 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -35,7 +35,6 @@ use frame_support::{ }; use pallet_message_queue::OnQueueChanged; use parity_scale_codec::{Decode, Encode}; -use polkadot_parachain::primitives::UpwardMessages; use primitives::{ well_known_keys, AvailabilityBitfield, BackedCandidate, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateReceipt, CommittedCandidateReceipt, CoreIndex, @@ -241,6 +240,10 @@ impl From for AggregateMessageOrigin { } } +/// The maximal length of a UMP message. +pub type MaxUmpMessageLen = + <::MessageQueue as EnqueueMessage>::MaxMessageLen; + #[frame_support::pallet] pub mod pallet { use super::*; @@ -890,9 +893,8 @@ impl Pallet { commitments.processed_downward_messages, ); weight += Self::receive_upward_messages( - &config, receipt.descriptor.para_id, - commitments.upward_messages, + commitments.upward_messages.as_slice(), ); weight += >::prune_hrmp( receipt.descriptor.para_id, @@ -980,20 +982,26 @@ impl Pallet { Ok(()) } + pub(crate) fn receive_upward_messages(para: ParaId, upward_messages: &[Vec]) -> Weight { + let bounded = upward_messages + .iter() + .filter_map(|d| BoundedSlice::try_from(&d[..]).ok()) + .collect(); + Self::receive_bounded_upward_messages(para, bounded) + } + /// Enqueues `upward_messages` from a `para`'s accepted candidate block. - pub(crate) fn receive_upward_messages( - _config: &HostConfiguration, + pub(crate) fn receive_bounded_upward_messages<'a>( para: ParaId, - upward_messages: UpwardMessages, + messages: Vec>>, ) -> Weight { - if upward_messages.is_empty() { + let count = messages.len() as u32; + if count == 0 { return Weight::zero() } - let count = upward_messages.len() as u32; Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); - let messages = upward_messages.iter().filter_map(|d| BoundedSlice::try_from(&d[..]).ok()); - T::MessageQueue::enqueue_messages(messages, AggregateMessageOrigin::UMP(para)); + T::MessageQueue::enqueue_messages(messages.into_iter(), AggregateMessageOrigin::UMP(para)); ::WeightInfo::receive_upward_messages(count) } diff --git a/runtime/parachains/src/initializer.rs b/runtime/parachains/src/initializer.rs index c664cd83e7ec..8b29c4e55c0a 100644 --- a/runtime/parachains/src/initializer.rs +++ b/runtime/parachains/src/initializer.rs @@ -266,7 +266,7 @@ impl Pallet { T::DisputesHandler::initializer_on_new_session(¬ification); T::SlashingHandler::initializer_on_new_session(session_index); dmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); - // ump::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); + // FAIL-CI cleanup queues of outgoing paras hrmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); } From cf0c6ecfc5fb9a4268a4f17a635a5812917c7700 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 23 Feb 2023 14:45:25 +0100 Subject: [PATCH 066/182] Bound Debug impl Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 8bb97072176f..9e20b5bbde16 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -372,7 +372,8 @@ pub mod pallet { const LOG_TARGET: &str = "runtime::inclusion"; -#[derive(derive_more::From, Debug)] +#[derive(derive_more::From)] +#[cfg_attr(feature= "std", derive(Debug))] enum AcceptanceCheckErr { HeadDataTooLarge, PrematureCodeUpgrade, @@ -399,6 +400,7 @@ pub enum UmpAcceptanceCheckErr { IsOffboarding, } +#[cfg(feature = "std")] impl fmt::Debug for UmpAcceptanceCheckErr { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { match *self { @@ -827,7 +829,7 @@ impl Pallet { let relay_parent_number = now; let check_ctx = CandidateCheckContext::::new(now, relay_parent_number); - if let Err(err) = check_ctx.check_validation_outputs( + if check_ctx.check_validation_outputs( para_id, &validation_outputs.head_data, &validation_outputs.new_validation_code, @@ -835,12 +837,11 @@ impl Pallet { &validation_outputs.upward_messages, T::BlockNumber::from(validation_outputs.hrmp_watermark), &validation_outputs.horizontal_messages, - ) { + ).is_err() { log::debug!( target: LOG_TARGET, - "Validation outputs checking for parachain `{}` failed: {:?}", + "Validation outputs checking for parachain `{}` failed", u32::from(para_id), - err, ); false } else { @@ -1243,10 +1244,9 @@ impl CandidateCheckContext { ) { log::debug!( target: LOG_TARGET, - "Validation outputs checking during inclusion of a candidate {} for parachain `{}` failed: {:?}", + "Validation outputs checking during inclusion of a candidate {} for parachain `{}` failed", candidate_idx, u32::from(para_id), - err, ); Err(err.strip_into_dispatch_err::())?; }; From da54497c726c96b910855d93ceb908c88e342e0b Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 23 Feb 2023 14:47:25 +0100 Subject: [PATCH 067/182] fmt Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 9e20b5bbde16..f9c6c283e133 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -373,7 +373,7 @@ pub mod pallet { const LOG_TARGET: &str = "runtime::inclusion"; #[derive(derive_more::From)] -#[cfg_attr(feature= "std", derive(Debug))] +#[cfg_attr(feature = "std", derive(Debug))] enum AcceptanceCheckErr { HeadDataTooLarge, PrematureCodeUpgrade, @@ -829,15 +829,18 @@ impl Pallet { let relay_parent_number = now; let check_ctx = CandidateCheckContext::::new(now, relay_parent_number); - if check_ctx.check_validation_outputs( - para_id, - &validation_outputs.head_data, - &validation_outputs.new_validation_code, - validation_outputs.processed_downward_messages, - &validation_outputs.upward_messages, - T::BlockNumber::from(validation_outputs.hrmp_watermark), - &validation_outputs.horizontal_messages, - ).is_err() { + if check_ctx + .check_validation_outputs( + para_id, + &validation_outputs.head_data, + &validation_outputs.new_validation_code, + validation_outputs.processed_downward_messages, + &validation_outputs.upward_messages, + T::BlockNumber::from(validation_outputs.hrmp_watermark), + &validation_outputs.horizontal_messages, + ) + .is_err() + { log::debug!( target: LOG_TARGET, "Validation outputs checking for parachain `{}` failed", From ab3ec43b8120b4686c156bac95177fa88822ef05 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 23 Feb 2023 15:00:58 +0100 Subject: [PATCH 068/182] clippy Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index f9c6c283e133..d44c9180b7c6 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -43,7 +43,9 @@ use primitives::{ }; use scale_info::TypeInfo; use sp_runtime::{traits::One, DispatchError, SaturatedConversion}; -use sp_std::{collections::btree_set::BTreeSet, fmt, prelude::*}; +#[cfg(feature = "std")] +use sp_std::fmt; +use sp_std::{collections::btree_set::BTreeSet, prelude::*}; pub use pallet::*; @@ -995,9 +997,9 @@ impl Pallet { } /// Enqueues `upward_messages` from a `para`'s accepted candidate block. - pub(crate) fn receive_bounded_upward_messages<'a>( + pub(crate) fn receive_bounded_upward_messages( para: ParaId, - messages: Vec>>, + messages: Vec>>, ) -> Weight { let count = messages.len() as u32; if count == 0 { From 0713f409d844707431312cfc0918db171f9cad94 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 23 Feb 2023 15:28:51 +0100 Subject: [PATCH 069/182] Fix test runtime Signed-off-by: Oliver Tale-Yazdi --- runtime/test-runtime/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index cb7fd33662e5..9ecdb9ee1c43 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -521,6 +521,7 @@ impl parachains_paras::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = parachains_paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; + type UmpQueueTracker = ParaInclusion; type NextSessionRotation = Babe; } From 38b506a052f62b322fb0b5fed09d54453d18352e Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 24 Feb 2023 21:00:23 +0100 Subject: [PATCH 070/182] Fix xcm-simulator Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 1 + xcm/xcm-simulator/Cargo.toml | 1 + xcm/xcm-simulator/example/src/relay_chain.rs | 11 +---- xcm/xcm-simulator/src/lib.rs | 43 ++++++++++++-------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3814da211520..807ff8c9fc81 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13838,6 +13838,7 @@ dependencies = [ "sp-io", "sp-std", "xcm", + "xcm-builder", "xcm-executor", ] diff --git a/xcm/xcm-simulator/Cargo.toml b/xcm/xcm-simulator/Cargo.toml index 0c2999321f96..f4219759052d 100644 --- a/xcm/xcm-simulator/Cargo.toml +++ b/xcm/xcm-simulator/Cargo.toml @@ -15,6 +15,7 @@ sp-std = { git = "https://github.com/paritytech/substrate", branch = "master" } xcm = { path = "../" } xcm-executor = { path = "../xcm-executor" } +xcm-builder = { path = "../xcm-builder" } polkadot-core-primitives = { path = "../../core-primitives"} polkadot-parachain = { path = "../../parachain" } polkadot-runtime-parachains = { path = "../../runtime/parachains" } diff --git a/xcm/xcm-simulator/example/src/relay_chain.rs b/xcm/xcm-simulator/example/src/relay_chain.rs index 9e095270e673..dee1b34556a5 100644 --- a/xcm/xcm-simulator/example/src/relay_chain.rs +++ b/xcm/xcm-simulator/example/src/relay_chain.rs @@ -25,7 +25,7 @@ use sp_core::H256; use sp_runtime::{testing::Header, traits::IdentityLookup, AccountId32}; use polkadot_parachain::primitives::Id as ParaId; -use polkadot_runtime_parachains::{configuration, origin, shared, ump}; +use polkadot_runtime_parachains::{configuration, origin, shared}; use xcm::latest::prelude::*; use xcm_builder::{ Account32Hash, AccountId32Aliases, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, @@ -223,14 +223,6 @@ parameter_types! { pub const FirstMessageFactorPercent: u64 = 100; } -impl ump::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type UmpSink = ump::XcmSink, Runtime>; - type FirstMessageFactorPercent = FirstMessageFactorPercent; - type ExecuteOverweightOrigin = frame_system::EnsureRoot; - type WeightInfo = ump::TestWeightInfo; -} - impl origin::Config for Runtime {} type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; @@ -245,7 +237,6 @@ construct_runtime!( System: frame_system::{Pallet, Call, Storage, Config, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, ParasOrigin: origin::{Pallet, Origin}, - ParasUmp: ump::{Pallet, Call, Storage, Event}, XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin}, Uniques: pallet_uniques::{Pallet, Call, Storage, Event}, } diff --git a/xcm/xcm-simulator/src/lib.rs b/xcm/xcm-simulator/src/lib.rs index f87aae3f29a7..b5ea555f7071 100644 --- a/xcm/xcm-simulator/src/lib.rs +++ b/xcm/xcm-simulator/src/lib.rs @@ -19,7 +19,10 @@ pub use codec::Encode; pub use paste; -pub use frame_support::{traits::Get, weights::Weight}; +pub use frame_support::{ + traits::{Get, ProcessMessage, ProcessMessageError}, + weights::Weight, +}; pub use sp_io::{hashing::blake2_256, TestExternalities}; pub use sp_std::{cell::RefCell, collections::vec_deque::VecDeque, marker::PhantomData}; @@ -28,11 +31,9 @@ pub use polkadot_parachain::primitives::{ DmpMessageHandler as DmpMessageHandlerT, Id as ParaId, XcmpMessageFormat, XcmpMessageHandler as XcmpMessageHandlerT, }; -pub use polkadot_runtime_parachains::{ - dmp, - ump::{self, MessageId, UmpSink, XcmSink}, -}; +pub use polkadot_runtime_parachains::dmp; pub use xcm::{latest::prelude::*, VersionedXcm}; +pub use xcm_builder::ProcessXcmMessage; pub use xcm_executor::XcmExecutor; pub trait TestExt { @@ -108,17 +109,19 @@ macro_rules! decl_test_relay_chain { $crate::__impl_ext!($name, $new_ext); - impl $crate::UmpSink for $name { - fn process_upward_message( - origin: $crate::ParaId, + impl $crate::ProcessMessage for $name { + type Origin = $crate::ParaId; + + fn process_message( msg: &[u8], + origin: Self::Origin, max_weight: $crate::Weight, - ) -> Result<$crate::Weight, ($crate::MessageId, $crate::Weight)> { - use $crate::{ump::UmpSink, TestExt}; + ) -> Result<(bool, $crate::Weight), $crate::ProcessMessageError> { + use $crate::{ProcessMessage, Junction, TestExt}; Self::execute_with(|| { - $crate::ump::XcmSink::<$crate::XcmExecutor<$xcm_config>, $runtime>::process_upward_message( - origin, msg, max_weight, + $crate::ProcessXcmMessage::<$crate::Junction, $crate::XcmExecutor<$xcm_config>, crate::relay_chain::RuntimeCall>::process_message( + msg, $crate::Junction::Parachain(origin.into()), max_weight, ) }) } @@ -286,19 +289,23 @@ macro_rules! decl_test_network { /// Process all messages originating from parachains. fn process_para_messages() -> $crate::XcmResult { - use $crate::{UmpSink, XcmpMessageHandlerT}; + use $crate::{ProcessMessage, XcmpMessageHandlerT}; while let Some((para_id, destination, message)) = $crate::PARA_MESSAGE_BUS.with( |b| b.borrow_mut().pop_front()) { match destination.interior() { $crate::Junctions::Here if destination.parent_count() == 1 => { let encoded = $crate::encode_xcm(message, $crate::MessageKind::Ump); - let r = <$relay_chain>::process_upward_message( - para_id, &encoded[..], + let r = <$relay_chain>::process_message( + &encoded[..], para_id, $crate::Weight::MAX, ); - if let Err((id, required)) = r { - return Err($crate::XcmError::WeightLimitReached(required)); + match r { + Err($crate::ProcessMessageError::Overweight(required)) => + return Err($crate::XcmError::WeightLimitReached(required)), + // Not really the correct error, but there is no "undecodable". + Err(_) => return Err($crate::XcmError::Unimplemented), + Ok(_) => (), } }, $( @@ -353,7 +360,7 @@ macro_rules! decl_test_network { destination: &mut Option<$crate::MultiLocation>, message: &mut Option<$crate::Xcm<()>>, ) -> $crate::SendResult<($crate::ParaId, $crate::MultiLocation, $crate::Xcm<()>)> { - use $crate::{UmpSink, XcmpMessageHandlerT}; + use $crate::XcmpMessageHandlerT; let d = destination.take().ok_or($crate::SendError::MissingArgument)?; match (d.interior(), d.parent_count()) { From 5777e18c8e6b4500fed4a90dbae29771c40dbd13 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 24 Feb 2023 21:25:55 +0100 Subject: [PATCH 071/182] Properly fix xcm-simulator and fuzzer Signed-off-by: Oliver Tale-Yazdi --- xcm/xcm-simulator/example/src/lib.rs | 1 + xcm/xcm-simulator/fuzzer/src/fuzz.rs | 1 + xcm/xcm-simulator/fuzzer/src/relay_chain.rs | 11 +---------- xcm/xcm-simulator/src/lib.rs | 4 +++- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/xcm/xcm-simulator/example/src/lib.rs b/xcm/xcm-simulator/example/src/lib.rs index b2bedf4c37e7..f41a6d9fa5f7 100644 --- a/xcm/xcm-simulator/example/src/lib.rs +++ b/xcm/xcm-simulator/example/src/lib.rs @@ -46,6 +46,7 @@ decl_test_parachain! { decl_test_relay_chain! { pub struct Relay { Runtime = relay_chain::Runtime, + RuntimeCall = relay_chain::RuntimeCall, XcmConfig = relay_chain::XcmConfig, new_ext = relay_ext(), } diff --git a/xcm/xcm-simulator/fuzzer/src/fuzz.rs b/xcm/xcm-simulator/fuzzer/src/fuzz.rs index 2965b791d401..cef8fe3fc8dd 100644 --- a/xcm/xcm-simulator/fuzzer/src/fuzz.rs +++ b/xcm/xcm-simulator/fuzzer/src/fuzz.rs @@ -60,6 +60,7 @@ decl_test_parachain! { decl_test_relay_chain! { pub struct Relay { Runtime = relay_chain::Runtime, + RuntimeCall = relay_chain::RuntimeCall, XcmConfig = relay_chain::XcmConfig, new_ext = relay_ext(), } diff --git a/xcm/xcm-simulator/fuzzer/src/relay_chain.rs b/xcm/xcm-simulator/fuzzer/src/relay_chain.rs index fe08a056cdc1..39ce5c838d2e 100644 --- a/xcm/xcm-simulator/fuzzer/src/relay_chain.rs +++ b/xcm/xcm-simulator/fuzzer/src/relay_chain.rs @@ -25,7 +25,7 @@ use sp_core::H256; use sp_runtime::{testing::Header, traits::IdentityLookup, AccountId32}; use polkadot_parachain::primitives::Id as ParaId; -use polkadot_runtime_parachains::{configuration, origin, shared, ump}; +use polkadot_runtime_parachains::{configuration, origin, shared}; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowUnpaidExecutionFrom, ChildParachainAsNative, @@ -187,14 +187,6 @@ parameter_types! { pub const FirstMessageFactorPercent: u64 = 100; } -impl ump::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type UmpSink = ump::XcmSink, Runtime>; - type FirstMessageFactorPercent = FirstMessageFactorPercent; - type ExecuteOverweightOrigin = frame_system::EnsureRoot; - type WeightInfo = ump::TestWeightInfo; -} - impl origin::Config for Runtime {} type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; @@ -209,7 +201,6 @@ construct_runtime!( System: frame_system::{Pallet, Call, Storage, Config, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, ParasOrigin: origin::{Pallet, Origin}, - ParasUmp: ump::{Pallet, Call, Storage, Event}, XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin}, } ); diff --git a/xcm/xcm-simulator/src/lib.rs b/xcm/xcm-simulator/src/lib.rs index b5ea555f7071..0f6f108f3e86 100644 --- a/xcm/xcm-simulator/src/lib.rs +++ b/xcm/xcm-simulator/src/lib.rs @@ -101,6 +101,7 @@ macro_rules! decl_test_relay_chain { ( pub struct $name:ident { Runtime = $runtime:path, + RuntimeCall = $runtime_call:path, XcmConfig = $xcm_config:path, new_ext = $new_ext:expr, } @@ -120,7 +121,8 @@ macro_rules! decl_test_relay_chain { use $crate::{ProcessMessage, Junction, TestExt}; Self::execute_with(|| { - $crate::ProcessXcmMessage::<$crate::Junction, $crate::XcmExecutor<$xcm_config>, crate::relay_chain::RuntimeCall>::process_message( + $crate::ProcessXcmMessage::<$crate::Junction, + $crate::XcmExecutor<$xcm_config>, $runtime_call>::process_message( msg, $crate::Junction::Parachain(origin.into()), max_weight, ) }) From f54bfd6e3ed32c1f7c1b94cda42ad98c0a04670f Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 24 Feb 2023 22:21:01 +0100 Subject: [PATCH 072/182] Fix tests Signed-off-by: Oliver Tale-Yazdi --- runtime/common/src/assigned_slots.rs | 1 + runtime/common/src/integration_tests.rs | 1 + runtime/common/src/paras_registrar.rs | 1 + runtime/parachains/src/ump_tests.rs | 6 ++---- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/runtime/common/src/assigned_slots.rs b/runtime/common/src/assigned_slots.rs index 5186b255168a..dfffeeb51eca 100644 --- a/runtime/common/src/assigned_slots.rs +++ b/runtime/common/src/assigned_slots.rs @@ -646,6 +646,7 @@ mod tests { type RuntimeEvent = RuntimeEvent; type WeightInfo = parachains_paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; + type UmpQueueTracker = (); type NextSessionRotation = crate::mock::TestNextSessionRotation; } diff --git a/runtime/common/src/integration_tests.rs b/runtime/common/src/integration_tests.rs index be506a26561e..57828bf35d4b 100644 --- a/runtime/common/src/integration_tests.rs +++ b/runtime/common/src/integration_tests.rs @@ -204,6 +204,7 @@ impl paras::Config for Test { type RuntimeEvent = RuntimeEvent; type WeightInfo = paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; + type UmpQueueTracker = (); type NextSessionRotation = crate::mock::TestNextSessionRotation; } diff --git a/runtime/common/src/paras_registrar.rs b/runtime/common/src/paras_registrar.rs index ec65cac94414..d4688961efb1 100644 --- a/runtime/common/src/paras_registrar.rs +++ b/runtime/common/src/paras_registrar.rs @@ -765,6 +765,7 @@ mod tests { type RuntimeEvent = RuntimeEvent; type WeightInfo = paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; + type UmpQueueTracker = (); type NextSessionRotation = crate::mock::TestNextSessionRotation; } diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index dce0338d816c..b48d0a64fe09 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -83,9 +83,8 @@ fn queue_upward_msg(para: ParaId, msg: UpwardMessage) { let msgs = vec![msg]; assert!(ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs).is_ok()); let _ = ParaInclusion::receive_upward_messages( - &Configuration::config(), para, - msgs.try_into().unwrap(), + msgs.as_slice(), ); } @@ -110,9 +109,8 @@ mod check_upward_messages { fn queue(para: ParaId, msgs: Vec) { let _ = ParaInclusion::receive_upward_messages( - &Configuration::config(), para, - msgs.try_into().unwrap(), + msgs.as_slice(), ); } From 50ffb2f5799f6a8caefb7561a5d4496cd1a0d19d Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 24 Feb 2023 22:23:33 +0100 Subject: [PATCH 073/182] fmt Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/ump_tests.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index b48d0a64fe09..c2ecc3d7ad48 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -82,10 +82,7 @@ fn default_genesis_config() -> MockGenesisConfig { fn queue_upward_msg(para: ParaId, msg: UpwardMessage) { let msgs = vec![msg]; assert!(ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs).is_ok()); - let _ = ParaInclusion::receive_upward_messages( - para, - msgs.as_slice(), - ); + let _ = ParaInclusion::receive_upward_messages(para, msgs.as_slice()); } mod check_upward_messages { @@ -108,10 +105,7 @@ mod check_upward_messages { } fn queue(para: ParaId, msgs: Vec) { - let _ = ParaInclusion::receive_upward_messages( - para, - msgs.as_slice(), - ); + let _ = ParaInclusion::receive_upward_messages(para, msgs.as_slice()); } #[test] From f979ffc22c2a1a484cf1744076101213dd108d17 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Sat, 25 Feb 2023 17:18:30 +0100 Subject: [PATCH 074/182] cargo update -p sp-io Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 488 ++++++++++++++++++++++++++++------------------------- 1 file changed, 260 insertions(+), 228 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 807ff8c9fc81..9dc9d026fac1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -455,7 +455,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "async-trait", @@ -489,7 +489,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "beefy-gadget", "futures", @@ -508,7 +508,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "hash-db", "log", @@ -1156,16 +1156,18 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" [[package]] name = "cranelift-bforest" -version = "0.92.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "0.93.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91b18cf92869a6ae85cde3af4bc4beb6154efa8adef03b18db2ad413d5bce3a2" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.92.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "0.93.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567d9f6e919bac076f39b902a072686eaf9e6d015baa34d10a61b85105b7af59" dependencies = [ "arrayvec 0.7.2", "bumpalo", @@ -1184,29 +1186,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.92.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "0.93.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e72b2d5ec8917b2971fe83850187373d0a186db4748a7c23a5f48691b8d92bb" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.92.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "0.93.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3461c0e0c2ebbeb92533aacb27e219289f60dc84134ef34fbf2d77c9eddf07ef" [[package]] name = "cranelift-entity" -version = "0.92.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "0.93.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af684f7f7b01427b1942c7102673322a51b9d6f261e9663dc5e5595786775531" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.92.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "0.93.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d361ed0373cf5f086b49c499aa72227b646a64f899f32e34312f97c0fadff75" dependencies = [ "cranelift-codegen", "log", @@ -1216,13 +1222,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.92.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "0.93.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cef4f8f3984d772c199a48896d2fb766f96301bf71b371e03a2b99f4f3b7b931" [[package]] name = "cranelift-native" -version = "0.92.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "0.93.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98e4e99a353703475d5acb402b9c13482d41d8a4008b352559bd560afb90363" dependencies = [ "cranelift-codegen", "libc", @@ -1231,8 +1239,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.92.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "0.93.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e3f4f0779a1b0f286a6ef19835d8665f88326e656a6d7d84fa9a39fa38ca32" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -2301,7 +2310,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", ] @@ -2324,7 +2333,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-support-procedural", @@ -2349,7 +2358,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "Inflector", "array-bytes", @@ -2396,7 +2405,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2407,7 +2416,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2424,7 +2433,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -2453,7 +2462,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "log", @@ -2469,7 +2478,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "bitflags", "frame-metadata", @@ -2501,7 +2510,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "Inflector", "cfg-expr", @@ -2516,7 +2525,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2528,7 +2537,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro2", "quote", @@ -2538,7 +2547,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -2562,7 +2571,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -2573,7 +2582,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "log", @@ -2591,7 +2600,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -2606,7 +2615,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "sp-api", @@ -2615,7 +2624,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "parity-scale-codec", @@ -2786,7 +2795,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "chrono", "frame-election-provider-support", @@ -4554,7 +4563,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "log", @@ -4573,7 +4582,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "anyhow", "jsonrpsee", @@ -5135,7 +5144,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5150,7 +5159,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5166,7 +5175,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5180,7 +5189,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5204,7 +5213,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5224,7 +5233,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5243,7 +5252,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5258,7 +5267,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5277,7 +5286,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "binary-merkle-tree", @@ -5301,7 +5310,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5319,7 +5328,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5338,7 +5347,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5355,7 +5364,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5372,7 +5381,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5390,7 +5399,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5413,7 +5422,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5426,7 +5435,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5444,7 +5453,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5462,7 +5471,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5485,7 +5494,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5501,7 +5510,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5521,7 +5530,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5538,7 +5547,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5555,7 +5564,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#83de5099a3cae683ccbaf2ab7a4d688e2d602f57" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5574,7 +5583,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5591,7 +5600,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5607,7 +5616,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5623,7 +5632,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5640,7 +5649,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5660,7 +5669,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -5671,7 +5680,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5688,7 +5697,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5712,7 +5721,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5729,7 +5738,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5744,7 +5753,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5762,7 +5771,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5777,7 +5786,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5796,7 +5805,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5813,7 +5822,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5834,7 +5843,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5850,7 +5859,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5864,7 +5873,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5887,7 +5896,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5898,7 +5907,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "log", "sp-arithmetic", @@ -5907,7 +5916,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "sp-api", @@ -5916,7 +5925,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5933,7 +5942,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5947,7 +5956,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5965,7 +5974,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5984,7 +5993,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -6000,7 +6009,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6016,7 +6025,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6028,7 +6037,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6045,7 +6054,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6060,7 +6069,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6076,7 +6085,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6091,7 +6100,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -8590,6 +8599,18 @@ version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" +[[package]] +name = "region" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" +dependencies = [ + "bitflags", + "libc", + "mach", + "winapi", +] + [[package]] name = "remote-ext-tests-bags-list" version = "0.9.37" @@ -8998,7 +9019,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "log", "sp-core", @@ -9009,7 +9030,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures", @@ -9036,7 +9057,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "futures-timer", @@ -9059,7 +9080,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9075,7 +9096,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9090,7 +9111,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9101,7 +9122,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "chrono", @@ -9141,7 +9162,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "fnv", "futures", @@ -9167,7 +9188,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "hash-db", "kvdb", @@ -9193,7 +9214,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures", @@ -9218,7 +9239,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "fork-tree", @@ -9257,7 +9278,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "jsonrpsee", @@ -9279,7 +9300,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9292,7 +9313,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures", @@ -9315,7 +9336,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -9339,7 +9360,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9352,7 +9373,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "log", "sc-allocator", @@ -9365,7 +9386,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "anyhow", "cfg-if", @@ -9383,7 +9404,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "ahash 0.8.2", "array-bytes", @@ -9423,7 +9444,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "finality-grandpa", "futures", @@ -9443,7 +9464,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "ansi_term", "futures", @@ -9458,7 +9479,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "async-trait", @@ -9473,7 +9494,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "async-trait", @@ -9516,7 +9537,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "cid", "futures", @@ -9535,7 +9556,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "bitflags", @@ -9561,7 +9582,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "ahash 0.8.2", "futures", @@ -9579,7 +9600,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "futures", @@ -9600,7 +9621,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "async-trait", @@ -9632,7 +9653,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "futures", @@ -9651,7 +9672,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "bytes", @@ -9681,7 +9702,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "libp2p", @@ -9694,7 +9715,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9703,7 +9724,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "jsonrpsee", @@ -9733,7 +9754,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9752,7 +9773,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "http", "jsonrpsee", @@ -9767,7 +9788,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "futures", @@ -9793,7 +9814,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "directories", @@ -9859,7 +9880,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "log", "parity-scale-codec", @@ -9870,7 +9891,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "clap 4.0.15", "futures", @@ -9886,7 +9907,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9905,7 +9926,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "libc", @@ -9924,7 +9945,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "chrono", "futures", @@ -9943,7 +9964,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "ansi_term", "atty", @@ -9974,7 +9995,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9985,7 +10006,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures", @@ -10012,7 +10033,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures", @@ -10026,7 +10047,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "backtrace", "futures", @@ -10534,7 +10555,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "hash-db", "log", @@ -10552,7 +10573,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "blake2", "proc-macro-crate", @@ -10564,7 +10585,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -10577,7 +10598,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "integer-sqrt", "num-traits", @@ -10591,7 +10612,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -10604,7 +10625,7 @@ dependencies = [ [[package]] name = "sp-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "lazy_static", "parity-scale-codec", @@ -10623,7 +10644,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "sp-api", @@ -10635,7 +10656,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "log", @@ -10653,7 +10674,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures", @@ -10671,7 +10692,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "parity-scale-codec", @@ -10689,7 +10710,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "merlin", @@ -10712,7 +10733,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -10724,7 +10745,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -10737,7 +10758,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "base58", @@ -10780,7 +10801,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "blake2", "byteorder", @@ -10794,7 +10815,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro2", "quote", @@ -10805,7 +10826,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10814,7 +10835,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro2", "quote", @@ -10824,7 +10845,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "environmental", "parity-scale-codec", @@ -10835,7 +10856,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "finality-grandpa", "log", @@ -10853,7 +10874,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10868,7 +10889,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "bytes", "ed25519", @@ -10893,7 +10914,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "lazy_static", "sp-core", @@ -10904,7 +10925,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures", @@ -10921,7 +10942,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "thiserror", "zstd", @@ -10930,7 +10951,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -10948,7 +10969,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -10962,7 +10983,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "sp-api", "sp-core", @@ -10972,7 +10993,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "backtrace", "lazy_static", @@ -10982,7 +11003,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "rustc-hash", "serde", @@ -10992,7 +11013,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "either", "hash256-std-hasher", @@ -11014,7 +11035,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11032,7 +11053,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "Inflector", "proc-macro-crate", @@ -11044,7 +11065,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11058,7 +11079,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11070,7 +11091,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "hash-db", "log", @@ -11090,12 +11111,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11108,7 +11129,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures-timer", @@ -11123,7 +11144,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "sp-std", @@ -11135,7 +11156,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "sp-api", "sp-runtime", @@ -11144,7 +11165,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "log", @@ -11160,7 +11181,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "ahash 0.8.2", "hash-db", @@ -11183,7 +11204,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11200,7 +11221,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11211,7 +11232,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11225,7 +11246,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11445,7 +11466,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "platforms", ] @@ -11453,7 +11474,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11472,7 +11493,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "hyper", "log", @@ -11484,7 +11505,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "jsonrpsee", @@ -11497,7 +11518,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "jsonrpsee", "log", @@ -11516,7 +11537,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "async-trait", @@ -11542,7 +11563,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11552,7 +11573,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11563,7 +11584,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "ansi_term", "build-helper", @@ -12364,7 +12385,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#473b5d06354c5b82e8f6df904c5f50d95c6fcc22" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "clap 4.0.15", @@ -12823,9 +12844,9 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.13.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc13b3c219ca9aafeec59150d80d89851df02e0061bc357b4d66fc55a8d38787" +checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" dependencies = [ "parity-wasm", "wasmi-validation", @@ -12843,22 +12864,23 @@ dependencies = [ [[package]] name = "wasmi_core" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a088e8c4c59c6f2b9eae169bf86328adccc477c00b56d3661e3e9fb397b184" +checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" dependencies = [ "downcast-rs", "libm", "memory_units", "num-rational", "num-traits", + "region", ] [[package]] name = "wasmparser" -version = "0.96.0" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adde01ade41ab9a5d10ec8ed0bb954238cf8625b5cd5a13093d6de2ad9c2be1a" +checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" dependencies = [ "indexmap", "url", @@ -12866,8 +12888,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "5.0.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9010891d0b8e367c3be94ca35d7bc25c1de3240463bb1d61bcfc8c2233c4e0d0" dependencies = [ "anyhow", "bincode", @@ -12893,16 +12916,18 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "5.0.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65805c663eaa8257b910666f6d4b056b5c7329750da754ba5df54f3af7dbf35c" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "5.0.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2049ddfc1b10efc3c5591d0e84b9570ca50478f8818f3bfabb1a467918f53fb4" dependencies = [ "anyhow", "base64", @@ -12920,8 +12945,9 @@ dependencies = [ [[package]] name = "wasmtime-cranelift" -version = "5.0.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9065cad6a724fa838ec8497567e0b23acc26417bb2449f8d9d2021925c72f2" dependencies = [ "anyhow", "cranelift-codegen", @@ -12940,8 +12966,9 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "5.0.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f964bb0b91fa021b8d1b488c62cc77b346c1dae6e3ebd010050b57c1f2ca657" dependencies = [ "anyhow", "cranelift-entity", @@ -12958,8 +12985,9 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "5.0.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7a1d06f5d109539e0168fc74fa65e3948ac8dac3bb8cdbd08b62b36a0ae27b8" dependencies = [ "addr2line 0.17.0", "anyhow", @@ -12981,8 +13009,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "5.0.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f76ef2e410329aaf8555ac6571d6fe07711be0646dcdf7ff3ab750a42ed2e583" dependencies = [ "object 0.29.0", "once_cell", @@ -12991,8 +13020,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-icache-coherence" -version = "5.0.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec1fd0f0dd79e7cc0f55b102e320d7c77ab76cd272008a8fd98e25b5777e2636" dependencies = [ "cfg-if", "libc", @@ -13001,8 +13031,9 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "5.0.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271aef9b4ca2e953a866293683f2db33cda46f6933c5e431e68d8373723d4ab6" dependencies = [ "anyhow", "cc", @@ -13024,8 +13055,9 @@ dependencies = [ [[package]] name = "wasmtime-types" -version = "5.0.0" -source = "git+https://github.com/paritytech/wasmtime.git?branch=v5.0.0_lto_fix#8a02705ad378108e43abe23c538688adf73f3b71" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b18144b0e45479a830ac9fcebfc71a16d90dc72d8ebd5679700eb3bfe974d7df" dependencies = [ "cranelift-entity", "serde", From dba85e80a77cdab8c5e19d7056c5b67134b5accf Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Sat, 25 Feb 2023 17:34:41 +0100 Subject: [PATCH 075/182] Adapt to upstream Substrate changes Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 2 +- runtime/parachains/src/mock.rs | 6 +++--- runtime/polkadot/src/lib.rs | 2 +- runtime/rococo/src/lib.rs | 7 +++--- runtime/westend/src/lib.rs | 2 +- xcm/xcm-builder/src/process_xcm_message.rs | 25 +++++++++++++--------- xcm/xcm-simulator/src/lib.rs | 12 +++++------ 7 files changed, 30 insertions(+), 26 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index c88869a26d1c..c83bb1bfe8ed 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1156,7 +1156,7 @@ impl ProcessMessage for MessageProcessor { fn process_message( message: &[u8], origin: Self::Origin, - weight_limit: Weight, + meter: &mut WeightMeter, ) -> Result<(bool, Weight), ProcessMessageError> { let para = match origin { AggregateMessageOrigin::UMP(para) => para, diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index f6de9129f89a..c3c36f39669d 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -430,8 +430,8 @@ impl ProcessMessage for TestProcessMessage { fn process_message( message: &[u8], origin: AggregateMessageOrigin, - weight_limit: Weight, - ) -> Result<(bool, Weight), ProcessMessageError> { + meter: &mut WeightMeter, + ) -> Result { let origin = match origin { AggregateMessageOrigin::UMP(o) => o, }; @@ -440,7 +440,7 @@ impl ProcessMessage for TestProcessMessage { Ok(w) => Weight::from_parts(w as u64, w as u64), Err(_) => return Err(ProcessMessageError::Corrupt), // same as the real `ProcessMessage` }; - if weight.any_gt(weight_limit) { + if meter.check_accrue(weight_limit) { return Err(ProcessMessageError::Overweight(weight)) } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index a5980149fb6f..a8b20d8a57fe 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1317,7 +1317,7 @@ impl ProcessMessage for MessageProcessor { fn process_message( message: &[u8], origin: Self::Origin, - weight_limit: Weight, + meter: &mut WeightMeter, ) -> Result<(bool, Weight), ProcessMessageError> { let para = match origin { AggregateMessageOrigin::UMP(para) => para, diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 14780bb3e552..332ca7bfe01d 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1080,8 +1080,8 @@ impl ProcessMessage for MessageProcessor { fn process_message( message: &[u8], origin: Self::Origin, - weight_limit: Weight, - ) -> Result<(bool, Weight), ProcessMessageError> { + meter: &mut WeightMeter, + ) -> Result { let para = match origin { AggregateMessageOrigin::UMP(para) => para, }; @@ -1089,8 +1089,7 @@ impl ProcessMessage for MessageProcessor { Junction, xcm_executor::XcmExecutor, RuntimeCall, - // FAIL-CI why does `Parachain` not accept a `ParaId`? - >::process_message(message, Junction::Parachain(para.into()), weight_limit) + >::process_message(message, Junction::Parachain(para.into()), meter) } } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 84e72ca530a1..5e60c1b54b1d 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -942,7 +942,7 @@ impl ProcessMessage for MessageProcessor { fn process_message( message: &[u8], origin: Self::Origin, - weight_limit: Weight, + meter: &mut WeightMeter, ) -> Result<(bool, Weight), ProcessMessageError> { let para = match origin { AggregateMessageOrigin::UMP(para) => para, diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index f2fab9ab3416..c5711dfa9654 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -24,7 +24,7 @@ use parity_scale_codec::{Decode, FullCodec, MaxEncodedLen}; use scale_info::TypeInfo; use sp_io::hashing::blake2_256; use sp_std::{fmt::Debug, marker::PhantomData}; -use sp_weights::Weight; +use sp_weights::{Weight, WeightMeter}; use xcm::prelude::*; pub struct ProcessXcmMessage( @@ -42,21 +42,26 @@ impl< fn process_message( message: &[u8], origin: Self::Origin, - weight_limit: Weight, - ) -> Result<(bool, Weight), ProcessMessageError> { + meter: &mut WeightMeter, + ) -> Result { let hash = blake2_256(message); let versioned_message = VersionedXcm::::decode(&mut &message[..]) .map_err(|_| ProcessMessageError::Corrupt)?; let message = Xcm::::try_from(versioned_message) .map_err(|_| ProcessMessageError::Unsupported)?; let pre = XcmExecutor::prepare(message).map_err(|_| ProcessMessageError::Unsupported)?; - let weight = pre.weight_of(); - ensure!(weight.all_lte(weight_limit), ProcessMessageError::Overweight(weight)); - match XcmExecutor::execute(origin.into(), pre, hash, Weight::zero()) { - Outcome::Complete(w) => Ok((true, w)), - Outcome::Incomplete(w, _) => Ok((false, w)), - Outcome::Error(_) => Err(ProcessMessageError::Unsupported), - } + let required = pre.weight_of(); + ensure!(meter.can_accrue(required), ProcessMessageError::Overweight(required)); + + let (consumed, result) = + match XcmExecutor::execute(origin.into(), pre, hash, Weight::zero()) { + Outcome::Complete(w) => (w, Ok(true)), + Outcome::Incomplete(w, _) => (w, Ok(false)), + // In the error-case we assume the worst case and consume all possibly required. + Outcome::Error(_) => (required, Err(ProcessMessageError::Unsupported)), + }; + meter.defensive_saturating_accrue(consumed); + result } } diff --git a/xcm/xcm-simulator/src/lib.rs b/xcm/xcm-simulator/src/lib.rs index 0f6f108f3e86..f6c0f4d60761 100644 --- a/xcm/xcm-simulator/src/lib.rs +++ b/xcm/xcm-simulator/src/lib.rs @@ -21,7 +21,7 @@ pub use paste; pub use frame_support::{ traits::{Get, ProcessMessage, ProcessMessageError}, - weights::Weight, + weights::{Weight, WeightMeter}, }; pub use sp_io::{hashing::blake2_256, TestExternalities}; pub use sp_std::{cell::RefCell, collections::vec_deque::VecDeque, marker::PhantomData}; @@ -116,14 +116,14 @@ macro_rules! decl_test_relay_chain { fn process_message( msg: &[u8], origin: Self::Origin, - max_weight: $crate::Weight, - ) -> Result<(bool, $crate::Weight), $crate::ProcessMessageError> { + meter: &mut $crate::WeightMeter, + ) -> Result { use $crate::{ProcessMessage, Junction, TestExt}; Self::execute_with(|| { $crate::ProcessXcmMessage::<$crate::Junction, $crate::XcmExecutor<$xcm_config>, $runtime_call>::process_message( - msg, $crate::Junction::Parachain(origin.into()), max_weight, + msg, $crate::Junction::Parachain(origin.into()), meter, ) }) } @@ -299,8 +299,8 @@ macro_rules! decl_test_network { $crate::Junctions::Here if destination.parent_count() == 1 => { let encoded = $crate::encode_xcm(message, $crate::MessageKind::Ump); let r = <$relay_chain>::process_message( - &encoded[..], para_id, - $crate::Weight::MAX, + encoded.as_slice(), para_id, + &mut $crate::WeightMeter::max_limit(), ); match r { Err($crate::ProcessMessageError::Overweight(required)) => From 10e7fc4804b2da1cba03caecf4c34885f34ddc6f Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Sat, 25 Feb 2023 17:50:35 +0100 Subject: [PATCH 076/182] Fix ProcesseMessage impls Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 6 +++--- runtime/polkadot/src/lib.rs | 6 +++--- runtime/rococo/src/lib.rs | 6 +++++- runtime/westend/src/lib.rs | 7 +++---- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index c83bb1bfe8ed..8fa75435253b 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -58,7 +58,7 @@ use frame_support::{ LockIdentifier, PrivilegeCmp, ProcessMessage, ProcessMessageError, StorageMapShim, WithdrawReasons, }, - weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier}, + weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier, WeightMeter}, PalletId, RuntimeDebug, }; use frame_system::EnsureRoot; @@ -1157,7 +1157,7 @@ impl ProcessMessage for MessageProcessor { message: &[u8], origin: Self::Origin, meter: &mut WeightMeter, - ) -> Result<(bool, Weight), ProcessMessageError> { + ) -> Result { let para = match origin { AggregateMessageOrigin::UMP(para) => para, }; @@ -1166,7 +1166,7 @@ impl ProcessMessage for MessageProcessor { xcm_executor::XcmExecutor, RuntimeCall, // FAIL-CI why does `Parachain` not accept a `ParaId`? - >::process_message(message, Junction::Parachain(para.into()), weight_limit) + >::process_message(message, Junction::Parachain(para.into()), meter) } } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index a8b20d8a57fe..ff69de0f85e0 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -45,7 +45,7 @@ use frame_support::{ ConstU32, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, PrivilegeCmp, ProcessMessage, ProcessMessageError, WithdrawReasons, }, - weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier}, + weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier, WeightMeter}, PalletId, RuntimeDebug, }; use frame_system::EnsureRoot; @@ -1318,7 +1318,7 @@ impl ProcessMessage for MessageProcessor { message: &[u8], origin: Self::Origin, meter: &mut WeightMeter, - ) -> Result<(bool, Weight), ProcessMessageError> { + ) -> Result { let para = match origin { AggregateMessageOrigin::UMP(para) => para, }; @@ -1327,7 +1327,7 @@ impl ProcessMessage for MessageProcessor { xcm_executor::XcmExecutor, RuntimeCall, // FAIL-CI why is the `into` needed? - >::process_message(message, Junction::Parachain(para.into()), weight_limit) + >::process_message(message, Junction::Parachain(para.into()), meter) } } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 332ca7bfe01d..b1c23e670ca5 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -62,7 +62,7 @@ use frame_support::{ Contains, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, PrivilegeCmp, ProcessMessage, ProcessMessageError, StorageMapShim, WithdrawReasons, }, - weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier}, + weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier, WeightMeter}, PalletId, RuntimeDebug, }; use frame_system::EnsureRoot; @@ -1099,6 +1099,10 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = ConstU32<65_536>; type MaxStale = ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; + #[cfg(not(feature = "runtime-benchmarks"))] type MessageProcessor = MessageProcessor; type QueueChangeHandler = (); // FAIL-CI diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 5e60c1b54b1d..0a5483b7d284 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -29,7 +29,7 @@ use frame_support::{ ConstU32, InstanceFilter, KeyOwnerProofSystem, ProcessMessage, ProcessMessageError, WithdrawReasons, }, - weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier}, + weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier, WeightMeter}, PalletId, }; use frame_system::EnsureRoot; @@ -943,7 +943,7 @@ impl ProcessMessage for MessageProcessor { message: &[u8], origin: Self::Origin, meter: &mut WeightMeter, - ) -> Result<(bool, Weight), ProcessMessageError> { + ) -> Result { let para = match origin { AggregateMessageOrigin::UMP(para) => para, }; @@ -951,8 +951,7 @@ impl ProcessMessage for MessageProcessor { Junction, xcm_executor::XcmExecutor, RuntimeCall, - // FAIL-CI why does `Parachain` not accept a `ParaId`? - >::process_message(message, Junction::Parachain(para.into()), weight_limit) + >::process_message(message, Junction::Parachain(para.into()), meter) } } From 7b331ccef446ef349c2358b245af3ab564ee2cc6 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Sat, 25 Feb 2023 18:48:27 +0100 Subject: [PATCH 077/182] Some tests Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 1 + runtime/kusama/src/lib.rs | 1 - runtime/polkadot/src/lib.rs | 1 - xcm/xcm-builder/Cargo.toml | 1 + xcm/xcm-builder/src/process_xcm_message.rs | 84 +++++++++++++++++++++- 5 files changed, 83 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9dc9d026fac1..dbc81fd7b6bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13797,6 +13797,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain", "polkadot-runtime-parachains", + "polkadot-test-runtime", "primitive-types", "scale-info", "sp-arithmetic", diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 8fa75435253b..e7bb7f0174ac 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1165,7 +1165,6 @@ impl ProcessMessage for MessageProcessor { Junction, xcm_executor::XcmExecutor, RuntimeCall, - // FAIL-CI why does `Parachain` not accept a `ParaId`? >::process_message(message, Junction::Parachain(para.into()), meter) } } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index ff69de0f85e0..29616fd2b4c4 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1326,7 +1326,6 @@ impl ProcessMessage for MessageProcessor { Junction, xcm_executor::XcmExecutor, RuntimeCall, - // FAIL-CI why is the `into` needed? >::process_message(message, Junction::Parachain(para.into()), meter) } } diff --git a/xcm/xcm-builder/Cargo.toml b/xcm/xcm-builder/Cargo.toml index 24b439789072..2dd8d25c714b 100644 --- a/xcm/xcm-builder/Cargo.toml +++ b/xcm/xcm-builder/Cargo.toml @@ -30,6 +30,7 @@ pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "m pallet-xcm = { path = "../pallet-xcm" } polkadot-runtime-parachains = { path = "../../runtime/parachains" } assert_matches = "1.5.0" +polkadot-test-runtime = { path = "../../runtime/test-runtime" } [features] default = ["std"] diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index c5711dfa9654..efb309098b02 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -27,6 +27,7 @@ use sp_std::{fmt::Debug, marker::PhantomData}; use sp_weights::{Weight, WeightMeter}; use xcm::prelude::*; +/// A message processor that delegates execution to an [XcmExecutor]. pub struct ProcessXcmMessage( PhantomData<(MessageOrigin, XcmExecutor, Call)>, ); @@ -57,7 +58,7 @@ impl< match XcmExecutor::execute(origin.into(), pre, hash, Weight::zero()) { Outcome::Complete(w) => (w, Ok(true)), Outcome::Incomplete(w, _) => (w, Ok(false)), - // In the error-case we assume the worst case and consume all possibly required. + // In the error-case we assume the worst case and consume all possible weight. Outcome::Error(_) => (required, Err(ProcessMessageError::Unsupported)), }; meter.defensive_saturating_accrue(consumed); @@ -67,8 +68,85 @@ impl< #[cfg(test)] mod tests { + use super::*; + use frame_support::{ + assert_err, assert_ok, + traits::{ProcessMessageError, ProcessMessageError::*}, + }; + use parity_scale_codec::Encode; + use polkadot_test_runtime::*; + use xcm::{v2, v3, VersionedXcm}; + + /// The processor to use for tests. + type Processor = + ProcessXcmMessage, RuntimeCall>; + const ORIGIN: Junction = Junction::OnlyChild; + + #[test] + fn process_message_trivial_works() { + // ClearOrigin works. + assert!(process(v2_xcm(true)).unwrap()); + assert!(process(v3_xcm(true)).unwrap()); + } + + #[test] + fn process_message_trivial_fails() { + // Trap makes it fail. + assert!(!process(v3_xcm(false)).unwrap()); + assert!(!process(v3_xcm(false)).unwrap()); + } + + #[test] + fn process_message_corrupted_fails() { + let msgs: &[&[u8]] = &[&[], &[55, 66], &[123, 222, 233]]; + for msg in msgs { + assert_err!(process_raw(msg), Corrupt); + } + } + #[test] - fn process_message_works() { - // FAIL-CI todo + fn process_message_overweight_fails() { + for msg in [v3_xcm(true), v3_xcm(false), v3_xcm(false), v2_xcm(false)] { + let msg = &msg.encode()[..]; + + // Errors if we stay below a weight limit of 1000. + for i in 0..10 { + let meter = &mut WeightMeter::from_limit((i * 10).into()); + assert_err!( + Processor::process_message(msg, ORIGIN, meter), + Overweight(1000.into()) + ); + } + + // Works with a limit of 1000. + let meter = &mut WeightMeter::from_limit(1000.into()); + assert_ok!(Processor::process_message(msg, ORIGIN, meter)); + } + } + + fn v2_xcm(success: bool) -> VersionedXcm { + let instr = if success { + v3::Instruction::::ClearOrigin + } else { + v3::Instruction::::Trap(1) + }; + VersionedXcm::V3(v3::Xcm::(vec![instr])) + } + + fn v3_xcm(success: bool) -> VersionedXcm { + let instr = if success { + v2::Instruction::::ClearOrigin + } else { + v2::Instruction::::Trap(1) + }; + VersionedXcm::V2(v2::Xcm::(vec![instr])) + } + + fn process(msg: VersionedXcm) -> Result { + process_raw(msg.encode().as_slice()) + } + + fn process_raw(raw: &[u8]) -> Result { + Processor::process_message(raw, ORIGIN, &mut WeightMeter::max_limit()) } } From 6a1f5479e8862aaf1db0c425fb680cebafb60728 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Sat, 25 Feb 2023 18:50:34 +0100 Subject: [PATCH 078/182] Use master Cargo.lock Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 393 +++++++++++++++++++++++++---------------------------- 1 file changed, 183 insertions(+), 210 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dbc81fd7b6bd..3ed3f384f417 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -455,7 +455,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "array-bytes", "async-trait", @@ -489,7 +489,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "beefy-gadget", "futures", @@ -508,7 +508,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "hash-db", "log", @@ -2310,7 +2310,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", ] @@ -2333,7 +2333,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support", "frame-support-procedural", @@ -2358,7 +2358,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "Inflector", "array-bytes", @@ -2405,7 +2405,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2416,7 +2416,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2433,7 +2433,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support", "frame-system", @@ -2462,7 +2462,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "futures", "log", @@ -2478,7 +2478,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "bitflags", "frame-metadata", @@ -2510,7 +2510,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "Inflector", "cfg-expr", @@ -2525,7 +2525,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2537,7 +2537,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "proc-macro2", "quote", @@ -2547,7 +2547,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -2571,7 +2571,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support", "frame-system", @@ -2582,7 +2582,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support", "log", @@ -2600,7 +2600,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -2615,7 +2615,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", "sp-api", @@ -2624,7 +2624,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support", "parity-scale-codec", @@ -2795,7 +2795,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "chrono", "frame-election-provider-support", @@ -3615,7 +3615,6 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", - "pallet-message-queue", "pallet-multisig", "pallet-nis", "pallet-nomination-pools", @@ -4563,7 +4562,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "futures", "log", @@ -4582,7 +4581,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "anyhow", "jsonrpsee", @@ -5144,7 +5143,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5159,7 +5158,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support", "frame-system", @@ -5175,7 +5174,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support", "frame-system", @@ -5189,7 +5188,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5213,7 +5212,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5233,7 +5232,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5252,7 +5251,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5267,7 +5266,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support", "frame-system", @@ -5286,7 +5285,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "array-bytes", "binary-merkle-tree", @@ -5310,7 +5309,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5328,7 +5327,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5347,7 +5346,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5364,7 +5363,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5381,7 +5380,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5399,7 +5398,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5422,7 +5421,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5435,7 +5434,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5453,7 +5452,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5471,7 +5470,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5494,7 +5493,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5510,7 +5509,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5530,7 +5529,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5547,7 +5546,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5561,29 +5560,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-message-queue" -version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-weights", -] - [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5600,7 +5580,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5616,7 +5596,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5632,7 +5612,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support", "frame-system", @@ -5649,7 +5629,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5669,7 +5649,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -5680,7 +5660,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support", "frame-system", @@ -5697,7 +5677,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5721,7 +5701,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5738,7 +5718,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5753,7 +5733,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5771,7 +5751,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5786,7 +5766,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5805,7 +5785,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5822,7 +5802,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support", "frame-system", @@ -5843,7 +5823,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5859,7 +5839,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support", "frame-system", @@ -5873,7 +5853,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5896,7 +5876,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5907,7 +5887,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "log", "sp-arithmetic", @@ -5916,7 +5896,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", "sp-api", @@ -5925,7 +5905,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5942,7 +5922,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support", "frame-system", @@ -5956,7 +5936,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5974,7 +5954,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -5993,7 +5973,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-support", "frame-system", @@ -6009,7 +5989,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6025,7 +6005,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6037,7 +6017,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -6054,7 +6034,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -6069,7 +6049,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -6085,7 +6065,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -6100,7 +6080,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-benchmarking", "frame-support", @@ -7459,7 +7439,6 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", - "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7618,7 +7597,6 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", - "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -8753,7 +8731,6 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", - "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -9019,7 +8996,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "log", "sp-core", @@ -9030,7 +9007,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "futures", @@ -9057,7 +9034,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "futures", "futures-timer", @@ -9080,7 +9057,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9096,7 +9073,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9111,7 +9088,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9122,7 +9099,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "array-bytes", "chrono", @@ -9162,7 +9139,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "fnv", "futures", @@ -9188,7 +9165,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "hash-db", "kvdb", @@ -9214,7 +9191,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "futures", @@ -9239,7 +9216,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "fork-tree", @@ -9278,7 +9255,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "futures", "jsonrpsee", @@ -9300,7 +9277,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9313,7 +9290,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "futures", @@ -9336,7 +9313,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -9360,7 +9337,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9373,7 +9350,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "log", "sc-allocator", @@ -9386,7 +9363,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "anyhow", "cfg-if", @@ -9404,7 +9381,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "ahash 0.8.2", "array-bytes", @@ -9444,7 +9421,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "finality-grandpa", "futures", @@ -9464,7 +9441,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "ansi_term", "futures", @@ -9479,7 +9456,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "array-bytes", "async-trait", @@ -9494,7 +9471,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "array-bytes", "async-trait", @@ -9537,7 +9514,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "cid", "futures", @@ -9556,7 +9533,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "bitflags", @@ -9582,7 +9559,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "ahash 0.8.2", "futures", @@ -9600,7 +9577,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "array-bytes", "futures", @@ -9621,7 +9598,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "array-bytes", "async-trait", @@ -9653,7 +9630,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "array-bytes", "futures", @@ -9672,7 +9649,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "array-bytes", "bytes", @@ -9702,7 +9679,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "futures", "libp2p", @@ -9715,7 +9692,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9724,7 +9701,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "futures", "jsonrpsee", @@ -9754,7 +9731,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9773,7 +9750,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "http", "jsonrpsee", @@ -9788,7 +9765,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "array-bytes", "futures", @@ -9814,7 +9791,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "directories", @@ -9880,7 +9857,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "log", "parity-scale-codec", @@ -9891,7 +9868,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "clap 4.0.15", "futures", @@ -9907,7 +9884,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9926,7 +9903,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "futures", "libc", @@ -9945,7 +9922,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "chrono", "futures", @@ -9964,7 +9941,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "ansi_term", "atty", @@ -9995,7 +9972,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10006,7 +9983,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "futures", @@ -10033,7 +10010,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "futures", @@ -10047,7 +10024,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "backtrace", "futures", @@ -10555,7 +10532,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "hash-db", "log", @@ -10573,7 +10550,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "blake2", "proc-macro-crate", @@ -10585,7 +10562,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", "scale-info", @@ -10598,7 +10575,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "integer-sqrt", "num-traits", @@ -10612,7 +10589,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", "scale-info", @@ -10625,7 +10602,7 @@ dependencies = [ [[package]] name = "sp-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "lazy_static", "parity-scale-codec", @@ -10644,7 +10621,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", "sp-api", @@ -10656,7 +10633,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "futures", "log", @@ -10674,7 +10651,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "futures", @@ -10692,7 +10669,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "parity-scale-codec", @@ -10710,7 +10687,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "merlin", @@ -10733,7 +10710,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", "scale-info", @@ -10745,7 +10722,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", "scale-info", @@ -10758,7 +10735,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "array-bytes", "base58", @@ -10801,7 +10778,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "blake2", "byteorder", @@ -10815,7 +10792,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "proc-macro2", "quote", @@ -10826,7 +10803,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10835,7 +10812,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "proc-macro2", "quote", @@ -10845,7 +10822,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "environmental", "parity-scale-codec", @@ -10856,7 +10833,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "finality-grandpa", "log", @@ -10874,7 +10851,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10889,7 +10866,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "bytes", "ed25519", @@ -10914,7 +10891,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "lazy_static", "sp-core", @@ -10925,7 +10902,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "futures", @@ -10942,7 +10919,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "thiserror", "zstd", @@ -10951,7 +10928,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -10969,7 +10946,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", "scale-info", @@ -10983,7 +10960,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "sp-api", "sp-core", @@ -10993,7 +10970,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "backtrace", "lazy_static", @@ -11003,7 +10980,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "rustc-hash", "serde", @@ -11013,7 +10990,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "either", "hash256-std-hasher", @@ -11035,7 +11012,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11053,7 +11030,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "Inflector", "proc-macro-crate", @@ -11065,7 +11042,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", "scale-info", @@ -11079,7 +11056,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", "scale-info", @@ -11091,7 +11068,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "hash-db", "log", @@ -11111,12 +11088,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11129,7 +11106,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "futures-timer", @@ -11144,7 +11121,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", "sp-std", @@ -11156,7 +11133,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "sp-api", "sp-runtime", @@ -11165,7 +11142,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "log", @@ -11181,7 +11158,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "ahash 0.8.2", "hash-db", @@ -11204,7 +11181,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11221,7 +11198,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11232,7 +11209,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11246,7 +11223,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "parity-scale-codec", "scale-info", @@ -11466,7 +11443,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "platforms", ] @@ -11474,7 +11451,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11493,7 +11470,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "hyper", "log", @@ -11505,7 +11482,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "jsonrpsee", @@ -11518,7 +11495,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "jsonrpsee", "log", @@ -11537,7 +11514,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "array-bytes", "async-trait", @@ -11563,7 +11540,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11573,7 +11550,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11584,7 +11561,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "ansi_term", "build-helper", @@ -12385,7 +12362,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" dependencies = [ "async-trait", "clap 4.0.15", @@ -13357,7 +13334,6 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", - "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -13797,14 +13773,12 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain", "polkadot-runtime-parachains", - "polkadot-test-runtime", "primitive-types", "scale-info", "sp-arithmetic", "sp-io", "sp-runtime", "sp-std", - "sp-weights", "xcm", "xcm-executor", ] @@ -13871,7 +13845,6 @@ dependencies = [ "sp-io", "sp-std", "xcm", - "xcm-builder", "xcm-executor", ] From 35a7dc091a3b181d93277b255db5dfd3d87473c1 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Sat, 25 Feb 2023 18:51:04 +0100 Subject: [PATCH 079/182] cargo update -p sp-io Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 393 ++++++++++++++++++++++++++++------------------------- 1 file changed, 210 insertions(+), 183 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3ed3f384f417..dbc81fd7b6bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -455,7 +455,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "async-trait", @@ -489,7 +489,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "beefy-gadget", "futures", @@ -508,7 +508,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "hash-db", "log", @@ -2310,7 +2310,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", ] @@ -2333,7 +2333,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-support-procedural", @@ -2358,7 +2358,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "Inflector", "array-bytes", @@ -2405,7 +2405,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2416,7 +2416,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2433,7 +2433,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -2462,7 +2462,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "log", @@ -2478,7 +2478,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "bitflags", "frame-metadata", @@ -2510,7 +2510,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "Inflector", "cfg-expr", @@ -2525,7 +2525,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2537,7 +2537,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro2", "quote", @@ -2547,7 +2547,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -2571,7 +2571,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -2582,7 +2582,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "log", @@ -2600,7 +2600,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -2615,7 +2615,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "sp-api", @@ -2624,7 +2624,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "parity-scale-codec", @@ -2795,7 +2795,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "chrono", "frame-election-provider-support", @@ -3615,6 +3615,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nis", "pallet-nomination-pools", @@ -4562,7 +4563,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "log", @@ -4581,7 +4582,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "anyhow", "jsonrpsee", @@ -5143,7 +5144,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5158,7 +5159,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5174,7 +5175,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5188,7 +5189,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5212,7 +5213,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5232,7 +5233,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5251,7 +5252,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5266,7 +5267,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5285,7 +5286,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "binary-merkle-tree", @@ -5309,7 +5310,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5327,7 +5328,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5346,7 +5347,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5363,7 +5364,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5380,7 +5381,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5398,7 +5399,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5421,7 +5422,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5434,7 +5435,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5452,7 +5453,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5470,7 +5471,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5493,7 +5494,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5509,7 +5510,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5529,7 +5530,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5546,7 +5547,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5560,10 +5561,29 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-message-queue" +version = "7.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", +] + [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5580,7 +5600,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5596,7 +5616,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5612,7 +5632,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5629,7 +5649,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5649,7 +5669,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -5660,7 +5680,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5677,7 +5697,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5701,7 +5721,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5718,7 +5738,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5733,7 +5753,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5751,7 +5771,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5766,7 +5786,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5785,7 +5805,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5802,7 +5822,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5823,7 +5843,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5839,7 +5859,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5853,7 +5873,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5876,7 +5896,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5887,7 +5907,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "log", "sp-arithmetic", @@ -5896,7 +5916,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "sp-api", @@ -5905,7 +5925,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5922,7 +5942,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5936,7 +5956,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5954,7 +5974,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -5973,7 +5993,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-support", "frame-system", @@ -5989,7 +6009,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6005,7 +6025,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6017,7 +6037,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6034,7 +6054,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6049,7 +6069,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6065,7 +6085,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6080,7 +6100,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -7439,6 +7459,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7597,6 +7618,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -8731,6 +8753,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -8996,7 +9019,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "log", "sp-core", @@ -9007,7 +9030,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures", @@ -9034,7 +9057,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "futures-timer", @@ -9057,7 +9080,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9073,7 +9096,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9088,7 +9111,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9099,7 +9122,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "chrono", @@ -9139,7 +9162,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "fnv", "futures", @@ -9165,7 +9188,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "hash-db", "kvdb", @@ -9191,7 +9214,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures", @@ -9216,7 +9239,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "fork-tree", @@ -9255,7 +9278,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "jsonrpsee", @@ -9277,7 +9300,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9290,7 +9313,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures", @@ -9313,7 +9336,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -9337,7 +9360,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9350,7 +9373,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "log", "sc-allocator", @@ -9363,7 +9386,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "anyhow", "cfg-if", @@ -9381,7 +9404,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "ahash 0.8.2", "array-bytes", @@ -9421,7 +9444,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "finality-grandpa", "futures", @@ -9441,7 +9464,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "ansi_term", "futures", @@ -9456,7 +9479,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "async-trait", @@ -9471,7 +9494,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "async-trait", @@ -9514,7 +9537,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "cid", "futures", @@ -9533,7 +9556,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "bitflags", @@ -9559,7 +9582,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "ahash 0.8.2", "futures", @@ -9577,7 +9600,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "futures", @@ -9598,7 +9621,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "async-trait", @@ -9630,7 +9653,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "futures", @@ -9649,7 +9672,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "bytes", @@ -9679,7 +9702,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "libp2p", @@ -9692,7 +9715,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9701,7 +9724,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "jsonrpsee", @@ -9731,7 +9754,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9750,7 +9773,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "http", "jsonrpsee", @@ -9765,7 +9788,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "futures", @@ -9791,7 +9814,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "directories", @@ -9857,7 +9880,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "log", "parity-scale-codec", @@ -9868,7 +9891,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "clap 4.0.15", "futures", @@ -9884,7 +9907,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9903,7 +9926,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "libc", @@ -9922,7 +9945,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "chrono", "futures", @@ -9941,7 +9964,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "ansi_term", "atty", @@ -9972,7 +9995,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9983,7 +10006,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures", @@ -10010,7 +10033,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures", @@ -10024,7 +10047,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "backtrace", "futures", @@ -10532,7 +10555,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "hash-db", "log", @@ -10550,7 +10573,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "blake2", "proc-macro-crate", @@ -10562,7 +10585,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -10575,7 +10598,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "integer-sqrt", "num-traits", @@ -10589,7 +10612,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -10602,7 +10625,7 @@ dependencies = [ [[package]] name = "sp-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "lazy_static", "parity-scale-codec", @@ -10621,7 +10644,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "sp-api", @@ -10633,7 +10656,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "log", @@ -10651,7 +10674,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures", @@ -10669,7 +10692,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "parity-scale-codec", @@ -10687,7 +10710,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "merlin", @@ -10710,7 +10733,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -10722,7 +10745,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -10735,7 +10758,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "base58", @@ -10778,7 +10801,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "blake2", "byteorder", @@ -10792,7 +10815,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro2", "quote", @@ -10803,7 +10826,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10812,7 +10835,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro2", "quote", @@ -10822,7 +10845,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "environmental", "parity-scale-codec", @@ -10833,7 +10856,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "finality-grandpa", "log", @@ -10851,7 +10874,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10866,7 +10889,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "bytes", "ed25519", @@ -10891,7 +10914,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "lazy_static", "sp-core", @@ -10902,7 +10925,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures", @@ -10919,7 +10942,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "thiserror", "zstd", @@ -10928,7 +10951,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -10946,7 +10969,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -10960,7 +10983,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "sp-api", "sp-core", @@ -10970,7 +10993,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "backtrace", "lazy_static", @@ -10980,7 +11003,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "rustc-hash", "serde", @@ -10990,7 +11013,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "either", "hash256-std-hasher", @@ -11012,7 +11035,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11030,7 +11053,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "Inflector", "proc-macro-crate", @@ -11042,7 +11065,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11056,7 +11079,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11068,7 +11091,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "hash-db", "log", @@ -11088,12 +11111,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11106,7 +11129,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "futures-timer", @@ -11121,7 +11144,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "sp-std", @@ -11133,7 +11156,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "sp-api", "sp-runtime", @@ -11142,7 +11165,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "log", @@ -11158,7 +11181,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "ahash 0.8.2", "hash-db", @@ -11181,7 +11204,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11198,7 +11221,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11209,7 +11232,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11223,7 +11246,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "parity-scale-codec", "scale-info", @@ -11443,7 +11466,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "platforms", ] @@ -11451,7 +11474,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11470,7 +11493,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "hyper", "log", @@ -11482,7 +11505,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "jsonrpsee", @@ -11495,7 +11518,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "jsonrpsee", "log", @@ -11514,7 +11537,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "array-bytes", "async-trait", @@ -11540,7 +11563,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11550,7 +11573,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11561,7 +11584,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "ansi_term", "build-helper", @@ -12362,7 +12385,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#1837f423b494254e1d27834b1c9da34b2c0c2375" +source = "git+https://github.com/paritytech/substrate?branch=master#9526f040b487aa8642ba21450cddfbbcace9e1f2" dependencies = [ "async-trait", "clap 4.0.15", @@ -13334,6 +13357,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -13773,12 +13797,14 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain", "polkadot-runtime-parachains", + "polkadot-test-runtime", "primitive-types", "scale-info", "sp-arithmetic", "sp-io", "sp-runtime", "sp-std", + "sp-weights", "xcm", "xcm-executor", ] @@ -13845,6 +13871,7 @@ dependencies = [ "sp-io", "sp-std", "xcm", + "xcm-builder", "xcm-executor", ] From 8f993570a3c39447f518bfe5d2459ed467cb05c8 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 12:01:03 +0100 Subject: [PATCH 080/182] Use new MQ API Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/mock.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index c3c36f39669d..44057fb797ba 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -28,7 +28,7 @@ use frame_support::{ GenesisBuild, KeyOwnerProofSystem, ProcessMessage, ProcessMessageError, ValidatorSet, ValidatorSetWithIdentification, }, - weights::Weight, + weights::{Weight, WeightMeter}, }; use frame_support_test::TestRandomness; use parity_scale_codec::Decode; @@ -436,18 +436,18 @@ impl ProcessMessage for TestProcessMessage { AggregateMessageOrigin::UMP(o) => o, }; - let weight = match u32::decode(&mut &message[..]) { + let required = match u32::decode(&mut &message[..]) { Ok(w) => Weight::from_parts(w as u64, w as u64), Err(_) => return Err(ProcessMessageError::Corrupt), // same as the real `ProcessMessage` }; - if meter.check_accrue(weight_limit) { - return Err(ProcessMessageError::Overweight(weight)) + if meter.check_accrue(required) { + return Err(ProcessMessageError::Overweight(required)) } let mut processed = Processed::get(); processed.push((origin, message.to_vec())); Processed::set(processed); - Ok((true, weight)) + Ok(true) } } From ebc84e937e602371270ed284b255b3040a800c23 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 12:23:48 +0100 Subject: [PATCH 081/182] Fix test Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/mock.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 44057fb797ba..5f4c293eeb6d 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -440,7 +440,7 @@ impl ProcessMessage for TestProcessMessage { Ok(w) => Weight::from_parts(w as u64, w as u64), Err(_) => return Err(ProcessMessageError::Corrupt), // same as the real `ProcessMessage` }; - if meter.check_accrue(required) { + if !meter.check_accrue(required) { return Err(ProcessMessageError::Overweight(required)) } From 6bf76133f4255a0625932efc3eb46e641c5dcdc3 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 12:59:08 +0100 Subject: [PATCH 082/182] Fix migration Signed-off-by: Oliver Tale-Yazdi --- .../parachains/src/configuration/migration.rs | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs index f29d9877650a..3146a1686b79 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -16,7 +16,7 @@ //! A module that is responsible for migration of storage. -use crate::configuration::{self, Config, Pallet, Store}; +use crate::configuration::{self, Config, Pallet, Store, LOG_TARGET}; use frame_support::{pallet_prelude::*, traits::StorageVersion, weights::Weight}; use frame_system::pallet_prelude::BlockNumberFor; @@ -72,7 +72,6 @@ pub mod v5 { pub max_validators: Option, pub dispute_period: SessionIndex, pub dispute_post_conclusion_acceptance_period: BlockNumber, - pub dispute_max_spam_slots: u32, pub dispute_conclusion_by_time_out_period: BlockNumber, pub no_show_slots: u32, pub n_delay_tranches: u32, @@ -105,7 +104,6 @@ pub mod v5 { max_validators: None, dispute_period: 6, dispute_post_conclusion_acceptance_period: 100.into(), - dispute_max_spam_slots: 2, dispute_conclusion_by_time_out_period: 200.into(), n_delay_tranches: Default::default(), zeroth_delay_tranche_width: Default::default(), @@ -139,9 +137,9 @@ pub mod v5 { impl OnRuntimeUpgrade for MigrateV4ToV5 { #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, &'static str> { - log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade()"); - ensure!(StorageVersion::get::>() == 4, "The migration requires version 4"); + log::trace!(target: LOG_TARGET, "Going to upgraded parachain config..."); + Ok(Vec::new()) } @@ -149,24 +147,21 @@ pub mod v5 { if StorageVersion::get::>() == 4 { let weight_consumed = migrate_v4_to_v5::(); - log::info!( - target: configuration::LOG_TARGET, - "MigrateV4ToV5 executed successfully" - ); + log::info!(target: LOG_TARGET, "MigrateV4ToV5 executed successfully"); STORAGE_VERSION.put::>(); weight_consumed } else { - log::warn!(target: configuration::LOG_TARGET, "MigrateV4ToV5 should be removed."); + log::warn!(target: LOG_TARGET, "MigrateV4ToV5 should be removed."); T::DbWeight::get().reads(1) } } #[cfg(feature = "try-runtime")] fn post_upgrade(_state: Vec) -> Result<(), &'static str> { - log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade()"); + log::trace!(target: LOG_TARGET, "Running post_upgrade()"); ensure!( - StorageVersion::get::>() == STORAGE_VERSION, + StorageVersion::get::>() == 5, "Storage version should be 5 after the migration" ); @@ -229,16 +224,13 @@ minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, } }; - if let Err(_) = as Store>::ActiveConfig::translate(|pre| pre.map(translate)) { + if let Err(err) = as Store>::ActiveConfig::translate(|pre| pre.map(translate)) { // `Err` is returned when the pre-migration type cannot be deserialized. This // cannot happen if the migration runs correctly, i.e. against the expected version. // // This happening almost surely will lead to a panic somewhere else. Corruption seems // to be unlikely to be caused by this. So we just log. Maybe it'll work out still? - log::error!( - target: configuration::LOG_TARGET, - "unexpected error when performing translation of the configuration type during storage upgrade to v5." - ); + log::error!(target: LOG_TARGET, "Could not translate ActiveConfig object: {:?}", err); } T::DbWeight::get().reads_writes(1, 1) @@ -250,27 +242,29 @@ mod tests { use super::*; use crate::mock::{new_test_ext, Test}; + use frame_support::traits::OnRuntimeUpgrade; + /// The old V4 config can be decoded from actual on-chain data. #[test] fn v4_deserialized_from_actual_data() { // Example how to get new `raw_config`: // We'll obtain the raw_config for block - // 16,459,112 (0x6e19600753afca856aa6222e18d49abe8bcd9ac219d526ee07a119a8f5ef6d52) on Kusama. + // 16,832,711 (0x2e3d78b87f0811f18a8b8469596aa7d8c9ef10d622b90d647f10ceebee3e380c) on Kusama. // Steps: // 1. Go to Polkadot.js -> Developer -> Chain state -> Storage: https://polkadot.js.org/apps/#/chainstate // 2. Set these parameters: // 2.1. selected state query: configuration; activeConfig(): PolkadotRuntimeParachainsConfigurationHostConfiguration - // 2.2. blockhash to query at: 0x6e19600753afca856aa6222e18d49abe8bcd9ac219d526ee07a119a8f5ef6d52 (the hash of the block) + // 2.2. blockhash to query at from above. // 2.3. Note the value of encoded storage key -> 0x06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385 for the referenced block. // 2.4. You'll also need the decoded values to update the test. // 3. Go to Polkadot.js -> Developer -> Chain state -> Raw storage // 3.1 Enter the encoded storage key and you get the raw config. - // Fetched at Kusama 16,459,112 (0x6e19600753afca856aa6222e18d49abe8bcd9ac219d526ee07a119a8f5ef6d52) + // Fetched at Kusama 16,832,711 (0x2e3d78b87f0811f18a8b8469596aa7d8c9ef10d622b90d647f10ceebee3e380c) // // This exceeds the maximal line width length, but that's fine, since this is not code and // doesn't need to be read and also leaving it as one line allows to easily copy it. - let raw_config = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c800000700e8764817020040011e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c8000000060000005802000002000000580200000200000059000000000000001e000000280000000700c817a80402004001000200000014000000"]; + let raw_config = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c800000700e8764817020040011e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c80000000600000058020000580200000200000059000000000000001e000000280000000700c817a80402004001010200000014000000"]; let v4 = v5::V4HostConfiguration::::decode(&mut &raw_config[..]) .unwrap(); @@ -316,8 +310,13 @@ mod tests { &configuration::ActiveConfig::::hashed_key(), &v4.encode(), ); + StorageVersion::new(4).put::>(); - migrate_v4_to_v5::(); + #[cfg(feature = "try-runtime")] + MigrateV4ToV5::::pre_upgrade().unwrap(); + let _weight = MigrateV4ToV5::::on_runtime_upgrade(); + #[cfg(feature = "try-runtime")] + MigrateV4ToV5::::post_upgrade(vec![]).unwrap(); let v5 = configuration::ActiveConfig::::get(); From 6f934877091d3873ba6acb7c996c21cf504a0362 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 12:59:16 +0100 Subject: [PATCH 083/182] Update Cargo.lock Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 447 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 256 insertions(+), 191 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b8df8a174f9c..5f1652365876 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -455,7 +455,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "array-bytes", "async-trait", @@ -489,7 +489,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "beefy-gadget", "futures", @@ -508,7 +508,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "hash-db", "log", @@ -2310,7 +2310,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", ] @@ -2333,7 +2333,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support", "frame-support-procedural", @@ -2358,7 +2358,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "Inflector", "array-bytes", @@ -2405,7 +2405,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2416,7 +2416,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2433,7 +2433,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support", "frame-system", @@ -2462,7 +2462,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "futures", "log", @@ -2478,9 +2478,10 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "bitflags", + "environmental", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", @@ -2510,7 +2511,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "Inflector", "cfg-expr", @@ -2525,7 +2526,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2537,7 +2538,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "proc-macro2", "quote", @@ -2547,7 +2548,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -2571,7 +2572,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support", "frame-system", @@ -2582,7 +2583,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support", "log", @@ -2600,7 +2601,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -2615,7 +2616,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", "sp-api", @@ -2624,7 +2625,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support", "parity-scale-codec", @@ -2649,6 +2650,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "fs4" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea55201cc351fdb478217c0fb641b59813da9b4efe4c414a9d8f989a657d149" +dependencies = [ + "libc", + "rustix 0.35.13", + "winapi", +] + [[package]] name = "fs_extra" version = "1.2.0" @@ -2795,7 +2807,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "chrono", "frame-election-provider-support", @@ -3370,6 +3382,12 @@ dependencies = [ "webrtc-util", ] +[[package]] +name = "io-lifetimes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" + [[package]] name = "io-lifetimes" version = "1.0.4" @@ -3615,6 +3633,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nis", "pallet-nomination-pools", @@ -4299,6 +4318,12 @@ dependencies = [ "nalgebra", ] +[[package]] +name = "linux-raw-sys" +version = "0.0.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" + [[package]] name = "linux-raw-sys" version = "0.1.4" @@ -4447,7 +4472,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" dependencies = [ - "rustix", + "rustix 0.36.7", ] [[package]] @@ -4562,7 +4587,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "futures", "log", @@ -4581,7 +4606,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "anyhow", "jsonrpsee", @@ -5143,7 +5168,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5158,7 +5183,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support", "frame-system", @@ -5174,7 +5199,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support", "frame-system", @@ -5188,7 +5213,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5212,7 +5237,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5232,7 +5257,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5251,7 +5276,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5266,7 +5291,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support", "frame-system", @@ -5285,7 +5310,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "array-bytes", "binary-merkle-tree", @@ -5309,7 +5334,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5327,7 +5352,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5346,7 +5371,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5363,7 +5388,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5380,7 +5405,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5398,7 +5423,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5421,7 +5446,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5434,7 +5459,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5452,7 +5477,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5470,7 +5495,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5493,7 +5518,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5509,7 +5534,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5529,7 +5554,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5546,7 +5571,24 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-message-queue" +version = "7.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5554,16 +5596,18 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", + "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", "sp-std", + "sp-weights", ] [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5580,7 +5624,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5596,7 +5640,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5612,7 +5656,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support", "frame-system", @@ -5629,7 +5673,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5649,7 +5693,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -5660,7 +5704,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support", "frame-system", @@ -5677,7 +5721,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5701,7 +5745,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5718,7 +5762,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5733,7 +5777,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5751,7 +5795,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5766,7 +5810,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5785,7 +5829,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5802,7 +5846,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support", "frame-system", @@ -5823,7 +5867,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5839,7 +5883,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support", "frame-system", @@ -5853,7 +5897,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5876,7 +5920,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5887,7 +5931,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "log", "sp-arithmetic", @@ -5896,7 +5940,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", "sp-api", @@ -5905,7 +5949,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5922,7 +5966,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support", "frame-system", @@ -5936,7 +5980,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5954,7 +5998,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -5973,7 +6017,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-support", "frame-system", @@ -5989,7 +6033,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6005,7 +6049,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6017,7 +6061,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -6034,7 +6078,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -6049,7 +6093,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -6065,7 +6109,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -6080,7 +6124,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-benchmarking", "frame-support", @@ -7439,6 +7483,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7597,6 +7642,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -8731,6 +8777,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -8892,6 +8939,20 @@ dependencies = [ "nom", ] +[[package]] +name = "rustix" +version = "0.35.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes 0.7.5", + "libc", + "linux-raw-sys 0.0.46", + "windows-sys 0.42.0", +] + [[package]] name = "rustix" version = "0.36.7" @@ -8900,9 +8961,9 @@ checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03" dependencies = [ "bitflags", "errno", - "io-lifetimes", + "io-lifetimes 1.0.4", "libc", - "linux-raw-sys", + "linux-raw-sys 0.1.4", "windows-sys 0.42.0", ] @@ -8996,7 +9057,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "log", "sp-core", @@ -9007,7 +9068,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "futures", @@ -9034,7 +9095,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "futures", "futures-timer", @@ -9057,7 +9118,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9073,7 +9134,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9088,7 +9149,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9099,7 +9160,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "array-bytes", "chrono", @@ -9139,7 +9200,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "fnv", "futures", @@ -9165,7 +9226,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "hash-db", "kvdb", @@ -9191,7 +9252,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "futures", @@ -9216,7 +9277,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "fork-tree", @@ -9255,7 +9316,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "futures", "jsonrpsee", @@ -9277,7 +9338,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9290,7 +9351,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "ahash 0.8.2", "array-bytes", @@ -9330,7 +9391,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "finality-grandpa", "futures", @@ -9350,7 +9411,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "futures", @@ -9373,7 +9434,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -9397,7 +9458,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9410,7 +9471,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "log", "sc-allocator", @@ -9423,14 +9484,14 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "anyhow", "cfg-if", "libc", "log", "once_cell", - "rustix", + "rustix 0.36.7", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -9441,7 +9502,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "ansi_term", "futures", @@ -9456,7 +9517,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "array-bytes", "async-trait", @@ -9471,7 +9532,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "array-bytes", "async-trait", @@ -9514,7 +9575,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "cid", "futures", @@ -9533,7 +9594,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "bitflags", @@ -9559,7 +9620,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "ahash 0.8.2", "futures", @@ -9577,7 +9638,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "array-bytes", "futures", @@ -9598,7 +9659,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "array-bytes", "async-trait", @@ -9630,7 +9691,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "array-bytes", "futures", @@ -9649,7 +9710,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "array-bytes", "bytes", @@ -9679,7 +9740,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "futures", "libp2p", @@ -9692,7 +9753,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9701,7 +9762,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "futures", "jsonrpsee", @@ -9731,7 +9792,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9750,7 +9811,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "http", "jsonrpsee", @@ -9765,7 +9826,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "array-bytes", "futures", @@ -9791,7 +9852,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "directories", @@ -9857,7 +9918,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "log", "parity-scale-codec", @@ -9868,12 +9929,12 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "clap 4.0.15", + "fs4", "futures", "log", - "nix 0.26.2", "sc-client-db", "sc-utils", "sp-core", @@ -9884,7 +9945,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9903,7 +9964,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "futures", "libc", @@ -9922,7 +9983,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "chrono", "futures", @@ -9941,7 +10002,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "ansi_term", "atty", @@ -9972,7 +10033,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9983,7 +10044,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "futures", @@ -10010,7 +10071,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "futures", @@ -10024,7 +10085,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "backtrace", "futures", @@ -10532,7 +10593,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "hash-db", "log", @@ -10550,7 +10611,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "blake2", "proc-macro-crate", @@ -10562,7 +10623,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -10575,7 +10636,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "integer-sqrt", "num-traits", @@ -10589,7 +10650,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -10602,7 +10663,7 @@ dependencies = [ [[package]] name = "sp-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "lazy_static", "parity-scale-codec", @@ -10621,7 +10682,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", "sp-api", @@ -10633,7 +10694,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "futures", "log", @@ -10651,7 +10712,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "futures", @@ -10669,7 +10730,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "parity-scale-codec", @@ -10687,7 +10748,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "merlin", @@ -10710,7 +10771,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "finality-grandpa", "log", @@ -10728,7 +10789,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -10740,7 +10801,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -10753,7 +10814,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "array-bytes", "base58", @@ -10796,7 +10857,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "blake2", "byteorder", @@ -10810,7 +10871,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "proc-macro2", "quote", @@ -10821,7 +10882,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10830,7 +10891,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "proc-macro2", "quote", @@ -10840,7 +10901,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "environmental", "parity-scale-codec", @@ -10851,7 +10912,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10866,7 +10927,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "bytes", "ed25519", @@ -10891,7 +10952,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "lazy_static", "sp-core", @@ -10902,7 +10963,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "futures", @@ -10919,7 +10980,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "thiserror", "zstd", @@ -10928,7 +10989,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -10946,7 +11007,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -10960,7 +11021,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "sp-api", "sp-core", @@ -10970,7 +11031,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "backtrace", "lazy_static", @@ -10980,7 +11041,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "rustc-hash", "serde", @@ -10990,7 +11051,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "either", "hash256-std-hasher", @@ -11012,7 +11073,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11030,7 +11091,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "Inflector", "proc-macro-crate", @@ -11042,7 +11103,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -11056,7 +11117,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -11068,7 +11129,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "hash-db", "log", @@ -11088,12 +11149,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11106,7 +11167,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "futures-timer", @@ -11121,7 +11182,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", "sp-std", @@ -11133,7 +11194,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "sp-api", "sp-runtime", @@ -11142,7 +11203,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "log", @@ -11158,7 +11219,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "ahash 0.8.2", "hash-db", @@ -11181,7 +11242,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11198,7 +11259,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11209,7 +11270,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11223,7 +11284,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "parity-scale-codec", "scale-info", @@ -11443,7 +11504,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "platforms", ] @@ -11451,7 +11512,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11470,7 +11531,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "hyper", "log", @@ -11482,7 +11543,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "jsonrpsee", @@ -11495,7 +11556,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "jsonrpsee", "log", @@ -11514,7 +11575,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "array-bytes", "async-trait", @@ -11540,7 +11601,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11550,7 +11611,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11561,7 +11622,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "ansi_term", "build-helper", @@ -12362,7 +12423,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7c8b89b3a6b603902709fc33fdb10a864b8b4204" +source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" dependencies = [ "async-trait", "clap 4.0.15", @@ -12912,7 +12973,7 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix", + "rustix 0.36.7", "serde", "sha2 0.10.2", "toml", @@ -12992,7 +13053,7 @@ checksum = "f76ef2e410329aaf8555ac6571d6fe07711be0646dcdf7ff3ab750a42ed2e583" dependencies = [ "object 0.29.0", "once_cell", - "rustix", + "rustix 0.36.7", ] [[package]] @@ -13023,7 +13084,7 @@ dependencies = [ "memoffset 0.6.4", "paste", "rand 0.8.5", - "rustix", + "rustix 0.36.7", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -13334,6 +13395,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -13773,12 +13835,14 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain", "polkadot-runtime-parachains", + "polkadot-test-runtime", "primitive-types", "scale-info", "sp-arithmetic", "sp-io", "sp-runtime", "sp-std", + "sp-weights", "xcm", "xcm-executor", ] @@ -13845,6 +13909,7 @@ dependencies = [ "sp-io", "sp-std", "xcm", + "xcm-builder", "xcm-executor", ] From 3ba93808aa35c401bf0d1df74fef5b3a6b0b0543 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 15:07:30 +0100 Subject: [PATCH 084/182] Add UMP while Para offboarding tests Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/hrmp/tests.rs | 30 ++------ runtime/parachains/src/inclusion/tests.rs | 11 +++ runtime/parachains/src/mock.rs | 43 +++++++++-- runtime/parachains/src/paras/mod.rs | 7 ++ runtime/parachains/src/ump_tests.rs | 87 +++++++++++++++++++++-- 5 files changed, 143 insertions(+), 35 deletions(-) diff --git a/runtime/parachains/src/hrmp/tests.rs b/runtime/parachains/src/hrmp/tests.rs index 3c9fedaa9dcb..7feb449486ba 100644 --- a/runtime/parachains/src/hrmp/tests.rs +++ b/runtime/parachains/src/hrmp/tests.rs @@ -17,16 +17,16 @@ use super::*; use crate::{ mock::{ - new_test_ext, Configuration, Hrmp, MockGenesisConfig, Paras, ParasShared, - RuntimeEvent as MockEvent, RuntimeOrigin, System, Test, + deregister_parachain, new_test_ext, register_parachain, register_parachain_with_balance, + Configuration, Hrmp, MockGenesisConfig, Paras, ParasShared, RuntimeEvent as MockEvent, + RuntimeOrigin, System, Test, }, - paras::ParaKind, }; -use frame_support::{assert_noop, assert_ok, traits::Currency as _}; +use frame_support::{assert_noop}; use primitives::BlockNumber; use std::collections::BTreeMap; -fn run_to_block(to: BlockNumber, new_session: Option>) { +pub(crate) fn run_to_block(to: BlockNumber, new_session: Option>) { let config = Configuration::config(); while System::block_number() < to { let b = System::block_number(); @@ -129,26 +129,6 @@ fn default_genesis_config() -> MockGenesisConfig { } } -fn register_parachain_with_balance(id: ParaId, balance: Balance) { - assert_ok!(Paras::schedule_para_initialize( - id, - crate::paras::ParaGenesisArgs { - para_kind: ParaKind::Parachain, - genesis_head: vec![1].into(), - validation_code: vec![1].into(), - }, - )); - ::Currency::make_free_balance_be(&id.into_account_truncating(), balance); -} - -fn register_parachain(id: ParaId) { - register_parachain_with_balance(id, 1000); -} - -fn deregister_parachain(id: ParaId) { - assert_ok!(Paras::schedule_para_cleanup(id)); -} - fn channel_exists(sender: ParaId, recipient: ParaId) -> bool { ::HrmpChannels::get(&HrmpChannelId { sender, recipient }).is_some() } diff --git a/runtime/parachains/src/inclusion/tests.rs b/runtime/parachains/src/inclusion/tests.rs index 4f90e61297ec..50e09d55ec3a 100644 --- a/runtime/parachains/src/inclusion/tests.rs +++ b/runtime/parachains/src/inclusion/tests.rs @@ -163,6 +163,17 @@ pub(crate) async fn back_candidate( backed } +pub(crate) fn run_to_block_default_notifications(to: BlockNumber, new_session: Vec) { + run_to_block(to, |b| { + new_session.contains(&b).then_some(SessionChangeNotification { + prev_config: Configuration::config(), + new_config: Configuration::config(), + session_index: ParasShared::session_index() + 1, + ..Default::default() + }) + }); +} + pub(crate) fn run_to_block( to: BlockNumber, new_session: impl Fn(BlockNumber) -> Option>, diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 5f4c293eeb6d..16834854aac1 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -19,11 +19,13 @@ use crate::{ configuration, disputes, dmp, hrmp, inclusion::{self, AggregateMessageOrigin}, - initializer, origin, paras, paras_inherent, scheduler, session_info, shared, ParaId, + initializer, origin, paras, + paras::ParaKind, + paras_inherent, scheduler, session_info, shared, ParaId, }; use frame_support::{ - parameter_types, + assert_ok, parameter_types, traits::{ GenesisBuild, KeyOwnerProofSystem, ProcessMessage, ProcessMessageError, ValidatorSet, ValidatorSetWithIdentification, @@ -319,7 +321,9 @@ impl pallet_message_queue::WeightInfo for TestMessageQueueWeight { Weight::zero() } } - +parameter_types! { + pub const MessageQueueServiceWeight: Weight = Weight::from_all(500); +} pub type MessageQueueSize = u32; impl pallet_message_queue::Config for Test { @@ -330,7 +334,7 @@ impl pallet_message_queue::Config for Test { type QueueChangeHandler = ParaInclusion; type HeapSize = ConstU32<65536>; type MaxStale = ConstU32<8>; - type ServiceWeight = (); + type ServiceWeight = MessageQueueServiceWeight; } impl crate::inclusion::Config for Test { @@ -522,3 +526,34 @@ where assert_eq!((i, got), (i, want)); } } + +use frame_support::traits::Currency; +use sp_runtime::traits::AccountIdConversion; + +pub(crate) fn register_parachain_with_balance(id: ParaId, balance: Balance) { + assert_ok!(Paras::schedule_para_initialize( + id, + crate::paras::ParaGenesisArgs { + para_kind: ParaKind::Parachain, + genesis_head: vec![1].into(), + validation_code: vec![1].into(), + }, + )); + ::Currency::make_free_balance_be( + &id.into_account_truncating(), + balance, + ); +} + +pub(crate) fn register_parachain(id: ParaId) { + register_parachain_with_balance(id, 1000); +} + +pub(crate) fn deregister_parachain(id: ParaId) { + assert_ok!(Paras::schedule_para_cleanup(id)); +} + +/// Calls `schedule_para_cleanup` in a new storage transactions, since it assumes rollback on error. +pub(crate) fn try_deregister_parachain(id: ParaId) -> crate::DispatchResult { + frame_support::storage::transactional::with_storage_layer(|| Paras::schedule_para_cleanup(id)) +} diff --git a/runtime/parachains/src/paras/mod.rs b/runtime/parachains/src/paras/mod.rs index 69d191f14cdd..7208e5c8b2ea 100644 --- a/runtime/parachains/src/paras/mod.rs +++ b/runtime/parachains/src/paras/mod.rs @@ -2022,6 +2022,13 @@ impl Pallet { } } + /// Returns whether the given ID refers to a para that is onboarding. + /// + /// An invalid or non-offboarding para ID will return `false`. + pub fn is_offboarding(id: ParaId) -> bool { + ParaLifecycles::::get(&id).map_or(false, |state| state.is_offboarding()) + } + /// Whether a para ID corresponds to any live parachain. /// /// Includes parachains which will downgrade to a parathread in the future. diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index c2ecc3d7ad48..564440a3b228 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -15,10 +15,13 @@ // along with Polkadot. If not, see . use crate::{ - inclusion::{AggregateMessageOrigin::UMP, UmpAcceptanceCheckErr}, + inclusion::{ + tests::run_to_block_default_notifications as run_to_block, AggregateMessageOrigin::UMP, + UmpAcceptanceCheckErr, + }, mock::{ assert_last_event, assert_last_events, new_test_ext, Configuration, MessageQueue, - MessageQueueSize, MockGenesisConfig, ParaInclusion, Processed, System, Test, + MessageQueueSize, MockGenesisConfig, ParaInclusion, Processed, System, Test, *, }, }; use frame_support::{ @@ -27,7 +30,9 @@ use frame_support::{ traits::{ExecuteOverweightError, ServiceQueues}, weights::Weight, }; -use primitives::v2::{well_known_keys, Id as ParaId, UpwardMessage}; +use primitives::{ + v2::{well_known_keys, Id as ParaId, UpwardMessage}, +}; use sp_runtime::traits::{Bounded, Hash}; use sp_std::prelude::*; @@ -78,11 +83,15 @@ fn default_genesis_config() -> MockGenesisConfig { } } -// FAIL-CI: TODO add tests fn queue_upward_msg(para: ParaId, msg: UpwardMessage) { + try_queue_upward_msg(para, msg).unwrap(); +} + +fn try_queue_upward_msg(para: ParaId, msg: UpwardMessage) -> Result<(), UmpAcceptanceCheckErr> { let msgs = vec![msg]; - assert!(ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs).is_ok()); - let _ = ParaInclusion::receive_upward_messages(para, msgs.as_slice()); + ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs)?; + ParaInclusion::receive_upward_messages(para, msgs.as_slice()); + Ok(()) } mod check_upward_messages { @@ -466,3 +475,69 @@ fn overweight_queue_works() { ); }); } + +/// Tests that UMP messages in the dispatch queue of the relay prevents the parachain from being scheduled for offboarding. +#[test] +fn cannot_offboard_while_ump_dispatch_queued() { + let para = 32.into(); + let msg = (300u32, "something").encode(); + + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + register_parachain(para); + run_to_block(5, vec![4, 5]); + + queue_upward_msg(para, msg.clone()); + queue_upward_msg(para, msg.clone()); + // Cannot offboard since there are two UMP messages in the queue. + for i in 6..10 { + assert!(try_deregister_parachain(para).is_err()); + run_to_block(i, vec![i]); + assert!(Paras::is_valid_para(para)); + } + + // Now let's process the first message. + MessageQueue::on_initialize(System::block_number()); + assert_eq!(Processed::take().len(), 1); + // Cannot offboard since there is another one in the queue. + assert!(try_deregister_parachain(para).is_err()); + // Now also process the second message ... + MessageQueue::on_initialize(System::block_number()); + assert_eq!(Processed::take().len(), 1); + + // ... and offboard. + run_to_block(10, vec![10]); + assert!(Paras::is_valid_para(para)); + assert_ok!(try_deregister_parachain(para)); + assert!(Paras::is_offboarding(para)); + + // Offboarding completed. + run_to_block(11, vec![11]); + assert!(!Paras::is_valid_para(para)); + }); +} + +/// A para-chain cannot send an UMP to the relay chain while it is offboarding. +#[test] +fn cannot_enqueue_ump_while_offboarding() { + let para = 32.into(); + let msg = (300u32, "something").encode(); + + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + register_parachain(para); + run_to_block(5, vec![4, 5]); + + // Start with an offboarding para. + assert_ok!(try_deregister_parachain(para)); + assert!(Paras::is_offboarding(para)); + + // Cannot enqueue a message. + assert!(try_queue_upward_msg(para, msg.clone()).is_err()); + run_to_block(6, vec![6]); + // Para is still there and still cannot enqueue a message. + assert!(Paras::is_offboarding(para)); + assert!(try_queue_upward_msg(para, msg.clone()).is_err()); + // Now offboarding is completed. + run_to_block(7, vec![7]); + assert!(!Paras::is_valid_para(para)); + }); +} From f85531e369262789166adbcaf26c447b658c9008 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 15:10:22 +0100 Subject: [PATCH 085/182] fmt Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/hrmp/tests.rs | 12 +++++------- runtime/parachains/src/ump_tests.rs | 4 +--- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/runtime/parachains/src/hrmp/tests.rs b/runtime/parachains/src/hrmp/tests.rs index 7feb449486ba..857b5a8979b6 100644 --- a/runtime/parachains/src/hrmp/tests.rs +++ b/runtime/parachains/src/hrmp/tests.rs @@ -15,14 +15,12 @@ // along with Polkadot. If not, see . use super::*; -use crate::{ - mock::{ - deregister_parachain, new_test_ext, register_parachain, register_parachain_with_balance, - Configuration, Hrmp, MockGenesisConfig, Paras, ParasShared, RuntimeEvent as MockEvent, - RuntimeOrigin, System, Test, - }, +use crate::mock::{ + deregister_parachain, new_test_ext, register_parachain, register_parachain_with_balance, + Configuration, Hrmp, MockGenesisConfig, Paras, ParasShared, RuntimeEvent as MockEvent, + RuntimeOrigin, System, Test, }; -use frame_support::{assert_noop}; +use frame_support::assert_noop; use primitives::BlockNumber; use std::collections::BTreeMap; diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 564440a3b228..a6c199472f98 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -30,9 +30,7 @@ use frame_support::{ traits::{ExecuteOverweightError, ServiceQueues}, weights::Weight, }; -use primitives::{ - v2::{well_known_keys, Id as ParaId, UpwardMessage}, -}; +use primitives::v2::{well_known_keys, Id as ParaId, UpwardMessage}; use sp_runtime::traits::{Bounded, Hash}; use sp_std::prelude::*; From b152901fb03ef91ac9de56e6dbc3ab0258e1ee7c Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 16:06:48 +0100 Subject: [PATCH 086/182] Use Mocked message processor for benchmarking Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 4 ++++ runtime/polkadot/src/lib.rs | 5 +++++ runtime/rococo/src/lib.rs | 4 ++-- runtime/westend/src/lib.rs | 4 ++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index e7bb7f0174ac..6c8f7b47dc64 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1175,7 +1175,11 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = ConstU32<65_536>; type MaxStale = ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; + #[cfg(not(feature = "runtime-benchmarks"))] type MessageProcessor = MessageProcessor; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; type QueueChangeHandler = (); // FAIL-CI type WeightInfo = (); diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 29616fd2b4c4..ae069abfed15 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1336,7 +1336,12 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = ConstU32<65_536>; type MaxStale = ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; + #[cfg(not(feature = "runtime-benchmarks"))] type MessageProcessor = MessageProcessor; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; + // FAIL-CI add test for this type QueueChangeHandler = (); // FAIL-CI type WeightInfo = (); diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index b1c23e670ca5..2242bfe4cc1b 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1099,11 +1099,11 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = ConstU32<65_536>; type MaxStale = ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = MessageProcessor; #[cfg(feature = "runtime-benchmarks")] type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; - #[cfg(not(feature = "runtime-benchmarks"))] - type MessageProcessor = MessageProcessor; type QueueChangeHandler = (); // FAIL-CI type WeightInfo = (); diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 0a5483b7d284..5e82ec78156d 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -961,7 +961,11 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = ConstU32<65_536>; type MaxStale = ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; + #[cfg(not(feature = "runtime-benchmarks"))] type MessageProcessor = MessageProcessor; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; type QueueChangeHandler = (); // FAIL-CI type WeightInfo = (); From f92f041d4a6bd4b4fabf5b0357d636b93b33a9a7 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 16:07:20 +0100 Subject: [PATCH 087/182] Use variables for constants Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 6 ++++-- runtime/parachains/src/mock.rs | 4 +--- runtime/polkadot/src/lib.rs | 6 ++++-- runtime/rococo/src/lib.rs | 6 ++++-- runtime/westend/src/lib.rs | 6 ++++-- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 6c8f7b47dc64..f7857c0410e5 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1147,6 +1147,8 @@ parameter_types! { /// Amount of weight that can be spent per block to service messages. /// FAIL-CI: Pretty random value. pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); + pub const MessageQueueHeapSize: u32 = 65_536; + pub const MessageQueueMaxStale: u32 = 8; } pub struct MessageProcessor; @@ -1172,8 +1174,8 @@ impl ProcessMessage for MessageProcessor { impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Size = u32; - type HeapSize = ConstU32<65_536>; - type MaxStale = ConstU32<8>; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; type ServiceWeight = MessageQueueServiceWeight; #[cfg(not(feature = "runtime-benchmarks"))] type MessageProcessor = MessageProcessor; diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 16834854aac1..4ce58af297ad 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -324,13 +324,11 @@ impl pallet_message_queue::WeightInfo for TestMessageQueueWeight { parameter_types! { pub const MessageQueueServiceWeight: Weight = Weight::from_all(500); } -pub type MessageQueueSize = u32; - impl pallet_message_queue::Config for Test { + type Size = u32; type RuntimeEvent = RuntimeEvent; type WeightInfo = TestMessageQueueWeight; type MessageProcessor = TestProcessMessage; - type Size = MessageQueueSize; type QueueChangeHandler = ParaInclusion; type HeapSize = ConstU32<65536>; type MaxStale = ConstU32<8>; diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index ae069abfed15..486d3c8512a5 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1308,6 +1308,8 @@ parameter_types! { /// Amount of weight that can be spent per block to service messages. /// FAIL-CI: Pretty random value. pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); + pub const MessageQueueHeapSize: u32 = 65_536; + pub const MessageQueueMaxStale: u32 = 8; } pub struct MessageProcessor; @@ -1333,8 +1335,8 @@ impl ProcessMessage for MessageProcessor { impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Size = u32; - type HeapSize = ConstU32<65_536>; - type MaxStale = ConstU32<8>; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; type ServiceWeight = MessageQueueServiceWeight; #[cfg(not(feature = "runtime-benchmarks"))] type MessageProcessor = MessageProcessor; diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 2242bfe4cc1b..371212440dd5 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1071,6 +1071,8 @@ parameter_types! { /// Amount of weight that can be spent per block to service messages. /// FAIL-CI: Pretty random value. pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); + pub const MessageQueueHeapSize: u32 = 65_536; + pub const MessageQueueMaxStale: u32 = 8; } pub struct MessageProcessor; @@ -1096,8 +1098,8 @@ impl ProcessMessage for MessageProcessor { impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Size = u32; - type HeapSize = ConstU32<65_536>; - type MaxStale = ConstU32<8>; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; type ServiceWeight = MessageQueueServiceWeight; #[cfg(not(feature = "runtime-benchmarks"))] type MessageProcessor = MessageProcessor; diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 5e82ec78156d..89c71166ce30 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -933,6 +933,8 @@ parameter_types! { /// Amount of weight that can be spent per block to service messages. /// FAIL-CI: Pretty random value. pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); + pub const MessageQueueHeapSize: u32 = 65_536; + pub const MessageQueueMaxStale: u32 = 8; } pub struct MessageProcessor; @@ -958,8 +960,8 @@ impl ProcessMessage for MessageProcessor { impl pallet_message_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Size = u32; - type HeapSize = ConstU32<65_536>; - type MaxStale = ConstU32<8>; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; type ServiceWeight = MessageQueueServiceWeight; #[cfg(not(feature = "runtime-benchmarks"))] type MessageProcessor = MessageProcessor; From e4105db42c3bf1b04ef814653e4b179cbae4c669 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 16:07:32 +0100 Subject: [PATCH 088/182] Add MQ pallet weights Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/weights/mod.rs | 1 + .../src/weights/pallet_message_queue.rs | 176 +++++++++++ .../src/weights/pallet_message_queue.rs | 276 ++++++++---------- runtime/rococo/src/weights/mod.rs | 1 + .../src/weights/pallet_message_queue.rs | 176 +++++++++++ runtime/westend/src/weights/mod.rs | 1 + .../src/weights/pallet_message_queue.rs | 176 +++++++++++ 7 files changed, 649 insertions(+), 158 deletions(-) create mode 100644 runtime/kusama/src/weights/pallet_message_queue.rs create mode 100644 runtime/rococo/src/weights/pallet_message_queue.rs create mode 100644 runtime/westend/src/weights/pallet_message_queue.rs diff --git a/runtime/kusama/src/weights/mod.rs b/runtime/kusama/src/weights/mod.rs index 9768180c1a30..40457414e8f4 100644 --- a/runtime/kusama/src/weights/mod.rs +++ b/runtime/kusama/src/weights/mod.rs @@ -33,6 +33,7 @@ pub mod pallet_identity; pub mod pallet_im_online; pub mod pallet_indices; pub mod pallet_membership; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_nis; pub mod pallet_nomination_pools; diff --git a/runtime/kusama/src/weights/pallet_message_queue.rs b/runtime/kusama/src/weights/pallet_message_queue.rs new file mode 100644 index 000000000000..30c0e58e310b --- /dev/null +++ b/runtime/kusama/src/weights/pallet_message_queue.rs @@ -0,0 +1,176 @@ +// 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_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-02-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot +// benchmark +// pallet +// --chain=kusama-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet-message-queue +// --extrinsic=* +// --heap-pages=4096 +// --header=file_header.txt +// --output +// runtime/kusama/src/weights/pallet_message_queue.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_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `837` + // Estimated: `5554` + // Minimum execution time: 5_669 nanoseconds. + Weight::from_ref_time(5_925_000) + .saturating_add(Weight::from_proof_size(5554)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `837` + // Estimated: `5554` + // Minimum execution time: 5_604 nanoseconds. + Weight::from_ref_time(5_993_000) + .saturating_add(Weight::from_proof_size(5554)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `576` + // Estimated: `2527` + // Minimum execution time: 2_104 nanoseconds. + Weight::from_ref_time(2_241_000) + .saturating_add(Weight::from_proof_size(2527)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `648` + // Estimated: `68060` + // Minimum execution time: 3_175 nanoseconds. + Weight::from_ref_time(3_289_000) + .saturating_add(Weight::from_proof_size(68060)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `648` + // Estimated: `68060` + // Minimum execution time: 3_198 nanoseconds. + Weight::from_ref_time(3_308_000) + .saturating_add(Weight::from_proof_size(68060)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `969` + // Estimated: `0` + // Minimum execution time: 46_864 nanoseconds. + Weight::from_ref_time(47_073_000) + .saturating_add(Weight::from_proof_size(0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `712` + // Estimated: `3027` + // Minimum execution time: 3_552 nanoseconds. + Weight::from_ref_time(3_710_000) + .saturating_add(Weight::from_proof_size(3027)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `66857` + // Estimated: `70587` + // Minimum execution time: 38_491 nanoseconds. + Weight::from_ref_time(46_983_000) + .saturating_add(Weight::from_proof_size(70587)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `66857` + // Estimated: `70587` + // Minimum execution time: 88_529 nanoseconds. + Weight::from_ref_time(144_649_000) + .saturating_add(Weight::from_proof_size(70587)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `66857` + // Estimated: `70587` + // Minimum execution time: 79_494 nanoseconds. + Weight::from_ref_time(84_895_000) + .saturating_add(Weight::from_proof_size(70587)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/runtime/polkadot/src/weights/pallet_message_queue.rs b/runtime/polkadot/src/weights/pallet_message_queue.rs index cd9268ffde22..bd6efa3355eb 100644 --- a/runtime/polkadot/src/weights/pallet_message_queue.rs +++ b/runtime/polkadot/src/weights/pallet_message_queue.rs @@ -1,216 +1,176 @@ -// 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. -//! Autogenerated weights for pallet_message_queue +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . +//! Autogenerated weights for `pallet_message_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-08, 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("dev"), DB CACHE: 1024 +//! DATE: 2023-02-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// /home/benchbot/cargo_target_dir/production/substrate +// ./target/release/polkadot // benchmark // pallet +// --chain=dev // --steps=50 // --repeat=20 +// --pallet=pallet-message-queue // --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled // --heap-pages=4096 -// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/substrate/.git/.artifacts/bench.json -// --pallet=pallet_message_queue -// --chain=dev -// --header=./HEADER-APACHE2 -// --output=./frame/message-queue/src/weights.rs -// --template=./.maintain/frame-weight-template.hbs +// --header=file_header.txt +// --output +// runtime/polkadot/src/weights/pallet_message_queue.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; -/// Weight functions needed for pallet_message_queue. -pub trait WeightInfo { - fn ready_ring_knit() -> Weight; - fn ready_ring_unknit() -> Weight; - fn service_queue_base() -> Weight; - fn service_page_base_completion() -> Weight; - fn service_page_base_no_completion() -> Weight; - fn service_page_item() -> Weight; - fn bump_service_head() -> Weight; - fn reap_page() -> Weight; - fn execute_overweight_page_removed() -> Weight; - fn execute_overweight_page_updated() -> Weight; -} - -/// Weights for pallet_message_queue using the Substrate node and recommended hardware. -pub struct SubstrateWeight(PhantomData); -impl WeightInfo for SubstrateWeight { - // Storage: MessageQueue ServiceHead (r:1 w:0) - // Storage: MessageQueue BookStateFor (r:2 w:2) +/// Weight functions for `pallet_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) fn ready_ring_knit() -> Weight { - // Minimum execution time: 12_330 nanoseconds. - Weight::from_ref_time(12_711_000) + // Proof Size summary in bytes: + // Measured: `837` + // Estimated: `5554` + // Minimum execution time: 5_631 nanoseconds. + Weight::from_ref_time(6_182_000) + .saturating_add(Weight::from_proof_size(5554)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: MessageQueue BookStateFor (r:2 w:2) - // Storage: MessageQueue ServiceHead (r:1 w:1) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) fn ready_ring_unknit() -> Weight { - // Minimum execution time: 12_322 nanoseconds. - Weight::from_ref_time(12_560_000) + // Proof Size summary in bytes: + // Measured: `837` + // Estimated: `5554` + // Minimum execution time: 5_515 nanoseconds. + Weight::from_ref_time(5_775_000) + .saturating_add(Weight::from_proof_size(5554)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } - // Storage: MessageQueue BookStateFor (r:1 w:1) + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) fn service_queue_base() -> Weight { - // Minimum execution time: 4_652 nanoseconds. - Weight::from_ref_time(4_848_000) + // Proof Size summary in bytes: + // Measured: `576` + // Estimated: `2527` + // Minimum execution time: 2_098 nanoseconds. + Weight::from_ref_time(2_265_000) + .saturating_add(Weight::from_proof_size(2527)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: MessageQueue Pages (r:1 w:1) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) fn service_page_base_completion() -> Weight { - // Minimum execution time: 7_115 nanoseconds. - Weight::from_ref_time(7_407_000) + // Proof Size summary in bytes: + // Measured: `648` + // Estimated: `68060` + // Minimum execution time: 3_194 nanoseconds. + Weight::from_ref_time(3_436_000) + .saturating_add(Weight::from_proof_size(68060)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: MessageQueue Pages (r:1 w:1) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) fn service_page_base_no_completion() -> Weight { - // Minimum execution time: 6_974 nanoseconds. - Weight::from_ref_time(7_200_000) + // Proof Size summary in bytes: + // Measured: `648` + // Estimated: `68060` + // Minimum execution time: 3_409 nanoseconds. + Weight::from_ref_time(3_673_000) + .saturating_add(Weight::from_proof_size(68060)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } fn service_page_item() -> Weight { - // Minimum execution time: 79_657 nanoseconds. - Weight::from_ref_time(80_050_000) - } - // Storage: MessageQueue ServiceHead (r:1 w:1) - // Storage: MessageQueue BookStateFor (r:1 w:0) + // Proof Size summary in bytes: + // Measured: `971` + // Estimated: `0` + // Minimum execution time: 49_243 nanoseconds. + Weight::from_ref_time(50_380_000) + .saturating_add(Weight::from_proof_size(0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) fn bump_service_head() -> Weight { - // Minimum execution time: 7_598 nanoseconds. - Weight::from_ref_time(8_118_000) + // Proof Size summary in bytes: + // Measured: `712` + // Estimated: `3027` + // Minimum execution time: 3_744 nanoseconds. + Weight::from_ref_time(3_922_000) + .saturating_add(Weight::from_proof_size(3027)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: MessageQueue BookStateFor (r:1 w:1) - // Storage: MessageQueue Pages (r:1 w:1) + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) fn reap_page() -> Weight { - // Minimum execution time: 60_562 nanoseconds. - Weight::from_ref_time(61_430_000) + // Proof Size summary in bytes: + // Measured: `66859` + // Estimated: `70587` + // Minimum execution time: 28_995 nanoseconds. + Weight::from_ref_time(30_370_000) + .saturating_add(Weight::from_proof_size(70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: MessageQueue BookStateFor (r:1 w:1) - // Storage: MessageQueue Pages (r:1 w:1) + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) fn execute_overweight_page_removed() -> Weight { - // Minimum execution time: 74_582 nanoseconds. - Weight::from_ref_time(75_445_000) + // Proof Size summary in bytes: + // Measured: `66859` + // Estimated: `70587` + // Minimum execution time: 76_268 nanoseconds. + Weight::from_ref_time(77_933_000) + .saturating_add(Weight::from_proof_size(70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - // Storage: MessageQueue BookStateFor (r:1 w:1) - // Storage: MessageQueue Pages (r:1 w:1) + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) fn execute_overweight_page_updated() -> Weight { - // Minimum execution time: 87_526 nanoseconds. - Weight::from_ref_time(88_055_000) + // Proof Size summary in bytes: + // Measured: `66859` + // Estimated: `70587` + // Minimum execution time: 78_029 nanoseconds. + Weight::from_ref_time(80_632_000) + .saturating_add(Weight::from_proof_size(70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } } - -// For backwards compatibility and tests -impl WeightInfo for () { - // Storage: MessageQueue ServiceHead (r:1 w:0) - // Storage: MessageQueue BookStateFor (r:2 w:2) - fn ready_ring_knit() -> Weight { - // Minimum execution time: 12_330 nanoseconds. - Weight::from_ref_time(12_711_000) - .saturating_add(RocksDbWeight::get().reads(3)) - .saturating_add(RocksDbWeight::get().writes(2)) - } - // Storage: MessageQueue BookStateFor (r:2 w:2) - // Storage: MessageQueue ServiceHead (r:1 w:1) - fn ready_ring_unknit() -> Weight { - // Minimum execution time: 12_322 nanoseconds. - Weight::from_ref_time(12_560_000) - .saturating_add(RocksDbWeight::get().reads(3)) - .saturating_add(RocksDbWeight::get().writes(3)) - } - // Storage: MessageQueue BookStateFor (r:1 w:1) - fn service_queue_base() -> Weight { - // Minimum execution time: 4_652 nanoseconds. - Weight::from_ref_time(4_848_000) - .saturating_add(RocksDbWeight::get().reads(1)) - .saturating_add(RocksDbWeight::get().writes(1)) - } - // Storage: MessageQueue Pages (r:1 w:1) - fn service_page_base_completion() -> Weight { - // Minimum execution time: 7_115 nanoseconds. - Weight::from_ref_time(7_407_000) - .saturating_add(RocksDbWeight::get().reads(1)) - .saturating_add(RocksDbWeight::get().writes(1)) - } - // Storage: MessageQueue Pages (r:1 w:1) - fn service_page_base_no_completion() -> Weight { - // Minimum execution time: 6_974 nanoseconds. - Weight::from_ref_time(7_200_000) - .saturating_add(RocksDbWeight::get().reads(1)) - .saturating_add(RocksDbWeight::get().writes(1)) - } - fn service_page_item() -> Weight { - // Minimum execution time: 79_657 nanoseconds. - Weight::from_ref_time(80_050_000) - } - // Storage: MessageQueue ServiceHead (r:1 w:1) - // Storage: MessageQueue BookStateFor (r:1 w:0) - fn bump_service_head() -> Weight { - // Minimum execution time: 7_598 nanoseconds. - Weight::from_ref_time(8_118_000) - .saturating_add(RocksDbWeight::get().reads(2)) - .saturating_add(RocksDbWeight::get().writes(1)) - } - // Storage: MessageQueue BookStateFor (r:1 w:1) - // Storage: MessageQueue Pages (r:1 w:1) - fn reap_page() -> Weight { - // Minimum execution time: 60_562 nanoseconds. - Weight::from_ref_time(61_430_000) - .saturating_add(RocksDbWeight::get().reads(2)) - .saturating_add(RocksDbWeight::get().writes(2)) - } - // Storage: MessageQueue BookStateFor (r:1 w:1) - // Storage: MessageQueue Pages (r:1 w:1) - fn execute_overweight_page_removed() -> Weight { - // Minimum execution time: 74_582 nanoseconds. - Weight::from_ref_time(75_445_000) - .saturating_add(RocksDbWeight::get().reads(2)) - .saturating_add(RocksDbWeight::get().writes(2)) - } - // Storage: MessageQueue BookStateFor (r:1 w:1) - // Storage: MessageQueue Pages (r:1 w:1) - fn execute_overweight_page_updated() -> Weight { - // Minimum execution time: 87_526 nanoseconds. - Weight::from_ref_time(88_055_000) - .saturating_add(RocksDbWeight::get().reads(2)) - .saturating_add(RocksDbWeight::get().writes(2)) - } -} diff --git a/runtime/rococo/src/weights/mod.rs b/runtime/rococo/src/weights/mod.rs index c9d1ccf920c8..7e40b3b1ab89 100644 --- a/runtime/rococo/src/weights/mod.rs +++ b/runtime/rococo/src/weights/mod.rs @@ -28,6 +28,7 @@ pub mod pallet_identity; pub mod pallet_im_online; pub mod pallet_indices; pub mod pallet_membership; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_nis; pub mod pallet_preimage; diff --git a/runtime/rococo/src/weights/pallet_message_queue.rs b/runtime/rococo/src/weights/pallet_message_queue.rs new file mode 100644 index 000000000000..057813a2d313 --- /dev/null +++ b/runtime/rococo/src/weights/pallet_message_queue.rs @@ -0,0 +1,176 @@ +// 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_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-02-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot +// benchmark +// pallet +// --chain=rococo-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet-message-queue +// --extrinsic=* +// --heap-pages=4096 +// --header=file_header.txt +// --output +// runtime/rococo/src/weights/pallet_message_queue.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_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `837` + // Estimated: `5554` + // Minimum execution time: 9_427 nanoseconds. + Weight::from_ref_time(9_806_000) + .saturating_add(Weight::from_proof_size(5554)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `837` + // Estimated: `5554` + // Minimum execution time: 20_178 nanoseconds. + Weight::from_ref_time(20_550_000) + .saturating_add(Weight::from_proof_size(5554)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `576` + // Estimated: `2527` + // Minimum execution time: 3_746 nanoseconds. + Weight::from_ref_time(3_885_000) + .saturating_add(Weight::from_proof_size(2527)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `648` + // Estimated: `68060` + // Minimum execution time: 4_906 nanoseconds. + Weight::from_ref_time(5_060_000) + .saturating_add(Weight::from_proof_size(68060)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `648` + // Estimated: `68060` + // Minimum execution time: 5_194 nanoseconds. + Weight::from_ref_time(5_361_000) + .saturating_add(Weight::from_proof_size(68060)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `936` + // Estimated: `0` + // Minimum execution time: 62_021 nanoseconds. + Weight::from_ref_time(62_487_000) + .saturating_add(Weight::from_proof_size(0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `712` + // Estimated: `3027` + // Minimum execution time: 6_989 nanoseconds. + Weight::from_ref_time(8_098_000) + .saturating_add(Weight::from_proof_size(3027)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `66846` + // Estimated: `70587` + // Minimum execution time: 38_177 nanoseconds. + Weight::from_ref_time(44_704_000) + .saturating_add(Weight::from_proof_size(70587)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `66846` + // Estimated: `70587` + // Minimum execution time: 48_404 nanoseconds. + Weight::from_ref_time(55_066_000) + .saturating_add(Weight::from_proof_size(70587)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `66846` + // Estimated: `70587` + // Minimum execution time: 66_523 nanoseconds. + Weight::from_ref_time(73_063_000) + .saturating_add(Weight::from_proof_size(70587)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/runtime/westend/src/weights/mod.rs b/runtime/westend/src/weights/mod.rs index e28152d9db49..20f112867813 100644 --- a/runtime/westend/src/weights/mod.rs +++ b/runtime/westend/src/weights/mod.rs @@ -24,6 +24,7 @@ pub mod pallet_fast_unstake; pub mod pallet_identity; pub mod pallet_im_online; pub mod pallet_indices; +pub mod pallet_message_queue; pub mod pallet_multisig; pub mod pallet_nomination_pools; pub mod pallet_preimage; diff --git a/runtime/westend/src/weights/pallet_message_queue.rs b/runtime/westend/src/weights/pallet_message_queue.rs new file mode 100644 index 000000000000..57737ade6c28 --- /dev/null +++ b/runtime/westend/src/weights/pallet_message_queue.rs @@ -0,0 +1,176 @@ +// 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_message_queue` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-02-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` +//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/polkadot +// benchmark +// pallet +// --chain=westend-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet-message-queue +// --extrinsic=* +// --heap-pages=4096 +// --header=file_header.txt +// --output +// runtime/westend/src/weights/pallet_message_queue.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_message_queue`. +pub struct WeightInfo(PhantomData); +impl pallet_message_queue::WeightInfo for WeightInfo { + /// Storage: MessageQueue ServiceHead (r:1 w:0) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn ready_ring_knit() -> Weight { + // Proof Size summary in bytes: + // Measured: `804` + // Estimated: `5554` + // Minimum execution time: 5_813 nanoseconds. + Weight::from_ref_time(5_980_000) + .saturating_add(Weight::from_proof_size(5554)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:2 w:2) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + fn ready_ring_unknit() -> Weight { + // Proof Size summary in bytes: + // Measured: `804` + // Estimated: `5554` + // Minimum execution time: 5_742 nanoseconds. + Weight::from_ref_time(5_986_000) + .saturating_add(Weight::from_proof_size(5554)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn service_queue_base() -> Weight { + // Proof Size summary in bytes: + // Measured: `543` + // Estimated: `2527` + // Minimum execution time: 2_118 nanoseconds. + Weight::from_ref_time(2_206_000) + .saturating_add(Weight::from_proof_size(2527)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `615` + // Estimated: `68060` + // Minimum execution time: 3_153 nanoseconds. + Weight::from_ref_time(3_240_000) + .saturating_add(Weight::from_proof_size(68060)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn service_page_base_no_completion() -> Weight { + // Proof Size summary in bytes: + // Measured: `615` + // Estimated: `68060` + // Minimum execution time: 3_191 nanoseconds. + Weight::from_ref_time(3_289_000) + .saturating_add(Weight::from_proof_size(68060)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn service_page_item() -> Weight { + // Proof Size summary in bytes: + // Measured: `904` + // Estimated: `0` + // Minimum execution time: 47_975 nanoseconds. + Weight::from_ref_time(49_334_000) + .saturating_add(Weight::from_proof_size(0)) + } + /// Storage: MessageQueue ServiceHead (r:1 w:1) + /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + /// Storage: MessageQueue BookStateFor (r:1 w:0) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + fn bump_service_head() -> Weight { + // Proof Size summary in bytes: + // Measured: `679` + // Estimated: `3027` + // Minimum execution time: 3_725 nanoseconds. + Weight::from_ref_time(4_074_000) + .saturating_add(Weight::from_proof_size(3027)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn reap_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `66814` + // Estimated: `70587` + // Minimum execution time: 28_769 nanoseconds. + Weight::from_ref_time(29_450_000) + .saturating_add(Weight::from_proof_size(70587)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_removed() -> Weight { + // Proof Size summary in bytes: + // Measured: `66814` + // Estimated: `70587` + // Minimum execution time: 74_422 nanoseconds. + Weight::from_ref_time(78_637_000) + .saturating_add(Weight::from_proof_size(70587)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: MessageQueue BookStateFor (r:1 w:1) + /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + /// Storage: MessageQueue Pages (r:1 w:1) + /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + fn execute_overweight_page_updated() -> Weight { + // Proof Size summary in bytes: + // Measured: `66814` + // Estimated: `70587` + // Minimum execution time: 75_542 nanoseconds. + Weight::from_ref_time(80_545_000) + .saturating_add(Weight::from_proof_size(70587)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} From 861f8d30cb31fb07128239674f2e518736ee13ad Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 16:08:32 +0100 Subject: [PATCH 089/182] Use MQ pallet weights Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 3 +-- runtime/polkadot/src/lib.rs | 3 +-- runtime/rococo/src/lib.rs | 3 +-- runtime/westend/src/lib.rs | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index f7857c0410e5..eedc54bb0f35 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1183,8 +1183,7 @@ impl pallet_message_queue::Config for Runtime { type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; type QueueChangeHandler = (); - // FAIL-CI - type WeightInfo = (); + type WeightInfo = weights::pallet_message_queue::WeightInfo; } impl parachains_dmp::Config for Runtime {} diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 486d3c8512a5..375e64e51c06 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1345,8 +1345,7 @@ impl pallet_message_queue::Config for Runtime { pallet_message_queue::mock_helpers::NoopMessageProcessor; // FAIL-CI add test for this type QueueChangeHandler = (); - // FAIL-CI - type WeightInfo = (); + type WeightInfo = weights::pallet_message_queue::WeightInfo; } impl parachains_dmp::Config for Runtime {} diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 371212440dd5..994fd09fe6b2 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1107,8 +1107,7 @@ impl pallet_message_queue::Config for Runtime { type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; type QueueChangeHandler = (); - // FAIL-CI - type WeightInfo = (); + type WeightInfo = weights::pallet_message_queue::WeightInfo; } impl parachains_dmp::Config for Runtime {} diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 89c71166ce30..b76b42d82d62 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -969,8 +969,7 @@ impl pallet_message_queue::Config for Runtime { type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; type QueueChangeHandler = (); - // FAIL-CI - type WeightInfo = (); + type WeightInfo = weights::pallet_message_queue::WeightInfo; } impl parachains_dmp::Config for Runtime {} From cdb67e0f01148723ee8943b04c685eea56716160 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 16:12:06 +0100 Subject: [PATCH 090/182] Configure QueueChangeHandler Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 2 +- runtime/polkadot/src/lib.rs | 2 +- runtime/rococo/src/lib.rs | 2 +- runtime/westend/src/lib.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index eedc54bb0f35..1b0f8497ac86 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1182,7 +1182,7 @@ impl pallet_message_queue::Config for Runtime { #[cfg(feature = "runtime-benchmarks")] type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; - type QueueChangeHandler = (); + type QueueChangeHandler = ParaInclusion; type WeightInfo = weights::pallet_message_queue::WeightInfo; } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 375e64e51c06..60864c8bd403 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1344,7 +1344,7 @@ impl pallet_message_queue::Config for Runtime { type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; // FAIL-CI add test for this - type QueueChangeHandler = (); + type QueueChangeHandler = ParaInclusion; type WeightInfo = weights::pallet_message_queue::WeightInfo; } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 994fd09fe6b2..404c0765cf34 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1106,7 +1106,7 @@ impl pallet_message_queue::Config for Runtime { #[cfg(feature = "runtime-benchmarks")] type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; - type QueueChangeHandler = (); + type QueueChangeHandler = ParaInclusion; type WeightInfo = weights::pallet_message_queue::WeightInfo; } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index b76b42d82d62..b49d2f496591 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -968,7 +968,7 @@ impl pallet_message_queue::Config for Runtime { #[cfg(feature = "runtime-benchmarks")] type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; - type QueueChangeHandler = (); + type QueueChangeHandler = ParaInclusion; type WeightInfo = weights::pallet_message_queue::WeightInfo; } From 3c87b339184da8665fb289b9f0524986a890f18c Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 16:30:36 +0100 Subject: [PATCH 091/182] fmt Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/mock.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 4ce58af297ad..d8e8bb2ad349 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -324,8 +324,11 @@ impl pallet_message_queue::WeightInfo for TestMessageQueueWeight { parameter_types! { pub const MessageQueueServiceWeight: Weight = Weight::from_all(500); } + +pub type MessageQueueSize = u32; + impl pallet_message_queue::Config for Test { - type Size = u32; + type Size = MessageQueueSize; type RuntimeEvent = RuntimeEvent; type WeightInfo = TestMessageQueueWeight; type MessageProcessor = TestProcessMessage; From 51bf97ee6219c84dda3156f152fc39f2129dc898 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 16:56:38 +0100 Subject: [PATCH 092/182] Add config test Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration/tests.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/runtime/parachains/src/configuration/tests.rs b/runtime/parachains/src/configuration/tests.rs index cf9583e42e30..983054b54803 100644 --- a/runtime/parachains/src/configuration/tests.rs +++ b/runtime/parachains/src/configuration/tests.rs @@ -16,7 +16,7 @@ use super::*; use crate::mock::{new_test_ext, Configuration, ParasShared, RuntimeOrigin, Test}; -use frame_support::{assert_err, assert_ok}; +use frame_support::{assert_err, assert_noop, assert_ok}; fn on_new_session(session_index: SessionIndex) -> (HostConfiguration, HostConfiguration) { ParasShared::set_session_index(session_index); @@ -429,6 +429,13 @@ fn setting_pending_config_members() { new_config.max_upward_queue_size, ) .unwrap(); + assert_noop!( + Configuration::set_max_upward_queue_size( + RuntimeOrigin::root(), + MAX_UPWARD_MESSAGE_SIZE_BOUND + 1, + ), + Error::::InvalidNewValue + ); Configuration::set_max_downward_message_size( RuntimeOrigin::root(), new_config.max_downward_message_size, From c7f6f64c559833ecfc576f4d3bee6a6c581c03ae Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 16:57:00 +0100 Subject: [PATCH 093/182] Fix MQ serive weight Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 9 ++++++--- runtime/polkadot/src/lib.rs | 8 ++++++-- runtime/rococo/src/lib.rs | 9 ++++++--- runtime/westend/src/lib.rs | 8 ++++++-- 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 1b0f8497ac86..11aa4268de03 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1145,12 +1145,16 @@ impl parachains_paras::Config for Runtime { parameter_types! { /// Amount of weight that can be spent per block to service messages. - /// FAIL-CI: Pretty random value. - pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); + /// + /// # WARNING + /// + /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. + pub const MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 65_536; pub const MessageQueueMaxStale: u32 = 8; } +/// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. pub struct MessageProcessor; impl ProcessMessage for MessageProcessor { type Origin = AggregateMessageOrigin; @@ -1473,7 +1477,6 @@ construct_runtime! { Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, Dmp: parachains_dmp::{Pallet, Call, Storage} = 58, - // RIP Ump 59 Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62, diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 60864c8bd403..161bf4ccaa34 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1306,12 +1306,16 @@ impl parachains_paras::Config for Runtime { parameter_types! { /// Amount of weight that can be spent per block to service messages. - /// FAIL-CI: Pretty random value. - pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); + /// + /// # WARNING + /// + /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. + pub const MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 65_536; pub const MessageQueueMaxStale: u32 = 8; } +/// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. pub struct MessageProcessor; impl ProcessMessage for MessageProcessor { type Origin = AggregateMessageOrigin; diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 404c0765cf34..7bce12053ecd 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1069,12 +1069,16 @@ impl parachains_paras::Config for Runtime { parameter_types! { /// Amount of weight that can be spent per block to service messages. - /// FAIL-CI: Pretty random value. - pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); + /// + /// # WARNING + /// + /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. + pub const MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 65_536; pub const MessageQueueMaxStale: u32 = 8; } +/// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. pub struct MessageProcessor; impl ProcessMessage for MessageProcessor { type Origin = AggregateMessageOrigin; @@ -1480,7 +1484,6 @@ construct_runtime! { Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, Dmp: parachains_dmp::{Pallet, Call, Storage} = 58, - // RIP Ump 59 Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62, diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index b49d2f496591..84159572bc6a 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -931,12 +931,16 @@ impl parachains_paras::Config for Runtime { parameter_types! { /// Amount of weight that can be spent per block to service messages. - /// FAIL-CI: Pretty random value. - pub const MessageQueueServiceWeight: Weight = Weight::from_parts(100 * WEIGHT_REF_TIME_PER_MILLIS, u64::MAX); + /// + /// # WARNING + /// + /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. + pub const MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 65_536; pub const MessageQueueMaxStale: u32 = 8; } +/// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. pub struct MessageProcessor; impl ProcessMessage for MessageProcessor { type Origin = AggregateMessageOrigin; From 9c29f5871f4ea89676bd35d22694ea1720fd806c Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 18:01:39 +0100 Subject: [PATCH 094/182] Cleanup Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 28 +++++++++++++++------- runtime/parachains/src/inclusion/tests.rs | 1 + runtime/parachains/src/paras/mod.rs | 3 ++- runtime/parachains/src/ump_tests.rs | 6 ++--- xcm/xcm-builder/src/process_xcm_message.rs | 6 +++-- 5 files changed, 30 insertions(+), 14 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index d44c9180b7c6..2b5b24750a70 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -42,7 +42,7 @@ use primitives::{ UpwardMessage, ValidatorId, ValidatorIndex, ValidityAttestation, }; use scale_info::TypeInfo; -use sp_runtime::{traits::One, DispatchError, SaturatedConversion}; +use sp_runtime::{traits::One, DispatchError, SaturatedConversion, Saturating}; #[cfg(feature = "std")] use sp_std::fmt; use sp_std::{collections::btree_set::BTreeSet, prelude::*}; @@ -215,6 +215,7 @@ pub fn minimum_backing_votes(n_validators: usize) -> usize { sp_std::cmp::min(n_validators, 2) } +/// Provides introspection into the UMP dispatch queue of a parachain. pub trait UmpQueueTracker { fn message_count(para: ParaId) -> u64; } @@ -271,7 +272,9 @@ pub mod pallet { /// The system message queue. /// - /// The message queue provides general queueing and processing functionality. Currently it replaces the old `UMP` dispatch queue. Other use-cases can be implemented as well by adding new variants to `AggregateMessageOrigin`. + /// The message queue provides general queueing and processing functionality. Currently it + /// replaces the old `UMP` dispatch queue. Other use-cases can be implemented as well by + /// adding new variants to `AggregateMessageOrigin`. type MessageQueue: EnqueueMessage; } @@ -374,15 +377,22 @@ pub mod pallet { const LOG_TARGET: &str = "runtime::inclusion"; +/// The reason that a candidate's outputs were rejected for. #[derive(derive_more::From)] #[cfg_attr(feature = "std", derive(Debug))] enum AcceptanceCheckErr { HeadDataTooLarge, + /// Code upgrades are not permitted at the current time. PrematureCodeUpgrade, + /// The new runtime blob is too large. NewCodeTooLarge, + /// The candidate violated this DMP acceptance criteria. ProcessedDownwardMessages(dmp::ProcessedDownwardMessagesAcceptanceErr), + /// The candidate violated this UMP acceptance criteria. UpwardMessages(UmpAcceptanceCheckErr), + /// The candidate violated this HRMP watermark acceptance criteria. HrmpWatermark(hrmp::HrmpWatermarkAcceptanceErr), + /// The candidate violated this outbound HRMP acceptance criteria. OutboundHrmp(hrmp::OutboundHrmpAcceptanceErr), } @@ -935,8 +945,8 @@ impl Pallet { upward_messages: &[UpwardMessage], ) -> Result<(), UmpAcceptanceCheckErr> { // Cannot send UMP messages while off-boarding. - if >::lifecycle(para).map_or(false, |l| l.is_offboarding()) { - ensure!(upward_messages.is_empty(), UmpAcceptanceCheckErr::IsOffboarding,); + if >::is_offboarding(para) { + ensure!(upward_messages.is_empty(), UmpAcceptanceCheckErr::IsOffboarding); } let additional_msgs = upward_messages.len(); @@ -952,7 +962,7 @@ impl Pallet { if para_queue_count .checked_add(additional_msgs as u64) - .map(|want| want > config.max_upward_queue_count as u64) + .map(|new| new > config.max_upward_queue_count as u64) .unwrap_or(true) { return Err(UmpAcceptanceCheckErr::CapacityExceeded { @@ -974,7 +984,7 @@ impl Pallet { // we do it here only once since returning false invalidates the whole relay-chain block. if para_queue_size .checked_add(msg_size as u64) - .map(|want| want > config.max_upward_queue_size as u64) + .map(|new| new > config.max_upward_queue_size as u64) .unwrap_or(true) { return Err(UmpAcceptanceCheckErr::TotalSizeExceeded { @@ -982,12 +992,13 @@ impl Pallet { limit: config.max_upward_queue_size as u64, }) } - para_queue_size += msg_size as u64; + para_queue_size.saturating_accrue(msg_size as u64); } Ok(()) } + /// Enqueues `upward_messages` from a `para`'s accepted candidate block. pub(crate) fn receive_upward_messages(para: ParaId, upward_messages: &[Vec]) -> Weight { let bounded = upward_messages .iter() @@ -996,7 +1007,7 @@ impl Pallet { Self::receive_bounded_upward_messages(para, bounded) } - /// Enqueues `upward_messages` from a `para`'s accepted candidate block. + /// Enqueues storage-bounded `upward_messages` from a `para`'s accepted candidate block. pub(crate) fn receive_bounded_upward_messages( para: ParaId, messages: Vec>>, @@ -1142,6 +1153,7 @@ impl AcceptanceCheckErr { } impl OnQueueChanged for Pallet { + // Write back the remaining queue capacity into `relay_dispatch_queue_remaining_capacity`. fn on_queue_changed(origin: AggregateMessageOrigin, count: u64, size: u64) { let para = match origin { AggregateMessageOrigin::UMP(p) => p, diff --git a/runtime/parachains/src/inclusion/tests.rs b/runtime/parachains/src/inclusion/tests.rs index 50e09d55ec3a..8424c2d55fb4 100644 --- a/runtime/parachains/src/inclusion/tests.rs +++ b/runtime/parachains/src/inclusion/tests.rs @@ -1982,6 +1982,7 @@ fn session_change_wipes() { }); } +/// Assert that the encoding of a known `AggregateMessageOrigin` did not change. #[test] fn aggregate_origin_decode_regression_check() { let ump = AggregateMessageOrigin::UMP(u32::MAX.into()); diff --git a/runtime/parachains/src/paras/mod.rs b/runtime/parachains/src/paras/mod.rs index 7208e5c8b2ea..a8dbdc8fecb9 100644 --- a/runtime/parachains/src/paras/mod.rs +++ b/runtime/parachains/src/paras/mod.rs @@ -555,7 +555,8 @@ pub mod pallet { /// Retrieve how many UMP messages are enqueued for this para-chain. /// - /// This is used to judge whether or not a para-chain can offboard. Per default this should be set to the `ParaInclusion` pallet. + /// This is used to judge whether or not a para-chain can offboard. Per default this should + /// be set to the `ParaInclusion` pallet. type UmpQueueTracker: UmpQueueTracker; /// Weight information for extrinsics in this pallet. diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index a6c199472f98..7a839634c7de 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -103,7 +103,6 @@ mod check_upward_messages { data.as_bytes().to_vec() } - // helper fn check(para: ParaId, msgs: Vec, err: Option) { assert_eq!( ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs[..]).err(), @@ -112,7 +111,7 @@ mod check_upward_messages { } fn queue(para: ParaId, msgs: Vec) { - let _ = ParaInclusion::receive_upward_messages(para, msgs.as_slice()); + msgs.into_iter().for_each(|msg| super::queue_upward_msg(para, msg)); } #[test] @@ -474,7 +473,8 @@ fn overweight_queue_works() { }); } -/// Tests that UMP messages in the dispatch queue of the relay prevents the parachain from being scheduled for offboarding. +/// Tests that UMP messages in the dispatch queue of the relay prevents the parachain from being +/// scheduled for offboarding. #[test] fn cannot_offboard_while_ump_dispatch_queued() { let para = 32.into(); diff --git a/xcm/xcm-builder/src/process_xcm_message.rs b/xcm/xcm-builder/src/process_xcm_message.rs index efb309098b02..23e2ed2974fc 100644 --- a/xcm/xcm-builder/src/process_xcm_message.rs +++ b/xcm/xcm-builder/src/process_xcm_message.rs @@ -39,7 +39,7 @@ impl< { type Origin = MessageOrigin; - /// Process the given message, using no more than `weight_limit` in weight to do so. + /// Process the given message, using no more than the remaining `weight` to do so. fn process_message( message: &[u8], origin: Self::Origin, @@ -77,10 +77,10 @@ mod tests { use polkadot_test_runtime::*; use xcm::{v2, v3, VersionedXcm}; + const ORIGIN: Junction = Junction::OnlyChild; /// The processor to use for tests. type Processor = ProcessXcmMessage, RuntimeCall>; - const ORIGIN: Junction = Junction::OnlyChild; #[test] fn process_message_trivial_works() { @@ -116,11 +116,13 @@ mod tests { Processor::process_message(msg, ORIGIN, meter), Overweight(1000.into()) ); + assert_eq!(meter.consumed, 0.into()); } // Works with a limit of 1000. let meter = &mut WeightMeter::from_limit(1000.into()); assert_ok!(Processor::process_message(msg, ORIGIN, meter)); + assert_eq!(meter.consumed, 1000.into()); } } From f0d6cd83a974ab6f16ca9cea6dcffbc2270b5147 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 18:15:46 +0100 Subject: [PATCH 095/182] Cleanup outgoing UMP dispatch queues Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 13 +++++++++++++ runtime/parachains/src/inclusion/tests.rs | 4 ++-- runtime/parachains/src/initializer.rs | 3 +-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 2b5b24750a70..315f207b714c 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -454,12 +454,25 @@ impl Pallet { /// Handle an incoming session change. pub(crate) fn initializer_on_new_session( _notification: &crate::initializer::SessionChangeNotification, + outgoing_paras: &[ParaId], ) { // unlike most drain methods, drained elements are not cleared on `Drop` of the iterator // and require consumption. for _ in >::drain() {} for _ in >::drain() {} for _ in >::drain() {} + + Self::cleanup_outgoing_dmp_dispatch_queues(outgoing_paras); + } + + pub(crate) fn cleanup_outgoing_dmp_dispatch_queues(outgoing: &[ParaId]) { + for outgoing_para in outgoing { + Self::cleanup_outgoing_dmp_dispatch_queue(*outgoing_para); + } + } + + pub(crate) fn cleanup_outgoing_dmp_dispatch_queue(para: ParaId) { + T::MessageQueue::sweep_queue(AggregateMessageOrigin::UMP(para)); } /// Extract the freed cores based on cores that became available. diff --git a/runtime/parachains/src/inclusion/tests.rs b/runtime/parachains/src/inclusion/tests.rs index 8424c2d55fb4..608059df1beb 100644 --- a/runtime/parachains/src/inclusion/tests.rs +++ b/runtime/parachains/src/inclusion/tests.rs @@ -192,8 +192,8 @@ pub(crate) fn run_to_block( ¬ification.new_config, notification.validators.clone(), ); - Paras::initializer_on_new_session(¬ification); - ParaInclusion::initializer_on_new_session(¬ification); + let outgoing = Paras::initializer_on_new_session(¬ification); + ParaInclusion::initializer_on_new_session(¬ification, &outgoing); } System::on_finalize(b); diff --git a/runtime/parachains/src/initializer.rs b/runtime/parachains/src/initializer.rs index 8b29c4e55c0a..78f455259992 100644 --- a/runtime/parachains/src/initializer.rs +++ b/runtime/parachains/src/initializer.rs @@ -261,12 +261,11 @@ impl Pallet { let outgoing_paras = paras::Pallet::::initializer_on_new_session(¬ification); scheduler::Pallet::::initializer_on_new_session(¬ification); - inclusion::Pallet::::initializer_on_new_session(¬ification); + inclusion::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); session_info::Pallet::::initializer_on_new_session(¬ification); T::DisputesHandler::initializer_on_new_session(¬ification); T::SlashingHandler::initializer_on_new_session(session_index); dmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); - // FAIL-CI cleanup queues of outgoing paras hrmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); } From 2c6ecee71ad9feefa06affbece61709d5a5b2e50 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 18:35:23 +0100 Subject: [PATCH 096/182] Use Master Cargo.lock Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 559 +++++++++++++++++++++++++---------------------------- 1 file changed, 265 insertions(+), 294 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5f1652365876..22c4f2fa8613 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -452,63 +452,10 @@ dependencies = [ "serde", ] -[[package]] -name = "beefy-gadget" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" -dependencies = [ - "array-bytes", - "async-trait", - "fnv", - "futures", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api", - "sc-consensus", - "sc-keystore", - "sc-network", - "sc-network-common", - "sc-network-gossip", - "sc-utils", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-beefy", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-keystore", - "sp-mmr-primitives", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "wasm-timer", -] - -[[package]] -name = "beefy-gadget-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" -dependencies = [ - "beefy-gadget", - "futures", - "jsonrpsee", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-rpc", - "serde", - "sp-beefy", - "sp-core", - "sp-runtime", - "thiserror", -] - [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "hash-db", "log", @@ -2310,7 +2257,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", ] @@ -2333,7 +2280,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support", "frame-support-procedural", @@ -2358,7 +2305,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "Inflector", "array-bytes", @@ -2405,7 +2352,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2416,7 +2363,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2433,7 +2380,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support", "frame-system", @@ -2462,7 +2409,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "futures", "log", @@ -2478,7 +2425,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "bitflags", "environmental", @@ -2511,7 +2458,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "Inflector", "cfg-expr", @@ -2526,7 +2473,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2538,7 +2485,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "proc-macro2", "quote", @@ -2548,7 +2495,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -2572,7 +2519,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support", "frame-system", @@ -2583,7 +2530,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support", "log", @@ -2601,7 +2548,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -2616,7 +2563,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", "sp-api", @@ -2625,7 +2572,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support", "parity-scale-codec", @@ -2807,7 +2754,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "chrono", "frame-election-provider-support", @@ -3633,7 +3580,6 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", - "pallet-message-queue", "pallet-multisig", "pallet-nis", "pallet-nomination-pools", @@ -3676,9 +3622,9 @@ dependencies = [ "sp-api", "sp-arithmetic", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", "sp-inherents", "sp-io", @@ -4587,7 +4533,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "futures", "log", @@ -4595,9 +4541,9 @@ dependencies = [ "sc-client-api", "sc-offchain", "sp-api", - "sp-beefy", "sp-blockchain", "sp-consensus", + "sp-consensus-beefy", "sp-core", "sp-mmr-primitives", "sp-runtime", @@ -4606,7 +4552,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "anyhow", "jsonrpsee", @@ -5168,7 +5114,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5183,7 +5129,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support", "frame-system", @@ -5199,7 +5145,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support", "frame-system", @@ -5213,7 +5159,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5237,7 +5183,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5257,7 +5203,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5276,7 +5222,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5291,7 +5237,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support", "frame-system", @@ -5300,7 +5246,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-beefy", + "sp-consensus-beefy", "sp-runtime", "sp-session", "sp-staking", @@ -5310,7 +5256,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "array-bytes", "binary-merkle-tree", @@ -5324,7 +5270,7 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-beefy", + "sp-consensus-beefy", "sp-core", "sp-io", "sp-runtime", @@ -5334,7 +5280,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5352,7 +5298,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5371,7 +5317,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5388,7 +5334,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5405,7 +5351,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5423,7 +5369,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5446,7 +5392,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5459,7 +5405,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5477,7 +5423,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5495,7 +5441,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5518,7 +5464,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5534,7 +5480,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5554,7 +5500,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5571,24 +5517,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-message-queue" -version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5596,18 +5525,16 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", "sp-std", - "sp-weights", ] [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5624,7 +5551,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5640,7 +5567,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5656,7 +5583,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support", "frame-system", @@ -5673,7 +5600,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5693,7 +5620,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -5704,7 +5631,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support", "frame-system", @@ -5721,7 +5648,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5745,7 +5672,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5762,7 +5689,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5777,7 +5704,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5795,7 +5722,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5810,7 +5737,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5829,7 +5756,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5846,7 +5773,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support", "frame-system", @@ -5867,7 +5794,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5883,7 +5810,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support", "frame-system", @@ -5897,7 +5824,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5920,7 +5847,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5931,7 +5858,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "log", "sp-arithmetic", @@ -5940,7 +5867,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", "sp-api", @@ -5949,7 +5876,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5966,7 +5893,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support", "frame-system", @@ -5980,7 +5907,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -5998,7 +5925,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -6017,7 +5944,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-support", "frame-system", @@ -6033,7 +5960,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6049,7 +5976,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6061,7 +5988,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -6078,7 +6005,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -6093,7 +6020,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -6109,7 +6036,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -6124,7 +6051,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-benchmarking", "frame-support", @@ -6642,11 +6569,11 @@ dependencies = [ "sc-service", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", + "sp-consensus-beefy", "sp-consensus-grandpa", "sp-core", "sp-inherents", @@ -7422,8 +7349,6 @@ dependencies = [ name = "polkadot-rpc" version = "0.9.37" dependencies = [ - "beefy-gadget", - "beefy-gadget-rpc", "jsonrpsee", "mmr-rpc", "pallet-transaction-payment-rpc", @@ -7432,6 +7357,8 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sc-consensus-babe-rpc", + "sc-consensus-beefy", + "sc-consensus-beefy-rpc", "sc-consensus-epochs", "sc-consensus-grandpa", "sc-consensus-grandpa-rpc", @@ -7483,7 +7410,6 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", - "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7520,9 +7446,9 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", "sp-inherents", "sp-io", @@ -7564,7 +7490,6 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", - "pallet-beefy-mmr", "pallet-election-provider-multi-phase", "pallet-fast-unstake", "pallet-session", @@ -7585,7 +7510,6 @@ dependencies = [ "serde_json", "slot-range-helper", "sp-api", - "sp-beefy", "sp-core", "sp-inherents", "sp-io", @@ -7642,7 +7566,6 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", - "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -7683,7 +7606,6 @@ version = "0.9.37" dependencies = [ "assert_matches", "async-trait", - "beefy-gadget", "env_logger 0.9.0", "frame-benchmarking-cli", "frame-support", @@ -7749,6 +7671,7 @@ dependencies = [ "sc-client-db", "sc-consensus", "sc-consensus-babe", + "sc-consensus-beefy", "sc-consensus-grandpa", "sc-consensus-slots", "sc-executor", @@ -7765,11 +7688,11 @@ dependencies = [ "serde_json", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", + "sp-consensus-beefy", "sp-consensus-grandpa", "sp-core", "sp-inherents", @@ -7927,9 +7850,9 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", "sp-inherents", "sp-io", @@ -8777,7 +8700,6 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", - "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -8814,9 +8736,9 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", "sp-inherents", "sp-io", @@ -9057,7 +8979,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "log", "sp-core", @@ -9068,7 +8990,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "futures", @@ -9095,7 +9017,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "futures", "futures-timer", @@ -9118,7 +9040,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9134,7 +9056,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9149,7 +9071,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9160,7 +9082,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "array-bytes", "chrono", @@ -9200,7 +9122,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "fnv", "futures", @@ -9226,7 +9148,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "hash-db", "kvdb", @@ -9252,7 +9174,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "futures", @@ -9277,7 +9199,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "fork-tree", @@ -9316,7 +9238,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "futures", "jsonrpsee", @@ -9335,10 +9257,63 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-consensus-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" +dependencies = [ + "array-bytes", + "async-trait", + "fnv", + "futures", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-consensus", + "sc-keystore", + "sc-network", + "sc-network-common", + "sc-network-gossip", + "sc-utils", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-beefy", + "sp-core", + "sp-keystore", + "sp-mmr-primitives", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", + "wasm-timer", +] + +[[package]] +name = "sc-consensus-beefy-rpc" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" +dependencies = [ + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-consensus-beefy", + "sc-rpc", + "serde", + "sp-consensus-beefy", + "sp-core", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9351,7 +9326,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "ahash 0.8.2", "array-bytes", @@ -9391,7 +9366,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "finality-grandpa", "futures", @@ -9411,7 +9386,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "futures", @@ -9434,7 +9409,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -9458,7 +9433,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9471,7 +9446,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "log", "sc-allocator", @@ -9484,7 +9459,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "anyhow", "cfg-if", @@ -9502,7 +9477,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "ansi_term", "futures", @@ -9517,7 +9492,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "array-bytes", "async-trait", @@ -9532,7 +9507,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "array-bytes", "async-trait", @@ -9575,7 +9550,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "cid", "futures", @@ -9594,7 +9569,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "bitflags", @@ -9620,7 +9595,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "ahash 0.8.2", "futures", @@ -9638,7 +9613,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "array-bytes", "futures", @@ -9659,7 +9634,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "array-bytes", "async-trait", @@ -9691,7 +9666,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "array-bytes", "futures", @@ -9710,7 +9685,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "array-bytes", "bytes", @@ -9740,7 +9715,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "futures", "libp2p", @@ -9753,7 +9728,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9762,7 +9737,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "futures", "jsonrpsee", @@ -9792,7 +9767,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9811,7 +9786,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "http", "jsonrpsee", @@ -9826,7 +9801,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "array-bytes", "futures", @@ -9852,7 +9827,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "directories", @@ -9918,7 +9893,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "log", "parity-scale-codec", @@ -9929,7 +9904,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "clap 4.0.15", "fs4", @@ -9945,7 +9920,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9964,7 +9939,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "futures", "libc", @@ -9983,7 +9958,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "chrono", "futures", @@ -10002,7 +9977,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "ansi_term", "atty", @@ -10033,7 +10008,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10044,7 +10019,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "futures", @@ -10071,7 +10046,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "futures", @@ -10085,7 +10060,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "backtrace", "futures", @@ -10593,7 +10568,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "hash-db", "log", @@ -10611,7 +10586,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "blake2", "proc-macro-crate", @@ -10623,7 +10598,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", "scale-info", @@ -10636,7 +10611,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "integer-sqrt", "num-traits", @@ -10650,7 +10625,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", "scale-info", @@ -10660,29 +10635,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-beefy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" -dependencies = [ - "lazy_static", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-mmr-primitives", - "sp-runtime", - "sp-std", - "strum", -] - [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", "sp-api", @@ -10694,7 +10650,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "futures", "log", @@ -10712,7 +10668,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "futures", @@ -10730,7 +10686,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "parity-scale-codec", @@ -10748,7 +10704,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "merlin", @@ -10768,10 +10724,29 @@ dependencies = [ "sp-timestamp", ] +[[package]] +name = "sp-consensus-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" +dependencies = [ + "lazy_static", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-mmr-primitives", + "sp-runtime", + "sp-std", + "strum", +] + [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "finality-grandpa", "log", @@ -10789,7 +10764,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", "scale-info", @@ -10801,7 +10776,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", "scale-info", @@ -10814,7 +10789,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "array-bytes", "base58", @@ -10857,7 +10832,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "blake2", "byteorder", @@ -10871,7 +10846,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "proc-macro2", "quote", @@ -10882,7 +10857,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10891,7 +10866,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "proc-macro2", "quote", @@ -10901,7 +10876,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "environmental", "parity-scale-codec", @@ -10912,7 +10887,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10927,7 +10902,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "bytes", "ed25519", @@ -10952,7 +10927,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "lazy_static", "sp-core", @@ -10963,7 +10938,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "futures", @@ -10980,7 +10955,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "thiserror", "zstd", @@ -10989,7 +10964,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -11007,7 +10982,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", "scale-info", @@ -11021,7 +10996,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "sp-api", "sp-core", @@ -11031,7 +11006,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "backtrace", "lazy_static", @@ -11041,7 +11016,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "rustc-hash", "serde", @@ -11051,7 +11026,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "either", "hash256-std-hasher", @@ -11073,7 +11048,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11091,7 +11066,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "Inflector", "proc-macro-crate", @@ -11103,7 +11078,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", "scale-info", @@ -11117,7 +11092,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", "scale-info", @@ -11129,7 +11104,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "hash-db", "log", @@ -11149,12 +11124,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11167,7 +11142,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "futures-timer", @@ -11182,7 +11157,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", "sp-std", @@ -11194,7 +11169,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "sp-api", "sp-runtime", @@ -11203,7 +11178,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "log", @@ -11219,7 +11194,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "ahash 0.8.2", "hash-db", @@ -11242,7 +11217,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11259,7 +11234,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11270,7 +11245,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11284,7 +11259,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "parity-scale-codec", "scale-info", @@ -11504,7 +11479,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "platforms", ] @@ -11512,7 +11487,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11531,7 +11506,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "hyper", "log", @@ -11543,7 +11518,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "jsonrpsee", @@ -11556,7 +11531,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "jsonrpsee", "log", @@ -11575,7 +11550,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "array-bytes", "async-trait", @@ -11601,7 +11576,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11611,7 +11586,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11622,7 +11597,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "ansi_term", "build-helper", @@ -12423,7 +12398,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f2615a4db8bf38927ef961aad926a007f3b4b8ca" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" dependencies = [ "async-trait", "clap 4.0.15", @@ -13395,7 +13370,6 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", - "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -13435,9 +13409,9 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", "sp-inherents", "sp-io", @@ -13835,14 +13809,12 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain", "polkadot-runtime-parachains", - "polkadot-test-runtime", "primitive-types", "scale-info", "sp-arithmetic", "sp-io", "sp-runtime", "sp-std", - "sp-weights", "xcm", "xcm-executor", ] @@ -13909,7 +13881,6 @@ dependencies = [ "sp-io", "sp-std", "xcm", - "xcm-builder", "xcm-executor", ] From a7250281edd32a65dca01b77460880d2a80fd24a Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 18:35:45 +0100 Subject: [PATCH 097/182] Update Cargo.lock Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 22c4f2fa8613..4a306f952362 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3580,6 +3580,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nis", "pallet-nomination-pools", @@ -5531,6 +5532,25 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-message-queue" +version = "7.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#b7e0518966b145f22c16137da5c9796fcdb43b73" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", +] + [[package]] name = "pallet-mmr" version = "4.0.0-dev" @@ -7410,6 +7430,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7566,6 +7587,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -8700,6 +8722,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -13370,6 +13393,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -13809,12 +13833,14 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain", "polkadot-runtime-parachains", + "polkadot-test-runtime", "primitive-types", "scale-info", "sp-arithmetic", "sp-io", "sp-runtime", "sp-std", + "sp-weights", "xcm", "xcm-executor", ] @@ -13881,6 +13907,7 @@ dependencies = [ "sp-io", "sp-std", "xcm", + "xcm-builder", "xcm-executor", ] From 7ced507fc22b676f4132aa34341be2c7de806ceb Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 18:48:01 +0100 Subject: [PATCH 098/182] Weight mul is not const Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 2 +- runtime/polkadot/src/lib.rs | 2 +- runtime/rococo/src/lib.rs | 2 +- runtime/westend/src/lib.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 11aa4268de03..5f639b8ebfff 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1149,7 +1149,7 @@ parameter_types! { /// # WARNING /// /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. - pub const MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 65_536; pub const MessageQueueMaxStale: u32 = 8; } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 161bf4ccaa34..efc7bc5334b6 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1310,7 +1310,7 @@ parameter_types! { /// # WARNING /// /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. - pub const MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 65_536; pub const MessageQueueMaxStale: u32 = 8; } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 7bce12053ecd..3c346a425bfd 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1073,7 +1073,7 @@ parameter_types! { /// # WARNING /// /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. - pub const MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 65_536; pub const MessageQueueMaxStale: u32 = 8; } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 84159572bc6a..12fe6fe2ae6c 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -935,7 +935,7 @@ parameter_types! { /// # WARNING /// /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. - pub const MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 65_536; pub const MessageQueueMaxStale: u32 = 8; } From f6d2fa0ca7ef755007bb6e776bc9665929ef543b Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 28 Feb 2023 18:55:27 +0100 Subject: [PATCH 099/182] Clippy Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 2 +- runtime/polkadot/src/lib.rs | 2 +- runtime/rococo/src/lib.rs | 2 +- runtime/westend/src/lib.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 5f639b8ebfff..24ff18dae262 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -58,7 +58,7 @@ use frame_support::{ LockIdentifier, PrivilegeCmp, ProcessMessage, ProcessMessageError, StorageMapShim, WithdrawReasons, }, - weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier, WeightMeter}, + weights::{ConstantMultiplier, WeightMeter}, PalletId, RuntimeDebug, }; use frame_system::EnsureRoot; diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index efc7bc5334b6..cd96c263e956 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -45,7 +45,7 @@ use frame_support::{ ConstU32, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, PrivilegeCmp, ProcessMessage, ProcessMessageError, WithdrawReasons, }, - weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier, WeightMeter}, + weights::{ConstantMultiplier, WeightMeter}, PalletId, RuntimeDebug, }; use frame_system::EnsureRoot; diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 3c346a425bfd..25fb82fd02f6 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -62,7 +62,7 @@ use frame_support::{ Contains, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, PrivilegeCmp, ProcessMessage, ProcessMessageError, StorageMapShim, WithdrawReasons, }, - weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier, WeightMeter}, + weights::{ConstantMultiplier, WeightMeter}, PalletId, RuntimeDebug, }; use frame_system::EnsureRoot; diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 12fe6fe2ae6c..0b654909cb3f 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -29,7 +29,7 @@ use frame_support::{ ConstU32, InstanceFilter, KeyOwnerProofSystem, ProcessMessage, ProcessMessageError, WithdrawReasons, }, - weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, ConstantMultiplier, WeightMeter}, + weights::{ConstantMultiplier, WeightMeter}, PalletId, }; use frame_system::EnsureRoot; From 7fc3718531efd268f085d1c8ecdefe505b9aaed1 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 3 Mar 2023 16:03:44 +0100 Subject: [PATCH 100/182] Remove merge marker Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration/benchmarking.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/runtime/parachains/src/configuration/benchmarking.rs b/runtime/parachains/src/configuration/benchmarking.rs index fcc818f2c27a..4e2813bafeeb 100644 --- a/runtime/parachains/src/configuration/benchmarking.rs +++ b/runtime/parachains/src/configuration/benchmarking.rs @@ -26,11 +26,6 @@ benchmarks! { set_config_with_option_u32 {}: set_max_validators(RawOrigin::Root, Some(10)) -<<<<<<< HEAD -======= - set_config_with_weight {}: set_ump_service_total_weight(RawOrigin::Root, Weight::from_parts(3_000_000, 0)) - ->>>>>>> origin/master set_hrmp_open_request_ttl {}: { Err(BenchmarkError::Override( BenchmarkResult::from_weight(T::BlockWeights::get().max_block) From 6b3687393e1afcf680f2acd72c5efd83d6890d2d Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 3 Mar 2023 20:42:25 +0100 Subject: [PATCH 101/182] Update runtime/parachains/src/inclusion/mod.rs Co-authored-by: Gavin Wood --- runtime/parachains/src/inclusion/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 315f207b714c..eeb72b6d71b9 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -232,7 +232,8 @@ impl UmpQueueTracker for () { #[derive(Encode, Decode, Clone, MaxEncodedLen, Eq, PartialEq, RuntimeDebug, TypeInfo)] pub enum AggregateMessageOrigin { /// Incoming upwards message from a parachain. - UMP(ParaId), + #[codec(index = 0)] + Ump(ParaId), } #[cfg(feature = "runtime-benchmarks")] From 53cb04faf56f31b3aaff41489e7eb36254a1b801 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 9 Mar 2023 12:22:53 +0100 Subject: [PATCH 102/182] Update runtime/kusama/src/lib.rs Co-authored-by: Gavin Wood --- runtime/kusama/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 24ff18dae262..f4f250db2c44 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1165,7 +1165,7 @@ impl ProcessMessage for MessageProcessor { meter: &mut WeightMeter, ) -> Result { let para = match origin { - AggregateMessageOrigin::UMP(para) => para, + AggregateMessageOrigin::Ump(para) => para, }; xcm_builder::ProcessXcmMessage::< Junction, From 8ad38b3b19b60ca920c5842171f3906fe5fbdb4b Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 9 Mar 2023 12:23:44 +0100 Subject: [PATCH 103/182] Use lowercase UMP Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 12 ++++++------ runtime/parachains/src/inclusion/tests.rs | 2 +- runtime/parachains/src/mock.rs | 2 +- runtime/parachains/src/ump_tests.rs | 18 +++++++++--------- runtime/polkadot/src/lib.rs | 2 +- runtime/rococo/src/lib.rs | 2 +- runtime/westend/src/lib.rs | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index eeb72b6d71b9..f6d22859f46b 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -240,7 +240,7 @@ pub enum AggregateMessageOrigin { impl From for AggregateMessageOrigin { fn from(n: u32) -> Self { // Some dummy for the benchmarks. - Self::UMP(n.into()) + Self::Ump(n.into()) } } @@ -473,7 +473,7 @@ impl Pallet { } pub(crate) fn cleanup_outgoing_dmp_dispatch_queue(para: ParaId) { - T::MessageQueue::sweep_queue(AggregateMessageOrigin::UMP(para)); + T::MessageQueue::sweep_queue(AggregateMessageOrigin::Ump(para)); } /// Extract the freed cores based on cores that became available. @@ -971,7 +971,7 @@ impl Pallet { }) } - let fp = T::MessageQueue::footprint(AggregateMessageOrigin::UMP(para)); + let fp = T::MessageQueue::footprint(AggregateMessageOrigin::Ump(para)); let (para_queue_count, mut para_queue_size) = (fp.count, fp.size); if para_queue_count @@ -1032,7 +1032,7 @@ impl Pallet { } Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); - T::MessageQueue::enqueue_messages(messages.into_iter(), AggregateMessageOrigin::UMP(para)); + T::MessageQueue::enqueue_messages(messages.into_iter(), AggregateMessageOrigin::Ump(para)); ::WeightInfo::receive_upward_messages(count) } @@ -1170,7 +1170,7 @@ impl OnQueueChanged for Pallet { // Write back the remaining queue capacity into `relay_dispatch_queue_remaining_capacity`. fn on_queue_changed(origin: AggregateMessageOrigin, count: u64, size: u64) { let para = match origin { - AggregateMessageOrigin::UMP(p) => p, + AggregateMessageOrigin::Ump(p) => p, }; // TODO maybe migrate this to u64 let (count, size) = (count.saturated_into(), size.saturated_into()); @@ -1325,6 +1325,6 @@ impl CandidateCheckContext { impl UmpQueueTracker for Pallet { fn message_count(para: ParaId) -> u64 { - T::MessageQueue::footprint(AggregateMessageOrigin::UMP(para)).count + T::MessageQueue::footprint(AggregateMessageOrigin::Ump(para)).count } } diff --git a/runtime/parachains/src/inclusion/tests.rs b/runtime/parachains/src/inclusion/tests.rs index 608059df1beb..c4fba167509f 100644 --- a/runtime/parachains/src/inclusion/tests.rs +++ b/runtime/parachains/src/inclusion/tests.rs @@ -1985,7 +1985,7 @@ fn session_change_wipes() { /// Assert that the encoding of a known `AggregateMessageOrigin` did not change. #[test] fn aggregate_origin_decode_regression_check() { - let ump = AggregateMessageOrigin::UMP(u32::MAX.into()); + let ump = AggregateMessageOrigin::Ump(u32::MAX.into()); let raw = hex!("00ffffffff"); let decoded = AggregateMessageOrigin::decode_all(&mut &raw[..]); assert_eq!(decoded, Ok(ump), "Migration needed for AggregateMessageOrigin"); diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index d8e8bb2ad349..81338227f93e 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -438,7 +438,7 @@ impl ProcessMessage for TestProcessMessage { meter: &mut WeightMeter, ) -> Result { let origin = match origin { - AggregateMessageOrigin::UMP(o) => o, + AggregateMessageOrigin::Ump(o) => o, }; let required = match u32::decode(&mut &message[..]) { diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 7a839634c7de..2394cfb86858 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -16,7 +16,7 @@ use crate::{ inclusion::{ - tests::run_to_block_default_notifications as run_to_block, AggregateMessageOrigin::UMP, + tests::run_to_block_default_notifications as run_to_block, AggregateMessageOrigin::Ump, UmpAcceptanceCheckErr, }, mock::{ @@ -378,7 +378,7 @@ fn service_overweight_unknown() { assert_noop!( ::execute_overweight( Weight::MAX, - (UMP(0u32.into()), 0, 0) + (Ump(0u32.into()), 0, 0) ), ExecuteOverweightError::NotFound, ); @@ -412,21 +412,21 @@ fn overweight_queue_works() { [ pallet_message_queue::Event::::Processed { hash: hash_1.clone(), - origin: UMP(para_a), + origin: Ump(para_a), weight_used: Weight::from_parts(301, 301), success: true, } .into(), pallet_message_queue::Event::::OverweightEnqueued { hash: hash_2.clone(), - origin: UMP(para_a), + origin: Ump(para_a), page_index: 0, message_index: 1, } .into(), pallet_message_queue::Event::::OverweightEnqueued { hash: hash_3.clone(), - origin: UMP(para_a), + origin: Ump(para_a), page_index: 0, message_index: 2, } @@ -441,7 +441,7 @@ fn overweight_queue_works() { assert_noop!( ::execute_overweight( Weight::from_parts(500, 500), - (UMP(para_a), 0, 2) + (Ump(para_a), 0, 2) ), ExecuteOverweightError::InsufficientWeight, ); @@ -449,12 +449,12 @@ fn overweight_queue_works() { // ... and if we try to service it with just enough weight it will succeed as well. assert_ok!(::execute_overweight( Weight::from_parts(501, 501), - (UMP(para_a), 0, 2) + (Ump(para_a), 0, 2) )); assert_last_event( pallet_message_queue::Event::::Processed { hash: hash_3, - origin: UMP(para_a), + origin: Ump(para_a), weight_used: Weight::from_parts(501, 501), success: true, } @@ -466,7 +466,7 @@ fn overweight_queue_works() { assert_noop!( ::execute_overweight( Weight::from_parts(501, 501), - (UMP(para_a), 0, 2) + (Ump(para_a), 0, 2) ), ExecuteOverweightError::NotFound, ); diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index cd96c263e956..aae0876ec0db 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1326,7 +1326,7 @@ impl ProcessMessage for MessageProcessor { meter: &mut WeightMeter, ) -> Result { let para = match origin { - AggregateMessageOrigin::UMP(para) => para, + AggregateMessageOrigin::Ump(para) => para, }; xcm_builder::ProcessXcmMessage::< Junction, diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index dfc3d2cd5b8e..0ec5672bdf97 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1089,7 +1089,7 @@ impl ProcessMessage for MessageProcessor { meter: &mut WeightMeter, ) -> Result { let para = match origin { - AggregateMessageOrigin::UMP(para) => para, + AggregateMessageOrigin::Ump(para) => para, }; xcm_builder::ProcessXcmMessage::< Junction, diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 0b654909cb3f..d8ded2d3aeb3 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -951,7 +951,7 @@ impl ProcessMessage for MessageProcessor { meter: &mut WeightMeter, ) -> Result { let para = match origin { - AggregateMessageOrigin::UMP(para) => para, + AggregateMessageOrigin::Ump(para) => para, }; xcm_builder::ProcessXcmMessage::< Junction, From a50f39af16c7a39955592fd4c8ba08d3c609b3b9 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 9 Mar 2023 12:29:55 +0100 Subject: [PATCH 104/182] Clarify comment Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index f6d22859f46b..19d90f3c65a6 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -228,7 +228,8 @@ impl UmpQueueTracker for () { /// Aggregate message origin for the `MessageQueue` pallet. /// -/// Can be extended to serve further use-cases besides just UMP. Changing this possibly requires a migration. +/// Can be extended to serve further use-cases besides just UMP. Is stored in storage, so any change +/// to existing values will require a migration. #[derive(Encode, Decode, Clone, MaxEncodedLen, Eq, PartialEq, RuntimeDebug, TypeInfo)] pub enum AggregateMessageOrigin { /// Incoming upwards message from a parachain. From 337257610689fb68c7e5a546ed6d848e47af80dc Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 9 Mar 2023 12:35:52 +0100 Subject: [PATCH 105/182] Use Weight::from_parts Signed-off-by: Oliver Tale-Yazdi --- .../src/weights/pallet_message_queue.rs | 40 +++++++++---------- .../weights/runtime_parachains_inclusion.rs | 6 +-- .../src/weights/pallet_message_queue.rs | 40 +++++++++---------- .../weights/runtime_parachains_inclusion.rs | 6 +-- .../src/weights/pallet_message_queue.rs | 40 +++++++++---------- .../weights/runtime_parachains_inclusion.rs | 6 +-- .../src/weights/pallet_message_queue.rs | 40 +++++++++---------- .../weights/runtime_parachains_inclusion.rs | 6 +-- 8 files changed, 92 insertions(+), 92 deletions(-) diff --git a/runtime/kusama/src/weights/pallet_message_queue.rs b/runtime/kusama/src/weights/pallet_message_queue.rs index 30c0e58e310b..03b0ac4dedde 100644 --- a/runtime/kusama/src/weights/pallet_message_queue.rs +++ b/runtime/kusama/src/weights/pallet_message_queue.rs @@ -54,8 +54,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `837` // Estimated: `5554` // Minimum execution time: 5_669 nanoseconds. - Weight::from_ref_time(5_925_000) - .saturating_add(Weight::from_proof_size(5554)) + Weight::from_parts(5_925_000, 0) + .saturating_add(Weight::from_parts(0, 5554)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -68,8 +68,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `837` // Estimated: `5554` // Minimum execution time: 5_604 nanoseconds. - Weight::from_ref_time(5_993_000) - .saturating_add(Weight::from_proof_size(5554)) + Weight::from_parts(5_993_000, 0) + .saturating_add(Weight::from_parts(0, 5554)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -80,8 +80,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `576` // Estimated: `2527` // Minimum execution time: 2_104 nanoseconds. - Weight::from_ref_time(2_241_000) - .saturating_add(Weight::from_proof_size(2527)) + Weight::from_parts(2_241_000, 0) + .saturating_add(Weight::from_parts(0, 2527)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -92,8 +92,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `648` // Estimated: `68060` // Minimum execution time: 3_175 nanoseconds. - Weight::from_ref_time(3_289_000) - .saturating_add(Weight::from_proof_size(68060)) + Weight::from_parts(3_289_000, 0) + .saturating_add(Weight::from_parts(0, 68060)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -104,8 +104,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `648` // Estimated: `68060` // Minimum execution time: 3_198 nanoseconds. - Weight::from_ref_time(3_308_000) - .saturating_add(Weight::from_proof_size(68060)) + Weight::from_parts(3_308_000, 0) + .saturating_add(Weight::from_parts(0, 68060)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -114,8 +114,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `969` // Estimated: `0` // Minimum execution time: 46_864 nanoseconds. - Weight::from_ref_time(47_073_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(47_073_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: MessageQueue ServiceHead (r:1 w:1) /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) @@ -126,8 +126,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `712` // Estimated: `3027` // Minimum execution time: 3_552 nanoseconds. - Weight::from_ref_time(3_710_000) - .saturating_add(Weight::from_proof_size(3027)) + Weight::from_parts(3_710_000, 0) + .saturating_add(Weight::from_parts(0, 3027)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -140,8 +140,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `66857` // Estimated: `70587` // Minimum execution time: 38_491 nanoseconds. - Weight::from_ref_time(46_983_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(46_983_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -154,8 +154,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `66857` // Estimated: `70587` // Minimum execution time: 88_529 nanoseconds. - Weight::from_ref_time(144_649_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(144_649_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -168,8 +168,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `66857` // Estimated: `70587` // Minimum execution time: 79_494 nanoseconds. - Weight::from_ref_time(84_895_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(84_895_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/kusama/src/weights/runtime_parachains_inclusion.rs b/runtime/kusama/src/weights/runtime_parachains_inclusion.rs index df8186c18a4d..dcf4494dac56 100644 --- a/runtime/kusama/src/weights/runtime_parachains_inclusion.rs +++ b/runtime/kusama/src/weights/runtime_parachains_inclusion.rs @@ -55,10 +55,10 @@ impl runtime_parachains::inclusion::WeightInfo for Weig // Measured: `51490` // Estimated: `70587` // Minimum execution time: 47_556 nanoseconds. - Weight::from_ref_time(48_839_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(48_839_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) // Standard Error: 49_019 - .saturating_add(Weight::from_ref_time(43_136_059).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(43_136_059, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) diff --git a/runtime/polkadot/src/weights/pallet_message_queue.rs b/runtime/polkadot/src/weights/pallet_message_queue.rs index bd6efa3355eb..6800b2294406 100644 --- a/runtime/polkadot/src/weights/pallet_message_queue.rs +++ b/runtime/polkadot/src/weights/pallet_message_queue.rs @@ -54,8 +54,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `837` // Estimated: `5554` // Minimum execution time: 5_631 nanoseconds. - Weight::from_ref_time(6_182_000) - .saturating_add(Weight::from_proof_size(5554)) + Weight::from_parts(6_182_000, 0) + .saturating_add(Weight::from_parts(0, 5554)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -68,8 +68,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `837` // Estimated: `5554` // Minimum execution time: 5_515 nanoseconds. - Weight::from_ref_time(5_775_000) - .saturating_add(Weight::from_proof_size(5554)) + Weight::from_parts(5_775_000, 0) + .saturating_add(Weight::from_parts(0, 5554)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -80,8 +80,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `576` // Estimated: `2527` // Minimum execution time: 2_098 nanoseconds. - Weight::from_ref_time(2_265_000) - .saturating_add(Weight::from_proof_size(2527)) + Weight::from_parts(2_265_000, 0) + .saturating_add(Weight::from_parts(0, 2527)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -92,8 +92,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `648` // Estimated: `68060` // Minimum execution time: 3_194 nanoseconds. - Weight::from_ref_time(3_436_000) - .saturating_add(Weight::from_proof_size(68060)) + Weight::from_parts(3_436_000, 0) + .saturating_add(Weight::from_parts(0, 68060)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -104,8 +104,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `648` // Estimated: `68060` // Minimum execution time: 3_409 nanoseconds. - Weight::from_ref_time(3_673_000) - .saturating_add(Weight::from_proof_size(68060)) + Weight::from_parts(3_673_000, 0) + .saturating_add(Weight::from_parts(0, 68060)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -114,8 +114,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `971` // Estimated: `0` // Minimum execution time: 49_243 nanoseconds. - Weight::from_ref_time(50_380_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(50_380_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: MessageQueue ServiceHead (r:1 w:1) /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) @@ -126,8 +126,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `712` // Estimated: `3027` // Minimum execution time: 3_744 nanoseconds. - Weight::from_ref_time(3_922_000) - .saturating_add(Weight::from_proof_size(3027)) + Weight::from_parts(3_922_000, 0) + .saturating_add(Weight::from_parts(0, 3027)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -140,8 +140,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `66859` // Estimated: `70587` // Minimum execution time: 28_995 nanoseconds. - Weight::from_ref_time(30_370_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(30_370_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -154,8 +154,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `66859` // Estimated: `70587` // Minimum execution time: 76_268 nanoseconds. - Weight::from_ref_time(77_933_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(77_933_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -168,8 +168,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `66859` // Estimated: `70587` // Minimum execution time: 78_029 nanoseconds. - Weight::from_ref_time(80_632_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(80_632_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/polkadot/src/weights/runtime_parachains_inclusion.rs b/runtime/polkadot/src/weights/runtime_parachains_inclusion.rs index fe192fddf37a..0ab5c1e30650 100644 --- a/runtime/polkadot/src/weights/runtime_parachains_inclusion.rs +++ b/runtime/polkadot/src/weights/runtime_parachains_inclusion.rs @@ -55,10 +55,10 @@ impl runtime_parachains::inclusion::WeightInfo for Weig // Measured: `51490` // Estimated: `70587` // Minimum execution time: 50_423 nanoseconds. - Weight::from_ref_time(160_584_092) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(160_584_092, 0) + .saturating_add(Weight::from_parts(0, 70587)) // Standard Error: 75_127 - .saturating_add(Weight::from_ref_time(41_929_458).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(41_929_458, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) diff --git a/runtime/rococo/src/weights/pallet_message_queue.rs b/runtime/rococo/src/weights/pallet_message_queue.rs index 057813a2d313..109125e22709 100644 --- a/runtime/rococo/src/weights/pallet_message_queue.rs +++ b/runtime/rococo/src/weights/pallet_message_queue.rs @@ -54,8 +54,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `837` // Estimated: `5554` // Minimum execution time: 9_427 nanoseconds. - Weight::from_ref_time(9_806_000) - .saturating_add(Weight::from_proof_size(5554)) + Weight::from_parts(9_806_000, 0) + .saturating_add(Weight::from_parts(0, 5554)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -68,8 +68,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `837` // Estimated: `5554` // Minimum execution time: 20_178 nanoseconds. - Weight::from_ref_time(20_550_000) - .saturating_add(Weight::from_proof_size(5554)) + Weight::from_parts(20_550_000, 0) + .saturating_add(Weight::from_parts(0, 5554)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -80,8 +80,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `576` // Estimated: `2527` // Minimum execution time: 3_746 nanoseconds. - Weight::from_ref_time(3_885_000) - .saturating_add(Weight::from_proof_size(2527)) + Weight::from_parts(3_885_000, 0) + .saturating_add(Weight::from_parts(0, 2527)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -92,8 +92,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `648` // Estimated: `68060` // Minimum execution time: 4_906 nanoseconds. - Weight::from_ref_time(5_060_000) - .saturating_add(Weight::from_proof_size(68060)) + Weight::from_parts(5_060_000, 0) + .saturating_add(Weight::from_parts(0, 68060)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -104,8 +104,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `648` // Estimated: `68060` // Minimum execution time: 5_194 nanoseconds. - Weight::from_ref_time(5_361_000) - .saturating_add(Weight::from_proof_size(68060)) + Weight::from_parts(5_361_000, 0) + .saturating_add(Weight::from_parts(0, 68060)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -114,8 +114,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `936` // Estimated: `0` // Minimum execution time: 62_021 nanoseconds. - Weight::from_ref_time(62_487_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(62_487_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: MessageQueue ServiceHead (r:1 w:1) /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) @@ -126,8 +126,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `712` // Estimated: `3027` // Minimum execution time: 6_989 nanoseconds. - Weight::from_ref_time(8_098_000) - .saturating_add(Weight::from_proof_size(3027)) + Weight::from_parts(8_098_000, 0) + .saturating_add(Weight::from_parts(0, 3027)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -140,8 +140,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `66846` // Estimated: `70587` // Minimum execution time: 38_177 nanoseconds. - Weight::from_ref_time(44_704_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(44_704_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -154,8 +154,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `66846` // Estimated: `70587` // Minimum execution time: 48_404 nanoseconds. - Weight::from_ref_time(55_066_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(55_066_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -168,8 +168,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `66846` // Estimated: `70587` // Minimum execution time: 66_523 nanoseconds. - Weight::from_ref_time(73_063_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(73_063_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/rococo/src/weights/runtime_parachains_inclusion.rs b/runtime/rococo/src/weights/runtime_parachains_inclusion.rs index 9a4dc44145e9..83c1056951ec 100644 --- a/runtime/rococo/src/weights/runtime_parachains_inclusion.rs +++ b/runtime/rococo/src/weights/runtime_parachains_inclusion.rs @@ -55,10 +55,10 @@ impl runtime_parachains::inclusion::WeightInfo for Weig // Measured: `51490` // Estimated: `70587` // Minimum execution time: 48_782 nanoseconds. - Weight::from_ref_time(49_384_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(49_384_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) // Standard Error: 32_635 - .saturating_add(Weight::from_ref_time(43_384_796).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(43_384_796, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) diff --git a/runtime/westend/src/weights/pallet_message_queue.rs b/runtime/westend/src/weights/pallet_message_queue.rs index 57737ade6c28..665c0505cb04 100644 --- a/runtime/westend/src/weights/pallet_message_queue.rs +++ b/runtime/westend/src/weights/pallet_message_queue.rs @@ -54,8 +54,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `804` // Estimated: `5554` // Minimum execution time: 5_813 nanoseconds. - Weight::from_ref_time(5_980_000) - .saturating_add(Weight::from_proof_size(5554)) + Weight::from_parts(5_980_000, 0) + .saturating_add(Weight::from_parts(0, 5554)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -68,8 +68,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `804` // Estimated: `5554` // Minimum execution time: 5_742 nanoseconds. - Weight::from_ref_time(5_986_000) - .saturating_add(Weight::from_proof_size(5554)) + Weight::from_parts(5_986_000, 0) + .saturating_add(Weight::from_parts(0, 5554)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -80,8 +80,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `543` // Estimated: `2527` // Minimum execution time: 2_118 nanoseconds. - Weight::from_ref_time(2_206_000) - .saturating_add(Weight::from_proof_size(2527)) + Weight::from_parts(2_206_000, 0) + .saturating_add(Weight::from_parts(0, 2527)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -92,8 +92,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `615` // Estimated: `68060` // Minimum execution time: 3_153 nanoseconds. - Weight::from_ref_time(3_240_000) - .saturating_add(Weight::from_proof_size(68060)) + Weight::from_parts(3_240_000, 0) + .saturating_add(Weight::from_parts(0, 68060)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -104,8 +104,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `615` // Estimated: `68060` // Minimum execution time: 3_191 nanoseconds. - Weight::from_ref_time(3_289_000) - .saturating_add(Weight::from_proof_size(68060)) + Weight::from_parts(3_289_000, 0) + .saturating_add(Weight::from_parts(0, 68060)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -114,8 +114,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `904` // Estimated: `0` // Minimum execution time: 47_975 nanoseconds. - Weight::from_ref_time(49_334_000) - .saturating_add(Weight::from_proof_size(0)) + Weight::from_parts(49_334_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: MessageQueue ServiceHead (r:1 w:1) /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) @@ -126,8 +126,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `679` // Estimated: `3027` // Minimum execution time: 3_725 nanoseconds. - Weight::from_ref_time(4_074_000) - .saturating_add(Weight::from_proof_size(3027)) + Weight::from_parts(4_074_000, 0) + .saturating_add(Weight::from_parts(0, 3027)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -140,8 +140,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `66814` // Estimated: `70587` // Minimum execution time: 28_769 nanoseconds. - Weight::from_ref_time(29_450_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(29_450_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -154,8 +154,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `66814` // Estimated: `70587` // Minimum execution time: 74_422 nanoseconds. - Weight::from_ref_time(78_637_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(78_637_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -168,8 +168,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Measured: `66814` // Estimated: `70587` // Minimum execution time: 75_542 nanoseconds. - Weight::from_ref_time(80_545_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(80_545_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/westend/src/weights/runtime_parachains_inclusion.rs b/runtime/westend/src/weights/runtime_parachains_inclusion.rs index 4fd7e2fea1ae..112abc3aa181 100644 --- a/runtime/westend/src/weights/runtime_parachains_inclusion.rs +++ b/runtime/westend/src/weights/runtime_parachains_inclusion.rs @@ -55,10 +55,10 @@ impl runtime_parachains::inclusion::WeightInfo for Weig // Measured: `51490` // Estimated: `70587` // Minimum execution time: 49_053 nanoseconds. - Weight::from_ref_time(49_506_000) - .saturating_add(Weight::from_proof_size(70587)) + Weight::from_parts(49_506_000, 0) + .saturating_add(Weight::from_parts(0, 70587)) // Standard Error: 62_734 - .saturating_add(Weight::from_ref_time(43_511_974).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(43_511_974, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) From e5e7e33471e0423f71510619a164622278ac5910 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 9 Mar 2023 13:36:45 +0100 Subject: [PATCH 106/182] Fix test Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/mock.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 5c5e7f6c11ef..ceea58508829 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -27,13 +27,10 @@ use crate::{ use frame_support::{ assert_ok, parameter_types, traits::{ - GenesisBuild, KeyOwnerProofSystem, ProcessMessage, ProcessMessageError, ValidatorSet, + GenesisBuild, ProcessMessage, ProcessMessageError, ValidatorSet, ValidatorSetWithIdentification, }, weights::{Weight, WeightMeter}, - parameter_types, - traits::{GenesisBuild, ValidatorSet, ValidatorSetWithIdentification}, - weights::Weight, }; use frame_support_test::TestRandomness; use parity_scale_codec::Decode; @@ -153,21 +150,9 @@ impl pallet_babe::Config for Test { // session module is the trigger type EpochChangeTrigger = pallet_babe::ExternalTrigger; type DisabledValidators = (); - type KeyOwnerProof = >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type KeyOwnerProofSystem = (); - type HandleEquivocation = (); type WeightInfo = (); type MaxAuthorities = MaxAuthorities; - type KeyOwnerProof = sp_core::Void; - type EquivocationReportSystem = (); } From b989dd0df09a102071916d3033786cc655ecd535 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 16 Mar 2023 20:27:39 +0100 Subject: [PATCH 107/182] Fix doc Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/paras/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/parachains/src/paras/mod.rs b/runtime/parachains/src/paras/mod.rs index a8dbdc8fecb9..131edffbc38c 100644 --- a/runtime/parachains/src/paras/mod.rs +++ b/runtime/parachains/src/paras/mod.rs @@ -2023,7 +2023,7 @@ impl Pallet { } } - /// Returns whether the given ID refers to a para that is onboarding. + /// Returns whether the given ID refers to a para that is offboarding. /// /// An invalid or non-offboarding para ID will return `false`. pub fn is_offboarding(id: ParaId) -> bool { From 638058bbac203497dd5882eee885c5dd36894f22 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 12:35:53 +0100 Subject: [PATCH 108/182] Emit event after the fact Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index af63c31bcd6b..2d580a7f011f 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -1031,9 +1031,10 @@ impl Pallet { return Weight::zero() } - Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); T::MessageQueue::enqueue_messages(messages.into_iter(), AggregateMessageOrigin::Ump(para)); - ::WeightInfo::receive_upward_messages(count) + let weight = ::WeightInfo::receive_upward_messages(count); + Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); + weight } /// Cleans up all paras pending availability that the predicate returns true for. From 34a41b1975c37eb3bf895efd110c98cc33a130f1 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 12:45:00 +0100 Subject: [PATCH 109/182] Add defensive_proof to receive_upward_messages Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 2d580a7f011f..b19a42adf1f3 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -1013,10 +1013,18 @@ impl Pallet { } /// Enqueues `upward_messages` from a `para`'s accepted candidate block. + /// + /// This function is infallible since the candidate was already accepted and we therefore need + /// to deal with the messages as given. Messages that are too long will be ignored since such + /// candidates should have already been rejected in [`Self::check_upward_messages`]. pub(crate) fn receive_upward_messages(para: ParaId, upward_messages: &[Vec]) -> Weight { let bounded = upward_messages .iter() - .filter_map(|d| BoundedSlice::try_from(&d[..]).ok()) + .filter_map(|d| { + BoundedSlice::try_from(&d[..]) + .defensive_proof("Too long inbound upward message in accepted candidate.") + .ok() + }) .collect(); Self::receive_bounded_upward_messages(para, bounded) } From 076126f9c78c9a759682f9ce006ee42a1a4b98c6 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 11 Nov 2022 17:18:26 +0100 Subject: [PATCH 110/182] Reapply "Remove original UMP files" Looks like they came back from the dead. Re-apply commit 34b8a40aa Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/ump/benchmarking.rs | 137 -------- runtime/parachains/src/ump/tests.rs | 362 --------------------- 2 files changed, 499 deletions(-) delete mode 100644 runtime/parachains/src/ump/benchmarking.rs delete mode 100644 runtime/parachains/src/ump/tests.rs diff --git a/runtime/parachains/src/ump/benchmarking.rs b/runtime/parachains/src/ump/benchmarking.rs deleted file mode 100644 index 22860d2abbfc..000000000000 --- a/runtime/parachains/src/ump/benchmarking.rs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -use super::{Pallet as Ump, *}; -use frame_system::RawOrigin; -use xcm::prelude::*; - -fn assert_last_event_type(generic_event: ::RuntimeEvent) { - let events = frame_system::Pallet::::events(); - let system_event: ::RuntimeEvent = generic_event.into(); - // compare to the last event record - let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; - assert_eq!(sp_std::mem::discriminant(event), sp_std::mem::discriminant(&system_event)); -} - -fn queue_upward_msg( - host_conf: &HostConfiguration, - para: ParaId, - msg: UpwardMessage, -) { - let len = msg.len() as u32; - let msgs: UpwardMessages = vec![msg].try_into().unwrap(); - Ump::::check_upward_messages(host_conf, para, &msgs).unwrap(); - let _ = Ump::::receive_upward_messages(para, msgs); - assert_last_event_type::(Event::UpwardMessagesReceived(para, 1, len).into()); -} - -// Create a message with at least `size` bytes encoded length -fn create_message_min_size(size: u32) -> Vec { - // Create a message with an empty remark call to determine the encoding overhead - let msg_size_empty_transact = VersionedXcm::::from(Xcm::(vec![Transact { - origin_kind: OriginKind::SovereignAccount, - require_weight_at_most: Weight::MAX, - call: frame_system::Call::::remark_with_event { remark: vec![] }.encode().into(), - }])) - .encode() - .len(); - - // Create a message with a remark call of just the size required to make the whole encoded message the requested size - let size = size.saturating_sub(msg_size_empty_transact as u32) as usize; - let mut remark = Vec::new(); - remark.resize(size, 0u8); - let msg = VersionedXcm::::from(Xcm::(vec![Transact { - origin_kind: OriginKind::SovereignAccount, - require_weight_at_most: Weight::MAX, - call: frame_system::Call::::remark_with_event { remark }.encode().into(), - }])) - .encode(); - - assert!(msg.len() >= size); - msg -} - -fn create_message_overweight() -> Vec { - // We use a `set_code` Call because it - let call = frame_system::Call::::set_code { code: vec![] }; - VersionedXcm::::from(Xcm::(vec![Transact { - origin_kind: OriginKind::Superuser, - require_weight_at_most: Weight::MAX / 2, - call: call.encode().into(), - }])) - .encode() -} - -frame_benchmarking::benchmarks! { - // NOTE: We are overestimating slightly here. - // The benchmark is timing this whole function with different message sizes and a NOOP extrinsic to - // measure the size-dependent weight. But as we use the weight function **in** the benchmarked function we - // are taking call and control-flow overhead into account twice. - process_upward_message { - let s in 0..MAX_UPWARD_MESSAGE_SIZE_BOUND; - let para = ParaId::from(1978); - let data = create_message_min_size::(s); - }: { - assert!(T::UmpSink::process_upward_message(para, &data[..], Weight::MAX).is_ok()); - } - - clean_ump_after_outgoing { - // max number of queued messages. - let count = configuration::ActiveConfig::::get().max_upward_queue_count; - let host_conf = configuration::ActiveConfig::::get(); - let msg = create_message_min_size::(0); - // Start with the block number 1. This is needed because should an event be - // emitted during the genesis block they will be implicitly wiped. - frame_system::Pallet::::set_block_number(1u32.into()); - // fill the queue, each message has it's own para-id. - for id in 0..count { - queue_upward_msg::(&host_conf, ParaId::from(id), msg.clone()); - } - }: { - Ump::::clean_ump_after_outgoing(&ParaId::from(0)); - } - - service_overweight { - let host_conf = configuration::ActiveConfig::::get(); - let para = ParaId::from(1978); - // The message's weight does not really matter here, as we add service_overweight's - // max_weight parameter to the extrinsic's weight in the weight calculation. - // The size of the message influences decoding time, so we create a min-sized message here - // and take the decoding weight into account by adding it to the extrinsic execution weight - // in the process_upward_message function. - let msg = create_message_overweight::(); - - // This just makes sure that 0 is not a valid index and we can use it later on. - let _ = Ump::::service_overweight(RawOrigin::Root.into(), 0, Weight::from_parts(1000, 1000)); - // Start with the block number 1. This is needed because should an event be - // emitted during the genesis block they will be implicitly wiped. - frame_system::Pallet::::set_block_number(1u32.into()); - queue_upward_msg::(&host_conf, para, msg.clone()); - Ump::::process_pending_upward_messages(); - assert_last_event_type::( - Event::OverweightEnqueued(para, upward_message_id(&msg), 0, Weight::zero()).into() - ); - }: _(RawOrigin::Root, 0, Weight::MAX) - verify { - assert_last_event_type::(Event::OverweightServiced(0, Weight::zero()).into()); - } -} - -frame_benchmarking::impl_benchmark_test_suite!( - Ump, - crate::mock::new_test_ext(crate::ump::tests::GenesisConfigBuilder::default().build()), - crate::mock::Test -); diff --git a/runtime/parachains/src/ump/tests.rs b/runtime/parachains/src/ump/tests.rs deleted file mode 100644 index 60cc02ff0ff7..000000000000 --- a/runtime/parachains/src/ump/tests.rs +++ /dev/null @@ -1,362 +0,0 @@ -// Copyright 2020 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 super::*; -use crate::mock::{ - assert_last_event, new_test_ext, take_processed, Configuration, MockGenesisConfig, - RuntimeOrigin, System, Test, Ump, -}; -use frame_support::{assert_noop, assert_ok, weights::Weight}; -use std::collections::HashSet; - -pub(super) struct GenesisConfigBuilder { - max_upward_message_size: u32, - max_upward_message_num_per_candidate: u32, - max_upward_queue_count: u32, - max_upward_queue_size: u32, - ump_service_total_weight: Weight, - ump_max_individual_weight: Weight, -} - -impl Default for GenesisConfigBuilder { - fn default() -> Self { - Self { - max_upward_message_size: 32, - max_upward_message_num_per_candidate: 2, - max_upward_queue_count: 4, - max_upward_queue_size: 64, - ump_service_total_weight: Weight::from_parts(1000, 1000), - ump_max_individual_weight: Weight::from_parts(100, 100), - } - } -} - -impl GenesisConfigBuilder { - pub(super) fn build(self) -> crate::mock::MockGenesisConfig { - let mut genesis = default_genesis_config(); - let config = &mut genesis.configuration.config; - - config.max_upward_message_size = self.max_upward_message_size; - config.max_upward_message_num_per_candidate = self.max_upward_message_num_per_candidate; - config.max_upward_queue_count = self.max_upward_queue_count; - config.max_upward_queue_size = self.max_upward_queue_size; - config.ump_service_total_weight = self.ump_service_total_weight; - config.ump_max_individual_weight = self.ump_max_individual_weight; - genesis - } -} - -fn default_genesis_config() -> MockGenesisConfig { - MockGenesisConfig { - configuration: crate::configuration::GenesisConfig { - config: crate::configuration::HostConfiguration { - max_downward_message_size: 1024, - ..Default::default() - }, - }, - ..Default::default() - } -} - -fn queue_upward_msg(para: ParaId, msg: UpwardMessage) { - let msgs: UpwardMessages = vec![msg].try_into().unwrap(); - assert!(Ump::check_upward_messages(&Configuration::config(), para, &msgs).is_ok()); - let _ = Ump::receive_upward_messages(para, msgs); -} - -fn assert_storage_consistency_exhaustive() { - // check that empty queues don't clutter the storage. - for (_para, queue) in RelayDispatchQueues::::iter() { - assert!(!queue.is_empty()); - } - - // actually count the counts and sizes in queues and compare them to the bookkept version. - for (para, queue) in RelayDispatchQueues::::iter() { - let (expected_count, expected_size) = RelayDispatchQueueSize::::get(para); - let (actual_count, actual_size) = queue - .into_iter() - .fold((0, 0), |(acc_count, acc_size), x| (acc_count + 1, acc_size + x.len() as u32)); - - assert_eq!(expected_count, actual_count); - assert_eq!(expected_size, actual_size); - } - - // since we wipe the empty queues the sets of paras in queue contents, queue sizes and - // need dispatch set should all be equal. - let queue_contents_set = - RelayDispatchQueues::::iter().map(|(k, _)| k).collect::>(); - let queue_sizes_set = RelayDispatchQueueSize::::iter() - .map(|(k, _)| k) - .collect::>(); - let needs_dispatch_set = NeedsDispatch::::get().into_iter().collect::>(); - assert_eq!(queue_contents_set, queue_sizes_set); - assert_eq!(queue_contents_set, needs_dispatch_set); - - // `NextDispatchRoundStartWith` should point into a para that is tracked. - if let Some(para) = NextDispatchRoundStartWith::::get() { - assert!(queue_contents_set.contains(¶)); - } - - // `NeedsDispatch` is always sorted. - assert!(NeedsDispatch::::get().windows(2).all(|xs| xs[0] <= xs[1])); -} - -#[test] -fn dispatch_empty() { - new_test_ext(default_genesis_config()).execute_with(|| { - assert_storage_consistency_exhaustive(); - - // make sure that the case with empty queues is handled properly - Ump::process_pending_upward_messages(); - - assert_storage_consistency_exhaustive(); - }); -} - -#[test] -fn dispatch_single_message() { - let a = ParaId::from(228); - let msg = 1000u32.encode(); - - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - queue_upward_msg(a, msg.clone()); - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(a, msg)]); - - assert_storage_consistency_exhaustive(); - }); -} - -#[test] -fn dispatch_resume_after_exceeding_dispatch_stage_weight() { - let a = ParaId::from(128); - let c = ParaId::from(228); - let q = ParaId::from(911); - - let a_msg_1 = (200u32, "a_msg_1").encode(); - let a_msg_2 = (100u32, "a_msg_2").encode(); - let c_msg_1 = (300u32, "c_msg_1").encode(); - let c_msg_2 = (100u32, "c_msg_2").encode(); - let q_msg = (500u32, "q_msg").encode(); - - new_test_ext( - GenesisConfigBuilder { - ump_service_total_weight: Weight::from_parts(500, 500), - ..Default::default() - } - .build(), - ) - .execute_with(|| { - queue_upward_msg(q, q_msg.clone()); - queue_upward_msg(c, c_msg_1.clone()); - queue_upward_msg(a, a_msg_1.clone()); - queue_upward_msg(a, a_msg_2.clone()); - - assert_storage_consistency_exhaustive(); - - // we expect only two first messages to fit in the first iteration. - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(a, a_msg_1), (c, c_msg_1)]); - assert_storage_consistency_exhaustive(); - - queue_upward_msg(c, c_msg_2.clone()); - assert_storage_consistency_exhaustive(); - - // second iteration should process the second message. - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(q, q_msg)]); - assert_storage_consistency_exhaustive(); - - // 3rd iteration. - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(a, a_msg_2), (c, c_msg_2)]); - assert_storage_consistency_exhaustive(); - - // finally, make sure that the queue is empty. - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![]); - assert_storage_consistency_exhaustive(); - }); -} - -#[test] -fn dispatch_keeps_message_after_weight_exhausted() { - let a = ParaId::from(128); - - let a_msg_1 = (300u32, "a_msg_1").encode(); - let a_msg_2 = (300u32, "a_msg_2").encode(); - - new_test_ext( - GenesisConfigBuilder { - ump_service_total_weight: Weight::from_parts(500, 500), - ump_max_individual_weight: Weight::from_parts(300, 300), - ..Default::default() - } - .build(), - ) - .execute_with(|| { - queue_upward_msg(a, a_msg_1.clone()); - queue_upward_msg(a, a_msg_2.clone()); - - assert_storage_consistency_exhaustive(); - - // we expect only one message to fit in the first iteration. - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(a, a_msg_1)]); - assert_storage_consistency_exhaustive(); - - // second iteration should process the remaining message. - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(a, a_msg_2)]); - assert_storage_consistency_exhaustive(); - - // finally, make sure that the queue is empty. - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![]); - assert_storage_consistency_exhaustive(); - }); -} - -#[test] -fn dispatch_correctly_handle_remove_of_latest() { - let a = ParaId::from(1991); - let b = ParaId::from(1999); - - let a_msg_1 = (300u32, "a_msg_1").encode(); - let a_msg_2 = (300u32, "a_msg_2").encode(); - let b_msg_1 = (300u32, "b_msg_1").encode(); - - new_test_ext( - GenesisConfigBuilder { - ump_service_total_weight: Weight::from_parts(900, 900), - ..Default::default() - } - .build(), - ) - .execute_with(|| { - // We want to test here an edge case, where we remove the queue with the highest - // para id (i.e. last in the `needs_dispatch` order). - // - // If the last entry was removed we should proceed execution, assuming we still have - // weight available. - - queue_upward_msg(a, a_msg_1.clone()); - queue_upward_msg(a, a_msg_2.clone()); - queue_upward_msg(b, b_msg_1.clone()); - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(a, a_msg_1), (b, b_msg_1), (a, a_msg_2)]); - }); -} - -#[test] -fn verify_relay_dispatch_queue_size_is_externally_accessible() { - // Make sure that the relay dispatch queue size storage entry is accessible via well known - // keys and is decodable into a (u32, u32). - - use parity_scale_codec::Decode as _; - use primitives::well_known_keys; - - let a = ParaId::from(228); - let msg = vec![1, 2, 3]; - - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - queue_upward_msg(a, msg); - - let raw_queue_size = sp_io::storage::get(&well_known_keys::relay_dispatch_queue_size(a)) - .expect( - "enqueing a message should create the dispatch queue\ - and it should be accessible via the well known keys", - ); - let (cnt, size) = <(u32, u32)>::decode(&mut &raw_queue_size[..]) - .expect("the dispatch queue size should be decodable into (u32, u32)"); - - assert_eq!(cnt, 1); - assert_eq!(size, 3); - }); -} - -#[test] -fn service_overweight_unknown() { - // This test just makes sure that 0 is not a valid index and we can use it not worrying in - // the next test. - new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { - assert_noop!( - Ump::service_overweight(RuntimeOrigin::root(), 0, Weight::from_parts(1000, 1000)), - Error::::UnknownMessageIndex - ); - }); -} - -#[test] -fn overweight_queue_works() { - let para_a = ParaId::from(2021); - - let a_msg_1 = (301u32, "a_msg_1").encode(); - let a_msg_2 = (500u32, "a_msg_2").encode(); - let a_msg_3 = (500u32, "a_msg_3").encode(); - - new_test_ext( - GenesisConfigBuilder { - ump_service_total_weight: Weight::from_parts(900, 900), - ump_max_individual_weight: Weight::from_parts(300, 300), - ..Default::default() - } - .build(), - ) - .execute_with(|| { - // HACK: Start with the block number 1. This is needed because should an event be - // emitted during the genesis block they will be implicitly wiped. - System::set_block_number(1); - - // This one is overweight. However, the weight is plenty and we can afford to execute - // this message, thus expect it. - queue_upward_msg(para_a, a_msg_1.clone()); - Ump::process_pending_upward_messages(); - assert_eq!(take_processed(), vec![(para_a, a_msg_1)]); - - // This is overweight and this message cannot fit into the total weight budget. - queue_upward_msg(para_a, a_msg_2.clone()); - queue_upward_msg(para_a, a_msg_3.clone()); - Ump::process_pending_upward_messages(); - assert_last_event( - Event::OverweightEnqueued( - para_a, - upward_message_id(&a_msg_3[..]), - 0, - Weight::from_parts(500, 500), - ) - .into(), - ); - - // Now verify that if we wanted to service this overweight message with less than enough - // weight it will fail. - assert_noop!( - Ump::service_overweight(RuntimeOrigin::root(), 0, Weight::from_parts(499, 499)), - Error::::WeightOverLimit - ); - - // ... and if we try to service it with just enough weight it will succeed as well. - assert_ok!(Ump::service_overweight(RuntimeOrigin::root(), 0, Weight::from_parts(500, 500))); - assert_last_event(Event::OverweightServiced(0, Weight::from_parts(500, 500)).into()); - - // ... and if we try to service a message with index that doesn't exist it will error - // out. - assert_noop!( - Ump::service_overweight(RuntimeOrigin::root(), 1, Weight::from_parts(1000, 1000)), - Error::::UnknownMessageIndex - ); - }); -} From cf1fd7745848112d3bac926b328aeeacc767b6cc Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 12:46:36 +0100 Subject: [PATCH 111/182] Remove old files Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/ump/migration.rs | 49 ------------------------- 1 file changed, 49 deletions(-) delete mode 100644 runtime/parachains/src/ump/migration.rs diff --git a/runtime/parachains/src/ump/migration.rs b/runtime/parachains/src/ump/migration.rs deleted file mode 100644 index 666d224b4b06..000000000000 --- a/runtime/parachains/src/ump/migration.rs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2022 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -use crate::ump::{Config, Overweight, Pallet}; -use frame_support::{ - pallet_prelude::*, - traits::{OnRuntimeUpgrade, StorageVersion}, - weights::Weight, -}; - -pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); - -pub mod v1 { - use super::*; - - pub struct MigrateToV1(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateToV1 { - fn on_runtime_upgrade() -> Weight { - if StorageVersion::get::>() == 0 { - let mut weight = T::DbWeight::get().reads(1); - - let overweight_messages = Overweight::::initialize_counter() as u64; - log::info!("Initialized Overweight to {}", overweight_messages); - - weight.saturating_accrue(T::DbWeight::get().reads_writes(overweight_messages, 1)); - - StorageVersion::new(1).put::>(); - - weight.saturating_add(T::DbWeight::get().writes(1)) - } else { - log::warn!("skipping v1, should be removed"); - T::DbWeight::get().reads(1) - } - } - } -} From 01ca8ddf49034ac1ff51e11ee810feb0eb64ad3f Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 13:19:07 +0100 Subject: [PATCH 112/182] Rename MaxUmpMessageLen -> MaxUmpMessageLenOf Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index b19a42adf1f3..368009df6150 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -246,7 +246,7 @@ impl From for AggregateMessageOrigin { } /// The maximal length of a UMP message. -pub type MaxUmpMessageLen = +pub type MaxUmpMessageLenOf = <::MessageQueue as EnqueueMessage>::MaxMessageLen; #[frame_support::pallet] @@ -1032,7 +1032,7 @@ impl Pallet { /// Enqueues storage-bounded `upward_messages` from a `para`'s accepted candidate block. pub(crate) fn receive_bounded_upward_messages( para: ParaId, - messages: Vec>>, + messages: Vec>>, ) -> Weight { let count = messages.len() as u32; if count == 0 { From ed652a0fa5c7fdf1304c2b7595d29c70d4ce8953 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 13:19:21 +0100 Subject: [PATCH 113/182] Test defensive message dropping of receive_upward_messages Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/ump_tests.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 5f9fc1b744ac..032facc363fb 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -103,6 +103,7 @@ mod check_upward_messages { data.as_bytes().to_vec() } + /// Check that these messages *could* be queued. fn check(para: ParaId, msgs: Vec, err: Option) { assert_eq!( ParaInclusion::check_upward_messages(&Configuration::config(), para, &msgs[..]).err(), @@ -110,6 +111,7 @@ mod check_upward_messages { ); } + /// Enqueue these upward messages. fn queue(para: ParaId, msgs: Vec) { msgs.into_iter().for_each(|msg| super::queue_upward_msg(para, msg)); } @@ -314,6 +316,25 @@ fn dispatch_correctly_handle_remove_of_latest() { }); } +#[test] +#[cfg_attr(debug_assertions, should_panic = "Defensive failure has been triggered")] +fn queue_enact_too_long_ignored() { + const P_0: ParaId = ParaId::new(0u32); + + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + let max_enact = crate::inclusion::MaxUmpMessageLenOf::::get() as usize; + let m1 = (300u32, "a_msg_1").encode(); + let m2 = vec![0u8; max_enact + 1]; + let m3 = (300u32, "a_msg_3").encode(); + + // .. but the enact defensively ignores. + ParaInclusion::receive_upward_messages(P_0, &[m1.clone(), m2.clone(), m3.clone()]); + // There is one message in the queue now: + MessageQueue::service_queues(Weight::from_parts(900, 900)); + assert_eq!(Processed::take(), vec![(P_0, m1), (P_0, m3)]); + }); +} + #[test] fn verify_relay_dispatch_queue_size_is_externally_accessible() { // Make sure that the relay dispatch queue size storage entry is accessible via well known From c5db77022ce105973f2d56c9d43fcafbbcafde3a Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 13:31:32 +0100 Subject: [PATCH 114/182] Fixup imports Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 7bafc2662b56..ac366c503683 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -39,7 +39,8 @@ use primitives::{ supermajority_threshold, well_known_keys, AvailabilityBitfield, BackedCandidate, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateReceipt, CommittedCandidateReceipt, CoreIndex, GroupIndex, Hash, HeadData, Id as ParaId, SigningContext, - UncheckedSignedAvailabilityBitfields, ValidatorId, ValidatorIndex, ValidityAttestation, + UncheckedSignedAvailabilityBitfields, UpwardMessage, ValidatorId, ValidatorIndex, + ValidityAttestation, }; use scale_info::TypeInfo; use sp_runtime::{traits::One, DispatchError, SaturatedConversion, Saturating}; From 0d41cb46ba7e60d5976d3b52f93c5867ee04be02 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 14:05:09 +0100 Subject: [PATCH 115/182] Update implementors guide Signed-off-by: Oliver Tale-Yazdi --- .../src/runtime/inclusion.md | 39 ++++++++++- roadmap/implementers-guide/src/runtime/ump.md | 69 ------------------- runtime/parachains/src/inclusion/mod.rs | 1 - 3 files changed, 36 insertions(+), 73 deletions(-) delete mode 100644 roadmap/implementers-guide/src/runtime/ump.md diff --git a/roadmap/implementers-guide/src/runtime/inclusion.md b/roadmap/implementers-guide/src/runtime/inclusion.md index 6df34ae4ddc1..3cdcaf89c96f 100644 --- a/roadmap/implementers-guide/src/runtime/inclusion.md +++ b/roadmap/implementers-guide/src/runtime/inclusion.md @@ -1,6 +1,6 @@ # Inclusion Module -The inclusion module is responsible for inclusion and availability of scheduled parachains and parathreads. +The inclusion module is responsible for inclusion and availability of scheduled parachains and parathreads. It also manages the UMP dispatch queue of each parachain/thread. ## Storage @@ -35,11 +35,27 @@ PendingAvailability: map ParaId => CandidatePendingAvailability; PendingAvailabilityCommitments: map ParaId => CandidateCommitments; ``` +## Config Dependencies + +* `MessageQueue`: + The message queue provides general queueing and processing functionality. Currently it + replaces the old `UMP` dispatch queue. Other use-cases can be implemented as well by + adding new variants to `AggregateMessageOrigin`. Normally it should be set to an instance + of the `MessageQueue` pallet. + ## Session Change 1. Clear out all candidates pending availability. 1. Clear out all validator bitfields. +Optional: +1. The UMP queue of all outgoing paras can be "swept". This would prevent the dispatch queue from automatically being serviced. It is a consideration for the chain and specific behaviour is not defined. + +## Initialization + +No initialization routine runs for this module. However, the initialization of the `MessageQueue` pallet will attempt to process any pending UMP messages. + + ## Routines All failed checks should lead to an unrecoverable error making the block invalid. @@ -88,7 +104,7 @@ All failed checks should lead to an unrecoverable error making the block invalid 1. Ensure that any code upgrade scheduled by the candidate does not happen within `config.validation_upgrade_cooldown` of `Paras::last_code_upgrade(para_id, true)`, if any, comparing against the value of `Paras::FutureCodeUpgrades` for the given para ID. 1. Check the collator's signature on the candidate data. 1. check the backing of the candidate using the signatures and the bitfields, comparing against the validators assigned to the groups, fetched with the `group_validators` lookup. - 1. call `Ump::check_upward_messages(para, commitments.upward_messages)` to check that the upward messages are valid. + 1. call `check_upward_messages(config, para, commitments.upward_messages)` to check that the upward messages are valid. 1. call `Dmp::check_processed_downward_messages(para, commitments.processed_downward_messages)` to check that the DMQ is properly drained. 1. call `Hrmp::check_hrmp_watermark(para, commitments.hrmp_watermark)` for each candidate to check rules of processing the HRMP watermark. 1. using `Hrmp::check_outbound_hrmp(sender, commitments.horizontal_messages)` ensure that the each candidate sent a valid set of horizontal messages @@ -99,7 +115,7 @@ All failed checks should lead to an unrecoverable error making the block invalid 1. If the receipt contains a code upgrade, Call `Paras::schedule_code_upgrade(para_id, code, relay_parent_number, config)`. > TODO: Note that this is safe as long as we never enact candidates where the relay parent is across a session boundary. In that case, which we should be careful to avoid with contextual execution, the configuration might have changed and the para may de-sync from the host's understanding of it. 1. Reward all backing validators of each candidate, contained within the `backers` field. - 1. call `Ump::receive_upward_messages` for each backed candidate, using the [`UpwardMessage`s](../types/messages.md#upward-message) from the [`CandidateCommitments`](../types/candidate.md#candidate-commitments). + 1. call `receive_upward_messages` for each backed candidate, using the [`UpwardMessage`s](../types/messages.md#upward-message) from the [`CandidateCommitments`](../types/candidate.md#candidate-commitments). 1. call `Dmp::prune_dmq` with the para id of the candidate and the candidate's `processed_downward_messages`. 1. call `Hrmp::prune_hrmp` with the para id of the candiate and the candidate's `hrmp_watermark`. 1. call `Hrmp::queue_outbound_hrmp` with the para id of the candidate and the list of horizontal messages taken from the commitment, @@ -118,3 +134,20 @@ All failed checks should lead to an unrecoverable error making the block invalid * `candidate_pending_availability(ParaId) -> Option`: returns the `CommittedCandidateReceipt` pending availability for the para provided, if any. * `pending_availability(ParaId) -> Option`: returns the metadata around the candidate pending availability for the para, if any. * `collect_disputed(disputed: Vec) -> Vec`: Sweeps through all paras pending availability. If the candidate hash is one of the disputed candidates, then clean up the corresponding storage for that candidate and the commitments. Return a vector of cleaned-up core IDs. + +These functions were formerly part of the UMP pallet: + +* `check_upward_messages(P: ParaId, Vec)`: + 1. Checks that the parachain is not currently offboarding and error otherwise. + 1. Checks that there are at most `config.max_upward_message_num_per_candidate` messages to be enqueued. + 1. Checks that no message exceeds `config.max_upward_message_size`. + 1. Checks that the total resulting queue size would not exceed `co`. + 1. Verify that queuing up the messages could not result in exceeding the queue's footprint + according to the config items `config.max_upward_queue_count` and `config.max_upward_queue_size`. The queue's current footprint is provided in `well_known_keys` + in order to facilitate oraclisation on to the para. + +Candidate Enactment: + +* `receive_upward_messages(P: ParaId, Vec)`: + 1. Process each upward message `M` in order: + 1. Place in the dispatch queue according to its para ID (or handle it immediately). diff --git a/roadmap/implementers-guide/src/runtime/ump.md b/roadmap/implementers-guide/src/runtime/ump.md deleted file mode 100644 index 0d5109ec165a..000000000000 --- a/roadmap/implementers-guide/src/runtime/ump.md +++ /dev/null @@ -1,69 +0,0 @@ -# UMP Module - -A module responsible for Upward Message Passing (UMP). See [Messaging Overview](../messaging.md) for more details. - -## Storage - -Storage related to UMP - -```rust -/// The messages waiting to be handled by the relay-chain originating from a certain parachain. -/// -/// Note that some upward messages might have been already processed by the inclusion logic. E.g. -/// channel management messages. -/// -/// The messages are processed in FIFO order. -RelayDispatchQueues: map ParaId => Vec; -/// Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`. -/// -/// First item in the tuple is the count of messages and second -/// is the total length (in bytes) of the message payloads. -/// -/// Note that this is an auxilary mapping: it's possible to tell the byte size and the number of -/// messages only looking at `RelayDispatchQueues`. This mapping is separate to avoid the cost of -/// loading the whole message queue if only the total size and count are required. -/// -/// Invariant: -/// - The set of keys should exactly match the set of keys of `RelayDispatchQueues`. -RelayDispatchQueueSize: map ParaId => (u32, u32); // (num_messages, total_bytes) -/// The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry. -/// -/// Invariant: -/// - The set of items from this vector should be exactly the set of the keys in -/// `RelayDispatchQueues` and `RelayDispatchQueueSize`. -NeedsDispatch: Vec; -/// This is the para that gets dispatched first during the next upward dispatchable queue -/// execution round. -/// -/// Invariant: -/// - If `Some(para)`, then `para` must be present in `NeedsDispatch`. -NextDispatchRoundStartWith: Option; -``` - - -## Initialization - -No initialization routine runs for this module. - -## Routines - -Candidate Acceptance Function: - -* `check_upward_messages(P: ParaId, Vec`): - 1. Checks that there are at most `config.max_upward_message_num_per_candidate` messages. - 1. Checks that no message exceeds `config.max_upward_message_size`. - 1. Verify that queuing up the messages could not result in exceeding the queue's footprint - according to the config items. The queue's current footprint is provided in well_known_keys - in order to facilitate oraclisation on to the para. - -Candidate Enactment: - -* `receive_upward_messages(P: ParaId, Vec)`: - 1. Process each upward message `M` in order: - 1. Place in the dispatch queue according to its para ID (or handle it immediately). - -## Session Change - -1. Nothing specific needs to be done, however the channel's dispatch queue may possibly be "swept" -which would prevent the dispatch queue from automatically being serviced. This is a consideration -for the chain and specific behaviour is not defined. diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index ac366c503683..73efa464adf6 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -953,7 +953,6 @@ impl Pallet { /// Check that all the upward messages sent by a candidate pass the acceptance criteria. Returns /// false, if any of the messages doesn't pass. - // FAIL-CI: TODO update docs pub(crate) fn check_upward_messages( config: &HostConfiguration, para: ParaId, From ef9de05ccd11b591e617507f0403a2362947768c Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 14:05:20 +0100 Subject: [PATCH 116/182] Fix tests Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/mock.rs | 6 +++--- runtime/parachains/src/ump_tests.rs | 19 ++++++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 1adff7cce318..d342d58abd22 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -25,12 +25,12 @@ use crate::{ }; use frame_support::{ - parameter_types, + parameter_types, assert_ok, traits::{ - ConstU32, GenesisBuild, ProcessMessage, ProcessMessageError, ValidatorSet, + GenesisBuild, ProcessMessage, ProcessMessageError, ValidatorSet, ValidatorSetWithIdentification, }, - weights::Weight, + weights::{WeightMeter, Weight}, }; use frame_support_test::TestRandomness; use parity_scale_codec::Decode; diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 032facc363fb..ee7e684cccd2 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -151,17 +151,22 @@ mod check_upward_messages { new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { let _g = frame_support::StorageNoopGuard::default(); let max_size = Configuration::config().max_upward_message_size; + let max_per_candidate = Configuration::config().max_upward_message_num_per_candidate; - for msg_size in 0..max_size + 1 { + for msg_size in 0..=max_size { check(P_0, vec![vec![0; msg_size as usize]], None); } - // FAIL-CI: TODO test when the msg is not first for msg_size in max_size + 1..max_size + 10 { - check( - P_0, - vec![vec![0; msg_size as usize]], - Some(UmpAcceptanceCheckErr::MessageSize { idx: 0, msg_size, max_size }), - ); + for goods in 0..max_per_candidate { + let mut msgs = vec![vec![0; max_size as usize]; goods as usize]; + msgs.push(vec![0; msg_size as usize]); + + check( + P_0, + msgs, + Some(UmpAcceptanceCheckErr::MessageSize { idx: goods, msg_size, max_size }), + ); + } } }); } From b29f2ca62a5b830c505be02c649702a3dcd0611d Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 14:58:52 +0100 Subject: [PATCH 117/182] Remove FAIL-CI mark Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/ump_tests.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index ee7e684cccd2..ec33c3c39072 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -199,8 +199,12 @@ mod check_upward_messages { new_test_ext(GenesisConfigBuilder::large_queue_count().build()).execute_with(|| { let limit = Configuration::config().max_upward_queue_size as u64; assert_eq!(pallet_message_queue::ItemHeader::::max_encoded_len(), 5); + assert!( + Configuration::config().max_upward_queue_size < + crate::inclusion::MaxUmpMessageLenOf::::get(), + "Test will not work" + ); - // FAIL-CI: TODO why is the item header overhead not taken into account? for _ in 0..limit { check(P_0, vec![msg("1")], None); queue(P_0, vec![msg("1")]); From dd76bca5025b7e1ef846a9539c3607eed185f16a Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 14:59:04 +0100 Subject: [PATCH 118/182] Delete unused code Signed-off-by: Oliver Tale-Yazdi --- xcm/pallet-xcm-benchmarks/src/fungible/mock.rs | 7 ------- xcm/pallet-xcm-benchmarks/src/generic/mock.rs | 7 ------- 2 files changed, 14 deletions(-) diff --git a/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs b/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs index 56bbd913a010..8eb18ce6d6ff 100644 --- a/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs +++ b/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs @@ -27,7 +27,6 @@ use sp_core::H256; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, - BuildStorage, }; use xcm::latest::prelude::*; use xcm_builder::{AllowUnpaidExecutionFrom, MintLocation}; @@ -205,9 +204,3 @@ impl xcm_balances_benchmark::Config for Test { MultiAsset { id: Concrete(Here.into()), fun: Fungible(amount) } } } - -pub fn new_test_ext() -> sp_io::TestExternalities { - let t = GenesisConfig { ..Default::default() }.build_storage().unwrap(); - sp_tracing::try_init_simple(); - t.into() -} diff --git a/xcm/pallet-xcm-benchmarks/src/generic/mock.rs b/xcm/pallet-xcm-benchmarks/src/generic/mock.rs index 79f9f28e32f5..b2ab97c931a4 100644 --- a/xcm/pallet-xcm-benchmarks/src/generic/mock.rs +++ b/xcm/pallet-xcm-benchmarks/src/generic/mock.rs @@ -27,7 +27,6 @@ use sp_core::H256; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup, TrailingZeroInput}, - BuildStorage, }; use xcm_builder::{ test_utils::{ @@ -188,12 +187,6 @@ impl generic::Config for Test { } } -pub fn new_test_ext() -> sp_io::TestExternalities { - let t = GenesisConfig { ..Default::default() }.build_storage().unwrap(); - sp_tracing::try_init_simple(); - t.into() -} - pub struct AlwaysSignedByDefault(core::marker::PhantomData); impl ConvertOrigin for AlwaysSignedByDefault where From b559f6d484d60828b7fe24f8468c63ccf56b55b7 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 14:59:44 +0100 Subject: [PATCH 119/182] Add another test for MQ change hook Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/ump_tests.rs | 66 +++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index ec33c3c39072..125a81792ee6 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -27,7 +27,7 @@ use crate::{ use frame_support::{ assert_noop, assert_ok, pallet_prelude::*, - traits::{ExecuteOverweightError, ServiceQueues}, + traits::{EnqueueMessage, ExecuteOverweightError, ServiceQueues}, weights::Weight, }; use primitives::v4::{well_known_keys, Id as ParaId, UpwardMessage}; @@ -344,6 +344,66 @@ fn queue_enact_too_long_ignored() { }); } +/// Check that the Inclusion pallet correctly updates the well known keys in the MQ handler. +/// +/// Also checks that it works in the presence of overweight messages. +#[test] +fn relay_dispatch_queue_size_is_updated() { + new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { + let cfg = Configuration::config(); + + for p in 0..100 { + let para = p.into(); + // Do some tricks with the weight such that the MQ pallet will process in order: + // Q0:0, Q1:0 … Q0:1, Q1:1 … + let m1 = (300u32 * (100 - p), "m1").encode(); + let m2 = (300u32 * (100 - p), "m11").encode(); + + queue_upward_msg(para, m1); + queue_upward_msg(para, m2); + + assert_queue_size(para, 2, 15); + assert_queue_remaining( + para, + cfg.max_upward_queue_count - 2, + cfg.max_upward_queue_size - 15, + ); + + // Now processing one message should also update the queue size. + MessageQueue::service_queues(Weight::from_all(300u64 * (100 - p) as u64)); + assert_queue_remaining( + para, + cfg.max_upward_queue_count - 1, + cfg.max_upward_queue_size - 8, + ); + } + + // The messages of Q0…Q98 are overweight, so `service_queues` wont help. + for p in 0..98 { + MessageQueue::service_queues(Weight::from_all(u64::MAX)); + + let fp = MessageQueue::footprint(AggregateMessageOrigin::Ump(p.into())); + let (para_queue_count, para_queue_size) = (fp.count, fp.size); + assert_eq!(para_queue_count, 1, "count wrong for para: {}", p); + assert_eq!(para_queue_size, 8, "size wrong for para: {}", p); + } + // All queues are empty after processing overweight messages. + for p in 0..100 { + let para = p.into(); + let _ = ::execute_overweight( + Weight::from_all(u64::MAX), + (AggregateMessageOrigin::Ump(para), 0, 1), + ); + + assert_queue_remaining(para, cfg.max_upward_queue_count, cfg.max_upward_queue_size); + let fp = MessageQueue::footprint(AggregateMessageOrigin::Ump(p.into())); + let (para_queue_count, para_queue_size) = (fp.count, fp.size); + assert_eq!(para_queue_count, 0, "count wrong for para: {}", p); + assert_eq!(para_queue_size, 0, "size wrong for para: {}", p); + } + }); +} + #[test] fn verify_relay_dispatch_queue_size_is_externally_accessible() { // Make sure that the relay dispatch queue size storage entry is accessible via well known @@ -396,8 +456,8 @@ fn assert_queue_remaining(para: ParaId, count: u32, size: u32) { well_known_keys::relay_dispatch_queue_remaining_capacity(para) .get() .expect("No storage value"); - assert_eq!(count, remaining_cnt); - assert_eq!(size, remaining_size); + assert_eq!(remaining_cnt, count, "Wrong number of remaining messages in Q{}", para); + assert_eq!(remaining_size, size, "Wrong remaining size in Q{}", para); } #[test] From 62a299c619dab7663d3dd27f3aa3c2b1f6127c86 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 14:59:52 +0100 Subject: [PATCH 120/182] Imports Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 2 +- runtime/parachains/src/mock.rs | 4 ++-- runtime/parachains/src/ump_tests.rs | 4 ++-- runtime/polkadot/src/lib.rs | 1 - runtime/test-runtime/src/lib.rs | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 73efa464adf6..6a0bd5741cb9 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -73,7 +73,7 @@ impl WeightInfo for () { } } -/// Maximum value that `config.max_upward_message_size` can be set to +/// Maximum value that `config.max_upward_message_size` can be set to. /// /// This is used for benchmarking sanely bounding relevant storage items. It is expected from the `configuration` /// pallet to check these values before setting. diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index d342d58abd22..b4a5128a8a60 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -25,12 +25,12 @@ use crate::{ }; use frame_support::{ - parameter_types, assert_ok, + assert_ok, parameter_types, traits::{ GenesisBuild, ProcessMessage, ProcessMessageError, ValidatorSet, ValidatorSetWithIdentification, }, - weights::{WeightMeter, Weight}, + weights::{Weight, WeightMeter}, }; use frame_support_test::TestRandomness; use parity_scale_codec::Decode; diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 125a81792ee6..e919456e3d58 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -16,8 +16,8 @@ use crate::{ inclusion::{ - tests::run_to_block_default_notifications as run_to_block, AggregateMessageOrigin::Ump, - UmpAcceptanceCheckErr, + tests::run_to_block_default_notifications as run_to_block, AggregateMessageOrigin, + AggregateMessageOrigin::Ump, UmpAcceptanceCheckErr, }, mock::{ assert_last_event, assert_last_events, new_test_ext, Configuration, MessageQueue, diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 48b1920ada65..e75564f3a48a 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1154,7 +1154,6 @@ impl pallet_message_queue::Config for Runtime { #[cfg(feature = "runtime-benchmarks")] type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; - // FAIL-CI add test for this type QueueChangeHandler = ParaInclusion; type WeightInfo = weights::pallet_message_queue::WeightInfo; } diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 83dce4aee121..bf6485729d4a 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -476,7 +476,7 @@ impl parachains_inclusion::Config for Runtime { type DisputesHandler = ParasDisputes; type RewardValidators = RewardValidatorsWithEraPoints; type MessageQueue = (); - type WeightInfo = (); // FAIL-CI todo + type WeightInfo = (); } impl parachains_disputes::Config for Runtime { From 7d240adfd5e79feb9a7b9655a3bbc4b5c5d77ae5 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 15:10:26 +0100 Subject: [PATCH 121/182] Keep Kusama runtime formatting Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index ace79f2b718c..345c9c014229 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1552,9 +1552,9 @@ mod benches { [runtime_parachains::configuration, Configuration] [runtime_parachains::hrmp, Hrmp] [runtime_parachains::disputes, ParasDisputes] + [runtime_parachains::disputes::slashing, ParasSlashing] [runtime_parachains::inclusion, ParaInclusion] [runtime_parachains::initializer, Initializer] - [runtime_parachains::disputes::slashing, ParasSlashing] [runtime_parachains::paras_inherent, ParaInherent] [runtime_parachains::paras, Paras] // Substrate From 7c62e42d3b6ae51625d7506fc0484058b069979a Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 15:34:48 +0100 Subject: [PATCH 122/182] Revert "Delete unused code" This reverts commit dd76bca5025b7e1ef846a9539c3607eed185f16a. --- xcm/pallet-xcm-benchmarks/src/fungible/mock.rs | 7 +++++++ xcm/pallet-xcm-benchmarks/src/generic/mock.rs | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs b/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs index 8eb18ce6d6ff..56bbd913a010 100644 --- a/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs +++ b/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs @@ -27,6 +27,7 @@ use sp_core::H256; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use xcm::latest::prelude::*; use xcm_builder::{AllowUnpaidExecutionFrom, MintLocation}; @@ -204,3 +205,9 @@ impl xcm_balances_benchmark::Config for Test { MultiAsset { id: Concrete(Here.into()), fun: Fungible(amount) } } } + +pub fn new_test_ext() -> sp_io::TestExternalities { + let t = GenesisConfig { ..Default::default() }.build_storage().unwrap(); + sp_tracing::try_init_simple(); + t.into() +} diff --git a/xcm/pallet-xcm-benchmarks/src/generic/mock.rs b/xcm/pallet-xcm-benchmarks/src/generic/mock.rs index b2ab97c931a4..79f9f28e32f5 100644 --- a/xcm/pallet-xcm-benchmarks/src/generic/mock.rs +++ b/xcm/pallet-xcm-benchmarks/src/generic/mock.rs @@ -27,6 +27,7 @@ use sp_core::H256; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup, TrailingZeroInput}, + BuildStorage, }; use xcm_builder::{ test_utils::{ @@ -187,6 +188,12 @@ impl generic::Config for Test { } } +pub fn new_test_ext() -> sp_io::TestExternalities { + let t = GenesisConfig { ..Default::default() }.build_storage().unwrap(); + sp_tracing::try_init_simple(); + t.into() +} + pub struct AlwaysSignedByDefault(core::marker::PhantomData); impl ConvertOrigin for AlwaysSignedByDefault where From 1b45cb86d7b4ac837089928cb2ab1a74813f8550 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 15:44:57 +0100 Subject: [PATCH 123/182] Feature gate mock functions Signed-off-by: Oliver Tale-Yazdi --- xcm/pallet-xcm-benchmarks/src/fungible/mock.rs | 3 ++- xcm/pallet-xcm-benchmarks/src/generic/mock.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs b/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs index 56bbd913a010..f225a9c47c0d 100644 --- a/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs +++ b/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs @@ -27,7 +27,6 @@ use sp_core::H256; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, - BuildStorage, }; use xcm::latest::prelude::*; use xcm_builder::{AllowUnpaidExecutionFrom, MintLocation}; @@ -206,7 +205,9 @@ impl xcm_balances_benchmark::Config for Test { } } +#[cfg(feature = "runtime-benchmarks")] pub fn new_test_ext() -> sp_io::TestExternalities { + use sp_runtime::BuildStorage; let t = GenesisConfig { ..Default::default() }.build_storage().unwrap(); sp_tracing::try_init_simple(); t.into() diff --git a/xcm/pallet-xcm-benchmarks/src/generic/mock.rs b/xcm/pallet-xcm-benchmarks/src/generic/mock.rs index 79f9f28e32f5..333816d24b46 100644 --- a/xcm/pallet-xcm-benchmarks/src/generic/mock.rs +++ b/xcm/pallet-xcm-benchmarks/src/generic/mock.rs @@ -27,7 +27,6 @@ use sp_core::H256; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup, TrailingZeroInput}, - BuildStorage, }; use xcm_builder::{ test_utils::{ @@ -188,7 +187,9 @@ impl generic::Config for Test { } } +#[cfg(feature = "runtime-benchmarks")] pub fn new_test_ext() -> sp_io::TestExternalities { + use sp_runtime::BuildStorage; let t = GenesisConfig { ..Default::default() }.build_storage().unwrap(); sp_tracing::try_init_simple(); t.into() From 90b463aadccefc01e92a27384406c1330a979163 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 22 Mar 2023 15:47:10 +0100 Subject: [PATCH 124/182] Review: Use saturating_add Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 6a0bd5741cb9..3eb9f63cf94e 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -974,10 +974,8 @@ impl Pallet { let fp = T::MessageQueue::footprint(AggregateMessageOrigin::Ump(para)); let (para_queue_count, mut para_queue_size) = (fp.count, fp.size); - if para_queue_count - .checked_add(additional_msgs as u64) - .map(|new| new > config.max_upward_queue_count as u64) - .unwrap_or(true) + if para_queue_count.saturating_add(additional_msgs as u64) > + config.max_upward_queue_count as u64 { return Err(UmpAcceptanceCheckErr::CapacityExceeded { count: para_queue_count.saturating_add(additional_msgs as u64), @@ -996,10 +994,7 @@ impl Pallet { } // make sure that the queue is not overfilled. // we do it here only once since returning false invalidates the whole relay-chain block. - if para_queue_size - .checked_add(msg_size as u64) - .map(|new| new > config.max_upward_queue_size as u64) - .unwrap_or(true) + if para_queue_size.saturating_add(msg_size as u64) > config.max_upward_queue_size as u64 { return Err(UmpAcceptanceCheckErr::TotalSizeExceeded { total_size: para_queue_size.saturating_add(msg_size as u64), From 1a964af3833fe6b84f1f67b3c11a16c9c87488ee Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 5 Apr 2023 13:02:02 +0200 Subject: [PATCH 125/182] Test RelayDispatchQueueSize storage key Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/ump_tests.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index e919456e3d58..2216a8806ba3 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -31,6 +31,7 @@ use frame_support::{ weights::Weight, }; use primitives::v4::{well_known_keys, Id as ParaId, UpwardMessage}; +use sp_core::twox_64; use sp_runtime::traits::{Bounded, Hash}; use sp_std::prelude::*; @@ -404,6 +405,25 @@ fn relay_dispatch_queue_size_is_updated() { }); } +/// Assert that the old and the new way of accessing `relay_dispatch_queue_size` is the same. +#[test] +fn relay_dispatch_queue_size_key_is_correct() { + #![allow(deprecated)] + // Storage alias to the old way of accessing the queue size. + #[frame_support::storage_alias] + type RelayDispatchQueueSize = StorageMap; + + for i in 0..1024 { + // A "random" para id. + let para: ParaId = u32::from_ne_bytes(twox_64(&i.encode())[..4].try_into().unwrap()).into(); + + let well_known = primitives::well_known_keys::relay_dispatch_queue_size(para); + let aliased = RelayDispatchQueueSize::hashed_key_for(para); + + assert_eq!(well_known, aliased, "Old and new key must match"); + } +} + #[test] fn verify_relay_dispatch_queue_size_is_externally_accessible() { // Make sure that the relay dispatch queue size storage entry is accessible via well known From 2da269d6ede6415ddacd7273f2fa49d3e005c1d6 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 6 Apr 2023 18:13:52 +0200 Subject: [PATCH 126/182] Move migration to own file to avoid merge conflicts Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration.rs | 2 - .../parachains/src/configuration/migration.rs | 368 ------------------ 2 files changed, 370 deletions(-) delete mode 100644 runtime/parachains/src/configuration/migration.rs diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index 46444ca5d6a6..5b17b589bc70 100644 --- a/runtime/parachains/src/configuration.rs +++ b/runtime/parachains/src/configuration.rs @@ -35,8 +35,6 @@ mod benchmarking; pub use pallet::*; -pub mod migration; - const LOG_TARGET: &str = "runtime::configuration"; /// All configuration of the runtime with respect to parachains and parathreads. diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs deleted file mode 100644 index 8861f918c221..000000000000 --- a/runtime/parachains/src/configuration/migration.rs +++ /dev/null @@ -1,368 +0,0 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -//! A module that is responsible for migration of storage. - -use crate::configuration::{self, ActiveConfig, Config, Pallet, LOG_TARGET}; -use frame_support::{pallet_prelude::*, traits::StorageVersion, weights::Weight}; -use frame_system::pallet_prelude::BlockNumberFor; - -pub use v5::MigrateV4ToV5; - -/// The current storage version. -/// -/// v0-v1: -/// v1-v2: -/// v2-v3: (remove weights) -/// v3-v4: (remove spam slots) -/// v4-v5: (remove UMP dispatch queue) -pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(5); - -pub mod v5 { - use super::*; - use frame_support::traits::OnRuntimeUpgrade; - use primitives::{Balance, SessionIndex}; - #[cfg(feature = "try-runtime")] - use sp_std::prelude::*; - - #[derive(parity_scale_codec::Encode, parity_scale_codec::Decode, Debug)] - pub struct V4HostConfiguration { - pub max_code_size: u32, - pub max_head_data_size: u32, - pub max_upward_queue_count: u32, - pub max_upward_queue_size: u32, - pub max_upward_message_size: u32, - pub max_upward_message_num_per_candidate: u32, - pub hrmp_max_message_num_per_candidate: u32, - pub validation_upgrade_cooldown: BlockNumber, - pub validation_upgrade_delay: BlockNumber, - pub max_pov_size: u32, - pub max_downward_message_size: u32, - pub ump_service_total_weight: Weight, - pub hrmp_max_parachain_outbound_channels: u32, - pub hrmp_max_parathread_outbound_channels: u32, - pub hrmp_sender_deposit: Balance, - pub hrmp_recipient_deposit: Balance, - pub hrmp_channel_max_capacity: u32, - pub hrmp_channel_max_total_size: u32, - pub hrmp_max_parachain_inbound_channels: u32, - pub hrmp_max_parathread_inbound_channels: u32, - pub hrmp_channel_max_message_size: u32, - pub code_retention_period: BlockNumber, - pub parathread_cores: u32, - pub parathread_retries: u32, - pub group_rotation_frequency: BlockNumber, - pub chain_availability_period: BlockNumber, - pub thread_availability_period: BlockNumber, - pub scheduling_lookahead: u32, - pub max_validators_per_core: Option, - pub max_validators: Option, - pub dispute_period: SessionIndex, - pub dispute_post_conclusion_acceptance_period: BlockNumber, - pub dispute_conclusion_by_time_out_period: BlockNumber, - pub no_show_slots: u32, - pub n_delay_tranches: u32, - pub zeroth_delay_tranche_width: u32, - pub needed_approvals: u32, - pub relay_vrf_modulo_samples: u32, - pub ump_max_individual_weight: Weight, - pub pvf_checking_enabled: bool, - pub pvf_voting_ttl: SessionIndex, - pub minimum_validation_upgrade_delay: BlockNumber, - } - - impl> Default for V4HostConfiguration { - fn default() -> Self { - Self { - group_rotation_frequency: 1u32.into(), - chain_availability_period: 1u32.into(), - thread_availability_period: 1u32.into(), - no_show_slots: 1u32.into(), - validation_upgrade_cooldown: Default::default(), - validation_upgrade_delay: Default::default(), - code_retention_period: Default::default(), - max_code_size: Default::default(), - max_pov_size: Default::default(), - max_head_data_size: Default::default(), - parathread_cores: Default::default(), - parathread_retries: Default::default(), - scheduling_lookahead: Default::default(), - max_validators_per_core: Default::default(), - max_validators: None, - dispute_period: 6, - dispute_post_conclusion_acceptance_period: 100.into(), - dispute_conclusion_by_time_out_period: 200.into(), - n_delay_tranches: Default::default(), - zeroth_delay_tranche_width: Default::default(), - needed_approvals: Default::default(), - relay_vrf_modulo_samples: Default::default(), - max_upward_queue_count: Default::default(), - max_upward_queue_size: Default::default(), - max_downward_message_size: Default::default(), - ump_service_total_weight: Weight::zero(), - max_upward_message_size: Default::default(), - max_upward_message_num_per_candidate: Default::default(), - hrmp_sender_deposit: Default::default(), - hrmp_recipient_deposit: Default::default(), - hrmp_channel_max_capacity: Default::default(), - hrmp_channel_max_total_size: Default::default(), - hrmp_max_parachain_inbound_channels: Default::default(), - hrmp_max_parathread_inbound_channels: Default::default(), - hrmp_channel_max_message_size: Default::default(), - hrmp_max_parachain_outbound_channels: Default::default(), - hrmp_max_parathread_outbound_channels: Default::default(), - hrmp_max_message_num_per_candidate: Default::default(), - ump_max_individual_weight: Weight::zero(), - pvf_checking_enabled: false, - pvf_voting_ttl: 2u32.into(), - minimum_validation_upgrade_delay: 2.into(), - } - } - } - - pub struct MigrateV4ToV5(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateV4ToV5 { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - ensure!(StorageVersion::get::>() == 4, "The migration requires version 4"); - log::trace!(target: LOG_TARGET, "Going to upgraded parachain config..."); - - Ok(Vec::new()) - } - - fn on_runtime_upgrade() -> Weight { - if StorageVersion::get::>() == 4 { - let weight_consumed = migrate_v4_to_v5::(); - - log::info!(target: LOG_TARGET, "MigrateV4ToV5 executed successfully"); - STORAGE_VERSION.put::>(); - - weight_consumed - } else { - log::warn!(target: LOG_TARGET, "MigrateV4ToV5 should be removed."); - T::DbWeight::get().reads(1) - } - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), &'static str> { - log::trace!(target: LOG_TARGET, "Running post_upgrade()"); - ensure!( - StorageVersion::get::>() == 5, - "Storage version should be 5 after the migration" - ); - - Ok(()) - } - } -} - -fn migrate_v4_to_v5() -> Weight { - // Unusual formatting is justified: - // - make it easier to verify that fields assign what they supposed to assign. - // - this code is transient and will be removed after all migrations are done. - // - this code is important enough to optimize for legibility sacrificing consistency. - #[rustfmt::skip] - let translate = - |pre: v5::V4HostConfiguration>| -> -configuration::HostConfiguration> - { - super::HostConfiguration { -max_code_size : pre.max_code_size, -max_head_data_size : pre.max_head_data_size, -max_upward_queue_count : pre.max_upward_queue_count, -max_upward_queue_size : pre.max_upward_queue_size, -max_upward_message_size : pre.max_upward_message_size, -max_upward_message_num_per_candidate : pre.max_upward_message_num_per_candidate, -hrmp_max_message_num_per_candidate : pre.hrmp_max_message_num_per_candidate, -validation_upgrade_cooldown : pre.validation_upgrade_cooldown, -validation_upgrade_delay : pre.validation_upgrade_delay, -max_pov_size : pre.max_pov_size, -max_downward_message_size : pre.max_downward_message_size, -hrmp_max_parachain_outbound_channels : pre.hrmp_max_parachain_outbound_channels, -hrmp_max_parathread_outbound_channels : pre.hrmp_max_parathread_outbound_channels, -hrmp_sender_deposit : pre.hrmp_sender_deposit, -hrmp_recipient_deposit : pre.hrmp_recipient_deposit, -hrmp_channel_max_capacity : pre.hrmp_channel_max_capacity, -hrmp_channel_max_total_size : pre.hrmp_channel_max_total_size, -hrmp_max_parachain_inbound_channels : pre.hrmp_max_parachain_inbound_channels, -hrmp_max_parathread_inbound_channels : pre.hrmp_max_parathread_inbound_channels, -hrmp_channel_max_message_size : pre.hrmp_channel_max_message_size, -code_retention_period : pre.code_retention_period, -parathread_cores : pre.parathread_cores, -parathread_retries : pre.parathread_retries, -group_rotation_frequency : pre.group_rotation_frequency, -chain_availability_period : pre.chain_availability_period, -thread_availability_period : pre.thread_availability_period, -scheduling_lookahead : pre.scheduling_lookahead, -max_validators_per_core : pre.max_validators_per_core, -max_validators : pre.max_validators, -dispute_period : pre.dispute_period, -dispute_post_conclusion_acceptance_period: pre.dispute_post_conclusion_acceptance_period, -dispute_conclusion_by_time_out_period : pre.dispute_conclusion_by_time_out_period, -no_show_slots : pre.no_show_slots, -n_delay_tranches : pre.n_delay_tranches, -zeroth_delay_tranche_width : pre.zeroth_delay_tranche_width, -needed_approvals : pre.needed_approvals, -relay_vrf_modulo_samples : pre.relay_vrf_modulo_samples, -pvf_checking_enabled : pre.pvf_checking_enabled, -pvf_voting_ttl : pre.pvf_voting_ttl, -minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, - } - }; - - if let Err(err) = ActiveConfig::::translate(|pre| pre.map(translate)) { - // `Err` is returned when the pre-migration type cannot be deserialized. This - // cannot happen if the migration runs correctly, i.e. against the expected version. - // - // This happening almost surely will lead to a panic somewhere else. Corruption seems - // to be unlikely to be caused by this. So we just log. Maybe it'll work out still? - log::error!(target: LOG_TARGET, "Could not translate ActiveConfig object: {:?}", err); - } - - T::DbWeight::get().reads_writes(1, 1) -} - -#[cfg(test)] -mod tests { - use frame_support::weights::constants::{WEIGHT_PROOF_SIZE_PER_MB, WEIGHT_REF_TIME_PER_MILLIS}; - - use super::*; - use crate::mock::{new_test_ext, Test}; - use frame_support::traits::OnRuntimeUpgrade; - - /// The old V4 config can be decoded from actual on-chain data. - #[test] - fn v4_deserialized_from_actual_data() { - // Example how to get new `raw_config`: - // We'll obtain the raw_config for block - // 16,832,711 (0x2e3d78b87f0811f18a8b8469596aa7d8c9ef10d622b90d647f10ceebee3e380c) on Kusama. - // Steps: - // 1. Go to Polkadot.js -> Developer -> Chain state -> Storage: https://polkadot.js.org/apps/#/chainstate - // 2. Set these parameters: - // 2.1. selected state query: configuration; activeConfig(): PolkadotRuntimeParachainsConfigurationHostConfiguration - // 2.2. blockhash to query at from above. - // 2.3. Note the value of encoded storage key -> 0x06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385 for the referenced block. - // 2.4. You'll also need the decoded values to update the test. - // 3. Go to Polkadot.js -> Developer -> Chain state -> Raw storage - // 3.1 Enter the encoded storage key and you get the raw config. - - // Fetched at Kusama 16,832,711 (0x2e3d78b87f0811f18a8b8469596aa7d8c9ef10d622b90d647f10ceebee3e380c) - // - // This exceeds the maximal line width length, but that's fine, since this is not code and - // doesn't need to be read and also leaving it as one line allows to easily copy it. - let raw_config = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c800000700e8764817020040011e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c80000000600000058020000580200000200000059000000000000001e000000280000000700c817a80402004001010200000014000000"]; - - let v4 = v5::V4HostConfiguration::::decode(&mut &raw_config[..]) - .unwrap(); - - // We check only a sample of the values here. If we missed any fields or messed up data types - // that would skew all the fields coming after. - assert_eq!(v4.max_code_size, 10_485_760); - assert_eq!(v4.validation_upgrade_cooldown, 3600); - assert_eq!(v4.max_pov_size, 5_242_880); - assert_eq!(v4.hrmp_channel_max_message_size, 102_400); - assert_eq!(v4.n_delay_tranches, 89); - assert_eq!( - v4.ump_max_individual_weight, - Weight::from_parts(20 * WEIGHT_REF_TIME_PER_MILLIS, 5 * WEIGHT_PROOF_SIZE_PER_MB) - ); - assert_eq!(v4.minimum_validation_upgrade_delay, 20); - } - - #[test] - fn test_migrate_v4_to_v5() { - // Host configuration has lots of fields. However, in this migration we add only a couple of - // fields. The most important part to check are a couple of the last fields. We also pick - // extra fields to check arbitrarily, e.g. depending on their position (i.e. the middle) and - // also their type. - // - // We specify only the picked fields and the rest should be provided by the `Default` - // implementation. That implementation is copied over between the two types and should work - // fine. - let v4 = v5::V4HostConfiguration:: { - ump_max_individual_weight: Weight::from_parts(0x71616e6f6e0au64, 0x71616e6f6e0au64), - needed_approvals: 69, - thread_availability_period: 55, - hrmp_recipient_deposit: 1337, - max_pov_size: 1111, - chain_availability_period: 33, - minimum_validation_upgrade_delay: 20, - ..Default::default() - }; - - new_test_ext(Default::default()).execute_with(|| { - // Implant the v4 version in the state. - frame_support::storage::unhashed::put_raw( - &configuration::ActiveConfig::::hashed_key(), - &v4.encode(), - ); - StorageVersion::new(4).put::>(); - - #[cfg(feature = "try-runtime")] - MigrateV4ToV5::::pre_upgrade().unwrap(); - let _weight = MigrateV4ToV5::::on_runtime_upgrade(); - #[cfg(feature = "try-runtime")] - MigrateV4ToV5::::post_upgrade(vec![]).unwrap(); - - let v5 = configuration::ActiveConfig::::get(); - - #[rustfmt::skip] - { - assert_eq!(v4.max_code_size , v5.max_code_size); - assert_eq!(v4.max_head_data_size , v5.max_head_data_size); - assert_eq!(v4.max_upward_queue_count , v5.max_upward_queue_count); - assert_eq!(v4.max_upward_queue_size , v5.max_upward_queue_size); - assert_eq!(v4.max_upward_message_size , v5.max_upward_message_size); - assert_eq!(v4.max_upward_message_num_per_candidate , v5.max_upward_message_num_per_candidate); - assert_eq!(v4.hrmp_max_message_num_per_candidate , v5.hrmp_max_message_num_per_candidate); - assert_eq!(v4.validation_upgrade_cooldown , v5.validation_upgrade_cooldown); - assert_eq!(v4.validation_upgrade_delay , v5.validation_upgrade_delay); - assert_eq!(v4.max_pov_size , v5.max_pov_size); - assert_eq!(v4.max_downward_message_size , v5.max_downward_message_size); - assert_eq!(v4.hrmp_max_parachain_outbound_channels , v5.hrmp_max_parachain_outbound_channels); - assert_eq!(v4.hrmp_max_parathread_outbound_channels , v5.hrmp_max_parathread_outbound_channels); - assert_eq!(v4.hrmp_sender_deposit , v5.hrmp_sender_deposit); - assert_eq!(v4.hrmp_recipient_deposit , v5.hrmp_recipient_deposit); - assert_eq!(v4.hrmp_channel_max_capacity , v5.hrmp_channel_max_capacity); - assert_eq!(v4.hrmp_channel_max_total_size , v5.hrmp_channel_max_total_size); - assert_eq!(v4.hrmp_max_parachain_inbound_channels , v5.hrmp_max_parachain_inbound_channels); - assert_eq!(v4.hrmp_max_parathread_inbound_channels , v5.hrmp_max_parathread_inbound_channels); - assert_eq!(v4.hrmp_channel_max_message_size , v5.hrmp_channel_max_message_size); - assert_eq!(v4.code_retention_period , v5.code_retention_period); - assert_eq!(v4.parathread_cores , v5.parathread_cores); - assert_eq!(v4.parathread_retries , v5.parathread_retries); - assert_eq!(v4.group_rotation_frequency , v5.group_rotation_frequency); - assert_eq!(v4.chain_availability_period , v5.chain_availability_period); - assert_eq!(v4.thread_availability_period , v5.thread_availability_period); - assert_eq!(v4.scheduling_lookahead , v5.scheduling_lookahead); - assert_eq!(v4.max_validators_per_core , v5.max_validators_per_core); - assert_eq!(v4.max_validators , v5.max_validators); - assert_eq!(v4.dispute_period , v5.dispute_period); - assert_eq!(v4.dispute_post_conclusion_acceptance_period, v5.dispute_post_conclusion_acceptance_period); - assert_eq!(v4.dispute_conclusion_by_time_out_period , v5.dispute_conclusion_by_time_out_period); - assert_eq!(v4.no_show_slots , v5.no_show_slots); - assert_eq!(v4.n_delay_tranches , v5.n_delay_tranches); - assert_eq!(v4.zeroth_delay_tranche_width , v5.zeroth_delay_tranche_width); - assert_eq!(v4.needed_approvals , v5.needed_approvals); - assert_eq!(v4.relay_vrf_modulo_samples , v5.relay_vrf_modulo_samples); - assert_eq!(v4.pvf_checking_enabled , v5.pvf_checking_enabled); - assert_eq!(v4.pvf_voting_ttl , v5.pvf_voting_ttl); - assert_eq!(v4.minimum_validation_upgrade_delay , v5.minimum_validation_upgrade_delay); - }; // ; makes this a statement. `rustfmt::skip` cannot be put on an expression. - }); - } -} From 89a3b7486d85a40e7158d58e06248a36cb13d99b Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 6 Apr 2023 18:16:46 +0200 Subject: [PATCH 127/182] Migration in own file Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration.rs | 3 + .../src/configuration/migration_ump.rs | 368 ++++++++++++++++++ 2 files changed, 371 insertions(+) create mode 100644 runtime/parachains/src/configuration/migration_ump.rs diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index 942bedd4381e..fabb46592b6a 100644 --- a/runtime/parachains/src/configuration.rs +++ b/runtime/parachains/src/configuration.rs @@ -36,6 +36,9 @@ mod tests; #[cfg(feature = "runtime-benchmarks")] mod benchmarking; +pub mod migration; +pub mod migration_ump; + pub use pallet::*; const LOG_TARGET: &str = "runtime::configuration"; diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs new file mode 100644 index 000000000000..8861f918c221 --- /dev/null +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -0,0 +1,368 @@ +// Copyright 2021 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! A module that is responsible for migration of storage. + +use crate::configuration::{self, ActiveConfig, Config, Pallet, LOG_TARGET}; +use frame_support::{pallet_prelude::*, traits::StorageVersion, weights::Weight}; +use frame_system::pallet_prelude::BlockNumberFor; + +pub use v5::MigrateV4ToV5; + +/// The current storage version. +/// +/// v0-v1: +/// v1-v2: +/// v2-v3: (remove weights) +/// v3-v4: (remove spam slots) +/// v4-v5: (remove UMP dispatch queue) +pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(5); + +pub mod v5 { + use super::*; + use frame_support::traits::OnRuntimeUpgrade; + use primitives::{Balance, SessionIndex}; + #[cfg(feature = "try-runtime")] + use sp_std::prelude::*; + + #[derive(parity_scale_codec::Encode, parity_scale_codec::Decode, Debug)] + pub struct V4HostConfiguration { + pub max_code_size: u32, + pub max_head_data_size: u32, + pub max_upward_queue_count: u32, + pub max_upward_queue_size: u32, + pub max_upward_message_size: u32, + pub max_upward_message_num_per_candidate: u32, + pub hrmp_max_message_num_per_candidate: u32, + pub validation_upgrade_cooldown: BlockNumber, + pub validation_upgrade_delay: BlockNumber, + pub max_pov_size: u32, + pub max_downward_message_size: u32, + pub ump_service_total_weight: Weight, + pub hrmp_max_parachain_outbound_channels: u32, + pub hrmp_max_parathread_outbound_channels: u32, + pub hrmp_sender_deposit: Balance, + pub hrmp_recipient_deposit: Balance, + pub hrmp_channel_max_capacity: u32, + pub hrmp_channel_max_total_size: u32, + pub hrmp_max_parachain_inbound_channels: u32, + pub hrmp_max_parathread_inbound_channels: u32, + pub hrmp_channel_max_message_size: u32, + pub code_retention_period: BlockNumber, + pub parathread_cores: u32, + pub parathread_retries: u32, + pub group_rotation_frequency: BlockNumber, + pub chain_availability_period: BlockNumber, + pub thread_availability_period: BlockNumber, + pub scheduling_lookahead: u32, + pub max_validators_per_core: Option, + pub max_validators: Option, + pub dispute_period: SessionIndex, + pub dispute_post_conclusion_acceptance_period: BlockNumber, + pub dispute_conclusion_by_time_out_period: BlockNumber, + pub no_show_slots: u32, + pub n_delay_tranches: u32, + pub zeroth_delay_tranche_width: u32, + pub needed_approvals: u32, + pub relay_vrf_modulo_samples: u32, + pub ump_max_individual_weight: Weight, + pub pvf_checking_enabled: bool, + pub pvf_voting_ttl: SessionIndex, + pub minimum_validation_upgrade_delay: BlockNumber, + } + + impl> Default for V4HostConfiguration { + fn default() -> Self { + Self { + group_rotation_frequency: 1u32.into(), + chain_availability_period: 1u32.into(), + thread_availability_period: 1u32.into(), + no_show_slots: 1u32.into(), + validation_upgrade_cooldown: Default::default(), + validation_upgrade_delay: Default::default(), + code_retention_period: Default::default(), + max_code_size: Default::default(), + max_pov_size: Default::default(), + max_head_data_size: Default::default(), + parathread_cores: Default::default(), + parathread_retries: Default::default(), + scheduling_lookahead: Default::default(), + max_validators_per_core: Default::default(), + max_validators: None, + dispute_period: 6, + dispute_post_conclusion_acceptance_period: 100.into(), + dispute_conclusion_by_time_out_period: 200.into(), + n_delay_tranches: Default::default(), + zeroth_delay_tranche_width: Default::default(), + needed_approvals: Default::default(), + relay_vrf_modulo_samples: Default::default(), + max_upward_queue_count: Default::default(), + max_upward_queue_size: Default::default(), + max_downward_message_size: Default::default(), + ump_service_total_weight: Weight::zero(), + max_upward_message_size: Default::default(), + max_upward_message_num_per_candidate: Default::default(), + hrmp_sender_deposit: Default::default(), + hrmp_recipient_deposit: Default::default(), + hrmp_channel_max_capacity: Default::default(), + hrmp_channel_max_total_size: Default::default(), + hrmp_max_parachain_inbound_channels: Default::default(), + hrmp_max_parathread_inbound_channels: Default::default(), + hrmp_channel_max_message_size: Default::default(), + hrmp_max_parachain_outbound_channels: Default::default(), + hrmp_max_parathread_outbound_channels: Default::default(), + hrmp_max_message_num_per_candidate: Default::default(), + ump_max_individual_weight: Weight::zero(), + pvf_checking_enabled: false, + pvf_voting_ttl: 2u32.into(), + minimum_validation_upgrade_delay: 2.into(), + } + } + } + + pub struct MigrateV4ToV5(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for MigrateV4ToV5 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, &'static str> { + ensure!(StorageVersion::get::>() == 4, "The migration requires version 4"); + log::trace!(target: LOG_TARGET, "Going to upgraded parachain config..."); + + Ok(Vec::new()) + } + + fn on_runtime_upgrade() -> Weight { + if StorageVersion::get::>() == 4 { + let weight_consumed = migrate_v4_to_v5::(); + + log::info!(target: LOG_TARGET, "MigrateV4ToV5 executed successfully"); + STORAGE_VERSION.put::>(); + + weight_consumed + } else { + log::warn!(target: LOG_TARGET, "MigrateV4ToV5 should be removed."); + T::DbWeight::get().reads(1) + } + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { + log::trace!(target: LOG_TARGET, "Running post_upgrade()"); + ensure!( + StorageVersion::get::>() == 5, + "Storage version should be 5 after the migration" + ); + + Ok(()) + } + } +} + +fn migrate_v4_to_v5() -> Weight { + // Unusual formatting is justified: + // - make it easier to verify that fields assign what they supposed to assign. + // - this code is transient and will be removed after all migrations are done. + // - this code is important enough to optimize for legibility sacrificing consistency. + #[rustfmt::skip] + let translate = + |pre: v5::V4HostConfiguration>| -> +configuration::HostConfiguration> + { + super::HostConfiguration { +max_code_size : pre.max_code_size, +max_head_data_size : pre.max_head_data_size, +max_upward_queue_count : pre.max_upward_queue_count, +max_upward_queue_size : pre.max_upward_queue_size, +max_upward_message_size : pre.max_upward_message_size, +max_upward_message_num_per_candidate : pre.max_upward_message_num_per_candidate, +hrmp_max_message_num_per_candidate : pre.hrmp_max_message_num_per_candidate, +validation_upgrade_cooldown : pre.validation_upgrade_cooldown, +validation_upgrade_delay : pre.validation_upgrade_delay, +max_pov_size : pre.max_pov_size, +max_downward_message_size : pre.max_downward_message_size, +hrmp_max_parachain_outbound_channels : pre.hrmp_max_parachain_outbound_channels, +hrmp_max_parathread_outbound_channels : pre.hrmp_max_parathread_outbound_channels, +hrmp_sender_deposit : pre.hrmp_sender_deposit, +hrmp_recipient_deposit : pre.hrmp_recipient_deposit, +hrmp_channel_max_capacity : pre.hrmp_channel_max_capacity, +hrmp_channel_max_total_size : pre.hrmp_channel_max_total_size, +hrmp_max_parachain_inbound_channels : pre.hrmp_max_parachain_inbound_channels, +hrmp_max_parathread_inbound_channels : pre.hrmp_max_parathread_inbound_channels, +hrmp_channel_max_message_size : pre.hrmp_channel_max_message_size, +code_retention_period : pre.code_retention_period, +parathread_cores : pre.parathread_cores, +parathread_retries : pre.parathread_retries, +group_rotation_frequency : pre.group_rotation_frequency, +chain_availability_period : pre.chain_availability_period, +thread_availability_period : pre.thread_availability_period, +scheduling_lookahead : pre.scheduling_lookahead, +max_validators_per_core : pre.max_validators_per_core, +max_validators : pre.max_validators, +dispute_period : pre.dispute_period, +dispute_post_conclusion_acceptance_period: pre.dispute_post_conclusion_acceptance_period, +dispute_conclusion_by_time_out_period : pre.dispute_conclusion_by_time_out_period, +no_show_slots : pre.no_show_slots, +n_delay_tranches : pre.n_delay_tranches, +zeroth_delay_tranche_width : pre.zeroth_delay_tranche_width, +needed_approvals : pre.needed_approvals, +relay_vrf_modulo_samples : pre.relay_vrf_modulo_samples, +pvf_checking_enabled : pre.pvf_checking_enabled, +pvf_voting_ttl : pre.pvf_voting_ttl, +minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, + } + }; + + if let Err(err) = ActiveConfig::::translate(|pre| pre.map(translate)) { + // `Err` is returned when the pre-migration type cannot be deserialized. This + // cannot happen if the migration runs correctly, i.e. against the expected version. + // + // This happening almost surely will lead to a panic somewhere else. Corruption seems + // to be unlikely to be caused by this. So we just log. Maybe it'll work out still? + log::error!(target: LOG_TARGET, "Could not translate ActiveConfig object: {:?}", err); + } + + T::DbWeight::get().reads_writes(1, 1) +} + +#[cfg(test)] +mod tests { + use frame_support::weights::constants::{WEIGHT_PROOF_SIZE_PER_MB, WEIGHT_REF_TIME_PER_MILLIS}; + + use super::*; + use crate::mock::{new_test_ext, Test}; + use frame_support::traits::OnRuntimeUpgrade; + + /// The old V4 config can be decoded from actual on-chain data. + #[test] + fn v4_deserialized_from_actual_data() { + // Example how to get new `raw_config`: + // We'll obtain the raw_config for block + // 16,832,711 (0x2e3d78b87f0811f18a8b8469596aa7d8c9ef10d622b90d647f10ceebee3e380c) on Kusama. + // Steps: + // 1. Go to Polkadot.js -> Developer -> Chain state -> Storage: https://polkadot.js.org/apps/#/chainstate + // 2. Set these parameters: + // 2.1. selected state query: configuration; activeConfig(): PolkadotRuntimeParachainsConfigurationHostConfiguration + // 2.2. blockhash to query at from above. + // 2.3. Note the value of encoded storage key -> 0x06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385 for the referenced block. + // 2.4. You'll also need the decoded values to update the test. + // 3. Go to Polkadot.js -> Developer -> Chain state -> Raw storage + // 3.1 Enter the encoded storage key and you get the raw config. + + // Fetched at Kusama 16,832,711 (0x2e3d78b87f0811f18a8b8469596aa7d8c9ef10d622b90d647f10ceebee3e380c) + // + // This exceeds the maximal line width length, but that's fine, since this is not code and + // doesn't need to be read and also leaving it as one line allows to easily copy it. + let raw_config = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c800000700e8764817020040011e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c80000000600000058020000580200000200000059000000000000001e000000280000000700c817a80402004001010200000014000000"]; + + let v4 = v5::V4HostConfiguration::::decode(&mut &raw_config[..]) + .unwrap(); + + // We check only a sample of the values here. If we missed any fields or messed up data types + // that would skew all the fields coming after. + assert_eq!(v4.max_code_size, 10_485_760); + assert_eq!(v4.validation_upgrade_cooldown, 3600); + assert_eq!(v4.max_pov_size, 5_242_880); + assert_eq!(v4.hrmp_channel_max_message_size, 102_400); + assert_eq!(v4.n_delay_tranches, 89); + assert_eq!( + v4.ump_max_individual_weight, + Weight::from_parts(20 * WEIGHT_REF_TIME_PER_MILLIS, 5 * WEIGHT_PROOF_SIZE_PER_MB) + ); + assert_eq!(v4.minimum_validation_upgrade_delay, 20); + } + + #[test] + fn test_migrate_v4_to_v5() { + // Host configuration has lots of fields. However, in this migration we add only a couple of + // fields. The most important part to check are a couple of the last fields. We also pick + // extra fields to check arbitrarily, e.g. depending on their position (i.e. the middle) and + // also their type. + // + // We specify only the picked fields and the rest should be provided by the `Default` + // implementation. That implementation is copied over between the two types and should work + // fine. + let v4 = v5::V4HostConfiguration:: { + ump_max_individual_weight: Weight::from_parts(0x71616e6f6e0au64, 0x71616e6f6e0au64), + needed_approvals: 69, + thread_availability_period: 55, + hrmp_recipient_deposit: 1337, + max_pov_size: 1111, + chain_availability_period: 33, + minimum_validation_upgrade_delay: 20, + ..Default::default() + }; + + new_test_ext(Default::default()).execute_with(|| { + // Implant the v4 version in the state. + frame_support::storage::unhashed::put_raw( + &configuration::ActiveConfig::::hashed_key(), + &v4.encode(), + ); + StorageVersion::new(4).put::>(); + + #[cfg(feature = "try-runtime")] + MigrateV4ToV5::::pre_upgrade().unwrap(); + let _weight = MigrateV4ToV5::::on_runtime_upgrade(); + #[cfg(feature = "try-runtime")] + MigrateV4ToV5::::post_upgrade(vec![]).unwrap(); + + let v5 = configuration::ActiveConfig::::get(); + + #[rustfmt::skip] + { + assert_eq!(v4.max_code_size , v5.max_code_size); + assert_eq!(v4.max_head_data_size , v5.max_head_data_size); + assert_eq!(v4.max_upward_queue_count , v5.max_upward_queue_count); + assert_eq!(v4.max_upward_queue_size , v5.max_upward_queue_size); + assert_eq!(v4.max_upward_message_size , v5.max_upward_message_size); + assert_eq!(v4.max_upward_message_num_per_candidate , v5.max_upward_message_num_per_candidate); + assert_eq!(v4.hrmp_max_message_num_per_candidate , v5.hrmp_max_message_num_per_candidate); + assert_eq!(v4.validation_upgrade_cooldown , v5.validation_upgrade_cooldown); + assert_eq!(v4.validation_upgrade_delay , v5.validation_upgrade_delay); + assert_eq!(v4.max_pov_size , v5.max_pov_size); + assert_eq!(v4.max_downward_message_size , v5.max_downward_message_size); + assert_eq!(v4.hrmp_max_parachain_outbound_channels , v5.hrmp_max_parachain_outbound_channels); + assert_eq!(v4.hrmp_max_parathread_outbound_channels , v5.hrmp_max_parathread_outbound_channels); + assert_eq!(v4.hrmp_sender_deposit , v5.hrmp_sender_deposit); + assert_eq!(v4.hrmp_recipient_deposit , v5.hrmp_recipient_deposit); + assert_eq!(v4.hrmp_channel_max_capacity , v5.hrmp_channel_max_capacity); + assert_eq!(v4.hrmp_channel_max_total_size , v5.hrmp_channel_max_total_size); + assert_eq!(v4.hrmp_max_parachain_inbound_channels , v5.hrmp_max_parachain_inbound_channels); + assert_eq!(v4.hrmp_max_parathread_inbound_channels , v5.hrmp_max_parathread_inbound_channels); + assert_eq!(v4.hrmp_channel_max_message_size , v5.hrmp_channel_max_message_size); + assert_eq!(v4.code_retention_period , v5.code_retention_period); + assert_eq!(v4.parathread_cores , v5.parathread_cores); + assert_eq!(v4.parathread_retries , v5.parathread_retries); + assert_eq!(v4.group_rotation_frequency , v5.group_rotation_frequency); + assert_eq!(v4.chain_availability_period , v5.chain_availability_period); + assert_eq!(v4.thread_availability_period , v5.thread_availability_period); + assert_eq!(v4.scheduling_lookahead , v5.scheduling_lookahead); + assert_eq!(v4.max_validators_per_core , v5.max_validators_per_core); + assert_eq!(v4.max_validators , v5.max_validators); + assert_eq!(v4.dispute_period , v5.dispute_period); + assert_eq!(v4.dispute_post_conclusion_acceptance_period, v5.dispute_post_conclusion_acceptance_period); + assert_eq!(v4.dispute_conclusion_by_time_out_period , v5.dispute_conclusion_by_time_out_period); + assert_eq!(v4.no_show_slots , v5.no_show_slots); + assert_eq!(v4.n_delay_tranches , v5.n_delay_tranches); + assert_eq!(v4.zeroth_delay_tranche_width , v5.zeroth_delay_tranche_width); + assert_eq!(v4.needed_approvals , v5.needed_approvals); + assert_eq!(v4.relay_vrf_modulo_samples , v5.relay_vrf_modulo_samples); + assert_eq!(v4.pvf_checking_enabled , v5.pvf_checking_enabled); + assert_eq!(v4.pvf_voting_ttl , v5.pvf_voting_ttl); + assert_eq!(v4.minimum_validation_upgrade_delay , v5.minimum_validation_upgrade_delay); + }; // ; makes this a statement. `rustfmt::skip` cannot be put on an expression. + }); + } +} From 099e2f0d10d1329d32c1ed5f9da8f15f434520b6 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 11 Apr 2023 14:51:31 +0200 Subject: [PATCH 128/182] Fixup migration Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration/migration.rs | 4 ---- runtime/parachains/src/configuration/migration_ump.rs | 6 ++++-- runtime/rococo/src/lib.rs | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs index fae8fe31fbf1..07d61d4b3316 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -197,7 +197,6 @@ validation_upgrade_cooldown : pre.validation_upgrade_cooldown, validation_upgrade_delay : pre.validation_upgrade_delay, max_pov_size : pre.max_pov_size, max_downward_message_size : pre.max_downward_message_size, -ump_service_total_weight : pre.ump_service_total_weight, hrmp_max_parachain_outbound_channels : pre.hrmp_max_parachain_outbound_channels, hrmp_max_parathread_outbound_channels : pre.hrmp_max_parathread_outbound_channels, hrmp_sender_deposit : pre.hrmp_sender_deposit, @@ -223,7 +222,6 @@ n_delay_tranches : pre.n_delay_tranches, zeroth_delay_tranche_width : pre.zeroth_delay_tranche_width, needed_approvals : pre.needed_approvals, relay_vrf_modulo_samples : pre.relay_vrf_modulo_samples, -ump_max_individual_weight : pre.ump_max_individual_weight, pvf_checking_enabled : pre.pvf_checking_enabled, pvf_voting_ttl : pre.pvf_voting_ttl, minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, @@ -357,7 +355,6 @@ mod tests { assert_eq!(v4.validation_upgrade_delay , v5.validation_upgrade_delay); assert_eq!(v4.max_pov_size , v5.max_pov_size); assert_eq!(v4.max_downward_message_size , v5.max_downward_message_size); - assert_eq!(v4.ump_service_total_weight , v5.ump_service_total_weight); assert_eq!(v4.hrmp_max_parachain_outbound_channels , v5.hrmp_max_parachain_outbound_channels); assert_eq!(v4.hrmp_max_parathread_outbound_channels , v5.hrmp_max_parathread_outbound_channels); assert_eq!(v4.hrmp_sender_deposit , v5.hrmp_sender_deposit); @@ -382,7 +379,6 @@ mod tests { assert_eq!(v4.zeroth_delay_tranche_width , v5.zeroth_delay_tranche_width); assert_eq!(v4.needed_approvals , v5.needed_approvals); assert_eq!(v4.relay_vrf_modulo_samples , v5.relay_vrf_modulo_samples); - assert_eq!(v4.ump_max_individual_weight , v5.ump_max_individual_weight); assert_eq!(v4.pvf_checking_enabled , v5.pvf_checking_enabled); assert_eq!(v4.pvf_voting_ttl , v5.pvf_voting_ttl); assert_eq!(v4.minimum_validation_upgrade_delay , v5.minimum_validation_upgrade_delay); diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index 8861f918c221..ddf11a7b7cc7 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -19,6 +19,7 @@ use crate::configuration::{self, ActiveConfig, Config, Pallet, LOG_TARGET}; use frame_support::{pallet_prelude::*, traits::StorageVersion, weights::Weight}; use frame_system::pallet_prelude::BlockNumberFor; +use primitives::vstaging::AsyncBackingParams; pub use v5::MigrateV4ToV5; @@ -212,7 +213,6 @@ max_validators_per_core : pre.max_validators_per_core, max_validators : pre.max_validators, dispute_period : pre.dispute_period, dispute_post_conclusion_acceptance_period: pre.dispute_post_conclusion_acceptance_period, -dispute_conclusion_by_time_out_period : pre.dispute_conclusion_by_time_out_period, no_show_slots : pre.no_show_slots, n_delay_tranches : pre.n_delay_tranches, zeroth_delay_tranche_width : pre.zeroth_delay_tranche_width, @@ -221,6 +221,9 @@ relay_vrf_modulo_samples : pre.relay_vrf_modulo_samples, pvf_checking_enabled : pre.pvf_checking_enabled, pvf_voting_ttl : pre.pvf_voting_ttl, minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, + +// Default values are zeroes, thus it's ensured allowed ancestry never crosses the upgrade block. +async_backing_params : AsyncBackingParams { max_candidate_depth: 0, allowed_ancestry_len: 0 }, } }; @@ -353,7 +356,6 @@ mod tests { assert_eq!(v4.max_validators , v5.max_validators); assert_eq!(v4.dispute_period , v5.dispute_period); assert_eq!(v4.dispute_post_conclusion_acceptance_period, v5.dispute_post_conclusion_acceptance_period); - assert_eq!(v4.dispute_conclusion_by_time_out_period , v5.dispute_conclusion_by_time_out_period); assert_eq!(v4.no_show_slots , v5.no_show_slots); assert_eq!(v4.n_delay_tranches , v5.n_delay_tranches); assert_eq!(v4.zeroth_delay_tranche_width , v5.zeroth_delay_tranche_width); diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 4718ed07e281..e67226eb1360 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1534,9 +1534,9 @@ pub type UncheckedExtrinsic = /// This contains the combined migrations of the last 10 releases. It allows to skip runtime /// upgrades in case governance decides to do so. pub type Migrations = ( - parachains_configuration::migration::v5::MigrateToV5 + parachains_configuration::migration::v5::MigrateToV5, // Remove UMP dispatch queue - parachains_configuration::migration::MigrateV4ToV5, + parachains_configuration::migration_ump::MigrateV4ToV5, ); /// Executive: handles dispatch to the various modules. From b9c15e8a8339c4e877d654ee3f09903af4210736 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 11 Apr 2023 14:53:55 +0200 Subject: [PATCH 129/182] Rococo: configure MQ pallet Signed-off-by: Oliver Tale-Yazdi --- runtime/rococo/src/lib.rs | 1 + runtime/rococo/src/xcm_config.rs | 47 ++++++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index e67226eb1360..db3105974fb4 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1082,6 +1082,7 @@ impl pallet_message_queue::Config for Runtime { #[cfg(feature = "runtime-benchmarks")] type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; + type DiscardOverweightOrigin = xcm_config::MqDiscardOverweightOrigin; type QueueChangeHandler = ParaInclusion; type WeightInfo = weights::pallet_message_queue::WeightInfo; } diff --git a/runtime/rococo/src/xcm_config.rs b/runtime/rococo/src/xcm_config.rs index 872bbbe1a035..367d276f86b5 100644 --- a/runtime/rococo/src/xcm_config.rs +++ b/runtime/rococo/src/xcm_config.rs @@ -22,11 +22,15 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{Contains, Everything, Nothing}, + traits::{ + AsEnsureOriginWithContains, Contains, EitherOfWithArg, EnsureOriginWithArg, Everything, + Nothing, + }, weights::Weight, }; -use frame_system::EnsureRoot; +use frame_system::{ensure_signed, EnsureRoot}; use runtime_common::{crowdloan, paras_registrar, xcm_sender, ToAuthor}; +use runtime_parachains::inclusion::AggregateMessageOrigin; use sp_core::ConstU32; use xcm::latest::prelude::*; use xcm_builder::{ @@ -37,7 +41,10 @@ use xcm_builder::{ MintLocation, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, WithComputedOrigin, }; -use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; +use xcm_executor::{ + traits::{Convert, WithOriginFilter}, + XcmExecutor, +}; parameter_types! { pub const TokenLocation: MultiLocation = Here.into_location(); @@ -142,6 +149,40 @@ pub type Barrier = ( >, ); +/// Either root for all queues or a parachain for its own queue. +pub type MqDiscardOverweightOrigin = EitherOfWithArg< + AsEnsureOriginWithContains, Everything>, + ParaAsUmpQueueManager, +>; + +/// Each parachain can control its own UMP queue through its sovereign account. +pub struct ParaAsUmpQueueManager(core::marker::PhantomData); +impl EnsureOriginWithArg + for ParaAsUmpQueueManager +where + ParaToSovereign: Convert, +{ + type Success = (); + + fn try_origin( + o: RuntimeOrigin, + queue: &AggregateMessageOrigin, + ) -> Result { + let para: ParaId = match queue { + AggregateMessageOrigin::Ump(para) => *para, + }; + let owner = Junction::Parachain(para.into()); + let sovereign = ParaToSovereign::convert_ref(&owner.into()).map_err(|()| o.clone())?; // FAIL-CI remove clones + + let signer = ensure_signed(o.clone()).map_err(|_| o.clone())?; // TODO why no `ensure_signed_by`? + if signer == sovereign { + Ok(()) + } else { + Err(o) + } + } +} + /// A call filter for the XCM Transact instruction. This is a temporary measure until we /// properly account for proof size weights. /// From 88f1cbe20774d20e5e1e554e798960ae39437af1 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 11 Apr 2023 14:54:11 +0200 Subject: [PATCH 130/182] Fixup tests Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/mock.rs | 10 ++++++++++ runtime/rococo/src/weights/pallet_message_queue.rs | 3 +++ 2 files changed, 13 insertions(+) diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 3148263703db..f1a6c27f5a29 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -316,6 +316,12 @@ impl pallet_message_queue::WeightInfo for TestMessageQueueWeight { fn execute_overweight_page_updated() -> Weight { Weight::zero() } + fn discard_overweight_page_removed() -> Weight { + Weight::zero() + } + fn discard_overweight_page_updated() -> Weight { + Weight::zero() + } } parameter_types! { pub const MessageQueueServiceWeight: Weight = Weight::from_all(500); @@ -328,6 +334,10 @@ impl pallet_message_queue::Config for Test { type RuntimeEvent = RuntimeEvent; type WeightInfo = TestMessageQueueWeight; type MessageProcessor = TestProcessMessage; + type DiscardOverweightOrigin = frame_support::traits::AsEnsureOriginWithContains< + frame_system::EnsureRoot, + frame_support::traits::Everything, + >; type QueueChangeHandler = ParaInclusion; type HeapSize = ConstU32<65536>; type MaxStale = ConstU32<8>; diff --git a/runtime/rococo/src/weights/pallet_message_queue.rs b/runtime/rococo/src/weights/pallet_message_queue.rs index 109125e22709..732a97a01129 100644 --- a/runtime/rococo/src/weights/pallet_message_queue.rs +++ b/runtime/rococo/src/weights/pallet_message_queue.rs @@ -45,6 +45,9 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_message_queue`. pub struct WeightInfo(PhantomData); impl pallet_message_queue::WeightInfo for WeightInfo { + fn discard_overweight_page_removed() -> Weight { Weight::MAX } // FAIL-CI + fn discard_overweight_page_updated() -> Weight { Weight::MAX } // FAIL-CI + /// Storage: MessageQueue ServiceHead (r:1 w:0) /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) /// Storage: MessageQueue BookStateFor (r:2 w:2) From 32cb6887e82b326a456a716610856104bb7348c9 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 13 Apr 2023 19:17:52 +0200 Subject: [PATCH 131/182] Revert "Rococo: configure MQ pallet" Going to do this as follow up, since it needs Substrate changes and i dont want to stall this MR any longer. This reverts commit b9c15e8a8339c4e877d654ee3f09903af4210736. Signed-off-by: Oliver Tale-Yazdi --- runtime/rococo/src/lib.rs | 1 - runtime/rococo/src/xcm_config.rs | 47 ++------------------------------ 2 files changed, 3 insertions(+), 45 deletions(-) diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index db3105974fb4..e67226eb1360 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1082,7 +1082,6 @@ impl pallet_message_queue::Config for Runtime { #[cfg(feature = "runtime-benchmarks")] type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; - type DiscardOverweightOrigin = xcm_config::MqDiscardOverweightOrigin; type QueueChangeHandler = ParaInclusion; type WeightInfo = weights::pallet_message_queue::WeightInfo; } diff --git a/runtime/rococo/src/xcm_config.rs b/runtime/rococo/src/xcm_config.rs index 367d276f86b5..872bbbe1a035 100644 --- a/runtime/rococo/src/xcm_config.rs +++ b/runtime/rococo/src/xcm_config.rs @@ -22,15 +22,11 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{ - AsEnsureOriginWithContains, Contains, EitherOfWithArg, EnsureOriginWithArg, Everything, - Nothing, - }, + traits::{Contains, Everything, Nothing}, weights::Weight, }; -use frame_system::{ensure_signed, EnsureRoot}; +use frame_system::EnsureRoot; use runtime_common::{crowdloan, paras_registrar, xcm_sender, ToAuthor}; -use runtime_parachains::inclusion::AggregateMessageOrigin; use sp_core::ConstU32; use xcm::latest::prelude::*; use xcm_builder::{ @@ -41,10 +37,7 @@ use xcm_builder::{ MintLocation, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, WithComputedOrigin, }; -use xcm_executor::{ - traits::{Convert, WithOriginFilter}, - XcmExecutor, -}; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const TokenLocation: MultiLocation = Here.into_location(); @@ -149,40 +142,6 @@ pub type Barrier = ( >, ); -/// Either root for all queues or a parachain for its own queue. -pub type MqDiscardOverweightOrigin = EitherOfWithArg< - AsEnsureOriginWithContains, Everything>, - ParaAsUmpQueueManager, ->; - -/// Each parachain can control its own UMP queue through its sovereign account. -pub struct ParaAsUmpQueueManager(core::marker::PhantomData); -impl EnsureOriginWithArg - for ParaAsUmpQueueManager -where - ParaToSovereign: Convert, -{ - type Success = (); - - fn try_origin( - o: RuntimeOrigin, - queue: &AggregateMessageOrigin, - ) -> Result { - let para: ParaId = match queue { - AggregateMessageOrigin::Ump(para) => *para, - }; - let owner = Junction::Parachain(para.into()); - let sovereign = ParaToSovereign::convert_ref(&owner.into()).map_err(|()| o.clone())?; // FAIL-CI remove clones - - let signer = ensure_signed(o.clone()).map_err(|_| o.clone())?; // TODO why no `ensure_signed_by`? - if signer == sovereign { - Ok(()) - } else { - Err(o) - } - } -} - /// A call filter for the XCM Transact instruction. This is a temporary measure until we /// properly account for proof size weights. /// From 1aab21c2ffc5d29d056134ba923e11e192303df0 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 13 Apr 2023 19:20:06 +0200 Subject: [PATCH 132/182] Revert "Fixup tests" This reverts commit 88f1cbe20774d20e5e1e554e798960ae39437af1. --- runtime/parachains/src/mock.rs | 10 ---------- runtime/rococo/src/weights/pallet_message_queue.rs | 3 --- 2 files changed, 13 deletions(-) diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index f1a6c27f5a29..3148263703db 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -316,12 +316,6 @@ impl pallet_message_queue::WeightInfo for TestMessageQueueWeight { fn execute_overweight_page_updated() -> Weight { Weight::zero() } - fn discard_overweight_page_removed() -> Weight { - Weight::zero() - } - fn discard_overweight_page_updated() -> Weight { - Weight::zero() - } } parameter_types! { pub const MessageQueueServiceWeight: Weight = Weight::from_all(500); @@ -334,10 +328,6 @@ impl pallet_message_queue::Config for Test { type RuntimeEvent = RuntimeEvent; type WeightInfo = TestMessageQueueWeight; type MessageProcessor = TestProcessMessage; - type DiscardOverweightOrigin = frame_support::traits::AsEnsureOriginWithContains< - frame_system::EnsureRoot, - frame_support::traits::Everything, - >; type QueueChangeHandler = ParaInclusion; type HeapSize = ConstU32<65536>; type MaxStale = ConstU32<8>; diff --git a/runtime/rococo/src/weights/pallet_message_queue.rs b/runtime/rococo/src/weights/pallet_message_queue.rs index 732a97a01129..109125e22709 100644 --- a/runtime/rococo/src/weights/pallet_message_queue.rs +++ b/runtime/rococo/src/weights/pallet_message_queue.rs @@ -45,9 +45,6 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_message_queue`. pub struct WeightInfo(PhantomData); impl pallet_message_queue::WeightInfo for WeightInfo { - fn discard_overweight_page_removed() -> Weight { Weight::MAX } // FAIL-CI - fn discard_overweight_page_updated() -> Weight { Weight::MAX } // FAIL-CI - /// Storage: MessageQueue ServiceHead (r:1 w:0) /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) /// Storage: MessageQueue BookStateFor (r:2 w:2) From 9b3c2aa36b85d48d44a926ec8fb0f6f3db9de529 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 13 Apr 2023 20:20:52 +0200 Subject: [PATCH 133/182] Fixup migration Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 2 +- .../parachains/src/configuration/migration.rs | 6 +- .../src/configuration/migration_ump.rs | 192 +++++++++--------- runtime/polkadot/src/lib.rs | 2 +- runtime/rococo/src/lib.rs | 2 +- runtime/westend/src/lib.rs | 2 +- 6 files changed, 105 insertions(+), 101 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 5380aee536ec..246e5cde9c96 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1510,7 +1510,7 @@ pub type Migrations = ( pallet_nomination_pools::migration::v5::MigrateToV5, parachains_configuration::migration::v5::MigrateToV5, // Remove UMP dispatch queue - parachains_configuration::migration::MigrateV4ToV5, + parachains_configuration::migration::MigrateV5ToV6, ); /// Unchecked extrinsic type as expected by this runtime. diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs index 07d61d4b3316..fc71ad1358dd 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -29,7 +29,11 @@ use sp_std::vec::Vec; /// v2-v3: /// v3-v4: /// v4-v5: + -pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(5); +/// v5-v6: (remove UMP dispatch queue) +pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(6); + +// The V6 migration is in its own file to avoid merge conflicts. +pub use crate::configuration::migration_ump::v6::MigrateV5ToV6; pub mod v5 { use super::*; diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index ddf11a7b7cc7..bea7c3223e9a 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -21,18 +21,7 @@ use frame_support::{pallet_prelude::*, traits::StorageVersion, weights::Weight}; use frame_system::pallet_prelude::BlockNumberFor; use primitives::vstaging::AsyncBackingParams; -pub use v5::MigrateV4ToV5; - -/// The current storage version. -/// -/// v0-v1: -/// v1-v2: -/// v2-v3: (remove weights) -/// v3-v4: (remove spam slots) -/// v4-v5: (remove UMP dispatch queue) -pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(5); - -pub mod v5 { +pub mod v6 { use super::*; use frame_support::traits::OnRuntimeUpgrade; use primitives::{Balance, SessionIndex}; @@ -40,7 +29,7 @@ pub mod v5 { use sp_std::prelude::*; #[derive(parity_scale_codec::Encode, parity_scale_codec::Decode, Debug)] - pub struct V4HostConfiguration { + pub struct OldHostConfiguration { pub max_code_size: u32, pub max_head_data_size: u32, pub max_upward_queue_count: u32, @@ -85,7 +74,7 @@ pub mod v5 { pub minimum_validation_upgrade_delay: BlockNumber, } - impl> Default for V4HostConfiguration { + impl> Default for OldHostConfiguration { fn default() -> Self { Self { group_rotation_frequency: 1u32.into(), @@ -134,26 +123,26 @@ pub mod v5 { } } - pub struct MigrateV4ToV5(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateV4ToV5 { + pub struct MigrateV5ToV6(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for MigrateV5ToV6 { #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, &'static str> { - ensure!(StorageVersion::get::>() == 4, "The migration requires version 4"); + ensure!(StorageVersion::get::>() == 5, "The migration requires version 5"); log::trace!(target: LOG_TARGET, "Going to upgraded parachain config..."); Ok(Vec::new()) } fn on_runtime_upgrade() -> Weight { - if StorageVersion::get::>() == 4 { - let weight_consumed = migrate_v4_to_v5::(); + if StorageVersion::get::>() == 5 { + let weight_consumed = migrate_v5_to_v6::(); - log::info!(target: LOG_TARGET, "MigrateV4ToV5 executed successfully"); - STORAGE_VERSION.put::>(); + log::info!(target: LOG_TARGET, "MigrateV5ToV6 executed successfully"); + StorageVersion::new(6).put::>(); weight_consumed } else { - log::warn!(target: LOG_TARGET, "MigrateV4ToV5 should be removed."); + log::warn!(target: LOG_TARGET, "MigrateV5ToV6 should be removed."); T::DbWeight::get().reads(1) } } @@ -162,8 +151,12 @@ pub mod v5 { fn post_upgrade(_state: Vec) -> Result<(), &'static str> { log::trace!(target: LOG_TARGET, "Running post_upgrade()"); ensure!( - StorageVersion::get::>() == 5, - "Storage version should be 5 after the migration" + StorageVersion::get::>() == 6, + "Storage version should be 6 after the migration" + ); + ensure!( + StorageVersion::get::>() == STORAGE_VERSION, + "Storage version should be STORAGE_VERSION after the migration" ); Ok(()) @@ -171,14 +164,14 @@ pub mod v5 { } } -fn migrate_v4_to_v5() -> Weight { +fn migrate_v5_to_v6() -> Weight { // Unusual formatting is justified: // - make it easier to verify that fields assign what they supposed to assign. // - this code is transient and will be removed after all migrations are done. // - this code is important enough to optimize for legibility sacrificing consistency. #[rustfmt::skip] let translate = - |pre: v5::V4HostConfiguration>| -> + |pre: v6::OldHostConfiguration>| -> configuration::HostConfiguration> { super::HostConfiguration { @@ -243,16 +236,15 @@ async_backing_params : AsyncBackingParams { max_candidate_de mod tests { use frame_support::weights::constants::{WEIGHT_PROOF_SIZE_PER_MB, WEIGHT_REF_TIME_PER_MILLIS}; - use super::*; + use super::{v6::*, *}; use crate::mock::{new_test_ext, Test}; use frame_support::traits::OnRuntimeUpgrade; - /// The old V4 config can be decoded from actual on-chain data. + /// The old config can be decoded from actual on-chain data. #[test] - fn v4_deserialized_from_actual_data() { + fn v5_deserialized_from_actual_data() { // Example how to get new `raw_config`: - // We'll obtain the raw_config for block - // 16,832,711 (0x2e3d78b87f0811f18a8b8469596aa7d8c9ef10d622b90d647f10ceebee3e380c) on Kusama. + // We'll obtain the raw_config for block on Kusama. // Steps: // 1. Go to Polkadot.js -> Developer -> Chain state -> Storage: https://polkadot.js.org/apps/#/chainstate // 2. Set these parameters: @@ -263,31 +255,39 @@ mod tests { // 3. Go to Polkadot.js -> Developer -> Chain state -> Raw storage // 3.1 Enter the encoded storage key and you get the raw config. - // Fetched at Kusama 16,832,711 (0x2e3d78b87f0811f18a8b8469596aa7d8c9ef10d622b90d647f10ceebee3e380c) + // Fetched at Kusama 17,467,443 // // This exceeds the maximal line width length, but that's fine, since this is not code and // doesn't need to be read and also leaving it as one line allows to easily copy it. - let raw_config = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c800000700e8764817020040011e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c80000000600000058020000580200000200000059000000000000001e000000280000000700c817a80402004001010200000014000000"]; - - let v4 = v5::V4HostConfiguration::::decode(&mut &raw_config[..]) - .unwrap(); - - // We check only a sample of the values here. If we missed any fields or messed up data types - // that would skew all the fields coming after. - assert_eq!(v4.max_code_size, 10_485_760); - assert_eq!(v4.validation_upgrade_cooldown, 3600); - assert_eq!(v4.max_pov_size, 5_242_880); - assert_eq!(v4.hrmp_channel_max_message_size, 102_400); - assert_eq!(v4.n_delay_tranches, 89); - assert_eq!( - v4.ump_max_individual_weight, - Weight::from_parts(20 * WEIGHT_REF_TIME_PER_MILLIS, 5 * WEIGHT_PROOF_SIZE_PER_MB) - ); - assert_eq!(v4.minimum_validation_upgrade_delay, 20); + let raw_ksm = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c800000700e8764817020040011e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c80000000600000058020000580200000200000059000000000000001e000000280000000700c817a80402004001010200000014000000"]; + + // Same for Polkadot block 15,075,732 + let raw_dot = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a00000040380000580200000000500000c800000700e8764817020040011e0000000000000000e8764817000000000000000000000000e87648170000000000000000000000e8030000009001001e00000000000000009001004038000000000000000000000a0000000a0000000a00000001000000010500000001c80000000600000058020000580200000200000059000000000000001e000000280000000700c817a80402004001010200000014000000"]; + + let check = |old: v6::OldHostConfiguration, cd: u32| { + assert_eq!(old.max_code_size, 10_485_760); + assert_eq!(old.validation_upgrade_cooldown, cd); + assert_eq!(old.max_pov_size, 5_242_880); + assert_eq!(old.hrmp_channel_max_message_size, 102_400); + assert_eq!(old.n_delay_tranches, 89); + assert_eq!( + old.ump_max_individual_weight, + Weight::from_parts(20 * WEIGHT_REF_TIME_PER_MILLIS, 5 * WEIGHT_PROOF_SIZE_PER_MB) + ); + assert_eq!(old.minimum_validation_upgrade_delay, 20); + }; + + let old_ksm = + v6::OldHostConfiguration::::decode(&mut &raw_ksm[..]).unwrap(); + check(old_ksm, 3_600); + + let old_dot = + v6::OldHostConfiguration::::decode(&mut &raw_dot[..]).unwrap(); + check(old_dot, 14_400); } #[test] - fn test_migrate_v4_to_v5() { + fn test_migrate_v5_to_v6() { // Host configuration has lots of fields. However, in this migration we add only a couple of // fields. The most important part to check are a couple of the last fields. We also pick // extra fields to check arbitrarily, e.g. depending on their position (i.e. the middle) and @@ -296,7 +296,7 @@ mod tests { // We specify only the picked fields and the rest should be provided by the `Default` // implementation. That implementation is copied over between the two types and should work // fine. - let v4 = v5::V4HostConfiguration:: { + let old = v6::OldHostConfiguration:: { ump_max_individual_weight: Weight::from_parts(0x71616e6f6e0au64, 0x71616e6f6e0au64), needed_approvals: 69, thread_availability_period: 55, @@ -308,62 +308,62 @@ mod tests { }; new_test_ext(Default::default()).execute_with(|| { - // Implant the v4 version in the state. + // Implant the old version in the state. frame_support::storage::unhashed::put_raw( &configuration::ActiveConfig::::hashed_key(), - &v4.encode(), + &old.encode(), ); - StorageVersion::new(4).put::>(); + StorageVersion::new(5).put::>(); #[cfg(feature = "try-runtime")] - MigrateV4ToV5::::pre_upgrade().unwrap(); - let _weight = MigrateV4ToV5::::on_runtime_upgrade(); + MigrateV5ToV6::::pre_upgrade().unwrap(); + let _weight = MigrateV5ToV6::::on_runtime_upgrade(); #[cfg(feature = "try-runtime")] - MigrateV4ToV5::::post_upgrade(vec![]).unwrap(); + MigrateV5ToV6::::post_upgrade(vec![]).unwrap(); let v5 = configuration::ActiveConfig::::get(); #[rustfmt::skip] { - assert_eq!(v4.max_code_size , v5.max_code_size); - assert_eq!(v4.max_head_data_size , v5.max_head_data_size); - assert_eq!(v4.max_upward_queue_count , v5.max_upward_queue_count); - assert_eq!(v4.max_upward_queue_size , v5.max_upward_queue_size); - assert_eq!(v4.max_upward_message_size , v5.max_upward_message_size); - assert_eq!(v4.max_upward_message_num_per_candidate , v5.max_upward_message_num_per_candidate); - assert_eq!(v4.hrmp_max_message_num_per_candidate , v5.hrmp_max_message_num_per_candidate); - assert_eq!(v4.validation_upgrade_cooldown , v5.validation_upgrade_cooldown); - assert_eq!(v4.validation_upgrade_delay , v5.validation_upgrade_delay); - assert_eq!(v4.max_pov_size , v5.max_pov_size); - assert_eq!(v4.max_downward_message_size , v5.max_downward_message_size); - assert_eq!(v4.hrmp_max_parachain_outbound_channels , v5.hrmp_max_parachain_outbound_channels); - assert_eq!(v4.hrmp_max_parathread_outbound_channels , v5.hrmp_max_parathread_outbound_channels); - assert_eq!(v4.hrmp_sender_deposit , v5.hrmp_sender_deposit); - assert_eq!(v4.hrmp_recipient_deposit , v5.hrmp_recipient_deposit); - assert_eq!(v4.hrmp_channel_max_capacity , v5.hrmp_channel_max_capacity); - assert_eq!(v4.hrmp_channel_max_total_size , v5.hrmp_channel_max_total_size); - assert_eq!(v4.hrmp_max_parachain_inbound_channels , v5.hrmp_max_parachain_inbound_channels); - assert_eq!(v4.hrmp_max_parathread_inbound_channels , v5.hrmp_max_parathread_inbound_channels); - assert_eq!(v4.hrmp_channel_max_message_size , v5.hrmp_channel_max_message_size); - assert_eq!(v4.code_retention_period , v5.code_retention_period); - assert_eq!(v4.parathread_cores , v5.parathread_cores); - assert_eq!(v4.parathread_retries , v5.parathread_retries); - assert_eq!(v4.group_rotation_frequency , v5.group_rotation_frequency); - assert_eq!(v4.chain_availability_period , v5.chain_availability_period); - assert_eq!(v4.thread_availability_period , v5.thread_availability_period); - assert_eq!(v4.scheduling_lookahead , v5.scheduling_lookahead); - assert_eq!(v4.max_validators_per_core , v5.max_validators_per_core); - assert_eq!(v4.max_validators , v5.max_validators); - assert_eq!(v4.dispute_period , v5.dispute_period); - assert_eq!(v4.dispute_post_conclusion_acceptance_period, v5.dispute_post_conclusion_acceptance_period); - assert_eq!(v4.no_show_slots , v5.no_show_slots); - assert_eq!(v4.n_delay_tranches , v5.n_delay_tranches); - assert_eq!(v4.zeroth_delay_tranche_width , v5.zeroth_delay_tranche_width); - assert_eq!(v4.needed_approvals , v5.needed_approvals); - assert_eq!(v4.relay_vrf_modulo_samples , v5.relay_vrf_modulo_samples); - assert_eq!(v4.pvf_checking_enabled , v5.pvf_checking_enabled); - assert_eq!(v4.pvf_voting_ttl , v5.pvf_voting_ttl); - assert_eq!(v4.minimum_validation_upgrade_delay , v5.minimum_validation_upgrade_delay); + assert_eq!(old.max_code_size , v5.max_code_size); + assert_eq!(old.max_head_data_size , v5.max_head_data_size); + assert_eq!(old.max_upward_queue_count , v5.max_upward_queue_count); + assert_eq!(old.max_upward_queue_size , v5.max_upward_queue_size); + assert_eq!(old.max_upward_message_size , v5.max_upward_message_size); + assert_eq!(old.max_upward_message_num_per_candidate , v5.max_upward_message_num_per_candidate); + assert_eq!(old.hrmp_max_message_num_per_candidate , v5.hrmp_max_message_num_per_candidate); + assert_eq!(old.validation_upgrade_cooldown , v5.validation_upgrade_cooldown); + assert_eq!(old.validation_upgrade_delay , v5.validation_upgrade_delay); + assert_eq!(old.max_pov_size , v5.max_pov_size); + assert_eq!(old.max_downward_message_size , v5.max_downward_message_size); + assert_eq!(old.hrmp_max_parachain_outbound_channels , v5.hrmp_max_parachain_outbound_channels); + assert_eq!(old.hrmp_max_parathread_outbound_channels , v5.hrmp_max_parathread_outbound_channels); + assert_eq!(old.hrmp_sender_deposit , v5.hrmp_sender_deposit); + assert_eq!(old.hrmp_recipient_deposit , v5.hrmp_recipient_deposit); + assert_eq!(old.hrmp_channel_max_capacity , v5.hrmp_channel_max_capacity); + assert_eq!(old.hrmp_channel_max_total_size , v5.hrmp_channel_max_total_size); + assert_eq!(old.hrmp_max_parachain_inbound_channels , v5.hrmp_max_parachain_inbound_channels); + assert_eq!(old.hrmp_max_parathread_inbound_channels , v5.hrmp_max_parathread_inbound_channels); + assert_eq!(old.hrmp_channel_max_message_size , v5.hrmp_channel_max_message_size); + assert_eq!(old.code_retention_period , v5.code_retention_period); + assert_eq!(old.parathread_cores , v5.parathread_cores); + assert_eq!(old.parathread_retries , v5.parathread_retries); + assert_eq!(old.group_rotation_frequency , v5.group_rotation_frequency); + assert_eq!(old.chain_availability_period , v5.chain_availability_period); + assert_eq!(old.thread_availability_period , v5.thread_availability_period); + assert_eq!(old.scheduling_lookahead , v5.scheduling_lookahead); + assert_eq!(old.max_validators_per_core , v5.max_validators_per_core); + assert_eq!(old.max_validators , v5.max_validators); + assert_eq!(old.dispute_period , v5.dispute_period); + assert_eq!(old.dispute_post_conclusion_acceptance_period, v5.dispute_post_conclusion_acceptance_period); + assert_eq!(old.no_show_slots , v5.no_show_slots); + assert_eq!(old.n_delay_tranches , v5.n_delay_tranches); + assert_eq!(old.zeroth_delay_tranche_width , v5.zeroth_delay_tranche_width); + assert_eq!(old.needed_approvals , v5.needed_approvals); + assert_eq!(old.relay_vrf_modulo_samples , v5.relay_vrf_modulo_samples); + assert_eq!(old.pvf_checking_enabled , v5.pvf_checking_enabled); + assert_eq!(old.pvf_voting_ttl , v5.pvf_voting_ttl); + assert_eq!(old.minimum_validation_upgrade_delay , v5.minimum_validation_upgrade_delay); }; // ; makes this a statement. `rustfmt::skip` cannot be put on an expression. }); } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index e6f38644a5db..7380162f6c14 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1468,7 +1468,7 @@ pub type Migrations = ( pallet_nomination_pools::migration::v5::MigrateToV5, parachains_configuration::migration::v5::MigrateToV5, // Remove UMP dispatch queue - parachains_configuration::migration::MigrateV4ToV5, + parachains_configuration::migration::MigrateV5ToV6, ); /// Unchecked extrinsic type as expected by this runtime. diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 805ef25a0c54..a8b1088a4da4 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1516,7 +1516,7 @@ pub type UncheckedExtrinsic = pub type Migrations = ( parachains_configuration::migration::v5::MigrateToV5, // Remove UMP dispatch queue - parachains_configuration::migration_ump::MigrateV4ToV5, + parachains_configuration::migration::MigrateV5ToV6, ); /// Executive: handles dispatch to the various modules. diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index a54f6a626014..1f22142f68d7 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1267,7 +1267,7 @@ pub type Migrations = ( pallet_nomination_pools::migration::v5::MigrateToV5, parachains_configuration::migration::v5::MigrateToV5, // Remove UMP dispatch queue - parachains_configuration::migration::MigrateV4ToV5, + parachains_configuration::migration::MigrateV5ToV6, ); /// Unchecked extrinsic type as expected by this runtime. From f0c82004988d5201ab0962ccbaabafc700aa6071 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 13 Apr 2023 20:42:06 +0200 Subject: [PATCH 134/182] Fix migration Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration/migration_ump.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index bea7c3223e9a..d3f3190215c5 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -141,6 +141,7 @@ pub mod v6 { StorageVersion::new(6).put::>(); weight_consumed + } else { log::warn!(target: LOG_TARGET, "MigrateV5ToV6 should be removed."); T::DbWeight::get().reads(1) @@ -155,7 +156,7 @@ pub mod v6 { "Storage version should be 6 after the migration" ); ensure!( - StorageVersion::get::>() == STORAGE_VERSION, + StorageVersion::get::>() == crate::configuration::migration::STORAGE_VERSION, "Storage version should be STORAGE_VERSION after the migration" ); From 968c462d67faa263f248bbd65e3e4a325f77c5b1 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 13 Apr 2023 20:45:57 +0200 Subject: [PATCH 135/182] fmt Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration/migration_ump.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index d3f3190215c5..d4cd91d33f06 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -141,7 +141,6 @@ pub mod v6 { StorageVersion::new(6).put::>(); weight_consumed - } else { log::warn!(target: LOG_TARGET, "MigrateV5ToV6 should be removed."); T::DbWeight::get().reads(1) @@ -156,7 +155,8 @@ pub mod v6 { "Storage version should be 6 after the migration" ); ensure!( - StorageVersion::get::>() == crate::configuration::migration::STORAGE_VERSION, + StorageVersion::get::>() == + crate::configuration::migration::STORAGE_VERSION, "Storage version should be STORAGE_VERSION after the migration" ); From 7124a626c42b14a9bf9e62a9932e2646cc470183 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 13 Apr 2023 21:16:49 +0200 Subject: [PATCH 136/182] Fix CI Signed-off-by: Oliver Tale-Yazdi --- scripts/ci/gitlab/pipeline/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/gitlab/pipeline/check.yml b/scripts/ci/gitlab/pipeline/check.yml index 7a56777b09f1..6c90896b23c9 100644 --- a/scripts/ci/gitlab/pipeline/check.yml +++ b/scripts/ci/gitlab/pipeline/check.yml @@ -69,7 +69,7 @@ check-try-runtime: export RUST_LOG=remote-ext=debug,runtime=debug echo "---------- Running try-runtime for ${NETWORK} ----------" time cargo build --locked --release -p "$NETWORK"-runtime - time cargo run ---locked -release --features try-runtime try-runtime \ + time cargo run --locked -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 \ From 5967ad1ffc6e90932bfcada2402372c79a79e48a Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 14 Apr 2023 16:36:14 +0200 Subject: [PATCH 137/182] Fix migration Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration/migration_ump.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index d4cd91d33f06..e136eff8fae2 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -218,6 +218,9 @@ minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, // Default values are zeroes, thus it's ensured allowed ancestry never crosses the upgrade block. async_backing_params : AsyncBackingParams { max_candidate_depth: 0, allowed_ancestry_len: 0 }, + +// Default executor parameters set is empty +executor_params : Default::default(), } }; From 425e8a9e0976703f26106056de1c2bfe00c8bfe0 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Mon, 17 Apr 2023 11:59:09 +0200 Subject: [PATCH 138/182] Fix other migration Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration/migration.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs index c68dbf5f3430..15d6441b9104 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -159,7 +159,7 @@ pub mod v5 { let weight_consumed = migrate_to_v5::(); log::info!(target: configuration::LOG_TARGET, "MigrateToV5 executed successfully"); - STORAGE_VERSION.put::>(); + StorageVersion::new(5).put::>(); weight_consumed } else { @@ -172,7 +172,7 @@ pub mod v5 { fn post_upgrade(_state: Vec) -> Result<(), &'static str> { log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade()"); ensure!( - StorageVersion::get::>() == STORAGE_VERSION, + StorageVersion::get::>() == StorageVersion::new(5), "Storage version should be 5 after the migration" ); From 530734b7b0da5b7680054e0242348fcc79a666fe Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 19 Apr 2023 16:44:41 +0200 Subject: [PATCH 139/182] Bump MAX_CODE_SIZE to 10MiB Signed-off-by: Oliver Tale-Yazdi --- primitives/src/v4/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/src/v4/mod.rs b/primitives/src/v4/mod.rs index 4a40a5993c19..3fc38210654a 100644 --- a/primitives/src/v4/mod.rs +++ b/primitives/src/v4/mod.rs @@ -364,7 +364,7 @@ pub const ASSIGNMENT_KEY_TYPE_ID: KeyTypeId = KeyTypeId(*b"asgn"); /// * checking updates to this stored runtime configuration do not exceed this limit /// * when detecting a code decompression bomb in the client // NOTE: This value is used in the runtime so be careful when changing it. -pub const MAX_CODE_SIZE: u32 = 3 * 1024 * 1024; +pub const MAX_CODE_SIZE: u32 = 10 * 1024 * 1024; /// Maximum head data size we support right now. /// From 28a6c597dca9c0df70ea06ea30e5a8fc024563f5 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 19 Apr 2023 16:46:39 +0200 Subject: [PATCH 140/182] Add ForceUpdateUmpLimits migration Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 22 +- runtime/kusama/src/tests.rs | 8 + runtime/parachains/src/configuration.rs | 4 +- .../parachains/src/configuration/migration.rs | 16 +- .../src/configuration/migration_ump.rs | 425 ++++-------------- runtime/parachains/src/inclusion/mod.rs | 2 +- runtime/polkadot/src/lib.rs | 28 +- runtime/rococo/src/lib.rs | 37 +- runtime/westend/src/lib.rs | 37 +- runtime/westend/src/tests.rs | 8 + 10 files changed, 230 insertions(+), 357 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 246e5cde9c96..2bcce19ba8c3 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1113,7 +1113,7 @@ parameter_types! { /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. pub MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 65_536; - pub const MessageQueueMaxStale: u32 = 8; + pub const MessageQueueMaxStale: u32 = 16; } /// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. @@ -1510,9 +1510,27 @@ pub type Migrations = ( pallet_nomination_pools::migration::v5::MigrateToV5, parachains_configuration::migration::v5::MigrateToV5, // Remove UMP dispatch queue - parachains_configuration::migration::MigrateV5ToV6, + migrations::UpdateUmpLimits, ); +/// Helpers to configure all migrations. +pub mod migrations { + use runtime_parachains::configuration::migration_ump; + + pub const MAX_UPWARD_QUEUE_SIZE: u32 = 4 * 1024 * 1024; + pub const MAX_UPWARD_QUEUE_COUNT: u32 = 838860; + pub const MAX_UPWARD_MESSAGE_SIZE: u32 = (1 << 16) - 5; // Checked in test `max_upward_message_size`. + pub const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32 = 128; + + pub type UpdateUmpLimits = migration_ump::latest::ForceUpdateUmpLimits< + super::Runtime, + MAX_UPWARD_QUEUE_SIZE, + MAX_UPWARD_QUEUE_COUNT, + MAX_UPWARD_MESSAGE_SIZE, + MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + >; +} + /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; diff --git a/runtime/kusama/src/tests.rs b/runtime/kusama/src/tests.rs index b2dd5759f3a9..503c8bd6641a 100644 --- a/runtime/kusama/src/tests.rs +++ b/runtime/kusama/src/tests.rs @@ -146,3 +146,11 @@ fn nominator_limit() { fn call_size() { RuntimeCall::assert_size_under(230); } + +#[test] +fn max_upward_message_size() { + assert_eq!( + migrations::MAX_UPWARD_MESSAGE_SIZE, + pallet_message_queue::MaxMessageLenOf::::get() + ); +} diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index 30321649c441..a5de197b969d 100644 --- a/runtime/parachains/src/configuration.rs +++ b/runtime/parachains/src/configuration.rs @@ -429,7 +429,7 @@ where /// This function panics if the configuration is inconsistent. pub fn panic_if_not_consistent(&self) { if let Err(err) = self.check_consistency() { - panic!("Host configuration is inconsistent: {:?}", err); + panic!("Host configuration is inconsistent: {:?}\nCfg:\n{:#?}", err, self); } } } @@ -1247,7 +1247,7 @@ impl Pallet { // duplicated code (making this function to show up in the top of heaviest functions) only for // the sake of essentially avoiding an indirect call. Doesn't worth it. #[inline(never)] - fn schedule_config_update( + pub(crate) fn schedule_config_update( updater: impl FnOnce(&mut HostConfiguration), ) -> DispatchResult { let mut pending_configs = >::get(); diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs index 15d6441b9104..7be8e0a35e15 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -31,11 +31,8 @@ use sp_std::vec::Vec; /// v4-v5: /// + /// + -/// v5-v6: (remove UMP dispatch queue) -pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(6); - -// The V6 migration is in its own file to avoid merge conflicts. -pub use crate::configuration::migration_ump::v6::MigrateV5ToV6; +/// + (remove UMP dispatch queue) +pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(5); pub mod v5 { use super::*; @@ -170,12 +167,19 @@ pub mod v5 { #[cfg(feature = "try-runtime")] fn post_upgrade(_state: Vec) -> Result<(), &'static str> { - log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade()"); + log::info!(target: crate::configuration::LOG_TARGET, "Running post_upgrade()"); ensure!( StorageVersion::get::>() == StorageVersion::new(5), "Storage version should be 5 after the migration" ); + log::info!(target: crate::configuration::LOG_TARGET, "Checking active config"); + ActiveConfig::::get().panic_if_not_consistent(); + PendingConfigs::::get().iter().for_each(|(s, cfg)| { + log::info!(target: crate::configuration::LOG_TARGET, "Checking config s={}", s); + cfg.panic_if_not_consistent(); + }); + Ok(()) } } diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index e136eff8fae2..88a4b8b5de6b 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -14,361 +14,108 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -//! A module that is responsible for migration of storage. +//! A module that is responsible for migration of UMP storage. -use crate::configuration::{self, ActiveConfig, Config, Pallet, LOG_TARGET}; -use frame_support::{pallet_prelude::*, traits::StorageVersion, weights::Weight}; -use frame_system::pallet_prelude::BlockNumberFor; -use primitives::vstaging::AsyncBackingParams; +use crate::configuration::{ + self, ActiveConfig, Config, PendingConfigs, WeightInfo, LOG_TARGET, +}; +use frame_support::{pallet_prelude::*}; -pub mod v6 { +pub mod latest { use super::*; - use frame_support::traits::OnRuntimeUpgrade; - use primitives::{Balance, SessionIndex}; - #[cfg(feature = "try-runtime")] - use sp_std::prelude::*; - - #[derive(parity_scale_codec::Encode, parity_scale_codec::Decode, Debug)] - pub struct OldHostConfiguration { - pub max_code_size: u32, - pub max_head_data_size: u32, - pub max_upward_queue_count: u32, - pub max_upward_queue_size: u32, - pub max_upward_message_size: u32, - pub max_upward_message_num_per_candidate: u32, - pub hrmp_max_message_num_per_candidate: u32, - pub validation_upgrade_cooldown: BlockNumber, - pub validation_upgrade_delay: BlockNumber, - pub max_pov_size: u32, - pub max_downward_message_size: u32, - pub ump_service_total_weight: Weight, - pub hrmp_max_parachain_outbound_channels: u32, - pub hrmp_max_parathread_outbound_channels: u32, - pub hrmp_sender_deposit: Balance, - pub hrmp_recipient_deposit: Balance, - pub hrmp_channel_max_capacity: u32, - pub hrmp_channel_max_total_size: u32, - pub hrmp_max_parachain_inbound_channels: u32, - pub hrmp_max_parathread_inbound_channels: u32, - pub hrmp_channel_max_message_size: u32, - pub code_retention_period: BlockNumber, - pub parathread_cores: u32, - pub parathread_retries: u32, - pub group_rotation_frequency: BlockNumber, - pub chain_availability_period: BlockNumber, - pub thread_availability_period: BlockNumber, - pub scheduling_lookahead: u32, - pub max_validators_per_core: Option, - pub max_validators: Option, - pub dispute_period: SessionIndex, - pub dispute_post_conclusion_acceptance_period: BlockNumber, - pub dispute_conclusion_by_time_out_period: BlockNumber, - pub no_show_slots: u32, - pub n_delay_tranches: u32, - pub zeroth_delay_tranche_width: u32, - pub needed_approvals: u32, - pub relay_vrf_modulo_samples: u32, - pub ump_max_individual_weight: Weight, - pub pvf_checking_enabled: bool, - pub pvf_voting_ttl: SessionIndex, - pub minimum_validation_upgrade_delay: BlockNumber, - } - - impl> Default for OldHostConfiguration { - fn default() -> Self { - Self { - group_rotation_frequency: 1u32.into(), - chain_availability_period: 1u32.into(), - thread_availability_period: 1u32.into(), - no_show_slots: 1u32.into(), - validation_upgrade_cooldown: Default::default(), - validation_upgrade_delay: Default::default(), - code_retention_period: Default::default(), - max_code_size: Default::default(), - max_pov_size: Default::default(), - max_head_data_size: Default::default(), - parathread_cores: Default::default(), - parathread_retries: Default::default(), - scheduling_lookahead: Default::default(), - max_validators_per_core: Default::default(), - max_validators: None, - dispute_period: 6, - dispute_post_conclusion_acceptance_period: 100.into(), - dispute_conclusion_by_time_out_period: 200.into(), - n_delay_tranches: Default::default(), - zeroth_delay_tranche_width: Default::default(), - needed_approvals: Default::default(), - relay_vrf_modulo_samples: Default::default(), - max_upward_queue_count: Default::default(), - max_upward_queue_size: Default::default(), - max_downward_message_size: Default::default(), - ump_service_total_weight: Weight::zero(), - max_upward_message_size: Default::default(), - max_upward_message_num_per_candidate: Default::default(), - hrmp_sender_deposit: Default::default(), - hrmp_recipient_deposit: Default::default(), - hrmp_channel_max_capacity: Default::default(), - hrmp_channel_max_total_size: Default::default(), - hrmp_max_parachain_inbound_channels: Default::default(), - hrmp_max_parathread_inbound_channels: Default::default(), - hrmp_channel_max_message_size: Default::default(), - hrmp_max_parachain_outbound_channels: Default::default(), - hrmp_max_parathread_outbound_channels: Default::default(), - hrmp_max_message_num_per_candidate: Default::default(), - ump_max_individual_weight: Weight::zero(), - pvf_checking_enabled: false, - pvf_voting_ttl: 2u32.into(), - minimum_validation_upgrade_delay: 2.into(), - } - } - } - - pub struct MigrateV5ToV6(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateV5ToV6 { + use frame_support::{pallet_prelude::Weight, traits::OnRuntimeUpgrade}; + + /// Force update the UMP limits in the parachain host config. + /// + /// **Should only be used when there are no pending migrations for the configuration pallet.** + // NOTE: `OnRuntimeUpgrade` does not have a `self`, so everything must be compile time. + pub struct ForceUpdateUmpLimits< + T, + const MAX_UPWARD_QUEUE_SIZE: u32, + const MAX_UPWARD_QUEUE_COUNT: u32, + const MAX_UPWARD_MESSAGE_SIZE: u32, + const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32, + >(core::marker::PhantomData); + + impl< + T: Config, + const MAX_UPWARD_QUEUE_SIZE: u32, + const MAX_UPWARD_QUEUE_COUNT: u32, + const MAX_UPWARD_MESSAGE_SIZE: u32, + const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32, + > OnRuntimeUpgrade + for ForceUpdateUmpLimits< + T, + MAX_UPWARD_QUEUE_SIZE, + MAX_UPWARD_QUEUE_COUNT, + MAX_UPWARD_MESSAGE_SIZE, + MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + > + { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - ensure!(StorageVersion::get::>() == 5, "The migration requires version 5"); - log::trace!(target: LOG_TARGET, "Going to upgraded parachain config..."); + fn pre_upgrade() -> Result, &'static str> { + log::info!(target: LOG_TARGET, "pre_upgrade"); + let mut pending = PendingConfigs::::get(); + pending.sort_by_key(|(s, _)| *s); + pending.last().map(|(_, cfg)| cfg.panic_if_not_consistent()); + + log::info!( + target: LOG_TARGET, + "Active HostConfig:\n\n{:#?}\n", + ActiveConfig::::get() + ); + log::info!( + target: LOG_TARGET, + "Last pending HostConfig upgrade:\n\n{:#?}\n", + pending.last() + ); - Ok(Vec::new()) + Ok((pending.len() as u32).encode()) } fn on_runtime_upgrade() -> Weight { - if StorageVersion::get::>() == 5 { - let weight_consumed = migrate_v5_to_v6::(); - - log::info!(target: LOG_TARGET, "MigrateV5ToV6 executed successfully"); - StorageVersion::new(6).put::>(); - - weight_consumed - } else { - log::warn!(target: LOG_TARGET, "MigrateV5ToV6 should be removed."); - T::DbWeight::get().reads(1) + if let Err(e) = configuration::Pallet::::schedule_config_update(|cfg| { + cfg.max_upward_queue_size = MAX_UPWARD_QUEUE_SIZE; + cfg.max_upward_queue_count = MAX_UPWARD_QUEUE_COUNT; + cfg.max_upward_message_size = MAX_UPWARD_MESSAGE_SIZE; + cfg.max_upward_message_num_per_candidate = MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE; + }) { + log::error!( + target: LOG_TARGET, + "\n!!!!!!!!!!!!!!!!!!!!!!!!\nFailed to schedule HostConfig upgrade: {:?}\n!!!!!!!!!!!!!!!!!!!!!!!!\n", + e, + ); } + + T::WeightInfo::set_config_with_block_number() } #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), &'static str> { - log::trace!(target: LOG_TARGET, "Running post_upgrade()"); - ensure!( - StorageVersion::get::>() == 6, - "Storage version should be 6 after the migration" - ); - ensure!( - StorageVersion::get::>() == - crate::configuration::migration::STORAGE_VERSION, - "Storage version should be STORAGE_VERSION after the migration" + fn post_upgrade(state: sp_std::vec::Vec) -> Result<(), &'static str> { + log::info!(target: LOG_TARGET, "post_upgrade"); + let old_pending: u32 = Decode::decode(&mut &state[..]).expect("Known good"); + let mut pending = PendingConfigs::::get(); + pending.sort_by_key(|(s, _)| *s); + + log::info!( + target: LOG_TARGET, + "Last pending HostConfig upgrade:\n\n{:#?}\n", + pending.last() ); - - Ok(()) - } - } -} - -fn migrate_v5_to_v6() -> Weight { - // Unusual formatting is justified: - // - make it easier to verify that fields assign what they supposed to assign. - // - this code is transient and will be removed after all migrations are done. - // - this code is important enough to optimize for legibility sacrificing consistency. - #[rustfmt::skip] - let translate = - |pre: v6::OldHostConfiguration>| -> -configuration::HostConfiguration> - { - super::HostConfiguration { -max_code_size : pre.max_code_size, -max_head_data_size : pre.max_head_data_size, -max_upward_queue_count : pre.max_upward_queue_count, -max_upward_queue_size : pre.max_upward_queue_size, -max_upward_message_size : pre.max_upward_message_size, -max_upward_message_num_per_candidate : pre.max_upward_message_num_per_candidate, -hrmp_max_message_num_per_candidate : pre.hrmp_max_message_num_per_candidate, -validation_upgrade_cooldown : pre.validation_upgrade_cooldown, -validation_upgrade_delay : pre.validation_upgrade_delay, -max_pov_size : pre.max_pov_size, -max_downward_message_size : pre.max_downward_message_size, -hrmp_max_parachain_outbound_channels : pre.hrmp_max_parachain_outbound_channels, -hrmp_max_parathread_outbound_channels : pre.hrmp_max_parathread_outbound_channels, -hrmp_sender_deposit : pre.hrmp_sender_deposit, -hrmp_recipient_deposit : pre.hrmp_recipient_deposit, -hrmp_channel_max_capacity : pre.hrmp_channel_max_capacity, -hrmp_channel_max_total_size : pre.hrmp_channel_max_total_size, -hrmp_max_parachain_inbound_channels : pre.hrmp_max_parachain_inbound_channels, -hrmp_max_parathread_inbound_channels : pre.hrmp_max_parathread_inbound_channels, -hrmp_channel_max_message_size : pre.hrmp_channel_max_message_size, -code_retention_period : pre.code_retention_period, -parathread_cores : pre.parathread_cores, -parathread_retries : pre.parathread_retries, -group_rotation_frequency : pre.group_rotation_frequency, -chain_availability_period : pre.chain_availability_period, -thread_availability_period : pre.thread_availability_period, -scheduling_lookahead : pre.scheduling_lookahead, -max_validators_per_core : pre.max_validators_per_core, -max_validators : pre.max_validators, -dispute_period : pre.dispute_period, -dispute_post_conclusion_acceptance_period: pre.dispute_post_conclusion_acceptance_period, -no_show_slots : pre.no_show_slots, -n_delay_tranches : pre.n_delay_tranches, -zeroth_delay_tranche_width : pre.zeroth_delay_tranche_width, -needed_approvals : pre.needed_approvals, -relay_vrf_modulo_samples : pre.relay_vrf_modulo_samples, -pvf_checking_enabled : pre.pvf_checking_enabled, -pvf_voting_ttl : pre.pvf_voting_ttl, -minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, - -// Default values are zeroes, thus it's ensured allowed ancestry never crosses the upgrade block. -async_backing_params : AsyncBackingParams { max_candidate_depth: 0, allowed_ancestry_len: 0 }, - -// Default executor parameters set is empty -executor_params : Default::default(), - } - }; - - if let Err(err) = ActiveConfig::::translate(|pre| pre.map(translate)) { - // `Err` is returned when the pre-migration type cannot be deserialized. This - // cannot happen if the migration runs correctly, i.e. against the expected version. - // - // This happening almost surely will lead to a panic somewhere else. Corruption seems - // to be unlikely to be caused by this. So we just log. Maybe it'll work out still? - log::error!(target: LOG_TARGET, "Could not translate ActiveConfig object: {:?}", err); - } - - T::DbWeight::get().reads_writes(1, 1) -} - -#[cfg(test)] -mod tests { - use frame_support::weights::constants::{WEIGHT_PROOF_SIZE_PER_MB, WEIGHT_REF_TIME_PER_MILLIS}; - - use super::{v6::*, *}; - use crate::mock::{new_test_ext, Test}; - use frame_support::traits::OnRuntimeUpgrade; - - /// The old config can be decoded from actual on-chain data. - #[test] - fn v5_deserialized_from_actual_data() { - // Example how to get new `raw_config`: - // We'll obtain the raw_config for block on Kusama. - // Steps: - // 1. Go to Polkadot.js -> Developer -> Chain state -> Storage: https://polkadot.js.org/apps/#/chainstate - // 2. Set these parameters: - // 2.1. selected state query: configuration; activeConfig(): PolkadotRuntimeParachainsConfigurationHostConfiguration - // 2.2. blockhash to query at from above. - // 2.3. Note the value of encoded storage key -> 0x06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385 for the referenced block. - // 2.4. You'll also need the decoded values to update the test. - // 3. Go to Polkadot.js -> Developer -> Chain state -> Raw storage - // 3.1 Enter the encoded storage key and you get the raw config. - - // Fetched at Kusama 17,467,443 - // - // This exceeds the maximal line width length, but that's fine, since this is not code and - // doesn't need to be read and also leaving it as one line allows to easily copy it. - let raw_ksm = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c800000700e8764817020040011e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c80000000600000058020000580200000200000059000000000000001e000000280000000700c817a80402004001010200000014000000"]; - - // Same for Polkadot block 15,075,732 - let raw_dot = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a00000040380000580200000000500000c800000700e8764817020040011e0000000000000000e8764817000000000000000000000000e87648170000000000000000000000e8030000009001001e00000000000000009001004038000000000000000000000a0000000a0000000a00000001000000010500000001c80000000600000058020000580200000200000059000000000000001e000000280000000700c817a80402004001010200000014000000"]; - - let check = |old: v6::OldHostConfiguration, cd: u32| { - assert_eq!(old.max_code_size, 10_485_760); - assert_eq!(old.validation_upgrade_cooldown, cd); - assert_eq!(old.max_pov_size, 5_242_880); - assert_eq!(old.hrmp_channel_max_message_size, 102_400); - assert_eq!(old.n_delay_tranches, 89); assert_eq!( - old.ump_max_individual_weight, - Weight::from_parts(20 * WEIGHT_REF_TIME_PER_MILLIS, 5 * WEIGHT_PROOF_SIZE_PER_MB) - ); - assert_eq!(old.minimum_validation_upgrade_delay, 20); - }; - - let old_ksm = - v6::OldHostConfiguration::::decode(&mut &raw_ksm[..]).unwrap(); - check(old_ksm, 3_600); - - let old_dot = - v6::OldHostConfiguration::::decode(&mut &raw_dot[..]).unwrap(); - check(old_dot, 14_400); - } - - #[test] - fn test_migrate_v5_to_v6() { - // Host configuration has lots of fields. However, in this migration we add only a couple of - // fields. The most important part to check are a couple of the last fields. We also pick - // extra fields to check arbitrarily, e.g. depending on their position (i.e. the middle) and - // also their type. - // - // We specify only the picked fields and the rest should be provided by the `Default` - // implementation. That implementation is copied over between the two types and should work - // fine. - let old = v6::OldHostConfiguration:: { - ump_max_individual_weight: Weight::from_parts(0x71616e6f6e0au64, 0x71616e6f6e0au64), - needed_approvals: 69, - thread_availability_period: 55, - hrmp_recipient_deposit: 1337, - max_pov_size: 1111, - chain_availability_period: 33, - minimum_validation_upgrade_delay: 20, - ..Default::default() - }; - - new_test_ext(Default::default()).execute_with(|| { - // Implant the old version in the state. - frame_support::storage::unhashed::put_raw( - &configuration::ActiveConfig::::hashed_key(), - &old.encode(), + pending.len(), + old_pending as usize + 1, + "There must be a new pending upgrade enqueued" ); - StorageVersion::new(5).put::>(); - - #[cfg(feature = "try-runtime")] - MigrateV5ToV6::::pre_upgrade().unwrap(); - let _weight = MigrateV5ToV6::::on_runtime_upgrade(); - #[cfg(feature = "try-runtime")] - MigrateV5ToV6::::post_upgrade(vec![]).unwrap(); - let v5 = configuration::ActiveConfig::::get(); + log::info!(target: LOG_TARGET, "Checking active config"); + ActiveConfig::::get().panic_if_not_consistent(); + PendingConfigs::::get().iter().for_each(|(s, cfg)| { + log::info!(target: LOG_TARGET, "Checking config s={}", s); + cfg.panic_if_not_consistent(); + }); - #[rustfmt::skip] - { - assert_eq!(old.max_code_size , v5.max_code_size); - assert_eq!(old.max_head_data_size , v5.max_head_data_size); - assert_eq!(old.max_upward_queue_count , v5.max_upward_queue_count); - assert_eq!(old.max_upward_queue_size , v5.max_upward_queue_size); - assert_eq!(old.max_upward_message_size , v5.max_upward_message_size); - assert_eq!(old.max_upward_message_num_per_candidate , v5.max_upward_message_num_per_candidate); - assert_eq!(old.hrmp_max_message_num_per_candidate , v5.hrmp_max_message_num_per_candidate); - assert_eq!(old.validation_upgrade_cooldown , v5.validation_upgrade_cooldown); - assert_eq!(old.validation_upgrade_delay , v5.validation_upgrade_delay); - assert_eq!(old.max_pov_size , v5.max_pov_size); - assert_eq!(old.max_downward_message_size , v5.max_downward_message_size); - assert_eq!(old.hrmp_max_parachain_outbound_channels , v5.hrmp_max_parachain_outbound_channels); - assert_eq!(old.hrmp_max_parathread_outbound_channels , v5.hrmp_max_parathread_outbound_channels); - assert_eq!(old.hrmp_sender_deposit , v5.hrmp_sender_deposit); - assert_eq!(old.hrmp_recipient_deposit , v5.hrmp_recipient_deposit); - assert_eq!(old.hrmp_channel_max_capacity , v5.hrmp_channel_max_capacity); - assert_eq!(old.hrmp_channel_max_total_size , v5.hrmp_channel_max_total_size); - assert_eq!(old.hrmp_max_parachain_inbound_channels , v5.hrmp_max_parachain_inbound_channels); - assert_eq!(old.hrmp_max_parathread_inbound_channels , v5.hrmp_max_parathread_inbound_channels); - assert_eq!(old.hrmp_channel_max_message_size , v5.hrmp_channel_max_message_size); - assert_eq!(old.code_retention_period , v5.code_retention_period); - assert_eq!(old.parathread_cores , v5.parathread_cores); - assert_eq!(old.parathread_retries , v5.parathread_retries); - assert_eq!(old.group_rotation_frequency , v5.group_rotation_frequency); - assert_eq!(old.chain_availability_period , v5.chain_availability_period); - assert_eq!(old.thread_availability_period , v5.thread_availability_period); - assert_eq!(old.scheduling_lookahead , v5.scheduling_lookahead); - assert_eq!(old.max_validators_per_core , v5.max_validators_per_core); - assert_eq!(old.max_validators , v5.max_validators); - assert_eq!(old.dispute_period , v5.dispute_period); - assert_eq!(old.dispute_post_conclusion_acceptance_period, v5.dispute_post_conclusion_acceptance_period); - assert_eq!(old.no_show_slots , v5.no_show_slots); - assert_eq!(old.n_delay_tranches , v5.n_delay_tranches); - assert_eq!(old.zeroth_delay_tranche_width , v5.zeroth_delay_tranche_width); - assert_eq!(old.needed_approvals , v5.needed_approvals); - assert_eq!(old.relay_vrf_modulo_samples , v5.relay_vrf_modulo_samples); - assert_eq!(old.pvf_checking_enabled , v5.pvf_checking_enabled); - assert_eq!(old.pvf_voting_ttl , v5.pvf_voting_ttl); - assert_eq!(old.minimum_validation_upgrade_delay , v5.minimum_validation_upgrade_delay); - }; // ; makes this a statement. `rustfmt::skip` cannot be put on an expression. - }); + Ok(()) + } } } diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 2f9db870711d..b3a11e42e418 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -77,7 +77,7 @@ impl WeightInfo for () { /// /// This is used for benchmarking sanely bounding relevant storage items. It is expected from the `configuration` /// pallet to check these values before setting. -pub const MAX_UPWARD_MESSAGE_SIZE_BOUND: u32 = 50 * 1024; +pub const MAX_UPWARD_MESSAGE_SIZE_BOUND: u32 = 64 * 1024; /// A bitfield signed by a validator indicating that it is keeping its piece of the erasure-coding /// for any backed candidates referred to by a `1` bit available. diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 7380162f6c14..a36e5f498e0b 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1468,9 +1468,27 @@ pub type Migrations = ( pallet_nomination_pools::migration::v5::MigrateToV5, parachains_configuration::migration::v5::MigrateToV5, // Remove UMP dispatch queue - parachains_configuration::migration::MigrateV5ToV6, + migrations::UpdateUmpLimits, ); +/// Helpers to configure all migrations. +pub mod migrations { + use runtime_parachains::configuration::migration_ump; + + pub const MAX_UPWARD_QUEUE_SIZE: u32 = 1 * 1024 * 1024; + pub const MAX_UPWARD_QUEUE_COUNT: u32 = 209715; + pub const MAX_UPWARD_MESSAGE_SIZE: u32 = (1 << 16) - 5; // Checked in test `max_upward_message_size`. + pub const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32 = 16; + + pub type UpdateUmpLimits = migration_ump::latest::ForceUpdateUmpLimits< + super::Runtime, + MAX_UPWARD_QUEUE_SIZE, + MAX_UPWARD_QUEUE_COUNT, + MAX_UPWARD_MESSAGE_SIZE, + MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + >; +} + /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -2228,6 +2246,14 @@ mod test { If the limit is too strong, maybe consider increase the limit", ); } + + #[test] + fn max_upward_message_size() { + assert_eq!( + migrations::MAX_UPWARD_MESSAGE_SIZE, + pallet_message_queue::MaxMessageLenOf::::get() + ); + } } #[cfg(test)] diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index a8b1088a4da4..3860087273f7 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1046,8 +1046,8 @@ parameter_types! { /// /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. pub MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; - pub const MessageQueueHeapSize: u32 = 65_536; - pub const MessageQueueMaxStale: u32 = 8; + pub const MessageQueueHeapSize: u32 = 32 * 1024; + pub const MessageQueueMaxStale: u32 = 96; } /// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. @@ -1516,9 +1516,26 @@ pub type UncheckedExtrinsic = pub type Migrations = ( parachains_configuration::migration::v5::MigrateToV5, // Remove UMP dispatch queue - parachains_configuration::migration::MigrateV5ToV6, ); +/// Helpers to configure all migrations. +pub mod migrations { + use runtime_parachains::configuration::migration_ump; + + pub const MAX_UPWARD_QUEUE_SIZE: u32 = 8 * 1024 * 1024; + pub const MAX_UPWARD_QUEUE_COUNT: u32 = 1398101; + pub const MAX_UPWARD_MESSAGE_SIZE: u32 = (1 << 15) - 5; // Checked in test `max_upward_message_size`. + pub const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32 = 1024; + + pub type UpdateUmpLimits = migration_ump::latest::ForceUpdateUmpLimits< + super::Runtime, + MAX_UPWARD_QUEUE_SIZE, + MAX_UPWARD_QUEUE_COUNT, + MAX_UPWARD_MESSAGE_SIZE, + MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + >; +} + /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -2181,6 +2198,20 @@ mod encoding_tests { } } +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn max_upward_message_size() { + use sp_core::Get; + assert_eq!( + migrations::MAX_UPWARD_MESSAGE_SIZE, + pallet_message_queue::MaxMessageLenOf::::get() + ); + } +} + #[cfg(all(test, feature = "try-runtime"))] mod remote_tests { use super::*; diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 1f22142f68d7..42d7adc992e0 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -921,8 +921,8 @@ parameter_types! { /// /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. pub MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; - pub const MessageQueueHeapSize: u32 = 65_536; - pub const MessageQueueMaxStale: u32 = 8; + pub const MessageQueueHeapSize: u32 = 128 * 1024; + pub const MessageQueueMaxStale: u32 = 48; } /// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. @@ -1267,9 +1267,27 @@ pub type Migrations = ( pallet_nomination_pools::migration::v5::MigrateToV5, parachains_configuration::migration::v5::MigrateToV5, // Remove UMP dispatch queue - parachains_configuration::migration::MigrateV5ToV6, + migrations::UpdateUmpLimits, ); +/// Helpers to configure all migrations. +pub mod migrations { + use runtime_parachains::configuration::migration_ump; + + pub const MAX_UPWARD_QUEUE_SIZE: u32 = 8 * 1024 * 1024; + pub const MAX_UPWARD_QUEUE_COUNT: u32 = 1398101; + pub const MAX_UPWARD_MESSAGE_SIZE: u32 = (1 << 17) - 5; // Checked in test `max_upward_message_size`. + pub const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32 = 512; + + pub type UpdateUmpLimits = migration_ump::latest::ForceUpdateUmpLimits< + super::Runtime, + MAX_UPWARD_QUEUE_SIZE, + MAX_UPWARD_QUEUE_COUNT, + MAX_UPWARD_MESSAGE_SIZE, + MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + >; +} + /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -1928,6 +1946,19 @@ sp_api::impl_runtime_apis! { } } +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn max_upward_message_size() { + assert_eq!( + migrations::MAX_UPWARD_MESSAGE_SIZE, + pallet_message_queue::MaxMessageLenOf::::get() + ); + } +} + #[cfg(all(test, feature = "try-runtime"))] mod remote_tests { use super::*; diff --git a/runtime/westend/src/tests.rs b/runtime/westend/src/tests.rs index 226410b0729e..b532a259d20e 100644 --- a/runtime/westend/src/tests.rs +++ b/runtime/westend/src/tests.rs @@ -50,6 +50,14 @@ fn call_size() { ); } +#[test] +fn max_upward_message_size() { + assert_eq!( + migrations::MAX_UPWARD_MESSAGE_SIZE, + pallet_message_queue::MaxMessageLenOf::::get() + ); +} + #[test] fn sanity_check_teleport_assets_weight() { // This test sanity checks that at least 50 teleports can exist in a block. From 1a4486ecf049b3fbb47a8c95794ed276f76f1a91 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 19 Apr 2023 16:46:52 +0200 Subject: [PATCH 141/182] fmt Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration/migration_ump.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index 88a4b8b5de6b..1debdc089e03 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -16,10 +16,8 @@ //! A module that is responsible for migration of UMP storage. -use crate::configuration::{ - self, ActiveConfig, Config, PendingConfigs, WeightInfo, LOG_TARGET, -}; -use frame_support::{pallet_prelude::*}; +use crate::configuration::{self, ActiveConfig, Config, PendingConfigs, WeightInfo, LOG_TARGET}; +use frame_support::pallet_prelude::*; pub mod latest { use super::*; From dad295e3c8f6808e8a5cf8b2a706ae651774eeaa Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 19 Apr 2023 17:00:16 +0200 Subject: [PATCH 142/182] clippy Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration/migration_ump.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index 1debdc089e03..d26ef08fca07 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -17,11 +17,11 @@ //! A module that is responsible for migration of UMP storage. use crate::configuration::{self, ActiveConfig, Config, PendingConfigs, WeightInfo, LOG_TARGET}; -use frame_support::pallet_prelude::*; pub mod latest { use super::*; use frame_support::{pallet_prelude::Weight, traits::OnRuntimeUpgrade}; + use parity_scale_codec::{Decode, Encode}; /// Force update the UMP limits in the parachain host config. /// From 24964aac09cd2eb8c3af04d1882a5fa22bcadd67 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 19 Apr 2023 17:10:05 +0200 Subject: [PATCH 143/182] clippy Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration/migration_ump.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index d26ef08fca07..0899110bf0c4 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -16,12 +16,13 @@ //! A module that is responsible for migration of UMP storage. +#![allow(unused_imports)] // Since we use features. use crate::configuration::{self, ActiveConfig, Config, PendingConfigs, WeightInfo, LOG_TARGET}; +use parity_scale_codec::Decode; pub mod latest { use super::*; use frame_support::{pallet_prelude::Weight, traits::OnRuntimeUpgrade}; - use parity_scale_codec::{Decode, Encode}; /// Force update the UMP limits in the parachain host config. /// From 545d0560233652302105dbadad8eaf395fa10cd1 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 19 Apr 2023 17:30:43 +0200 Subject: [PATCH 144/182] imports Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration/migration_ump.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index 0899110bf0c4..1039aad0908a 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -17,8 +17,9 @@ //! A module that is responsible for migration of UMP storage. #![allow(unused_imports)] // Since we use features. + use crate::configuration::{self, ActiveConfig, Config, PendingConfigs, WeightInfo, LOG_TARGET}; -use parity_scale_codec::Decode; +use parity_scale_codec::{Decode, Encode}; pub mod latest { use super::*; From 4b0be4df5711c3416d5495ec42fe8f33b4df3dff Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 19 Apr 2023 20:14:13 +0200 Subject: [PATCH 145/182] Use defensive instead of defensive_proof 'defensive_proof' also prints the 'self', which spams the console too much when running the tests. Just the length is enough. Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index b3a11e42e418..6ac03c90c77b 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -29,6 +29,7 @@ use crate::{ }; use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec}; use frame_support::{ + defensive, pallet_prelude::*, traits::{Defensive, EnqueueMessage}, BoundedSlice, @@ -1017,7 +1018,10 @@ impl Pallet { .iter() .filter_map(|d| { BoundedSlice::try_from(&d[..]) - .defensive_proof("Too long inbound upward message in accepted candidate.") + .map_err(|e| { + defensive!("Too long inbound upward message (l={}) in accepted candidate. Ignoring.", d.len()); + e + }) .ok() }) .collect(); From 79f475edbb1f548c26a6d988c6fac127dd9dd24d Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 20 Apr 2023 11:45:22 +0200 Subject: [PATCH 146/182] Rename to ScheduleConfigUpdate Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 2 +- runtime/parachains/src/configuration/migration_ump.rs | 6 ++---- runtime/polkadot/src/lib.rs | 2 +- runtime/rococo/src/lib.rs | 2 +- runtime/westend/src/lib.rs | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 43cb52cfe178..b838c3ed3eea 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1522,7 +1522,7 @@ pub mod migrations { pub const MAX_UPWARD_MESSAGE_SIZE: u32 = (1 << 16) - 5; // Checked in test `max_upward_message_size`. pub const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32 = 128; - pub type UpdateUmpLimits = migration_ump::latest::ForceUpdateUmpLimits< + pub type UpdateUmpLimits = migration_ump::latest::ScheduleConfigUpdate< super::Runtime, MAX_UPWARD_QUEUE_SIZE, MAX_UPWARD_QUEUE_COUNT, diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index 1039aad0908a..1b10bc1b3184 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -26,10 +26,8 @@ pub mod latest { use frame_support::{pallet_prelude::Weight, traits::OnRuntimeUpgrade}; /// Force update the UMP limits in the parachain host config. - /// - /// **Should only be used when there are no pending migrations for the configuration pallet.** // NOTE: `OnRuntimeUpgrade` does not have a `self`, so everything must be compile time. - pub struct ForceUpdateUmpLimits< + pub struct ScheduleConfigUpdate< T, const MAX_UPWARD_QUEUE_SIZE: u32, const MAX_UPWARD_QUEUE_COUNT: u32, @@ -44,7 +42,7 @@ pub mod latest { const MAX_UPWARD_MESSAGE_SIZE: u32, const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32, > OnRuntimeUpgrade - for ForceUpdateUmpLimits< + for ScheduleConfigUpdate< T, MAX_UPWARD_QUEUE_SIZE, MAX_UPWARD_QUEUE_COUNT, diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 870e4070d6f1..87c96dc5a248 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1480,7 +1480,7 @@ pub mod migrations { pub const MAX_UPWARD_MESSAGE_SIZE: u32 = (1 << 16) - 5; // Checked in test `max_upward_message_size`. pub const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32 = 16; - pub type UpdateUmpLimits = migration_ump::latest::ForceUpdateUmpLimits< + pub type UpdateUmpLimits = migration_ump::latest::ScheduleConfigUpdate< super::Runtime, MAX_UPWARD_QUEUE_SIZE, MAX_UPWARD_QUEUE_COUNT, diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index e15f0b1a4b7c..f88f429229b2 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1530,7 +1530,7 @@ pub mod migrations { pub const MAX_UPWARD_MESSAGE_SIZE: u32 = (1 << 15) - 5; // Checked in test `max_upward_message_size`. pub const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32 = 1024; - pub type UpdateUmpLimits = migration_ump::latest::ForceUpdateUmpLimits< + pub type UpdateUmpLimits = migration_ump::latest::ScheduleConfigUpdate< super::Runtime, MAX_UPWARD_QUEUE_SIZE, MAX_UPWARD_QUEUE_COUNT, diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 669ad8e769b5..92a51184d40e 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1279,7 +1279,7 @@ pub mod migrations { pub const MAX_UPWARD_MESSAGE_SIZE: u32 = (1 << 17) - 5; // Checked in test `max_upward_message_size`. pub const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32 = 512; - pub type UpdateUmpLimits = migration_ump::latest::ForceUpdateUmpLimits< + pub type UpdateUmpLimits = migration_ump::latest::ScheduleConfigUpdate< super::Runtime, MAX_UPWARD_QUEUE_SIZE, MAX_UPWARD_QUEUE_COUNT, From a17f1e89eb5ce6f7166e90dfbba5f619a7862e7d Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 20 Apr 2023 11:57:30 +0200 Subject: [PATCH 147/182] Fixup migration checks Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/configuration/migration.rs | 7 ------- .../parachains/src/configuration/migration_ump.rs | 12 ++++++++++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs index 7be8e0a35e15..ca63801ae2d0 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -173,13 +173,6 @@ pub mod v5 { "Storage version should be 5 after the migration" ); - log::info!(target: crate::configuration::LOG_TARGET, "Checking active config"); - ActiveConfig::::get().panic_if_not_consistent(); - PendingConfigs::::get().iter().for_each(|(s, cfg)| { - log::info!(target: crate::configuration::LOG_TARGET, "Checking config s={}", s); - cfg.panic_if_not_consistent(); - }); - Ok(()) } } diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index 1b10bc1b3184..c72d1fa94c61 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -106,13 +106,21 @@ pub mod latest { "There must be a new pending upgrade enqueued" ); - log::info!(target: LOG_TARGET, "Checking active config"); - ActiveConfig::::get().panic_if_not_consistent(); + let mut any_pending_valid = false; PendingConfigs::::get().iter().for_each(|(s, cfg)| { log::info!(target: LOG_TARGET, "Checking config s={}", s); cfg.panic_if_not_consistent(); + any_pending_valid = true; }); + if let Err(err) = ActiveConfig::::get().check_consistency() { + if any_pending_valid { + log::error!(target: LOG_TARGET, "The ActiveConfig is inconsistent: {:?}. We tolerate this since there are pending consistent upgrades.", err); + } else { + panic!("The ActiveConfig is inconsistent: {:?} and there are no pending consistent ones.", err) + } + } + Ok(()) } } From 7caffb09e83083b57affd548215e45b25c3d64dc Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 20 Apr 2023 11:47:03 +0200 Subject: [PATCH 148/182] Add MAX_CODE_SIZE to ScheduleConfigUpdate Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 2 ++ runtime/parachains/src/configuration/migration_ump.rs | 4 ++++ runtime/polkadot/src/lib.rs | 2 ++ runtime/rococo/src/lib.rs | 2 ++ runtime/westend/src/lib.rs | 2 ++ 5 files changed, 12 insertions(+) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index b838c3ed3eea..2679bcfad43a 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1515,6 +1515,7 @@ pub type Migrations = ( /// Helpers to configure all migrations. pub mod migrations { + use primitives::MAX_CODE_SIZE; use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 4 * 1024 * 1024; @@ -1528,6 +1529,7 @@ pub mod migrations { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + MAX_CODE_SIZE, >; } diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index c72d1fa94c61..c305d1f5f9d6 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -33,6 +33,7 @@ pub mod latest { const MAX_UPWARD_QUEUE_COUNT: u32, const MAX_UPWARD_MESSAGE_SIZE: u32, const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32, + const MAX_CODE_SIZE: u32, >(core::marker::PhantomData); impl< @@ -41,6 +42,7 @@ pub mod latest { const MAX_UPWARD_QUEUE_COUNT: u32, const MAX_UPWARD_MESSAGE_SIZE: u32, const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32, + const MAX_CODE_SIZE: u32, > OnRuntimeUpgrade for ScheduleConfigUpdate< T, @@ -48,6 +50,7 @@ pub mod latest { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + MAX_CODE_SIZE, > { #[cfg(feature = "try-runtime")] @@ -77,6 +80,7 @@ pub mod latest { cfg.max_upward_queue_count = MAX_UPWARD_QUEUE_COUNT; cfg.max_upward_message_size = MAX_UPWARD_MESSAGE_SIZE; cfg.max_upward_message_num_per_candidate = MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE; + cfg.max_code_size = MAX_CODE_SIZE; }) { log::error!( target: LOG_TARGET, diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 87c96dc5a248..2e03add536e7 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1473,6 +1473,7 @@ pub type Migrations = ( /// Helpers to configure all migrations. pub mod migrations { + use primitives::MAX_CODE_SIZE; use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 1 * 1024 * 1024; @@ -1486,6 +1487,7 @@ pub mod migrations { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + MAX_CODE_SIZE, >; } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index f88f429229b2..ed669d562a7b 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1523,6 +1523,7 @@ pub type Migrations = ( /// Helpers to configure all migrations. pub mod migrations { + use primitives::MAX_CODE_SIZE; use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 8 * 1024 * 1024; @@ -1536,6 +1537,7 @@ pub mod migrations { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + MAX_CODE_SIZE, >; } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 92a51184d40e..77dc1c7cb7a6 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1272,6 +1272,7 @@ pub type Migrations = ( /// Helpers to configure all migrations. pub mod migrations { + use primitives::MAX_CODE_SIZE; use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 8 * 1024 * 1024; @@ -1285,6 +1286,7 @@ pub mod migrations { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + MAX_CODE_SIZE, >; } From 103ffbaf686487d2fbe0082a16826af17cacc1a1 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 20 Apr 2023 11:47:13 +0200 Subject: [PATCH 149/182] Set MAX_CODE_SIZE to 4MiB Signed-off-by: Oliver Tale-Yazdi --- primitives/src/v4/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/primitives/src/v4/mod.rs b/primitives/src/v4/mod.rs index 3fc38210654a..1f3572191474 100644 --- a/primitives/src/v4/mod.rs +++ b/primitives/src/v4/mod.rs @@ -363,8 +363,10 @@ pub const ASSIGNMENT_KEY_TYPE_ID: KeyTypeId = KeyTypeId(*b"asgn"); /// * initial genesis for the Parachains configuration /// * checking updates to this stored runtime configuration do not exceed this limit /// * when detecting a code decompression bomb in the client +/// +/// Should never be larger than the total block size. // NOTE: This value is used in the runtime so be careful when changing it. -pub const MAX_CODE_SIZE: u32 = 10 * 1024 * 1024; +pub const MAX_CODE_SIZE: u32 = 4 * 1024 * 1024; /// Maximum head data size we support right now. /// From 438e9187873e6642d323073ba1f96f173fb5cb69 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 21 Apr 2023 15:11:10 +0200 Subject: [PATCH 150/182] Fix benchmark Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/benchmarking.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/runtime/parachains/src/inclusion/benchmarking.rs b/runtime/parachains/src/inclusion/benchmarking.rs index 700ea440c1ea..0471c0c3b2bf 100644 --- a/runtime/parachains/src/inclusion/benchmarking.rs +++ b/runtime/parachains/src/inclusion/benchmarking.rs @@ -16,14 +16,21 @@ use super::*; use frame_benchmarking::benchmarks; +use pallet_message_queue as mq; benchmarks! { + where_clause { + where + T: mq::Config, + } + receive_upward_messages { let i in 1 .. 1000; + let max_len = mq::MaxMessageLenOf::::get() as usize; let para = 42u32.into(); // not especially important. - let upward_messages = vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND as usize]; i as usize]; - Pallet::::receive_upward_messages(para, vec![vec![0; MAX_UPWARD_MESSAGE_SIZE_BOUND as usize]; 1].as_slice()); + let upward_messages = vec![vec![0; max_len]; i as usize]; + Pallet::::receive_upward_messages(para, vec![vec![0; max_len]; 1].as_slice()); }: { Pallet::::receive_upward_messages(para, upward_messages.as_slice()) } impl_benchmark_test_suite!( From ec8111f65ce2fa7701432f9471ea7485a8adfecb Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 21 Apr 2023 15:11:20 +0200 Subject: [PATCH 151/182] Fix formatting Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 6ac03c90c77b..54fddb3a35a7 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -1014,17 +1014,18 @@ impl Pallet { /// to deal with the messages as given. Messages that are too long will be ignored since such /// candidates should have already been rejected in [`Self::check_upward_messages`]. pub(crate) fn receive_upward_messages(para: ParaId, upward_messages: &[Vec]) -> Weight { - let bounded = upward_messages - .iter() - .filter_map(|d| { - BoundedSlice::try_from(&d[..]) - .map_err(|e| { - defensive!("Too long inbound upward message (l={}) in accepted candidate. Ignoring.", d.len()); - e - }) - .ok() - }) - .collect(); + let bounded = + upward_messages + .iter() + .filter_map(|d| { + BoundedSlice::try_from(&d[..]) + .map_err(|e| { + defensive!("Too long inbound upward message in accepted candidate. Ignoring. L=", d.len()); + e + }) + .ok() + }) + .collect(); Self::receive_bounded_upward_messages(para, bounded) } From e36644656daa018f85982426efa13da899c9a7f6 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 25 Apr 2023 09:05:02 +0000 Subject: [PATCH 152/182] Revert "Add MAX_CODE_SIZE to ScheduleConfigUpdate" This reverts commit 7caffb09e83083b57affd548215e45b25c3d64dc. --- runtime/kusama/src/lib.rs | 2 -- runtime/parachains/src/configuration/migration_ump.rs | 4 ---- runtime/polkadot/src/lib.rs | 2 -- runtime/rococo/src/lib.rs | 2 -- runtime/westend/src/lib.rs | 2 -- 5 files changed, 12 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index ce74a7259ea2..9b51fc345c05 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1515,7 +1515,6 @@ pub type Migrations = ( /// Helpers to configure all migrations. pub mod migrations { - use primitives::MAX_CODE_SIZE; use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 4 * 1024 * 1024; @@ -1529,7 +1528,6 @@ pub mod migrations { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, - MAX_CODE_SIZE, >; } diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index c305d1f5f9d6..c72d1fa94c61 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -33,7 +33,6 @@ pub mod latest { const MAX_UPWARD_QUEUE_COUNT: u32, const MAX_UPWARD_MESSAGE_SIZE: u32, const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32, - const MAX_CODE_SIZE: u32, >(core::marker::PhantomData); impl< @@ -42,7 +41,6 @@ pub mod latest { const MAX_UPWARD_QUEUE_COUNT: u32, const MAX_UPWARD_MESSAGE_SIZE: u32, const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32, - const MAX_CODE_SIZE: u32, > OnRuntimeUpgrade for ScheduleConfigUpdate< T, @@ -50,7 +48,6 @@ pub mod latest { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, - MAX_CODE_SIZE, > { #[cfg(feature = "try-runtime")] @@ -80,7 +77,6 @@ pub mod latest { cfg.max_upward_queue_count = MAX_UPWARD_QUEUE_COUNT; cfg.max_upward_message_size = MAX_UPWARD_MESSAGE_SIZE; cfg.max_upward_message_num_per_candidate = MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE; - cfg.max_code_size = MAX_CODE_SIZE; }) { log::error!( target: LOG_TARGET, diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index dc03e4f0f6ba..e5f2415abfad 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1473,7 +1473,6 @@ pub type Migrations = ( /// Helpers to configure all migrations. pub mod migrations { - use primitives::MAX_CODE_SIZE; use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 1 * 1024 * 1024; @@ -1487,7 +1486,6 @@ pub mod migrations { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, - MAX_CODE_SIZE, >; } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index a3daf77c4ff0..0a237fd37ddf 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1523,7 +1523,6 @@ pub type Migrations = ( /// Helpers to configure all migrations. pub mod migrations { - use primitives::MAX_CODE_SIZE; use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 8 * 1024 * 1024; @@ -1537,7 +1536,6 @@ pub mod migrations { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, - MAX_CODE_SIZE, >; } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 318a9d3875d3..a6cff6151204 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1272,7 +1272,6 @@ pub type Migrations = ( /// Helpers to configure all migrations. pub mod migrations { - use primitives::MAX_CODE_SIZE; use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 8 * 1024 * 1024; @@ -1286,7 +1285,6 @@ pub mod migrations { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, - MAX_CODE_SIZE, >; } From 3595684b0293439c32dfe563008958c7d0091289 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 25 Apr 2023 09:05:09 +0000 Subject: [PATCH 153/182] Revert "Set MAX_CODE_SIZE to 4MiB" This reverts commit 103ffbaf686487d2fbe0082a16826af17cacc1a1. --- primitives/src/v4/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/primitives/src/v4/mod.rs b/primitives/src/v4/mod.rs index 1f3572191474..3fc38210654a 100644 --- a/primitives/src/v4/mod.rs +++ b/primitives/src/v4/mod.rs @@ -363,10 +363,8 @@ pub const ASSIGNMENT_KEY_TYPE_ID: KeyTypeId = KeyTypeId(*b"asgn"); /// * initial genesis for the Parachains configuration /// * checking updates to this stored runtime configuration do not exceed this limit /// * when detecting a code decompression bomb in the client -/// -/// Should never be larger than the total block size. // NOTE: This value is used in the runtime so be careful when changing it. -pub const MAX_CODE_SIZE: u32 = 4 * 1024 * 1024; +pub const MAX_CODE_SIZE: u32 = 10 * 1024 * 1024; /// Maximum head data size we support right now. /// From 7503530c991f520ed80d0788c0601dcaeb103288 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 25 Apr 2023 10:13:31 +0000 Subject: [PATCH 154/182] Revert "Bump MAX_CODE_SIZE to 10MiB" This reverts commit 530734b7b0da5b7680054e0242348fcc79a666fe. Signed-off-by: Oliver Tale-Yazdi --- primitives/src/v4/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/src/v4/mod.rs b/primitives/src/v4/mod.rs index 3fc38210654a..4a40a5993c19 100644 --- a/primitives/src/v4/mod.rs +++ b/primitives/src/v4/mod.rs @@ -364,7 +364,7 @@ pub const ASSIGNMENT_KEY_TYPE_ID: KeyTypeId = KeyTypeId(*b"asgn"); /// * checking updates to this stored runtime configuration do not exceed this limit /// * when detecting a code decompression bomb in the client // NOTE: This value is used in the runtime so be careful when changing it. -pub const MAX_CODE_SIZE: u32 = 10 * 1024 * 1024; +pub const MAX_CODE_SIZE: u32 = 3 * 1024 * 1024; /// Maximum head data size we support right now. /// From 15197058236d5d6b328d4b445c2fb0b23982efa7 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 25 Apr 2023 11:47:59 +0000 Subject: [PATCH 155/182] Remove consistency check from migration Re-addig these checks is blocked on https://github.com/paritytech/polkadot/issues/7108 Signed-off-by: Oliver Tale-Yazdi --- .../src/configuration/migration_ump.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index c72d1fa94c61..ef113aac01f4 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -55,7 +55,6 @@ pub mod latest { log::info!(target: LOG_TARGET, "pre_upgrade"); let mut pending = PendingConfigs::::get(); pending.sort_by_key(|(s, _)| *s); - pending.last().map(|(_, cfg)| cfg.panic_if_not_consistent()); log::info!( target: LOG_TARGET, @@ -106,21 +105,6 @@ pub mod latest { "There must be a new pending upgrade enqueued" ); - let mut any_pending_valid = false; - PendingConfigs::::get().iter().for_each(|(s, cfg)| { - log::info!(target: LOG_TARGET, "Checking config s={}", s); - cfg.panic_if_not_consistent(); - any_pending_valid = true; - }); - - if let Err(err) = ActiveConfig::::get().check_consistency() { - if any_pending_valid { - log::error!(target: LOG_TARGET, "The ActiveConfig is inconsistent: {:?}. We tolerate this since there are pending consistent upgrades.", err); - } else { - panic!("The ActiveConfig is inconsistent: {:?} and there are no pending consistent ones.", err) - } - } - Ok(()) } } From 131fd38b998c861f766909727a600cac201d64d8 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 28 Apr 2023 09:03:12 +0000 Subject: [PATCH 156/182] Fix constants Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 2 +- runtime/polkadot/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index a3a08ac4d8c6..e8922807e2e9 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1520,7 +1520,7 @@ pub mod migrations { use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 4 * 1024 * 1024; - pub const MAX_UPWARD_QUEUE_COUNT: u32 = 838860; + pub const MAX_UPWARD_QUEUE_COUNT: u32 = 699050; pub const MAX_UPWARD_MESSAGE_SIZE: u32 = (1 << 16) - 5; // Checked in test `max_upward_message_size`. pub const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32 = 128; diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 7b5b3af90523..c00a9a6620d0 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1478,7 +1478,7 @@ pub mod migrations { use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 1 * 1024 * 1024; - pub const MAX_UPWARD_QUEUE_COUNT: u32 = 209715; + pub const MAX_UPWARD_QUEUE_COUNT: u32 = 174762; pub const MAX_UPWARD_MESSAGE_SIZE: u32 = (1 << 16) - 5; // Checked in test `max_upward_message_size`. pub const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32 = 16; From 5f8385a2afa546bc959a29150628fbd4fb3850e1 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 2 May 2023 19:39:41 +0200 Subject: [PATCH 157/182] Bump MAX_UPWARD_MESSAGE_SIZE_BOUND for Westend Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 54fddb3a35a7..3c50fe76db6d 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -78,7 +78,7 @@ impl WeightInfo for () { /// /// This is used for benchmarking sanely bounding relevant storage items. It is expected from the `configuration` /// pallet to check these values before setting. -pub const MAX_UPWARD_MESSAGE_SIZE_BOUND: u32 = 64 * 1024; +pub const MAX_UPWARD_MESSAGE_SIZE_BOUND: u32 = 128 * 1024; /// A bitfield signed by a validator indicating that it is keeping its piece of the erasure-coding /// for any backed candidates referred to by a `1` bit available. From 4c1f5d52b5eb6c7918aee29356111a25fca94c73 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Mon, 8 May 2023 15:38:11 +0200 Subject: [PATCH 158/182] Fix migrations Signed-off-by: Oliver Tale-Yazdi --- .../dispute-coordinator/src/initialized.rs | 101 +++++++++--------- node/network/approval-distribution/src/lib.rs | 10 +- runtime/kusama/src/lib.rs | 4 +- runtime/kusama/src/tests.rs | 2 +- runtime/polkadot/src/lib.rs | 15 +-- runtime/rococo/src/lib.rs | 6 +- runtime/westend/src/lib.rs | 6 +- runtime/westend/src/tests.rs | 2 +- 8 files changed, 70 insertions(+), 76 deletions(-) diff --git a/node/core/dispute-coordinator/src/initialized.rs b/node/core/dispute-coordinator/src/initialized.rs index c0eb029f4d0f..6644bebc4776 100644 --- a/node/core/dispute-coordinator/src/initialized.rs +++ b/node/core/dispute-coordinator/src/initialized.rs @@ -214,62 +214,61 @@ impl Initialized { gum::trace!(target: LOG_TARGET, "Waiting for message"); let mut overlay_db = OverlayedBackend::new(backend); let default_confirm = Box::new(|| Ok(())); - let confirm_write = match MuxedMessage::receive(ctx, &mut self.participation_receiver) - .await? - { - MuxedMessage::Participation(msg) => { - gum::trace!(target: LOG_TARGET, "MuxedMessage::Participation"); - let ParticipationStatement { - session, - candidate_hash, - candidate_receipt, - outcome, - } = self.participation.get_participation_result(ctx, msg).await?; - if let Some(valid) = outcome.validity() { - gum::trace!( - target: LOG_TARGET, - ?session, - ?candidate_hash, - ?valid, - "Issuing local statement based on participation outcome." - ); - self.issue_local_statement( - ctx, - &mut overlay_db, + let confirm_write = + match MuxedMessage::receive(ctx, &mut self.participation_receiver).await? { + MuxedMessage::Participation(msg) => { + gum::trace!(target: LOG_TARGET, "MuxedMessage::Participation"); + let ParticipationStatement { + session, candidate_hash, candidate_receipt, - session, - valid, - clock.now(), - ) - .await?; - } else { - gum::warn!(target: LOG_TARGET, ?outcome, "Dispute participation failed"); - } - default_confirm - }, - MuxedMessage::Subsystem(msg) => match msg { - FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), - FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => { - gum::trace!(target: LOG_TARGET, "OverseerSignal::ActiveLeaves"); - self.process_active_leaves_update( - ctx, - &mut overlay_db, - update, - clock.now(), - ) - .await?; + outcome, + } = self.participation.get_participation_result(ctx, msg).await?; + if let Some(valid) = outcome.validity() { + gum::trace!( + target: LOG_TARGET, + ?session, + ?candidate_hash, + ?valid, + "Issuing local statement based on participation outcome." + ); + self.issue_local_statement( + ctx, + &mut overlay_db, + candidate_hash, + candidate_receipt, + session, + valid, + clock.now(), + ) + .await?; + } else { + gum::warn!(target: LOG_TARGET, ?outcome, "Dispute participation failed"); + } default_confirm }, - FromOrchestra::Signal(OverseerSignal::BlockFinalized(_, n)) => { - gum::trace!(target: LOG_TARGET, "OverseerSignal::BlockFinalized"); - self.scraper.process_finalized_block(&n); - default_confirm + MuxedMessage::Subsystem(msg) => match msg { + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => { + gum::trace!(target: LOG_TARGET, "OverseerSignal::ActiveLeaves"); + self.process_active_leaves_update( + ctx, + &mut overlay_db, + update, + clock.now(), + ) + .await?; + default_confirm + }, + FromOrchestra::Signal(OverseerSignal::BlockFinalized(_, n)) => { + gum::trace!(target: LOG_TARGET, "OverseerSignal::BlockFinalized"); + self.scraper.process_finalized_block(&n); + default_confirm + }, + FromOrchestra::Communication { msg } => + self.handle_incoming(ctx, &mut overlay_db, msg, clock.now()).await?, }, - FromOrchestra::Communication { msg } => - self.handle_incoming(ctx, &mut overlay_db, msg, clock.now()).await?, - }, - }; + }; if !overlay_db.is_empty() { let ops = overlay_db.into_write_ops(); diff --git a/node/network/approval-distribution/src/lib.rs b/node/network/approval-distribution/src/lib.rs index c8ad21ad406e..82f62502e474 100644 --- a/node/network/approval-distribution/src/lib.rs +++ b/node/network/approval-distribution/src/lib.rs @@ -1270,11 +1270,11 @@ impl State { let candidate_entry = match block_entry.candidates.get(index as usize) { None => { gum::debug!( - target: LOG_TARGET, - ?hash, - ?index, - "`get_approval_signatures`: could not find candidate entry for given hash and index!" - ); + target: LOG_TARGET, + ?hash, + ?index, + "`get_approval_signatures`: could not find candidate entry for given hash and index!" + ); continue }, Some(e) => e, diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 2b628e046b8c..8cb4f896cf8e 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1526,12 +1526,12 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( // Remove UMP dispatch queue - migrations::UpdateUmpLimits, + ump_migrations::UpdateUmpLimits, ); } /// Helpers to configure all migrations. -pub mod migrations { +pub mod ump_migrations { use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 4 * 1024 * 1024; diff --git a/runtime/kusama/src/tests.rs b/runtime/kusama/src/tests.rs index 503c8bd6641a..65c1c0368f78 100644 --- a/runtime/kusama/src/tests.rs +++ b/runtime/kusama/src/tests.rs @@ -150,7 +150,7 @@ fn call_size() { #[test] fn max_upward_message_size() { assert_eq!( - migrations::MAX_UPWARD_MESSAGE_SIZE, + ump_migrations::MAX_UPWARD_MESSAGE_SIZE, pallet_message_queue::MaxMessageLenOf::::get() ); } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 8af0a886d623..8335c59f110c 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -28,14 +28,9 @@ use runtime_common::{ use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, -<<<<<<< HEAD - dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, - inclusion::AggregateMessageOrigin, initializer as parachains_initializer, -======= disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, - inclusion as parachains_inclusion, initializer as parachains_initializer, ->>>>>>> origin/master - origin as parachains_origin, paras as parachains_paras, + inclusion as parachains_inclusion, inclusion::AggregateMessageOrigin, + initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::v4 as parachains_runtime_api_impl, scheduler as parachains_scheduler, session_info as parachains_session_info, shared as parachains_shared, @@ -1508,12 +1503,12 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( // Remove UMP dispatch queue - migrations::UpdateUmpLimits, + ump_migrations::UpdateUmpLimits, ); } /// Helpers to configure all migrations. -pub mod migrations { +pub mod ump_migrations { use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 1 * 1024 * 1024; @@ -2293,7 +2288,7 @@ mod test { #[test] fn max_upward_message_size() { assert_eq!( - migrations::MAX_UPWARD_MESSAGE_SIZE, + ump_migrations::MAX_UPWARD_MESSAGE_SIZE, pallet_message_queue::MaxMessageLenOf::::get() ); } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 4a8577da68fb..58c8bc684253 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1534,12 +1534,12 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( // Remove UMP dispatch queue - migrations::UpdateUmpLimits, + ump_migrations::UpdateUmpLimits, ); } /// Helpers to configure all migrations. -pub mod migrations { +pub mod ump_migrations { use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 8 * 1024 * 1024; @@ -2226,7 +2226,7 @@ mod test { fn max_upward_message_size() { use sp_core::Get; assert_eq!( - migrations::MAX_UPWARD_MESSAGE_SIZE, + ump_migrations::MAX_UPWARD_MESSAGE_SIZE, pallet_message_queue::MaxMessageLenOf::::get() ); } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 47f5262055be..67996c7bde6f 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1282,12 +1282,12 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( // Remove UMP dispatch queue - migrations::UpdateUmpLimits, + ump_migrations::UpdateUmpLimits, ); } /// Helpers to configure all migrations. -pub mod migrations { +pub mod ump_migrations { use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 8 * 1024 * 1024; @@ -1969,7 +1969,7 @@ mod test { #[test] fn max_upward_message_size() { assert_eq!( - migrations::MAX_UPWARD_MESSAGE_SIZE, + ump_migrations::MAX_UPWARD_MESSAGE_SIZE, pallet_message_queue::MaxMessageLenOf::::get() ); } diff --git a/runtime/westend/src/tests.rs b/runtime/westend/src/tests.rs index b532a259d20e..8f835ea49a86 100644 --- a/runtime/westend/src/tests.rs +++ b/runtime/westend/src/tests.rs @@ -53,7 +53,7 @@ fn call_size() { #[test] fn max_upward_message_size() { assert_eq!( - migrations::MAX_UPWARD_MESSAGE_SIZE, + ump_migrations::MAX_UPWARD_MESSAGE_SIZE, pallet_message_queue::MaxMessageLenOf::::get() ); } From 74f3178cd67e335b327c62dca1c1a2134e6d53a5 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Mon, 8 May 2023 17:39:56 +0200 Subject: [PATCH 159/182] Use old nightly for fmt Signed-off-by: Oliver Tale-Yazdi --- .../dispute-coordinator/src/initialized.rs | 101 +++++++++--------- 1 file changed, 51 insertions(+), 50 deletions(-) diff --git a/node/core/dispute-coordinator/src/initialized.rs b/node/core/dispute-coordinator/src/initialized.rs index 6644bebc4776..c0eb029f4d0f 100644 --- a/node/core/dispute-coordinator/src/initialized.rs +++ b/node/core/dispute-coordinator/src/initialized.rs @@ -214,61 +214,62 @@ impl Initialized { gum::trace!(target: LOG_TARGET, "Waiting for message"); let mut overlay_db = OverlayedBackend::new(backend); let default_confirm = Box::new(|| Ok(())); - let confirm_write = - match MuxedMessage::receive(ctx, &mut self.participation_receiver).await? { - MuxedMessage::Participation(msg) => { - gum::trace!(target: LOG_TARGET, "MuxedMessage::Participation"); - let ParticipationStatement { - session, + let confirm_write = match MuxedMessage::receive(ctx, &mut self.participation_receiver) + .await? + { + MuxedMessage::Participation(msg) => { + gum::trace!(target: LOG_TARGET, "MuxedMessage::Participation"); + let ParticipationStatement { + session, + candidate_hash, + candidate_receipt, + outcome, + } = self.participation.get_participation_result(ctx, msg).await?; + if let Some(valid) = outcome.validity() { + gum::trace!( + target: LOG_TARGET, + ?session, + ?candidate_hash, + ?valid, + "Issuing local statement based on participation outcome." + ); + self.issue_local_statement( + ctx, + &mut overlay_db, candidate_hash, candidate_receipt, - outcome, - } = self.participation.get_participation_result(ctx, msg).await?; - if let Some(valid) = outcome.validity() { - gum::trace!( - target: LOG_TARGET, - ?session, - ?candidate_hash, - ?valid, - "Issuing local statement based on participation outcome." - ); - self.issue_local_statement( - ctx, - &mut overlay_db, - candidate_hash, - candidate_receipt, - session, - valid, - clock.now(), - ) - .await?; - } else { - gum::warn!(target: LOG_TARGET, ?outcome, "Dispute participation failed"); - } + session, + valid, + clock.now(), + ) + .await?; + } else { + gum::warn!(target: LOG_TARGET, ?outcome, "Dispute participation failed"); + } + default_confirm + }, + MuxedMessage::Subsystem(msg) => match msg { + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => { + gum::trace!(target: LOG_TARGET, "OverseerSignal::ActiveLeaves"); + self.process_active_leaves_update( + ctx, + &mut overlay_db, + update, + clock.now(), + ) + .await?; default_confirm }, - MuxedMessage::Subsystem(msg) => match msg { - FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), - FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => { - gum::trace!(target: LOG_TARGET, "OverseerSignal::ActiveLeaves"); - self.process_active_leaves_update( - ctx, - &mut overlay_db, - update, - clock.now(), - ) - .await?; - default_confirm - }, - FromOrchestra::Signal(OverseerSignal::BlockFinalized(_, n)) => { - gum::trace!(target: LOG_TARGET, "OverseerSignal::BlockFinalized"); - self.scraper.process_finalized_block(&n); - default_confirm - }, - FromOrchestra::Communication { msg } => - self.handle_incoming(ctx, &mut overlay_db, msg, clock.now()).await?, + FromOrchestra::Signal(OverseerSignal::BlockFinalized(_, n)) => { + gum::trace!(target: LOG_TARGET, "OverseerSignal::BlockFinalized"); + self.scraper.process_finalized_block(&n); + default_confirm }, - }; + FromOrchestra::Communication { msg } => + self.handle_incoming(ctx, &mut overlay_db, msg, clock.now()).await?, + }, + }; if !overlay_db.is_empty() { let ops = overlay_db.into_write_ops(); From f829c496203c672e667f5b742609a4cca2b7bf6b Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Fri, 12 May 2023 16:34:06 +0800 Subject: [PATCH 160/182] Fixes --- runtime/parachains/src/hrmp/tests.rs | 4 ++-- runtime/parachains/src/mock.rs | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/runtime/parachains/src/hrmp/tests.rs b/runtime/parachains/src/hrmp/tests.rs index d6efeaa13fe9..2071352ccd2d 100644 --- a/runtime/parachains/src/hrmp/tests.rs +++ b/runtime/parachains/src/hrmp/tests.rs @@ -20,8 +20,8 @@ use crate::mock::{ Configuration, Hrmp, MockGenesisConfig, Paras, ParasShared, RuntimeEvent as MockEvent, RuntimeOrigin, System, Test, }; -use frame_support::{assert_noop, assert_ok, traits::Currency as _}; -use primitives::{BlockNumber, ValidationCode}; +use frame_support::assert_noop; +use primitives::BlockNumber; use std::collections::BTreeMap; pub(crate) fn run_to_block(to: BlockNumber, new_session: Option>) { diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index d43ba341b4cb..26075e645b8a 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -36,12 +36,12 @@ use frame_support_test::TestRandomness; use parity_scale_codec::Decode; use primitives::{ AuthorityDiscoveryId, Balance, BlockNumber, CandidateHash, Header, Moment, SessionIndex, - UpwardMessage, ValidatorIndex, + UpwardMessage, ValidationCode, ValidatorIndex, }; use sp_core::{ConstU32, H256}; use sp_io::TestExternalities; use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, + traits::{AccountIdConversion, BlakeTwo256, IdentityLookup}, transaction_validity::TransactionPriority, Permill, }; @@ -524,10 +524,7 @@ where } } -use frame_support::traits::Currency; -use sp_runtime::traits::AccountIdConversion; - -fn register_parachain_with_balance(id: ParaId, balance: Balance) { +pub(crate) fn register_parachain_with_balance(id: ParaId, balance: Balance) { let validation_code: ValidationCode = vec![1].into(); assert_ok!(Paras::schedule_para_initialize( id, @@ -539,7 +536,7 @@ fn register_parachain_with_balance(id: ParaId, balance: Balance) { )); assert_ok!(Paras::add_trusted_validation_code(RuntimeOrigin::root(), validation_code)); - ::Currency::make_free_balance_be(&id.into_account_truncating(), balance); + ::Currency::make_free_balance_be(&id.into_account_truncating(), balance); } pub(crate) fn register_parachain(id: ParaId) { From 0c94097363649125908d66f1371d190b4dda0fb7 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Fri, 12 May 2023 16:34:58 +0800 Subject: [PATCH 161/182] cargo fmt --- runtime/parachains/src/mock.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 26075e645b8a..2d33cd0da2b7 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -536,7 +536,10 @@ pub(crate) fn register_parachain_with_balance(id: ParaId, balance: Balance) { )); assert_ok!(Paras::add_trusted_validation_code(RuntimeOrigin::root(), validation_code)); - ::Currency::make_free_balance_be(&id.into_account_truncating(), balance); + ::Currency::make_free_balance_be( + &id.into_account_truncating(), + balance, + ); } pub(crate) fn register_parachain(id: ParaId) { From adc94734fdb25abbc16c1ce0824d19aadc737f54 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 12 May 2023 12:29:40 +0200 Subject: [PATCH 162/182] Fix tests Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/mock.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 2d33cd0da2b7..5fc983d842d0 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -536,12 +536,10 @@ pub(crate) fn register_parachain_with_balance(id: ParaId, balance: Balance) { )); assert_ok!(Paras::add_trusted_validation_code(RuntimeOrigin::root(), validation_code)); - ::Currency::make_free_balance_be( - &id.into_account_truncating(), - balance, - ); + ::Currency::make_free_balance_be(&id.into_account_truncating(), balance); } + pub(crate) fn register_parachain(id: ParaId) { register_parachain_with_balance(id, 1000); } From 031d40c257a0895e60f79a1c097c15208ca5eed5 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 12 May 2023 12:32:40 +0200 Subject: [PATCH 163/182] Fix tests Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/mock.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 5fc983d842d0..99e4ca280b85 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -536,10 +536,13 @@ pub(crate) fn register_parachain_with_balance(id: ParaId, balance: Balance) { )); assert_ok!(Paras::add_trusted_validation_code(RuntimeOrigin::root(), validation_code)); - ::Currency::make_free_balance_be(&id.into_account_truncating(), balance); + use frame_support::traits::Currency; + ::Currency::make_free_balance_be( + &id.into_account_truncating(), + balance, + ); } - pub(crate) fn register_parachain(id: ParaId) { register_parachain_with_balance(id, 1000); } From c3d046dd49e5ec66d56d4d71df1738c6c2196427 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Fri, 12 May 2023 22:16:07 +0800 Subject: [PATCH 164/182] Fixes --- runtime/parachains/src/mock.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 99e4ca280b85..dd6e468f4802 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -27,7 +27,7 @@ use crate::{ use frame_support::{ assert_ok, parameter_types, traits::{ - GenesisBuild, ProcessMessage, ProcessMessageError, ValidatorSet, + Currency, GenesisBuild, ProcessMessage, ProcessMessageError, ValidatorSet, ValidatorSetWithIdentification, }, weights::{Weight, WeightMeter}, @@ -536,7 +536,6 @@ pub(crate) fn register_parachain_with_balance(id: ParaId, balance: Balance) { )); assert_ok!(Paras::add_trusted_validation_code(RuntimeOrigin::root(), validation_code)); - use frame_support::traits::Currency; ::Currency::make_free_balance_be( &id.into_account_truncating(), balance, From 31bb5888ffbdacdfc5cef17b0532efc49ed92e53 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 12 May 2023 16:42:03 +0200 Subject: [PATCH 165/182] Add MQ pallet to fuzzer Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 1 + xcm/xcm-simulator/fuzzer/Cargo.toml | 2 + xcm/xcm-simulator/fuzzer/src/fuzz.rs | 3 ++ xcm/xcm-simulator/fuzzer/src/relay_chain.rs | 54 +++++++++++++++++++-- xcm/xcm-simulator/src/lib.rs | 31 +++++++++--- 5 files changed, 79 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bbe44188c573..cf4ac00cf156 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14558,6 +14558,7 @@ dependencies = [ "frame-system", "honggfuzz", "pallet-balances", + "pallet-message-queue", "pallet-xcm", "parity-scale-codec", "polkadot-core-primitives", diff --git a/xcm/xcm-simulator/fuzzer/Cargo.toml b/xcm/xcm-simulator/fuzzer/Cargo.toml index 06d3ae2c43fc..f8cdfa9424cf 100644 --- a/xcm/xcm-simulator/fuzzer/Cargo.toml +++ b/xcm/xcm-simulator/fuzzer/Cargo.toml @@ -14,6 +14,7 @@ scale-info = { version = "2.5.0", features = ["derive"] } frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-std = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -31,6 +32,7 @@ polkadot-parachain = { path = "../../../parachain" } [features] runtime-benchmarks = [ "pallet-xcm/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "frame-support/runtime-benchmarks", ] diff --git a/xcm/xcm-simulator/fuzzer/src/fuzz.rs b/xcm/xcm-simulator/fuzzer/src/fuzz.rs index 834715234789..b23386d79120 100644 --- a/xcm/xcm-simulator/fuzzer/src/fuzz.rs +++ b/xcm/xcm-simulator/fuzzer/src/fuzz.rs @@ -61,7 +61,10 @@ decl_test_relay_chain! { pub struct Relay { Runtime = relay_chain::Runtime, RuntimeCall = relay_chain::RuntimeCall, + RuntimeEvent = relay_chain::RuntimeEvent, XcmConfig = relay_chain::XcmConfig, + MessageQueue = relay_chain::MessageQueue, + System = relay_chain::System, new_ext = relay_ext(), } } diff --git a/xcm/xcm-simulator/fuzzer/src/relay_chain.rs b/xcm/xcm-simulator/fuzzer/src/relay_chain.rs index d60c5ee95872..7cf61cdd2931 100644 --- a/xcm/xcm-simulator/fuzzer/src/relay_chain.rs +++ b/xcm/xcm-simulator/fuzzer/src/relay_chain.rs @@ -18,8 +18,8 @@ use frame_support::{ construct_runtime, parameter_types, - traits::{Everything, Nothing}, - weights::Weight, + traits::{Everything, Nothing, ProcessMessage, ProcessMessageError}, + weights::{Weight, WeightMeter}, }; use frame_system::EnsureRoot; @@ -27,7 +27,9 @@ use sp_core::{ConstU32, H256}; use sp_runtime::{testing::Header, traits::IdentityLookup, AccountId32}; use polkadot_parachain::primitives::Id as ParaId; -use polkadot_runtime_parachains::{configuration, origin, shared}; +use polkadot_runtime_parachains::{ + configuration, inclusion::AggregateMessageOrigin, origin, shared, +}; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowUnpaidExecutionFrom, ChildParachainAsNative, @@ -122,7 +124,7 @@ type LocalOriginConverter = ( parameter_types! { pub const BaseXcmWeight: Weight = Weight::from_parts(1_000, 1_000); pub KsmPerSecondPerByte: (AssetId, u128, u128) = (Concrete(TokenLocation::get()), 1, 1); - pub const MaxInstructions: u32 = 100; + pub const MaxInstructions: u32 = u32::MAX; pub const MaxAssetsIntoHolding: u32 = 64; } @@ -201,6 +203,49 @@ impl origin::Config for Runtime {} type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; +parameter_types! { + /// Amount of weight that can be spent per block to service messages. + pub MessageQueueServiceWeight: Weight = Weight::from_parts(1_000_000_000, 1_000_000); + pub const MessageQueueHeapSize: u32 = 65_536; + pub const MessageQueueMaxStale: u32 = 16; +} + +/// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. +pub struct MessageProcessor; +impl ProcessMessage for MessageProcessor { + type Origin = AggregateMessageOrigin; + + fn process_message( + message: &[u8], + origin: Self::Origin, + meter: &mut WeightMeter, + ) -> Result { + let para = match origin { + AggregateMessageOrigin::Ump(para) => para, + }; + xcm_builder::ProcessXcmMessage::< + Junction, + xcm_executor::XcmExecutor, + RuntimeCall, + >::process_message(message, Junction::Parachain(para.into()), meter) + } +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Size = u32; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; + type ServiceWeight = MessageQueueServiceWeight; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = MessageProcessor; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; + type QueueChangeHandler = (); + type WeightInfo = (); +} + construct_runtime!( pub enum Runtime where Block = Block, @@ -211,5 +256,6 @@ construct_runtime!( Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, ParasOrigin: origin::{Pallet, Origin}, XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin}, + MessageQueue: pallet_message_queue::{Pallet, Event}, } ); diff --git a/xcm/xcm-simulator/src/lib.rs b/xcm/xcm-simulator/src/lib.rs index f8a708d7d198..214b6d728297 100644 --- a/xcm/xcm-simulator/src/lib.rs +++ b/xcm/xcm-simulator/src/lib.rs @@ -20,7 +20,7 @@ pub use codec::Encode; pub use paste; pub use frame_support::{ - traits::{Get, ProcessMessage, ProcessMessageError}, + traits::{EnqueueMessage, Get, ProcessMessage, ProcessMessageError, ServiceQueues}, weights::{Weight, WeightMeter}, }; pub use sp_io::{hashing::blake2_256, TestExternalities}; @@ -31,7 +31,7 @@ pub use polkadot_parachain::primitives::{ DmpMessageHandler as DmpMessageHandlerT, Id as ParaId, XcmpMessageFormat, XcmpMessageHandler as XcmpMessageHandlerT, }; -pub use polkadot_runtime_parachains::dmp; +pub use polkadot_runtime_parachains::{dmp, inclusion::AggregateMessageOrigin}; pub use xcm::{latest::prelude::*, VersionedXcm}; pub use xcm_builder::ProcessXcmMessage; pub use xcm_executor::XcmExecutor; @@ -102,7 +102,10 @@ macro_rules! decl_test_relay_chain { pub struct $name:ident { Runtime = $runtime:path, RuntimeCall = $runtime_call:path, + RuntimeEvent = $runtime_event:path, XcmConfig = $xcm_config:path, + MessageQueue = $mq:path, + System = $system:path, new_ext = $new_ext:expr, } ) => { @@ -115,16 +118,28 @@ macro_rules! decl_test_relay_chain { fn process_message( msg: &[u8], - origin: Self::Origin, + para: Self::Origin, meter: &mut $crate::WeightMeter, ) -> Result { - use $crate::{ProcessMessage, Junction, TestExt}; + use $crate::{ProcessMessage, Weight, AggregateMessageOrigin, ServiceQueues, EnqueueMessage, Junction, TestExt}; + use $mq as message_queue; + use $runtime_event as runtime_event; Self::execute_with(|| { - $crate::ProcessXcmMessage::<$crate::Junction, - $crate::XcmExecutor<$xcm_config>, $runtime_call>::process_message( - msg, $crate::Junction::Parachain(origin.into()), meter, - ) + <$mq as EnqueueMessage>::enqueue_message(msg.try_into().expect("Message too long"), AggregateMessageOrigin::Ump(para.clone())); + + <$system>::reset_events(); + <$mq as ServiceQueues>::service_queues(Weight::MAX); + let events = <$system>::events(); + let event = events.last().expect("There must be at least one event"); + + match &event.event { + runtime_event::MessageQueue(pallet_message_queue::Event::Processed {origin, ..}) => { + assert_eq!(origin, &AggregateMessageOrigin::Ump(para)); + }, + event => panic!("Unexpected event: {:#?}", event), + } + Ok(true) }) } } From a326a2803690f931254b9af6a86f5519387b3a15 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 12 May 2023 16:43:49 +0200 Subject: [PATCH 166/182] Fmt Signed-off-by: Oliver Tale-Yazdi --- xcm/xcm-simulator/src/lib.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xcm/xcm-simulator/src/lib.rs b/xcm/xcm-simulator/src/lib.rs index 214b6d728297..cdfc109f137a 100644 --- a/xcm/xcm-simulator/src/lib.rs +++ b/xcm/xcm-simulator/src/lib.rs @@ -121,12 +121,15 @@ macro_rules! decl_test_relay_chain { para: Self::Origin, meter: &mut $crate::WeightMeter, ) -> Result { - use $crate::{ProcessMessage, Weight, AggregateMessageOrigin, ServiceQueues, EnqueueMessage, Junction, TestExt}; + use $crate::{Weight, AggregateMessageOrigin, ServiceQueues, EnqueueMessage}; use $mq as message_queue; use $runtime_event as runtime_event; Self::execute_with(|| { - <$mq as EnqueueMessage>::enqueue_message(msg.try_into().expect("Message too long"), AggregateMessageOrigin::Ump(para.clone())); + <$mq as EnqueueMessage>::enqueue_message( + msg.try_into().expect("Message too long"), + AggregateMessageOrigin::Ump(para.clone()) + ); <$system>::reset_events(); <$mq as ServiceQueues>::service_queues(Weight::MAX); @@ -134,7 +137,8 @@ macro_rules! decl_test_relay_chain { let event = events.last().expect("There must be at least one event"); match &event.event { - runtime_event::MessageQueue(pallet_message_queue::Event::Processed {origin, ..}) => { + runtime_event::MessageQueue( + pallet_message_queue::Event::Processed {origin, ..}) => { assert_eq!(origin, &AggregateMessageOrigin::Ump(para)); }, event => panic!("Unexpected event: {:#?}", event), From c253fdc550d87a06804f9796c8eb36fe9bae1753 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 12 May 2023 17:07:21 +0200 Subject: [PATCH 167/182] Fix XMC simulator example Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 1 + xcm/xcm-simulator/example/Cargo.toml | 2 + xcm/xcm-simulator/example/src/lib.rs | 5 +- xcm/xcm-simulator/example/src/relay_chain.rs | 52 ++++++++++++++++++-- 4 files changed, 56 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cf4ac00cf156..77b22e33f05c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14531,6 +14531,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", + "pallet-message-queue", "pallet-uniques", "pallet-xcm", "parity-scale-codec", diff --git a/xcm/xcm-simulator/example/Cargo.toml b/xcm/xcm-simulator/example/Cargo.toml index 64dc0b8058cd..47b7c82243d3 100644 --- a/xcm/xcm-simulator/example/Cargo.toml +++ b/xcm/xcm-simulator/example/Cargo.toml @@ -13,6 +13,7 @@ log = { version = "0.4.14", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-message-queue = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-std = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -35,6 +36,7 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", "frame-support/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", "pallet-uniques/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "xcm-builder/runtime-benchmarks", diff --git a/xcm/xcm-simulator/example/src/lib.rs b/xcm/xcm-simulator/example/src/lib.rs index 578ee7e88a0a..33a5b2c70a9f 100644 --- a/xcm/xcm-simulator/example/src/lib.rs +++ b/xcm/xcm-simulator/example/src/lib.rs @@ -20,7 +20,7 @@ mod relay_chain; use frame_support::sp_tracing; use xcm::prelude::*; use xcm_executor::traits::Convert; -use xcm_simulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain}; +use xcm_simulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain, TestExt}; pub const ALICE: sp_runtime::AccountId32 = sp_runtime::AccountId32::new([0u8; 32]); pub const INITIAL_BALANCE: u128 = 1_000_000_000; @@ -47,7 +47,10 @@ decl_test_relay_chain! { pub struct Relay { Runtime = relay_chain::Runtime, RuntimeCall = relay_chain::RuntimeCall, + RuntimeEvent = relay_chain::RuntimeEvent, XcmConfig = relay_chain::XcmConfig, + MessageQueue = relay_chain::MessageQueue, + System = relay_chain::System, new_ext = relay_ext(), } } diff --git a/xcm/xcm-simulator/example/src/relay_chain.rs b/xcm/xcm-simulator/example/src/relay_chain.rs index cf7912c2c580..8c51e3d17a95 100644 --- a/xcm/xcm-simulator/example/src/relay_chain.rs +++ b/xcm/xcm-simulator/example/src/relay_chain.rs @@ -18,8 +18,8 @@ use frame_support::{ construct_runtime, parameter_types, - traits::{AsEnsureOriginWithArg, Everything, Nothing}, - weights::Weight, + traits::{AsEnsureOriginWithArg, Everything, Nothing, ProcessMessage, ProcessMessageError}, + weights::{Weight, WeightMeter}, }; use frame_system::EnsureRoot; @@ -27,7 +27,9 @@ use sp_core::{ConstU32, H256}; use sp_runtime::{testing::Header, traits::IdentityLookup, AccountId32}; use polkadot_parachain::primitives::Id as ParaId; -use polkadot_runtime_parachains::{configuration, origin, shared}; +use polkadot_runtime_parachains::{ + configuration, inclusion::AggregateMessageOrigin, origin, shared, +}; use xcm::latest::prelude::*; use xcm_builder::{ Account32Hash, AccountId32Aliases, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, @@ -237,6 +239,49 @@ impl origin::Config for Runtime {} type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; +parameter_types! { + /// Amount of weight that can be spent per block to service messages. + pub MessageQueueServiceWeight: Weight = Weight::from_parts(1_000_000_000, 1_000_000); + pub const MessageQueueHeapSize: u32 = 65_536; + pub const MessageQueueMaxStale: u32 = 16; +} + +/// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. +pub struct MessageProcessor; +impl ProcessMessage for MessageProcessor { + type Origin = AggregateMessageOrigin; + + fn process_message( + message: &[u8], + origin: Self::Origin, + meter: &mut WeightMeter, + ) -> Result { + let para = match origin { + AggregateMessageOrigin::Ump(para) => para, + }; + xcm_builder::ProcessXcmMessage::< + Junction, + xcm_executor::XcmExecutor, + RuntimeCall, + >::process_message(message, Junction::Parachain(para.into()), meter) + } +} + +impl pallet_message_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Size = u32; + type HeapSize = MessageQueueHeapSize; + type MaxStale = MessageQueueMaxStale; + type ServiceWeight = MessageQueueServiceWeight; + #[cfg(not(feature = "runtime-benchmarks"))] + type MessageProcessor = MessageProcessor; + #[cfg(feature = "runtime-benchmarks")] + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; + type QueueChangeHandler = (); + type WeightInfo = (); +} + construct_runtime!( pub enum Runtime where Block = Block, @@ -248,5 +293,6 @@ construct_runtime!( ParasOrigin: origin::{Pallet, Origin}, XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin}, Uniques: pallet_uniques::{Pallet, Call, Storage, Event}, + MessageQueue: pallet_message_queue::{Pallet, Event}, } ); From e1f2bb01b6dea2dd465539d3658719895b58b557 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 12 May 2023 18:40:14 +0200 Subject: [PATCH 168/182] Remove runtime-benchmarks from fuzzers Signed-off-by: Oliver Tale-Yazdi --- xcm/xcm-simulator/example/Cargo.toml | 15 --------------- xcm/xcm-simulator/fuzzer/Cargo.toml | 8 -------- 2 files changed, 23 deletions(-) diff --git a/xcm/xcm-simulator/example/Cargo.toml b/xcm/xcm-simulator/example/Cargo.toml index 47b7c82243d3..6ef7a43fd797 100644 --- a/xcm/xcm-simulator/example/Cargo.toml +++ b/xcm/xcm-simulator/example/Cargo.toml @@ -29,18 +29,3 @@ pallet-xcm = { path = "../../pallet-xcm" } polkadot-core-primitives = { path = "../../../core-primitives" } polkadot-runtime-parachains = { path = "../../../runtime/parachains" } polkadot-parachain = { path = "../../../parachain" } - -[features] -default = [] -runtime-benchmarks = [ - "frame-system/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-message-queue/runtime-benchmarks", - "pallet-uniques/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", - "polkadot-runtime-parachains/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", -] diff --git a/xcm/xcm-simulator/fuzzer/Cargo.toml b/xcm/xcm-simulator/fuzzer/Cargo.toml index f8cdfa9424cf..83e030021939 100644 --- a/xcm/xcm-simulator/fuzzer/Cargo.toml +++ b/xcm/xcm-simulator/fuzzer/Cargo.toml @@ -29,14 +29,6 @@ polkadot-core-primitives = { path = "../../../core-primitives" } polkadot-runtime-parachains = { path = "../../../runtime/parachains" } polkadot-parachain = { path = "../../../parachain" } -[features] -runtime-benchmarks = [ - "pallet-xcm/runtime-benchmarks", - "pallet-message-queue/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "frame-support/runtime-benchmarks", -] - [[bin]] path = "src/fuzz.rs" name = "xcm-fuzzer" From 1e5e9a2a4aa85dc243ebfd9f074d01f88e4ed365 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 12 May 2023 19:13:48 +0200 Subject: [PATCH 169/182] Revert "Remove runtime-benchmarks from fuzzers" This reverts commit e1f2bb01b6dea2dd465539d3658719895b58b557. --- xcm/xcm-simulator/example/Cargo.toml | 15 +++++++++++++++ xcm/xcm-simulator/fuzzer/Cargo.toml | 8 ++++++++ 2 files changed, 23 insertions(+) diff --git a/xcm/xcm-simulator/example/Cargo.toml b/xcm/xcm-simulator/example/Cargo.toml index 6ef7a43fd797..47b7c82243d3 100644 --- a/xcm/xcm-simulator/example/Cargo.toml +++ b/xcm/xcm-simulator/example/Cargo.toml @@ -29,3 +29,18 @@ pallet-xcm = { path = "../../pallet-xcm" } polkadot-core-primitives = { path = "../../../core-primitives" } polkadot-runtime-parachains = { path = "../../../runtime/parachains" } polkadot-parachain = { path = "../../../parachain" } + +[features] +default = [] +runtime-benchmarks = [ + "frame-system/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", + "pallet-uniques/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", + "polkadot-runtime-parachains/runtime-benchmarks", + "polkadot-parachain/runtime-benchmarks", +] diff --git a/xcm/xcm-simulator/fuzzer/Cargo.toml b/xcm/xcm-simulator/fuzzer/Cargo.toml index 83e030021939..f8cdfa9424cf 100644 --- a/xcm/xcm-simulator/fuzzer/Cargo.toml +++ b/xcm/xcm-simulator/fuzzer/Cargo.toml @@ -29,6 +29,14 @@ polkadot-core-primitives = { path = "../../../core-primitives" } polkadot-runtime-parachains = { path = "../../../runtime/parachains" } polkadot-parachain = { path = "../../../parachain" } +[features] +runtime-benchmarks = [ + "pallet-xcm/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", + "frame-support/runtime-benchmarks", +] + [[bin]] path = "src/fuzz.rs" name = "xcm-fuzzer" From d9537da9c9de7ab24535df339d3b6b12af2c1339 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 12 May 2023 19:14:04 +0200 Subject: [PATCH 170/182] Fix example simulator Signed-off-by: Oliver Tale-Yazdi --- xcm/xcm-simulator/example/src/relay_chain.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/xcm/xcm-simulator/example/src/relay_chain.rs b/xcm/xcm-simulator/example/src/relay_chain.rs index 8c51e3d17a95..d75b6ebb0002 100644 --- a/xcm/xcm-simulator/example/src/relay_chain.rs +++ b/xcm/xcm-simulator/example/src/relay_chain.rs @@ -273,11 +273,7 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = MessageQueueHeapSize; type MaxStale = MessageQueueMaxStale; type ServiceWeight = MessageQueueServiceWeight; - #[cfg(not(feature = "runtime-benchmarks"))] type MessageProcessor = MessageProcessor; - #[cfg(feature = "runtime-benchmarks")] - type MessageProcessor = - pallet_message_queue::mock_helpers::NoopMessageProcessor; type QueueChangeHandler = (); type WeightInfo = (); } From 3338e7b283a470ace7c7868a3d829fb6f5509786 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 12 May 2023 20:21:23 +0200 Subject: [PATCH 171/182] Add V6 migration and remove old ones Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 18 +- .../parachains/src/configuration/migration.rs | 208 +++++++++--------- runtime/polkadot/src/lib.rs | 18 +- runtime/rococo/src/lib.rs | 11 +- runtime/westend/src/lib.rs | 18 +- 5 files changed, 110 insertions(+), 163 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 8cb4f896cf8e..0388318bc654 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1501,31 +1501,17 @@ impl Get for NominationPoolsMigrationV4OldPallet { /// /// This contains the combined migrations of the last 10 releases. It allows to skip runtime /// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = - (migrations::V0940, migrations::V0941, migrations::V0942, migrations::Unreleased); +pub type Migrations = (migrations::Unreleased); /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { use super::*; - pub type V0940 = ( - pallet_nomination_pools::migration::v4::MigrateToV4< - Runtime, - NominationPoolsMigrationV4OldPallet, - >, - pallet_nomination_pools::migration::v5::MigrateToV5, - ); - pub type V0941 = (); // Node only release - no migrations. - pub type V0942 = ( - parachains_configuration::migration::v5::MigrateToV5, - pallet_offences::migration::v1::MigrateToV1, - runtime_common::session::migration::ClearOldSessionStorage, - ); - /// Unreleased migrations. Add new ones here: pub type Unreleased = ( // Remove UMP dispatch queue + parachains_configuration::migration::MigrateV5ToV6, ump_migrations::UpdateUmpLimits, ); } diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs index ca63801ae2d0..9cd13a48901b 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -19,7 +19,7 @@ use crate::configuration::{self, ActiveConfig, Config, Pallet, PendingConfigs, MAX_POV_SIZE}; use frame_support::{pallet_prelude::*, traits::StorageVersion, weights::Weight}; use frame_system::pallet_prelude::BlockNumberFor; -use primitives::vstaging::AsyncBackingParams; +use primitives::{vstaging::AsyncBackingParams, ExecutorParams}; use sp_std::vec::Vec; /// The current storage version. @@ -29,12 +29,13 @@ use sp_std::vec::Vec; /// v2-v3: /// v3-v4: /// v4-v5: -/// + -/// + -/// + (remove UMP dispatch queue) -pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(5); +/// + +/// + +/// v5-v6: (remove UMP dispatch queue) +pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(6); -pub mod v5 { +pub use v6::MigrateV5ToV6; +pub mod v6 { use super::*; use frame_support::{traits::OnRuntimeUpgrade, weights::constants::WEIGHT_REF_TIME_PER_MILLIS}; use primitives::{Balance, SessionIndex}; @@ -44,7 +45,7 @@ pub mod v5 { // Copied over from configuration.rs @ de9e147695b9f1be8bd44e07861a31e483c8343a and removed // all the comments, and changed the Weight struct to OldWeight #[derive(parity_scale_codec::Encode, parity_scale_codec::Decode, Debug, Clone)] - pub struct OldHostConfiguration { + pub struct V5HostConfiguration { pub max_code_size: u32, pub max_head_data_size: u32, pub max_upward_queue_count: u32, @@ -54,6 +55,7 @@ pub mod v5 { pub hrmp_max_message_num_per_candidate: u32, pub validation_upgrade_cooldown: BlockNumber, pub validation_upgrade_delay: BlockNumber, + pub async_backing_params: AsyncBackingParams, pub max_pov_size: u32, pub max_downward_message_size: u32, pub ump_service_total_weight: Weight, @@ -66,6 +68,7 @@ pub mod v5 { pub hrmp_max_parachain_inbound_channels: u32, pub hrmp_max_parathread_inbound_channels: u32, pub hrmp_channel_max_message_size: u32, + pub executor_params: ExecutorParams, pub code_retention_period: BlockNumber, pub parathread_cores: u32, pub parathread_retries: u32, @@ -77,7 +80,6 @@ pub mod v5 { pub max_validators: Option, pub dispute_period: SessionIndex, pub dispute_post_conclusion_acceptance_period: BlockNumber, - pub dispute_conclusion_by_time_out_period: BlockNumber, pub no_show_slots: u32, pub n_delay_tranches: u32, pub zeroth_delay_tranche_width: u32, @@ -89,7 +91,7 @@ pub mod v5 { pub minimum_validation_upgrade_delay: BlockNumber, } - impl> Default for OldHostConfiguration { + impl> Default for V5HostConfiguration { fn default() -> Self { Self { group_rotation_frequency: 1u32.into(), @@ -109,7 +111,6 @@ pub mod v5 { max_validators: None, dispute_period: 6, dispute_post_conclusion_acceptance_period: 100.into(), - dispute_conclusion_by_time_out_period: 200.into(), n_delay_tranches: Default::default(), zeroth_delay_tranche_width: Default::default(), needed_approvals: Default::default(), @@ -137,40 +138,45 @@ pub mod v5 { pvf_checking_enabled: false, pvf_voting_ttl: 2u32.into(), minimum_validation_upgrade_delay: 2.into(), + async_backing_params: AsyncBackingParams { + max_candidate_depth: 0, + allowed_ancestry_len: 0, + }, + executor_params: Default::default(), } } } - pub struct MigrateToV5(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateToV5 { + pub struct MigrateV5ToV6(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for MigrateV5ToV6 { #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, &'static str> { log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade()"); - ensure!(StorageVersion::get::>() == 4, "The migration requires version 4"); + ensure!(StorageVersion::get::>() == 5, "The migration requires version 4"); Ok(Vec::new()) } fn on_runtime_upgrade() -> Weight { - if StorageVersion::get::>() == 4 { - let weight_consumed = migrate_to_v5::(); + if StorageVersion::get::>() == 5 { + let weight_consumed = migrate_to_v6::(); - log::info!(target: configuration::LOG_TARGET, "MigrateToV5 executed successfully"); - StorageVersion::new(5).put::>(); + log::info!(target: configuration::LOG_TARGET, "MigrateToV6 executed successfully"); + StorageVersion::new(6).put::>(); weight_consumed } else { - log::warn!(target: configuration::LOG_TARGET, "MigrateToV5 should be removed."); + log::warn!(target: configuration::LOG_TARGET, "MigrateToV6 should be removed."); T::DbWeight::get().reads(1) } } #[cfg(feature = "try-runtime")] fn post_upgrade(_state: Vec) -> Result<(), &'static str> { - log::info!(target: crate::configuration::LOG_TARGET, "Running post_upgrade()"); + log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade()"); ensure!( - StorageVersion::get::>() == StorageVersion::new(5), - "Storage version should be 5 after the migration" + StorageVersion::get::>() == StorageVersion::new(6), + "Storage version should be 6 after the migration" ); Ok(()) @@ -178,17 +184,17 @@ pub mod v5 { } } -fn migrate_to_v5() -> Weight { +fn migrate_to_v6() -> Weight { // Unusual formatting is justified: // - make it easier to verify that fields assign what they supposed to assign. // - this code is transient and will be removed after all migrations are done. // - this code is important enough to optimize for legibility sacrificing consistency. #[rustfmt::skip] let translate = - |pre: v5::OldHostConfiguration>| -> -configuration::HostConfiguration> + |pre: v6::V5HostConfiguration>| -> + configuration::HostConfiguration> { - super::HostConfiguration { + configuration::HostConfiguration { max_code_size : pre.max_code_size, max_head_data_size : pre.max_head_data_size, max_upward_queue_count : pre.max_upward_queue_count, @@ -228,12 +234,8 @@ relay_vrf_modulo_samples : pre.relay_vrf_modulo_samples, pvf_checking_enabled : pre.pvf_checking_enabled, pvf_voting_ttl : pre.pvf_voting_ttl, minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, - -// Default values are zeroes, thus it's ensured allowed ancestry never crosses the upgrade block. -async_backing_params : AsyncBackingParams { max_candidate_depth: 0, allowed_ancestry_len: 0 }, - -// Default executor parameters set is empty -executor_params : Default::default(), +async_backing_params : pre.async_backing_params, +executor_params : pre.executor_params, } }; @@ -245,22 +247,20 @@ executor_params : Default::default(), // to be unlikely to be caused by this. So we just log. Maybe it'll work out still? log::error!( target: configuration::LOG_TARGET, - "unexpected error when performing translation of the active configuration during storage upgrade to v5." + "unexpected error when performing translation of the active configuration during storage upgrade to v6." ); } if let Err(_) = PendingConfigs::::translate(|pre| { - pre.map( - |v: Vec<(primitives::SessionIndex, v5::OldHostConfiguration>)>| { - v.into_iter() - .map(|(session, config)| (session, translate(config))) - .collect::>() - }, - ) + pre.map(|v: Vec<(primitives::SessionIndex, v6::V5HostConfiguration>)>| { + v.into_iter() + .map(|(session, config)| (session, translate(config))) + .collect::>() + }) }) { log::error!( target: configuration::LOG_TARGET, - "unexpected error when performing translation of the pending configuration during storage upgrade to v5." + "unexpected error when performing translation of the pending configuration during storage upgrade to v6." ); } @@ -272,7 +272,6 @@ executor_params : Default::default(), mod tests { use super::*; use crate::mock::{new_test_ext, Test}; - use primitives::ExecutorParams; #[test] fn v4_deserialized_from_actual_data() { @@ -282,32 +281,31 @@ mod tests { // 1. Go to Polkadot.js -> Developer -> Chain state -> Storage: https://polkadot.js.org/apps/#/chainstate // 2. Set these parameters: // 2.1. selected state query: configuration; activeConfig(): PolkadotRuntimeParachainsConfigurationHostConfiguration - // 2.2. blockhash to query at: 0xf89d3ab5312c5f70d396dc59612f0aa65806c798346f9db4b35278baed2e0e53 (the hash of the block) + // 2.2. blockhash to query at: 0x1694b027ece4689079268f2884bd792690af14d25d0f5d2683797b0f0179b428 (the hash of the block) // 2.3. Note the value of encoded storage key -> 0x06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385 for the referenced block. // 2.4. You'll also need the decoded values to update the test. // 3. Go to Polkadot.js -> Developer -> Chain state -> Raw storage // 3.1 Enter the encoded storage key and you get the raw config. - // This exceeds the maximal line width length, but that's fine, since this is not code and - // doesn't need to be read and also leaving it as one line allows to easily copy it. - let raw_config = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c800000700e8764817020040011e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c80000000600000058020000580200000200000059000000000000001e000000280000000700c817a80402004001010200000014000000"]; + // Fetched on Westend 15,793,881 + let raw_config = hex_literal::hex!["00005000005000000a00000000c8000000c800000a0000000a000000c80000006400000000000000000000000000500000c800000700e8764817020040010a0000000000000000c0220fca950300000000000000000000c0220fca9503000000000000000000e8030000009001000a0000000000000000900100008070000000000000000000000a000000050000000500000001000000010500000001c8000000060000005802000002000000280000000000000002000000010000000700c817a8040200400101020000000f000000"]; - let v4 = v5::OldHostConfiguration::::decode(&mut &raw_config[..]) + let v5 = v6::V5HostConfiguration::::decode(&mut &raw_config[..]) .unwrap(); // We check only a sample of the values here. If we missed any fields or messed up data types // that would skew all the fields coming after. - assert_eq!(v4.max_code_size, 10_485_760); - assert_eq!(v4.validation_upgrade_cooldown, 3600); - assert_eq!(v4.max_pov_size, 5_242_880); - assert_eq!(v4.hrmp_channel_max_message_size, 102_400); - assert_eq!(v4.n_delay_tranches, 89); - assert_eq!(v4.ump_max_individual_weight, Weight::from_parts(20_000_000_000, 5_242_880)); - assert_eq!(v4.minimum_validation_upgrade_delay, 20); + assert_eq!(v5.max_code_size, 5242880); + assert_eq!(v5.validation_upgrade_cooldown, 200); + assert_eq!(v5.max_pov_size, 5_242_880); + assert_eq!(v5.hrmp_channel_max_message_size, 102_400); + assert_eq!(v5.n_delay_tranches, 40); + assert_eq!(v5.ump_max_individual_weight, Weight::from_parts(20_000_000_000, 5_242_880)); + assert_eq!(v5.minimum_validation_upgrade_delay, 15); // This is the last field in the struct. } #[test] - fn test_migrate_to_v5() { + fn test_migrate_to_v6() { // Host configuration has lots of fields. However, in this migration we only remove one field. // The most important part to check are a couple of the last fields. We also pick // extra fields to check arbitrarily, e.g. depending on their position (i.e. the middle) and @@ -316,7 +314,7 @@ mod tests { // We specify only the picked fields and the rest should be provided by the `Default` // implementation. That implementation is copied over between the two types and should work // fine. - let v4 = v5::OldHostConfiguration:: { + let v5 = v6::V5HostConfiguration:: { ump_max_individual_weight: Weight::from_parts(0x71616e6f6e0au64, 0x71616e6f6e0au64), needed_approvals: 69, thread_availability_period: 55, @@ -328,73 +326,71 @@ mod tests { }; let mut pending_configs = Vec::new(); - pending_configs.push((100, v4.clone())); - pending_configs.push((300, v4.clone())); + pending_configs.push((100, v5.clone())); + pending_configs.push((300, v5.clone())); new_test_ext(Default::default()).execute_with(|| { - // Implant the v4 version in the state. + // Implant the v5 version in the state. frame_support::storage::unhashed::put_raw( &configuration::ActiveConfig::::hashed_key(), - &v4.encode(), + &v5.encode(), ); frame_support::storage::unhashed::put_raw( &configuration::PendingConfigs::::hashed_key(), &pending_configs.encode(), ); - migrate_to_v5::(); + migrate_to_v6::(); - let v5 = configuration::ActiveConfig::::get(); + let v6 = configuration::ActiveConfig::::get(); let mut configs_to_check = configuration::PendingConfigs::::get(); - configs_to_check.push((0, v5.clone())); + configs_to_check.push((0, v6.clone())); - for (_, v4) in configs_to_check { + for (_, v5) in configs_to_check { #[rustfmt::skip] { - assert_eq!(v4.max_code_size , v5.max_code_size); - assert_eq!(v4.max_head_data_size , v5.max_head_data_size); - assert_eq!(v4.max_upward_queue_count , v5.max_upward_queue_count); - assert_eq!(v4.max_upward_queue_size , v5.max_upward_queue_size); - assert_eq!(v4.max_upward_message_size , v5.max_upward_message_size); - assert_eq!(v4.max_upward_message_num_per_candidate , v5.max_upward_message_num_per_candidate); - assert_eq!(v4.hrmp_max_message_num_per_candidate , v5.hrmp_max_message_num_per_candidate); - assert_eq!(v4.validation_upgrade_cooldown , v5.validation_upgrade_cooldown); - assert_eq!(v4.validation_upgrade_delay , v5.validation_upgrade_delay); - assert_eq!(v4.max_pov_size , v5.max_pov_size); - assert_eq!(v4.max_downward_message_size , v5.max_downward_message_size); - assert_eq!(v4.hrmp_max_parachain_outbound_channels , v5.hrmp_max_parachain_outbound_channels); - assert_eq!(v4.hrmp_max_parathread_outbound_channels , v5.hrmp_max_parathread_outbound_channels); - assert_eq!(v4.hrmp_sender_deposit , v5.hrmp_sender_deposit); - assert_eq!(v4.hrmp_recipient_deposit , v5.hrmp_recipient_deposit); - assert_eq!(v4.hrmp_channel_max_capacity , v5.hrmp_channel_max_capacity); - assert_eq!(v4.hrmp_channel_max_total_size , v5.hrmp_channel_max_total_size); - assert_eq!(v4.hrmp_max_parachain_inbound_channels , v5.hrmp_max_parachain_inbound_channels); - assert_eq!(v4.hrmp_max_parathread_inbound_channels , v5.hrmp_max_parathread_inbound_channels); - assert_eq!(v4.hrmp_channel_max_message_size , v5.hrmp_channel_max_message_size); - assert_eq!(v4.code_retention_period , v5.code_retention_period); - assert_eq!(v4.parathread_cores , v5.parathread_cores); - assert_eq!(v4.parathread_retries , v5.parathread_retries); - assert_eq!(v4.group_rotation_frequency , v5.group_rotation_frequency); - assert_eq!(v4.chain_availability_period , v5.chain_availability_period); - assert_eq!(v4.thread_availability_period , v5.thread_availability_period); - assert_eq!(v4.scheduling_lookahead , v5.scheduling_lookahead); - assert_eq!(v4.max_validators_per_core , v5.max_validators_per_core); - assert_eq!(v4.max_validators , v5.max_validators); - assert_eq!(v4.dispute_period , v5.dispute_period); - assert_eq!(v4.no_show_slots , v5.no_show_slots); - assert_eq!(v4.n_delay_tranches , v5.n_delay_tranches); - assert_eq!(v4.zeroth_delay_tranche_width , v5.zeroth_delay_tranche_width); - assert_eq!(v4.needed_approvals , v5.needed_approvals); - assert_eq!(v4.relay_vrf_modulo_samples , v5.relay_vrf_modulo_samples); - assert_eq!(v4.pvf_checking_enabled , v5.pvf_checking_enabled); - assert_eq!(v4.pvf_voting_ttl , v5.pvf_voting_ttl); - assert_eq!(v4.minimum_validation_upgrade_delay , v5.minimum_validation_upgrade_delay); + assert_eq!(v5.max_code_size , v6.max_code_size); + assert_eq!(v5.max_head_data_size , v6.max_head_data_size); + assert_eq!(v5.max_upward_queue_count , v6.max_upward_queue_count); + assert_eq!(v5.max_upward_queue_size , v6.max_upward_queue_size); + assert_eq!(v5.max_upward_message_size , v6.max_upward_message_size); + assert_eq!(v5.max_upward_message_num_per_candidate , v6.max_upward_message_num_per_candidate); + assert_eq!(v5.hrmp_max_message_num_per_candidate , v6.hrmp_max_message_num_per_candidate); + assert_eq!(v5.validation_upgrade_cooldown , v6.validation_upgrade_cooldown); + assert_eq!(v5.validation_upgrade_delay , v6.validation_upgrade_delay); + assert_eq!(v5.max_pov_size , v6.max_pov_size); + assert_eq!(v5.max_downward_message_size , v6.max_downward_message_size); + assert_eq!(v5.hrmp_max_parachain_outbound_channels , v6.hrmp_max_parachain_outbound_channels); + assert_eq!(v5.hrmp_max_parathread_outbound_channels , v6.hrmp_max_parathread_outbound_channels); + assert_eq!(v5.hrmp_sender_deposit , v6.hrmp_sender_deposit); + assert_eq!(v5.hrmp_recipient_deposit , v6.hrmp_recipient_deposit); + assert_eq!(v5.hrmp_channel_max_capacity , v6.hrmp_channel_max_capacity); + assert_eq!(v5.hrmp_channel_max_total_size , v6.hrmp_channel_max_total_size); + assert_eq!(v5.hrmp_max_parachain_inbound_channels , v6.hrmp_max_parachain_inbound_channels); + assert_eq!(v5.hrmp_max_parathread_inbound_channels , v6.hrmp_max_parathread_inbound_channels); + assert_eq!(v5.hrmp_channel_max_message_size , v6.hrmp_channel_max_message_size); + assert_eq!(v5.code_retention_period , v6.code_retention_period); + assert_eq!(v5.parathread_cores , v6.parathread_cores); + assert_eq!(v5.parathread_retries , v6.parathread_retries); + assert_eq!(v5.group_rotation_frequency , v6.group_rotation_frequency); + assert_eq!(v5.chain_availability_period , v6.chain_availability_period); + assert_eq!(v5.thread_availability_period , v6.thread_availability_period); + assert_eq!(v5.scheduling_lookahead , v6.scheduling_lookahead); + assert_eq!(v5.max_validators_per_core , v6.max_validators_per_core); + assert_eq!(v5.max_validators , v6.max_validators); + assert_eq!(v5.dispute_period , v6.dispute_period); + assert_eq!(v5.no_show_slots , v6.no_show_slots); + assert_eq!(v5.n_delay_tranches , v6.n_delay_tranches); + assert_eq!(v5.zeroth_delay_tranche_width , v6.zeroth_delay_tranche_width); + assert_eq!(v5.needed_approvals , v6.needed_approvals); + assert_eq!(v5.relay_vrf_modulo_samples , v6.relay_vrf_modulo_samples); + assert_eq!(v5.pvf_checking_enabled , v6.pvf_checking_enabled); + assert_eq!(v5.pvf_voting_ttl , v6.pvf_voting_ttl); + assert_eq!(v5.minimum_validation_upgrade_delay , v6.minimum_validation_upgrade_delay); + assert_eq!(v5.async_backing_params.allowed_ancestry_len, v6.async_backing_params.allowed_ancestry_len); + assert_eq!(v5.async_backing_params.max_candidate_depth , v6.async_backing_params.max_candidate_depth); + assert_eq!(v5.executor_params , v6.executor_params); }; // ; makes this a statement. `rustfmt::skip` cannot be put on an expression. - - // additional checks for async backing. - assert_eq!(v5.async_backing_params.allowed_ancestry_len, 0); - assert_eq!(v5.async_backing_params.max_candidate_depth, 0); - assert_eq!(v5.executor_params, ExecutorParams::new()); } }); } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 8335c59f110c..17bd7bb3e121 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1478,31 +1478,17 @@ impl Get for NominationPoolsMigrationV4OldPallet { /// /// This contains the combined migrations of the last 10 releases. It allows to skip runtime /// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = - (migrations::V0940, migrations::V0941, migrations::V0942, migrations::Unreleased); +pub type Migrations = (migrations::Unreleased); /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { use super::*; - pub type V0940 = ( - pallet_nomination_pools::migration::v4::MigrateToV4< - Runtime, - NominationPoolsMigrationV4OldPallet, - >, - pallet_nomination_pools::migration::v5::MigrateToV5, - ); - pub type V0941 = (); // Node only release - no migrations. - pub type V0942 = ( - parachains_configuration::migration::v5::MigrateToV5, - pallet_offences::migration::v1::MigrateToV1, - runtime_common::session::migration::ClearOldSessionStorage, - ); - /// Unreleased migrations. Add new ones here: pub type Unreleased = ( // Remove UMP dispatch queue + parachains_configuration::migration::MigrateV5ToV6, ump_migrations::UpdateUmpLimits, ); } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index cc864b7151be..8c1a69f6a4c6 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1517,24 +1517,17 @@ pub type UncheckedExtrinsic = /// /// This contains the combined migrations of the last 10 releases. It allows to skip runtime /// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = - (migrations::V0940, migrations::V0941, migrations::V0942, migrations::Unreleased); +pub type Migrations = (migrations::Unreleased); /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { use super::*; - pub type V0940 = (); - pub type V0941 = (); // Node only release - no migrations. - pub type V0942 = ( - parachains_configuration::migration::v5::MigrateToV5, - pallet_offences::migration::v1::MigrateToV1, - ); - /// Unreleased migrations. Add new ones here: pub type Unreleased = ( // Remove UMP dispatch queue + parachains_configuration::migration::MigrateV5ToV6, ump_migrations::UpdateUmpLimits, ); } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index ea5646a28c68..900de220f2f2 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1258,31 +1258,17 @@ impl Get for NominationPoolsMigrationV4OldPallet { /// /// This contains the combined migrations of the last 10 releases. It allows to skip runtime /// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = - (migrations::V0940, migrations::V0941, migrations::V0942, migrations::Unreleased); +pub type Migrations = (migrations::Unreleased); /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { use super::*; - pub type V0940 = ( - clean_state_migration::CleanMigrate, - pallet_nomination_pools::migration::v4::MigrateToV4< - Runtime, - NominationPoolsMigrationV4OldPallet, - >, - pallet_nomination_pools::migration::v5::MigrateToV5, - ); - pub type V0941 = (); // Node only release - no migrations. - pub type V0942 = ( - parachains_configuration::migration::v5::MigrateToV5, - pallet_offences::migration::v1::MigrateToV1, - ); - /// Unreleased migrations. Add new ones here: pub type Unreleased = ( // Remove UMP dispatch queue + parachains_configuration::migration::MigrateV5ToV6, ump_migrations::UpdateUmpLimits, ); } From 5c9cb08b4dfb43a23200ea2fe0444d6459a5086e Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 12 May 2023 21:38:46 +0200 Subject: [PATCH 172/182] Actually make old migrations reusable Signed-off-by: Oliver Tale-Yazdi --- .../parachains/src/configuration/migration.rs | 370 +------------ .../src/configuration/migration/v5.rs | 504 ++++++++++++++++++ .../src/configuration/migration/v6.rs | 292 ++++++++++ 3 files changed, 800 insertions(+), 366 deletions(-) create mode 100644 runtime/parachains/src/configuration/migration/v5.rs create mode 100644 runtime/parachains/src/configuration/migration/v6.rs diff --git a/runtime/parachains/src/configuration/migration.rs b/runtime/parachains/src/configuration/migration.rs index 9cd13a48901b..c41d4f3055b7 100644 --- a/runtime/parachains/src/configuration/migration.rs +++ b/runtime/parachains/src/configuration/migration.rs @@ -16,11 +16,8 @@ //! A module that is responsible for migration of storage. -use crate::configuration::{self, ActiveConfig, Config, Pallet, PendingConfigs, MAX_POV_SIZE}; -use frame_support::{pallet_prelude::*, traits::StorageVersion, weights::Weight}; -use frame_system::pallet_prelude::BlockNumberFor; -use primitives::{vstaging::AsyncBackingParams, ExecutorParams}; -use sp_std::vec::Vec; +use frame_support::traits::StorageVersion; +use primitives::ExecutorParams; /// The current storage version. /// @@ -34,364 +31,5 @@ use sp_std::vec::Vec; /// v5-v6: (remove UMP dispatch queue) pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(6); -pub use v6::MigrateV5ToV6; -pub mod v6 { - use super::*; - use frame_support::{traits::OnRuntimeUpgrade, weights::constants::WEIGHT_REF_TIME_PER_MILLIS}; - use primitives::{Balance, SessionIndex}; - #[cfg(feature = "try-runtime")] - use sp_std::prelude::*; - - // Copied over from configuration.rs @ de9e147695b9f1be8bd44e07861a31e483c8343a and removed - // all the comments, and changed the Weight struct to OldWeight - #[derive(parity_scale_codec::Encode, parity_scale_codec::Decode, Debug, Clone)] - pub struct V5HostConfiguration { - pub max_code_size: u32, - pub max_head_data_size: u32, - pub max_upward_queue_count: u32, - pub max_upward_queue_size: u32, - pub max_upward_message_size: u32, - pub max_upward_message_num_per_candidate: u32, - pub hrmp_max_message_num_per_candidate: u32, - pub validation_upgrade_cooldown: BlockNumber, - pub validation_upgrade_delay: BlockNumber, - pub async_backing_params: AsyncBackingParams, - pub max_pov_size: u32, - pub max_downward_message_size: u32, - pub ump_service_total_weight: Weight, - pub hrmp_max_parachain_outbound_channels: u32, - pub hrmp_max_parathread_outbound_channels: u32, - pub hrmp_sender_deposit: Balance, - pub hrmp_recipient_deposit: Balance, - pub hrmp_channel_max_capacity: u32, - pub hrmp_channel_max_total_size: u32, - pub hrmp_max_parachain_inbound_channels: u32, - pub hrmp_max_parathread_inbound_channels: u32, - pub hrmp_channel_max_message_size: u32, - pub executor_params: ExecutorParams, - pub code_retention_period: BlockNumber, - pub parathread_cores: u32, - pub parathread_retries: u32, - pub group_rotation_frequency: BlockNumber, - pub chain_availability_period: BlockNumber, - pub thread_availability_period: BlockNumber, - pub scheduling_lookahead: u32, - pub max_validators_per_core: Option, - pub max_validators: Option, - pub dispute_period: SessionIndex, - pub dispute_post_conclusion_acceptance_period: BlockNumber, - pub no_show_slots: u32, - pub n_delay_tranches: u32, - pub zeroth_delay_tranche_width: u32, - pub needed_approvals: u32, - pub relay_vrf_modulo_samples: u32, - pub ump_max_individual_weight: Weight, - pub pvf_checking_enabled: bool, - pub pvf_voting_ttl: SessionIndex, - pub minimum_validation_upgrade_delay: BlockNumber, - } - - impl> Default for V5HostConfiguration { - fn default() -> Self { - Self { - group_rotation_frequency: 1u32.into(), - chain_availability_period: 1u32.into(), - thread_availability_period: 1u32.into(), - no_show_slots: 1u32.into(), - validation_upgrade_cooldown: Default::default(), - validation_upgrade_delay: Default::default(), - code_retention_period: Default::default(), - max_code_size: Default::default(), - max_pov_size: Default::default(), - max_head_data_size: Default::default(), - parathread_cores: Default::default(), - parathread_retries: Default::default(), - scheduling_lookahead: Default::default(), - max_validators_per_core: Default::default(), - max_validators: None, - dispute_period: 6, - dispute_post_conclusion_acceptance_period: 100.into(), - n_delay_tranches: Default::default(), - zeroth_delay_tranche_width: Default::default(), - needed_approvals: Default::default(), - relay_vrf_modulo_samples: Default::default(), - max_upward_queue_count: Default::default(), - max_upward_queue_size: Default::default(), - max_downward_message_size: Default::default(), - ump_service_total_weight: Default::default(), - max_upward_message_size: Default::default(), - max_upward_message_num_per_candidate: Default::default(), - hrmp_sender_deposit: Default::default(), - hrmp_recipient_deposit: Default::default(), - hrmp_channel_max_capacity: Default::default(), - hrmp_channel_max_total_size: Default::default(), - hrmp_max_parachain_inbound_channels: Default::default(), - hrmp_max_parathread_inbound_channels: Default::default(), - hrmp_channel_max_message_size: Default::default(), - hrmp_max_parachain_outbound_channels: Default::default(), - hrmp_max_parathread_outbound_channels: Default::default(), - hrmp_max_message_num_per_candidate: Default::default(), - ump_max_individual_weight: Weight::from_parts( - 20u64 * WEIGHT_REF_TIME_PER_MILLIS, - MAX_POV_SIZE as u64, - ), - pvf_checking_enabled: false, - pvf_voting_ttl: 2u32.into(), - minimum_validation_upgrade_delay: 2.into(), - async_backing_params: AsyncBackingParams { - max_candidate_depth: 0, - allowed_ancestry_len: 0, - }, - executor_params: Default::default(), - } - } - } - - pub struct MigrateV5ToV6(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateV5ToV6 { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade()"); - - ensure!(StorageVersion::get::>() == 5, "The migration requires version 4"); - Ok(Vec::new()) - } - - fn on_runtime_upgrade() -> Weight { - if StorageVersion::get::>() == 5 { - let weight_consumed = migrate_to_v6::(); - - log::info!(target: configuration::LOG_TARGET, "MigrateToV6 executed successfully"); - StorageVersion::new(6).put::>(); - - weight_consumed - } else { - log::warn!(target: configuration::LOG_TARGET, "MigrateToV6 should be removed."); - T::DbWeight::get().reads(1) - } - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), &'static str> { - log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade()"); - ensure!( - StorageVersion::get::>() == StorageVersion::new(6), - "Storage version should be 6 after the migration" - ); - - Ok(()) - } - } -} - -fn migrate_to_v6() -> Weight { - // Unusual formatting is justified: - // - make it easier to verify that fields assign what they supposed to assign. - // - this code is transient and will be removed after all migrations are done. - // - this code is important enough to optimize for legibility sacrificing consistency. - #[rustfmt::skip] - let translate = - |pre: v6::V5HostConfiguration>| -> - configuration::HostConfiguration> - { - configuration::HostConfiguration { -max_code_size : pre.max_code_size, -max_head_data_size : pre.max_head_data_size, -max_upward_queue_count : pre.max_upward_queue_count, -max_upward_queue_size : pre.max_upward_queue_size, -max_upward_message_size : pre.max_upward_message_size, -max_upward_message_num_per_candidate : pre.max_upward_message_num_per_candidate, -hrmp_max_message_num_per_candidate : pre.hrmp_max_message_num_per_candidate, -validation_upgrade_cooldown : pre.validation_upgrade_cooldown, -validation_upgrade_delay : pre.validation_upgrade_delay, -max_pov_size : pre.max_pov_size, -max_downward_message_size : pre.max_downward_message_size, -hrmp_max_parachain_outbound_channels : pre.hrmp_max_parachain_outbound_channels, -hrmp_max_parathread_outbound_channels : pre.hrmp_max_parathread_outbound_channels, -hrmp_sender_deposit : pre.hrmp_sender_deposit, -hrmp_recipient_deposit : pre.hrmp_recipient_deposit, -hrmp_channel_max_capacity : pre.hrmp_channel_max_capacity, -hrmp_channel_max_total_size : pre.hrmp_channel_max_total_size, -hrmp_max_parachain_inbound_channels : pre.hrmp_max_parachain_inbound_channels, -hrmp_max_parathread_inbound_channels : pre.hrmp_max_parathread_inbound_channels, -hrmp_channel_max_message_size : pre.hrmp_channel_max_message_size, -code_retention_period : pre.code_retention_period, -parathread_cores : pre.parathread_cores, -parathread_retries : pre.parathread_retries, -group_rotation_frequency : pre.group_rotation_frequency, -chain_availability_period : pre.chain_availability_period, -thread_availability_period : pre.thread_availability_period, -scheduling_lookahead : pre.scheduling_lookahead, -max_validators_per_core : pre.max_validators_per_core, -max_validators : pre.max_validators, -dispute_period : pre.dispute_period, -dispute_post_conclusion_acceptance_period: pre.dispute_post_conclusion_acceptance_period, -no_show_slots : pre.no_show_slots, -n_delay_tranches : pre.n_delay_tranches, -zeroth_delay_tranche_width : pre.zeroth_delay_tranche_width, -needed_approvals : pre.needed_approvals, -relay_vrf_modulo_samples : pre.relay_vrf_modulo_samples, -pvf_checking_enabled : pre.pvf_checking_enabled, -pvf_voting_ttl : pre.pvf_voting_ttl, -minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, -async_backing_params : pre.async_backing_params, -executor_params : pre.executor_params, - } - }; - - if let Err(_) = ActiveConfig::::translate(|pre| pre.map(translate)) { - // `Err` is returned when the pre-migration type cannot be deserialized. This - // cannot happen if the migration runs correctly, i.e. against the expected version. - // - // This happening almost surely will lead to a panic somewhere else. Corruption seems - // to be unlikely to be caused by this. So we just log. Maybe it'll work out still? - log::error!( - target: configuration::LOG_TARGET, - "unexpected error when performing translation of the active configuration during storage upgrade to v6." - ); - } - - if let Err(_) = PendingConfigs::::translate(|pre| { - pre.map(|v: Vec<(primitives::SessionIndex, v6::V5HostConfiguration>)>| { - v.into_iter() - .map(|(session, config)| (session, translate(config))) - .collect::>() - }) - }) { - log::error!( - target: configuration::LOG_TARGET, - "unexpected error when performing translation of the pending configuration during storage upgrade to v6." - ); - } - - let num_configs = (PendingConfigs::::get().len() + 1) as u64; - T::DbWeight::get().reads_writes(num_configs, num_configs) -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::mock::{new_test_ext, Test}; - - #[test] - fn v4_deserialized_from_actual_data() { - // Example how to get new `raw_config`: - // We'll obtain the raw_config at a specified a block - // Steps: - // 1. Go to Polkadot.js -> Developer -> Chain state -> Storage: https://polkadot.js.org/apps/#/chainstate - // 2. Set these parameters: - // 2.1. selected state query: configuration; activeConfig(): PolkadotRuntimeParachainsConfigurationHostConfiguration - // 2.2. blockhash to query at: 0x1694b027ece4689079268f2884bd792690af14d25d0f5d2683797b0f0179b428 (the hash of the block) - // 2.3. Note the value of encoded storage key -> 0x06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385 for the referenced block. - // 2.4. You'll also need the decoded values to update the test. - // 3. Go to Polkadot.js -> Developer -> Chain state -> Raw storage - // 3.1 Enter the encoded storage key and you get the raw config. - - // Fetched on Westend 15,793,881 - let raw_config = hex_literal::hex!["00005000005000000a00000000c8000000c800000a0000000a000000c80000006400000000000000000000000000500000c800000700e8764817020040010a0000000000000000c0220fca950300000000000000000000c0220fca9503000000000000000000e8030000009001000a0000000000000000900100008070000000000000000000000a000000050000000500000001000000010500000001c8000000060000005802000002000000280000000000000002000000010000000700c817a8040200400101020000000f000000"]; - - let v5 = v6::V5HostConfiguration::::decode(&mut &raw_config[..]) - .unwrap(); - - // We check only a sample of the values here. If we missed any fields or messed up data types - // that would skew all the fields coming after. - assert_eq!(v5.max_code_size, 5242880); - assert_eq!(v5.validation_upgrade_cooldown, 200); - assert_eq!(v5.max_pov_size, 5_242_880); - assert_eq!(v5.hrmp_channel_max_message_size, 102_400); - assert_eq!(v5.n_delay_tranches, 40); - assert_eq!(v5.ump_max_individual_weight, Weight::from_parts(20_000_000_000, 5_242_880)); - assert_eq!(v5.minimum_validation_upgrade_delay, 15); // This is the last field in the struct. - } - - #[test] - fn test_migrate_to_v6() { - // Host configuration has lots of fields. However, in this migration we only remove one field. - // The most important part to check are a couple of the last fields. We also pick - // extra fields to check arbitrarily, e.g. depending on their position (i.e. the middle) and - // also their type. - // - // We specify only the picked fields and the rest should be provided by the `Default` - // implementation. That implementation is copied over between the two types and should work - // fine. - let v5 = v6::V5HostConfiguration:: { - ump_max_individual_weight: Weight::from_parts(0x71616e6f6e0au64, 0x71616e6f6e0au64), - needed_approvals: 69, - thread_availability_period: 55, - hrmp_recipient_deposit: 1337, - max_pov_size: 1111, - chain_availability_period: 33, - minimum_validation_upgrade_delay: 20, - ..Default::default() - }; - - let mut pending_configs = Vec::new(); - pending_configs.push((100, v5.clone())); - pending_configs.push((300, v5.clone())); - - new_test_ext(Default::default()).execute_with(|| { - // Implant the v5 version in the state. - frame_support::storage::unhashed::put_raw( - &configuration::ActiveConfig::::hashed_key(), - &v5.encode(), - ); - frame_support::storage::unhashed::put_raw( - &configuration::PendingConfigs::::hashed_key(), - &pending_configs.encode(), - ); - - migrate_to_v6::(); - - let v6 = configuration::ActiveConfig::::get(); - let mut configs_to_check = configuration::PendingConfigs::::get(); - configs_to_check.push((0, v6.clone())); - - for (_, v5) in configs_to_check { - #[rustfmt::skip] - { - assert_eq!(v5.max_code_size , v6.max_code_size); - assert_eq!(v5.max_head_data_size , v6.max_head_data_size); - assert_eq!(v5.max_upward_queue_count , v6.max_upward_queue_count); - assert_eq!(v5.max_upward_queue_size , v6.max_upward_queue_size); - assert_eq!(v5.max_upward_message_size , v6.max_upward_message_size); - assert_eq!(v5.max_upward_message_num_per_candidate , v6.max_upward_message_num_per_candidate); - assert_eq!(v5.hrmp_max_message_num_per_candidate , v6.hrmp_max_message_num_per_candidate); - assert_eq!(v5.validation_upgrade_cooldown , v6.validation_upgrade_cooldown); - assert_eq!(v5.validation_upgrade_delay , v6.validation_upgrade_delay); - assert_eq!(v5.max_pov_size , v6.max_pov_size); - assert_eq!(v5.max_downward_message_size , v6.max_downward_message_size); - assert_eq!(v5.hrmp_max_parachain_outbound_channels , v6.hrmp_max_parachain_outbound_channels); - assert_eq!(v5.hrmp_max_parathread_outbound_channels , v6.hrmp_max_parathread_outbound_channels); - assert_eq!(v5.hrmp_sender_deposit , v6.hrmp_sender_deposit); - assert_eq!(v5.hrmp_recipient_deposit , v6.hrmp_recipient_deposit); - assert_eq!(v5.hrmp_channel_max_capacity , v6.hrmp_channel_max_capacity); - assert_eq!(v5.hrmp_channel_max_total_size , v6.hrmp_channel_max_total_size); - assert_eq!(v5.hrmp_max_parachain_inbound_channels , v6.hrmp_max_parachain_inbound_channels); - assert_eq!(v5.hrmp_max_parathread_inbound_channels , v6.hrmp_max_parathread_inbound_channels); - assert_eq!(v5.hrmp_channel_max_message_size , v6.hrmp_channel_max_message_size); - assert_eq!(v5.code_retention_period , v6.code_retention_period); - assert_eq!(v5.parathread_cores , v6.parathread_cores); - assert_eq!(v5.parathread_retries , v6.parathread_retries); - assert_eq!(v5.group_rotation_frequency , v6.group_rotation_frequency); - assert_eq!(v5.chain_availability_period , v6.chain_availability_period); - assert_eq!(v5.thread_availability_period , v6.thread_availability_period); - assert_eq!(v5.scheduling_lookahead , v6.scheduling_lookahead); - assert_eq!(v5.max_validators_per_core , v6.max_validators_per_core); - assert_eq!(v5.max_validators , v6.max_validators); - assert_eq!(v5.dispute_period , v6.dispute_period); - assert_eq!(v5.no_show_slots , v6.no_show_slots); - assert_eq!(v5.n_delay_tranches , v6.n_delay_tranches); - assert_eq!(v5.zeroth_delay_tranche_width , v6.zeroth_delay_tranche_width); - assert_eq!(v5.needed_approvals , v6.needed_approvals); - assert_eq!(v5.relay_vrf_modulo_samples , v6.relay_vrf_modulo_samples); - assert_eq!(v5.pvf_checking_enabled , v6.pvf_checking_enabled); - assert_eq!(v5.pvf_voting_ttl , v6.pvf_voting_ttl); - assert_eq!(v5.minimum_validation_upgrade_delay , v6.minimum_validation_upgrade_delay); - assert_eq!(v5.async_backing_params.allowed_ancestry_len, v6.async_backing_params.allowed_ancestry_len); - assert_eq!(v5.async_backing_params.max_candidate_depth , v6.async_backing_params.max_candidate_depth); - assert_eq!(v5.executor_params , v6.executor_params); - }; // ; makes this a statement. `rustfmt::skip` cannot be put on an expression. - } - }); - } -} +pub mod v5; +pub mod v6; diff --git a/runtime/parachains/src/configuration/migration/v5.rs b/runtime/parachains/src/configuration/migration/v5.rs new file mode 100644 index 000000000000..8cb17408878e --- /dev/null +++ b/runtime/parachains/src/configuration/migration/v5.rs @@ -0,0 +1,504 @@ +// Copyright (C) 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 . + +//! A module that is responsible for migration of storage. + +use crate::configuration::{self, Config, Pallet, MAX_POV_SIZE}; +use frame_support::{ + pallet_prelude::*, + traits::{Defensive, StorageVersion}, + weights::Weight, +}; +use frame_system::pallet_prelude::BlockNumberFor; +use primitives::vstaging::AsyncBackingParams; +use sp_std::vec::Vec; + +use super::*; +use frame_support::{traits::OnRuntimeUpgrade, weights::constants::WEIGHT_REF_TIME_PER_MILLIS}; +use primitives::{Balance, SessionIndex}; +#[cfg(feature = "try-runtime")] +use sp_std::prelude::*; + +// Copied over from configuration.rs @ de9e147695b9f1be8bd44e07861a31e483c8343a and removed +// all the comments, and changed the Weight struct to OldWeight +#[derive(parity_scale_codec::Encode, parity_scale_codec::Decode, Debug, Clone)] +pub struct V4HostConfiguration { + pub max_code_size: u32, + pub max_head_data_size: u32, + pub max_upward_queue_count: u32, + pub max_upward_queue_size: u32, + pub max_upward_message_size: u32, + pub max_upward_message_num_per_candidate: u32, + pub hrmp_max_message_num_per_candidate: u32, + pub validation_upgrade_cooldown: BlockNumber, + pub validation_upgrade_delay: BlockNumber, + pub max_pov_size: u32, + pub max_downward_message_size: u32, + pub ump_service_total_weight: Weight, + pub hrmp_max_parachain_outbound_channels: u32, + pub hrmp_max_parathread_outbound_channels: u32, + pub hrmp_sender_deposit: Balance, + pub hrmp_recipient_deposit: Balance, + pub hrmp_channel_max_capacity: u32, + pub hrmp_channel_max_total_size: u32, + pub hrmp_max_parachain_inbound_channels: u32, + pub hrmp_max_parathread_inbound_channels: u32, + pub hrmp_channel_max_message_size: u32, + pub code_retention_period: BlockNumber, + pub parathread_cores: u32, + pub parathread_retries: u32, + pub group_rotation_frequency: BlockNumber, + pub chain_availability_period: BlockNumber, + pub thread_availability_period: BlockNumber, + pub scheduling_lookahead: u32, + pub max_validators_per_core: Option, + pub max_validators: Option, + pub dispute_period: SessionIndex, + pub dispute_post_conclusion_acceptance_period: BlockNumber, + pub dispute_conclusion_by_time_out_period: BlockNumber, + pub no_show_slots: u32, + pub n_delay_tranches: u32, + pub zeroth_delay_tranche_width: u32, + pub needed_approvals: u32, + pub relay_vrf_modulo_samples: u32, + pub ump_max_individual_weight: Weight, + pub pvf_checking_enabled: bool, + pub pvf_voting_ttl: SessionIndex, + pub minimum_validation_upgrade_delay: BlockNumber, +} + +#[derive(parity_scale_codec::Encode, parity_scale_codec::Decode, Debug, Clone)] +pub struct V5HostConfiguration { + pub max_code_size: u32, + pub max_head_data_size: u32, + pub max_upward_queue_count: u32, + pub max_upward_queue_size: u32, + pub max_upward_message_size: u32, + pub max_upward_message_num_per_candidate: u32, + pub hrmp_max_message_num_per_candidate: u32, + pub validation_upgrade_cooldown: BlockNumber, + pub validation_upgrade_delay: BlockNumber, + pub async_backing_params: AsyncBackingParams, + pub max_pov_size: u32, + pub max_downward_message_size: u32, + pub ump_service_total_weight: Weight, + pub hrmp_max_parachain_outbound_channels: u32, + pub hrmp_max_parathread_outbound_channels: u32, + pub hrmp_sender_deposit: Balance, + pub hrmp_recipient_deposit: Balance, + pub hrmp_channel_max_capacity: u32, + pub hrmp_channel_max_total_size: u32, + pub hrmp_max_parachain_inbound_channels: u32, + pub hrmp_max_parathread_inbound_channels: u32, + pub hrmp_channel_max_message_size: u32, + pub executor_params: ExecutorParams, + pub code_retention_period: BlockNumber, + pub parathread_cores: u32, + pub parathread_retries: u32, + pub group_rotation_frequency: BlockNumber, + pub chain_availability_period: BlockNumber, + pub thread_availability_period: BlockNumber, + pub scheduling_lookahead: u32, + pub max_validators_per_core: Option, + pub max_validators: Option, + pub dispute_period: SessionIndex, + pub dispute_post_conclusion_acceptance_period: BlockNumber, + pub no_show_slots: u32, + pub n_delay_tranches: u32, + pub zeroth_delay_tranche_width: u32, + pub needed_approvals: u32, + pub relay_vrf_modulo_samples: u32, + pub ump_max_individual_weight: Weight, + pub pvf_checking_enabled: bool, + pub pvf_voting_ttl: SessionIndex, + pub minimum_validation_upgrade_delay: BlockNumber, +} + +#[frame_support::storage_alias] +pub(crate) type V4ActiveConfig = + StorageValue, V4HostConfiguration>, OptionQuery>; + +#[frame_support::storage_alias] +pub(crate) type V4PendingConfigs = StorageValue< + Pallet, + Vec<(SessionIndex, V4HostConfiguration>)>, + OptionQuery, +>; + +#[frame_support::storage_alias] +pub(crate) type V5ActiveConfig = + StorageValue, V5HostConfiguration>, OptionQuery>; + +#[frame_support::storage_alias] +pub(crate) type V5PendingConfigs = StorageValue< + Pallet, + Vec<(SessionIndex, V5HostConfiguration>)>, + OptionQuery, +>; + +impl> Default for V4HostConfiguration { + fn default() -> Self { + Self { + group_rotation_frequency: 1u32.into(), + chain_availability_period: 1u32.into(), + thread_availability_period: 1u32.into(), + no_show_slots: 1u32.into(), + validation_upgrade_cooldown: Default::default(), + validation_upgrade_delay: Default::default(), + code_retention_period: Default::default(), + max_code_size: Default::default(), + max_pov_size: Default::default(), + max_head_data_size: Default::default(), + parathread_cores: Default::default(), + parathread_retries: Default::default(), + scheduling_lookahead: Default::default(), + max_validators_per_core: Default::default(), + max_validators: None, + dispute_period: 6, + dispute_post_conclusion_acceptance_period: 100.into(), + dispute_conclusion_by_time_out_period: 200.into(), + n_delay_tranches: Default::default(), + zeroth_delay_tranche_width: Default::default(), + needed_approvals: Default::default(), + relay_vrf_modulo_samples: Default::default(), + max_upward_queue_count: Default::default(), + max_upward_queue_size: Default::default(), + max_downward_message_size: Default::default(), + ump_service_total_weight: Default::default(), + max_upward_message_size: Default::default(), + max_upward_message_num_per_candidate: Default::default(), + hrmp_sender_deposit: Default::default(), + hrmp_recipient_deposit: Default::default(), + hrmp_channel_max_capacity: Default::default(), + hrmp_channel_max_total_size: Default::default(), + hrmp_max_parachain_inbound_channels: Default::default(), + hrmp_max_parathread_inbound_channels: Default::default(), + hrmp_channel_max_message_size: Default::default(), + hrmp_max_parachain_outbound_channels: Default::default(), + hrmp_max_parathread_outbound_channels: Default::default(), + hrmp_max_message_num_per_candidate: Default::default(), + ump_max_individual_weight: Weight::from_parts( + 20u64 * WEIGHT_REF_TIME_PER_MILLIS, + MAX_POV_SIZE as u64, + ), + pvf_checking_enabled: false, + pvf_voting_ttl: 2u32.into(), + minimum_validation_upgrade_delay: 2.into(), + } + } +} + +impl> Default for V5HostConfiguration { + fn default() -> Self { + Self { + group_rotation_frequency: 1u32.into(), + chain_availability_period: 1u32.into(), + thread_availability_period: 1u32.into(), + no_show_slots: 1u32.into(), + validation_upgrade_cooldown: Default::default(), + validation_upgrade_delay: Default::default(), + code_retention_period: Default::default(), + max_code_size: Default::default(), + max_pov_size: Default::default(), + max_head_data_size: Default::default(), + parathread_cores: Default::default(), + parathread_retries: Default::default(), + scheduling_lookahead: Default::default(), + max_validators_per_core: Default::default(), + max_validators: None, + dispute_period: 6, + dispute_post_conclusion_acceptance_period: 100.into(), + n_delay_tranches: Default::default(), + zeroth_delay_tranche_width: Default::default(), + needed_approvals: Default::default(), + relay_vrf_modulo_samples: Default::default(), + max_upward_queue_count: Default::default(), + max_upward_queue_size: Default::default(), + max_downward_message_size: Default::default(), + ump_service_total_weight: Default::default(), + max_upward_message_size: Default::default(), + max_upward_message_num_per_candidate: Default::default(), + hrmp_sender_deposit: Default::default(), + hrmp_recipient_deposit: Default::default(), + hrmp_channel_max_capacity: Default::default(), + hrmp_channel_max_total_size: Default::default(), + hrmp_max_parachain_inbound_channels: Default::default(), + hrmp_max_parathread_inbound_channels: Default::default(), + hrmp_channel_max_message_size: Default::default(), + hrmp_max_parachain_outbound_channels: Default::default(), + hrmp_max_parathread_outbound_channels: Default::default(), + hrmp_max_message_num_per_candidate: Default::default(), + ump_max_individual_weight: Weight::from_parts( + 20u64 * WEIGHT_REF_TIME_PER_MILLIS, + MAX_POV_SIZE as u64, + ), + pvf_checking_enabled: false, + pvf_voting_ttl: 2u32.into(), + minimum_validation_upgrade_delay: 2.into(), + async_backing_params: AsyncBackingParams { + max_candidate_depth: 0, + allowed_ancestry_len: 0, + }, + executor_params: Default::default(), + } + } +} + +pub struct MigrateToV5(sp_std::marker::PhantomData); +impl OnRuntimeUpgrade for MigrateToV5 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, &'static str> { + log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade()"); + + ensure!(StorageVersion::get::>() == 4, "The migration requires version 4"); + Ok(Vec::new()) + } + + fn on_runtime_upgrade() -> Weight { + if StorageVersion::get::>() == 4 { + let weight_consumed = migrate_to_v5::(); + + log::info!(target: configuration::LOG_TARGET, "MigrateToV5 executed successfully"); + StorageVersion::new(5).put::>(); + + weight_consumed + } else { + log::warn!(target: configuration::LOG_TARGET, "MigrateToV5 should be removed."); + T::DbWeight::get().reads(1) + } + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { + log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade()"); + ensure!( + StorageVersion::get::>() == 5, + "Storage version should be 5 after the migration" + ); + + Ok(()) + } +} + +fn migrate_to_v5() -> Weight { + // Unusual formatting is justified: + // - make it easier to verify that fields assign what they supposed to assign. + // - this code is transient and will be removed after all migrations are done. + // - this code is important enough to optimize for legibility sacrificing consistency. + #[rustfmt::skip] + let translate = + |pre: V4HostConfiguration>| -> + V5HostConfiguration> + { + V5HostConfiguration { +max_code_size : pre.max_code_size, +max_head_data_size : pre.max_head_data_size, +max_upward_queue_count : pre.max_upward_queue_count, +max_upward_queue_size : pre.max_upward_queue_size, +max_upward_message_size : pre.max_upward_message_size, +max_upward_message_num_per_candidate : pre.max_upward_message_num_per_candidate, +hrmp_max_message_num_per_candidate : pre.hrmp_max_message_num_per_candidate, +validation_upgrade_cooldown : pre.validation_upgrade_cooldown, +validation_upgrade_delay : pre.validation_upgrade_delay, +max_pov_size : pre.max_pov_size, +max_downward_message_size : pre.max_downward_message_size, +ump_service_total_weight : pre.ump_service_total_weight, +hrmp_max_parachain_outbound_channels : pre.hrmp_max_parachain_outbound_channels, +hrmp_max_parathread_outbound_channels : pre.hrmp_max_parathread_outbound_channels, +hrmp_sender_deposit : pre.hrmp_sender_deposit, +hrmp_recipient_deposit : pre.hrmp_recipient_deposit, +hrmp_channel_max_capacity : pre.hrmp_channel_max_capacity, +hrmp_channel_max_total_size : pre.hrmp_channel_max_total_size, +hrmp_max_parachain_inbound_channels : pre.hrmp_max_parachain_inbound_channels, +hrmp_max_parathread_inbound_channels : pre.hrmp_max_parathread_inbound_channels, +hrmp_channel_max_message_size : pre.hrmp_channel_max_message_size, +code_retention_period : pre.code_retention_period, +parathread_cores : pre.parathread_cores, +parathread_retries : pre.parathread_retries, +group_rotation_frequency : pre.group_rotation_frequency, +chain_availability_period : pre.chain_availability_period, +thread_availability_period : pre.thread_availability_period, +scheduling_lookahead : pre.scheduling_lookahead, +max_validators_per_core : pre.max_validators_per_core, +max_validators : pre.max_validators, +dispute_period : pre.dispute_period, +dispute_post_conclusion_acceptance_period: pre.dispute_post_conclusion_acceptance_period, +no_show_slots : pre.no_show_slots, +n_delay_tranches : pre.n_delay_tranches, +zeroth_delay_tranche_width : pre.zeroth_delay_tranche_width, +needed_approvals : pre.needed_approvals, +relay_vrf_modulo_samples : pre.relay_vrf_modulo_samples, +ump_max_individual_weight : pre.ump_max_individual_weight, +pvf_checking_enabled : pre.pvf_checking_enabled, +pvf_voting_ttl : pre.pvf_voting_ttl, +minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, + +// Default values are zeroes, thus it's ensured allowed ancestry never crosses the upgrade block. +async_backing_params : AsyncBackingParams { max_candidate_depth: 0, allowed_ancestry_len: 0 }, + +// Default executor parameters set is empty +executor_params : Default::default(), + } + }; + + let v4 = V4ActiveConfig::::get() + .defensive_proof("Could not decode old config") + .unwrap_or_default(); + let v5 = translate(v4); + V5ActiveConfig::::set(Some(v5)); + + let pending_v4 = V4PendingConfigs::::get() + .defensive_proof("Could not decode old pending") + .unwrap_or_default(); + let mut pending_v5 = Vec::new(); + + for (session, v4) in pending_v4.into_iter() { + let v5 = translate(v4); + pending_v5.push((session, v5)); + } + V5PendingConfigs::::set(Some(pending_v5.clone())); + + let num_configs = (pending_v5.len() + 1) as u64; + T::DbWeight::get().reads_writes(num_configs, num_configs) +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::mock::{new_test_ext, Test}; + use primitives::ExecutorParams; + + #[test] + fn v4_deserialized_from_actual_data() { + // Example how to get new `raw_config`: + // We'll obtain the raw_config at a specified a block + // Steps: + // 1. Go to Polkadot.js -> Developer -> Chain state -> Storage: https://polkadot.js.org/apps/#/chainstate + // 2. Set these parameters: + // 2.1. selected state query: configuration; activeConfig(): PolkadotRuntimeParachainsConfigurationHostConfiguration + // 2.2. blockhash to query at: 0xf89d3ab5312c5f70d396dc59612f0aa65806c798346f9db4b35278baed2e0e53 (the hash of the block) + // 2.3. Note the value of encoded storage key -> 0x06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385 for the referenced block. + // 2.4. You'll also need the decoded values to update the test. + // 3. Go to Polkadot.js -> Developer -> Chain state -> Raw storage + // 3.1 Enter the encoded storage key and you get the raw config. + + // This exceeds the maximal line width length, but that's fine, since this is not code and + // doesn't need to be read and also leaving it as one line allows to easily copy it. + let raw_config = hex_literal::hex!["0000a000005000000a00000000c8000000c800000a0000000a000000100e0000580200000000500000c800000700e8764817020040011e00000000000000005039278c0400000000000000000000005039278c0400000000000000000000e8030000009001001e00000000000000009001008070000000000000000000000a0000000a0000000a00000001000000010500000001c80000000600000058020000580200000200000059000000000000001e000000280000000700c817a80402004001010200000014000000"]; + + let v4 = v5::V4HostConfiguration::::decode(&mut &raw_config[..]) + .unwrap(); + + // We check only a sample of the values here. If we missed any fields or messed up data types + // that would skew all the fields coming after. + assert_eq!(v4.max_code_size, 10_485_760); + assert_eq!(v4.validation_upgrade_cooldown, 3600); + assert_eq!(v4.max_pov_size, 5_242_880); + assert_eq!(v4.hrmp_channel_max_message_size, 102_400); + assert_eq!(v4.n_delay_tranches, 89); + assert_eq!(v4.ump_max_individual_weight, Weight::from_parts(20_000_000_000, 5_242_880)); + assert_eq!(v4.minimum_validation_upgrade_delay, 20); + } + + #[test] + fn test_migrate_to_v5() { + // Host configuration has lots of fields. However, in this migration we only remove one field. + // The most important part to check are a couple of the last fields. We also pick + // extra fields to check arbitrarily, e.g. depending on their position (i.e. the middle) and + // also their type. + // + // We specify only the picked fields and the rest should be provided by the `Default` + // implementation. That implementation is copied over between the two types and should work + // fine. + let v4 = v5::V4HostConfiguration:: { + ump_max_individual_weight: Weight::from_parts(0x71616e6f6e0au64, 0x71616e6f6e0au64), + needed_approvals: 69, + thread_availability_period: 55, + hrmp_recipient_deposit: 1337, + max_pov_size: 1111, + chain_availability_period: 33, + minimum_validation_upgrade_delay: 20, + ..Default::default() + }; + + let mut pending_configs = Vec::new(); + pending_configs.push((100, v4.clone())); + pending_configs.push((300, v4.clone())); + + new_test_ext(Default::default()).execute_with(|| { + // Implant the v4 version in the state. + V4ActiveConfig::::set(Some(v4)); + V4PendingConfigs::::set(Some(pending_configs)); + + migrate_to_v5::(); + + let v5 = V5ActiveConfig::::get().unwrap(); + let mut configs_to_check = V5PendingConfigs::::get().unwrap(); + configs_to_check.push((0, v5.clone())); + + for (_, v4) in configs_to_check { + #[rustfmt::skip] + { + assert_eq!(v4.max_code_size , v5.max_code_size); + assert_eq!(v4.max_head_data_size , v5.max_head_data_size); + assert_eq!(v4.max_upward_queue_count , v5.max_upward_queue_count); + assert_eq!(v4.max_upward_queue_size , v5.max_upward_queue_size); + assert_eq!(v4.max_upward_message_size , v5.max_upward_message_size); + assert_eq!(v4.max_upward_message_num_per_candidate , v5.max_upward_message_num_per_candidate); + assert_eq!(v4.hrmp_max_message_num_per_candidate , v5.hrmp_max_message_num_per_candidate); + assert_eq!(v4.validation_upgrade_cooldown , v5.validation_upgrade_cooldown); + assert_eq!(v4.validation_upgrade_delay , v5.validation_upgrade_delay); + assert_eq!(v4.max_pov_size , v5.max_pov_size); + assert_eq!(v4.max_downward_message_size , v5.max_downward_message_size); + assert_eq!(v4.ump_service_total_weight , v5.ump_service_total_weight); + assert_eq!(v4.hrmp_max_parachain_outbound_channels , v5.hrmp_max_parachain_outbound_channels); + assert_eq!(v4.hrmp_max_parathread_outbound_channels , v5.hrmp_max_parathread_outbound_channels); + assert_eq!(v4.hrmp_sender_deposit , v5.hrmp_sender_deposit); + assert_eq!(v4.hrmp_recipient_deposit , v5.hrmp_recipient_deposit); + assert_eq!(v4.hrmp_channel_max_capacity , v5.hrmp_channel_max_capacity); + assert_eq!(v4.hrmp_channel_max_total_size , v5.hrmp_channel_max_total_size); + assert_eq!(v4.hrmp_max_parachain_inbound_channels , v5.hrmp_max_parachain_inbound_channels); + assert_eq!(v4.hrmp_max_parathread_inbound_channels , v5.hrmp_max_parathread_inbound_channels); + assert_eq!(v4.hrmp_channel_max_message_size , v5.hrmp_channel_max_message_size); + assert_eq!(v4.code_retention_period , v5.code_retention_period); + assert_eq!(v4.parathread_cores , v5.parathread_cores); + assert_eq!(v4.parathread_retries , v5.parathread_retries); + assert_eq!(v4.group_rotation_frequency , v5.group_rotation_frequency); + assert_eq!(v4.chain_availability_period , v5.chain_availability_period); + assert_eq!(v4.thread_availability_period , v5.thread_availability_period); + assert_eq!(v4.scheduling_lookahead , v5.scheduling_lookahead); + assert_eq!(v4.max_validators_per_core , v5.max_validators_per_core); + assert_eq!(v4.max_validators , v5.max_validators); + assert_eq!(v4.dispute_period , v5.dispute_period); + assert_eq!(v4.no_show_slots , v5.no_show_slots); + assert_eq!(v4.n_delay_tranches , v5.n_delay_tranches); + assert_eq!(v4.zeroth_delay_tranche_width , v5.zeroth_delay_tranche_width); + assert_eq!(v4.needed_approvals , v5.needed_approvals); + assert_eq!(v4.relay_vrf_modulo_samples , v5.relay_vrf_modulo_samples); + assert_eq!(v4.ump_max_individual_weight , v5.ump_max_individual_weight); + assert_eq!(v4.pvf_checking_enabled , v5.pvf_checking_enabled); + assert_eq!(v4.pvf_voting_ttl , v5.pvf_voting_ttl); + assert_eq!(v4.minimum_validation_upgrade_delay , v5.minimum_validation_upgrade_delay); + }; // ; makes this a statement. `rustfmt::skip` cannot be put on an expression. + + // additional checks for async backing. + assert_eq!(v5.async_backing_params.allowed_ancestry_len, 0); + assert_eq!(v5.async_backing_params.max_candidate_depth, 0); + assert_eq!(v5.executor_params, ExecutorParams::new()); + } + }); + } +} diff --git a/runtime/parachains/src/configuration/migration/v6.rs b/runtime/parachains/src/configuration/migration/v6.rs new file mode 100644 index 000000000000..44acaee71f49 --- /dev/null +++ b/runtime/parachains/src/configuration/migration/v6.rs @@ -0,0 +1,292 @@ +// Copyright (C) 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 . + +//! A module that is responsible for migration of storage. + +use crate::configuration::{self, Config, Pallet}; +use frame_support::{ + pallet_prelude::*, + traits::{Defensive, StorageVersion}, + weights::Weight, +}; +use frame_system::pallet_prelude::BlockNumberFor; +use sp_std::vec::Vec; + +use frame_support::traits::OnRuntimeUpgrade; +use primitives::SessionIndex; +#[cfg(feature = "try-runtime")] +use sp_std::prelude::*; + +use super::v5::V5HostConfiguration; +// Change this once there is V7. +type V6HostConfiguration = configuration::HostConfiguration; + +#[frame_support::storage_alias] +pub(crate) type V5ActiveConfig = + StorageValue, V5HostConfiguration>, OptionQuery>; + +#[frame_support::storage_alias] +pub(crate) type V5PendingConfigs = StorageValue< + Pallet, + Vec<(SessionIndex, V5HostConfiguration>)>, + OptionQuery, +>; + +#[frame_support::storage_alias] +pub(crate) type V6ActiveConfig = + StorageValue, V6HostConfiguration>, OptionQuery>; + +#[frame_support::storage_alias] +pub(crate) type V6PendingConfigs = StorageValue< + Pallet, + Vec<(SessionIndex, V6HostConfiguration>)>, + OptionQuery, +>; + +pub struct MigrateToV6(sp_std::marker::PhantomData); +impl OnRuntimeUpgrade for MigrateToV6 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, &'static str> { + log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade()"); + + ensure!(StorageVersion::get::>() == 5, "The migration requires version 4"); + Ok(Vec::new()) + } + + fn on_runtime_upgrade() -> Weight { + if StorageVersion::get::>() == 5 { + let weight_consumed = migrate_to_v6::(); + + log::info!(target: configuration::LOG_TARGET, "MigrateToV6 executed successfully"); + StorageVersion::new(6).put::>(); + + weight_consumed + } else { + log::warn!(target: configuration::LOG_TARGET, "MigrateToV6 should be removed."); + T::DbWeight::get().reads(1) + } + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { + log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade()"); + ensure!( + StorageVersion::get::>() == 6, + "Storage version should be 6 after the migration" + ); + + Ok(()) + } +} + +fn migrate_to_v6() -> Weight { + // Unusual formatting is justified: + // - make it easier to verify that fields assign what they supposed to assign. + // - this code is transient and will be removed after all migrations are done. + // - this code is important enough to optimize for legibility sacrificing consistency. + #[rustfmt::skip] + let translate = + |pre: V5HostConfiguration>| -> + V6HostConfiguration> + { + V6HostConfiguration { +max_code_size : pre.max_code_size, +max_head_data_size : pre.max_head_data_size, +max_upward_queue_count : pre.max_upward_queue_count, +max_upward_queue_size : pre.max_upward_queue_size, +max_upward_message_size : pre.max_upward_message_size, +max_upward_message_num_per_candidate : pre.max_upward_message_num_per_candidate, +hrmp_max_message_num_per_candidate : pre.hrmp_max_message_num_per_candidate, +validation_upgrade_cooldown : pre.validation_upgrade_cooldown, +validation_upgrade_delay : pre.validation_upgrade_delay, +max_pov_size : pre.max_pov_size, +max_downward_message_size : pre.max_downward_message_size, +hrmp_max_parachain_outbound_channels : pre.hrmp_max_parachain_outbound_channels, +hrmp_max_parathread_outbound_channels : pre.hrmp_max_parathread_outbound_channels, +hrmp_sender_deposit : pre.hrmp_sender_deposit, +hrmp_recipient_deposit : pre.hrmp_recipient_deposit, +hrmp_channel_max_capacity : pre.hrmp_channel_max_capacity, +hrmp_channel_max_total_size : pre.hrmp_channel_max_total_size, +hrmp_max_parachain_inbound_channels : pre.hrmp_max_parachain_inbound_channels, +hrmp_max_parathread_inbound_channels : pre.hrmp_max_parathread_inbound_channels, +hrmp_channel_max_message_size : pre.hrmp_channel_max_message_size, +code_retention_period : pre.code_retention_period, +parathread_cores : pre.parathread_cores, +parathread_retries : pre.parathread_retries, +group_rotation_frequency : pre.group_rotation_frequency, +chain_availability_period : pre.chain_availability_period, +thread_availability_period : pre.thread_availability_period, +scheduling_lookahead : pre.scheduling_lookahead, +max_validators_per_core : pre.max_validators_per_core, +max_validators : pre.max_validators, +dispute_period : pre.dispute_period, +dispute_post_conclusion_acceptance_period: pre.dispute_post_conclusion_acceptance_period, +no_show_slots : pre.no_show_slots, +n_delay_tranches : pre.n_delay_tranches, +zeroth_delay_tranche_width : pre.zeroth_delay_tranche_width, +needed_approvals : pre.needed_approvals, +relay_vrf_modulo_samples : pre.relay_vrf_modulo_samples, +pvf_checking_enabled : pre.pvf_checking_enabled, +pvf_voting_ttl : pre.pvf_voting_ttl, +minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay, +async_backing_params : pre.async_backing_params, +executor_params : pre.executor_params, + } + }; + + let v5 = V5ActiveConfig::::get() + .defensive_proof("Could not decode old config") + .unwrap_or_default(); + let v6 = translate(v5); + V6ActiveConfig::::set(Some(v6)); + + let pending_v4 = V5PendingConfigs::::get() + .defensive_proof("Could not decode old pending") + .unwrap_or_default(); + let mut pending_v5 = Vec::new(); + + for (session, v5) in pending_v4.into_iter() { + let v6 = translate(v5); + pending_v5.push((session, v6)); + } + V6PendingConfigs::::set(Some(pending_v5.clone())); + + let num_configs = (pending_v5.len() + 1) as u64; + T::DbWeight::get().reads_writes(num_configs, num_configs) +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::mock::{new_test_ext, Test}; + + #[test] + fn v5_deserialized_from_actual_data() { + // Example how to get new `raw_config`: + // We'll obtain the raw_config at a specified a block + // Steps: + // 1. Go to Polkadot.js -> Developer -> Chain state -> Storage: https://polkadot.js.org/apps/#/chainstate + // 2. Set these parameters: + // 2.1. selected state query: configuration; activeConfig(): PolkadotRuntimeParachainsConfigurationHostConfiguration + // 2.2. blockhash to query at: 0xf89d3ab5312c5f70d396dc59612f0aa65806c798346f9db4b35278baed2e0e53 (the hash of the block) + // 2.3. Note the value of encoded storage key -> 0x06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385 for the referenced block. + // 2.4. You'll also need the decoded values to update the test. + // 3. Go to Polkadot.js -> Developer -> Chain state -> Raw storage + // 3.1 Enter the encoded storage key and you get the raw config. + + // This exceeds the maximal line width length, but that's fine, since this is not code and + // doesn't need to be read and also leaving it as one line allows to easily copy it. + let raw_config = hex_literal::hex!["00005000005000000a00000000c8000000c800000a0000000a000000c80000006400000000000000000000000000500000c800000700e8764817020040010a0000000000000000c0220fca950300000000000000000000c0220fca9503000000000000000000e8030000009001000a0000000000000000900100008070000000000000000000000a000000050000000500000001000000010500000001c8000000060000005802000002000000280000000000000002000000010000000700c817a8040200400101020000000f000000"]; + + let v5 = + V5HostConfiguration::::decode(&mut &raw_config[..]).unwrap(); + + // We check only a sample of the values here. If we missed any fields or messed up data types + // that would skew all the fields coming after. + assert_eq!(v5.max_code_size, 5242880); + assert_eq!(v5.validation_upgrade_cooldown, 200); + assert_eq!(v5.max_pov_size, 5_242_880); + assert_eq!(v5.hrmp_channel_max_message_size, 102_400); + assert_eq!(v5.n_delay_tranches, 40); + assert_eq!(v5.ump_max_individual_weight, Weight::from_parts(20_000_000_000, 5_242_880)); + assert_eq!(v5.minimum_validation_upgrade_delay, 15); // This is the last field in the struct. + } + + #[test] + fn test_migrate_to_v6() { + // Host configuration has lots of fields. However, in this migration we only remove one field. + // The most important part to check are a couple of the last fields. We also pick + // extra fields to check arbitrarily, e.g. depending on their position (i.e. the middle) and + // also their type. + // + // We specify only the picked fields and the rest should be provided by the `Default` + // implementation. That implementation is copied over between the two types and should work + // fine. + let v5 = V5HostConfiguration:: { + ump_max_individual_weight: Weight::from_parts(0x71616e6f6e0au64, 0x71616e6f6e0au64), + needed_approvals: 69, + thread_availability_period: 55, + hrmp_recipient_deposit: 1337, + max_pov_size: 1111, + chain_availability_period: 33, + minimum_validation_upgrade_delay: 20, + ..Default::default() + }; + + let mut pending_configs = Vec::new(); + pending_configs.push((100, v5.clone())); + pending_configs.push((300, v5.clone())); + + new_test_ext(Default::default()).execute_with(|| { + // Implant the v5 version in the state. + V5ActiveConfig::::set(Some(v5)); + V5PendingConfigs::::set(Some(pending_configs)); + + migrate_to_v6::(); + + let v6 = V6ActiveConfig::::get().unwrap(); + let mut configs_to_check = V6PendingConfigs::::get().unwrap(); + configs_to_check.push((0, v6.clone())); + + for (_, v5) in configs_to_check { + #[rustfmt::skip] + { + assert_eq!(v5.max_code_size , v6.max_code_size); + assert_eq!(v5.max_head_data_size , v6.max_head_data_size); + assert_eq!(v5.max_upward_queue_count , v6.max_upward_queue_count); + assert_eq!(v5.max_upward_queue_size , v6.max_upward_queue_size); + assert_eq!(v5.max_upward_message_size , v6.max_upward_message_size); + assert_eq!(v5.max_upward_message_num_per_candidate , v6.max_upward_message_num_per_candidate); + assert_eq!(v5.hrmp_max_message_num_per_candidate , v6.hrmp_max_message_num_per_candidate); + assert_eq!(v5.validation_upgrade_cooldown , v6.validation_upgrade_cooldown); + assert_eq!(v5.validation_upgrade_delay , v6.validation_upgrade_delay); + assert_eq!(v5.max_pov_size , v6.max_pov_size); + assert_eq!(v5.max_downward_message_size , v6.max_downward_message_size); + assert_eq!(v5.hrmp_max_parachain_outbound_channels , v6.hrmp_max_parachain_outbound_channels); + assert_eq!(v5.hrmp_max_parathread_outbound_channels , v6.hrmp_max_parathread_outbound_channels); + assert_eq!(v5.hrmp_sender_deposit , v6.hrmp_sender_deposit); + assert_eq!(v5.hrmp_recipient_deposit , v6.hrmp_recipient_deposit); + assert_eq!(v5.hrmp_channel_max_capacity , v6.hrmp_channel_max_capacity); + assert_eq!(v5.hrmp_channel_max_total_size , v6.hrmp_channel_max_total_size); + assert_eq!(v5.hrmp_max_parachain_inbound_channels , v6.hrmp_max_parachain_inbound_channels); + assert_eq!(v5.hrmp_max_parathread_inbound_channels , v6.hrmp_max_parathread_inbound_channels); + assert_eq!(v5.hrmp_channel_max_message_size , v6.hrmp_channel_max_message_size); + assert_eq!(v5.code_retention_period , v6.code_retention_period); + assert_eq!(v5.parathread_cores , v6.parathread_cores); + assert_eq!(v5.parathread_retries , v6.parathread_retries); + assert_eq!(v5.group_rotation_frequency , v6.group_rotation_frequency); + assert_eq!(v5.chain_availability_period , v6.chain_availability_period); + assert_eq!(v5.thread_availability_period , v6.thread_availability_period); + assert_eq!(v5.scheduling_lookahead , v6.scheduling_lookahead); + assert_eq!(v5.max_validators_per_core , v6.max_validators_per_core); + assert_eq!(v5.max_validators , v6.max_validators); + assert_eq!(v5.dispute_period , v6.dispute_period); + assert_eq!(v5.no_show_slots , v6.no_show_slots); + assert_eq!(v5.n_delay_tranches , v6.n_delay_tranches); + assert_eq!(v5.zeroth_delay_tranche_width , v6.zeroth_delay_tranche_width); + assert_eq!(v5.needed_approvals , v6.needed_approvals); + assert_eq!(v5.relay_vrf_modulo_samples , v6.relay_vrf_modulo_samples); + assert_eq!(v5.pvf_checking_enabled , v6.pvf_checking_enabled); + assert_eq!(v5.pvf_voting_ttl , v6.pvf_voting_ttl); + assert_eq!(v5.minimum_validation_upgrade_delay , v6.minimum_validation_upgrade_delay); + assert_eq!(v5.async_backing_params.allowed_ancestry_len, v6.async_backing_params.allowed_ancestry_len); + assert_eq!(v5.async_backing_params.max_candidate_depth , v6.async_backing_params.max_candidate_depth); + assert_eq!(v5.executor_params , v6.executor_params); + }; // ; makes this a statement. `rustfmt::skip` cannot be put on an expression. + } + }); + } +} From 181da5844bf893f55d3677eead32ac1956987eb9 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 12 May 2023 21:40:51 +0200 Subject: [PATCH 173/182] Dont delete old migrations Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 19 +++++++++++++++++-- runtime/polkadot/src/lib.rs | 19 +++++++++++++++++-- runtime/rococo/src/lib.rs | 12 ++++++++++-- runtime/westend/src/lib.rs | 19 +++++++++++++++++-- 4 files changed, 61 insertions(+), 8 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 0388318bc654..f98686f18795 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1501,17 +1501,32 @@ impl Get for NominationPoolsMigrationV4OldPallet { /// /// This contains the combined migrations of the last 10 releases. It allows to skip runtime /// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased); +pub type Migrations = + (migrations::V0940, migrations::V0941, migrations::V0942, migrations::Unreleased); /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { use super::*; + pub type V0940 = ( + pallet_nomination_pools::migration::v4::MigrateToV4< + Runtime, + NominationPoolsMigrationV4OldPallet, + >, + pallet_nomination_pools::migration::v5::MigrateToV5, + ); + pub type V0941 = (); // Node only release - no migrations. + pub type V0942 = ( + parachains_configuration::migration::v5::MigrateToV5, + pallet_offences::migration::v1::MigrateToV1, + runtime_common::session::migration::ClearOldSessionStorage, + ); + /// Unreleased migrations. Add new ones here: pub type Unreleased = ( // Remove UMP dispatch queue - parachains_configuration::migration::MigrateV5ToV6, + parachains_configuration::migration::v6::MigrateToV6, ump_migrations::UpdateUmpLimits, ); } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 17bd7bb3e121..3c9e82a3c7af 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1478,17 +1478,32 @@ impl Get for NominationPoolsMigrationV4OldPallet { /// /// This contains the combined migrations of the last 10 releases. It allows to skip runtime /// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased); +pub type Migrations = + (migrations::V0940, migrations::V0941, migrations::V0942, migrations::Unreleased); /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { use super::*; + pub type V0940 = ( + pallet_nomination_pools::migration::v4::MigrateToV4< + Runtime, + NominationPoolsMigrationV4OldPallet, + >, + pallet_nomination_pools::migration::v5::MigrateToV5, + ); + pub type V0941 = (); // Node only release - no migrations. + pub type V0942 = ( + parachains_configuration::migration::v5::MigrateToV5, + pallet_offences::migration::v1::MigrateToV1, + runtime_common::session::migration::ClearOldSessionStorage, + ); + /// Unreleased migrations. Add new ones here: pub type Unreleased = ( // Remove UMP dispatch queue - parachains_configuration::migration::MigrateV5ToV6, + parachains_configuration::migration::v6::MigrateToV6, ump_migrations::UpdateUmpLimits, ); } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 8c1a69f6a4c6..63a6716e0a2e 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1517,17 +1517,25 @@ pub type UncheckedExtrinsic = /// /// This contains the combined migrations of the last 10 releases. It allows to skip runtime /// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased); +pub type Migrations = + (migrations::V0940, migrations::V0941, migrations::V0942, migrations::Unreleased); /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { use super::*; + pub type V0940 = (); + pub type V0941 = (); // Node only release - no migrations. + pub type V0942 = ( + parachains_configuration::migration::v5::MigrateToV5, + pallet_offences::migration::v1::MigrateToV1, + ); + /// Unreleased migrations. Add new ones here: pub type Unreleased = ( // Remove UMP dispatch queue - parachains_configuration::migration::MigrateV5ToV6, + parachains_configuration::migration::v6::MigrateToV6, ump_migrations::UpdateUmpLimits, ); } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 900de220f2f2..b915e041c519 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1258,17 +1258,32 @@ impl Get for NominationPoolsMigrationV4OldPallet { /// /// This contains the combined migrations of the last 10 releases. It allows to skip runtime /// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = (migrations::Unreleased); +pub type Migrations = + (migrations::V0940, migrations::V0941, migrations::V0942, migrations::Unreleased); /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { use super::*; + pub type V0940 = ( + clean_state_migration::CleanMigrate, + pallet_nomination_pools::migration::v4::MigrateToV4< + Runtime, + NominationPoolsMigrationV4OldPallet, + >, + pallet_nomination_pools::migration::v5::MigrateToV5, + ); + pub type V0941 = (); // Node only release - no migrations. + pub type V0942 = ( + parachains_configuration::migration::v5::MigrateToV5, + pallet_offences::migration::v1::MigrateToV1, + ); + /// Unreleased migrations. Add new ones here: pub type Unreleased = ( // Remove UMP dispatch queue - parachains_configuration::migration::MigrateV5ToV6, + parachains_configuration::migration::v6::MigrateToV6, ump_migrations::UpdateUmpLimits, ); } From 9ad4c3564c9003a84ccb9cfe1a7b7b5caeb650b2 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Sat, 13 May 2023 14:15:59 +0200 Subject: [PATCH 174/182] Future proof AggregateMessageOrigin and review fixes There are indications that Loopback and Bridged will be needed soon. Signed-off-by: Oliver Tale-Yazdi --- runtime/common/src/assigned_slots.rs | 2 +- runtime/common/src/integration_tests.rs | 2 +- runtime/common/src/paras_registrar.rs | 2 +- runtime/kusama/src/lib.rs | 2 +- runtime/parachains/src/inclusion/mod.rs | 81 ++++++++++++++--------- runtime/parachains/src/inclusion/tests.rs | 5 +- runtime/parachains/src/mock.rs | 10 +-- runtime/parachains/src/paras/mod.rs | 9 ++- runtime/parachains/src/ump_tests.rs | 29 ++++---- runtime/polkadot/src/lib.rs | 2 +- runtime/rococo/src/lib.rs | 2 +- runtime/test-runtime/src/lib.rs | 2 +- runtime/westend/src/lib.rs | 2 +- 13 files changed, 87 insertions(+), 63 deletions(-) diff --git a/runtime/common/src/assigned_slots.rs b/runtime/common/src/assigned_slots.rs index 2c248a6acc28..b2c43b0d5b3f 100644 --- a/runtime/common/src/assigned_slots.rs +++ b/runtime/common/src/assigned_slots.rs @@ -649,7 +649,7 @@ mod tests { type RuntimeEvent = RuntimeEvent; type WeightInfo = parachains_paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; - type UmpQueueTracker = (); + type QueueFootprinter = (); type NextSessionRotation = crate::mock::TestNextSessionRotation; } diff --git a/runtime/common/src/integration_tests.rs b/runtime/common/src/integration_tests.rs index 4a2108f6a155..30e4758d24c1 100644 --- a/runtime/common/src/integration_tests.rs +++ b/runtime/common/src/integration_tests.rs @@ -205,7 +205,7 @@ impl paras::Config for Test { type RuntimeEvent = RuntimeEvent; type WeightInfo = paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; - type UmpQueueTracker = (); + type QueueFootprinter = (); type NextSessionRotation = crate::mock::TestNextSessionRotation; } diff --git a/runtime/common/src/paras_registrar.rs b/runtime/common/src/paras_registrar.rs index a4d2c9afef02..0dbc47ee2ae8 100644 --- a/runtime/common/src/paras_registrar.rs +++ b/runtime/common/src/paras_registrar.rs @@ -773,7 +773,7 @@ mod tests { type RuntimeEvent = RuntimeEvent; type WeightInfo = paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; - type UmpQueueTracker = (); + type QueueFootprinter = (); type NextSessionRotation = crate::mock::TestNextSessionRotation; } diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index f98686f18795..cdb8c0ad851d 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1101,7 +1101,7 @@ impl parachains_paras::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::runtime_parachains_paras::WeightInfo; type UnsignedPriority = ParasUnsignedPriority; - type UmpQueueTracker = ParaInclusion; + type QueueFootprinter = ParaInclusion; type NextSessionRotation = Babe; } diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 3c50fe76db6d..bf38ab3706d2 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -217,13 +217,17 @@ pub fn minimum_backing_votes(n_validators: usize) -> usize { sp_std::cmp::min(n_validators, 2) } -/// Provides introspection into the UMP dispatch queue of a parachain. -pub trait UmpQueueTracker { - fn message_count(para: ParaId) -> u64; +/// Reads the footprint of queues for a specific origin type. +pub trait QueueFootprinter { + type Origin; + + fn message_count(origin: Self::Origin) -> u64; } -impl UmpQueueTracker for () { - fn message_count(_: ParaId) -> u64 { +impl QueueFootprinter for () { + type Origin = UmpQueueId; + + fn message_count(_: Self::Origin) -> u64 { 0 } } @@ -234,9 +238,20 @@ impl UmpQueueTracker for () { /// to existing values will require a migration. #[derive(Encode, Decode, Clone, MaxEncodedLen, Eq, PartialEq, RuntimeDebug, TypeInfo)] pub enum AggregateMessageOrigin { - /// Incoming upwards message from a parachain. + /// Inbound upward message. + #[codec(index = 0)] + Ump(UmpQueueId), +} + +/// Identifies a UMP queue inside the `MessageQueue` pallet. +/// +/// It is written in verbose form since future variants like `Loopback` and `Bridged` are already +/// forseeable. +#[derive(Encode, Decode, Clone, MaxEncodedLen, Eq, PartialEq, RuntimeDebug, TypeInfo)] +pub enum UmpQueueId { + /// The message originated from this parachain. #[codec(index = 0)] - Ump(ParaId), + Para(ParaId), } #[cfg(feature = "runtime-benchmarks")] @@ -268,7 +283,6 @@ pub mod pallet { + hrmp::Config + configuration::Config { - type WeightInfo: WeightInfo; type RuntimeEvent: From> + IsType<::RuntimeEvent>; type DisputesHandler: disputes::DisputesHandler; type RewardValidators: RewardValidators; @@ -279,6 +293,9 @@ pub mod pallet { /// replaces the old `UMP` dispatch queue. Other use-cases can be implemented as well by /// adding new variants to `AggregateMessageOrigin`. type MessageQueue: EnqueueMessage; + + /// Weight info for the calls of this pallet. + type WeightInfo: WeightInfo; } #[pallet::event] @@ -475,7 +492,7 @@ impl Pallet { } pub(crate) fn cleanup_outgoing_dmp_dispatch_queue(para: ParaId) { - T::MessageQueue::sweep_queue(AggregateMessageOrigin::Ump(para)); + T::MessageQueue::sweep_queue(AggregateMessageOrigin::Ump(UmpQueueId::Para(para))); } /// Extract the freed cores based on cores that became available. @@ -911,31 +928,31 @@ impl Pallet { // initial weight is config read. let mut weight = T::DbWeight::get().reads_writes(1, 0); if let Some(new_code) = commitments.new_validation_code { - weight += >::schedule_code_upgrade( + weight.saturating_add(>::schedule_code_upgrade( receipt.descriptor.para_id, new_code, relay_parent_number, &config, - ); + )); } // enact the messaging facet of the candidate. - weight += >::prune_dmq( + weight.saturating_accrue(>::prune_dmq( receipt.descriptor.para_id, commitments.processed_downward_messages, - ); - weight += Self::receive_upward_messages( + )); + weight.saturating_accrue(Self::receive_upward_messages( receipt.descriptor.para_id, commitments.upward_messages.as_slice(), - ); - weight += >::prune_hrmp( + )); + weight.saturating_accrue(>::prune_hrmp( receipt.descriptor.para_id, T::BlockNumber::from(commitments.hrmp_watermark), - ); - weight += >::queue_outbound_hrmp( + )); + weight.saturating_accrue(>::queue_outbound_hrmp( receipt.descriptor.para_id, commitments.horizontal_messages, - ); + )); Self::deposit_event(Event::::CandidateIncluded( plain, @@ -944,16 +961,15 @@ impl Pallet { backing_group, )); - weight + + weight.saturating_add( >::note_new_head( receipt.descriptor.para_id, commitments.head_data, relay_parent_number, - ) + )) } - /// Check that all the upward messages sent by a candidate pass the acceptance criteria. Returns - /// false, if any of the messages doesn't pass. + /// Check that all the upward messages sent by a candidate pass the acceptance criteria. pub(crate) fn check_upward_messages( config: &HostConfiguration, para: ParaId, @@ -972,7 +988,7 @@ impl Pallet { }) } - let fp = T::MessageQueue::footprint(AggregateMessageOrigin::Ump(para)); + let fp = T::MessageQueue::footprint(AggregateMessageOrigin::Ump(UmpQueueId::Para(para))); let (para_queue_count, mut para_queue_size) = (fp.count, fp.size); if para_queue_count.saturating_add(additional_msgs as u64) > @@ -1020,7 +1036,7 @@ impl Pallet { .filter_map(|d| { BoundedSlice::try_from(&d[..]) .map_err(|e| { - defensive!("Too long inbound upward message in accepted candidate. Ignoring. L=", d.len()); + defensive!("Accepted candidate contains too long msg, len=", d.len()); e }) .ok() @@ -1039,7 +1055,10 @@ impl Pallet { return Weight::zero() } - T::MessageQueue::enqueue_messages(messages.into_iter(), AggregateMessageOrigin::Ump(para)); + T::MessageQueue::enqueue_messages( + messages.into_iter(), + AggregateMessageOrigin::Ump(UmpQueueId::Para(para)), + ); let weight = ::WeightInfo::receive_upward_messages(count); Self::deposit_event(Event::UpwardMessagesReceived { from: para, count }); weight @@ -1177,7 +1196,7 @@ impl OnQueueChanged for Pallet { // Write back the remaining queue capacity into `relay_dispatch_queue_remaining_capacity`. fn on_queue_changed(origin: AggregateMessageOrigin, count: u64, size: u64) { let para = match origin { - AggregateMessageOrigin::Ump(p) => p, + AggregateMessageOrigin::Ump(UmpQueueId::Para(p)) => p, }; // TODO maybe migrate this to u64 let (count, size) = (count.saturated_into(), size.saturated_into()); @@ -1330,8 +1349,10 @@ impl CandidateCheckContext { } } -impl UmpQueueTracker for Pallet { - fn message_count(para: ParaId) -> u64 { - T::MessageQueue::footprint(AggregateMessageOrigin::Ump(para)).count +impl QueueFootprinter for Pallet { + type Origin = UmpQueueId; + + fn message_count(origin: Self::Origin) -> u64 { + T::MessageQueue::footprint(AggregateMessageOrigin::Ump(origin)).count } } diff --git a/runtime/parachains/src/inclusion/tests.rs b/runtime/parachains/src/inclusion/tests.rs index 431756339bf4..28b7090ce9c9 100644 --- a/runtime/parachains/src/inclusion/tests.rs +++ b/runtime/parachains/src/inclusion/tests.rs @@ -28,7 +28,6 @@ use crate::{ }; use assert_matches::assert_matches; use frame_support::assert_noop; -use hex_literal::hex; use keyring::Sr25519Keyring; use parity_scale_codec::DecodeAll; use primitives::{ @@ -1989,8 +1988,8 @@ fn session_change_wipes() { /// Assert that the encoding of a known `AggregateMessageOrigin` did not change. #[test] fn aggregate_origin_decode_regression_check() { - let ump = AggregateMessageOrigin::Ump(u32::MAX.into()); - let raw = hex!("00ffffffff"); + let ump = AggregateMessageOrigin::Ump(UmpQueueId::Para(u32::MAX.into())); + let raw = (0u8, 0u8, u32::MAX).encode(); let decoded = AggregateMessageOrigin::decode_all(&mut &raw[..]); assert_eq!(decoded, Ok(ump), "Migration needed for AggregateMessageOrigin"); } diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index dd6e468f4802..881fc913c69b 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -18,7 +18,7 @@ use crate::{ configuration, disputes, dmp, hrmp, - inclusion::{self, AggregateMessageOrigin}, + inclusion::{self, AggregateMessageOrigin, UmpQueueId}, initializer, origin, paras, paras::ParaKind, paras_inherent, scheduler, session_info, shared, ParaId, @@ -211,7 +211,7 @@ impl crate::paras::Config for Test { type RuntimeEvent = RuntimeEvent; type WeightInfo = crate::paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; - type UmpQueueTracker = ParaInclusion; + type QueueFootprinter = ParaInclusion; type NextSessionRotation = TestNextSessionRotation; } @@ -433,8 +433,8 @@ impl ProcessMessage for TestProcessMessage { origin: AggregateMessageOrigin, meter: &mut WeightMeter, ) -> Result { - let origin = match origin { - AggregateMessageOrigin::Ump(o) => o, + let para = match origin { + AggregateMessageOrigin::Ump(UmpQueueId::Para(p)) => p, }; let required = match u32::decode(&mut &message[..]) { @@ -446,7 +446,7 @@ impl ProcessMessage for TestProcessMessage { } let mut processed = Processed::get(); - processed.push((origin, message.to_vec())); + processed.push((para, message.to_vec())); Processed::set(processed); Ok(true) } diff --git a/runtime/parachains/src/paras/mod.rs b/runtime/parachains/src/paras/mod.rs index d85f92ff6e14..bf2a3790385b 100644 --- a/runtime/parachains/src/paras/mod.rs +++ b/runtime/parachains/src/paras/mod.rs @@ -108,7 +108,10 @@ //! use crate::{ - configuration, inclusion::UmpQueueTracker, initializer::SessionChangeNotification, shared, + configuration, + inclusion::{QueueFootprinter, UmpQueueId}, + initializer::SessionChangeNotification, + shared, }; use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec}; use frame_support::{pallet_prelude::*, traits::EstimateNextSessionRotation}; @@ -557,7 +560,7 @@ pub mod pallet { /// /// This is used to judge whether or not a para-chain can offboard. Per default this should /// be set to the `ParaInclusion` pallet. - type UmpQueueTracker: UmpQueueTracker; + type QueueFootprinter: QueueFootprinter; /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; @@ -1702,7 +1705,7 @@ impl Pallet { } }); - if ::UmpQueueTracker::message_count(id) != 0 { + if ::QueueFootprinter::message_count(UmpQueueId::Para(id)) != 0 { return Err(Error::::CannotOffboard.into()) } diff --git a/runtime/parachains/src/ump_tests.rs b/runtime/parachains/src/ump_tests.rs index 2216a8806ba3..77c822c7e640 100644 --- a/runtime/parachains/src/ump_tests.rs +++ b/runtime/parachains/src/ump_tests.rs @@ -17,7 +17,7 @@ use crate::{ inclusion::{ tests::run_to_block_default_notifications as run_to_block, AggregateMessageOrigin, - AggregateMessageOrigin::Ump, UmpAcceptanceCheckErr, + AggregateMessageOrigin::Ump, UmpAcceptanceCheckErr, UmpQueueId, }, mock::{ assert_last_event, assert_last_events, new_test_ext, Configuration, MessageQueue, @@ -381,23 +381,24 @@ fn relay_dispatch_queue_size_is_updated() { // The messages of Q0…Q98 are overweight, so `service_queues` wont help. for p in 0..98 { + let para = UmpQueueId::Para(p.into()); MessageQueue::service_queues(Weight::from_all(u64::MAX)); - let fp = MessageQueue::footprint(AggregateMessageOrigin::Ump(p.into())); + let fp = MessageQueue::footprint(AggregateMessageOrigin::Ump(para)); let (para_queue_count, para_queue_size) = (fp.count, fp.size); assert_eq!(para_queue_count, 1, "count wrong for para: {}", p); assert_eq!(para_queue_size, 8, "size wrong for para: {}", p); } // All queues are empty after processing overweight messages. for p in 0..100 { - let para = p.into(); + let para = UmpQueueId::Para(p.into()); let _ = ::execute_overweight( Weight::from_all(u64::MAX), - (AggregateMessageOrigin::Ump(para), 0, 1), + (AggregateMessageOrigin::Ump(para.clone()), 0, 1), ); - assert_queue_remaining(para, cfg.max_upward_queue_count, cfg.max_upward_queue_size); - let fp = MessageQueue::footprint(AggregateMessageOrigin::Ump(p.into())); + assert_queue_remaining(p.into(), cfg.max_upward_queue_count, cfg.max_upward_queue_size); + let fp = MessageQueue::footprint(AggregateMessageOrigin::Ump(para)); let (para_queue_count, para_queue_size) = (fp.count, fp.size); assert_eq!(para_queue_count, 0, "count wrong for para: {}", p); assert_eq!(para_queue_size, 0, "size wrong for para: {}", p); @@ -488,7 +489,7 @@ fn service_overweight_unknown() { assert_noop!( ::execute_overweight( Weight::MAX, - (Ump(0u32.into()), 0, 0) + (Ump(UmpQueueId::Para(0u32.into())), 0, 0) ), ExecuteOverweightError::NotFound, ); @@ -522,21 +523,21 @@ fn overweight_queue_works() { [ pallet_message_queue::Event::::Processed { hash: hash_1.clone(), - origin: Ump(para_a), + origin: Ump(UmpQueueId::Para(para_a)), weight_used: Weight::from_parts(301, 301), success: true, } .into(), pallet_message_queue::Event::::OverweightEnqueued { hash: hash_2.clone(), - origin: Ump(para_a), + origin: Ump(UmpQueueId::Para(para_a)), page_index: 0, message_index: 1, } .into(), pallet_message_queue::Event::::OverweightEnqueued { hash: hash_3.clone(), - origin: Ump(para_a), + origin: Ump(UmpQueueId::Para(para_a)), page_index: 0, message_index: 2, } @@ -551,7 +552,7 @@ fn overweight_queue_works() { assert_noop!( ::execute_overweight( Weight::from_parts(500, 500), - (Ump(para_a), 0, 2) + (Ump(UmpQueueId::Para(para_a)), 0, 2) ), ExecuteOverweightError::InsufficientWeight, ); @@ -559,12 +560,12 @@ fn overweight_queue_works() { // ... and if we try to service it with just enough weight it will succeed as well. assert_ok!(::execute_overweight( Weight::from_parts(501, 501), - (Ump(para_a), 0, 2) + (Ump(UmpQueueId::Para(para_a)), 0, 2) )); assert_last_event( pallet_message_queue::Event::::Processed { hash: hash_3, - origin: Ump(para_a), + origin: Ump(UmpQueueId::Para(para_a)), weight_used: Weight::from_parts(501, 501), success: true, } @@ -576,7 +577,7 @@ fn overweight_queue_works() { assert_noop!( ::execute_overweight( Weight::from_parts(501, 501), - (Ump(para_a), 0, 2) + (Ump(UmpQueueId::Para(para_a)), 0, 2) ), ExecuteOverweightError::NotFound, ); diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 3c9e82a3c7af..1f710c154b1e 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1111,7 +1111,7 @@ impl parachains_paras::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::runtime_parachains_paras::WeightInfo; type UnsignedPriority = ParasUnsignedPriority; - type UmpQueueTracker = ParaInclusion; + type QueueFootprinter = ParaInclusion; type NextSessionRotation = Babe; } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 63a6716e0a2e..ed066de02e53 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1038,7 +1038,7 @@ impl parachains_paras::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::runtime_parachains_paras::WeightInfo; type UnsignedPriority = ParasUnsignedPriority; - type UmpQueueTracker = ParaInclusion; + type QueueFootprinter = ParaInclusion; type NextSessionRotation = Babe; } diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 4e2ed6c63d42..cdae8b276877 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -510,7 +510,7 @@ impl parachains_paras::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = parachains_paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; - type UmpQueueTracker = ParaInclusion; + type QueueFootprinter = ParaInclusion; type NextSessionRotation = Babe; } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index b915e041c519..f513efa748c8 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -911,7 +911,7 @@ impl parachains_paras::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::runtime_parachains_paras::WeightInfo; type UnsignedPriority = ParasUnsignedPriority; - type UmpQueueTracker = ParaInclusion; + type QueueFootprinter = ParaInclusion; type NextSessionRotation = Babe; } From 8d3b80692ad667573c504e84a0144f9512cad019 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Sat, 13 May 2023 16:05:16 +0200 Subject: [PATCH 175/182] More cleanup Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 4 +-- runtime/parachains/src/inclusion/mod.rs | 34 +++++++++----------- runtime/polkadot/src/lib.rs | 4 +-- runtime/rococo/src/lib.rs | 4 +-- runtime/westend/src/lib.rs | 4 +-- xcm/xcm-simulator/example/src/relay_chain.rs | 4 +-- xcm/xcm-simulator/fuzzer/src/relay_chain.rs | 4 +-- 7 files changed, 28 insertions(+), 30 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index cdb8c0ad851d..ab10785f4518 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -40,7 +40,7 @@ use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, - inclusion as parachains_inclusion, inclusion::AggregateMessageOrigin, + inclusion as parachains_inclusion, inclusion::{UmpQueueId, AggregateMessageOrigin}, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::v4 as parachains_runtime_api_impl, scheduler as parachains_scheduler, @@ -1127,7 +1127,7 @@ impl ProcessMessage for MessageProcessor { meter: &mut WeightMeter, ) -> Result { let para = match origin { - AggregateMessageOrigin::Ump(para) => para, + AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, }; xcm_builder::ProcessXcmMessage::< Junction, diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index bf38ab3706d2..a3f383fdaa7a 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -961,12 +961,11 @@ impl Pallet { backing_group, )); - weight.saturating_add( - >::note_new_head( - receipt.descriptor.para_id, - commitments.head_data, - relay_parent_number, - )) + weight.saturating_add(>::note_new_head( + receipt.descriptor.para_id, + commitments.head_data, + relay_parent_number, + )) } /// Check that all the upward messages sent by a candidate pass the acceptance criteria. @@ -1030,18 +1029,17 @@ impl Pallet { /// to deal with the messages as given. Messages that are too long will be ignored since such /// candidates should have already been rejected in [`Self::check_upward_messages`]. pub(crate) fn receive_upward_messages(para: ParaId, upward_messages: &[Vec]) -> Weight { - let bounded = - upward_messages - .iter() - .filter_map(|d| { - BoundedSlice::try_from(&d[..]) - .map_err(|e| { - defensive!("Accepted candidate contains too long msg, len=", d.len()); - e - }) - .ok() - }) - .collect(); + let bounded = upward_messages + .iter() + .filter_map(|d| { + BoundedSlice::try_from(&d[..]) + .map_err(|e| { + defensive!("Accepted candidate contains too long msg, len=", d.len()); + e + }) + .ok() + }) + .collect(); Self::receive_bounded_upward_messages(para, bounded) } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 1f710c154b1e..ea612d87882c 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -29,7 +29,7 @@ use runtime_common::{ use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, - inclusion as parachains_inclusion, inclusion::AggregateMessageOrigin, + inclusion as parachains_inclusion, inclusion::{UmpQueueId, AggregateMessageOrigin}, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::v4 as parachains_runtime_api_impl, scheduler as parachains_scheduler, @@ -1137,7 +1137,7 @@ impl ProcessMessage for MessageProcessor { meter: &mut WeightMeter, ) -> Result { let para = match origin { - AggregateMessageOrigin::Ump(para) => para, + AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, }; xcm_builder::ProcessXcmMessage::< Junction, diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index ed066de02e53..c4c59538f16e 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -40,7 +40,7 @@ use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, - inclusion as parachains_inclusion, inclusion::AggregateMessageOrigin, + inclusion as parachains_inclusion, inclusion::{UmpQueueId, AggregateMessageOrigin}, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, runtime_api_impl::v4 as parachains_runtime_api_impl, scheduler as parachains_scheduler, @@ -1064,7 +1064,7 @@ impl ProcessMessage for MessageProcessor { meter: &mut WeightMeter, ) -> Result { let para = match origin { - AggregateMessageOrigin::Ump(para) => para, + AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, }; xcm_builder::ProcessXcmMessage::< Junction, diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index f513efa748c8..0977a910e35f 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -54,7 +54,7 @@ use runtime_common::{ use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, - inclusion as parachains_inclusion, inclusion::AggregateMessageOrigin, + inclusion as parachains_inclusion, inclusion::{UmpQueueId, AggregateMessageOrigin}, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::v4 as parachains_runtime_api_impl, scheduler as parachains_scheduler, @@ -937,7 +937,7 @@ impl ProcessMessage for MessageProcessor { meter: &mut WeightMeter, ) -> Result { let para = match origin { - AggregateMessageOrigin::Ump(para) => para, + AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, }; xcm_builder::ProcessXcmMessage::< Junction, diff --git a/xcm/xcm-simulator/example/src/relay_chain.rs b/xcm/xcm-simulator/example/src/relay_chain.rs index d75b6ebb0002..9dcb77c3922f 100644 --- a/xcm/xcm-simulator/example/src/relay_chain.rs +++ b/xcm/xcm-simulator/example/src/relay_chain.rs @@ -28,7 +28,7 @@ use sp_runtime::{testing::Header, traits::IdentityLookup, AccountId32}; use polkadot_parachain::primitives::Id as ParaId; use polkadot_runtime_parachains::{ - configuration, inclusion::AggregateMessageOrigin, origin, shared, + configuration, inclusion::{UmpQueueId, AggregateMessageOrigin}, origin, shared, }; use xcm::latest::prelude::*; use xcm_builder::{ @@ -257,7 +257,7 @@ impl ProcessMessage for MessageProcessor { meter: &mut WeightMeter, ) -> Result { let para = match origin { - AggregateMessageOrigin::Ump(para) => para, + AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, }; xcm_builder::ProcessXcmMessage::< Junction, diff --git a/xcm/xcm-simulator/fuzzer/src/relay_chain.rs b/xcm/xcm-simulator/fuzzer/src/relay_chain.rs index 7cf61cdd2931..e3c3d98e5924 100644 --- a/xcm/xcm-simulator/fuzzer/src/relay_chain.rs +++ b/xcm/xcm-simulator/fuzzer/src/relay_chain.rs @@ -28,7 +28,7 @@ use sp_runtime::{testing::Header, traits::IdentityLookup, AccountId32}; use polkadot_parachain::primitives::Id as ParaId; use polkadot_runtime_parachains::{ - configuration, inclusion::AggregateMessageOrigin, origin, shared, + configuration, inclusion::{UmpQueueId, AggregateMessageOrigin}, origin, shared, }; use xcm::latest::prelude::*; use xcm_builder::{ @@ -221,7 +221,7 @@ impl ProcessMessage for MessageProcessor { meter: &mut WeightMeter, ) -> Result { let para = match origin { - AggregateMessageOrigin::Ump(para) => para, + AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, }; xcm_builder::ProcessXcmMessage::< Junction, From 69dcd7b1bb4825e22faada90fe3c1ad289bfe250 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Sat, 13 May 2023 16:07:36 +0200 Subject: [PATCH 176/182] fmt Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 10 ++++++---- runtime/polkadot/src/lib.rs | 10 ++++++---- runtime/rococo/src/lib.rs | 10 ++++++---- runtime/westend/src/lib.rs | 10 ++++++---- xcm/xcm-simulator/example/src/relay_chain.rs | 4 +++- xcm/xcm-simulator/fuzzer/src/relay_chain.rs | 4 +++- 6 files changed, 30 insertions(+), 18 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index ab10785f4518..955500faf101 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -39,12 +39,14 @@ use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, - disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, - inclusion as parachains_inclusion, inclusion::{UmpQueueId, AggregateMessageOrigin}, + disputes::slashing as parachains_slashing, + dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, + inclusion::{AggregateMessageOrigin, UmpQueueId}, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, - runtime_api_impl::v4 as parachains_runtime_api_impl, scheduler as parachains_scheduler, - session_info as parachains_session_info, shared as parachains_shared, + runtime_api_impl::v4 as parachains_runtime_api_impl, + scheduler as parachains_scheduler, session_info as parachains_session_info, + shared as parachains_shared, }; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index ea612d87882c..71f00f669462 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -28,12 +28,14 @@ use runtime_common::{ use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, - disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, - inclusion as parachains_inclusion, inclusion::{UmpQueueId, AggregateMessageOrigin}, + disputes::slashing as parachains_slashing, + dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, + inclusion::{AggregateMessageOrigin, UmpQueueId}, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, - runtime_api_impl::v4 as parachains_runtime_api_impl, scheduler as parachains_scheduler, - session_info as parachains_session_info, shared as parachains_shared, + runtime_api_impl::v4 as parachains_runtime_api_impl, + scheduler as parachains_scheduler, session_info as parachains_session_info, + shared as parachains_shared, }; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index c4c59538f16e..a00e7cb935ef 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -39,12 +39,14 @@ use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, - disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, - inclusion as parachains_inclusion, inclusion::{UmpQueueId, AggregateMessageOrigin}, + disputes::slashing as parachains_slashing, + dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, + inclusion::{AggregateMessageOrigin, UmpQueueId}, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, - runtime_api_impl::v4 as parachains_runtime_api_impl, scheduler as parachains_scheduler, - session_info as parachains_session_info, shared as parachains_shared, + runtime_api_impl::v4 as parachains_runtime_api_impl, + scheduler as parachains_scheduler, session_info as parachains_session_info, + shared as parachains_shared, }; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 0977a910e35f..699c9c68c977 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -53,12 +53,14 @@ use runtime_common::{ }; use runtime_parachains::{ configuration as parachains_configuration, disputes as parachains_disputes, - disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp, - inclusion as parachains_inclusion, inclusion::{UmpQueueId, AggregateMessageOrigin}, + disputes::slashing as parachains_slashing, + dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, + inclusion::{AggregateMessageOrigin, UmpQueueId}, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, - runtime_api_impl::v4 as parachains_runtime_api_impl, scheduler as parachains_scheduler, - session_info as parachains_session_info, shared as parachains_shared, + runtime_api_impl::v4 as parachains_runtime_api_impl, + scheduler as parachains_scheduler, session_info as parachains_session_info, + shared as parachains_shared, }; use scale_info::TypeInfo; use sp_core::{OpaqueMetadata, RuntimeDebug}; diff --git a/xcm/xcm-simulator/example/src/relay_chain.rs b/xcm/xcm-simulator/example/src/relay_chain.rs index 9dcb77c3922f..9d66c9b7954b 100644 --- a/xcm/xcm-simulator/example/src/relay_chain.rs +++ b/xcm/xcm-simulator/example/src/relay_chain.rs @@ -28,7 +28,9 @@ use sp_runtime::{testing::Header, traits::IdentityLookup, AccountId32}; use polkadot_parachain::primitives::Id as ParaId; use polkadot_runtime_parachains::{ - configuration, inclusion::{UmpQueueId, AggregateMessageOrigin}, origin, shared, + configuration, + inclusion::{AggregateMessageOrigin, UmpQueueId}, + origin, shared, }; use xcm::latest::prelude::*; use xcm_builder::{ diff --git a/xcm/xcm-simulator/fuzzer/src/relay_chain.rs b/xcm/xcm-simulator/fuzzer/src/relay_chain.rs index e3c3d98e5924..d6b506af0214 100644 --- a/xcm/xcm-simulator/fuzzer/src/relay_chain.rs +++ b/xcm/xcm-simulator/fuzzer/src/relay_chain.rs @@ -28,7 +28,9 @@ use sp_runtime::{testing::Header, traits::IdentityLookup, AccountId32}; use polkadot_parachain::primitives::Id as ParaId; use polkadot_runtime_parachains::{ - configuration, inclusion::{UmpQueueId, AggregateMessageOrigin}, origin, shared, + configuration, + inclusion::{AggregateMessageOrigin, UmpQueueId}, + origin, shared, }; use xcm::latest::prelude::*; use xcm_builder::{ From e2210a8da40fb20909165ed6933d47430ce43044 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Sat, 13 May 2023 16:15:18 +0200 Subject: [PATCH 177/182] fix benchmarks Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index a3f383fdaa7a..0095eac2f708 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -258,7 +258,7 @@ pub enum UmpQueueId { impl From for AggregateMessageOrigin { fn from(n: u32) -> Self { // Some dummy for the benchmarks. - Self::Ump(n.into()) + Self::Ump(UmpQueueId::Para(n.into())) } } From 117bca9ff7a932269b6766663e61f10887a9c4ff Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Sat, 13 May 2023 18:41:23 +0200 Subject: [PATCH 178/182] Fix fuzzer build Signed-off-by: Oliver Tale-Yazdi --- xcm/xcm-simulator/src/lib.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xcm/xcm-simulator/src/lib.rs b/xcm/xcm-simulator/src/lib.rs index cdfc109f137a..a460f0923798 100644 --- a/xcm/xcm-simulator/src/lib.rs +++ b/xcm/xcm-simulator/src/lib.rs @@ -31,7 +31,10 @@ pub use polkadot_parachain::primitives::{ DmpMessageHandler as DmpMessageHandlerT, Id as ParaId, XcmpMessageFormat, XcmpMessageHandler as XcmpMessageHandlerT, }; -pub use polkadot_runtime_parachains::{dmp, inclusion::AggregateMessageOrigin}; +pub use polkadot_runtime_parachains::{ + dmp, + inclusion::{AggregateMessageOrigin, UmpQueueId}, +}; pub use xcm::{latest::prelude::*, VersionedXcm}; pub use xcm_builder::ProcessXcmMessage; pub use xcm_executor::XcmExecutor; @@ -121,14 +124,14 @@ macro_rules! decl_test_relay_chain { para: Self::Origin, meter: &mut $crate::WeightMeter, ) -> Result { - use $crate::{Weight, AggregateMessageOrigin, ServiceQueues, EnqueueMessage}; + use $crate::{Weight, AggregateMessageOrigin, UmpQueueId, ServiceQueues, EnqueueMessage}; use $mq as message_queue; use $runtime_event as runtime_event; Self::execute_with(|| { <$mq as EnqueueMessage>::enqueue_message( msg.try_into().expect("Message too long"), - AggregateMessageOrigin::Ump(para.clone()) + AggregateMessageOrigin::Ump(UmpQueueId::Para(para.clone())) ); <$system>::reset_events(); @@ -139,7 +142,7 @@ macro_rules! decl_test_relay_chain { match &event.event { runtime_event::MessageQueue( pallet_message_queue::Event::Processed {origin, ..}) => { - assert_eq!(origin, &AggregateMessageOrigin::Ump(para)); + assert_eq!(origin, &AggregateMessageOrigin::Ump(UmpQueueId::Para(para))); }, event => panic!("Unexpected event: {:#?}", event), } From 9debdda63f1a08e04ea96b97be9d0abd5f84cdd7 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 16 May 2023 21:06:16 +0200 Subject: [PATCH 179/182] Review Co-authored-by: muharem Signed-off-by: Oliver Tale-Yazdi --- runtime/parachains/src/inclusion/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index 0095eac2f708..6af59090a073 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -482,16 +482,16 @@ impl Pallet { for _ in >::drain() {} for _ in >::drain() {} - Self::cleanup_outgoing_dmp_dispatch_queues(outgoing_paras); + Self::cleanup_outgoing_ump_dispatch_queues(outgoing_paras); } - pub(crate) fn cleanup_outgoing_dmp_dispatch_queues(outgoing: &[ParaId]) { + pub(crate) fn cleanup_outgoing_ump_dispatch_queues(outgoing: &[ParaId]) { for outgoing_para in outgoing { - Self::cleanup_outgoing_dmp_dispatch_queue(*outgoing_para); + Self::cleanup_outgoing_ump_dispatch_queue(*outgoing_para); } } - pub(crate) fn cleanup_outgoing_dmp_dispatch_queue(para: ParaId) { + pub(crate) fn cleanup_outgoing_ump_dispatch_queue(para: ParaId) { T::MessageQueue::sweep_queue(AggregateMessageOrigin::Ump(UmpQueueId::Para(para))); } From dd0be23771d0c33ffa9a2677c3826d340d5197bd Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 19 May 2023 11:01:50 +0200 Subject: [PATCH 180/182] Remove old migration Signed-off-by: Oliver Tale-Yazdi --- runtime/polkadot/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 60a0f939b627..f1bb9b141fc6 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1496,7 +1496,8 @@ pub mod migrations { pub type V0938 = ( pallet_xcm::migration::v1::MigrateToV1, - parachains_ump::migration::v1::MigrateToV1, + // The UMP pallet got deleted in + // parachains_ump::migration::v1::MigrateToV1, ); pub type V0940 = ( From 583eaaa3f8e6ef78c9028c539d14ef972d6f5fd8 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 19 May 2023 13:03:02 +0200 Subject: [PATCH 181/182] Set MQ service weight to 20% Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 2 +- runtime/polkadot/src/lib.rs | 2 +- runtime/rococo/src/lib.rs | 2 +- runtime/westend/src/lib.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 570842812c03..6971e90e974f 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1113,7 +1113,7 @@ parameter_types! { /// # WARNING /// /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. - pub MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(20) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 65_536; pub const MessageQueueMaxStale: u32 = 16; } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index f1bb9b141fc6..27bc0bc48675 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1123,7 +1123,7 @@ parameter_types! { /// # WARNING /// /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. - pub MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(20) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 65_536; pub const MessageQueueMaxStale: u32 = 8; } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index a00e7cb935ef..44996957f37c 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1050,7 +1050,7 @@ parameter_types! { /// # WARNING /// /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. - pub MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(20) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 32 * 1024; pub const MessageQueueMaxStale: u32 = 96; } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 699c9c68c977..5ca12202fadf 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -923,7 +923,7 @@ parameter_types! { /// # WARNING /// /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. - pub MessageQueueServiceWeight: Weight = Perbill::from_percent(40) * BlockWeights::get().max_block; + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(20) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 128 * 1024; pub const MessageQueueMaxStale: u32 = 48; } From ad9b579e9c7cebf8b91d5093a18bfc8a310a2fa3 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 19 May 2023 13:04:40 +0200 Subject: [PATCH 182/182] Fix tabs in Markdown Signed-off-by: Oliver Tale-Yazdi --- roadmap/implementers-guide/src/runtime/inclusion.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roadmap/implementers-guide/src/runtime/inclusion.md b/roadmap/implementers-guide/src/runtime/inclusion.md index 3cdcaf89c96f..db37ae10a198 100644 --- a/roadmap/implementers-guide/src/runtime/inclusion.md +++ b/roadmap/implementers-guide/src/runtime/inclusion.md @@ -39,8 +39,8 @@ PendingAvailabilityCommitments: map ParaId => CandidateCommitments; * `MessageQueue`: The message queue provides general queueing and processing functionality. Currently it - replaces the old `UMP` dispatch queue. Other use-cases can be implemented as well by - adding new variants to `AggregateMessageOrigin`. Normally it should be set to an instance + replaces the old `UMP` dispatch queue. Other use-cases can be implemented as well by + adding new variants to `AggregateMessageOrigin`. Normally it should be set to an instance of the `MessageQueue` pallet. ## Session Change