From e067a170bae225a21deceb47ac3bbf82a8d483ff Mon Sep 17 00:00:00 2001 From: kianenigma Date: Tue, 4 Oct 2022 14:51:05 +0100 Subject: [PATCH 01/16] don't read slashing spans when taking election snapshot --- Cargo.lock | 800 ++++++++++++------ Cargo.toml | 1 + .../election-provider-multi-phase/src/lib.rs | 3 + frame/staking/src/benchmarking.rs | 15 +- frame/staking/src/pallet/impls.rs | 28 +- frame/staking/src/pallet/mod.rs | 8 +- frame/staking/src/slashing.rs | 121 +-- frame/staking/src/tests.rs | 131 +-- utils/frame/remote-externalities/src/lib.rs | 31 +- 9 files changed, 718 insertions(+), 420 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a9a0eef551179..69b8e312d0722 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,6 +62,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "ahash" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" + [[package]] name = "ahash" version = "0.7.6" @@ -153,9 +159,9 @@ checksum = "9d6e24d2cce90c53b948c46271bfb053e4bdc2db9b5d3f65e20f8cf28a1b7fc3" [[package]] name = "assert_cmd" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e996dc7940838b7ef1096b882e29ec30a3149a3a443cdc8dba19ed382eca1fe2" +checksum = "93ae1ddd39efd67689deb1979d80bad3bf7f2b09c6e6117c8d1f2443b5e2f83e" dependencies = [ "bstr", "doc-comment", @@ -347,6 +353,19 @@ version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" +[[package]] +name = "async-tls" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f23d769dbf1838d5df5156e7b1ad404f4c463d1ac2c6aeb6cd943630f8a8400" +dependencies = [ + "futures-core", + "futures-io", + "rustls 0.19.1", + "webpki 0.21.4", + "webpki-roots 0.21.1", +] + [[package]] name = "async-trait" version = "0.1.57" @@ -364,7 +383,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690" dependencies = [ - "bytes", + "bytes 1.1.0", "futures-sink", "futures-util", "memchr", @@ -427,6 +446,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + [[package]] name = "base64" version = "0.13.0" @@ -459,7 +484,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "sc-block-builder", "sc-chain-spec", @@ -503,7 +528,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "sc-rpc", "sc-utils", @@ -533,7 +558,7 @@ name = "beefy-primitives" version = "4.0.0-dev" dependencies = [ "array-bytes", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-api", "sp-application-crypto", @@ -782,6 +807,12 @@ version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +[[package]] +name = "bytes" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" + [[package]] name = "bytes" version = "1.1.0" @@ -990,9 +1021,13 @@ version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ + "ansi_term", + "atty", "bitflags", + "strsim 0.8.0", "textwrap 0.11.0", "unicode-width", + "vec_map", ] [[package]] @@ -1007,7 +1042,7 @@ dependencies = [ "clap_lex", "indexmap", "lazy_static", - "strsim", + "strsim 0.10.0", "termcolor", "textwrap 0.15.0", ] @@ -1027,7 +1062,7 @@ version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" dependencies = [ - "heck", + "heck 0.4.0", "proc-macro-error", "proc-macro2", "quote", @@ -1551,7 +1586,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.10.0", "syn", ] @@ -1860,7 +1895,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73" dependencies = [ - "heck", + "heck 0.4.0", "proc-macro2", "quote", "syn", @@ -1929,9 +1964,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" +checksum = "c90bf5f19754d10198ccb95b70664fc925bd1fc090a0fd9a6ebc54acc8cd6272" dependencies = [ "atty", "humantime", @@ -2055,7 +2090,7 @@ dependencies = [ "futures-timer", "log", "num-traits", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "rand 0.8.5", "scale-info", @@ -2102,7 +2137,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" name = "fork-tree" version = "3.0.0" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", ] [[package]] @@ -2124,7 +2159,7 @@ dependencies = [ "frame-system", "linregress", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "paste 1.0.6", "rusty-fork", "scale-info", @@ -2161,7 +2196,7 @@ dependencies = [ "linked-hash-map", "log", "memory-db", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "rand 0.8.5", "rand_pcg 0.3.1", "sc-block-builder", @@ -2196,7 +2231,7 @@ version = "4.0.0-dev" dependencies = [ "frame-election-provider-support", "frame-support", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "proc-macro-crate", "proc-macro2", "quote", @@ -2213,7 +2248,7 @@ dependencies = [ "frame-election-provider-solution-type", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "rand 0.7.3", "scale-info", "sp-arithmetic", @@ -2233,7 +2268,7 @@ dependencies = [ "frame-election-provider-support", "frame-support", "honggfuzz", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "rand 0.8.5", "scale-info", "sp-arithmetic", @@ -2251,7 +2286,7 @@ dependencies = [ "frame-try-runtime", "pallet-balances", "pallet-transaction-payment", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-inherents", @@ -2269,7 +2304,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" dependencies = [ "cfg-if 1.0.0", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", ] @@ -2287,7 +2322,7 @@ dependencies = [ "k256", "log", "once_cell", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parity-util-mem", "paste 1.0.6", "pretty_assertions", @@ -2350,7 +2385,7 @@ dependencies = [ "frame-support", "frame-support-test-pallet", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "pretty_assertions", "rustversion", "scale-info", @@ -2371,7 +2406,7 @@ version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-runtime", @@ -2384,7 +2419,7 @@ version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", ] @@ -2395,7 +2430,7 @@ dependencies = [ "criterion", "frame-support", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-core", @@ -2415,7 +2450,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -2427,7 +2462,7 @@ dependencies = [ name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-api", ] @@ -2436,7 +2471,7 @@ name = "frame-try-runtime" version = "0.10.0-dev" dependencies = [ "frame-support", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-api", "sp-runtime", "sp-std", @@ -2558,8 +2593,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01fe9932a224b72b45336d96040aa86386d674a31d0af27d800ea7bc8ca97fe" dependencies = [ "futures-io", - "rustls", - "webpki", + "rustls 0.20.2", + "webpki 0.22.0", ] [[package]] @@ -2774,7 +2809,7 @@ version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" dependencies = [ - "bytes", + "bytes 1.1.0", "fnv", "futures-core", "futures-sink", @@ -2822,13 +2857,22 @@ dependencies = [ "crunchy", ] +[[package]] +name = "hashbrown" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +dependencies = [ + "ahash 0.4.7", +] + [[package]] name = "hashbrown" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash", + "ahash 0.7.6", ] [[package]] @@ -2837,7 +2881,16 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.6", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", ] [[package]] @@ -2861,6 +2914,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + [[package]] name = "hex_fmt" version = "0.3.0" @@ -2926,7 +2985,7 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ - "bytes", + "bytes 1.1.0", "fnv", "itoa 1.0.1", ] @@ -2937,7 +2996,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60daa14be0e0786db0f03a9e57cb404c9d756eed2b6c62b9ea98ec5743ec75a9" dependencies = [ - "bytes", + "bytes 1.1.0", "http", "pin-project-lite 0.2.6", ] @@ -2966,7 +3025,7 @@ version = "0.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" dependencies = [ - "bytes", + "bytes 1.1.0", "futures-channel", "futures-core", "futures-util", @@ -2993,7 +3052,7 @@ dependencies = [ "http", "hyper", "log", - "rustls", + "rustls 0.20.2", "rustls-native-certs", "tokio", "tokio-rustls", @@ -3050,7 +3109,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", ] [[package]] @@ -3180,8 +3239,8 @@ dependencies = [ "jsonrpsee-core", "jsonrpsee-http-server", "jsonrpsee-proc-macros", - "jsonrpsee-types", - "jsonrpsee-ws-client", + "jsonrpsee-types 0.15.1", + "jsonrpsee-ws-client 0.15.1", "jsonrpsee-ws-server", "tracing", ] @@ -3195,16 +3254,16 @@ dependencies = [ "futures-util", "http", "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-types 0.15.1", "pin-project", "rustls-native-certs", - "soketto", + "soketto 0.7.1", "thiserror", "tokio", "tokio-rustls", "tokio-util", "tracing", - "webpki-roots", + "webpki-roots 0.22.2", ] [[package]] @@ -3224,14 +3283,14 @@ dependencies = [ "globset", "http", "hyper", - "jsonrpsee-types", + "jsonrpsee-types 0.15.1", "lazy_static", "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", "serde", "serde_json", - "soketto", + "soketto 0.7.1", "thiserror", "tokio", "tracing", @@ -3239,6 +3298,23 @@ dependencies = [ "unicase", ] +[[package]] +name = "jsonrpsee-http-client" +version = "0.1.0" +source = "git+https://github.com/paritytech/jsonrpsee?rev=4025c0f67298ab7216214feac4e2c29ca9b24710#4025c0f67298ab7216214feac4e2c29ca9b24710" +dependencies = [ + "futures", + "hyper", + "jsonrpsee-types 0.1.0", + "jsonrpsee-utils", + "log", + "serde", + "serde_json", + "thiserror", + "unicase", + "url", +] + [[package]] name = "jsonrpsee-http-server" version = "0.15.1" @@ -3249,7 +3325,7 @@ dependencies = [ "futures-util", "hyper", "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-types 0.15.1", "serde", "serde_json", "tokio", @@ -3269,6 +3345,20 @@ dependencies = [ "syn", ] +[[package]] +name = "jsonrpsee-types" +version = "0.1.0" +source = "git+https://github.com/paritytech/jsonrpsee?rev=4025c0f67298ab7216214feac4e2c29ca9b24710#4025c0f67298ab7216214feac4e2c29ca9b24710" +dependencies = [ + "fnv", + "futures", + "hashbrown 0.9.1", + "serde", + "serde_json", + "smallvec", + "thiserror", +] + [[package]] name = "jsonrpsee-types" version = "0.15.1" @@ -3283,6 +3373,40 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-utils" +version = "0.1.0" +source = "git+https://github.com/paritytech/jsonrpsee?rev=4025c0f67298ab7216214feac4e2c29ca9b24710#4025c0f67298ab7216214feac4e2c29ca9b24710" +dependencies = [ + "futures", + "globset", + "hyper", + "jsonrpsee-types 0.1.0", + "lazy_static", + "log", + "unicase", +] + +[[package]] +name = "jsonrpsee-ws-client" +version = "0.1.0" +source = "git+https://github.com/paritytech/jsonrpsee?rev=4025c0f67298ab7216214feac4e2c29ca9b24710#4025c0f67298ab7216214feac4e2c29ca9b24710" +dependencies = [ + "async-std", + "async-tls", + "fnv", + "futures", + "jsonrpsee-types 0.1.0", + "log", + "pin-project", + "serde", + "serde_json", + "soketto 0.4.2", + "thiserror", + "url", + "webpki 0.21.4", +] + [[package]] name = "jsonrpsee-ws-client" version = "0.15.1" @@ -3292,7 +3416,7 @@ dependencies = [ "http", "jsonrpsee-client-transport", "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-types 0.15.1", ] [[package]] @@ -3305,9 +3429,9 @@ dependencies = [ "futures-util", "http", "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-types 0.15.1", "serde_json", - "soketto", + "soketto 0.7.1", "tokio", "tokio-stream", "tokio-util", @@ -3417,7 +3541,7 @@ dependencies = [ "pallet-utility", "pallet-vesting", "pallet-whitelist", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-api", "sp-authority-discovery", @@ -3554,7 +3678,7 @@ version = "0.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81327106887e42d004fbdab1fef93675be2e2e07c1b95fce45e2cc813485611d" dependencies = [ - "bytes", + "bytes 1.1.0", "futures", "futures-timer", "getrandom 0.2.3", @@ -3697,9 +3821,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74b4b888cfbeb1f5551acd3aa1366e01bf88ede26cc3c4645d0d2d004d5ca7b0" dependencies = [ "asynchronous-codec", - "base64", + "base64 0.13.0", "byteorder", - "bytes", + "bytes 1.1.0", "fnv", "futures", "hex_fmt", @@ -3747,7 +3871,7 @@ checksum = "740862893bb5f06ac24acc9d49bdeadc3a5e52e51818a30a25c1f3519da2c851" dependencies = [ "arrayvec 0.7.2", "asynchronous-codec", - "bytes", + "bytes 1.1.0", "either", "fnv", "futures", @@ -3811,7 +3935,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61fd1b20638ec209c5075dfb2e8ce6a7ea4ec3cd3ad7b77f7a477c06d53322e2" dependencies = [ "asynchronous-codec", - "bytes", + "bytes 1.1.0", "futures", "libp2p-core", "log", @@ -3828,7 +3952,7 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "762408cb5d84b49a600422d7f9a42c18012d8da6ebcd570f9a4a4290ba41fb6f" dependencies = [ - "bytes", + "bytes 1.1.0", "curve25519-dalek 3.0.2", "futures", "lazy_static", @@ -3867,7 +3991,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be27bf0820a6238a4e06365b096d428271cce85a129cf16f2fe9eb1610c4df86" dependencies = [ "asynchronous-codec", - "bytes", + "bytes 1.1.0", "futures", "libp2p-core", "log", @@ -3898,7 +4022,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4931547ee0cce03971ccc1733ff05bb0c4349fd89120a39e9861e2bbe18843c3" dependencies = [ "asynchronous-codec", - "bytes", + "bytes 1.1.0", "either", "futures", "futures-timer", @@ -3947,7 +4071,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "508a189e2795d892c8f5c1fa1e9e0b1845d32d7b0b249dbf7b05b18811361843" dependencies = [ "async-trait", - "bytes", + "bytes 1.1.0", "futures", "instant", "libp2p-core", @@ -4045,9 +4169,9 @@ dependencies = [ "parking_lot 0.12.1", "quicksink", "rw-stream-sink", - "soketto", + "soketto 0.7.1", "url", - "webpki-roots", + "webpki-roots 0.22.2", ] [[package]] @@ -4085,7 +4209,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0452aac8bab02242429380e9b2f94ea20cea2b37e2c1777a1358799bbe97f37" dependencies = [ "arrayref", - "base64", + "base64 0.13.0", "digest 0.9.0", "hmac-drbg", "libsecp256k1-core", @@ -4497,7 +4621,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "363a84be6453a70e63513660f4894ef815daf88e3356bffcda9ca27d810ce83b" dependencies = [ - "bytes", + "bytes 1.1.0", "futures", "log", "pin-project", @@ -4587,7 +4711,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef8785b8141e8432aa45fceb922a7e876d7da3fad37fa7e7ec702ace3aa0826b" dependencies = [ - "bytes", + "bytes 1.1.0", "futures", "log", "netlink-packet-core", @@ -4602,7 +4726,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e4c9f9547a08241bee7b6558b9b98e1f290d187de8b7cfca2bbb4937bcaa8f8" dependencies = [ "async-io", - "bytes", + "bytes 1.1.0", "futures", "libc", "log", @@ -4698,7 +4822,7 @@ dependencies = [ "pallet-im-online", "pallet-timestamp", "pallet-transaction-payment", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "platforms", "rand 0.8.5", "regex", @@ -4730,7 +4854,7 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "soketto", + "soketto 0.7.1", "sp-api", "sp-authority-discovery", "sp-authorship", @@ -4775,7 +4899,7 @@ dependencies = [ "pallet-timestamp", "pallet-transaction-payment", "pallet-treasury", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-executor", "scale-info", "sp-application-crypto", @@ -4796,7 +4920,7 @@ name = "node-inspect" version = "0.9.0-dev" dependencies = [ "clap 3.1.18", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-cli", "sc-client-api", "sc-executor", @@ -4812,7 +4936,7 @@ name = "node-primitives" version = "2.0.0" dependencies = [ "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-application-crypto", "sp-core", @@ -4922,7 +5046,7 @@ dependencies = [ "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-api", "sp-block-builder", @@ -4951,7 +5075,7 @@ dependencies = [ "node-primitives", "pallet-asset-tx-payment", "pallet-transaction-payment", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-block-builder", "sc-client-api", "sc-client-db", @@ -5189,7 +5313,7 @@ dependencies = [ "pallet-balances", "pallet-collective", "pallet-identity", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sha2 0.10.2", "sp-core", @@ -5208,7 +5332,7 @@ dependencies = [ "pallet-authorship", "pallet-balances", "pallet-transaction-payment", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "serde_json", @@ -5227,7 +5351,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5242,7 +5366,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5257,7 +5381,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-application-crypto", "sp-consensus-aura", @@ -5274,7 +5398,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-session", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-application-crypto", "sp-authority-discovery", @@ -5291,7 +5415,7 @@ dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-authorship", "sp-core", @@ -5316,7 +5440,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-application-crypto", "sp-consensus-babe", @@ -5339,7 +5463,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5385,7 +5509,7 @@ dependencies = [ "frame-system", "log", "pallet-transaction-payment", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5401,7 +5525,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-session", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-core", @@ -5424,7 +5548,7 @@ dependencies = [ "pallet-beefy", "pallet-mmr", "pallet-session", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-core", @@ -5444,7 +5568,7 @@ dependencies = [ "log", "pallet-balances", "pallet-treasury", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5463,7 +5587,7 @@ dependencies = [ "pallet-balances", "pallet-bounties", "pallet-treasury", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5479,7 +5603,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5506,7 +5630,7 @@ dependencies = [ "pallet-randomness-collective-flip", "pallet-timestamp", "pallet-utility", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "pretty_assertions", "rand 0.8.5", "rand_pcg 0.3.1", @@ -5529,7 +5653,7 @@ name = "pallet-contracts-primitives" version = "6.0.0" dependencies = [ "bitflags", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-core", @@ -5554,7 +5678,7 @@ dependencies = [ "jsonrpsee", "pallet-contracts-primitives", "pallet-contracts-rpc-runtime-api", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "serde", "serde_json", "sp-api", @@ -5569,7 +5693,7 @@ name = "pallet-contracts-rpc-runtime-api" version = "4.0.0-dev" dependencies = [ "pallet-contracts-primitives", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-api", "sp-runtime", @@ -5586,7 +5710,7 @@ dependencies = [ "frame-system", "pallet-balances", "pallet-scheduler", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-core", @@ -5604,7 +5728,7 @@ dependencies = [ "frame-system", "pallet-balances", "pallet-scheduler", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-core", @@ -5624,7 +5748,7 @@ dependencies = [ "log", "pallet-balances", "pallet-election-provider-support-benchmarking", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "rand 0.7.3", "scale-info", @@ -5646,7 +5770,7 @@ dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-npos-elections", "sp-runtime", ] @@ -5660,7 +5784,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5680,7 +5804,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5696,7 +5820,7 @@ dependencies = [ "frame-system", "lite-json", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5711,7 +5835,7 @@ version = "3.0.0-dev" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5733,7 +5857,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5752,7 +5876,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-arithmetic", "sp-core", @@ -5778,7 +5902,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-application-crypto", "sp-core", @@ -5800,7 +5924,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5818,7 +5942,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-application-crypto", "sp-core", @@ -5836,7 +5960,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5854,7 +5978,7 @@ dependencies = [ "frame-support-test", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5870,7 +5994,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5889,7 +6013,7 @@ dependencies = [ "frame-support", "frame-system", "itertools", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5903,7 +6027,7 @@ name = "pallet-mmr-rpc" version = "3.0.0" dependencies = [ "jsonrpsee", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "serde", "serde_json", "sp-api", @@ -5921,7 +6045,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5936,7 +6060,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5951,7 +6075,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -5967,7 +6091,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "rand 0.8.5", "scale-info", "sp-core", @@ -5992,7 +6116,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -6006,7 +6130,7 @@ dependencies = [ name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-api", "sp-std", ] @@ -6025,7 +6149,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -6043,7 +6167,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-core", @@ -6070,7 +6194,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -6087,7 +6211,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -6104,7 +6228,7 @@ dependencies = [ "frame-system", "pallet-balances", "pallet-utility", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -6118,7 +6242,7 @@ version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "safe-mix", "scale-info", "sp-core", @@ -6135,7 +6259,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-arithmetic", "sp-core", @@ -6152,7 +6276,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -6171,7 +6295,7 @@ dependencies = [ "pallet-balances", "pallet-preimage", "pallet-scheduler", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-arithmetic", @@ -6188,7 +6312,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-core", @@ -6206,7 +6330,7 @@ dependencies = [ "frame-system", "log", "pallet-preimage", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -6222,7 +6346,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -6239,7 +6363,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -6263,7 +6387,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "rand 0.7.3", "scale-info", "sp-core", @@ -6281,7 +6405,7 @@ dependencies = [ "frame-support-test", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "rand_chacha 0.2.2", "scale-info", "sp-core", @@ -6305,7 +6429,7 @@ dependencies = [ "pallet-session", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "rand_chacha 0.2.2", "scale-info", "serde", @@ -6348,7 +6472,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "remote-externalities", "scale-info", @@ -6370,7 +6494,7 @@ version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -6385,7 +6509,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -6400,7 +6524,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-inherents", @@ -6420,7 +6544,7 @@ dependencies = [ "log", "pallet-balances", "pallet-treasury", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-core", @@ -6437,7 +6561,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "serde_json", @@ -6453,7 +6577,7 @@ version = "4.0.0-dev" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-api", "sp-blockchain", "sp-core", @@ -6466,7 +6590,7 @@ name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" dependencies = [ "pallet-transaction-payment", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-api", "sp-runtime", ] @@ -6481,7 +6605,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-core", @@ -6501,7 +6625,7 @@ dependencies = [ "frame-system", "impl-trait-for-tuples", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-core", @@ -6519,7 +6643,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -6535,7 +6659,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -6552,7 +6676,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-io", @@ -6569,7 +6693,7 @@ dependencies = [ "frame-system", "pallet-balances", "pallet-preimage", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-api", "sp-core", @@ -6597,6 +6721,18 @@ dependencies = [ "snap", ] +[[package]] +name = "parity-scale-codec" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" +dependencies = [ + "arrayvec 0.7.2", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive 2.3.1", +] + [[package]] name = "parity-scale-codec" version = "3.1.3" @@ -6606,12 +6742,24 @@ dependencies = [ "arrayvec 0.7.2", "bitvec", "byte-slice-cast", - "bytes", + "bytes 1.1.0", "impl-trait-for-tuples", - "parity-scale-codec-derive", + "parity-scale-codec-derive 3.1.3", "serde", ] +[[package]] +name = "parity-scale-codec-derive" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "parity-scale-codec-derive" version = "3.1.3" @@ -7109,7 +7257,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc03e116981ff7d8da8e5c220e374587b98d294af7ba7dd7fda761158f00086f" dependencies = [ - "bytes", + "bytes 1.1.0", "prost-derive 0.10.1", ] @@ -7119,7 +7267,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7" dependencies = [ - "bytes", + "bytes 1.1.0", "prost-derive 0.11.0", ] @@ -7129,10 +7277,10 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ae5a4388762d5815a9fc0dea33c56b021cdc8dde0c55e0c9ca57197254b0cab" dependencies = [ - "bytes", + "bytes 1.1.0", "cfg-if 1.0.0", "cmake", - "heck", + "heck 0.4.0", "itertools", "lazy_static", "log", @@ -7151,8 +7299,8 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f835c582e6bd972ba8347313300219fed5bfa52caf175298d860b61ff6069bb" dependencies = [ - "bytes", - "heck", + "bytes 1.1.0", + "heck 0.4.0", "itertools", "lazy_static", "log", @@ -7172,7 +7320,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00af1e92c33b4813cc79fda3f2dbf56af5169709be0202df730e9ebc3e4cd007" dependencies = [ "asynchronous-codec", - "bytes", + "bytes 1.1.0", "prost 0.10.3", "thiserror", "unsigned-varint", @@ -7210,7 +7358,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" dependencies = [ - "bytes", + "bytes 1.1.0", "prost 0.10.3", ] @@ -7220,7 +7368,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dfaa718ad76a44b3415e6c4d53b17c8f99160dcb3a99b10470fce8ad43f6e3e" dependencies = [ - "bytes", + "bytes 1.1.0", "prost 0.11.0", ] @@ -7538,10 +7686,13 @@ version = "0.10.0-dev" dependencies = [ "env_logger", "frame-support", + "hex-literal", "jsonrpsee", + "kitchensink-runtime", "log", "pallet-elections-phragmen", - "parity-scale-codec", + "pallet-staking", + "parity-scale-codec 3.1.3", "serde", "serde_json", "sp-core", @@ -7715,6 +7866,19 @@ dependencies = [ "windows-sys 0.36.1", ] +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64 0.13.0", + "log", + "ring", + "sct 0.6.1", + "webpki 0.21.4", +] + [[package]] name = "rustls" version = "0.20.2" @@ -7723,8 +7887,8 @@ checksum = "d37e5e2290f3e040b594b1a9e04377c2c671f1a1cfd9bfdef82106ac1c113f84" dependencies = [ "log", "ring", - "sct", - "webpki", + "sct 0.7.0", + "webpki 0.22.0", ] [[package]] @@ -7745,7 +7909,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" dependencies = [ - "base64", + "base64 0.13.0", ] [[package]] @@ -7829,7 +7993,7 @@ dependencies = [ "ip_network", "libp2p", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "prost 0.10.3", "prost-build 0.10.4", "quickcheck", @@ -7855,7 +8019,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "sc-block-builder", "sc-client-api", @@ -7877,7 +8041,7 @@ dependencies = [ name = "sc-block-builder" version = "0.10.0-dev" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-client-api", "sp-api", "sp-block-builder", @@ -7895,7 +8059,7 @@ version = "4.0.0-dev" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.0", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-chain-spec-derive", "sc-network-common", "sc-telemetry", @@ -7927,7 +8091,7 @@ dependencies = [ "libp2p", "log", "names", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "rand 0.7.3", "regex", "rpassword", @@ -7963,7 +8127,7 @@ dependencies = [ "futures", "hash-db", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "sc-executor", "sc-transaction-pool-api", @@ -7998,7 +8162,7 @@ dependencies = [ "linked-hash-map", "log", "parity-db", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "quickcheck", "rand 0.8.5", @@ -8047,7 +8211,7 @@ dependencies = [ "async-trait", "futures", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "sc-block-builder", "sc-client-api", @@ -8089,7 +8253,7 @@ dependencies = [ "num-bigint 0.2.6", "num-rational 0.2.4", "num-traits", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "rand 0.7.3", "rand_chacha 0.2.2", @@ -8159,7 +8323,7 @@ name = "sc-consensus-epochs" version = "0.10.0-dev" dependencies = [ "fork-tree", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-client-api", "sc-consensus", "sp-blockchain", @@ -8175,7 +8339,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-basic-authorship", "sc-client-api", "sc-consensus", @@ -8211,7 +8375,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "sc-client-api", "sc-consensus", @@ -8235,7 +8399,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-client-api", "sc-consensus", "sc-telemetry", @@ -8271,7 +8435,7 @@ dependencies = [ "lazy_static", "lru", "num_cpus", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "paste 1.0.6", "regex", @@ -8307,7 +8471,7 @@ name = "sc-executor-common" version = "0.10.0-dev" dependencies = [ "environmental", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-allocator", "sp-maybe-compressed-blob", "sp-sandbox", @@ -8323,7 +8487,7 @@ name = "sc-executor-wasmi" version = "0.10.0-dev" dependencies = [ "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -8340,7 +8504,7 @@ dependencies = [ "libc", "log", "once_cell", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parity-wasm 0.45.0", "paste 1.0.6", "rustix", @@ -8360,7 +8524,7 @@ dependencies = [ name = "sc-finality-grandpa" version = "0.10.0-dev" dependencies = [ - "ahash", + "ahash 0.7.6", "array-bytes", "assert_matches", "async-trait", @@ -8370,7 +8534,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "rand 0.8.5", "sc-block-builder", @@ -8412,7 +8576,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-block-builder", "sc-client-api", "sc-finality-grandpa", @@ -8470,7 +8634,7 @@ dependencies = [ "async-trait", "asynchronous-codec", "bitflags", - "bytes", + "bytes 1.1.0", "cid", "either", "fnv", @@ -8483,7 +8647,7 @@ dependencies = [ "linked_hash_set", "log", "lru", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "pin-project", "prost 0.10.3", @@ -8547,12 +8711,12 @@ version = "0.10.0-dev" dependencies = [ "async-trait", "bitflags", - "bytes", + "bytes 1.1.0", "futures", "futures-timer", "libp2p", "linked_hash_set", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "prost-build 0.10.4", "sc-consensus", "sc-peerset", @@ -8570,7 +8734,7 @@ dependencies = [ name = "sc-network-gossip" version = "0.10.0-dev" dependencies = [ - "ahash", + "ahash 0.7.6", "async-std", "futures", "futures-timer", @@ -8594,7 +8758,7 @@ dependencies = [ "futures", "libp2p", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "prost 0.10.3", "prost-build 0.10.4", "sc-client-api", @@ -8616,7 +8780,7 @@ dependencies = [ "libp2p", "log", "lru", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "prost 0.10.3", "prost-build 0.10.4", "quickcheck", @@ -8677,7 +8841,7 @@ dependencies = [ "hex", "libp2p", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "pin-project", "sc-network-common", "sc-peerset", @@ -8691,7 +8855,7 @@ name = "sc-offchain" version = "4.0.0-dev" dependencies = [ "array-bytes", - "bytes", + "bytes 1.1.0", "fnv", "futures", "futures-timer", @@ -8701,7 +8865,7 @@ dependencies = [ "libp2p", "num_cpus", "once_cell", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "rand 0.7.3", "sc-block-builder", @@ -8756,7 +8920,7 @@ dependencies = [ "jsonrpsee", "lazy_static", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "sc-block-builder", "sc-chain-spec", @@ -8791,7 +8955,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "sc-chain-spec", "sc-transaction-pool-api", @@ -8856,7 +9020,7 @@ dependencies = [ "hash-db", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parity-util-mem", "parking_lot 0.12.1", "pin-project", @@ -8923,7 +9087,7 @@ dependencies = [ "fdlimit", "futures", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "sc-block-builder", "sc-client-api", @@ -8956,7 +9120,7 @@ name = "sc-state-db" version = "0.10.0-dev" dependencies = [ "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parity-util-mem", "parity-util-mem-derive", "parking_lot 0.12.1", @@ -8969,7 +9133,7 @@ name = "sc-sync-state-rpc" version = "0.10.0-dev" dependencies = [ "jsonrpsee", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-chain-spec", "sc-client-api", "sc-consensus-babe", @@ -9069,7 +9233,7 @@ dependencies = [ "futures-timer", "linked-hash-map", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parity-util-mem", "parking_lot 0.12.1", "sc-block-builder", @@ -9125,7 +9289,7 @@ dependencies = [ "bitvec", "cfg-if 1.0.0", "derive_more", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info-derive", "serde", ] @@ -9176,6 +9340,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "sct" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "sct" version = "0.7.0" @@ -9288,6 +9462,12 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "separator" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" + [[package]] name = "serde" version = "1.0.136" @@ -9537,14 +9717,29 @@ dependencies = [ "winapi", ] +[[package]] +name = "soketto" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5c71ed3d54db0a699f4948e1bb3e45b450fa31fe602621dee6680361d569c88" +dependencies = [ + "base64 0.12.3", + "bytes 0.5.6", + "futures", + "httparse", + "log", + "rand 0.7.3", + "sha-1 0.9.4", +] + [[package]] name = "soketto" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" dependencies = [ - "base64", - "bytes", + "base64 0.13.0", + "bytes 1.1.0", "flate2", "futures", "httparse", @@ -9559,7 +9754,7 @@ version = "4.0.0-dev" dependencies = [ "hash-db", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-api-proc-macro", "sp-core", "sp-runtime", @@ -9589,7 +9784,7 @@ dependencies = [ "criterion", "futures", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "rustversion", "sc-block-builder", "sp-api", @@ -9607,7 +9802,7 @@ dependencies = [ name = "sp-application-crypto" version = "6.0.0" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-core", @@ -9634,7 +9829,7 @@ dependencies = [ "criterion", "integer-sqrt", "num-traits", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "primitive-types", "rand 0.7.3", "scale-info", @@ -9659,7 +9854,7 @@ dependencies = [ name = "sp-authority-discovery" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-api", "sp-application-crypto", @@ -9672,7 +9867,7 @@ name = "sp-authorship" version = "4.0.0-dev" dependencies = [ "async-trait", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-inherents", "sp-runtime", "sp-std", @@ -9682,7 +9877,7 @@ dependencies = [ name = "sp-block-builder" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-api", "sp-inherents", "sp-runtime", @@ -9696,7 +9891,7 @@ dependencies = [ "futures", "log", "lru", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "sp-api", "sp-consensus", @@ -9714,7 +9909,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-core", "sp-inherents", "sp-runtime", @@ -9730,7 +9925,7 @@ name = "sp-consensus-aura" version = "0.10.0-dev" dependencies = [ "async-trait", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-api", "sp-application-crypto", @@ -9748,7 +9943,7 @@ version = "0.10.0-dev" dependencies = [ "async-trait", "merlin", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-api", @@ -9768,7 +9963,7 @@ dependencies = [ name = "sp-consensus-pow" version = "0.10.0-dev" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-api", "sp-core", "sp-runtime", @@ -9779,7 +9974,7 @@ dependencies = [ name = "sp-consensus-slots" version = "0.10.0-dev" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-arithmetic", @@ -9792,7 +9987,7 @@ dependencies = [ name = "sp-consensus-vrf" version = "0.10.0-dev" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "schnorrkel", "sp-core", @@ -9821,7 +10016,7 @@ dependencies = [ "log", "merlin", "num-traits", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parity-util-mem", "parking_lot 0.12.1", "primitive-types", @@ -9894,7 +10089,7 @@ name = "sp-externalities" version = "0.12.0" dependencies = [ "environmental", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-std", "sp-storage", ] @@ -9905,7 +10100,7 @@ version = "4.0.0-dev" dependencies = [ "finality-grandpa", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "sp-api", @@ -9923,7 +10118,7 @@ dependencies = [ "async-trait", "futures", "impl-trait-for-tuples", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-core", "sp-runtime", "sp-std", @@ -9934,12 +10129,12 @@ dependencies = [ name = "sp-io" version = "6.0.0" dependencies = [ - "bytes", + "bytes 1.1.0", "futures", "hash-db", "libsecp256k1", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "secp256k1", "sp-core", @@ -9972,7 +10167,7 @@ dependencies = [ "async-trait", "futures", "merlin", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "rand 0.7.3", "rand_chacha 0.2.2", @@ -9997,7 +10192,7 @@ version = "4.0.0-dev" dependencies = [ "array-bytes", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "serde", "sp-api", "sp-core", @@ -10010,7 +10205,7 @@ dependencies = [ name = "sp-npos-elections" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "rand 0.7.3", "scale-info", "serde", @@ -10027,7 +10222,7 @@ version = "2.0.0-alpha.5" dependencies = [ "clap 3.1.18", "honggfuzz", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "rand 0.8.5", "scale-info", "sp-npos-elections", @@ -10070,7 +10265,7 @@ dependencies = [ "hash256-std-hasher", "impl-trait-for-tuples", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parity-util-mem", "paste 1.0.6", "rand 0.7.3", @@ -10094,9 +10289,9 @@ dependencies = [ name = "sp-runtime-interface" version = "6.0.0" dependencies = [ - "bytes", + "bytes 1.1.0", "impl-trait-for-tuples", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "primitive-types", "rustversion", "sp-core", @@ -10144,7 +10339,7 @@ dependencies = [ name = "sp-runtime-interface-test-wasm" version = "2.0.0" dependencies = [ - "bytes", + "bytes 1.1.0", "sp-core", "sp-io", "sp-runtime-interface", @@ -10169,7 +10364,7 @@ version = "0.10.0-dev" dependencies = [ "assert_matches", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-core", "sp-io", "sp-std", @@ -10190,7 +10385,7 @@ dependencies = [ name = "sp-session" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-api", "sp-core", @@ -10203,7 +10398,7 @@ dependencies = [ name = "sp-staking" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-runtime", "sp-std", @@ -10218,7 +10413,7 @@ dependencies = [ "hash-db", "log", "num-traits", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "pretty_assertions", "rand 0.7.3", @@ -10244,7 +10439,7 @@ name = "sp-storage" version = "6.0.0" dependencies = [ "impl-serde", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "ref-cast", "serde", "sp-debug-derive", @@ -10256,7 +10451,7 @@ name = "sp-tasks" version = "4.0.0-dev" dependencies = [ "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-core", "sp-externalities", "sp-io", @@ -10268,7 +10463,7 @@ dependencies = [ name = "sp-test-primitives" version = "2.0.0" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parity-util-mem", "serde", "sp-application-crypto", @@ -10283,7 +10478,7 @@ dependencies = [ "async-trait", "futures-timer", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-api", "sp-inherents", "sp-runtime", @@ -10295,7 +10490,7 @@ dependencies = [ name = "sp-tracing" version = "5.0.0" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-std", "tracing", "tracing-core", @@ -10316,7 +10511,7 @@ version = "4.0.0-dev" dependencies = [ "async-trait", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "sp-core", "sp-inherents", @@ -10329,7 +10524,7 @@ dependencies = [ name = "sp-trie" version = "6.0.0" dependencies = [ - "ahash", + "ahash 0.7.6", "array-bytes", "criterion", "hash-db", @@ -10338,7 +10533,7 @@ dependencies = [ "lru", "memory-db", "nohash-hasher", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "scale-info", "sp-core", @@ -10357,7 +10552,7 @@ name = "sp-version" version = "5.0.0" dependencies = [ "impl-serde", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parity-wasm 0.45.0", "scale-info", "serde", @@ -10372,7 +10567,7 @@ dependencies = [ name = "sp-version-proc-macro" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.3", "proc-macro2", "quote", "sp-version", @@ -10385,7 +10580,7 @@ version = "6.0.0" dependencies = [ "impl-trait-for-tuples", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sp-std", "wasmi", "wasmtime", @@ -10396,7 +10591,7 @@ name = "sp-weights" version = "4.0.0" dependencies = [ "impl-trait-for-tuples", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "scale-info", "serde", "smallvec", @@ -10490,12 +10685,42 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "structopt" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" +dependencies = [ + "clap 2.34.0", + "lazy_static", + "structopt-derive", +] + +[[package]] +name = "structopt-derive" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" +dependencies = [ + "heck 0.3.3", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "strum" version = "0.24.1" @@ -10511,13 +10736,31 @@ version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4faebde00e8ff94316c01800f9054fd2ba77d30d9e922541913051d1d978918b" dependencies = [ - "heck", + "heck 0.4.0", "proc-macro2", "quote", "rustversion", "syn", ] +[[package]] +name = "sub-du" +version = "0.1.0" +dependencies = [ + "ansi_term", + "assert_cmd", + "async-std", + "env_logger", + "frame-metadata", + "jsonrpsee-http-client", + "jsonrpsee-types 0.1.0", + "jsonrpsee-ws-client 0.1.0", + "log", + "parity-scale-codec 2.3.1", + "separator", + "structopt", +] + [[package]] name = "subkey" version = "2.0.2" @@ -10566,7 +10809,7 @@ dependencies = [ "frame-system", "futures", "jsonrpsee", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-rpc-api", "scale-info", "serde", @@ -10585,7 +10828,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-client-api", "sc-rpc-api", "sc-transaction-pool", @@ -10619,7 +10862,7 @@ version = "4.0.0-dev" dependencies = [ "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-client-api", "sc-rpc-api", "scale-info", @@ -10641,7 +10884,7 @@ dependencies = [ "array-bytes", "async-trait", "futures", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-client-api", "sc-client-db", "sc-consensus", @@ -10674,7 +10917,7 @@ dependencies = [ "memory-db", "pallet-babe", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parity-util-mem", "sc-block-builder", "sc-executor", @@ -10712,7 +10955,7 @@ name = "substrate-test-runtime-client" version = "2.0.0" dependencies = [ "futures", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -10730,7 +10973,7 @@ name = "substrate-test-runtime-transaction-pool" version = "2.0.0" dependencies = [ "futures", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "parking_lot 0.12.1", "sc-transaction-pool", "sc-transaction-pool-api", @@ -11011,7 +11254,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee" dependencies = [ - "bytes", + "bytes 1.1.0", "libc", "memchr", "mio", @@ -11042,9 +11285,9 @@ version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b" dependencies = [ - "rustls", + "rustls 0.20.2", "tokio", - "webpki", + "webpki 0.22.0", ] [[package]] @@ -11065,7 +11308,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53474327ae5e166530d17f2d956afcb4f8a004de581b3cae10f12006bc8163e3" dependencies = [ "async-stream", - "bytes", + "bytes 1.1.0", "futures-core", "tokio", "tokio-stream", @@ -11077,7 +11320,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" dependencies = [ - "bytes", + "bytes 1.1.0", "futures-core", "futures-io", "futures-sink", @@ -11205,7 +11448,7 @@ dependencies = [ "hash-db", "keccak-hasher", "memory-db", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "trie-db", "trie-root", "trie-standardmap", @@ -11300,7 +11543,7 @@ dependencies = [ "frame-try-runtime", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.3", "remote-externalities", "sc-chain-spec", "sc-cli", @@ -11409,6 +11652,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-segmentation" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" + [[package]] name = "unicode-width" version = "0.1.8" @@ -11438,7 +11687,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" dependencies = [ "asynchronous-codec", - "bytes", + "bytes 1.1.0", "futures-io", "futures-util", ] @@ -11489,6 +11738,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eafc1b9b2dfc6f5529177b62cf806484db55b32dc7c9658a118e11bbeb33061d" +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + [[package]] name = "version_check" version = "0.9.2" @@ -11961,7 +12216,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f507f3fa1ee1b2f9a83644e2514242b1dfe580782c0eb042f1ef70255bc4ffe" dependencies = [ "anyhow", - "base64", + "base64 0.13.0", "bincode", "directories-next", "file-per-thread-logger", @@ -12115,6 +12370,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" @@ -12125,13 +12390,22 @@ dependencies = [ "untrusted", ] +[[package]] +name = "webpki-roots" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" +dependencies = [ + "webpki 0.21.4", +] + [[package]] name = "webpki-roots" version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "552ceb903e957524388c4d3475725ff2c8b7960922063af6ce53c9a43da07449" dependencies = [ - "webpki", + "webpki 0.22.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 018355df6c9fd..f45d75957f7e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -226,6 +226,7 @@ members = [ "utils/frame/benchmarking-cli", "utils/frame/remote-externalities", "utils/frame/frame-utilities-cli", + "utils/frame/sub-du", "utils/frame/try-runtime/cli", "utils/frame/rpc/state-trie-migration-rpc", "utils/frame/rpc/support", diff --git a/frame/election-provider-multi-phase/src/lib.rs b/frame/election-provider-multi-phase/src/lib.rs index 05353e5a3ac61..00f10b02003bc 100644 --- a/frame/election-provider-multi-phase/src/lib.rs +++ b/frame/election-provider-multi-phase/src/lib.rs @@ -2174,6 +2174,8 @@ mod tests { assert_eq!(MultiPhase::elect().unwrap_err(), ElectionError::Fallback("NoFallback.")); // phase is now emergency. assert_eq!(MultiPhase::current_phase(), Phase::Emergency); + // snapshot is still there until election finalizes. + assert!(MultiPhase::snapshot().is_some()); }) } @@ -2190,6 +2192,7 @@ mod tests { // phase is now emergency. assert_eq!(MultiPhase::current_phase(), Phase::Emergency); assert!(MultiPhase::queued_solution().is_none()); + assert!(MultiPhase::snapshot().is_some()); // no single account can trigger this assert_noop!( diff --git a/frame/staking/src/benchmarking.rs b/frame/staking/src/benchmarking.rs index c7e6936ac75d8..c2d0d1cae4b4a 100644 --- a/frame/staking/src/benchmarking.rs +++ b/frame/staking/src/benchmarking.rs @@ -791,12 +791,10 @@ benchmarks! { } get_npos_voters { - // number of validator intention. - let v in (MaxValidators::::get() / 2) .. MaxValidators::::get(); - // number of nominator intention. - let n in (MaxNominators::::get() / 2) .. MaxNominators::::get(); - // total number of slashing spans. Assigned to validators randomly. - let s in 1 .. 20; + // number of validator intention. we will iterate all of them. + let v in (MaxValidators::::get() / 4) .. MaxValidators::::get(); + // number of nominator intention. we will iterate all of them. + let n in (MaxNominators::::get() / 4) .. MaxNominators::::get(); let validators = create_validators_with_nominators_for_era::( v, n, T::MaxNominations::get() as usize, false, None @@ -805,9 +803,8 @@ benchmarks! { .map(|v| T::Lookup::lookup(v).unwrap()) .collect::>(); - (0..s).for_each(|index| { - add_slashing_spans::(&validators[index as usize], 10); - }); + assert_eq!(Validators::::count(), v); + assert_eq!(Nominators::::count(), n); let num_voters = (v + n) as usize; }: { diff --git a/frame/staking/src/pallet/impls.rs b/frame/staking/src/pallet/impls.rs index 6da27da362b53..3632e76934a5b 100644 --- a/frame/staking/src/pallet/impls.rs +++ b/frame/staking/src/pallet/impls.rs @@ -40,7 +40,7 @@ use sp_staking::{ offence::{DisableStrategy, OffenceDetails, OnOffenceHandler}, EraIndex, SessionIndex, StakingInterface, }; -use sp_std::{collections::btree_map::BTreeMap, prelude::*}; +use sp_std::prelude::*; use crate::{ log, slashing, weights::WeightInfo, ActiveEraInfo, BalanceOf, EraPayout, Exposure, ExposureOf, @@ -348,6 +348,7 @@ impl Pallet { } } + /// Start a new era. It does: /// /// * Increment `active_era.index`, /// * reset `active_era.start`, @@ -696,7 +697,6 @@ impl Pallet { // cache a few things. let weight_of = Self::weight_of_fn(); - let slashing_spans = >::iter().collect::>(); let mut voters_seen = 0u32; let mut validators_taken = 0u32; @@ -714,18 +714,12 @@ impl Pallet { None => break, }; - if let Some(Nominations { submitted_in, mut targets, suppressed: _ }) = - >::get(&voter) - { - // if this voter is a nominator: - targets.retain(|stash| { - slashing_spans - .get(stash) - .map_or(true, |spans| submitted_in >= spans.last_nonzero_slash()) - }); - if !targets.len().is_zero() { + if let Some(Nominations { targets, .. }) = >::get(&voter) { + if !targets.is_empty() { all_voters.push((voter.clone(), weight_of(&voter), targets)); nominators_taken.saturating_inc(); + } else { + // A nominator's nominations might become empty due to slashing. } } else if Validators::::contains_key(&voter) { // if this voter is a validator: @@ -748,7 +742,7 @@ impl Pallet { warn, "DEFENSIVE: invalid item in `VoterList`: {:?}, this nominator probably has too many nominations now", voter - ) + ); } } @@ -758,7 +752,7 @@ impl Pallet { Self::register_weight(T::WeightInfo::get_npos_voters( validators_taken, nominators_taken, - slashing_spans.len() as u32, + 0, )); log!( @@ -1262,6 +1256,12 @@ where disable_strategy, }); + Self::deposit_event(Event::::SlashReported { + validator: stash.clone(), + fraction: slash_fraction.clone(), + slash_era, + }); + if let Some(mut unapplied) = unapplied { let nominators_len = unapplied.others.len() as u64; let reporters_len = details.reporters.len() as u64; diff --git a/frame/staking/src/pallet/mod.rs b/frame/staking/src/pallet/mod.rs index 560c3b6ed830c..7bee0ef763d52 100644 --- a/frame/staking/src/pallet/mod.rs +++ b/frame/staking/src/pallet/mod.rs @@ -515,7 +515,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn slashing_spans)] #[pallet::unbounded] - pub(crate) type SlashingSpans = + pub type SlashingSpans = StorageMap<_, Twox64Concat, T::AccountId, slashing::SlashingSpans>; /// Records information about the maximum slash of a stash within a slashing span, @@ -545,6 +545,7 @@ pub mod pallet { /// `OffendingValidatorsThreshold` is reached. The vec is always kept sorted so that we can find /// whether a given validator has previously offended using binary search. It gets cleared when /// the era ends. + // TODO: invariant test for the above. #[pallet::storage] #[pallet::unbounded] #[pallet::getter(fn offending_validators)] @@ -665,8 +666,11 @@ pub mod pallet { EraPaid { era_index: EraIndex, validator_payout: BalanceOf, remainder: BalanceOf }, /// The nominator has been rewarded by this amount. Rewarded { stash: T::AccountId, amount: BalanceOf }, - /// One staker (and potentially its nominators) has been slashed by the given amount. + /// A staker (validator or nominator) has been slashed by the given amount. Slashed { staker: T::AccountId, amount: BalanceOf }, + /// A slash for the given validator, for the given percentage of their stake, at the given + /// era as been reporter + SlashReported { validator: T::AccountId, fraction: Perbill, slash_era: EraIndex }, /// An old slashing report from a prior era was discarded because it could /// not be processed. OldSlashingReportDiscarded { session_index: SessionIndex }, diff --git a/frame/staking/src/slashing.rs b/frame/staking/src/slashing.rs index a1900136d64fd..7c591409a7658 100644 --- a/frame/staking/src/slashing.rs +++ b/frame/staking/src/slashing.rs @@ -34,18 +34,17 @@ //! First, we only slash participants for the _maximum_ slash they receive in some time period, //! rather than the sum. This ensures a protection from overslashing. //! -//! Second, we do not want the time period (or "span") that the maximum is computed -//! over to last indefinitely. That would allow participants to begin acting with -//! impunity after some point, fearing no further repercussions. For that reason, we -//! automatically "chill" validators and withdraw a nominator's nomination after a slashing event, -//! requiring them to re-enlist voluntarily (acknowledging the slash) and begin a new -//! slashing span. +//! Second, we do not want the time period (or "span") that the maximum is computed over to last +//! indefinitely. That would allow participants to begin acting with impunity after some point, +//! fearing no further repercussions. For that reason, we automatically "chill" validators and +//! withdraw a nominator's nomination after a slashing event, requiring them to re-enlist +//! voluntarily (acknowledging the slash) and begin a new slashing span. //! -//! Typically, you will have a single slashing event per slashing span. Only in the case -//! where a validator releases many misbehaviors at once, or goes "back in time" to misbehave in -//! eras that have already passed, would you encounter situations where a slashing span -//! has multiple misbehaviors. However, accounting for such cases is necessary -//! to deter a class of "rage-quit" attacks. +//! Typically, you will have a single slashing event per slashing span. Only in the case where a +//! validator releases many misbehaviors at once, or goes "back in time" to misbehave in eras that +//! have already passed, would you encounter situations where a slashing span has multiple +//! misbehaviors. However, accounting for such cases is necessary to deter a class of "rage-quit" +//! attacks. //! //! Based on research at @@ -91,15 +90,15 @@ impl SlashingSpan { /// An encoding of all of a nominator's slashing spans. #[derive(Encode, Decode, RuntimeDebug, TypeInfo)] pub struct SlashingSpans { - // the index of the current slashing span of the nominator. different for - // every stash, resets when the account hits free balance 0. + // the index of the current slashing span of the nominator. different for every stash, resets + // when the account hits free balance 0. span_index: SpanIndex, // the start era of the most recent (ongoing) slashing span. last_start: EraIndex, // the last era at which a non-zero slash occurred. last_nonzero_slash: EraIndex, - // all prior slashing spans' start indices, in reverse order (most recent first) - // encoded as offsets relative to the slashing span after it. + // all prior slashing spans' start indices, in reverse order (most recent first) encoded as + // offsets relative to the slashing span after it. prior: Vec, } @@ -188,9 +187,9 @@ pub(crate) struct SpanRecord { paid_out: Balance, } +#[cfg(test)] impl SpanRecord { /// The value of stash balance slashed in this span. - #[cfg(test)] pub(crate) fn amount(&self) -> &Balance { &self.slashed } @@ -218,12 +217,12 @@ pub(crate) struct SlashParams<'a, T: 'a + Config> { pub(crate) disable_strategy: DisableStrategy, } -/// Computes a slash of a validator and nominators. It returns an unapplied -/// record to be applied at some later point. Slashing metadata is updated in storage, -/// since unapplied records are only rarely intended to be dropped. +/// Computes a slash of a validator and nominators. It returns an unapplied record to be applied at +/// some later point. Slashing metadata is updated in storage, since unapplied records are only +/// rarely intended to be dropped. /// -/// The pending slash record returned does not have initialized reporters. Those have -/// to be set at a higher level, if any. +/// The pending slash record returned does not have initialized reporters. Those have to be set at a +/// higher level, if any. pub(crate) fn compute_slash( params: SlashParams, ) -> Option>> { @@ -233,15 +232,15 @@ pub(crate) fn compute_slash( // is the slash amount here a maximum for the era? let own_slash = params.slash * params.exposure.own; if params.slash * params.exposure.total == Zero::zero() { - // kick out the validator even if they won't be slashed, - // as long as the misbehavior is from their most recent slashing span. + // kick out the validator even if they won't be slashed, as long as the misbehavior is from + // their most recent slashing span. kick_out_if_recent::(params); return None } - let (prior_slash_p, _era_slash) = + let prior_slash_p = as Store>::ValidatorSlashInEra::get(¶ms.slash_era, params.stash) - .unwrap_or((Perbill::zero(), Zero::zero())); + .map_or(Zero::zero(), |(p, _)| p); // compare slash proportions rather than slash values to avoid issues due to rounding // error. @@ -252,13 +251,12 @@ pub(crate) fn compute_slash( &(params.slash, own_slash), ); } else { - // we slash based on the max in era - this new event is not the max, - // so neither the validator or any nominators will need an update. + // we slash based on the max in era - this new event is not the max, so neither the + // validator or any nominators will need an update. // - // this does lead to a divergence of our system from the paper, which - // pays out some reward even if the latest report is not max-in-era. - // we opt to avoid the nominator lookups and edits and leave more rewards - // for more drastic misbehavior. + // this does lead to a divergence of our system from the paper, which pays out some reward + // even if the latest report is not max-in-era. we opt to avoid the nominator lookups and + // edits and leave more rewards for more drastic misbehavior. return None } @@ -272,9 +270,9 @@ pub(crate) fn compute_slash( params.reward_proportion, ); - let target_span = spans.compare_and_update_span_slash(params.slash_era, own_slash); + let maybe_target_span = spans.compare_and_update_span_slash(params.slash_era, own_slash); - if target_span == Some(spans.span_index()) { + if maybe_target_span == Some(spans.span_index()) { // misbehavior occurred within the current slashing span - take appropriate // actions. @@ -323,9 +321,8 @@ fn kick_out_if_recent(params: SlashParams) { add_offending_validator::(params.stash, disable_without_slash); } -/// Add the given validator to the offenders list and optionally disable it. -/// If after adding the validator `OffendingValidatorsThreshold` is reached -/// a new era will be forced. +/// Add the given validator to the offenders list and optionally disable it. If after adding the +/// validator `OffendingValidatorsThreshold` is reached a new era will be forced. fn add_offending_validator(stash: &T::AccountId, disable: bool) { as Store>::OffendingValidators::mutate(|offending| { let validators = T::SessionInterface::validators(); @@ -390,9 +387,7 @@ fn slash_nominators( let mut era_slash = as Store>::NominatorSlashInEra::get(¶ms.slash_era, stash) .unwrap_or_else(Zero::zero); - era_slash += own_slash_difference; - as Store>::NominatorSlashInEra::insert(¶ms.slash_era, stash, &era_slash); era_slash @@ -408,28 +403,37 @@ fn slash_nominators( params.reward_proportion, ); - let target_span = spans.compare_and_update_span_slash(params.slash_era, era_slash); + let maybe_target_span = + spans.compare_and_update_span_slash(params.slash_era, era_slash); - if target_span == Some(spans.span_index()) { - // End the span, but don't chill the nominator. its nomination - // on this validator will be ignored in the future. + if maybe_target_span == Some(spans.span_index()) { + // end the span, but don't chill the nominator. spans.end_span(params.now); } } + // in any case, remove the nomination. + as Store>::Nominators::mutate( + &nominator.who, + |maybe_nomination: &mut Option>| { + if let Some(nomination) = maybe_nomination.as_mut() { + nomination.targets.retain(|t| t != params.stash) + } + }, + ); + nominators_slashed.push((stash.clone(), nom_slashed)); } reward_payout } -// helper struct for managing a set of spans we are currently inspecting. -// writes alterations to disk on drop, but only if a slash has been carried out. +// helper struct for managing a set of spans we are currently inspecting. writes alterations to disk +// on drop, but only if a slash has been carried out. // -// NOTE: alterations to slashing metadata should not be done after this is dropped. -// dropping this struct applies any necessary slashes, which can lead to free balance -// being 0, and the account being garbage-collected -- a dead account should get no new -// metadata. +// NOTE: alterations to slashing metadata should not be done after this is dropped. dropping this +// struct applies any necessary slashes, which can lead to free balance being 0, and the account +// being garbage-collected -- a dead account should get no new metadata. struct InspectingSpans<'a, T: Config + 'a> { dirty: bool, window_start: EraIndex, @@ -477,8 +481,9 @@ impl<'a, T: 'a + Config> InspectingSpans<'a, T> { } // add some value to the slash of the staker. - // invariant: the staker is being slashed for non-zero value here - // although `amount` may be zero, as it is only a difference. + // + // invariant: the staker is being slashed for non-zero value here although `amount` may be zero, + // as it is only a difference. fn add_slash(&mut self, amount: BalanceOf, slash_era: EraIndex) { *self.slash_of += amount; self.spans.last_nonzero_slash = sp_std::cmp::max(self.spans.last_nonzero_slash, slash_era); @@ -489,8 +494,8 @@ impl<'a, T: 'a + Config> InspectingSpans<'a, T> { self.spans.iter().find(|span| span.contains_era(era)) } - // compares the slash in an era to the overall current span slash. - // if it's higher, applies the difference of the slashes and then updates the span on disk. + // compares the slash in an era to the overall current span slash. If it's higher, applies the + // difference of the slashes and then updates the span on disk. // // returns the span index of the era where the slash occurred, if any. fn compare_and_update_span_slash( @@ -582,9 +587,9 @@ pub(crate) fn clear_stash_metadata( // kill slashing-span metadata for account. // - // this can only happen while the account is staked _if_ they are completely slashed. - // in that case, they may re-bond, but it would count again as span 0. Further ancient - // slashes would slash into this new bond, since metadata has now been cleared. + // this can only happen while the account is staked _if_ they are completely slashed. in that + // case, they may re-bond, but it would count again as span 0. Further ancient slashes would + // slash into this new bond, since wmetadata has now been cleared. for span in spans.iter() { as Store>::SpanSlash::remove(&(stash.clone(), span.index)); } @@ -592,9 +597,9 @@ pub(crate) fn clear_stash_metadata( Ok(()) } -// apply the slash to a stash account, deducting any missing funds from the reward -// payout, saturating at 0. this is mildly unfair but also an edge-case that -// can only occur when overlapping locked funds have been slashed. +// apply the slash to a stash account, deducting any missing funds from the reward payout, +// saturating at 0. this is mildly unfair but also an edge-case that can only occur when overlapping +// locked funds have been slashed. pub fn do_slash( stash: &T::AccountId, value: BalanceOf, diff --git a/frame/staking/src/tests.rs b/frame/staking/src/tests.rs index 4812c105c0d80..881a1eab1b93f 100644 --- a/frame/staking/src/tests.rs +++ b/frame/staking/src/tests.rs @@ -2845,6 +2845,8 @@ fn deferred_slashes_are_deferred() { assert_eq!(Balances::free_balance(101), 2000); let nominated_value = exposure.others.iter().find(|o| o.who == 101).unwrap().value; + System::reset_events(); + on_offence_now( &[OffenceDetails { offender: (11, Staking::eras_stakers(active_era(), 11)), @@ -2853,6 +2855,9 @@ fn deferred_slashes_are_deferred() { &[Perbill::from_percent(10)], ); + // nominations are removed regardless of the deferring. + assert_eq!(Staking::nominators(101).unwrap().targets, vec![21]); + assert_eq!(Balances::free_balance(11), 1000); assert_eq!(Balances::free_balance(101), 2000); @@ -2866,8 +2871,6 @@ fn deferred_slashes_are_deferred() { assert_eq!(Balances::free_balance(11), 1000); assert_eq!(Balances::free_balance(101), 2000); - System::reset_events(); - // at the start of era 4, slashes from era 1 are processed, // after being deferred for at least 2 full eras. mock::start_active_era(4); @@ -2875,15 +2878,16 @@ fn deferred_slashes_are_deferred() { assert_eq!(Balances::free_balance(11), 900); assert_eq!(Balances::free_balance(101), 2000 - (nominated_value / 10)); - assert_eq!( - staking_events_since_last_call(), - vec![ - Event::StakersElected, - Event::EraPaid { era_index: 3, validator_payout: 11075, remainder: 33225 }, + assert!(matches!( + staking_events_since_last_call().as_slice(), + &[ + Event::Chilled { stash: 11 }, + Event::SlashReported { validator: 11, slash_era: 1, .. }, + .., Event::Slashed { staker: 11, amount: 100 }, Event::Slashed { staker: 101, amount: 12 } ] - ); + )); }) } @@ -2896,25 +2900,30 @@ fn retroactive_deferred_slashes_two_eras_before() { let exposure_11_at_era1 = Staking::eras_stakers(active_era(), 11); mock::start_active_era(3); + + assert_eq!(Staking::nominators(101).unwrap().targets, vec![11, 21]); + + System::reset_events(); on_offence_in_era( &[OffenceDetails { offender: (11, exposure_11_at_era1), reporters: vec![] }], &[Perbill::from_percent(10)], 1, // should be deferred for two full eras, and applied at the beginning of era 4. DisableStrategy::Never, ); - System::reset_events(); + assert_eq!(Staking::nominators(101).unwrap().targets, vec![21]); mock::start_active_era(4); - assert_eq!( - staking_events_since_last_call(), - vec![ - Event::StakersElected, - Event::EraPaid { era_index: 3, validator_payout: 7100, remainder: 21300 }, + assert!(matches!( + staking_events_since_last_call().as_slice(), + &[ + Event::Chilled { stash: 11 }, + Event::SlashReported { validator: 11, slash_era: 1, .. }, + .., Event::Slashed { staker: 11, amount: 100 }, - Event::Slashed { staker: 101, amount: 12 }, + Event::Slashed { staker: 101, amount: 12 } ] - ); + )); }) } @@ -2932,35 +2941,29 @@ fn retroactive_deferred_slashes_one_before() { assert_ok!(Staking::unbond(RuntimeOrigin::signed(10), 100)); mock::start_active_era(3); + System::reset_events(); on_offence_in_era( &[OffenceDetails { offender: (11, exposure_11_at_era1), reporters: vec![] }], &[Perbill::from_percent(10)], 2, // should be deferred for two full eras, and applied at the beginning of era 5. DisableStrategy::Never, ); - System::reset_events(); mock::start_active_era(4); - assert_eq!( - staking_events_since_last_call(), - vec![ - Event::StakersElected, - Event::EraPaid { era_index: 3, validator_payout: 11075, remainder: 33225 } - ] - ); assert_eq!(Staking::ledger(10).unwrap().total, 1000); // slash happens after the next line. + mock::start_active_era(5); - assert_eq!( - staking_events_since_last_call(), - vec![ - Event::StakersElected, - Event::EraPaid { era_index: 4, validator_payout: 11075, remainder: 33225 }, + assert!(matches!( + staking_events_since_last_call().as_slice(), + &[ + Event::SlashReported { validator: 11, slash_era: 2, .. }, + .., Event::Slashed { staker: 11, amount: 100 }, Event::Slashed { staker: 101, amount: 12 } ] - ); + )); // their ledger has already been slashed. assert_eq!(Staking::ledger(10).unwrap().total, 900); @@ -3068,6 +3071,7 @@ fn remove_deferred() { mock::start_active_era(2); // reported later, but deferred to start of era 4 as well. + System::reset_events(); on_offence_in_era( &[OffenceDetails { offender: (11, exposure.clone()), reporters: vec![] }], &[Perbill::from_percent(15)], @@ -3094,19 +3098,18 @@ fn remove_deferred() { // at the start of era 4, slashes from era 1 are processed, // after being deferred for at least 2 full eras. - System::reset_events(); mock::start_active_era(4); - // the first slash for 10% was cancelled, but the 15% one - assert_eq!( - staking_events_since_last_call(), - vec![ - Event::StakersElected, - Event::EraPaid { era_index: 3, validator_payout: 11075, remainder: 33225 }, + // the first slash for 10% was cancelled, but the 15% one not. + assert!(matches!( + staking_events_since_last_call().as_slice(), + &[ + Event::SlashReported { validator: 11, slash_era: 1, .. }, + .., Event::Slashed { staker: 11, amount: 50 }, Event::Slashed { staker: 101, amount: 7 } ] - ); + )); let slash_10 = Perbill::from_percent(10); let slash_15 = Perbill::from_percent(15); @@ -3196,6 +3199,9 @@ fn slash_kicks_validators_not_nominators_and_disables_nominator_for_kicked_valid assert_eq!(Balances::free_balance(11), 1000); assert_eq!(Balances::free_balance(101), 2000); + // 100 has approval for 11 as of now + assert!(Staking::nominators(101).unwrap().targets.contains(&11)); + // 11 and 21 both have the support of 100 let exposure_11 = Staking::eras_stakers(active_era(), &11); let exposure_21 = Staking::eras_stakers(active_era(), &21); @@ -3213,18 +3219,11 @@ fn slash_kicks_validators_not_nominators_and_disables_nominator_for_kicked_valid assert_eq!(Balances::free_balance(11), 900); assert_eq!(Balances::free_balance(101), 2000 - nominator_slash_amount_11); - // This is the best way to check that the validator was chilled; `get` will - // return default value. - for (stash, _) in ::Validators::iter() { - assert!(stash != 11); - } + // check that validator was chilled. + assert!(::Validators::iter().all(|(stash, _)| stash != 11)); - let nominations = ::Nominators::get(&101).unwrap(); - - // and make sure that the vote will be ignored even if the validator - // re-registers. - let last_slash = ::SlashingSpans::get(&11).unwrap().last_nonzero_slash(); - assert!(nominations.submitted_in < last_slash); + // and make sure the nominator's approval vote is dropped. + assert!(!Staking::nominators(101).unwrap().targets.contains(&11)); // actually re-bond the slashed validator assert_ok!(Staking::validate(RuntimeOrigin::signed(10), Default::default())); @@ -3256,12 +3255,18 @@ fn non_slashable_offence_doesnt_disable_validator() { &[Perbill::zero()], ); + // it does NOT affect the nominator. + assert_eq!(Staking::nominators(101).unwrap().targets, vec![11, 21]); + // offence that slashes 25% of the bond on_offence_now( &[OffenceDetails { offender: (21, exposure_21.clone()), reporters: vec![] }], &[Perbill::from_percent(25)], ); + // it DOES affect the nominator. + assert_eq!(Staking::nominators(101).unwrap().targets, vec![11]); + // the offence for validator 10 wasn't slashable so it wasn't disabled assert!(!is_disabled(10)); // whereas validator 20 gets disabled @@ -3288,6 +3293,9 @@ fn slashing_independent_of_disabling_validator() { DisableStrategy::Always, ); + // it still does NOT affect the nominator. + assert_eq!(Staking::nominators(101).unwrap().targets, vec![11, 21]); + // offence that slashes 25% of the bond, BUT not disabling on_offence_in_era( &[OffenceDetails { offender: (21, exposure_21.clone()), reporters: vec![] }], @@ -3296,6 +3304,9 @@ fn slashing_independent_of_disabling_validator() { DisableStrategy::Never, ); + // it still DOES affect the nominator. + assert_eq!(Staking::nominators(101).unwrap().targets, vec![11]); + // the offence for validator 10 was explicitly disabled assert!(is_disabled(10)); // whereas validator 20 is explicitly not disabled @@ -3370,6 +3381,9 @@ fn disabled_validators_are_kept_disabled_for_whole_era() { &[Perbill::from_percent(25)], ); + // nominations are updated. + assert_eq!(Staking::nominators(101).unwrap().targets, vec![11]); + // validator 10 should not be disabled since the offence wasn't slashable assert!(!is_disabled(10)); // validator 20 gets disabled since it got slashed @@ -3387,6 +3401,9 @@ fn disabled_validators_are_kept_disabled_for_whole_era() { &[Perbill::from_percent(25)], ); + // nominations are updated. + assert_eq!(Staking::nominators(101).unwrap().targets, vec![]); + advance_session(); // and both are disabled in the last session of the era @@ -3503,18 +3520,10 @@ fn zero_slash_keeps_nominators() { assert_eq!(Balances::free_balance(11), 1000); assert_eq!(Balances::free_balance(101), 2000); - // This is the best way to check that the validator was chilled; `get` will - // return default value. - for (stash, _) in ::Validators::iter() { - assert!(stash != 11); - } - - let nominations = ::Nominators::get(&101).unwrap(); - - // and make sure that the vote will not be ignored, because the slash was - // zero. - let last_slash = ::SlashingSpans::get(&11).unwrap().last_nonzero_slash(); - assert!(nominations.submitted_in >= last_slash); + // 11 is still removed.. + assert!(::Validators::iter().all(|(stash, _)| stash != 11)); + // but their nominations are kept. + assert_eq!(Staking::nominators(101).unwrap().targets, vec![11, 21]); }); } diff --git a/utils/frame/remote-externalities/src/lib.rs b/utils/frame/remote-externalities/src/lib.rs index 83481e745f5ee..7c1a8e7f31028 100644 --- a/utils/frame/remote-externalities/src/lib.rs +++ b/utils/frame/remote-externalities/src/lib.rs @@ -297,7 +297,7 @@ impl Builder { key: StorageKey, maybe_at: Option, ) -> Result { - trace!(target: LOG_TARGET, "rpc: get_storage"); + trace!(target: LOG_TARGET, "rpc: get_storage {:?} {:?}", key, maybe_at); self.as_online().rpc_client().get_storage(key, maybe_at).await.map_err(|e| { error!(target: LOG_TARGET, "Error = {:?}", e); "rpc get_storage failed." @@ -765,6 +765,8 @@ impl Builder { /// Inject a hashed prefix. This is treated as-is, and should be pre-hashed. /// + /// Only relevant is `Mode::Online` is being used. Noop otherwise. + /// /// This should be used to inject a "PREFIX", like a storage (double) map. pub fn inject_hashed_prefix(mut self, hashed: &[u8]) -> Self { self.hashed_prefixes.push(hashed.to_vec()); @@ -774,6 +776,8 @@ impl Builder { /// Just a utility wrapper of [`Self::inject_hashed_prefix`] that injects /// [`DEFAULT_CHILD_STORAGE_KEY_PREFIX`] as a prefix. /// + /// Only relevant is `Mode::Online` is being used. Noop otherwise. + /// /// If set, this will guarantee that the child-tree data of ALL pallets will be downloaded. /// /// This is not needed if the entire state is being downloaded. @@ -789,6 +793,8 @@ impl Builder { /// Inject a hashed key to scrape. This is treated as-is, and should be pre-hashed. /// + /// Only relevant is `Mode::Online` is being used. Noop otherwise. + /// /// This should be used to inject a "KEY", like a storage value. pub fn inject_hashed_key(mut self, hashed: &[u8]) -> Self { self.hashed_keys.push(hashed.to_vec()); @@ -934,7 +940,6 @@ mod tests { #[cfg(all(test, feature = "remote-test"))] mod remote_tests { use super::test_prelude::*; - const REMOTE_INACCESSIBLE: &'static str = "Can't reach the remote node. Is it running?"; #[tokio::test] async fn offline_else_online_works() { @@ -953,7 +958,7 @@ mod remote_tests { )) .build() .await - .expect(REMOTE_INACCESSIBLE) + .unwrap() .execute_with(|| {}); // this shows that in the second run, we are not using the remote @@ -971,7 +976,7 @@ mod remote_tests { )) .build() .await - .expect(REMOTE_INACCESSIBLE) + .unwrap() .execute_with(|| {}); let to_delete = std::fs::read_dir(Path::new(".")) @@ -1001,7 +1006,7 @@ mod remote_tests { })) .build() .await - .expect(REMOTE_INACCESSIBLE) + .unwrap() .execute_with(|| {}); } @@ -1016,7 +1021,7 @@ mod remote_tests { })) .build() .await - .expect(REMOTE_INACCESSIBLE) + .unwrap() .execute_with(|| {}); Builder::::new() @@ -1027,7 +1032,7 @@ mod remote_tests { })) .build() .await - .expect(REMOTE_INACCESSIBLE) + .unwrap() .execute_with(|| {}); } @@ -1042,7 +1047,7 @@ mod remote_tests { })) .build() .await - .expect(REMOTE_INACCESSIBLE) + .unwrap() .execute_with(|| {}); Builder::::new() @@ -1053,7 +1058,7 @@ mod remote_tests { })) .build() .await - .expect(REMOTE_INACCESSIBLE) + .unwrap() .execute_with(|| {}); } @@ -1068,7 +1073,7 @@ mod remote_tests { })) .build() .await - .expect(REMOTE_INACCESSIBLE) + .unwrap() .execute_with(|| {}); let to_delete = std::fs::read_dir(Path::new(".")) @@ -1109,7 +1114,7 @@ mod remote_tests { .inject_default_child_tree_prefix() .build() .await - .expect(REMOTE_INACCESSIBLE) + .unwrap() .execute_with(|| {}); let to_delete = std::fs::read_dir(Path::new(".")) @@ -1147,7 +1152,7 @@ mod remote_tests { })) .build() .await - .expect(REMOTE_INACCESSIBLE) + .unwrap() .execute_with(|| {}); let to_delete = std::fs::read_dir(Path::new(".")) @@ -1186,7 +1191,7 @@ mod remote_tests { })) .build() .await - .expect(REMOTE_INACCESSIBLE) + .unwrap() .execute_with(|| {}); } } From 6ba277b7f24af8f7877507036644c4719134dacd Mon Sep 17 00:00:00 2001 From: kianenigma Date: Tue, 4 Oct 2022 14:52:03 +0100 Subject: [PATCH 02/16] update cargo.toml --- Cargo.lock | 792 ++++++++++++++++++----------------------------------- Cargo.toml | 1 - 2 files changed, 259 insertions(+), 534 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 69b8e312d0722..71f2e8ff48a56 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,12 +62,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ahash" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" - [[package]] name = "ahash" version = "0.7.6" @@ -353,19 +347,6 @@ version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" -[[package]] -name = "async-tls" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f23d769dbf1838d5df5156e7b1ad404f4c463d1ac2c6aeb6cd943630f8a8400" -dependencies = [ - "futures-core", - "futures-io", - "rustls 0.19.1", - "webpki 0.21.4", - "webpki-roots 0.21.1", -] - [[package]] name = "async-trait" version = "0.1.57" @@ -383,7 +364,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-sink", "futures-util", "memchr", @@ -446,12 +427,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - [[package]] name = "base64" version = "0.13.0" @@ -484,7 +459,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "sc-block-builder", "sc-chain-spec", @@ -528,7 +503,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "sc-rpc", "sc-utils", @@ -558,7 +533,7 @@ name = "beefy-primitives" version = "4.0.0-dev" dependencies = [ "array-bytes", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", @@ -807,12 +782,6 @@ version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - [[package]] name = "bytes" version = "1.1.0" @@ -1021,13 +990,9 @@ version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ - "ansi_term", - "atty", "bitflags", - "strsim 0.8.0", "textwrap 0.11.0", "unicode-width", - "vec_map", ] [[package]] @@ -1042,7 +1007,7 @@ dependencies = [ "clap_lex", "indexmap", "lazy_static", - "strsim 0.10.0", + "strsim", "termcolor", "textwrap 0.15.0", ] @@ -1062,7 +1027,7 @@ version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" dependencies = [ - "heck 0.4.0", + "heck", "proc-macro-error", "proc-macro2", "quote", @@ -1586,7 +1551,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", + "strsim", "syn", ] @@ -1895,7 +1860,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73" dependencies = [ - "heck 0.4.0", + "heck", "proc-macro2", "quote", "syn", @@ -2090,7 +2055,7 @@ dependencies = [ "futures-timer", "log", "num-traits", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "rand 0.8.5", "scale-info", @@ -2137,7 +2102,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" name = "fork-tree" version = "3.0.0" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", ] [[package]] @@ -2159,7 +2124,7 @@ dependencies = [ "frame-system", "linregress", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "paste 1.0.6", "rusty-fork", "scale-info", @@ -2196,7 +2161,7 @@ dependencies = [ "linked-hash-map", "log", "memory-db", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "rand 0.8.5", "rand_pcg 0.3.1", "sc-block-builder", @@ -2231,7 +2196,7 @@ version = "4.0.0-dev" dependencies = [ "frame-election-provider-support", "frame-support", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "proc-macro-crate", "proc-macro2", "quote", @@ -2248,7 +2213,7 @@ dependencies = [ "frame-election-provider-solution-type", "frame-support", "frame-system", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "rand 0.7.3", "scale-info", "sp-arithmetic", @@ -2268,7 +2233,7 @@ dependencies = [ "frame-election-provider-support", "frame-support", "honggfuzz", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "rand 0.8.5", "scale-info", "sp-arithmetic", @@ -2286,7 +2251,7 @@ dependencies = [ "frame-try-runtime", "pallet-balances", "pallet-transaction-payment", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-inherents", @@ -2304,7 +2269,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" dependencies = [ "cfg-if 1.0.0", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", ] @@ -2322,7 +2287,7 @@ dependencies = [ "k256", "log", "once_cell", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parity-util-mem", "paste 1.0.6", "pretty_assertions", @@ -2385,7 +2350,7 @@ dependencies = [ "frame-support", "frame-support-test-pallet", "frame-system", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "pretty_assertions", "rustversion", "scale-info", @@ -2406,7 +2371,7 @@ version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-runtime", @@ -2419,7 +2384,7 @@ version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", ] @@ -2430,7 +2395,7 @@ dependencies = [ "criterion", "frame-support", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-core", @@ -2450,7 +2415,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -2462,7 +2427,7 @@ dependencies = [ name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-api", ] @@ -2471,7 +2436,7 @@ name = "frame-try-runtime" version = "0.10.0-dev" dependencies = [ "frame-support", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-api", "sp-runtime", "sp-std", @@ -2593,8 +2558,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01fe9932a224b72b45336d96040aa86386d674a31d0af27d800ea7bc8ca97fe" dependencies = [ "futures-io", - "rustls 0.20.2", - "webpki 0.22.0", + "rustls", + "webpki", ] [[package]] @@ -2809,7 +2774,7 @@ version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" dependencies = [ - "bytes 1.1.0", + "bytes", "fnv", "futures-core", "futures-sink", @@ -2857,22 +2822,13 @@ dependencies = [ "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" -dependencies = [ - "ahash 0.4.7", -] - [[package]] name = "hashbrown" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash 0.7.6", + "ahash", ] [[package]] @@ -2881,16 +2837,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", -] - -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", + "ahash", ] [[package]] @@ -2914,12 +2861,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hex-literal" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" - [[package]] name = "hex_fmt" version = "0.3.0" @@ -2985,7 +2926,7 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ - "bytes 1.1.0", + "bytes", "fnv", "itoa 1.0.1", ] @@ -2996,7 +2937,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60daa14be0e0786db0f03a9e57cb404c9d756eed2b6c62b9ea98ec5743ec75a9" dependencies = [ - "bytes 1.1.0", + "bytes", "http", "pin-project-lite 0.2.6", ] @@ -3025,7 +2966,7 @@ version = "0.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -3052,7 +2993,7 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.20.2", + "rustls", "rustls-native-certs", "tokio", "tokio-rustls", @@ -3109,7 +3050,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", ] [[package]] @@ -3239,8 +3180,8 @@ dependencies = [ "jsonrpsee-core", "jsonrpsee-http-server", "jsonrpsee-proc-macros", - "jsonrpsee-types 0.15.1", - "jsonrpsee-ws-client 0.15.1", + "jsonrpsee-types", + "jsonrpsee-ws-client", "jsonrpsee-ws-server", "tracing", ] @@ -3254,16 +3195,16 @@ dependencies = [ "futures-util", "http", "jsonrpsee-core", - "jsonrpsee-types 0.15.1", + "jsonrpsee-types", "pin-project", "rustls-native-certs", - "soketto 0.7.1", + "soketto", "thiserror", "tokio", "tokio-rustls", "tokio-util", "tracing", - "webpki-roots 0.22.2", + "webpki-roots", ] [[package]] @@ -3283,14 +3224,14 @@ dependencies = [ "globset", "http", "hyper", - "jsonrpsee-types 0.15.1", + "jsonrpsee-types", "lazy_static", "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", "serde", "serde_json", - "soketto 0.7.1", + "soketto", "thiserror", "tokio", "tracing", @@ -3298,23 +3239,6 @@ dependencies = [ "unicase", ] -[[package]] -name = "jsonrpsee-http-client" -version = "0.1.0" -source = "git+https://github.com/paritytech/jsonrpsee?rev=4025c0f67298ab7216214feac4e2c29ca9b24710#4025c0f67298ab7216214feac4e2c29ca9b24710" -dependencies = [ - "futures", - "hyper", - "jsonrpsee-types 0.1.0", - "jsonrpsee-utils", - "log", - "serde", - "serde_json", - "thiserror", - "unicase", - "url", -] - [[package]] name = "jsonrpsee-http-server" version = "0.15.1" @@ -3325,7 +3249,7 @@ dependencies = [ "futures-util", "hyper", "jsonrpsee-core", - "jsonrpsee-types 0.15.1", + "jsonrpsee-types", "serde", "serde_json", "tokio", @@ -3345,20 +3269,6 @@ dependencies = [ "syn", ] -[[package]] -name = "jsonrpsee-types" -version = "0.1.0" -source = "git+https://github.com/paritytech/jsonrpsee?rev=4025c0f67298ab7216214feac4e2c29ca9b24710#4025c0f67298ab7216214feac4e2c29ca9b24710" -dependencies = [ - "fnv", - "futures", - "hashbrown 0.9.1", - "serde", - "serde_json", - "smallvec", - "thiserror", -] - [[package]] name = "jsonrpsee-types" version = "0.15.1" @@ -3373,40 +3283,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "jsonrpsee-utils" -version = "0.1.0" -source = "git+https://github.com/paritytech/jsonrpsee?rev=4025c0f67298ab7216214feac4e2c29ca9b24710#4025c0f67298ab7216214feac4e2c29ca9b24710" -dependencies = [ - "futures", - "globset", - "hyper", - "jsonrpsee-types 0.1.0", - "lazy_static", - "log", - "unicase", -] - -[[package]] -name = "jsonrpsee-ws-client" -version = "0.1.0" -source = "git+https://github.com/paritytech/jsonrpsee?rev=4025c0f67298ab7216214feac4e2c29ca9b24710#4025c0f67298ab7216214feac4e2c29ca9b24710" -dependencies = [ - "async-std", - "async-tls", - "fnv", - "futures", - "jsonrpsee-types 0.1.0", - "log", - "pin-project", - "serde", - "serde_json", - "soketto 0.4.2", - "thiserror", - "url", - "webpki 0.21.4", -] - [[package]] name = "jsonrpsee-ws-client" version = "0.15.1" @@ -3416,7 +3292,7 @@ dependencies = [ "http", "jsonrpsee-client-transport", "jsonrpsee-core", - "jsonrpsee-types 0.15.1", + "jsonrpsee-types", ] [[package]] @@ -3429,9 +3305,9 @@ dependencies = [ "futures-util", "http", "jsonrpsee-core", - "jsonrpsee-types 0.15.1", + "jsonrpsee-types", "serde_json", - "soketto 0.7.1", + "soketto", "tokio", "tokio-stream", "tokio-util", @@ -3541,7 +3417,7 @@ dependencies = [ "pallet-utility", "pallet-vesting", "pallet-whitelist", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-api", "sp-authority-discovery", @@ -3678,7 +3554,7 @@ version = "0.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81327106887e42d004fbdab1fef93675be2e2e07c1b95fce45e2cc813485611d" dependencies = [ - "bytes 1.1.0", + "bytes", "futures", "futures-timer", "getrandom 0.2.3", @@ -3821,9 +3697,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74b4b888cfbeb1f5551acd3aa1366e01bf88ede26cc3c4645d0d2d004d5ca7b0" dependencies = [ "asynchronous-codec", - "base64 0.13.0", + "base64", "byteorder", - "bytes 1.1.0", + "bytes", "fnv", "futures", "hex_fmt", @@ -3871,7 +3747,7 @@ checksum = "740862893bb5f06ac24acc9d49bdeadc3a5e52e51818a30a25c1f3519da2c851" dependencies = [ "arrayvec 0.7.2", "asynchronous-codec", - "bytes 1.1.0", + "bytes", "either", "fnv", "futures", @@ -3935,7 +3811,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61fd1b20638ec209c5075dfb2e8ce6a7ea4ec3cd3ad7b77f7a477c06d53322e2" dependencies = [ "asynchronous-codec", - "bytes 1.1.0", + "bytes", "futures", "libp2p-core", "log", @@ -3952,7 +3828,7 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "762408cb5d84b49a600422d7f9a42c18012d8da6ebcd570f9a4a4290ba41fb6f" dependencies = [ - "bytes 1.1.0", + "bytes", "curve25519-dalek 3.0.2", "futures", "lazy_static", @@ -3991,7 +3867,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be27bf0820a6238a4e06365b096d428271cce85a129cf16f2fe9eb1610c4df86" dependencies = [ "asynchronous-codec", - "bytes 1.1.0", + "bytes", "futures", "libp2p-core", "log", @@ -4022,7 +3898,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4931547ee0cce03971ccc1733ff05bb0c4349fd89120a39e9861e2bbe18843c3" dependencies = [ "asynchronous-codec", - "bytes 1.1.0", + "bytes", "either", "futures", "futures-timer", @@ -4071,7 +3947,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "508a189e2795d892c8f5c1fa1e9e0b1845d32d7b0b249dbf7b05b18811361843" dependencies = [ "async-trait", - "bytes 1.1.0", + "bytes", "futures", "instant", "libp2p-core", @@ -4169,9 +4045,9 @@ dependencies = [ "parking_lot 0.12.1", "quicksink", "rw-stream-sink", - "soketto 0.7.1", + "soketto", "url", - "webpki-roots 0.22.2", + "webpki-roots", ] [[package]] @@ -4209,7 +4085,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0452aac8bab02242429380e9b2f94ea20cea2b37e2c1777a1358799bbe97f37" dependencies = [ "arrayref", - "base64 0.13.0", + "base64", "digest 0.9.0", "hmac-drbg", "libsecp256k1-core", @@ -4621,7 +4497,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "363a84be6453a70e63513660f4894ef815daf88e3356bffcda9ca27d810ce83b" dependencies = [ - "bytes 1.1.0", + "bytes", "futures", "log", "pin-project", @@ -4711,7 +4587,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef8785b8141e8432aa45fceb922a7e876d7da3fad37fa7e7ec702ace3aa0826b" dependencies = [ - "bytes 1.1.0", + "bytes", "futures", "log", "netlink-packet-core", @@ -4726,7 +4602,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e4c9f9547a08241bee7b6558b9b98e1f290d187de8b7cfca2bbb4937bcaa8f8" dependencies = [ "async-io", - "bytes 1.1.0", + "bytes", "futures", "libc", "log", @@ -4822,7 +4698,7 @@ dependencies = [ "pallet-im-online", "pallet-timestamp", "pallet-transaction-payment", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "platforms", "rand 0.8.5", "regex", @@ -4854,7 +4730,7 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "soketto 0.7.1", + "soketto", "sp-api", "sp-authority-discovery", "sp-authorship", @@ -4899,7 +4775,7 @@ dependencies = [ "pallet-timestamp", "pallet-transaction-payment", "pallet-treasury", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-executor", "scale-info", "sp-application-crypto", @@ -4920,7 +4796,7 @@ name = "node-inspect" version = "0.9.0-dev" dependencies = [ "clap 3.1.18", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-cli", "sc-client-api", "sc-executor", @@ -4936,7 +4812,7 @@ name = "node-primitives" version = "2.0.0" dependencies = [ "frame-system", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-core", @@ -5046,7 +4922,7 @@ dependencies = [ "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-api", "sp-block-builder", @@ -5075,7 +4951,7 @@ dependencies = [ "node-primitives", "pallet-asset-tx-payment", "pallet-transaction-payment", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-block-builder", "sc-client-api", "sc-client-db", @@ -5313,7 +5189,7 @@ dependencies = [ "pallet-balances", "pallet-collective", "pallet-identity", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sha2 0.10.2", "sp-core", @@ -5332,7 +5208,7 @@ dependencies = [ "pallet-authorship", "pallet-balances", "pallet-transaction-payment", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "serde_json", @@ -5351,7 +5227,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5366,7 +5242,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5381,7 +5257,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-timestamp", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-consensus-aura", @@ -5398,7 +5274,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-session", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-authority-discovery", @@ -5415,7 +5291,7 @@ dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-authorship", "sp-core", @@ -5440,7 +5316,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-consensus-babe", @@ -5463,7 +5339,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5509,7 +5385,7 @@ dependencies = [ "frame-system", "log", "pallet-transaction-payment", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5525,7 +5401,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-session", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-core", @@ -5548,7 +5424,7 @@ dependencies = [ "pallet-beefy", "pallet-mmr", "pallet-session", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-core", @@ -5568,7 +5444,7 @@ dependencies = [ "log", "pallet-balances", "pallet-treasury", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5587,7 +5463,7 @@ dependencies = [ "pallet-balances", "pallet-bounties", "pallet-treasury", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5603,7 +5479,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5630,7 +5506,7 @@ dependencies = [ "pallet-randomness-collective-flip", "pallet-timestamp", "pallet-utility", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "pretty_assertions", "rand 0.8.5", "rand_pcg 0.3.1", @@ -5653,7 +5529,7 @@ name = "pallet-contracts-primitives" version = "6.0.0" dependencies = [ "bitflags", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-core", @@ -5678,7 +5554,7 @@ dependencies = [ "jsonrpsee", "pallet-contracts-primitives", "pallet-contracts-rpc-runtime-api", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "serde", "serde_json", "sp-api", @@ -5693,7 +5569,7 @@ name = "pallet-contracts-rpc-runtime-api" version = "4.0.0-dev" dependencies = [ "pallet-contracts-primitives", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-api", "sp-runtime", @@ -5710,7 +5586,7 @@ dependencies = [ "frame-system", "pallet-balances", "pallet-scheduler", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-core", @@ -5728,7 +5604,7 @@ dependencies = [ "frame-system", "pallet-balances", "pallet-scheduler", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-core", @@ -5748,7 +5624,7 @@ dependencies = [ "log", "pallet-balances", "pallet-election-provider-support-benchmarking", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "rand 0.7.3", "scale-info", @@ -5770,7 +5646,7 @@ dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-system", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-npos-elections", "sp-runtime", ] @@ -5784,7 +5660,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5804,7 +5680,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5820,7 +5696,7 @@ dependencies = [ "frame-system", "lite-json", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5835,7 +5711,7 @@ version = "3.0.0-dev" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5857,7 +5733,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5876,7 +5752,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-arithmetic", "sp-core", @@ -5902,7 +5778,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-core", @@ -5924,7 +5800,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5942,7 +5818,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-core", @@ -5960,7 +5836,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5978,7 +5854,7 @@ dependencies = [ "frame-support-test", "frame-system", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -5994,7 +5870,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6013,7 +5889,7 @@ dependencies = [ "frame-support", "frame-system", "itertools", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6027,7 +5903,7 @@ name = "pallet-mmr-rpc" version = "3.0.0" dependencies = [ "jsonrpsee", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "serde", "serde_json", "sp-api", @@ -6045,7 +5921,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6060,7 +5936,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6075,7 +5951,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6091,7 +5967,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "rand 0.8.5", "scale-info", "sp-core", @@ -6116,7 +5992,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6130,7 +6006,7 @@ dependencies = [ name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-api", "sp-std", ] @@ -6149,7 +6025,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6167,7 +6043,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-core", @@ -6194,7 +6070,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6211,7 +6087,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6228,7 +6104,7 @@ dependencies = [ "frame-system", "pallet-balances", "pallet-utility", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6242,7 +6118,7 @@ version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "safe-mix", "scale-info", "sp-core", @@ -6259,7 +6135,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-arithmetic", "sp-core", @@ -6276,7 +6152,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6295,7 +6171,7 @@ dependencies = [ "pallet-balances", "pallet-preimage", "pallet-scheduler", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-arithmetic", @@ -6312,7 +6188,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-core", @@ -6330,7 +6206,7 @@ dependencies = [ "frame-system", "log", "pallet-preimage", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6346,7 +6222,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6363,7 +6239,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "pallet-timestamp", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6387,7 +6263,7 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "rand 0.7.3", "scale-info", "sp-core", @@ -6405,7 +6281,7 @@ dependencies = [ "frame-support-test", "frame-system", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", "sp-core", @@ -6429,7 +6305,7 @@ dependencies = [ "pallet-session", "pallet-staking-reward-curve", "pallet-timestamp", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", "serde", @@ -6472,7 +6348,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "remote-externalities", "scale-info", @@ -6494,7 +6370,7 @@ version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6509,7 +6385,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6524,7 +6400,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-inherents", @@ -6544,7 +6420,7 @@ dependencies = [ "log", "pallet-balances", "pallet-treasury", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-core", @@ -6561,7 +6437,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "serde_json", @@ -6577,7 +6453,7 @@ version = "4.0.0-dev" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-api", "sp-blockchain", "sp-core", @@ -6590,7 +6466,7 @@ name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" dependencies = [ "pallet-transaction-payment", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-api", "sp-runtime", ] @@ -6605,7 +6481,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-core", @@ -6625,7 +6501,7 @@ dependencies = [ "frame-system", "impl-trait-for-tuples", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-core", @@ -6643,7 +6519,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6659,7 +6535,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6676,7 +6552,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-io", @@ -6693,7 +6569,7 @@ dependencies = [ "frame-system", "pallet-balances", "pallet-preimage", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-api", "sp-core", @@ -6721,18 +6597,6 @@ dependencies = [ "snap", ] -[[package]] -name = "parity-scale-codec" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" -dependencies = [ - "arrayvec 0.7.2", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive 2.3.1", -] - [[package]] name = "parity-scale-codec" version = "3.1.3" @@ -6742,24 +6606,12 @@ dependencies = [ "arrayvec 0.7.2", "bitvec", "byte-slice-cast", - "bytes 1.1.0", + "bytes", "impl-trait-for-tuples", - "parity-scale-codec-derive 3.1.3", + "parity-scale-codec-derive", "serde", ] -[[package]] -name = "parity-scale-codec-derive" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "parity-scale-codec-derive" version = "3.1.3" @@ -7257,7 +7109,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc03e116981ff7d8da8e5c220e374587b98d294af7ba7dd7fda761158f00086f" dependencies = [ - "bytes 1.1.0", + "bytes", "prost-derive 0.10.1", ] @@ -7267,7 +7119,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7" dependencies = [ - "bytes 1.1.0", + "bytes", "prost-derive 0.11.0", ] @@ -7277,10 +7129,10 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ae5a4388762d5815a9fc0dea33c56b021cdc8dde0c55e0c9ca57197254b0cab" dependencies = [ - "bytes 1.1.0", + "bytes", "cfg-if 1.0.0", "cmake", - "heck 0.4.0", + "heck", "itertools", "lazy_static", "log", @@ -7299,8 +7151,8 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f835c582e6bd972ba8347313300219fed5bfa52caf175298d860b61ff6069bb" dependencies = [ - "bytes 1.1.0", - "heck 0.4.0", + "bytes", + "heck", "itertools", "lazy_static", "log", @@ -7320,7 +7172,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00af1e92c33b4813cc79fda3f2dbf56af5169709be0202df730e9ebc3e4cd007" dependencies = [ "asynchronous-codec", - "bytes 1.1.0", + "bytes", "prost 0.10.3", "thiserror", "unsigned-varint", @@ -7358,7 +7210,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" dependencies = [ - "bytes 1.1.0", + "bytes", "prost 0.10.3", ] @@ -7368,7 +7220,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dfaa718ad76a44b3415e6c4d53b17c8f99160dcb3a99b10470fce8ad43f6e3e" dependencies = [ - "bytes 1.1.0", + "bytes", "prost 0.11.0", ] @@ -7686,13 +7538,10 @@ version = "0.10.0-dev" dependencies = [ "env_logger", "frame-support", - "hex-literal", "jsonrpsee", - "kitchensink-runtime", "log", "pallet-elections-phragmen", - "pallet-staking", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "serde", "serde_json", "sp-core", @@ -7866,19 +7715,6 @@ dependencies = [ "windows-sys 0.36.1", ] -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.0", - "log", - "ring", - "sct 0.6.1", - "webpki 0.21.4", -] - [[package]] name = "rustls" version = "0.20.2" @@ -7887,8 +7723,8 @@ checksum = "d37e5e2290f3e040b594b1a9e04377c2c671f1a1cfd9bfdef82106ac1c113f84" dependencies = [ "log", "ring", - "sct 0.7.0", - "webpki 0.22.0", + "sct", + "webpki", ] [[package]] @@ -7909,7 +7745,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" dependencies = [ - "base64 0.13.0", + "base64", ] [[package]] @@ -7993,7 +7829,7 @@ dependencies = [ "ip_network", "libp2p", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "prost 0.10.3", "prost-build 0.10.4", "quickcheck", @@ -8019,7 +7855,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "sc-block-builder", "sc-client-api", @@ -8041,7 +7877,7 @@ dependencies = [ name = "sc-block-builder" version = "0.10.0-dev" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-client-api", "sp-api", "sp-block-builder", @@ -8059,7 +7895,7 @@ version = "4.0.0-dev" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.0", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-chain-spec-derive", "sc-network-common", "sc-telemetry", @@ -8091,7 +7927,7 @@ dependencies = [ "libp2p", "log", "names", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "rand 0.7.3", "regex", "rpassword", @@ -8127,7 +7963,7 @@ dependencies = [ "futures", "hash-db", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "sc-executor", "sc-transaction-pool-api", @@ -8162,7 +7998,7 @@ dependencies = [ "linked-hash-map", "log", "parity-db", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "quickcheck", "rand 0.8.5", @@ -8211,7 +8047,7 @@ dependencies = [ "async-trait", "futures", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "sc-block-builder", "sc-client-api", @@ -8253,7 +8089,7 @@ dependencies = [ "num-bigint 0.2.6", "num-rational 0.2.4", "num-traits", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "rand 0.7.3", "rand_chacha 0.2.2", @@ -8323,7 +8159,7 @@ name = "sc-consensus-epochs" version = "0.10.0-dev" dependencies = [ "fork-tree", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-client-api", "sc-consensus", "sp-blockchain", @@ -8339,7 +8175,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-basic-authorship", "sc-client-api", "sc-consensus", @@ -8375,7 +8211,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", "sc-consensus", @@ -8399,7 +8235,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-client-api", "sc-consensus", "sc-telemetry", @@ -8435,7 +8271,7 @@ dependencies = [ "lazy_static", "lru", "num_cpus", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "paste 1.0.6", "regex", @@ -8471,7 +8307,7 @@ name = "sc-executor-common" version = "0.10.0-dev" dependencies = [ "environmental", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-allocator", "sp-maybe-compressed-blob", "sp-sandbox", @@ -8487,7 +8323,7 @@ name = "sc-executor-wasmi" version = "0.10.0-dev" dependencies = [ "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -8504,7 +8340,7 @@ dependencies = [ "libc", "log", "once_cell", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parity-wasm 0.45.0", "paste 1.0.6", "rustix", @@ -8524,7 +8360,7 @@ dependencies = [ name = "sc-finality-grandpa" version = "0.10.0-dev" dependencies = [ - "ahash 0.7.6", + "ahash", "array-bytes", "assert_matches", "async-trait", @@ -8534,7 +8370,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "rand 0.8.5", "sc-block-builder", @@ -8576,7 +8412,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-block-builder", "sc-client-api", "sc-finality-grandpa", @@ -8634,7 +8470,7 @@ dependencies = [ "async-trait", "asynchronous-codec", "bitflags", - "bytes 1.1.0", + "bytes", "cid", "either", "fnv", @@ -8647,7 +8483,7 @@ dependencies = [ "linked_hash_set", "log", "lru", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "pin-project", "prost 0.10.3", @@ -8711,12 +8547,12 @@ version = "0.10.0-dev" dependencies = [ "async-trait", "bitflags", - "bytes 1.1.0", + "bytes", "futures", "futures-timer", "libp2p", "linked_hash_set", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "prost-build 0.10.4", "sc-consensus", "sc-peerset", @@ -8734,7 +8570,7 @@ dependencies = [ name = "sc-network-gossip" version = "0.10.0-dev" dependencies = [ - "ahash 0.7.6", + "ahash", "async-std", "futures", "futures-timer", @@ -8758,7 +8594,7 @@ dependencies = [ "futures", "libp2p", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "prost 0.10.3", "prost-build 0.10.4", "sc-client-api", @@ -8780,7 +8616,7 @@ dependencies = [ "libp2p", "log", "lru", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "prost 0.10.3", "prost-build 0.10.4", "quickcheck", @@ -8841,7 +8677,7 @@ dependencies = [ "hex", "libp2p", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "pin-project", "sc-network-common", "sc-peerset", @@ -8855,7 +8691,7 @@ name = "sc-offchain" version = "4.0.0-dev" dependencies = [ "array-bytes", - "bytes 1.1.0", + "bytes", "fnv", "futures", "futures-timer", @@ -8865,7 +8701,7 @@ dependencies = [ "libp2p", "num_cpus", "once_cell", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "rand 0.7.3", "sc-block-builder", @@ -8920,7 +8756,7 @@ dependencies = [ "jsonrpsee", "lazy_static", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "sc-block-builder", "sc-chain-spec", @@ -8955,7 +8791,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "sc-chain-spec", "sc-transaction-pool-api", @@ -9020,7 +8856,7 @@ dependencies = [ "hash-db", "jsonrpsee", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parity-util-mem", "parking_lot 0.12.1", "pin-project", @@ -9087,7 +8923,7 @@ dependencies = [ "fdlimit", "futures", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "sc-block-builder", "sc-client-api", @@ -9120,7 +8956,7 @@ name = "sc-state-db" version = "0.10.0-dev" dependencies = [ "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parity-util-mem", "parity-util-mem-derive", "parking_lot 0.12.1", @@ -9133,7 +8969,7 @@ name = "sc-sync-state-rpc" version = "0.10.0-dev" dependencies = [ "jsonrpsee", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-chain-spec", "sc-client-api", "sc-consensus-babe", @@ -9233,7 +9069,7 @@ dependencies = [ "futures-timer", "linked-hash-map", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parity-util-mem", "parking_lot 0.12.1", "sc-block-builder", @@ -9289,7 +9125,7 @@ dependencies = [ "bitvec", "cfg-if 1.0.0", "derive_more", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info-derive", "serde", ] @@ -9340,16 +9176,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sct" version = "0.7.0" @@ -9462,12 +9288,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -[[package]] -name = "separator" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" - [[package]] name = "serde" version = "1.0.136" @@ -9717,29 +9537,14 @@ dependencies = [ "winapi", ] -[[package]] -name = "soketto" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c71ed3d54db0a699f4948e1bb3e45b450fa31fe602621dee6680361d569c88" -dependencies = [ - "base64 0.12.3", - "bytes 0.5.6", - "futures", - "httparse", - "log", - "rand 0.7.3", - "sha-1 0.9.4", -] - [[package]] name = "soketto" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" dependencies = [ - "base64 0.13.0", - "bytes 1.1.0", + "base64", + "bytes", "flate2", "futures", "httparse", @@ -9754,7 +9559,7 @@ version = "4.0.0-dev" dependencies = [ "hash-db", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-api-proc-macro", "sp-core", "sp-runtime", @@ -9784,7 +9589,7 @@ dependencies = [ "criterion", "futures", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "rustversion", "sc-block-builder", "sp-api", @@ -9802,7 +9607,7 @@ dependencies = [ name = "sp-application-crypto" version = "6.0.0" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-core", @@ -9829,7 +9634,7 @@ dependencies = [ "criterion", "integer-sqrt", "num-traits", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "primitive-types", "rand 0.7.3", "scale-info", @@ -9854,7 +9659,7 @@ dependencies = [ name = "sp-authority-discovery" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", @@ -9867,7 +9672,7 @@ name = "sp-authorship" version = "4.0.0-dev" dependencies = [ "async-trait", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-inherents", "sp-runtime", "sp-std", @@ -9877,7 +9682,7 @@ dependencies = [ name = "sp-block-builder" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime", @@ -9891,7 +9696,7 @@ dependencies = [ "futures", "log", "lru", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "sp-api", "sp-consensus", @@ -9909,7 +9714,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-core", "sp-inherents", "sp-runtime", @@ -9925,7 +9730,7 @@ name = "sp-consensus-aura" version = "0.10.0-dev" dependencies = [ "async-trait", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", @@ -9943,7 +9748,7 @@ version = "0.10.0-dev" dependencies = [ "async-trait", "merlin", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-api", @@ -9963,7 +9768,7 @@ dependencies = [ name = "sp-consensus-pow" version = "0.10.0-dev" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-api", "sp-core", "sp-runtime", @@ -9974,7 +9779,7 @@ dependencies = [ name = "sp-consensus-slots" version = "0.10.0-dev" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-arithmetic", @@ -9987,7 +9792,7 @@ dependencies = [ name = "sp-consensus-vrf" version = "0.10.0-dev" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "schnorrkel", "sp-core", @@ -10016,7 +9821,7 @@ dependencies = [ "log", "merlin", "num-traits", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parity-util-mem", "parking_lot 0.12.1", "primitive-types", @@ -10089,7 +9894,7 @@ name = "sp-externalities" version = "0.12.0" dependencies = [ "environmental", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-std", "sp-storage", ] @@ -10100,7 +9905,7 @@ version = "4.0.0-dev" dependencies = [ "finality-grandpa", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "sp-api", @@ -10118,7 +9923,7 @@ dependencies = [ "async-trait", "futures", "impl-trait-for-tuples", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-core", "sp-runtime", "sp-std", @@ -10129,12 +9934,12 @@ dependencies = [ name = "sp-io" version = "6.0.0" dependencies = [ - "bytes 1.1.0", + "bytes", "futures", "hash-db", "libsecp256k1", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "secp256k1", "sp-core", @@ -10167,7 +9972,7 @@ dependencies = [ "async-trait", "futures", "merlin", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "rand 0.7.3", "rand_chacha 0.2.2", @@ -10192,7 +9997,7 @@ version = "4.0.0-dev" dependencies = [ "array-bytes", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "serde", "sp-api", "sp-core", @@ -10205,7 +10010,7 @@ dependencies = [ name = "sp-npos-elections" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "rand 0.7.3", "scale-info", "serde", @@ -10222,7 +10027,7 @@ version = "2.0.0-alpha.5" dependencies = [ "clap 3.1.18", "honggfuzz", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "rand 0.8.5", "scale-info", "sp-npos-elections", @@ -10265,7 +10070,7 @@ dependencies = [ "hash256-std-hasher", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parity-util-mem", "paste 1.0.6", "rand 0.7.3", @@ -10289,9 +10094,9 @@ dependencies = [ name = "sp-runtime-interface" version = "6.0.0" dependencies = [ - "bytes 1.1.0", + "bytes", "impl-trait-for-tuples", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "primitive-types", "rustversion", "sp-core", @@ -10339,7 +10144,7 @@ dependencies = [ name = "sp-runtime-interface-test-wasm" version = "2.0.0" dependencies = [ - "bytes 1.1.0", + "bytes", "sp-core", "sp-io", "sp-runtime-interface", @@ -10364,7 +10169,7 @@ version = "0.10.0-dev" dependencies = [ "assert_matches", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-core", "sp-io", "sp-std", @@ -10385,7 +10190,7 @@ dependencies = [ name = "sp-session" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-api", "sp-core", @@ -10398,7 +10203,7 @@ dependencies = [ name = "sp-staking" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-runtime", "sp-std", @@ -10413,7 +10218,7 @@ dependencies = [ "hash-db", "log", "num-traits", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "pretty_assertions", "rand 0.7.3", @@ -10439,7 +10244,7 @@ name = "sp-storage" version = "6.0.0" dependencies = [ "impl-serde", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "ref-cast", "serde", "sp-debug-derive", @@ -10451,7 +10256,7 @@ name = "sp-tasks" version = "4.0.0-dev" dependencies = [ "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-core", "sp-externalities", "sp-io", @@ -10463,7 +10268,7 @@ dependencies = [ name = "sp-test-primitives" version = "2.0.0" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parity-util-mem", "serde", "sp-application-crypto", @@ -10478,7 +10283,7 @@ dependencies = [ "async-trait", "futures-timer", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime", @@ -10490,7 +10295,7 @@ dependencies = [ name = "sp-tracing" version = "5.0.0" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-std", "tracing", "tracing-core", @@ -10511,7 +10316,7 @@ version = "4.0.0-dev" dependencies = [ "async-trait", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "sp-core", "sp-inherents", @@ -10524,7 +10329,7 @@ dependencies = [ name = "sp-trie" version = "6.0.0" dependencies = [ - "ahash 0.7.6", + "ahash", "array-bytes", "criterion", "hash-db", @@ -10533,7 +10338,7 @@ dependencies = [ "lru", "memory-db", "nohash-hasher", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "scale-info", "sp-core", @@ -10552,7 +10357,7 @@ name = "sp-version" version = "5.0.0" dependencies = [ "impl-serde", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parity-wasm 0.45.0", "scale-info", "serde", @@ -10567,7 +10372,7 @@ dependencies = [ name = "sp-version-proc-macro" version = "4.0.0-dev" dependencies = [ - "parity-scale-codec 3.1.3", + "parity-scale-codec", "proc-macro2", "quote", "sp-version", @@ -10580,7 +10385,7 @@ version = "6.0.0" dependencies = [ "impl-trait-for-tuples", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sp-std", "wasmi", "wasmtime", @@ -10591,7 +10396,7 @@ name = "sp-weights" version = "4.0.0" dependencies = [ "impl-trait-for-tuples", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "scale-info", "serde", "smallvec", @@ -10685,42 +10490,12 @@ dependencies = [ "rand 0.8.5", ] -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "structopt" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" -dependencies = [ - "clap 2.34.0", - "lazy_static", - "structopt-derive", -] - -[[package]] -name = "structopt-derive" -version = "0.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" -dependencies = [ - "heck 0.3.3", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "strum" version = "0.24.1" @@ -10736,31 +10511,13 @@ version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4faebde00e8ff94316c01800f9054fd2ba77d30d9e922541913051d1d978918b" dependencies = [ - "heck 0.4.0", + "heck", "proc-macro2", "quote", "rustversion", "syn", ] -[[package]] -name = "sub-du" -version = "0.1.0" -dependencies = [ - "ansi_term", - "assert_cmd", - "async-std", - "env_logger", - "frame-metadata", - "jsonrpsee-http-client", - "jsonrpsee-types 0.1.0", - "jsonrpsee-ws-client 0.1.0", - "log", - "parity-scale-codec 2.3.1", - "separator", - "structopt", -] - [[package]] name = "subkey" version = "2.0.2" @@ -10809,7 +10566,7 @@ dependencies = [ "frame-system", "futures", "jsonrpsee", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-rpc-api", "scale-info", "serde", @@ -10828,7 +10585,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-client-api", "sc-rpc-api", "sc-transaction-pool", @@ -10862,7 +10619,7 @@ version = "4.0.0-dev" dependencies = [ "jsonrpsee", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-client-api", "sc-rpc-api", "scale-info", @@ -10884,7 +10641,7 @@ dependencies = [ "array-bytes", "async-trait", "futures", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-client-api", "sc-client-db", "sc-consensus", @@ -10917,7 +10674,7 @@ dependencies = [ "memory-db", "pallet-babe", "pallet-timestamp", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parity-util-mem", "sc-block-builder", "sc-executor", @@ -10955,7 +10712,7 @@ name = "substrate-test-runtime-client" version = "2.0.0" dependencies = [ "futures", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -10973,7 +10730,7 @@ name = "substrate-test-runtime-transaction-pool" version = "2.0.0" dependencies = [ "futures", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "parking_lot 0.12.1", "sc-transaction-pool", "sc-transaction-pool-api", @@ -11254,7 +11011,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee" dependencies = [ - "bytes 1.1.0", + "bytes", "libc", "memchr", "mio", @@ -11285,9 +11042,9 @@ version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b" dependencies = [ - "rustls 0.20.2", + "rustls", "tokio", - "webpki 0.22.0", + "webpki", ] [[package]] @@ -11308,7 +11065,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53474327ae5e166530d17f2d956afcb4f8a004de581b3cae10f12006bc8163e3" dependencies = [ "async-stream", - "bytes 1.1.0", + "bytes", "futures-core", "tokio", "tokio-stream", @@ -11320,7 +11077,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-core", "futures-io", "futures-sink", @@ -11448,7 +11205,7 @@ dependencies = [ "hash-db", "keccak-hasher", "memory-db", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "trie-db", "trie-root", "trie-standardmap", @@ -11543,7 +11300,7 @@ dependencies = [ "frame-try-runtime", "jsonrpsee", "log", - "parity-scale-codec 3.1.3", + "parity-scale-codec", "remote-externalities", "sc-chain-spec", "sc-cli", @@ -11652,12 +11409,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" - [[package]] name = "unicode-width" version = "0.1.8" @@ -11687,7 +11438,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" dependencies = [ "asynchronous-codec", - "bytes 1.1.0", + "bytes", "futures-io", "futures-util", ] @@ -11738,12 +11489,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eafc1b9b2dfc6f5529177b62cf806484db55b32dc7c9658a118e11bbeb33061d" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.2" @@ -12216,7 +11961,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f507f3fa1ee1b2f9a83644e2514242b1dfe580782c0eb042f1ef70255bc4ffe" dependencies = [ "anyhow", - "base64 0.13.0", + "base64", "bincode", "directories-next", "file-per-thread-logger", @@ -12370,16 +12115,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" @@ -12390,22 +12125,13 @@ dependencies = [ "untrusted", ] -[[package]] -name = "webpki-roots" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" -dependencies = [ - "webpki 0.21.4", -] - [[package]] name = "webpki-roots" version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "552ceb903e957524388c4d3475725ff2c8b7960922063af6ce53c9a43da07449" dependencies = [ - "webpki 0.22.0", + "webpki", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f45d75957f7e4..018355df6c9fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -226,7 +226,6 @@ members = [ "utils/frame/benchmarking-cli", "utils/frame/remote-externalities", "utils/frame/frame-utilities-cli", - "utils/frame/sub-du", "utils/frame/try-runtime/cli", "utils/frame/rpc/state-trie-migration-rpc", "utils/frame/rpc/support", From df5cbe285fa9f3a64bb2c7867f00788e824ac847 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Tue, 4 Oct 2022 15:42:35 +0100 Subject: [PATCH 03/16] bring back remote test --- Cargo.lock | 9 ++++++++ utils/frame/remote-externalities/Cargo.toml | 7 ++++-- utils/frame/remote-externalities/src/lib.rs | 25 +++++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 71f2e8ff48a56..81d2d8a007d56 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2861,6 +2861,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + [[package]] name = "hex_fmt" version = "0.3.0" @@ -7538,9 +7544,12 @@ version = "0.10.0-dev" dependencies = [ "env_logger", "frame-support", + "hex-literal", "jsonrpsee", + "kitchensink-runtime", "log", "pallet-elections-phragmen", + "pallet-staking", "parity-scale-codec", "serde", "serde_json", diff --git a/utils/frame/remote-externalities/Cargo.toml b/utils/frame/remote-externalities/Cargo.toml index 3121157df68d8..a3d4095e727a2 100644 --- a/utils/frame/remote-externalities/Cargo.toml +++ b/utils/frame/remote-externalities/Cargo.toml @@ -27,8 +27,11 @@ sp-version = { version = "5.0.0", path = "../../../primitives/version" } [dev-dependencies] tokio = { version = "1.17.0", features = ["macros", "rt-multi-thread"] } -frame-support = { version = "4.0.0-dev", path = "../../../frame/support" } -pallet-elections-phragmen = { version = "5.0.0-dev", path = "../../../frame/elections-phragmen" } +frame-support = { path = "../../../frame/support" } +pallet-elections-phragmen = { path = "../../../frame/elections-phragmen" } +pallet-staking = { path = "../../../frame/staking" } +kitchensink-runtime = { path = "../../../bin/node/runtime/" } +hex-literal = "0.3.4" [features] remote-test = ["frame-support"] diff --git a/utils/frame/remote-externalities/src/lib.rs b/utils/frame/remote-externalities/src/lib.rs index 7c1a8e7f31028..3b1b7edc01f7b 100644 --- a/utils/frame/remote-externalities/src/lib.rs +++ b/utils/frame/remote-externalities/src/lib.rs @@ -995,6 +995,31 @@ mod remote_tests { } } + // TODO: maybe remove before merge, although, it is an okay example :shrug: + #[tokio::test] + async fn example_staking_slashing_spans() { + init_logger(); + Builder::::new() + .mode(Mode::Online(OnlineConfig { + pallets: vec!["because_empty_vec_is_treated_as_all_pallets_:(".to_string()], + transport: env!("WS").to_owned().into(), + ..Default::default() + })) + // Staking::SlashingSpans + .inject_hashed_prefix(&hex_literal::hex![ + "5f3e4907f716ac89b6347d15ececedcaab6a212bc08a5603828f33f90ec4a139" + ]) + .build() + .await + .unwrap() + .execute_with(|| { + use codec::Encode; + let x = pallet_staking::SlashingSpans::::iter() + .collect::>(); + println!("Len = {:?} / encoded_size = {:?}", x.len(), x.encoded_size()); + }); + } + #[tokio::test] #[ignore = "too slow"] async fn can_build_one_big_pallet() { From 88f8470fdb3c755ad1d1645cedf035ef04ad1bcc Mon Sep 17 00:00:00 2001 From: kianenigma Date: Thu, 6 Oct 2022 08:39:08 +0100 Subject: [PATCH 04/16] fix merge stuff --- frame/election-provider-multi-phase/src/lib.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/frame/election-provider-multi-phase/src/lib.rs b/frame/election-provider-multi-phase/src/lib.rs index ee8f3ccc5fe37..8a4fea5f55b87 100644 --- a/frame/election-provider-multi-phase/src/lib.rs +++ b/frame/election-provider-multi-phase/src/lib.rs @@ -2265,10 +2265,8 @@ mod tests { assert_eq!(MultiPhase::elect().unwrap_err(), ElectionError::Fallback("NoFallback.")); // phase is now emergency. assert_eq!(MultiPhase::current_phase(), Phase::Emergency); -<<<<<<< HEAD // snapshot is still there until election finalizes. assert!(MultiPhase::snapshot().is_some()); -======= assert_eq!( multi_phase_events(), @@ -2278,7 +2276,6 @@ mod tests { Event::ElectionFailed ] ); ->>>>>>> fc67cbb66d8c484bc7b7506fc1300344d12ecbad }) } From cc184dc1649ee343c50e4bd625036d0aab7cc477 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Thu, 6 Oct 2022 08:41:49 +0100 Subject: [PATCH 05/16] fix npos-voters function sig --- frame/staking/src/pallet/impls.rs | 1 - frame/staking/src/tests.rs | 4 +--- frame/staking/src/weights.rs | 8 ++++---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/frame/staking/src/pallet/impls.rs b/frame/staking/src/pallet/impls.rs index 3632e76934a5b..8c6e4ef5a1a74 100644 --- a/frame/staking/src/pallet/impls.rs +++ b/frame/staking/src/pallet/impls.rs @@ -752,7 +752,6 @@ impl Pallet { Self::register_weight(T::WeightInfo::get_npos_voters( validators_taken, nominators_taken, - 0, )); log!( diff --git a/frame/staking/src/tests.rs b/frame/staking/src/tests.rs index 881a1eab1b93f..716f469e9d8e1 100644 --- a/frame/staking/src/tests.rs +++ b/frame/staking/src/tests.rs @@ -4388,11 +4388,9 @@ mod election_data_provider { // we assume a network only wants up to 1000 validators in most cases, thus having 2000 // candidates is as high as it gets. let validators = 2000; - // we assume the worse case: each validator also has a slashing span. - let slashing_spans = validators; let mut nominators = 1000; - while ::WeightInfo::get_npos_voters(validators, nominators, slashing_spans) + while ::WeightInfo::get_npos_voters(validators, nominators) .all_lt(2u64 * frame_support::weights::constants::WEIGHT_PER_SECOND) { nominators += 1; diff --git a/frame/staking/src/weights.rs b/frame/staking/src/weights.rs index 5070232365d3e..c1599e9d86d71 100644 --- a/frame/staking/src/weights.rs +++ b/frame/staking/src/weights.rs @@ -69,8 +69,8 @@ pub trait WeightInfo { fn rebond(l: u32, ) -> Weight; fn reap_stash(s: u32, ) -> Weight; fn new_era(v: u32, n: u32, ) -> Weight; - fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight; - fn get_npos_targets(v: u32, ) -> Weight; + fn get_npos_voters(v: u32, n: u32) -> Weight; + fn get_npos_targets(v: u32) -> Weight; fn set_staking_configs_all_set() -> Weight; fn set_staking_configs_all_remove() -> Weight; fn chill_other() -> Weight; @@ -397,7 +397,7 @@ impl WeightInfo for SubstrateWeight { /// 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 { + fn get_npos_voters(v: u32, n: u32) -> Weight { Weight::from_ref_time(24_930_788_000 as u64) // Standard Error: 266_386 .saturating_add(Weight::from_ref_time(6_687_552 as u64).saturating_mul(v as u64)) @@ -779,7 +779,7 @@ impl WeightInfo for () { /// 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 { + fn get_npos_voters(v: u32, n: u32) -> Weight { Weight::from_ref_time(24_930_788_000 as u64) // Standard Error: 266_386 .saturating_add(Weight::from_ref_time(6_687_552 as u64).saturating_mul(v as u64)) From f86e3682d926894c550d91a9c1bca3c96525a809 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Thu, 6 Oct 2022 08:57:12 +0100 Subject: [PATCH 06/16] remove as much redundant diff as you can --- frame/staking/src/pallet/mod.rs | 1 - frame/staking/src/slashing.rs | 11 +++++------ utils/frame/remote-externalities/src/lib.rs | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/frame/staking/src/pallet/mod.rs b/frame/staking/src/pallet/mod.rs index 7bee0ef763d52..1a6e8749ece95 100644 --- a/frame/staking/src/pallet/mod.rs +++ b/frame/staking/src/pallet/mod.rs @@ -545,7 +545,6 @@ pub mod pallet { /// `OffendingValidatorsThreshold` is reached. The vec is always kept sorted so that we can find /// whether a given validator has previously offended using binary search. It gets cleared when /// the era ends. - // TODO: invariant test for the above. #[pallet::storage] #[pallet::unbounded] #[pallet::getter(fn offending_validators)] diff --git a/frame/staking/src/slashing.rs b/frame/staking/src/slashing.rs index 410995e074b69..00d3a68d6189d 100644 --- a/frame/staking/src/slashing.rs +++ b/frame/staking/src/slashing.rs @@ -188,9 +188,9 @@ pub(crate) struct SpanRecord { paid_out: Balance, } -#[cfg(test)] impl SpanRecord { /// The value of stash balance slashed in this span. + #[cfg(test)] pub(crate) fn amount(&self) -> &Balance { &self.slashed } @@ -272,9 +272,9 @@ pub(crate) fn compute_slash( params.reward_proportion, ); - let maybe_target_span = spans.compare_and_update_span_slash(params.slash_era, own_slash); + let target_span = spans.compare_and_update_span_slash(params.slash_era, own_slash); - if maybe_target_span == Some(spans.span_index()) { + if target_span == Some(spans.span_index()) { // misbehavior occurred within the current slashing span - take appropriate // actions. @@ -406,10 +406,9 @@ fn slash_nominators( params.reward_proportion, ); - let maybe_target_span = - spans.compare_and_update_span_slash(params.slash_era, era_slash); + let target_span = spans.compare_and_update_span_slash(params.slash_era, era_slash); - if maybe_target_span == Some(spans.span_index()) { + if target_span == Some(spans.span_index()) { // end the span, but don't chill the nominator. spans.end_span(params.now); } diff --git a/utils/frame/remote-externalities/src/lib.rs b/utils/frame/remote-externalities/src/lib.rs index 3b1b7edc01f7b..04e7f91313a83 100644 --- a/utils/frame/remote-externalities/src/lib.rs +++ b/utils/frame/remote-externalities/src/lib.rs @@ -995,7 +995,7 @@ mod remote_tests { } } - // TODO: maybe remove before merge, although, it is an okay example :shrug: + // NOTE: maybe remove before merge, although, it is an okay example :shrug: #[tokio::test] async fn example_staking_slashing_spans() { init_logger(); @@ -1016,7 +1016,7 @@ mod remote_tests { use codec::Encode; let x = pallet_staking::SlashingSpans::::iter() .collect::>(); - println!("Len = {:?} / encoded_size = {:?}", x.len(), x.encoded_size()); + println!("len() = {:?} / encoded_size() = {:?}", x.len(), x.encoded_size()); }); } From c67961df7726bbdc889d80395411df257e00d812 Mon Sep 17 00:00:00 2001 From: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Tue, 1 Nov 2022 16:40:12 +0100 Subject: [PATCH 07/16] Update frame/staking/src/pallet/mod.rs Co-authored-by: Andronik --- frame/staking/src/pallet/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/staking/src/pallet/mod.rs b/frame/staking/src/pallet/mod.rs index 1a6e8749ece95..91bc52ffa5925 100644 --- a/frame/staking/src/pallet/mod.rs +++ b/frame/staking/src/pallet/mod.rs @@ -668,7 +668,7 @@ pub mod pallet { /// A staker (validator or nominator) has been slashed by the given amount. Slashed { staker: T::AccountId, amount: BalanceOf }, /// A slash for the given validator, for the given percentage of their stake, at the given - /// era as been reporter + /// era as been reported. SlashReported { validator: T::AccountId, fraction: Perbill, slash_era: EraIndex }, /// An old slashing report from a prior era was discarded because it could /// not be processed. From d644f8f57d377bfc5fa9a710a972937a29c2cde7 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Tue, 8 Nov 2022 11:12:39 +0000 Subject: [PATCH 08/16] fix --- frame/staking/src/slashing.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/frame/staking/src/slashing.rs b/frame/staking/src/slashing.rs index 199e34b31c3b4..36a476d655ae7 100644 --- a/frame/staking/src/slashing.rs +++ b/frame/staking/src/slashing.rs @@ -413,7 +413,6 @@ fn slash_nominators( spans.end_span(params.now); } } - nominators_slashed.push((stash.clone(), nom_slashed)); } From 1f64829c6b4f3d1c01ab633676f9949ff0d79377 Mon Sep 17 00:00:00 2001 From: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Tue, 8 Nov 2022 11:31:55 +0000 Subject: [PATCH 09/16] Update frame/staking/src/pallet/impls.rs --- frame/staking/src/pallet/impls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/staking/src/pallet/impls.rs b/frame/staking/src/pallet/impls.rs index cc8e1be8ba4ea..975556ed48ea2 100644 --- a/frame/staking/src/pallet/impls.rs +++ b/frame/staking/src/pallet/impls.rs @@ -719,7 +719,7 @@ impl Pallet { all_voters.push((voter.clone(), weight_of(&voter), targets)); nominators_taken.saturating_inc(); } else { - // A nominator's nominations might become empty due to slashing. + // Technically should never happen, but not much we can do about it. } } else if Validators::::contains_key(&voter) { // if this voter is a validator: From 67ef21d00c8a24a6394fc1a998903699ed2c9add Mon Sep 17 00:00:00 2001 From: kianenigma Date: Thu, 10 Nov 2022 02:35:26 +0000 Subject: [PATCH 10/16] update lock --- Cargo.lock | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 024deaab43947..96016ee439239 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2885,18 +2885,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hex-literal" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" - -[[package]] -name = "hex_fmt" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" - [[package]] name = "hmac" version = "0.8.1" @@ -7359,12 +7347,8 @@ version = "0.10.0-dev" dependencies = [ "env_logger", "frame-support", - "hex-literal", - "jsonrpsee", - "kitchensink-runtime", "log", "pallet-elections-phragmen", - "pallet-staking", "parity-scale-codec", "serde", "serde_json", From fd03b10628786cf9ef88be73c3ede465948bab7d Mon Sep 17 00:00:00 2001 From: kianenigma Date: Sat, 10 Dec 2022 14:14:40 +0000 Subject: [PATCH 11/16] fix all tests --- frame/staking/src/pallet/impls.rs | 2 +- frame/staking/src/tests.rs | 225 ++++++++++++++---------------- 2 files changed, 103 insertions(+), 124 deletions(-) diff --git a/frame/staking/src/pallet/impls.rs b/frame/staking/src/pallet/impls.rs index 36f06f21febe2..057ba4cd27eb7 100644 --- a/frame/staking/src/pallet/impls.rs +++ b/frame/staking/src/pallet/impls.rs @@ -742,7 +742,7 @@ impl Pallet { all_voters.push((voter.clone(), weight_of(&voter), targets)); nominators_taken.saturating_inc(); } else { - // Technically should never happen, but not much we can do about it. + // Technically should never happen, but not much we can do about it. } } else if Validators::::contains_key(&voter) { // if this voter is a validator: diff --git a/frame/staking/src/tests.rs b/frame/staking/src/tests.rs index 42de5c4a41c51..3e0a62f53d886 100644 --- a/frame/staking/src/tests.rs +++ b/frame/staking/src/tests.rs @@ -2855,8 +2855,8 @@ fn deferred_slashes_are_deferred() { &[Perbill::from_percent(10)], ); - // nominations are removed regardless of the deferring. - assert_eq!(Staking::nominators(101).unwrap().targets, vec![21]); + // nominations are not removed regardless of the deferring. + assert_eq!(Staking::nominators(101).unwrap().targets, vec![11, 21]); assert_eq!(Balances::free_balance(11), 1000); assert_eq!(Balances::free_balance(101), 2000); @@ -2910,7 +2910,6 @@ fn retroactive_deferred_slashes_two_eras_before() { 1, // should be deferred for two full eras, and applied at the beginning of era 4. DisableStrategy::Never, ); - assert_eq!(Staking::nominators(101).unwrap().targets, vec![21]); mock::start_active_era(4); @@ -3214,6 +3213,22 @@ fn slash_kicks_validators_not_nominators_and_disables_nominator_for_kicked_valid &[Perbill::from_percent(10)], ); + assert_eq!( + staking_events_since_last_call(), + vec![ + Event::StakersElected, + Event::EraPaid { era_index: 0, validator_payout: 11075, remainder: 33225 }, + Event::Chilled { stash: 11 }, + Event::SlashReported { + validator: 11, + fraction: Perbill::from_percent(10), + slash_era: 1 + }, + Event::Slashed { staker: 11, amount: 100 }, + Event::Slashed { staker: 101, amount: 12 }, + ] + ); + // post-slash balance let nominator_slash_amount_11 = 125 / 10; assert_eq!(Balances::free_balance(11), 900); @@ -3222,9 +3237,6 @@ fn slash_kicks_validators_not_nominators_and_disables_nominator_for_kicked_valid // check that validator was chilled. assert!(::Validators::iter().all(|(stash, _)| stash != 11)); - // and make sure the nominator's approval vote is dropped. - assert!(!Staking::nominators(101).unwrap().targets.contains(&11)); - // actually re-bond the slashed validator assert_ok!(Staking::validate(RuntimeOrigin::signed(10), Default::default())); @@ -3232,11 +3244,12 @@ fn slash_kicks_validators_not_nominators_and_disables_nominator_for_kicked_valid let exposure_11 = Staking::eras_stakers(active_era(), &11); let exposure_21 = Staking::eras_stakers(active_era(), &21); - // 10 is re-elected, but without the support of 100 - assert_eq!(exposure_11.total, 900); - - // 20 is re-elected, with the (almost) entire support of 100 - assert_eq!(exposure_21.total, 1000 + 500 - nominator_slash_amount_11); + // 11's own expo is reduced. sum of support from 11 is less (448), which is 500 + // 900 + 146 + assert!(matches!(exposure_11, Exposure { own: 900, total: 1046, .. })); + // 1000 + 342 + assert!(matches!(exposure_21, Exposure { own: 1000, total: 1342, .. })); + assert_eq!(500 - 146 - 342, nominator_slash_amount_11); }); } @@ -3264,8 +3277,30 @@ fn non_slashable_offence_doesnt_disable_validator() { &[Perbill::from_percent(25)], ); - // it DOES affect the nominator. - assert_eq!(Staking::nominators(101).unwrap().targets, vec![11]); + // it DOES NOT affect the nominator. + assert_eq!(Staking::nominators(101).unwrap().targets, vec![11, 21]); + + assert_eq!( + staking_events_since_last_call(), + vec![ + Event::StakersElected, + Event::EraPaid { era_index: 0, validator_payout: 11075, remainder: 33225 }, + Event::Chilled { stash: 11 }, + Event::SlashReported { + validator: 11, + fraction: Perbill::from_percent(0), + slash_era: 1 + }, + Event::Chilled { stash: 21 }, + Event::SlashReported { + validator: 21, + fraction: Perbill::from_percent(25), + slash_era: 1 + }, + Event::Slashed { staker: 21, amount: 250 }, + Event::Slashed { staker: 101, amount: 94 } + ] + ); // the offence for validator 10 wasn't slashable so it wasn't disabled assert!(!is_disabled(10)); @@ -3293,7 +3328,7 @@ fn slashing_independent_of_disabling_validator() { DisableStrategy::Always, ); - // it still does NOT affect the nominator. + // nomination remains untouched. assert_eq!(Staking::nominators(101).unwrap().targets, vec![11, 21]); // offence that slashes 25% of the bond, BUT not disabling @@ -3304,8 +3339,30 @@ fn slashing_independent_of_disabling_validator() { DisableStrategy::Never, ); - // it still DOES affect the nominator. - assert_eq!(Staking::nominators(101).unwrap().targets, vec![11]); + // nomination remains untouched. + assert_eq!(Staking::nominators(101).unwrap().targets, vec![11, 21]); + + assert_eq!( + staking_events_since_last_call(), + vec![ + Event::StakersElected, + Event::EraPaid { era_index: 0, validator_payout: 11075, remainder: 33225 }, + Event::Chilled { stash: 11 }, + Event::SlashReported { + validator: 11, + fraction: Perbill::from_percent(0), + slash_era: 1 + }, + Event::Chilled { stash: 21 }, + Event::SlashReported { + validator: 21, + fraction: Perbill::from_percent(25), + slash_era: 1 + }, + Event::Slashed { staker: 21, amount: 250 }, + Event::Slashed { staker: 101, amount: 94 } + ] + ); // the offence for validator 10 was explicitly disabled assert!(is_disabled(10)); @@ -3381,8 +3438,8 @@ fn disabled_validators_are_kept_disabled_for_whole_era() { &[Perbill::from_percent(25)], ); - // nominations are updated. - assert_eq!(Staking::nominators(101).unwrap().targets, vec![11]); + // nominations are not updated. + assert_eq!(Staking::nominators(101).unwrap().targets, vec![11, 21]); // validator 10 should not be disabled since the offence wasn't slashable assert!(!is_disabled(10)); @@ -3401,8 +3458,8 @@ fn disabled_validators_are_kept_disabled_for_whole_era() { &[Perbill::from_percent(25)], ); - // nominations are updated. - assert_eq!(Staking::nominators(101).unwrap().targets, vec![]); + // nominations are not updated. + assert_eq!(Staking::nominators(101).unwrap().targets, vec![11, 21]); advance_session(); @@ -4391,11 +4448,12 @@ mod election_data_provider { let validators = 2000; let mut nominators = 1000; - while ::WeightInfo::get_npos_voters(validators, nominators) - .all_lt(Weight::from_parts( + while ::WeightInfo::get_npos_voters(validators, nominators).all_lt( + Weight::from_parts( 2u64 * frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND, u64::MAX, - )) { + ), + ) { nominators += 1; } @@ -4417,49 +4475,6 @@ mod election_data_provider { }) } - #[test] - fn voters_exclude_slashed() { - ExtBuilder::default().build_and_execute(|| { - assert_eq!(Staking::nominators(101).unwrap().targets, vec![11, 21]); - assert_eq!( - ::electing_voters(None) - .unwrap() - .iter() - .find(|x| x.0 == 101) - .unwrap() - .2, - vec![11, 21] - ); - - start_active_era(1); - add_slash(&11); - - // 11 is gone. - start_active_era(2); - assert_eq!( - ::electing_voters(None) - .unwrap() - .iter() - .find(|x| x.0 == 101) - .unwrap() - .2, - vec![21] - ); - - // resubmit and it is back - assert_ok!(Staking::nominate(RuntimeOrigin::signed(100), vec![11, 21])); - assert_eq!( - ::electing_voters(None) - .unwrap() - .iter() - .find(|x| x.0 == 101) - .unwrap() - .2, - vec![11, 21] - ); - }) - } - #[test] fn respects_snapshot_len_limits() { ExtBuilder::default() @@ -4496,10 +4511,26 @@ mod election_data_provider { fn only_iterates_max_2_times_max_allowed_len() { ExtBuilder::default() .nominate(false) - // the other nominators only nominate 21 - .add_staker(61, 60, 2_000, StakerStatus::::Nominator(vec![21])) - .add_staker(71, 70, 2_000, StakerStatus::::Nominator(vec![21])) - .add_staker(81, 80, 2_000, StakerStatus::::Nominator(vec![21])) + // the best way to invalidate a bunch of nominators is to have them nominate a lot of + // ppl, but then lower the MaxNomination limit. + .add_staker( + 61, + 60, + 2_000, + StakerStatus::::Nominator(vec![21, 22, 23, 24, 25]), + ) + .add_staker( + 71, + 70, + 2_000, + StakerStatus::::Nominator(vec![21, 22, 23, 24, 25]), + ) + .add_staker( + 81, + 80, + 2_000, + StakerStatus::::Nominator(vec![21, 22, 23, 24, 25]), + ) .build_and_execute(|| { // all voters ordered by stake, assert_eq!( @@ -4507,10 +4538,7 @@ mod election_data_provider { vec![61, 71, 81, 11, 21, 31] ); - run_to_block(25); - - // slash 21, the only validator nominated by our first 3 nominators - add_slash(&21); + MaxNominations::set(2); // we want 2 voters now, and in maximum we allow 4 iterations. This is what happens: // 61 is pruned; @@ -4530,55 +4558,6 @@ mod election_data_provider { }); } - // Even if some of the higher staked nominators are slashed, we still get up to max len voters - // by adding more lower staked nominators. In other words, we assert that we keep on adding - // valid nominators until we reach max len voters; which is opposed to simply stopping after we - // have iterated max len voters, but not adding all of them to voters due to some nominators not - // having valid targets. - #[test] - fn get_max_len_voters_even_if_some_nominators_are_slashed() { - ExtBuilder::default() - .nominate(false) - .add_staker(61, 60, 20, StakerStatus::::Nominator(vec![21])) - .add_staker(71, 70, 10, StakerStatus::::Nominator(vec![11, 21])) - .add_staker(81, 80, 10, StakerStatus::::Nominator(vec![11, 21])) - .build_and_execute(|| { - // given our voters ordered by stake, - assert_eq!( - ::VoterList::iter().collect::>(), - vec![11, 21, 31, 61, 71, 81] - ); - - // we take 4 voters - assert_eq!( - Staking::electing_voters(Some(4)) - .unwrap() - .iter() - .map(|(stash, _, _)| stash) - .copied() - .collect::>(), - vec![11, 21, 31, 61], - ); - - // roll to session 5 - run_to_block(25); - - // slash 21, the only validator nominated by 61. - add_slash(&21); - - // we take 4 voters; 71 and 81 are replacing the ejected ones. - assert_eq!( - Staking::electing_voters(Some(4)) - .unwrap() - .iter() - .map(|(stash, _, _)| stash) - .copied() - .collect::>(), - vec![11, 31, 71, 81], - ); - }); - } - #[test] fn estimate_next_election_works() { ExtBuilder::default().session_per_era(5).period(5).build_and_execute(|| { From 15257444cd2aa2df124ad4b9e1d431dd6b8a970e Mon Sep 17 00:00:00 2001 From: kianenigma Date: Sat, 10 Dec 2022 14:29:21 +0000 Subject: [PATCH 12/16] review comments --- frame/staking/src/benchmarking.rs | 4 ++-- frame/staking/src/pallet/impls.rs | 5 ----- frame/staking/src/slashing.rs | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/frame/staking/src/benchmarking.rs b/frame/staking/src/benchmarking.rs index d9512a77dd9f3..8409b5413f992 100644 --- a/frame/staking/src/benchmarking.rs +++ b/frame/staking/src/benchmarking.rs @@ -793,9 +793,9 @@ benchmarks! { get_npos_voters { // number of validator intention. we will iterate all of them. - let v in (MaxValidators::::get() / 4) .. MaxValidators::::get(); + let v in (MaxValidators::::get() / 2) .. MaxValidators::::get(); // number of nominator intention. we will iterate all of them. - let n in (MaxNominators::::get() / 4) .. MaxNominators::::get(); + let n in (MaxNominators::::get() / 2) .. MaxNominators::::get(); let validators = create_validators_with_nominators_for_era::( v, n, T::MaxNominations::get() as usize, false, None diff --git a/frame/staking/src/pallet/impls.rs b/frame/staking/src/pallet/impls.rs index 057ba4cd27eb7..3d4bcbfe3589b 100644 --- a/frame/staking/src/pallet/impls.rs +++ b/frame/staking/src/pallet/impls.rs @@ -705,11 +705,6 @@ impl Pallet { /// `maybe_max_len` can imposes a cap on the number of voters returned; /// /// This function is self-weighing as [`DispatchClass::Mandatory`]. - /// - /// ### Slashing - /// - /// All votes that have been submitted before the last non-zero slash of the corresponding - /// target are *auto-chilled*, but still count towards the limit imposed by `maybe_max_len`. pub fn get_npos_voters(maybe_max_len: Option) -> Vec> { let max_allowed_len = { let all_voter_count = T::VoterList::count() as usize; diff --git a/frame/staking/src/slashing.rs b/frame/staking/src/slashing.rs index 36a476d655ae7..aeea0a1a58c63 100644 --- a/frame/staking/src/slashing.rs +++ b/frame/staking/src/slashing.rs @@ -241,7 +241,7 @@ pub(crate) fn compute_slash( let prior_slash_p = as Store>::ValidatorSlashInEra::get(¶ms.slash_era, params.stash) - .map_or(Zero::zero(), |(p, _)| p); + .map_or(Zero::zero(), |(prior_slash_proportion, _)| prior_slash_proportion); // compare slash proportions rather than slash values to avoid issues due to rounding // error. From a254b23e1d67f3da16b8aee5b73bf63ea79932e8 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Sat, 10 Dec 2022 14:34:09 +0000 Subject: [PATCH 13/16] fmt --- frame/staking/src/pallet/impls.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frame/staking/src/pallet/impls.rs b/frame/staking/src/pallet/impls.rs index 3d4bcbfe3589b..f468fc9b4eb83 100644 --- a/frame/staking/src/pallet/impls.rs +++ b/frame/staking/src/pallet/impls.rs @@ -767,10 +767,7 @@ impl Pallet { // all_voters should have not re-allocated. debug_assert!(all_voters.capacity() == max_allowed_len); - Self::register_weight(T::WeightInfo::get_npos_voters( - validators_taken, - nominators_taken, - )); + Self::register_weight(T::WeightInfo::get_npos_voters(validators_taken, nominators_taken)); log!( info, From 99396f3677ec40686e1c5445296c06a47880cd1e Mon Sep 17 00:00:00 2001 From: kianenigma Date: Sat, 10 Dec 2022 14:56:38 +0000 Subject: [PATCH 14/16] fix offence bench --- frame/offences/benchmarking/src/lib.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/frame/offences/benchmarking/src/lib.rs b/frame/offences/benchmarking/src/lib.rs index 555ec42882ee1..e5ec2952f8114 100644 --- a/frame/offences/benchmarking/src/lib.rs +++ b/frame/offences/benchmarking/src/lib.rs @@ -308,17 +308,20 @@ benchmarks! { let slash_amount = slash_fraction * bond_amount; let reward_amount = slash_amount.saturating_mul(1 + n) / 2; let reward = reward_amount / r; + let slash_report = |id| core::iter::once( + ::RuntimeEvent::from(StakingEvent::::SlashReported{ validator: id, fraction: slash_fraction, slash_era: 0}) + ); let slash = |id| core::iter::once( - ::RuntimeEvent::from(StakingEvent::::Slashed{staker: id, amount: BalanceOf::::from(slash_amount)}) + ::RuntimeEvent::from(StakingEvent::::Slashed{ staker: id, amount: BalanceOf::::from(slash_amount) }) ); let balance_slash = |id| core::iter::once( - ::RuntimeEvent::from(pallet_balances::Event::::Slashed{who: id, amount: slash_amount.into()}) + ::RuntimeEvent::from(pallet_balances::Event::::Slashed{ who: id, amount: slash_amount.into() }) ); let chill = |id| core::iter::once( - ::RuntimeEvent::from(StakingEvent::::Chilled{stash: id}) + ::RuntimeEvent::from(StakingEvent::::Chilled{ stash: id }) ); let balance_deposit = |id, amount: u32| - ::RuntimeEvent::from(pallet_balances::Event::::Deposit{who: id, amount: amount.into()}); + ::RuntimeEvent::from(pallet_balances::Event::::Deposit{ who: id, amount: amount.into() }); let mut first = true; let slash_events = raw_offenders.into_iter() .flat_map(|offender| { @@ -328,6 +331,7 @@ benchmarks! { }); let mut events = chill(offender.stash.clone()).map(Into::into) + .chain(slash_report(offender.stash.clone()).map(Into::into)) .chain(balance_slash(offender.stash.clone()).map(Into::into)) .chain(slash(offender.stash).map(Into::into)) .chain(nom_slashes) @@ -407,6 +411,7 @@ benchmarks! { System::::event_count(), 0 + 1 // offence + 3 // reporter (reward + endowment) + + 1 // offenders reported + 2 // offenders slashed + 1 // offenders chilled + 2 * n // nominators slashed @@ -443,6 +448,7 @@ benchmarks! { System::::event_count(), 0 + 1 // offence + 3 // reporter (reward + endowment) + + 1 // offenders reported + 2 // offenders slashed + 1 // offenders chilled + 2 * n // nominators slashed From df93a9480dca85a2453bb5e34c0964981e747943 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Mon, 12 Dec 2022 12:12:27 +0000 Subject: [PATCH 15/16] clippy --- frame/staking/src/pallet/impls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/staking/src/pallet/impls.rs b/frame/staking/src/pallet/impls.rs index f468fc9b4eb83..6729a2ca32ecc 100644 --- a/frame/staking/src/pallet/impls.rs +++ b/frame/staking/src/pallet/impls.rs @@ -1272,7 +1272,7 @@ where Self::deposit_event(Event::::SlashReported { validator: stash.clone(), - fraction: slash_fraction.clone(), + fraction: *slash_fraction, slash_era, }); From 6b61c24c227d751e72bfd6456f1cd253f27e301c Mon Sep 17 00:00:00 2001 From: command-bot <> Date: Mon, 12 Dec 2022 16:25:38 +0000 Subject: [PATCH 16/16] ".git/.scripts/bench-bot.sh" pallet dev pallet_staking --- frame/staking/src/weights.rs | 629 +++++++++++++++++------------------ 1 file changed, 313 insertions(+), 316 deletions(-) diff --git a/frame/staking/src/weights.rs b/frame/staking/src/weights.rs index 2d1bf86056f86..21fc3d6f077bc 100644 --- a/frame/staking/src/weights.rs +++ b/frame/staking/src/weights.rs @@ -18,24 +18,25 @@ //! Autogenerated weights for pallet_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-11-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-12-12, 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: -// ./target/production/substrate +// /home/benchbot/cargo_target_dir/production/substrate // benchmark // pallet -// --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_staking // --extrinsic=* // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./frame/staking/src/weights.rs +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/substrate/.git/.artifacts/bench.json +// --pallet=pallet_staking +// --chain=dev // --header=./HEADER-APACHE2 +// --output=./frame/staking/src/weights.rs // --template=./.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] @@ -70,8 +71,8 @@ pub trait WeightInfo { fn rebond(l: u32, ) -> Weight; fn reap_stash(s: u32, ) -> Weight; fn new_era(v: u32, n: u32, ) -> Weight; - fn get_npos_voters(v: u32, n: u32) -> Weight; - fn get_npos_targets(v: u32) -> Weight; + fn get_npos_voters(v: u32, n: u32, ) -> Weight; + fn get_npos_targets(v: u32, ) -> Weight; fn set_staking_configs_all_set() -> Weight; fn set_staking_configs_all_remove() -> Weight; fn chill_other() -> Weight; @@ -87,10 +88,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn bond() -> Weight { - // Minimum execution time: 53_097 nanoseconds. - Weight::from_ref_time(53_708_000 as u64) - .saturating_add(T::DbWeight::get().reads(4 as u64)) - .saturating_add(T::DbWeight::get().writes(4 as u64)) + // Minimum execution time: 56_034 nanoseconds. + Weight::from_ref_time(56_646_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) @@ -98,10 +99,10 @@ impl WeightInfo for SubstrateWeight { // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra() -> Weight { - // Minimum execution time: 92_199 nanoseconds. - Weight::from_ref_time(93_541_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(7 as u64)) + // Minimum execution time: 94_354 nanoseconds. + Weight::from_ref_time(95_318_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) @@ -113,10 +114,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListBags (r:2 w:2) fn unbond() -> Weight { - // Minimum execution time: 98_227 nanoseconds. - Weight::from_ref_time(99_070_000 as u64) - .saturating_add(T::DbWeight::get().reads(12 as u64)) - .saturating_add(T::DbWeight::get().writes(8 as u64)) + // Minimum execution time: 99_960 nanoseconds. + Weight::from_ref_time(101_022_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) @@ -124,12 +125,12 @@ impl WeightInfo for SubstrateWeight { // 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: 45_058 nanoseconds. - Weight::from_ref_time(46_592_713 as u64) - // Standard Error: 413 - .saturating_add(Weight::from_ref_time(63_036 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: 45_819 nanoseconds. + Weight::from_ref_time(48_073_614) + // Standard Error: 1_410 + .saturating_add(Weight::from_ref_time(62_881).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) @@ -146,10 +147,10 @@ impl WeightInfo for SubstrateWeight { // 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: 86_087 nanoseconds. - Weight::from_ref_time(87_627_894 as u64) - .saturating_add(T::DbWeight::get().reads(13 as u64)) - .saturating_add(T::DbWeight::get().writes(11 as u64)) + // Minimum execution time: 86_035 nanoseconds. + Weight::from_ref_time(89_561_735) + .saturating_add(T::DbWeight::get().reads(13)) + .saturating_add(T::DbWeight::get().writes(11)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinValidatorBond (r:1 w:0) @@ -163,22 +164,22 @@ impl WeightInfo for SubstrateWeight { // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForValidators (r:1 w:1) fn validate() -> Weight { - // Minimum execution time: 67_690 nanoseconds. - Weight::from_ref_time(68_348_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(5 as u64)) + // Minimum execution time: 68_748 nanoseconds. + Weight::from_ref_time(69_285_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 { - // Minimum execution time: 43_512 nanoseconds. - Weight::from_ref_time(47_300_477 as u64) - // Standard Error: 11_609 - .saturating_add(Weight::from_ref_time(6_770_405 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: 41_641 nanoseconds. + Weight::from_ref_time(48_919_231) + // Standard Error: 11_548 + .saturating_add(Weight::from_ref_time(6_901_201).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) @@ -193,13 +194,13 @@ impl WeightInfo for SubstrateWeight { // Storage: Staking CounterForNominators (r:1 w:1) /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { - // Minimum execution time: 74_296 nanoseconds. - Weight::from_ref_time(73_201_782 as u64) - // Standard Error: 5_007 - .saturating_add(Weight::from_ref_time(2_810_370 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: 75_097 nanoseconds. + Weight::from_ref_time(74_052_497) + // Standard Error: 6_784 + .saturating_add(Weight::from_ref_time(2_842_146).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) @@ -209,59 +210,59 @@ impl WeightInfo for SubstrateWeight { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - // Minimum execution time: 66_605 nanoseconds. - Weight::from_ref_time(67_279_000 as u64) - .saturating_add(T::DbWeight::get().reads(8 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 67_307 nanoseconds. + Weight::from_ref_time(67_838_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 { - // Minimum execution time: 18_897 nanoseconds. - Weight::from_ref_time(19_357_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 18_831 nanoseconds. + Weight::from_ref_time(19_047_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 { - // Minimum execution time: 26_509 nanoseconds. - Weight::from_ref_time(26_961_000 as u64) - .saturating_add(T::DbWeight::get().reads(3 as u64)) - .saturating_add(T::DbWeight::get().writes(3 as u64)) + // Minimum execution time: 27_534 nanoseconds. + Weight::from_ref_time(27_806_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 { - // Minimum execution time: 5_025 nanoseconds. - Weight::from_ref_time(5_240_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 5_211 nanoseconds. + Weight::from_ref_time(5_372_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_no_eras() -> Weight { - // Minimum execution time: 5_107 nanoseconds. - Weight::from_ref_time(5_320_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 5_382 nanoseconds. + Weight::from_ref_time(5_654_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era() -> Weight { - // Minimum execution time: 5_094 nanoseconds. - Weight::from_ref_time(5_377_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 5_618 nanoseconds. + Weight::from_ref_time(5_714_000) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era_always() -> Weight { - // Minimum execution time: 5_219 nanoseconds. - Weight::from_ref_time(5_434_000 as u64) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 5_589 nanoseconds. + Weight::from_ref_time(5_776_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 { - // Minimum execution time: 5_122 nanoseconds. - Weight::from_ref_time(5_977_533 as u64) - // Standard Error: 34 - .saturating_add(Weight::from_ref_time(10_205 as u64).saturating_mul(v as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 5_541 nanoseconds. + Weight::from_ref_time(6_479_253) + // Standard Error: 49 + .saturating_add(Weight::from_ref_time(10_125).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) @@ -278,23 +279,23 @@ impl WeightInfo for SubstrateWeight { // Storage: Staking SpanSlash (r:0 w:2) /// The range of component `s` is `[0, 100]`. fn force_unstake(s: u32, ) -> Weight { - // Minimum execution time: 80_216 nanoseconds. - Weight::from_ref_time(86_090_609 as u64) - // Standard Error: 2_006 - .saturating_add(Weight::from_ref_time(1_039_308 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: 81_041 nanoseconds. + Weight::from_ref_time(88_526_481) + // Standard Error: 11_494 + .saturating_add(Weight::from_ref_time(1_095_933).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 { - // Minimum execution time: 92_034 nanoseconds. - Weight::from_ref_time(896_585_370 as u64) - // Standard Error: 58_231 - .saturating_add(Weight::from_ref_time(4_908_277 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: 92_308 nanoseconds. + Weight::from_ref_time(900_351_007) + // Standard Error: 59_145 + .saturating_add(Weight::from_ref_time(4_944_988).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 ErasValidatorReward (r:1 w:0) @@ -307,14 +308,14 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) /// The range of component `n` is `[0, 256]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { - // Minimum execution time: 127_936 nanoseconds. - Weight::from_ref_time(184_556_084 as u64) - // Standard Error: 26_981 - .saturating_add(Weight::from_ref_time(21_786_304 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(9 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: 131_855 nanoseconds. + Weight::from_ref_time(197_412_779) + // Standard Error: 21_283 + .saturating_add(Weight::from_ref_time(22_093_758).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 ErasValidatorReward (r:1 w:0) @@ -328,14 +329,14 @@ impl WeightInfo for SubstrateWeight { // Storage: Balances Locks (r:1 w:1) /// The range of component `n` is `[0, 256]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { - // Minimum execution time: 157_778 nanoseconds. - Weight::from_ref_time(223_306_359 as u64) - // Standard Error: 27_216 - .saturating_add(Weight::from_ref_time(30_612_663 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(10 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: 163_118 nanoseconds. + Weight::from_ref_time(229_356_697) + // Standard Error: 30_740 + .saturating_add(Weight::from_ref_time(31_575_360).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) @@ -345,12 +346,12 @@ impl WeightInfo for SubstrateWeight { // Storage: VoterList ListBags (r:2 w:2) /// The range of component `l` is `[1, 32]`. fn rebond(l: u32, ) -> Weight { - // Minimum execution time: 92_880 nanoseconds. - Weight::from_ref_time(94_434_663 as u64) - // Standard Error: 1_734 - .saturating_add(Weight::from_ref_time(34_453 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: 94_048 nanoseconds. + Weight::from_ref_time(95_784_236) + // Standard Error: 2_313 + .saturating_add(Weight::from_ref_time(52_798).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) @@ -367,16 +368,15 @@ impl WeightInfo for SubstrateWeight { // Storage: Staking SpanSlash (r:0 w:1) /// The range of component `s` is `[1, 100]`. fn reap_stash(s: u32, ) -> Weight { - // Minimum execution time: 92_334 nanoseconds. - Weight::from_ref_time(95_207_614 as u64) - // Standard Error: 1_822 - .saturating_add(Weight::from_ref_time(1_036_787 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: 93_342 nanoseconds. + Weight::from_ref_time(95_756_184) + // Standard Error: 2_067 + .saturating_add(Weight::from_ref_time(1_090_785).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:200 w:0) // Storage: VoterList ListNodes (r:101 w:0) // Storage: Staking Nominators (r:101 w:0) @@ -395,20 +395,19 @@ impl WeightInfo for SubstrateWeight { /// The range of component `v` is `[1, 10]`. /// The range of component `n` is `[0, 100]`. fn new_era(v: u32, n: u32, ) -> Weight { - // Minimum execution time: 535_169 nanoseconds. - Weight::from_ref_time(548_667_000 as u64) - // Standard Error: 1_759_252 - .saturating_add(Weight::from_ref_time(58_283_319 as u64).saturating_mul(v as u64)) - // Standard Error: 175_299 - .saturating_add(Weight::from_ref_time(13_578_512 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(207 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(3 as u64)) - .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(v as u64))) + // Minimum execution time: 506_874 nanoseconds. + Weight::from_ref_time(507_798_000) + // Standard Error: 1_802_261 + .saturating_add(Weight::from_ref_time(59_874_736).saturating_mul(v.into())) + // Standard Error: 179_585 + .saturating_add(Weight::from_ref_time(13_668_574).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(206)) + .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(3)) + .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:200 w:0) // Storage: VoterList ListNodes (r:1500 w:0) // Storage: Staking Nominators (r:1500 w:0) @@ -417,27 +416,27 @@ impl WeightInfo for SubstrateWeight { // Storage: Staking Ledger (r:1500 w:0) /// 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) -> Weight { - Weight::from_ref_time(24_930_788_000 as u64) - // Standard Error: 266_386 - .saturating_add(Weight::from_ref_time(6_687_552 as u64).saturating_mul(v as u64)) - // Standard Error: 266_386 - .saturating_add(Weight::from_ref_time(6_839_134 as u64).saturating_mul(n as u64)) - .saturating_add(T::DbWeight::get().reads(6722 as u64)) - .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(v as u64))) - .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(n as u64))) + fn get_npos_voters(v: u32, n: u32, ) -> Weight { + // Minimum execution time: 24_634_585 nanoseconds. + Weight::from_ref_time(24_718_377_000) + // Standard Error: 324_839 + .saturating_add(Weight::from_ref_time(3_654_508).saturating_mul(v.into())) + // Standard Error: 324_839 + .saturating_add(Weight::from_ref_time(2_927_535).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(201)) + .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) } // Storage: Staking CounterForValidators (r:1 w:0) // Storage: Staking Validators (r:501 w:0) /// The range of component `v` is `[500, 1000]`. fn get_npos_targets(v: u32, ) -> Weight { - // Minimum execution time: 4_905_036 nanoseconds. - Weight::from_ref_time(78_163_554 as u64) - // Standard Error: 23_723 - .saturating_add(Weight::from_ref_time(9_784_870 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))) + // Minimum execution time: 4_805_490 nanoseconds. + Weight::from_ref_time(118_475_494) + // Standard Error: 26_332 + .saturating_add(Weight::from_ref_time(9_635_188).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -446,9 +445,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_set() -> Weight { - // Minimum execution time: 10_096 nanoseconds. - Weight::from_ref_time(10_538_000 as u64) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 10_816 nanoseconds. + Weight::from_ref_time(11_242_000) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -457,9 +456,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_remove() -> Weight { - // Minimum execution time: 9_045 nanoseconds. - Weight::from_ref_time(9_379_000 as u64) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 9_581 nanoseconds. + Weight::from_ref_time(10_383_000) + .saturating_add(T::DbWeight::get().writes(6)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) @@ -472,18 +471,18 @@ impl WeightInfo for SubstrateWeight { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill_other() -> Weight { - // Minimum execution time: 81_457 nanoseconds. - Weight::from_ref_time(82_410_000 as u64) - .saturating_add(T::DbWeight::get().reads(11 as u64)) - .saturating_add(T::DbWeight::get().writes(6 as u64)) + // Minimum execution time: 83_669 nanoseconds. + Weight::from_ref_time(84_772_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 { - // Minimum execution time: 19_684 nanoseconds. - Weight::from_ref_time(20_059_000 as u64) - .saturating_add(T::DbWeight::get().reads(2 as u64)) - .saturating_add(T::DbWeight::get().writes(1 as u64)) + // Minimum execution time: 20_553 nanoseconds. + Weight::from_ref_time(20_933_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } } @@ -495,10 +494,10 @@ impl WeightInfo for () { // Storage: Balances Locks (r:1 w:1) // Storage: Staking Payee (r:0 w:1) fn bond() -> Weight { - // Minimum execution time: 53_097 nanoseconds. - Weight::from_ref_time(53_708_000 as u64) - .saturating_add(RocksDbWeight::get().reads(4 as u64)) - .saturating_add(RocksDbWeight::get().writes(4 as u64)) + // Minimum execution time: 56_034 nanoseconds. + Weight::from_ref_time(56_646_000) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(4)) } // Storage: Staking Bonded (r:1 w:0) // Storage: Staking Ledger (r:1 w:1) @@ -506,10 +505,10 @@ impl WeightInfo for () { // Storage: VoterList ListNodes (r:3 w:3) // Storage: VoterList ListBags (r:2 w:2) fn bond_extra() -> Weight { - // Minimum execution time: 92_199 nanoseconds. - Weight::from_ref_time(93_541_000 as u64) - .saturating_add(RocksDbWeight::get().reads(8 as u64)) - .saturating_add(RocksDbWeight::get().writes(7 as u64)) + // Minimum execution time: 94_354 nanoseconds. + Weight::from_ref_time(95_318_000) + .saturating_add(RocksDbWeight::get().reads(8)) + .saturating_add(RocksDbWeight::get().writes(7)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking Nominators (r:1 w:0) @@ -521,10 +520,10 @@ impl WeightInfo for () { // Storage: Staking Bonded (r:1 w:0) // Storage: VoterList ListBags (r:2 w:2) fn unbond() -> Weight { - // Minimum execution time: 98_227 nanoseconds. - Weight::from_ref_time(99_070_000 as u64) - .saturating_add(RocksDbWeight::get().reads(12 as u64)) - .saturating_add(RocksDbWeight::get().writes(8 as u64)) + // Minimum execution time: 99_960 nanoseconds. + Weight::from_ref_time(101_022_000) + .saturating_add(RocksDbWeight::get().reads(12)) + .saturating_add(RocksDbWeight::get().writes(8)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -532,12 +531,12 @@ impl WeightInfo for () { // 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: 45_058 nanoseconds. - Weight::from_ref_time(46_592_713 as u64) - // Standard Error: 413 - .saturating_add(Weight::from_ref_time(63_036 as u64).saturating_mul(s as u64)) - .saturating_add(RocksDbWeight::get().reads(4 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) + // Minimum execution time: 45_819 nanoseconds. + Weight::from_ref_time(48_073_614) + // Standard Error: 1_410 + .saturating_add(Weight::from_ref_time(62_881).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(3)) } // Storage: Staking Ledger (r:1 w:1) // Storage: Staking CurrentEra (r:1 w:0) @@ -554,10 +553,10 @@ impl WeightInfo for () { // 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: 86_087 nanoseconds. - Weight::from_ref_time(87_627_894 as u64) - .saturating_add(RocksDbWeight::get().reads(13 as u64)) - .saturating_add(RocksDbWeight::get().writes(11 as u64)) + // Minimum execution time: 86_035 nanoseconds. + Weight::from_ref_time(89_561_735) + .saturating_add(RocksDbWeight::get().reads(13)) + .saturating_add(RocksDbWeight::get().writes(11)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinValidatorBond (r:1 w:0) @@ -571,22 +570,22 @@ impl WeightInfo for () { // Storage: VoterList CounterForListNodes (r:1 w:1) // Storage: Staking CounterForValidators (r:1 w:1) fn validate() -> Weight { - // Minimum execution time: 67_690 nanoseconds. - Weight::from_ref_time(68_348_000 as u64) - .saturating_add(RocksDbWeight::get().reads(11 as u64)) - .saturating_add(RocksDbWeight::get().writes(5 as u64)) + // Minimum execution time: 68_748 nanoseconds. + Weight::from_ref_time(69_285_000) + .saturating_add(RocksDbWeight::get().reads(11)) + .saturating_add(RocksDbWeight::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 { - // Minimum execution time: 43_512 nanoseconds. - Weight::from_ref_time(47_300_477 as u64) - // Standard Error: 11_609 - .saturating_add(Weight::from_ref_time(6_770_405 as u64).saturating_mul(k as u64)) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(k as u64))) - .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(k as u64))) + // Minimum execution time: 41_641 nanoseconds. + Weight::from_ref_time(48_919_231) + // Standard Error: 11_548 + .saturating_add(Weight::from_ref_time(6_901_201).saturating_mul(k.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(k.into()))) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(k.into()))) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking MinNominatorBond (r:1 w:0) @@ -601,13 +600,13 @@ impl WeightInfo for () { // Storage: Staking CounterForNominators (r:1 w:1) /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { - // Minimum execution time: 74_296 nanoseconds. - Weight::from_ref_time(73_201_782 as u64) - // Standard Error: 5_007 - .saturating_add(Weight::from_ref_time(2_810_370 as u64).saturating_mul(n as u64)) - .saturating_add(RocksDbWeight::get().reads(12 as u64)) - .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(n as u64))) - .saturating_add(RocksDbWeight::get().writes(6 as u64)) + // Minimum execution time: 75_097 nanoseconds. + Weight::from_ref_time(74_052_497) + // Standard Error: 6_784 + .saturating_add(Weight::from_ref_time(2_842_146).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(12)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into()))) + .saturating_add(RocksDbWeight::get().writes(6)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Validators (r:1 w:0) @@ -617,59 +616,59 @@ impl WeightInfo for () { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill() -> Weight { - // Minimum execution time: 66_605 nanoseconds. - Weight::from_ref_time(67_279_000 as u64) - .saturating_add(RocksDbWeight::get().reads(8 as u64)) - .saturating_add(RocksDbWeight::get().writes(6 as u64)) + // Minimum execution time: 67_307 nanoseconds. + Weight::from_ref_time(67_838_000) + .saturating_add(RocksDbWeight::get().reads(8)) + .saturating_add(RocksDbWeight::get().writes(6)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Payee (r:0 w:1) fn set_payee() -> Weight { - // Minimum execution time: 18_897 nanoseconds. - Weight::from_ref_time(19_357_000 as u64) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) + // Minimum execution time: 18_831 nanoseconds. + Weight::from_ref_time(19_047_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking Ledger (r:2 w:2) fn set_controller() -> Weight { - // Minimum execution time: 26_509 nanoseconds. - Weight::from_ref_time(26_961_000 as u64) - .saturating_add(RocksDbWeight::get().reads(3 as u64)) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) + // Minimum execution time: 27_534 nanoseconds. + Weight::from_ref_time(27_806_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) } // Storage: Staking ValidatorCount (r:0 w:1) fn set_validator_count() -> Weight { - // Minimum execution time: 5_025 nanoseconds. - Weight::from_ref_time(5_240_000 as u64) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) + // Minimum execution time: 5_211 nanoseconds. + Weight::from_ref_time(5_372_000) + .saturating_add(RocksDbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_no_eras() -> Weight { - // Minimum execution time: 5_107 nanoseconds. - Weight::from_ref_time(5_320_000 as u64) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) + // Minimum execution time: 5_382 nanoseconds. + Weight::from_ref_time(5_654_000) + .saturating_add(RocksDbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era() -> Weight { - // Minimum execution time: 5_094 nanoseconds. - Weight::from_ref_time(5_377_000 as u64) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) + // Minimum execution time: 5_618 nanoseconds. + Weight::from_ref_time(5_714_000) + .saturating_add(RocksDbWeight::get().writes(1)) } // Storage: Staking ForceEra (r:0 w:1) fn force_new_era_always() -> Weight { - // Minimum execution time: 5_219 nanoseconds. - Weight::from_ref_time(5_434_000 as u64) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) + // Minimum execution time: 5_589 nanoseconds. + Weight::from_ref_time(5_776_000) + .saturating_add(RocksDbWeight::get().writes(1)) } // 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_122 nanoseconds. - Weight::from_ref_time(5_977_533 as u64) - // Standard Error: 34 - .saturating_add(Weight::from_ref_time(10_205 as u64).saturating_mul(v as u64)) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) + // Minimum execution time: 5_541 nanoseconds. + Weight::from_ref_time(6_479_253) + // Standard Error: 49 + .saturating_add(Weight::from_ref_time(10_125).saturating_mul(v.into())) + .saturating_add(RocksDbWeight::get().writes(1)) } // Storage: Staking Bonded (r:1 w:1) // Storage: Staking SlashingSpans (r:1 w:0) @@ -686,23 +685,23 @@ impl WeightInfo for () { // Storage: Staking SpanSlash (r:0 w:2) /// The range of component `s` is `[0, 100]`. fn force_unstake(s: u32, ) -> Weight { - // Minimum execution time: 80_216 nanoseconds. - Weight::from_ref_time(86_090_609 as u64) - // Standard Error: 2_006 - .saturating_add(Weight::from_ref_time(1_039_308 as u64).saturating_mul(s as u64)) - .saturating_add(RocksDbWeight::get().reads(11 as u64)) - .saturating_add(RocksDbWeight::get().writes(12 as u64)) - .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(s as u64))) + // Minimum execution time: 81_041 nanoseconds. + Weight::from_ref_time(88_526_481) + // Standard Error: 11_494 + .saturating_add(Weight::from_ref_time(1_095_933).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(11)) + .saturating_add(RocksDbWeight::get().writes(12)) + .saturating_add(RocksDbWeight::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 { - // Minimum execution time: 92_034 nanoseconds. - Weight::from_ref_time(896_585_370 as u64) - // Standard Error: 58_231 - .saturating_add(Weight::from_ref_time(4_908_277 as u64).saturating_mul(s as u64)) - .saturating_add(RocksDbWeight::get().reads(1 as u64)) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) + // Minimum execution time: 92_308 nanoseconds. + Weight::from_ref_time(900_351_007) + // Standard Error: 59_145 + .saturating_add(Weight::from_ref_time(4_944_988).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) } // Storage: Staking CurrentEra (r:1 w:0) // Storage: Staking ErasValidatorReward (r:1 w:0) @@ -715,14 +714,14 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) /// The range of component `n` is `[0, 256]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { - // Minimum execution time: 127_936 nanoseconds. - Weight::from_ref_time(184_556_084 as u64) - // Standard Error: 26_981 - .saturating_add(Weight::from_ref_time(21_786_304 as u64).saturating_mul(n as u64)) - .saturating_add(RocksDbWeight::get().reads(9 as u64)) - .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(n as u64))) - .saturating_add(RocksDbWeight::get().writes(2 as u64)) - .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(n as u64))) + // Minimum execution time: 131_855 nanoseconds. + Weight::from_ref_time(197_412_779) + // Standard Error: 21_283 + .saturating_add(Weight::from_ref_time(22_093_758).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(9)) + .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(n.into()))) + .saturating_add(RocksDbWeight::get().writes(2)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(n.into()))) } // Storage: Staking CurrentEra (r:1 w:0) // Storage: Staking ErasValidatorReward (r:1 w:0) @@ -736,14 +735,14 @@ impl WeightInfo for () { // Storage: Balances Locks (r:1 w:1) /// The range of component `n` is `[0, 256]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { - // Minimum execution time: 157_778 nanoseconds. - Weight::from_ref_time(223_306_359 as u64) - // Standard Error: 27_216 - .saturating_add(Weight::from_ref_time(30_612_663 as u64).saturating_mul(n as u64)) - .saturating_add(RocksDbWeight::get().reads(10 as u64)) - .saturating_add(RocksDbWeight::get().reads((5 as u64).saturating_mul(n as u64))) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) - .saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(n as u64))) + // Minimum execution time: 163_118 nanoseconds. + Weight::from_ref_time(229_356_697) + // Standard Error: 30_740 + .saturating_add(Weight::from_ref_time(31_575_360).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(10)) + .saturating_add(RocksDbWeight::get().reads((5_u64).saturating_mul(n.into()))) + .saturating_add(RocksDbWeight::get().writes(3)) + .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(n.into()))) } // Storage: Staking Ledger (r:1 w:1) // Storage: Balances Locks (r:1 w:1) @@ -753,12 +752,12 @@ impl WeightInfo for () { // Storage: VoterList ListBags (r:2 w:2) /// The range of component `l` is `[1, 32]`. fn rebond(l: u32, ) -> Weight { - // Minimum execution time: 92_880 nanoseconds. - Weight::from_ref_time(94_434_663 as u64) - // Standard Error: 1_734 - .saturating_add(Weight::from_ref_time(34_453 as u64).saturating_mul(l as u64)) - .saturating_add(RocksDbWeight::get().reads(9 as u64)) - .saturating_add(RocksDbWeight::get().writes(8 as u64)) + // Minimum execution time: 94_048 nanoseconds. + Weight::from_ref_time(95_784_236) + // Standard Error: 2_313 + .saturating_add(Weight::from_ref_time(52_798).saturating_mul(l.into())) + .saturating_add(RocksDbWeight::get().reads(9)) + .saturating_add(RocksDbWeight::get().writes(8)) } // Storage: System Account (r:1 w:1) // Storage: Staking Bonded (r:1 w:1) @@ -775,16 +774,15 @@ impl WeightInfo for () { // Storage: Staking SpanSlash (r:0 w:1) /// The range of component `s` is `[1, 100]`. fn reap_stash(s: u32, ) -> Weight { - // Minimum execution time: 92_334 nanoseconds. - Weight::from_ref_time(95_207_614 as u64) - // Standard Error: 1_822 - .saturating_add(Weight::from_ref_time(1_036_787 as u64).saturating_mul(s as u64)) - .saturating_add(RocksDbWeight::get().reads(12 as u64)) - .saturating_add(RocksDbWeight::get().writes(12 as u64)) - .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(s as u64))) + // Minimum execution time: 93_342 nanoseconds. + Weight::from_ref_time(95_756_184) + // Standard Error: 2_067 + .saturating_add(Weight::from_ref_time(1_090_785).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(12)) + .saturating_add(RocksDbWeight::get().writes(12)) + .saturating_add(RocksDbWeight::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:200 w:0) // Storage: VoterList ListNodes (r:101 w:0) // Storage: Staking Nominators (r:101 w:0) @@ -803,20 +801,19 @@ impl WeightInfo for () { /// The range of component `v` is `[1, 10]`. /// The range of component `n` is `[0, 100]`. fn new_era(v: u32, n: u32, ) -> Weight { - // Minimum execution time: 535_169 nanoseconds. - Weight::from_ref_time(548_667_000 as u64) - // Standard Error: 1_759_252 - .saturating_add(Weight::from_ref_time(58_283_319 as u64).saturating_mul(v as u64)) - // Standard Error: 175_299 - .saturating_add(Weight::from_ref_time(13_578_512 as u64).saturating_mul(n as u64)) - .saturating_add(RocksDbWeight::get().reads(207 as u64)) - .saturating_add(RocksDbWeight::get().reads((5 as u64).saturating_mul(v as u64))) - .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(n as u64))) - .saturating_add(RocksDbWeight::get().writes(3 as u64)) - .saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(v as u64))) + // Minimum execution time: 506_874 nanoseconds. + Weight::from_ref_time(507_798_000) + // Standard Error: 1_802_261 + .saturating_add(Weight::from_ref_time(59_874_736).saturating_mul(v.into())) + // Standard Error: 179_585 + .saturating_add(Weight::from_ref_time(13_668_574).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(206)) + .saturating_add(RocksDbWeight::get().reads((5_u64).saturating_mul(v.into()))) + .saturating_add(RocksDbWeight::get().reads((4_u64).saturating_mul(n.into()))) + .saturating_add(RocksDbWeight::get().writes(3)) + .saturating_add(RocksDbWeight::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:200 w:0) // Storage: VoterList ListNodes (r:1500 w:0) // Storage: Staking Nominators (r:1500 w:0) @@ -825,27 +822,27 @@ impl WeightInfo for () { // Storage: Staking Ledger (r:1500 w:0) /// 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) -> Weight { - Weight::from_ref_time(24_930_788_000 as u64) - // Standard Error: 266_386 - .saturating_add(Weight::from_ref_time(6_687_552 as u64).saturating_mul(v as u64)) - // Standard Error: 266_386 - .saturating_add(Weight::from_ref_time(6_839_134 as u64).saturating_mul(n as u64)) - .saturating_add(RocksDbWeight::get().reads(6722 as u64)) - .saturating_add(RocksDbWeight::get().reads((2 as u64).saturating_mul(v as u64))) - .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(n as u64))) + fn get_npos_voters(v: u32, n: u32, ) -> Weight { + // Minimum execution time: 24_634_585 nanoseconds. + Weight::from_ref_time(24_718_377_000) + // Standard Error: 324_839 + .saturating_add(Weight::from_ref_time(3_654_508).saturating_mul(v.into())) + // Standard Error: 324_839 + .saturating_add(Weight::from_ref_time(2_927_535).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(201)) + .saturating_add(RocksDbWeight::get().reads((5_u64).saturating_mul(v.into()))) + .saturating_add(RocksDbWeight::get().reads((4_u64).saturating_mul(n.into()))) } // Storage: Staking CounterForValidators (r:1 w:0) // Storage: Staking Validators (r:501 w:0) /// The range of component `v` is `[500, 1000]`. fn get_npos_targets(v: u32, ) -> Weight { - // Minimum execution time: 4_905_036 nanoseconds. - Weight::from_ref_time(78_163_554 as u64) - // Standard Error: 23_723 - .saturating_add(Weight::from_ref_time(9_784_870 as u64).saturating_mul(v as u64)) - .saturating_add(RocksDbWeight::get().reads(2 as u64)) - .saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(v as u64))) + // Minimum execution time: 4_805_490 nanoseconds. + Weight::from_ref_time(118_475_494) + // Standard Error: 26_332 + .saturating_add(Weight::from_ref_time(9_635_188).saturating_mul(v.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(v.into()))) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -854,9 +851,9 @@ impl WeightInfo for () { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_set() -> Weight { - // Minimum execution time: 10_096 nanoseconds. - Weight::from_ref_time(10_538_000 as u64) - .saturating_add(RocksDbWeight::get().writes(6 as u64)) + // Minimum execution time: 10_816 nanoseconds. + Weight::from_ref_time(11_242_000) + .saturating_add(RocksDbWeight::get().writes(6)) } // Storage: Staking MinCommission (r:0 w:1) // Storage: Staking MinValidatorBond (r:0 w:1) @@ -865,9 +862,9 @@ impl WeightInfo for () { // Storage: Staking MaxNominatorsCount (r:0 w:1) // Storage: Staking MinNominatorBond (r:0 w:1) fn set_staking_configs_all_remove() -> Weight { - // Minimum execution time: 9_045 nanoseconds. - Weight::from_ref_time(9_379_000 as u64) - .saturating_add(RocksDbWeight::get().writes(6 as u64)) + // Minimum execution time: 9_581 nanoseconds. + Weight::from_ref_time(10_383_000) + .saturating_add(RocksDbWeight::get().writes(6)) } // Storage: Staking Ledger (r:1 w:0) // Storage: Staking Nominators (r:1 w:1) @@ -880,17 +877,17 @@ impl WeightInfo for () { // Storage: VoterList ListBags (r:1 w:1) // Storage: VoterList CounterForListNodes (r:1 w:1) fn chill_other() -> Weight { - // Minimum execution time: 81_457 nanoseconds. - Weight::from_ref_time(82_410_000 as u64) - .saturating_add(RocksDbWeight::get().reads(11 as u64)) - .saturating_add(RocksDbWeight::get().writes(6 as u64)) + // Minimum execution time: 83_669 nanoseconds. + Weight::from_ref_time(84_772_000) + .saturating_add(RocksDbWeight::get().reads(11)) + .saturating_add(RocksDbWeight::get().writes(6)) } // Storage: Staking MinCommission (r:1 w:0) // Storage: Staking Validators (r:1 w:1) fn force_apply_min_commission() -> Weight { - // Minimum execution time: 19_684 nanoseconds. - Weight::from_ref_time(20_059_000 as u64) - .saturating_add(RocksDbWeight::get().reads(2 as u64)) - .saturating_add(RocksDbWeight::get().writes(1 as u64)) + // Minimum execution time: 20_553 nanoseconds. + Weight::from_ref_time(20_933_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) } }