From 46df8b168305e415e7b8c7ae947532bd9bffee74 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Wed, 13 Oct 2021 10:27:12 +0200 Subject: [PATCH 1/7] fix restart issue of staking miner --- Cargo.lock | 507 ++++++++++-------- utils/staking-miner/Cargo.toml | 2 +- utils/staking-miner/src/dry_run.rs | 2 +- utils/staking-miner/src/emergency_solution.rs | 22 +- utils/staking-miner/src/main.rs | 98 ++-- utils/staking-miner/src/monitor.rs | 181 ++++--- 6 files changed, 448 insertions(+), 364 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 56bd75243345..ae7630c09873 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -467,14 +467,14 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "beefy-primitives", "fnv", "futures 0.3.17", "log", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "sc-client-api", "sc-keystore", "sc-network", @@ -495,7 +495,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -515,12 +515,12 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "parity-scale-codec", "scale-info", @@ -1106,6 +1106,15 @@ dependencies = [ "vec_map", ] +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", +] + [[package]] name = "cloudabi" version = "0.1.0" @@ -1730,6 +1739,15 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" +[[package]] +name = "erased-serde" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ca8b296792113e1500fd935ae487be6e00ce318952a6880555554824d6ebf38" +dependencies = [ + "serde", +] + [[package]] name = "errno" version = "0.2.5" @@ -1871,7 +1889,7 @@ dependencies = [ "log", "num-traits", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "scale-info", ] @@ -1915,7 +1933,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "parity-scale-codec", ] @@ -1933,7 +1951,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-system", @@ -1953,7 +1971,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "Inflector", "chrono", @@ -1979,7 +1997,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-system", @@ -1993,7 +2011,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-system", @@ -2021,7 +2039,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "bitflags", "frame-metadata", @@ -2048,7 +2066,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2060,7 +2078,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.0", @@ -2072,7 +2090,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "proc-macro2", "quote", @@ -2082,7 +2100,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2105,7 +2123,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-system", @@ -2116,7 +2134,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "log", @@ -2133,7 +2151,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -2148,7 +2166,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "parity-scale-codec", "sp-api", @@ -2157,7 +2175,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "sp-api", @@ -2370,7 +2388,7 @@ checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" [[package]] name = "generate-bags" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "chrono", "frame-election-provider-support", @@ -2993,7 +3011,7 @@ dependencies = [ "jsonrpc-server-utils", "log", "net2", - "parking_lot", + "parking_lot 0.11.1", "unicase", ] @@ -3008,7 +3026,7 @@ dependencies = [ "jsonrpc-server-utils", "log", "parity-tokio-ipc", - "parking_lot", + "parking_lot 0.11.1", "tower-service", ] @@ -3022,7 +3040,7 @@ dependencies = [ "jsonrpc-core", "lazy_static", "log", - "parking_lot", + "parking_lot 0.11.1", "rand 0.7.3", "serde", ] @@ -3056,7 +3074,7 @@ dependencies = [ "jsonrpc-server-utils", "log", "parity-ws", - "parking_lot", + "parking_lot 0.11.1", "slab", ] @@ -3249,7 +3267,7 @@ checksum = "c3b6b85fc643f5acd0bffb2cc8a6d150209379267af0d41db72170021841f9f5" dependencies = [ "kvdb", "parity-util-mem", - "parking_lot", + "parking_lot 0.11.1", ] [[package]] @@ -3264,7 +3282,7 @@ dependencies = [ "num_cpus", "owning_ref", "parity-util-mem", - "parking_lot", + "parking_lot 0.11.1", "regex", "rocksdb", "smallvec", @@ -3359,7 +3377,7 @@ dependencies = [ "libp2p-websocket", "libp2p-yamux", "multiaddr", - "parking_lot", + "parking_lot 0.11.1", "pin-project 1.0.8", "smallvec", "wasm-timer", @@ -3384,7 +3402,7 @@ dependencies = [ "multiaddr", "multihash 0.14.0", "multistream-select", - "parking_lot", + "parking_lot 0.11.1", "pin-project 1.0.8", "prost", "prost-build", @@ -3543,7 +3561,7 @@ dependencies = [ "libp2p-core", "log", "nohash-hasher", - "parking_lot", + "parking_lot 0.11.1", "rand 0.7.3", "smallvec", "unsigned-varint 0.7.0", @@ -3755,7 +3773,7 @@ checksum = "214cc0dd9c37cbed27f0bb1eba0c41bbafdb93a8be5e9d6ae1e6b4b42cd044bf" dependencies = [ "futures 0.3.17", "libp2p-core", - "parking_lot", + "parking_lot 0.11.1", "thiserror", "yamux", ] @@ -3924,6 +3942,15 @@ dependencies = [ "statrs", ] +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard", +] + [[package]] name = "lock_api" version = "0.4.1" @@ -4611,7 +4638,7 @@ checksum = "13370dae44474229701bb69b90b4f4dca6404cb0357a2d50d635f1171dc3aa7b" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -4625,7 +4652,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-system", @@ -4641,7 +4668,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-system", @@ -4656,7 +4683,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -4680,7 +4707,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4700,7 +4727,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -4715,7 +4742,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "beefy-primitives", "frame-support", @@ -4731,7 +4758,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -4756,7 +4783,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -4841,7 +4868,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -4858,7 +4885,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -4874,7 +4901,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4898,7 +4925,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -4916,7 +4943,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -4931,7 +4958,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -4954,7 +4981,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4970,7 +4997,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -4990,7 +5017,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -5007,7 +5034,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -5024,7 +5051,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5042,7 +5069,7 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-system", @@ -5058,7 +5085,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5075,7 +5102,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -5090,7 +5117,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-system", @@ -5104,7 +5131,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-system", @@ -5121,7 +5148,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5144,7 +5171,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -5159,7 +5186,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-system", @@ -5173,7 +5200,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -5189,7 +5216,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-system", @@ -5210,7 +5237,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -5226,7 +5253,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-system", @@ -5240,7 +5267,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5263,7 +5290,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -5274,7 +5301,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "log", "sp-arithmetic", @@ -5283,7 +5310,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-system", @@ -5297,7 +5324,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -5315,7 +5342,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -5334,7 +5361,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-support", "frame-system", @@ -5351,7 +5378,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5368,7 +5395,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5379,7 +5406,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -5396,7 +5423,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -5412,7 +5439,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-benchmarking", "frame-support", @@ -5485,7 +5512,7 @@ dependencies = [ "log", "lz4", "memmap2", - "parking_lot", + "parking_lot 0.11.1", "rand 0.8.4", "snap", ] @@ -5548,7 +5575,7 @@ dependencies = [ "impl-trait-for-tuples", "lru 0.6.6", "parity-util-mem-derive", - "parking_lot", + "parking_lot 0.11.1", "primitive-types", "smallvec", "tikv-jemalloc-ctl", @@ -5606,6 +5633,16 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" +[[package]] +name = "parking_lot" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +dependencies = [ + "lock_api 0.3.4", + "parking_lot_core 0.7.2", +] + [[package]] name = "parking_lot" version = "0.11.1" @@ -5613,8 +5650,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" dependencies = [ "instant", - "lock_api", - "parking_lot_core", + "lock_api 0.4.1", + "parking_lot_core 0.8.0", +] + +[[package]] +name = "parking_lot_core" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +dependencies = [ + "cfg-if 0.1.10", + "cloudabi 0.0.3", + "libc", + "redox_syscall 0.1.56", + "smallvec", + "winapi 0.3.9", ] [[package]] @@ -5624,7 +5675,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" dependencies = [ "cfg-if 0.1.10", - "cloudabi", + "cloudabi 0.1.0", "instant", "libc", "redox_syscall 0.1.56", @@ -6072,7 +6123,7 @@ dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", @@ -6118,7 +6169,7 @@ dependencies = [ "lru 0.7.0", "merlin", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6153,7 +6204,7 @@ dependencies = [ "kvdb-memorydb", "log", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6256,7 +6307,7 @@ dependencies = [ "kvdb", "kvdb-memorydb", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", @@ -6402,7 +6453,7 @@ dependencies = [ "log", "mick-jaeger", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "polkadot-node-primitives", "polkadot-primitives", "sc-network", @@ -6474,7 +6525,7 @@ version = "0.9.11" dependencies = [ "async-trait", "futures 0.3.17", - "parking_lot", + "parking_lot 0.11.1", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", @@ -6545,7 +6596,7 @@ dependencies = [ "lru 0.7.0", "metered-channel", "parity-util-mem", - "parking_lot", + "parking_lot 0.11.1", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -7399,7 +7450,7 @@ dependencies = [ "fnv", "lazy_static", "memchr", - "parking_lot", + "parking_lot 0.11.1", "thiserror", ] @@ -7784,7 +7835,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "env_logger 0.9.0", "jsonrpsee-proc-macros", @@ -8047,7 +8098,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "log", "sp-core", @@ -8058,7 +8109,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "derive_more", @@ -8085,7 +8136,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -8108,7 +8159,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8124,7 +8175,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8140,7 +8191,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -8151,7 +8202,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "chrono", "fdlimit", @@ -8189,14 +8240,14 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "fnv", "futures 0.3.17", "hash-db", "log", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "sc-executor", "sc-transaction-pool-api", "sc-utils", @@ -8217,7 +8268,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "hash-db", "kvdb", @@ -8227,7 +8278,7 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "sc-client-api", "sc-state-db", "sp-arithmetic", @@ -8242,14 +8293,14 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "futures 0.3.17", "futures-timer 3.0.2", "libp2p", "log", - "parking_lot", + "parking_lot 0.11.1", "sc-client-api", "sc-utils", "serde", @@ -8266,7 +8317,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "derive_more", @@ -8278,7 +8329,7 @@ dependencies = [ "num-rational 0.2.4", "num-traits", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "rand 0.7.3", "retain_mut", "sc-client-api", @@ -8309,7 +8360,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "derive_more", "futures 0.3.17", @@ -8333,7 +8384,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8346,7 +8397,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "assert_matches", "async-trait", @@ -8380,7 +8431,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "futures 0.3.17", @@ -8406,7 +8457,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "sc-client-api", "sp-authorship", @@ -8417,13 +8468,13 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "lazy_static", "libsecp256k1 0.6.0", "log", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "sc-executor-common", "sc-executor-wasmi", "sc-executor-wasmtime", @@ -8443,7 +8494,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "derive_more", "environmental", @@ -8461,7 +8512,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "log", "parity-scale-codec", @@ -8477,7 +8528,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "cfg-if 1.0.0", "libc", @@ -8495,7 +8546,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "derive_more", @@ -8506,7 +8557,7 @@ dependencies = [ "futures-timer 3.0.2", "log", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "rand 0.8.4", "sc-block-builder", "sc-client-api", @@ -8532,7 +8583,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "derive_more", "finality-grandpa", @@ -8556,7 +8607,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "ansi_term 0.12.1", "futures 0.3.17", @@ -8573,12 +8624,12 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "derive_more", "hex", - "parking_lot", + "parking_lot 0.11.1", "serde_json", "sp-application-crypto", "sp-core", @@ -8588,11 +8639,11 @@ dependencies = [ [[package]] name = "sc-light" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "hash-db", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "sc-client-api", "sc-executor", "sp-api", @@ -8606,7 +8657,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-std", "async-trait", @@ -8628,7 +8679,7 @@ dependencies = [ "log", "lru 0.6.6", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "pin-project 1.0.8", "prost", "prost-build", @@ -8657,7 +8708,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -8673,7 +8724,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "bytes 1.0.1", "fnv", @@ -8685,7 +8736,7 @@ dependencies = [ "log", "num_cpus", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "rand 0.7.3", "sc-client-api", "sc-network", @@ -8700,7 +8751,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "futures 0.3.17", "libp2p", @@ -8713,7 +8764,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8722,7 +8773,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "futures 0.3.17", "hash-db", @@ -8730,7 +8781,7 @@ dependencies = [ "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -8753,7 +8804,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "futures 0.3.17", "jsonrpc-core", @@ -8762,7 +8813,7 @@ dependencies = [ "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "sc-chain-spec", "sc-transaction-pool-api", "serde", @@ -8778,7 +8829,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "futures 0.3.17", "jsonrpc-core", @@ -8795,7 +8846,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "directories", @@ -8808,7 +8859,7 @@ dependencies = [ "log", "parity-scale-codec", "parity-util-mem", - "parking_lot", + "parking_lot 0.11.1", "pin-project 1.0.8", "rand 0.7.3", "sc-block-builder", @@ -8860,13 +8911,13 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "log", "parity-scale-codec", "parity-util-mem", "parity-util-mem-derive", - "parking_lot", + "parking_lot 0.11.1", "sc-client-api", "sp-core", ] @@ -8874,7 +8925,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -8896,13 +8947,13 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "chrono", "futures 0.3.17", "libp2p", "log", - "parking_lot", + "parking_lot 0.11.1", "pin-project 1.0.8", "rand 0.7.3", "serde", @@ -8914,7 +8965,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "ansi_term 0.12.1", "atty", @@ -8922,7 +8973,7 @@ dependencies = [ "lazy_static", "log", "once_cell", - "parking_lot", + "parking_lot 0.11.1", "regex", "rustc-hash", "sc-client-api", @@ -8944,7 +8995,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -8955,7 +9006,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "futures 0.3.17", "intervalier", @@ -8963,7 +9014,7 @@ dependencies = [ "log", "parity-scale-codec", "parity-util-mem", - "parking_lot", + "parking_lot 0.11.1", "retain_mut", "sc-client-api", "sc-transaction-pool-api", @@ -8982,7 +9033,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "derive_more", "futures 0.3.17", @@ -8996,7 +9047,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -9333,6 +9384,15 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +[[package]] +name = "slog" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" +dependencies = [ + "erased-serde", +] + [[package]] name = "slot-range-helper" version = "0.9.11" @@ -9439,7 +9499,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "hash-db", "log", @@ -9456,7 +9516,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.0", @@ -9468,7 +9528,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "parity-scale-codec", "scale-info", @@ -9481,7 +9541,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "integer-sqrt", "num-traits", @@ -9496,7 +9556,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "parity-scale-codec", "scale-info", @@ -9509,7 +9569,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "parity-scale-codec", @@ -9521,7 +9581,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "parity-scale-codec", "sp-api", @@ -9533,13 +9593,13 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "futures 0.3.17", "log", "lru 0.6.6", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "sp-api", "sp-consensus", "sp-database", @@ -9551,7 +9611,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "futures 0.3.17", @@ -9570,7 +9630,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "merlin", @@ -9593,7 +9653,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "parity-scale-codec", "scale-info", @@ -9604,7 +9664,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -9616,7 +9676,7 @@ dependencies = [ [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "base58", "blake2-rfc", @@ -9635,7 +9695,7 @@ dependencies = [ "num-traits", "parity-scale-codec", "parity-util-mem", - "parking_lot", + "parking_lot 0.11.1", "primitive-types", "rand 0.7.3", "regex", @@ -9649,7 +9709,6 @@ dependencies = [ "sp-runtime-interface", "sp-std", "sp-storage", - "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", @@ -9662,16 +9721,16 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "kvdb", - "parking_lot", + "parking_lot 0.11.1", ] [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "proc-macro2", "quote", @@ -9681,7 +9740,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "environmental", "parity-scale-codec", @@ -9692,7 +9751,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "finality-grandpa", "log", @@ -9710,7 +9769,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -9724,14 +9783,14 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "futures 0.3.17", "hash-db", "libsecp256k1 0.6.0", "log", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "sp-core", "sp-externalities", "sp-keystore", @@ -9748,7 +9807,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "lazy_static", "sp-core", @@ -9759,14 +9818,14 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "derive_more", "futures 0.3.17", "merlin", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "schnorrkel", "serde", "sp-core", @@ -9776,7 +9835,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "zstd", ] @@ -9784,7 +9843,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "parity-scale-codec", "scale-info", @@ -9799,7 +9858,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -9810,7 +9869,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "sp-api", "sp-core", @@ -9820,7 +9879,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "backtrace", ] @@ -9828,7 +9887,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "rustc-hash", "serde", @@ -9838,7 +9897,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "either", "hash256-std-hasher", @@ -9860,7 +9919,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9877,7 +9936,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "Inflector", "proc-macro-crate 1.1.0", @@ -9889,7 +9948,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "serde", "serde_json", @@ -9898,7 +9957,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "parity-scale-codec", "scale-info", @@ -9912,7 +9971,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "parity-scale-codec", "scale-info", @@ -9923,13 +9982,13 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "hash-db", "log", "num-traits", "parity-scale-codec", - "parking_lot", + "parking_lot 0.11.1", "rand 0.7.3", "smallvec", "sp-core", @@ -9946,12 +10005,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9964,7 +10023,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "log", "sp-core", @@ -9977,7 +10036,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -9993,9 +10052,15 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ + "erased-serde", + "log", "parity-scale-codec", + "parking_lot 0.10.2", + "serde", + "serde_json", + "slog", "sp-std", "tracing", "tracing-core", @@ -10005,7 +10070,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "sp-api", "sp-runtime", @@ -10014,7 +10079,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "log", @@ -10030,7 +10095,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "hash-db", "memory-db", @@ -10045,7 +10110,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10061,7 +10126,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10072,7 +10137,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10086,20 +10151,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[package]] -name = "ss58-registry" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2413ecc7946ca99368862851dc1359f1477bc654ecfb135cf3efcb85ceca5f" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "serde", - "serde_json", - "unicode-xid", -] - [[package]] name = "stable_deref_trait" version = "1.1.1" @@ -10156,7 +10207,7 @@ checksum = "11b73400442027c4adedda20a9f9b7945234a5bd8d5f7e86da22bd5d0622369c" dependencies = [ "cfg_aliases", "libc", - "parking_lot", + "parking_lot 0.11.1", "static_init_macro", ] @@ -10300,7 +10351,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "platforms", ] @@ -10308,7 +10359,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.17", @@ -10330,7 +10381,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-std", "derive_more", @@ -10344,7 +10395,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "async-trait", "futures 0.3.17", @@ -10371,7 +10422,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "futures 0.3.17", "substrate-test-utils-derive", @@ -10381,7 +10432,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -10392,7 +10443,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "ansi_term 0.12.1", "build-helper", @@ -10545,7 +10596,7 @@ dependencies = [ [[package]] name = "test-runner" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "frame-system", "futures 0.3.17", @@ -10970,7 +11021,7 @@ dependencies = [ "lazy_static", "log", "lru-cache", - "parking_lot", + "parking_lot 0.11.1", "resolv-conf", "smallvec", "thiserror", @@ -10986,7 +11037,7 @@ checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#cafe12e7785bf92e5dc04780c10e7f8330a15a4c" +source = "git+https://github.com/paritytech/substrate?branch=master#66fd76181742a1fa27b4ab5c41eb15d9765e6774" dependencies = [ "jsonrpsee-ws-client", "log", @@ -11344,7 +11395,7 @@ checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ "futures 0.3.17", "js-sys", - "parking_lot", + "parking_lot 0.11.1", "pin-utils", "wasm-bindgen", "wasm-bindgen-futures", @@ -11946,7 +11997,7 @@ dependencies = [ "futures 0.3.17", "log", "nohash-hasher", - "parking_lot", + "parking_lot 0.11.1", "rand 0.8.4", "static_assertions", ] diff --git a/utils/staking-miner/Cargo.toml b/utils/staking-miner/Cargo.toml index bfc07614f5e6..593d1a1bf2cd 100644 --- a/utils/staking-miner/Cargo.toml +++ b/utils/staking-miner/Cargo.toml @@ -14,7 +14,7 @@ jsonrpsee-ws-client = { version = "0.3.1", default-features = false, features = serde_json = "1.0" serde = "1.0.130" paste = "1.0.5" -thiserror = "1.0.30" +thiserror = "1.0.26" remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/utils/staking-miner/src/dry_run.rs b/utils/staking-miner/src/dry_run.rs index ffebdb3fadf2..a98265c924d8 100644 --- a/utils/staking-miner/src/dry_run.rs +++ b/utils/staking-miner/src/dry_run.rs @@ -117,7 +117,7 @@ macro_rules! dry_run_cmd_for { ($runtime:ident) => { paste::paste! { let mut ext = crate::create_election_ext::( shared.uri.clone(), config.at, - vec!["Staking".to_string(), "System".to_string(), "Balances".to_string()] + vec!["Staking".to_string(), "System".to_string()] ).await?; force_create_snapshot::(&mut ext)?; diff --git a/utils/staking-miner/src/emergency_solution.rs b/utils/staking-miner/src/emergency_solution.rs index d27c23e38601..a3847825f5d8 100644 --- a/utils/staking-miner/src/emergency_solution.rs +++ b/utils/staking-miner/src/emergency_solution.rs @@ -16,7 +16,7 @@ //! The emergency-solution command. -use crate::{prelude::*, Error, SharedConfig}; +use crate::{prelude::*, EmergencySolutionConfig, Error, SharedConfig}; use codec::Encode; use frame_election_provider_support::SequentialPhragmen; use std::io::Write; @@ -25,25 +25,35 @@ macro_rules! emergency_solution_cmd_for { ($runtime:ident) => { paste::paste! { /// Execute the emergency-solution command. pub(crate) async fn []( shared: SharedConfig, + config: EmergencySolutionConfig, ) -> Result<(), Error<$crate::[<$runtime _runtime_exports>]::Runtime>> { use $crate::[<$runtime _runtime_exports>]::*; let mut ext = crate::create_election_ext::(shared.uri.clone(), None, vec![]).await?; ext.execute_with(|| { assert!(EPM::Pallet::::current_phase().is_emergency()); + // NOTE: this internally calls feasibility_check, but we just re-do it here as an easy way // to get a `ReadySolution`. let (raw_solution, _) = >::mine_solution::>()?; log::info!(target: LOG_TARGET, "mined solution with {:?}", &raw_solution.score); - let ready_solution = EPM::Pallet::::feasibility_check(raw_solution, EPM::ElectionCompute::Signed)?; - let encoded_ready = ready_solution.encode(); + let mut ready_solution = EPM::Pallet::::feasibility_check(raw_solution, EPM::ElectionCompute::Signed)?; + + // maybe truncate. + if let Some(take) = config.take { + log::info!(target: LOG_TARGET, "truncating {} winners to {}", ready_solution.supports.len(), take); + ready_solution.supports.sort_unstable_by_key(|(_, s)| s.total); + ready_solution.supports.truncate(take); + } + + // write to file and stdout. let encoded_support = ready_solution.supports.encode(); - let mut solution_file = std::fs::File::create("solution.bin")?; let mut supports_file = std::fs::File::create("solution.supports.bin")?; - solution_file.write_all(&encoded_ready)?; supports_file.write_all(&encoded_support)?; - log::info!(target: LOG_TARGET, "ReadySolution: size {:?} / score = {:?}", encoded_ready.len(), ready_solution.score); + + log::info!(target: LOG_TARGET, "ReadySolution: size {:?} / score = {:?}", ready_solution.encoded_size(), ready_solution.score); log::trace!(target: LOG_TARGET, "Supports: {}", sp_core::hexdisplay::HexDisplay::from(&encoded_support)); + Ok(()) }) } diff --git a/utils/staking-miner/src/main.rs b/utils/staking-miner/src/main.rs index 96f34648d27b..681da022ed45 100644 --- a/utils/staking-miner/src/main.rs +++ b/utils/staking-miner/src/main.rs @@ -276,7 +276,7 @@ enum Command { /// Just compute a solution now, and don't submit it. DryRun(DryRunConfig), /// Provide a solution that can be submitted to the chain as an emergency response. - EmergencySolution, + EmergencySolution(EmergencySolutionConfig), } #[derive(Debug, Clone, StructOpt)] @@ -291,39 +291,6 @@ enum Solvers { }, } -/// Mine a solution with the given `solver`. -fn mine_with( - solver: &Solvers, - ext: &mut Ext, -) -> Result<(EPM::RawSolution>, u32), Error> -where - T: EPM::Config, - T::Solver: NposSolver, -{ - use frame_election_provider_support::{PhragMMS, SequentialPhragmen}; - - match solver { - Solvers::SeqPhragmen { iterations } => { - BalanceIterations::set(*iterations); - mine_unchecked::< - T, - SequentialPhragmen< - ::AccountId, - sp_runtime::Perbill, - Balancing, - >, - >(ext, false) - }, - Solvers::PhragMMS { iterations } => { - BalanceIterations::set(*iterations); - mine_unchecked::< - T, - PhragMMS<::AccountId, sp_runtime::Perbill, Balancing>, - >(ext, false) - }, - } -} - frame_support::parameter_types! { /// Number of balancing iterations for a solution algorithm. Set based on the [`Solvers`] CLI /// config. @@ -341,8 +308,23 @@ struct MonitorConfig { #[structopt(long, default_value = "head", possible_values = &["head", "finalized"])] listen: String, + /// The solver algorithm to use. + #[structopt(subcommand)] + solver: Solvers, +} + +#[derive(Debug, Clone, StructOpt)] +struct EmergencySolutionConfig { + /// The block hash at which scraping happens. If none is provided, the latest head is used. + #[structopt(long)] + at: Option, + + /// The solver algorithm to use. #[structopt(subcommand)] solver: Solvers, + + /// The number of top backed winners to take. All are taken, if not provided. + take: Option, } #[derive(Debug, Clone, StructOpt)] @@ -351,6 +333,7 @@ struct DryRunConfig { #[structopt(long)] at: Option, + /// The solver algorithm to use. #[structopt(subcommand)] solver: Solvers, } @@ -367,6 +350,10 @@ struct SharedConfig { /// configured, it might re-try and lose funds through transaction fees/deposits. #[structopt(long, short, env = "SEED")] seed: String, + + /// Don't do the spec-version check. + #[structopt(long)] + no_spec_version_check: bool, } #[derive(Debug, Clone, StructOpt)] @@ -434,6 +421,39 @@ where }) } +/// Mine a solution with the given `solver`. +fn mine_with( + solver: &Solvers, + ext: &mut Ext, +) -> Result<(EPM::RawSolution>, u32), Error> +where + T: EPM::Config, + T::Solver: NposSolver, +{ + use frame_election_provider_support::{PhragMMS, SequentialPhragmen}; + + match solver { + Solvers::SeqPhragmen { iterations } => { + BalanceIterations::set(*iterations); + mine_unchecked::< + T, + SequentialPhragmen< + ::AccountId, + sp_runtime::Perbill, + Balancing, + >, + >(ext, false) + }, + Solvers::PhragMMS { iterations } => { + BalanceIterations::set(*iterations); + mine_unchecked::< + T, + PhragMMS<::AccountId, sp_runtime::Perbill, Balancing>, + >(ext, false) + }, + } +} + #[allow(unused)] fn mine_dpos(ext: &mut Ext) -> Result<(), Error> { ext.execute_with(|| { @@ -534,7 +554,7 @@ async fn main() { match chain.to_lowercase().as_str() { "polkadot" | "development" => { sp_core::crypto::set_default_ss58_version( - sp_core::crypto::Ss58AddressFormatRegistry::PolkadotAccount.into(), + sp_core::crypto::Ss58AddressFormat::PolkadotAccount, ); sub_tokens::dynamic::set_name("DOT"); sub_tokens::dynamic::set_decimal_points(10_000_000_000); @@ -546,7 +566,7 @@ async fn main() { }, "kusama" | "kusama-dev" => { sp_core::crypto::set_default_ss58_version( - sp_core::crypto::Ss58AddressFormatRegistry::KusamaAccount.into(), + sp_core::crypto::Ss58AddressFormat::KusamaAccount, ); sub_tokens::dynamic::set_name("KSM"); sub_tokens::dynamic::set_decimal_points(1_000_000_000_000); @@ -558,7 +578,7 @@ async fn main() { }, "westend" => { sp_core::crypto::set_default_ss58_version( - sp_core::crypto::Ss58AddressFormatRegistry::PolkadotAccount.into(), + sp_core::crypto::Ss58AddressFormat::PolkadotAccount, ); sub_tokens::dynamic::set_name("WND"); sub_tokens::dynamic::set_decimal_points(1_000_000_000_000); @@ -576,7 +596,7 @@ async fn main() { log::info!(target: LOG_TARGET, "connected to chain {:?}", chain); any_runtime_unit! { - check_versions::(&client, true).await + check_versions::(&client, !shared.no_spec_version_check).await }; let signer_account = any_runtime! { @@ -595,7 +615,7 @@ async fn main() { .map_err(|e| { log::error!(target: LOG_TARGET, "DryRun error: {:?}", e); }), - Command::EmergencySolution => emergency_solution_cmd(shared.clone()).await + Command::EmergencySolution(c) => emergency_solution_cmd(shared.clone(), c).await .map_err(|e| { log::error!(target: LOG_TARGET, "EmergencySolution error: {:?}", e); }), diff --git a/utils/staking-miner/src/monitor.rs b/utils/staking-miner/src/monitor.rs index 396700335dd7..fb1a774d676a 100644 --- a/utils/staking-miner/src/monitor.rs +++ b/utils/staking-miner/src/monitor.rs @@ -71,106 +71,109 @@ macro_rules! monitor_cmd_for { ($runtime:tt) => { paste::paste! { signer: Signer, ) -> Result<(), Error<$crate::[<$runtime _runtime_exports>]::Runtime>> { use $crate::[<$runtime _runtime_exports>]::*; + let (sub, unsub) = if config.listen == "head" { ("chain_subscribeNewHeads", "chain_unsubscribeNewHeads") } else { ("chain_subscribeFinalizedHeads", "chain_unsubscribeFinalizedHeads") }; - log::info!(target: LOG_TARGET, "subscribing to {:?} / {:?}", sub, unsub); - let mut subscription: Subscription
= client - .subscribe(&sub, JsonRpcParams::NoParams, &unsub) - .await - .unwrap(); - - while let Some(now) = subscription.next().await? { - let hash = now.hash(); - log::debug!(target: LOG_TARGET, "new event at #{:?} ({:?})", now.number, hash); - - // if the runtime version has changed, terminate - crate::check_versions::(client, false).await?; - - // we prefer doing this check before fetching anything into a remote-ext. - if ensure_signed_phase::(client, hash).await.is_err() { - log::debug!(target: LOG_TARGET, "phase closed, not interested in this block at all."); - continue; - }; - - // NOTE: we don't check the score of any of the submitted solutions. If we submit a weak - // one, as long as we are valid, we will end up getting our deposit back, so not a big - // deal for now. Note that to avoid an unfeasible solution, we should make sure that we - // only start the process on a finalized snapshot. If the signed phase is long enough, - // this will not be a solution. - - // grab an externalities without staking, just the election snapshot. - let mut ext = crate::create_election_ext::(shared.uri.clone(), Some(hash), vec![]).await?; - - if ensure_no_previous_solution::(&mut ext, &signer.account).await.is_err() { - log::debug!(target: LOG_TARGET, "We already have a solution in this phase, skipping."); - continue; - } - - let (raw_solution, witness) = crate::mine_with::(&config.solver, &mut ext)?; - - log::info!(target: LOG_TARGET, "mined solution with {:?}", &raw_solution.score); - - let nonce = crate::get_account_info::(client, &signer.account, Some(hash)) - .await? - .map(|i| i.nonce) - .expect(crate::signer::SIGNER_ACCOUNT_WILL_EXIST); - let tip = 0 as Balance; - let period = ::BlockHashCount::get() / 2; - let current_block = now.number.saturating_sub(1); - let era = sp_runtime::generic::Era::mortal(period.into(), current_block.into()); - log::trace!(target: LOG_TARGET, "transaction mortality: {:?} -> {:?}", era.birth(current_block.into()), era.death(current_block.into())); - let extrinsic = ext.execute_with(|| create_uxt(raw_solution, witness, signer.clone(), nonce, tip, era)); - let bytes = sp_core::Bytes(extrinsic.encode()); - - let mut tx_subscription: Subscription< - TransactionStatus<::Hash, ::Hash> - > = match client - .subscribe(&"author_submitAndWatchExtrinsic", params! { bytes }, "author_unwatchExtrinsic") + loop { + log::info!(target: LOG_TARGET, "subscribing to {:?} / {:?}", sub, unsub); + let mut subscription: Subscription
= client + .subscribe(&sub, JsonRpcParams::NoParams, &unsub) .await - { - Ok(sub) => sub, - Err(why) => { - // This usually happens when we've been busy with mining for a few blocks, and now we're receiving the - // subscriptions of blocks in which we were busy. In these blocks, we still don't have a solution, so we - // re-compute a new solution and submit it with an outdated `Nonce`, which yields most often `Stale` - // error. NOTE: to improve this overall, and to be able to introduce an array of other fancy features, - // we should make this multi-threaded and do the computation outside of this callback. - log::warn!(target: LOG_TARGET, "failing to submit a transaction {:?}. continuing...", why); - continue + .unwrap(); + + while let Some(now) = subscription.next().await? { + let hash = now.hash(); + log::debug!(target: LOG_TARGET, "new event at #{:?} ({:?})", now.number, hash); + + // if the runtime version has changed, terminate + crate::check_versions::(client, false).await?; + + // we prefer doing this check before fetching anything into a remote-ext. + if ensure_signed_phase::(client, hash).await.is_err() { + log::debug!(target: LOG_TARGET, "phase closed, not interested in this block at all."); + continue; + }; + + // NOTE: we don't check the score of any of the submitted solutions. If we submit a weak + // one, as long as we are valid, we will end up getting our deposit back, so not a big + // deal for now. Note that to avoid an unfeasible solution, we should make sure that we + // only start the process on a finalized snapshot. If the signed phase is long enough, + // this will not be a solution. + + // grab an externalities without staking, just the election snapshot. + let mut ext = crate::create_election_ext::(shared.uri.clone(), Some(hash), vec![]).await?; + + if ensure_no_previous_solution::(&mut ext, &signer.account).await.is_err() { + log::debug!(target: LOG_TARGET, "We already have a solution in this phase, skipping."); + continue; } - }; - - let _success = while let Some(status_update) = tx_subscription.next().await? { - log::trace!(target: LOG_TARGET, "status update {:?}", status_update); - match status_update { - TransactionStatus::Ready | TransactionStatus::Broadcast(_) | TransactionStatus::Future => continue, - TransactionStatus::InBlock(hash) => { - log::info!(target: LOG_TARGET, "included at {:?}", hash); - let key = frame_support::storage::storage_prefix(b"System", b"Events"); - let events = get_storage::::Hash>>, - >(client, params!{ key, hash }).await?.unwrap_or_default(); - log::info!(target: LOG_TARGET, "events at inclusion {:?}", events); - } - TransactionStatus::Retracted(hash) => { - log::info!(target: LOG_TARGET, "Retracted at {:?}", hash); - } - TransactionStatus::Finalized(hash) => { - log::info!(target: LOG_TARGET, "Finalized at {:?}", hash); - break + + let (raw_solution, witness) = crate::mine_with::(&config.solver, &mut ext)?; + + log::info!(target: LOG_TARGET, "mined solution with {:?}", &raw_solution.score); + + let nonce = crate::get_account_info::(client, &signer.account, Some(hash)) + .await? + .map(|i| i.nonce) + .expect(crate::signer::SIGNER_ACCOUNT_WILL_EXIST); + let tip = 0 as Balance; + let period = ::BlockHashCount::get() / 2; + let current_block = now.number.saturating_sub(1); + let era = sp_runtime::generic::Era::mortal(period.into(), current_block.into()); + log::trace!(target: LOG_TARGET, "transaction mortality: {:?} -> {:?}", era.birth(current_block.into()), era.death(current_block.into())); + let extrinsic = ext.execute_with(|| create_uxt(raw_solution, witness, signer.clone(), nonce, tip, era)); + let bytes = sp_core::Bytes(extrinsic.encode()); + + let mut tx_subscription: Subscription< + TransactionStatus<::Hash, ::Hash> + > = match client + .subscribe(&"author_submitAndWatchExtrinsic", params! { bytes }, "author_unwatchExtrinsic") + .await + { + Ok(sub) => sub, + Err(why) => { + // This usually happens when we've been busy with mining for a few blocks, and now we're receiving the + // subscriptions of blocks in which we were busy. In these blocks, we still don't have a solution, so we + // re-compute a new solution and submit it with an outdated `Nonce`, which yields most often `Stale` + // error. NOTE: to improve this overall, and to be able to introduce an array of other fancy features, + // we should make this multi-threaded and do the computation outside of this callback. + log::warn!(target: LOG_TARGET, "failing to submit a transaction {:?}. continuing...", why); + continue } - _ => { - log::warn!(target: LOG_TARGET, "Stopping listen due to other status {:?}", status_update); - break + }; + + let _success = while let Some(status_update) = tx_subscription.next().await? { + log::trace!(target: LOG_TARGET, "status update {:?}", status_update); + match status_update { + TransactionStatus::Ready | TransactionStatus::Broadcast(_) | TransactionStatus::Future => continue, + TransactionStatus::InBlock(hash) => { + log::info!(target: LOG_TARGET, "included at {:?}", hash); + let key = frame_support::storage::storage_prefix(b"System", b"Events"); + let events = get_storage::::Hash>>, + >(client, params!{ key, hash }).await?.unwrap_or_default(); + log::info!(target: LOG_TARGET, "events at inclusion {:?}", events); + } + TransactionStatus::Retracted(hash) => { + log::info!(target: LOG_TARGET, "Retracted at {:?}", hash); + } + TransactionStatus::Finalized(hash) => { + log::info!(target: LOG_TARGET, "Finalized at {:?}", hash); + break + } + _ => { + log::warn!(target: LOG_TARGET, "Stopping listen due to other status {:?}", status_update); + break + } } - } - }; - } + }; + } - Ok(()) + log::warn!(target: LOG_TARGET, "subscription terminated. Retrying..") + } } }}} From 17a5f6e9be89681452e95ee09e63b34c5f34280c Mon Sep 17 00:00:00 2001 From: kianenigma Date: Wed, 13 Oct 2021 15:01:38 +0200 Subject: [PATCH 2/7] wrap it up --- utils/staking-miner/src/dry_run.rs | 4 +-- utils/staking-miner/src/main.rs | 29 +++++++++------------- utils/staking-miner/src/monitor.rs | 40 ++++++++++++++++-------------- 3 files changed, 36 insertions(+), 37 deletions(-) diff --git a/utils/staking-miner/src/dry_run.rs b/utils/staking-miner/src/dry_run.rs index a98265c924d8..9501adb96fab 100644 --- a/utils/staking-miner/src/dry_run.rs +++ b/utils/staking-miner/src/dry_run.rs @@ -117,11 +117,11 @@ macro_rules! dry_run_cmd_for { ($runtime:ident) => { paste::paste! { let mut ext = crate::create_election_ext::( shared.uri.clone(), config.at, - vec!["Staking".to_string(), "System".to_string()] + vec!["Staking".to_string(), "System".to_string()], ).await?; force_create_snapshot::(&mut ext)?; - let (raw_solution, witness) = crate::mine_with::(&config.solver, &mut ext)?; + let (raw_solution, witness) = crate::mine_with::(&config.solver, &mut ext, false)?; let nonce = crate::get_account_info::(client, &signer.account, config.at) .await? diff --git a/utils/staking-miner/src/main.rs b/utils/staking-miner/src/main.rs index 681da022ed45..687c512eb797 100644 --- a/utils/staking-miner/src/main.rs +++ b/utils/staking-miner/src/main.rs @@ -350,10 +350,6 @@ struct SharedConfig { /// configured, it might re-try and lose funds through transaction fees/deposits. #[structopt(long, short, env = "SEED")] seed: String, - - /// Don't do the spec-version check. - #[structopt(long)] - no_spec_version_check: bool, } #[derive(Debug, Clone, StructOpt)] @@ -394,9 +390,9 @@ async fn create_election_ext( .map_err(|why| Error::RemoteExternalities(why)) } -/// Compute the election at the given block number. It expects to NOT be `Phase::Off`. In other -/// words, the snapshot must exists on the given externalities. -fn mine_unchecked( +/// Compute the election. It expects to NOT be `Phase::Off`. In other words, the snapshot must +/// exists on the given externalities. +fn mine_solution( ext: &mut Ext, do_feasibility: bool, ) -> Result<(EPM::RawSolution>, u32), Error> @@ -425,6 +421,7 @@ where fn mine_with( solver: &Solvers, ext: &mut Ext, + do_feasibility: bool, ) -> Result<(EPM::RawSolution>, u32), Error> where T: EPM::Config, @@ -435,21 +432,21 @@ where match solver { Solvers::SeqPhragmen { iterations } => { BalanceIterations::set(*iterations); - mine_unchecked::< + mine_solution::< T, SequentialPhragmen< ::AccountId, sp_runtime::Perbill, Balancing, >, - >(ext, false) + >(ext, do_feasibility) }, Solvers::PhragMMS { iterations } => { BalanceIterations::set(*iterations); - mine_unchecked::< + mine_solution::< T, PhragMMS<::AccountId, sp_runtime::Perbill, Balancing>, - >(ext, false) + >(ext, do_feasibility) }, } } @@ -494,7 +491,6 @@ fn mine_dpos(ext: &mut Ext) -> Result<(), Error> { pub(crate) async fn check_versions( client: &WsClient, - print: bool, ) -> Result<(), Error> { let linked_version = T::Version::get(); let on_chain_version = rpc_helpers::rpc::( @@ -505,10 +501,9 @@ pub(crate) async fn check_versions( .await .expect("runtime version RPC should always work; qed"); - if print { - log::info!(target: LOG_TARGET, "linked version {:?}", linked_version); - log::info!(target: LOG_TARGET, "on-chain version {:?}", on_chain_version); - } + log::debug!(target: LOG_TARGET, "linked version {:?}", linked_version); + log::debug!(target: LOG_TARGET, "on-chain version {:?}", on_chain_version); + if linked_version != on_chain_version { log::error!( target: LOG_TARGET, @@ -596,7 +591,7 @@ async fn main() { log::info!(target: LOG_TARGET, "connected to chain {:?}", chain); any_runtime_unit! { - check_versions::(&client, !shared.no_spec_version_check).await + check_versions::(&client).await }; let signer_account = any_runtime! { diff --git a/utils/staking-miner/src/monitor.rs b/utils/staking-miner/src/monitor.rs index fb1a774d676a..a96b7cd4e793 100644 --- a/utils/staking-miner/src/monitor.rs +++ b/utils/staking-miner/src/monitor.rs @@ -87,10 +87,10 @@ macro_rules! monitor_cmd_for { ($runtime:tt) => { paste::paste! { while let Some(now) = subscription.next().await? { let hash = now.hash(); - log::debug!(target: LOG_TARGET, "new event at #{:?} ({:?})", now.number, hash); + log::trace!(target: LOG_TARGET, "new event at #{:?} ({:?})", now.number, hash); - // if the runtime version has changed, terminate - crate::check_versions::(client, false).await?; + // if the runtime version has changed, terminate. + crate::check_versions::(client).await?; // we prefer doing this check before fetching anything into a remote-ext. if ensure_signed_phase::(client, hash).await.is_err() { @@ -98,22 +98,20 @@ macro_rules! monitor_cmd_for { ($runtime:tt) => { paste::paste! { continue; }; - // NOTE: we don't check the score of any of the submitted solutions. If we submit a weak - // one, as long as we are valid, we will end up getting our deposit back, so not a big - // deal for now. Note that to avoid an unfeasible solution, we should make sure that we - // only start the process on a finalized snapshot. If the signed phase is long enough, - // this will not be a solution. - // grab an externalities without staking, just the election snapshot. - let mut ext = crate::create_election_ext::(shared.uri.clone(), Some(hash), vec![]).await?; + let mut ext = crate::create_election_ext::( + shared.uri.clone(), + Some(hash), + vec![], + ).await?; if ensure_no_previous_solution::(&mut ext, &signer.account).await.is_err() { log::debug!(target: LOG_TARGET, "We already have a solution in this phase, skipping."); continue; } - let (raw_solution, witness) = crate::mine_with::(&config.solver, &mut ext)?; - + // mine a solution, and run feasibility check on it as well. + let (raw_solution, witness) = crate::mine_with::(&config.solver, &mut ext, true)?; log::info!(target: LOG_TARGET, "mined solution with {:?}", &raw_solution.score); let nonce = crate::get_account_info::(client, &signer.account, Some(hash)) @@ -124,7 +122,11 @@ macro_rules! monitor_cmd_for { ($runtime:tt) => { paste::paste! { let period = ::BlockHashCount::get() / 2; let current_block = now.number.saturating_sub(1); let era = sp_runtime::generic::Era::mortal(period.into(), current_block.into()); - log::trace!(target: LOG_TARGET, "transaction mortality: {:?} -> {:?}", era.birth(current_block.into()), era.death(current_block.into())); + log::trace!( + target: LOG_TARGET, "transaction mortality: {:?} -> {:?}", + era.birth(current_block.into()), + era.death(current_block.into()), + ); let extrinsic = ext.execute_with(|| create_uxt(raw_solution, witness, signer.clone(), nonce, tip, era)); let bytes = sp_core::Bytes(extrinsic.encode()); @@ -136,11 +138,13 @@ macro_rules! monitor_cmd_for { ($runtime:tt) => { paste::paste! { { Ok(sub) => sub, Err(why) => { - // This usually happens when we've been busy with mining for a few blocks, and now we're receiving the - // subscriptions of blocks in which we were busy. In these blocks, we still don't have a solution, so we - // re-compute a new solution and submit it with an outdated `Nonce`, which yields most often `Stale` - // error. NOTE: to improve this overall, and to be able to introduce an array of other fancy features, - // we should make this multi-threaded and do the computation outside of this callback. + // This usually happens when we've been busy with mining for a few blocks, and + // now we're receiving the subscriptions of blocks in which we were busy. In + // these blocks, we still don't have a solution, so we re-compute a new solution + // and submit it with an outdated `Nonce`, which yields most often `Stale` + // error. NOTE: to improve this overall, and to be able to introduce an array of + // other fancy features, we should make this multi-threaded and do the + // computation outside of this callback. log::warn!(target: LOG_TARGET, "failing to submit a transaction {:?}. continuing...", why); continue } From 4a17278e72fbb6f66bf20c3d2eccd4d47aa87dc4 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Wed, 13 Oct 2021 15:04:55 +0200 Subject: [PATCH 3/7] Master.into() --- Cargo.lock | 185 +++++++++++++++++++---------------------------------- 1 file changed, 67 insertions(+), 118 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e3ffcd97e3ff..bad2edc33a7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -474,7 +474,7 @@ dependencies = [ "futures 0.3.17", "log", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "sc-client-api", "sc-keystore", "sc-network", @@ -1106,15 +1106,6 @@ dependencies = [ "vec_map", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "cloudabi" version = "0.1.0" @@ -1734,15 +1725,6 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" -[[package]] -name = "erased-serde" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ca8b296792113e1500fd935ae487be6e00ce318952a6880555554824d6ebf38" -dependencies = [ - "serde", -] - [[package]] name = "errno" version = "0.2.5" @@ -1884,7 +1866,7 @@ dependencies = [ "log", "num-traits", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "scale-info", ] @@ -3006,7 +2988,7 @@ dependencies = [ "jsonrpc-server-utils", "log", "net2", - "parking_lot 0.11.1", + "parking_lot", "unicase", ] @@ -3021,7 +3003,7 @@ dependencies = [ "jsonrpc-server-utils", "log", "parity-tokio-ipc", - "parking_lot 0.11.1", + "parking_lot", "tower-service", ] @@ -3035,7 +3017,7 @@ dependencies = [ "jsonrpc-core", "lazy_static", "log", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", "serde", ] @@ -3069,7 +3051,7 @@ dependencies = [ "jsonrpc-server-utils", "log", "parity-ws", - "parking_lot 0.11.1", + "parking_lot", "slab", ] @@ -3262,7 +3244,7 @@ checksum = "c3b6b85fc643f5acd0bffb2cc8a6d150209379267af0d41db72170021841f9f5" dependencies = [ "kvdb", "parity-util-mem", - "parking_lot 0.11.1", + "parking_lot", ] [[package]] @@ -3277,7 +3259,7 @@ dependencies = [ "num_cpus", "owning_ref", "parity-util-mem", - "parking_lot 0.11.1", + "parking_lot", "regex", "rocksdb", "smallvec", @@ -3372,7 +3354,7 @@ dependencies = [ "libp2p-websocket", "libp2p-yamux", "multiaddr", - "parking_lot 0.11.1", + "parking_lot", "pin-project 1.0.8", "smallvec", "wasm-timer", @@ -3397,7 +3379,7 @@ dependencies = [ "multiaddr", "multihash 0.14.0", "multistream-select", - "parking_lot 0.11.1", + "parking_lot", "pin-project 1.0.8", "prost", "prost-build", @@ -3556,7 +3538,7 @@ dependencies = [ "libp2p-core", "log", "nohash-hasher", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", "smallvec", "unsigned-varint 0.7.0", @@ -3768,7 +3750,7 @@ checksum = "214cc0dd9c37cbed27f0bb1eba0c41bbafdb93a8be5e9d6ae1e6b4b42cd044bf" dependencies = [ "futures 0.3.17", "libp2p-core", - "parking_lot 0.11.1", + "parking_lot", "thiserror", "yamux", ] @@ -3937,15 +3919,6 @@ dependencies = [ "statrs", ] -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.1" @@ -5507,7 +5480,7 @@ dependencies = [ "log", "lz4", "memmap2", - "parking_lot 0.11.1", + "parking_lot", "rand 0.8.4", "snap", ] @@ -5570,7 +5543,7 @@ dependencies = [ "impl-trait-for-tuples", "lru 0.6.6", "parity-util-mem-derive", - "parking_lot 0.11.1", + "parking_lot", "primitive-types", "smallvec", "tikv-jemalloc-ctl", @@ -5628,16 +5601,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] - [[package]] name = "parking_lot" version = "0.11.1" @@ -5645,22 +5608,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" dependencies = [ "instant", - "lock_api 0.4.1", - "parking_lot_core 0.8.0", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi 0.0.3", - "libc", - "redox_syscall 0.1.56", - "smallvec", - "winapi 0.3.9", + "lock_api", + "parking_lot_core", ] [[package]] @@ -5670,7 +5619,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" dependencies = [ "cfg-if 0.1.10", - "cloudabi 0.1.0", + "cloudabi", "instant", "libc", "redox_syscall 0.1.56", @@ -6118,7 +6067,7 @@ dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", @@ -6164,7 +6113,7 @@ dependencies = [ "lru 0.7.0", "merlin", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6199,7 +6148,7 @@ dependencies = [ "kvdb-memorydb", "log", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -6302,7 +6251,7 @@ dependencies = [ "kvdb", "kvdb-memorydb", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", @@ -6448,7 +6397,7 @@ dependencies = [ "log", "mick-jaeger", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "polkadot-node-primitives", "polkadot-primitives", "sc-network", @@ -6520,7 +6469,7 @@ version = "0.9.11" dependencies = [ "async-trait", "futures 0.3.17", - "parking_lot 0.11.1", + "parking_lot", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", @@ -6591,7 +6540,7 @@ dependencies = [ "lru 0.7.0", "metered-channel", "parity-util-mem", - "parking_lot 0.11.1", + "parking_lot", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -7445,7 +7394,7 @@ dependencies = [ "fnv", "lazy_static", "memchr", - "parking_lot 0.11.1", + "parking_lot", "thiserror", ] @@ -8241,7 +8190,7 @@ dependencies = [ "hash-db", "log", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "sc-executor", "sc-transaction-pool-api", "sc-utils", @@ -8272,7 +8221,7 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "sc-client-api", "sc-state-db", "sp-arithmetic", @@ -8294,7 +8243,7 @@ dependencies = [ "futures-timer 3.0.2", "libp2p", "log", - "parking_lot 0.11.1", + "parking_lot", "sc-client-api", "sc-utils", "serde", @@ -8323,7 +8272,7 @@ dependencies = [ "num-rational 0.2.4", "num-traits", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", "retain_mut", "sc-client-api", @@ -8468,7 +8417,7 @@ dependencies = [ "libsecp256k1 0.6.0", "log", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "sc-executor-common", "sc-executor-wasmi", "sc-executor-wasmtime", @@ -8551,7 +8500,7 @@ dependencies = [ "futures-timer 3.0.2", "log", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "rand 0.8.4", "sc-block-builder", "sc-client-api", @@ -8623,7 +8572,7 @@ dependencies = [ "async-trait", "derive_more", "hex", - "parking_lot 0.11.1", + "parking_lot", "serde_json", "sp-application-crypto", "sp-core", @@ -8637,7 +8586,7 @@ source = "git+https://github.com/paritytech/substrate?branch=master#66f0008af390 dependencies = [ "hash-db", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "sc-client-api", "sc-executor", "sp-api", @@ -8673,7 +8622,7 @@ dependencies = [ "log", "lru 0.6.6", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "pin-project 1.0.8", "prost", "prost-build", @@ -8730,7 +8679,7 @@ dependencies = [ "log", "num_cpus", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", "sc-client-api", "sc-network", @@ -8775,7 +8724,7 @@ dependencies = [ "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -8807,7 +8756,7 @@ dependencies = [ "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "sc-chain-spec", "sc-transaction-pool-api", "serde", @@ -8853,7 +8802,7 @@ dependencies = [ "log", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.11.1", + "parking_lot", "pin-project 1.0.8", "rand 0.7.3", "sc-block-builder", @@ -8911,7 +8860,7 @@ dependencies = [ "parity-scale-codec", "parity-util-mem", "parity-util-mem-derive", - "parking_lot 0.11.1", + "parking_lot", "sc-client-api", "sp-core", ] @@ -8947,7 +8896,7 @@ dependencies = [ "futures 0.3.17", "libp2p", "log", - "parking_lot 0.11.1", + "parking_lot", "pin-project 1.0.8", "rand 0.7.3", "serde", @@ -8967,7 +8916,7 @@ dependencies = [ "lazy_static", "log", "once_cell", - "parking_lot 0.11.1", + "parking_lot", "regex", "rustc-hash", "sc-client-api", @@ -9008,7 +8957,7 @@ dependencies = [ "log", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.11.1", + "parking_lot", "retain_mut", "sc-client-api", "sc-transaction-pool-api", @@ -9358,15 +9307,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -dependencies = [ - "erased-serde", -] - [[package]] name = "slot-range-helper" version = "0.9.11" @@ -9573,7 +9513,7 @@ dependencies = [ "log", "lru 0.6.6", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "sp-api", "sp-consensus", "sp-database", @@ -9669,7 +9609,7 @@ dependencies = [ "num-traits", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.11.1", + "parking_lot", "primitive-types", "rand 0.7.3", "regex", @@ -9683,6 +9623,7 @@ dependencies = [ "sp-runtime-interface", "sp-std", "sp-storage", + "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", @@ -9698,7 +9639,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#66f0008af39054d1457ad7eac78a47efa6bc39a3" dependencies = [ "kvdb", - "parking_lot 0.11.1", + "parking_lot", ] [[package]] @@ -9764,7 +9705,7 @@ dependencies = [ "libsecp256k1 0.6.0", "log", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "sp-core", "sp-externalities", "sp-keystore", @@ -9799,7 +9740,7 @@ dependencies = [ "futures 0.3.17", "merlin", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "schnorrkel", "serde", "sp-core", @@ -9962,7 +9903,7 @@ dependencies = [ "log", "num-traits", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", "smallvec", "sp-core", @@ -10028,13 +9969,7 @@ name = "sp-tracing" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=master#66f0008af39054d1457ad7eac78a47efa6bc39a3" dependencies = [ - "erased-serde", - "log", "parity-scale-codec", - "parking_lot 0.10.2", - "serde", - "serde_json", - "slog", "sp-std", "tracing", "tracing-core", @@ -10125,6 +10060,20 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "ss58-registry" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2413ecc7946ca99368862851dc1359f1477bc654ecfb135cf3efcb85ceca5f" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "serde", + "serde_json", + "unicode-xid", +] + [[package]] name = "stable_deref_trait" version = "1.1.1" @@ -10181,7 +10130,7 @@ checksum = "11b73400442027c4adedda20a9f9b7945234a5bd8d5f7e86da22bd5d0622369c" dependencies = [ "cfg_aliases", "libc", - "parking_lot 0.11.1", + "parking_lot", "static_init_macro", ] @@ -10995,7 +10944,7 @@ dependencies = [ "lazy_static", "log", "lru-cache", - "parking_lot 0.11.1", + "parking_lot", "resolv-conf", "smallvec", "thiserror", @@ -11369,7 +11318,7 @@ checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ "futures 0.3.17", "js-sys", - "parking_lot 0.11.1", + "parking_lot", "pin-utils", "wasm-bindgen", "wasm-bindgen-futures", @@ -11935,7 +11884,7 @@ dependencies = [ "futures 0.3.17", "log", "nohash-hasher", - "parking_lot 0.11.1", + "parking_lot", "rand 0.8.4", "static_assertions", ] From 0c382fadac08a052cdc9b40070b167b755bed4ea Mon Sep 17 00:00:00 2001 From: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Thu, 14 Oct 2021 11:56:25 +0100 Subject: [PATCH 4/7] Update utils/staking-miner/src/monitor.rs Co-authored-by: Niklas Adolfsson --- utils/staking-miner/src/monitor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/staking-miner/src/monitor.rs b/utils/staking-miner/src/monitor.rs index a96b7cd4e793..c6e455a8eee8 100644 --- a/utils/staking-miner/src/monitor.rs +++ b/utils/staking-miner/src/monitor.rs @@ -81,7 +81,7 @@ macro_rules! monitor_cmd_for { ($runtime:tt) => { paste::paste! { loop { log::info!(target: LOG_TARGET, "subscribing to {:?} / {:?}", sub, unsub); let mut subscription: Subscription
= client - .subscribe(&sub, JsonRpcParams::NoParams, &unsub) + .subscribe(&sub, params! {}, &unsub) .await .unwrap(); From 6000c3e9fce0a1eb72418dca9325bb8ec455aade Mon Sep 17 00:00:00 2001 From: kianenigma Date: Thu, 14 Oct 2021 13:06:27 +0200 Subject: [PATCH 5/7] last touches --- utils/staking-miner/Cargo.toml | 2 +- utils/staking-miner/src/monitor.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/staking-miner/Cargo.toml b/utils/staking-miner/Cargo.toml index 593d1a1bf2cd..bfc07614f5e6 100644 --- a/utils/staking-miner/Cargo.toml +++ b/utils/staking-miner/Cargo.toml @@ -14,7 +14,7 @@ jsonrpsee-ws-client = { version = "0.3.1", default-features = false, features = serde_json = "1.0" serde = "1.0.130" paste = "1.0.5" -thiserror = "1.0.26" +thiserror = "1.0.30" remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/utils/staking-miner/src/monitor.rs b/utils/staking-miner/src/monitor.rs index a96b7cd4e793..4487d36ea944 100644 --- a/utils/staking-miner/src/monitor.rs +++ b/utils/staking-miner/src/monitor.rs @@ -150,7 +150,7 @@ macro_rules! monitor_cmd_for { ($runtime:tt) => { paste::paste! { } }; - let _success = while let Some(status_update) = tx_subscription.next().await? { + while let Some(status_update) = tx_subscription.next().await? { log::trace!(target: LOG_TARGET, "status update {:?}", status_update); match status_update { TransactionStatus::Ready | TransactionStatus::Broadcast(_) | TransactionStatus::Future => continue, @@ -176,7 +176,7 @@ macro_rules! monitor_cmd_for { ($runtime:tt) => { paste::paste! { }; } - log::warn!(target: LOG_TARGET, "subscription terminated. Retrying..") + log::warn!(target: LOG_TARGET, "subscription to {} terminated. Retrying..", sub) } } }}} From 2e54b8c7159eeffef0a0393f1b3e52fafe9af0ef Mon Sep 17 00:00:00 2001 From: kianenigma Date: Thu, 14 Oct 2021 13:19:08 +0200 Subject: [PATCH 6/7] Fix --- utils/staking-miner/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/staking-miner/src/main.rs b/utils/staking-miner/src/main.rs index 687c512eb797..1f2394ed17d1 100644 --- a/utils/staking-miner/src/main.rs +++ b/utils/staking-miner/src/main.rs @@ -549,7 +549,7 @@ async fn main() { match chain.to_lowercase().as_str() { "polkadot" | "development" => { sp_core::crypto::set_default_ss58_version( - sp_core::crypto::Ss58AddressFormat::PolkadotAccount, + sp_core::crypto::Ss58AddressFormatRegistry::PolkadotAccount, ); sub_tokens::dynamic::set_name("DOT"); sub_tokens::dynamic::set_decimal_points(10_000_000_000); @@ -561,7 +561,7 @@ async fn main() { }, "kusama" | "kusama-dev" => { sp_core::crypto::set_default_ss58_version( - sp_core::crypto::Ss58AddressFormat::KusamaAccount, + sp_core::crypto::Ss58AddressFormatRegistry::KusamaAccount, ); sub_tokens::dynamic::set_name("KSM"); sub_tokens::dynamic::set_decimal_points(1_000_000_000_000); @@ -573,7 +573,7 @@ async fn main() { }, "westend" => { sp_core::crypto::set_default_ss58_version( - sp_core::crypto::Ss58AddressFormat::PolkadotAccount, + sp_core::crypto::Ss58AddressFormatRegistry::PolkadotAccount, ); sub_tokens::dynamic::set_name("WND"); sub_tokens::dynamic::set_decimal_points(1_000_000_000_000); From ad6b4db74305e03aa1d164ca0053f77732af4154 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Thu, 14 Oct 2021 13:23:06 +0200 Subject: [PATCH 7/7] fix again --- utils/staking-miner/src/main.rs | 6 +++--- utils/staking-miner/src/monitor.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/staking-miner/src/main.rs b/utils/staking-miner/src/main.rs index 1f2394ed17d1..5692d991e23e 100644 --- a/utils/staking-miner/src/main.rs +++ b/utils/staking-miner/src/main.rs @@ -549,7 +549,7 @@ async fn main() { match chain.to_lowercase().as_str() { "polkadot" | "development" => { sp_core::crypto::set_default_ss58_version( - sp_core::crypto::Ss58AddressFormatRegistry::PolkadotAccount, + sp_core::crypto::Ss58AddressFormatRegistry::PolkadotAccount.into(), ); sub_tokens::dynamic::set_name("DOT"); sub_tokens::dynamic::set_decimal_points(10_000_000_000); @@ -561,7 +561,7 @@ async fn main() { }, "kusama" | "kusama-dev" => { sp_core::crypto::set_default_ss58_version( - sp_core::crypto::Ss58AddressFormatRegistry::KusamaAccount, + sp_core::crypto::Ss58AddressFormatRegistry::KusamaAccount.into(), ); sub_tokens::dynamic::set_name("KSM"); sub_tokens::dynamic::set_decimal_points(1_000_000_000_000); @@ -573,7 +573,7 @@ async fn main() { }, "westend" => { sp_core::crypto::set_default_ss58_version( - sp_core::crypto::Ss58AddressFormatRegistry::PolkadotAccount, + sp_core::crypto::Ss58AddressFormatRegistry::PolkadotAccount.into(), ); sub_tokens::dynamic::set_name("WND"); sub_tokens::dynamic::set_decimal_points(1_000_000_000_000); diff --git a/utils/staking-miner/src/monitor.rs b/utils/staking-miner/src/monitor.rs index 678eb85b2bd2..6bd90666f7ca 100644 --- a/utils/staking-miner/src/monitor.rs +++ b/utils/staking-miner/src/monitor.rs @@ -21,7 +21,7 @@ use crate::{ }; use codec::Encode; use jsonrpsee_ws_client::{ - types::{traits::SubscriptionClient, v2::params::JsonRpcParams, Subscription}, + types::{traits::SubscriptionClient, Subscription}, WsClient, }; use sc_transaction_pool_api::TransactionStatus;