diff --git a/polkadot/Cargo.toml b/polkadot/Cargo.toml index 32c11fe9dc..491c587242 100644 --- a/polkadot/Cargo.toml +++ b/polkadot/Cargo.toml @@ -8,7 +8,7 @@ description = "Implementation of a `https://polkadot.network` node in Rust based license = "GPL-3.0-only" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" rust-version = "1.57.0" # custom profiles readme = "README.md" diff --git a/polkadot/bridges/bin/runtime-common/src/messages_benchmarking.rs b/polkadot/bridges/bin/runtime-common/src/messages_benchmarking.rs index 217560e114..de2d0cd1cb 100644 --- a/polkadot/bridges/bin/runtime-common/src/messages_benchmarking.rs +++ b/polkadot/bridges/bin/runtime-common/src/messages_benchmarking.rs @@ -35,7 +35,7 @@ use pallet_bridge_messages::benchmarking::{ use sp_core::Hasher; use sp_runtime::traits::Header; use sp_std::prelude::*; -use sp_trie::{record_all_keys, trie_types::TrieDBMut, Layout, MemoryDB, Recorder, TrieMut}; +use sp_trie::{record_all_keys, trie_types::TrieDBMutV1, LayoutV1, MemoryDB, Recorder, TrieMut}; /// Generate ed25519 signature to be used in /// `pallet_brdige_call_dispatch::CallOrigin::TargetAccount`. @@ -102,7 +102,7 @@ where let mut root = Default::default(); let mut mdb = MemoryDB::default(); { - let mut trie = TrieDBMut::::new(&mut mdb, &mut root); + let mut trie = TrieDBMutV1::::new(&mut mdb, &mut root); // insert messages for nonce in params.message_nonces.clone() { @@ -131,7 +131,7 @@ where // generate storage proof to be delivered to This chain let mut proof_recorder = Recorder::::new(); - record_all_keys::, _>(&mdb, &root, &mut proof_recorder) + record_all_keys::, _>(&mdb, &root, &mut proof_recorder) .map_err(|_| "record_all_keys has failed") .expect("record_all_keys should not fail in benchmarks"); let storage_proof = proof_recorder.drain().into_iter().map(|n| n.data.to_vec()).collect(); @@ -175,7 +175,7 @@ where let mut root = Default::default(); let mut mdb = MemoryDB::default(); { - let mut trie = TrieDBMut::::new(&mut mdb, &mut root); + let mut trie = TrieDBMutV1::::new(&mut mdb, &mut root); trie.insert(&storage_key, ¶ms.inbound_lane_data.encode()) .map_err(|_| "TrieMut::insert has failed") .expect("TrieMut::insert should not fail in benchmarks"); @@ -184,7 +184,7 @@ where // generate storage proof to be delivered to This chain let mut proof_recorder = Recorder::::new(); - record_all_keys::, _>(&mdb, &root, &mut proof_recorder) + record_all_keys::, _>(&mdb, &root, &mut proof_recorder) .map_err(|_| "record_all_keys has failed") .expect("record_all_keys should not fail in benchmarks"); let storage_proof = proof_recorder.drain().into_iter().map(|n| n.data.to_vec()).collect(); @@ -209,11 +209,11 @@ fn grow_trie(mut root: H::Out, mdb: &mut MemoryDB, trie_size: Proo ProofSize::HasExtraNodes(size) => (8, 1, size), }; - let mut key_index = 0; + let mut key_index = 0u32; loop { // generate storage proof to be delivered to This chain let mut proof_recorder = Recorder::::new(); - record_all_keys::, _>(mdb, &root, &mut proof_recorder) + record_all_keys::, _>(mdb, &root, &mut proof_recorder) .map_err(|_| "record_all_keys has failed") .expect("record_all_keys should not fail in benchmarks"); let size: usize = proof_recorder.drain().into_iter().map(|n| n.data.len()).sum(); @@ -221,7 +221,7 @@ fn grow_trie(mut root: H::Out, mdb: &mut MemoryDB, trie_size: Proo return root } - let mut trie = TrieDBMut::::from_existing(mdb, &mut root) + let mut trie = TrieDBMutV1::::from_existing(mdb, &mut root) .map_err(|_| "TrieDBMut::from_existing has failed") .expect("TrieDBMut::from_existing should not fail in benchmarks"); for _ in 0..iterations { diff --git a/polkadot/cli/Cargo.toml b/polkadot/cli/Cargo.toml index 366258a017..88b6ed53ea 100644 --- a/polkadot/cli/Cargo.toml +++ b/polkadot/cli/Cargo.toml @@ -3,7 +3,7 @@ name = "polkadot-cli" version = "0.9.17" authors = ["Parity Technologies "] description = "Polkadot Relay-chain Client Node" -edition = "2018" +edition = "2021" [package.metadata.wasm-pack.profile.release] # `wasm-opt` has some problems on Linux, see diff --git a/polkadot/core-primitives/Cargo.toml b/polkadot/core-primitives/Cargo.toml index bb7c809c65..bf5572fca5 100644 --- a/polkadot/core-primitives/Cargo.toml +++ b/polkadot/core-primitives/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-core-primitives" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } diff --git a/polkadot/erasure-coding/Cargo.toml b/polkadot/erasure-coding/Cargo.toml index cd5853df50..7fe2023364 100644 --- a/polkadot/erasure-coding/Cargo.toml +++ b/polkadot/erasure-coding/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-erasure-coding" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] polkadot-primitives = { path = "../primitives" } diff --git a/polkadot/erasure-coding/fuzzer/Cargo.toml b/polkadot/erasure-coding/fuzzer/Cargo.toml index 13812ab76b..d531c42d42 100644 --- a/polkadot/erasure-coding/fuzzer/Cargo.toml +++ b/polkadot/erasure-coding/fuzzer/Cargo.toml @@ -2,7 +2,7 @@ name = "erasure_coding_fuzzer" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] polkadot-erasure-coding = { path = ".." } diff --git a/polkadot/node/client/Cargo.toml b/polkadot/node/client/Cargo.toml index 3ebd65de8a..2f10ff290e 100644 --- a/polkadot/node/client/Cargo.toml +++ b/polkadot/node/client/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-client" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/polkadot/node/collation-generation/Cargo.toml b/polkadot/node/collation-generation/Cargo.toml index 09cc647e44..d1d62569f9 100644 --- a/polkadot/node/collation-generation/Cargo.toml +++ b/polkadot/node/collation-generation/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-collation-generation" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/core/approval-voting/Cargo.toml b/polkadot/node/core/approval-voting/Cargo.toml index a328dec18d..e14b547058 100644 --- a/polkadot/node/core/approval-voting/Cargo.toml +++ b/polkadot/node/core/approval-voting/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-core-approval-voting" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/core/av-store/Cargo.toml b/polkadot/node/core/av-store/Cargo.toml index 4c79fc9fcf..29f3bba9dc 100644 --- a/polkadot/node/core/av-store/Cargo.toml +++ b/polkadot/node/core/av-store/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-core-av-store" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/core/backing/Cargo.toml b/polkadot/node/core/backing/Cargo.toml index 0bc7ff04c1..c5a02c0df5 100644 --- a/polkadot/node/core/backing/Cargo.toml +++ b/polkadot/node/core/backing/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-core-backing" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/core/bitfield-signing/Cargo.toml b/polkadot/node/core/bitfield-signing/Cargo.toml index 60501a3137..820c12afab 100644 --- a/polkadot/node/core/bitfield-signing/Cargo.toml +++ b/polkadot/node/core/bitfield-signing/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-core-bitfield-signing" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/core/candidate-validation/Cargo.toml b/polkadot/node/core/candidate-validation/Cargo.toml index ab0fbccf12..e6035670f4 100644 --- a/polkadot/node/core/candidate-validation/Cargo.toml +++ b/polkadot/node/core/candidate-validation/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-core-candidate-validation" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] async-trait = "0.1.52" diff --git a/polkadot/node/core/chain-api/Cargo.toml b/polkadot/node/core/chain-api/Cargo.toml index ecac94abcb..85629724fd 100644 --- a/polkadot/node/core/chain-api/Cargo.toml +++ b/polkadot/node/core/chain-api/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-core-chain-api" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/core/chain-selection/Cargo.toml b/polkadot/node/core/chain-selection/Cargo.toml index 38544cf057..33ff8e37db 100644 --- a/polkadot/node/core/chain-selection/Cargo.toml +++ b/polkadot/node/core/chain-selection/Cargo.toml @@ -3,7 +3,7 @@ name = "polkadot-node-core-chain-selection" description = "Chain Selection Subsystem" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/core/dispute-coordinator/Cargo.toml b/polkadot/node/core/dispute-coordinator/Cargo.toml index 686441352b..680875f38a 100644 --- a/polkadot/node/core/dispute-coordinator/Cargo.toml +++ b/polkadot/node/core/dispute-coordinator/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-core-dispute-coordinator" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/core/parachains-inherent/Cargo.toml b/polkadot/node/core/parachains-inherent/Cargo.toml index a050d4a697..6652d34ab0 100644 --- a/polkadot/node/core/parachains-inherent/Cargo.toml +++ b/polkadot/node/core/parachains-inherent/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-core-parachains-inherent" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/core/provisioner/Cargo.toml b/polkadot/node/core/provisioner/Cargo.toml index 1fbe9f83be..0941712645 100644 --- a/polkadot/node/core/provisioner/Cargo.toml +++ b/polkadot/node/core/provisioner/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-core-provisioner" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] } diff --git a/polkadot/node/core/pvf-checker/Cargo.toml b/polkadot/node/core/pvf-checker/Cargo.toml index efb3b1d2ac..875323e909 100644 --- a/polkadot/node/core/pvf-checker/Cargo.toml +++ b/polkadot/node/core/pvf-checker/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-core-pvf-checker" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/core/pvf/Cargo.toml b/polkadot/node/core/pvf/Cargo.toml index ee486b3c66..217fe431d7 100644 --- a/polkadot/node/core/pvf/Cargo.toml +++ b/polkadot/node/core/pvf/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-core-pvf" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [[bin]] name = "puppet_worker" diff --git a/polkadot/node/core/runtime-api/Cargo.toml b/polkadot/node/core/runtime-api/Cargo.toml index 143d7b5dca..9a2892c5ac 100644 --- a/polkadot/node/core/runtime-api/Cargo.toml +++ b/polkadot/node/core/runtime-api/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-core-runtime-api" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/jaeger/Cargo.toml b/polkadot/node/jaeger/Cargo.toml index d7a16098c1..b9a6d32722 100644 --- a/polkadot/node/jaeger/Cargo.toml +++ b/polkadot/node/jaeger/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-jaeger" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" description = "Polkadot Jaeger primitives" [dependencies] diff --git a/polkadot/node/malus/Cargo.toml b/polkadot/node/malus/Cargo.toml index 68e6b82f7e..ced05ca9ce 100644 --- a/polkadot/node/malus/Cargo.toml +++ b/polkadot/node/malus/Cargo.toml @@ -4,7 +4,7 @@ description = "Misbehaving nodes for local testnets, system and Simnet tests." license = "GPL-3.0-only" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" readme = "README.md" publish = false @@ -13,7 +13,7 @@ name = "malus" path = "src/malus.rs" [dependencies] -polkadot-cli = { path = "../../cli", default-features = false, features = ["cli", "malus"] } +polkadot-cli = { path = "../../cli", default-features = false, features = ["cli", "malus", "polkadot-native"] } polkadot-node-subsystem = { path = "../subsystem" } polkadot-node-subsystem-util = { path = "../subsystem-util" } polkadot-node-subsystem-types = { path = "../subsystem-types" } diff --git a/polkadot/node/metered-channel/Cargo.toml b/polkadot/node/metered-channel/Cargo.toml index 2d21321130..06b390b4ac 100644 --- a/polkadot/node/metered-channel/Cargo.toml +++ b/polkadot/node/metered-channel/Cargo.toml @@ -2,7 +2,7 @@ name = "metered-channel" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" description = "Channels with attached Meters" [dependencies] diff --git a/polkadot/node/metrics/Cargo.toml b/polkadot/node/metrics/Cargo.toml index b41ae13c53..814b3cb75f 100644 --- a/polkadot/node/metrics/Cargo.toml +++ b/polkadot/node/metrics/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-metrics" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" description = "Subsystem metric helpers" [dependencies] diff --git a/polkadot/node/network/approval-distribution/Cargo.toml b/polkadot/node/network/approval-distribution/Cargo.toml index 83e6286637..be488999c8 100644 --- a/polkadot/node/network/approval-distribution/Cargo.toml +++ b/polkadot/node/network/approval-distribution/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-approval-distribution" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] polkadot-node-primitives = { path = "../../primitives" } diff --git a/polkadot/node/network/availability-distribution/Cargo.toml b/polkadot/node/network/availability-distribution/Cargo.toml index 41e8d4d401..1aaa1b497b 100644 --- a/polkadot/node/network/availability-distribution/Cargo.toml +++ b/polkadot/node/network/availability-distribution/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-availability-distribution" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/network/availability-recovery/Cargo.toml b/polkadot/node/network/availability-recovery/Cargo.toml index 70756fefda..e0696e17f8 100644 --- a/polkadot/node/network/availability-recovery/Cargo.toml +++ b/polkadot/node/network/availability-recovery/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-availability-recovery" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/network/bitfield-distribution/Cargo.toml b/polkadot/node/network/bitfield-distribution/Cargo.toml index 346a26353c..2b19e0a5bb 100644 --- a/polkadot/node/network/bitfield-distribution/Cargo.toml +++ b/polkadot/node/network/bitfield-distribution/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-availability-bitfield-distribution" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/network/bridge/Cargo.toml b/polkadot/node/network/bridge/Cargo.toml index 4062d463b8..33bd223ca9 100644 --- a/polkadot/node/network/bridge/Cargo.toml +++ b/polkadot/node/network/bridge/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-network-bridge" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] async-trait = "0.1.52" diff --git a/polkadot/node/network/collator-protocol/Cargo.toml b/polkadot/node/network/collator-protocol/Cargo.toml index 21ec6620cb..08a9c30093 100644 --- a/polkadot/node/network/collator-protocol/Cargo.toml +++ b/polkadot/node/network/collator-protocol/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-collator-protocol" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] always-assert = "0.1.2" diff --git a/polkadot/node/network/dispute-distribution/Cargo.toml b/polkadot/node/network/dispute-distribution/Cargo.toml index 7c2f0436d6..e80a1d9333 100644 --- a/polkadot/node/network/dispute-distribution/Cargo.toml +++ b/polkadot/node/network/dispute-distribution/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-dispute-distribution" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/network/gossip-support/Cargo.toml b/polkadot/node/network/gossip-support/Cargo.toml index 221f6de7bd..4de7f8d4d1 100644 --- a/polkadot/node/network/gossip-support/Cargo.toml +++ b/polkadot/node/network/gossip-support/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-gossip-support" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/polkadot/node/network/protocol/Cargo.toml b/polkadot/node/network/protocol/Cargo.toml index 17cb28969c..a80b6cf275 100644 --- a/polkadot/node/network/protocol/Cargo.toml +++ b/polkadot/node/network/protocol/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-network-protocol" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" description = "Primitives types for the Node-side" [dependencies] diff --git a/polkadot/node/network/statement-distribution/Cargo.toml b/polkadot/node/network/statement-distribution/Cargo.toml index 4a3a06a25a..8c0fa63503 100644 --- a/polkadot/node/network/statement-distribution/Cargo.toml +++ b/polkadot/node/network/statement-distribution/Cargo.toml @@ -3,7 +3,7 @@ name = "polkadot-statement-distribution" version = "0.9.17" authors = ["Parity Technologies "] description = "Statement Distribution Subsystem" -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/node/overseer/Cargo.toml b/polkadot/node/overseer/Cargo.toml index 33f391271b..40ee0955f8 100644 --- a/polkadot/node/overseer/Cargo.toml +++ b/polkadot/node/overseer/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-overseer" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] client = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/polkadot/node/overseer/overseer-gen/Cargo.toml b/polkadot/node/overseer/overseer-gen/Cargo.toml index c3e8e147ed..24cdf8eb01 100644 --- a/polkadot/node/overseer/overseer-gen/Cargo.toml +++ b/polkadot/node/overseer/overseer-gen/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-overseer-gen" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" description = "Generate an overseer including builder pattern and message wrapper from a single struct." [dependencies] diff --git a/polkadot/node/overseer/overseer-gen/proc-macro/Cargo.toml b/polkadot/node/overseer/overseer-gen/proc-macro/Cargo.toml index 3a68d8b632..786728aa98 100644 --- a/polkadot/node/overseer/overseer-gen/proc-macro/Cargo.toml +++ b/polkadot/node/overseer/overseer-gen/proc-macro/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-overseer-gen-proc-macro" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" description = "Generate an overseer including builder pattern and message wrapper from a single annotated struct definition." [package.metadata.docs.rs] diff --git a/polkadot/node/overseer/src/tests.rs b/polkadot/node/overseer/src/tests.rs index 77145f0dc0..761cb970cd 100644 --- a/polkadot/node/overseer/src/tests.rs +++ b/polkadot/node/overseer/src/tests.rs @@ -47,7 +47,6 @@ use sp_core::crypto::Pair as _; use super::*; fn block_info_to_pair(blocks: impl IntoIterator) -> Vec<(Hash, BlockNumber)> { - use std::iter::FromIterator; Vec::from_iter( blocks .into_iter() diff --git a/polkadot/node/primitives/Cargo.toml b/polkadot/node/primitives/Cargo.toml index 96af76f07c..a56f1ba56f 100644 --- a/polkadot/node/primitives/Cargo.toml +++ b/polkadot/node/primitives/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-primitives" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" description = "Primitives types for the Node-side" [dependencies] diff --git a/polkadot/node/service/Cargo.toml b/polkadot/node/service/Cargo.toml index b06b59339e..771c2614a4 100644 --- a/polkadot/node/service/Cargo.toml +++ b/polkadot/node/service/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-service" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] # Substrate Client diff --git a/polkadot/node/service/src/overseer.rs b/polkadot/node/service/src/overseer.rs index 4b4d9682e0..63e086de8c 100644 --- a/polkadot/node/service/src/overseer.rs +++ b/polkadot/node/service/src/overseer.rs @@ -178,7 +178,6 @@ where Spawner: 'static + SpawnNamed + Clone + Unpin, { use polkadot_node_subsystem_util::metrics::Metrics; - use std::iter::FromIterator; let metrics = ::register(registry)?; diff --git a/polkadot/node/subsystem-test-helpers/Cargo.toml b/polkadot/node/subsystem-test-helpers/Cargo.toml index 5a5408bc59..141c4d23c1 100644 --- a/polkadot/node/subsystem-test-helpers/Cargo.toml +++ b/polkadot/node/subsystem-test-helpers/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-subsystem-test-helpers" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" description = "Subsystem traits and message definitions" [dependencies] diff --git a/polkadot/node/subsystem-types/Cargo.toml b/polkadot/node/subsystem-types/Cargo.toml index a0e6586c3f..4a020a923c 100644 --- a/polkadot/node/subsystem-types/Cargo.toml +++ b/polkadot/node/subsystem-types/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-subsystem-types" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" description = "Subsystem traits and message definitions" [dependencies] diff --git a/polkadot/node/subsystem-util/Cargo.toml b/polkadot/node/subsystem-util/Cargo.toml index 7b2596a5ac..1bb8eea019 100644 --- a/polkadot/node/subsystem-util/Cargo.toml +++ b/polkadot/node/subsystem-util/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-subsystem-util" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" description = "Subsystem traits and message definitions" [dependencies] diff --git a/polkadot/node/subsystem-util/src/lib.rs b/polkadot/node/subsystem-util/src/lib.rs index bf120c945f..2f07aa9389 100644 --- a/polkadot/node/subsystem-util/src/lib.rs +++ b/polkadot/node/subsystem-util/src/lib.rs @@ -250,8 +250,6 @@ pub async fn sign( key: &ValidatorId, data: &[u8], ) -> Result, KeystoreError> { - use std::convert::TryInto; - let signature = CryptoStore::sign_with(&**keystore, ValidatorId::ID, &key.into(), &data).await?; diff --git a/polkadot/node/subsystem/Cargo.toml b/polkadot/node/subsystem/Cargo.toml index 1dc1e208b8..3f960bcb8b 100644 --- a/polkadot/node/subsystem/Cargo.toml +++ b/polkadot/node/subsystem/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-node-subsystem" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" description = "Subsystem traits and message definitions and the generated overseer" [dependencies] diff --git a/polkadot/node/test/client/Cargo.toml b/polkadot/node/test/client/Cargo.toml index e8f404ed87..3077304889 100644 --- a/polkadot/node/test/client/Cargo.toml +++ b/polkadot/node/test/client/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-test-client" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] parity-scale-codec = { version = "2.3.1", default-features = false, features = ["derive"] } diff --git a/polkadot/node/test/performance-test/Cargo.toml b/polkadot/node/test/performance-test/Cargo.toml index bd5a5be241..0c43a1c45f 100644 --- a/polkadot/node/test/performance-test/Cargo.toml +++ b/polkadot/node/test/performance-test/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-performance-test" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] thiserror = "1.0.30" diff --git a/polkadot/node/test/service/Cargo.toml b/polkadot/node/test/service/Cargo.toml index 526d02bb62..a857772381 100644 --- a/polkadot/node/test/service/Cargo.toml +++ b/polkadot/node/test/service/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-test-service" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] futures = "0.3.21" diff --git a/polkadot/parachain/Cargo.toml b/polkadot/parachain/Cargo.toml index 1cf1801f4a..266a19ead2 100644 --- a/polkadot/parachain/Cargo.toml +++ b/polkadot/parachain/Cargo.toml @@ -3,7 +3,7 @@ name = "polkadot-parachain" version = "0.9.17" authors = ["Parity Technologies "] description = "Types and utilities for creating and working with parachains" -edition = "2018" +edition = "2021" [dependencies] # note: special care is taken to avoid inclusion of `sp-io` externals when compiling diff --git a/polkadot/parachain/src/primitives.rs b/polkadot/parachain/src/primitives.rs index df2b338ca6..b7de1d0ada 100644 --- a/polkadot/parachain/src/primitives.rs +++ b/polkadot/parachain/src/primitives.rs @@ -158,7 +158,6 @@ impl From for Id { impl From for Id { fn from(x: usize) -> Self { - use sp_std::convert::TryInto; // can't panic, so need to truncate let x = x.try_into().unwrap_or(u32::MAX); Id(x) diff --git a/polkadot/parachain/test-parachains/Cargo.toml b/polkadot/parachain/test-parachains/Cargo.toml index fc769e898d..d587c30292 100644 --- a/polkadot/parachain/test-parachains/Cargo.toml +++ b/polkadot/parachain/test-parachains/Cargo.toml @@ -3,7 +3,7 @@ name = "test-parachains" version = "0.9.17" authors = ["Parity Technologies "] description = "Integration tests using the test-parachains" -edition = "2018" +edition = "2021" [dependencies] tiny-keccak = "2.0.2" diff --git a/polkadot/parachain/test-parachains/adder/Cargo.toml b/polkadot/parachain/test-parachains/adder/Cargo.toml index 781c278935..7bd3272a48 100644 --- a/polkadot/parachain/test-parachains/adder/Cargo.toml +++ b/polkadot/parachain/test-parachains/adder/Cargo.toml @@ -3,7 +3,7 @@ name = "test-parachain-adder" version = "0.9.17" authors = ["Parity Technologies "] description = "Test parachain which adds to a number as its state transition" -edition = "2018" +edition = "2021" build = "build.rs" [dependencies] diff --git a/polkadot/parachain/test-parachains/adder/collator/Cargo.toml b/polkadot/parachain/test-parachains/adder/collator/Cargo.toml index 3c6f49bfd4..495710f3f7 100644 --- a/polkadot/parachain/test-parachains/adder/collator/Cargo.toml +++ b/polkadot/parachain/test-parachains/adder/collator/Cargo.toml @@ -3,7 +3,7 @@ name = "test-parachain-adder-collator" version = "0.9.17" authors = ["Parity Technologies "] description = "Collator for the adder test parachain" -edition = "2018" +edition = "2021" [[bin]] name = "adder-collator" diff --git a/polkadot/parachain/test-parachains/halt/Cargo.toml b/polkadot/parachain/test-parachains/halt/Cargo.toml index a79f1773c7..2b99fd41d8 100644 --- a/polkadot/parachain/test-parachains/halt/Cargo.toml +++ b/polkadot/parachain/test-parachains/halt/Cargo.toml @@ -3,7 +3,7 @@ name = "test-parachain-halt" version = "0.9.17" authors = ["Parity Technologies "] description = "Test parachain which executes forever" -edition = "2018" +edition = "2021" build = "build.rs" [dependencies] diff --git a/polkadot/primitives/Cargo.toml b/polkadot/primitives/Cargo.toml index faf41737c0..30581eb307 100644 --- a/polkadot/primitives/Cargo.toml +++ b/polkadot/primitives/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-primitives" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] serde = { version = "1.0.136", optional = true, features = ["derive"] } diff --git a/polkadot/rpc/Cargo.toml b/polkadot/rpc/Cargo.toml index 28ca97b496..a0a059544b 100644 --- a/polkadot/rpc/Cargo.toml +++ b/polkadot/rpc/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-rpc" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] jsonrpc-core = "18.0.0" diff --git a/polkadot/runtime/common/Cargo.toml b/polkadot/runtime/common/Cargo.toml index da760b960c..1d9a7b31d2 100644 --- a/polkadot/runtime/common/Cargo.toml +++ b/polkadot/runtime/common/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-runtime-common" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] impl-trait-for-tuples = "0.2.2" diff --git a/polkadot/runtime/common/slot_range_helper/Cargo.toml b/polkadot/runtime/common/slot_range_helper/Cargo.toml index d728f7f7b1..0f86e308a1 100644 --- a/polkadot/runtime/common/slot_range_helper/Cargo.toml +++ b/polkadot/runtime/common/slot_range_helper/Cargo.toml @@ -2,7 +2,7 @@ name = "slot-range-helper" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] paste = "1.0" diff --git a/polkadot/runtime/kusama/Cargo.toml b/polkadot/runtime/kusama/Cargo.toml index 3615191879..f705e28c81 100644 --- a/polkadot/runtime/kusama/Cargo.toml +++ b/polkadot/runtime/kusama/Cargo.toml @@ -2,7 +2,7 @@ name = "kusama-runtime" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" build = "build.rs" [dependencies] diff --git a/polkadot/runtime/metrics/Cargo.toml b/polkadot/runtime/metrics/Cargo.toml index 14aefaa262..48e84a4a16 100644 --- a/polkadot/runtime/metrics/Cargo.toml +++ b/polkadot/runtime/metrics/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-runtime-metrics" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false} diff --git a/polkadot/runtime/parachains/Cargo.toml b/polkadot/runtime/parachains/Cargo.toml index 028b749452..35880d339c 100644 --- a/polkadot/runtime/parachains/Cargo.toml +++ b/polkadot/runtime/parachains/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-runtime-parachains" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] } diff --git a/polkadot/runtime/polkadot/Cargo.toml b/polkadot/runtime/polkadot/Cargo.toml index f8f5a5d915..4e04f7dbbb 100644 --- a/polkadot/runtime/polkadot/Cargo.toml +++ b/polkadot/runtime/polkadot/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-runtime" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" build = "build.rs" [dependencies] diff --git a/polkadot/runtime/rococo/Cargo.toml b/polkadot/runtime/rococo/Cargo.toml index ac92aeeb2b..078883434f 100644 --- a/polkadot/runtime/rococo/Cargo.toml +++ b/polkadot/runtime/rococo/Cargo.toml @@ -2,7 +2,7 @@ name = "rococo-runtime" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" build = "build.rs" [dependencies] diff --git a/polkadot/runtime/test-runtime/Cargo.toml b/polkadot/runtime/test-runtime/Cargo.toml index 45b434f0ba..d8ef280a57 100644 --- a/polkadot/runtime/test-runtime/Cargo.toml +++ b/polkadot/runtime/test-runtime/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-test-runtime" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" build = "build.rs" [dependencies] @@ -129,4 +129,5 @@ std = [ "runtime-common/std", "log/std", "frame-election-provider-support/std", + "pallet-sudo/std", ] diff --git a/polkadot/runtime/westend/Cargo.toml b/polkadot/runtime/westend/Cargo.toml index 37ad7429b4..402f8d7b49 100644 --- a/polkadot/runtime/westend/Cargo.toml +++ b/polkadot/runtime/westend/Cargo.toml @@ -2,7 +2,7 @@ name = "westend-runtime" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" build = "build.rs" [dependencies] diff --git a/polkadot/statement-table/Cargo.toml b/polkadot/statement-table/Cargo.toml index d4f9590877..1c1d22ea60 100644 --- a/polkadot/statement-table/Cargo.toml +++ b/polkadot/statement-table/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-statement-table" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] parity-scale-codec = { version = "2.3.1", default-features = false, features = ["derive"] } diff --git a/polkadot/utils/generate-bags/Cargo.toml b/polkadot/utils/generate-bags/Cargo.toml index 82a455fbdb..36320e15a3 100644 --- a/polkadot/utils/generate-bags/Cargo.toml +++ b/polkadot/utils/generate-bags/Cargo.toml @@ -2,7 +2,7 @@ name = "polkadot-voter-bags" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] clap = { version = "3.1", features = ["derive"] } diff --git a/polkadot/utils/remote-ext-tests/bags-list/Cargo.toml b/polkadot/utils/remote-ext-tests/bags-list/Cargo.toml index ff4cd45ec6..14511e7292 100644 --- a/polkadot/utils/remote-ext-tests/bags-list/Cargo.toml +++ b/polkadot/utils/remote-ext-tests/bags-list/Cargo.toml @@ -2,7 +2,7 @@ name = "remote-ext-tests-bags-list" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] polkadot-runtime = { version = "0.9.17", path = "../../../runtime/polkadot" } diff --git a/polkadot/utils/staking-miner/Cargo.toml b/polkadot/utils/staking-miner/Cargo.toml index 8126c84e1a..d73dfa9c6d 100644 --- a/polkadot/utils/staking-miner/Cargo.toml +++ b/polkadot/utils/staking-miner/Cargo.toml @@ -2,7 +2,7 @@ name = "staking-miner" version = "0.9.17" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" [dependencies] clap = { version = "3.1", features = ["derive", "env"] } diff --git a/polkadot/xcm/Cargo.toml b/polkadot/xcm/Cargo.toml index 560df741b1..fa26804f7c 100644 --- a/polkadot/xcm/Cargo.toml +++ b/polkadot/xcm/Cargo.toml @@ -3,7 +3,7 @@ name = "xcm" version = "0.9.17" authors = ["Parity Technologies "] description = "The basic XCM datastructures." -edition = "2018" +edition = "2021" [dependencies] impl-trait-for-tuples = "0.2.2" diff --git a/polkadot/xcm/pallet-xcm-benchmarks/Cargo.toml b/polkadot/xcm/pallet-xcm-benchmarks/Cargo.toml index 0cc3c4bb02..bc73e2ef0c 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/Cargo.toml +++ b/polkadot/xcm/pallet-xcm-benchmarks/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallet-xcm-benchmarks" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" version = "0.9.17" [package.metadata.docs.rs] diff --git a/polkadot/xcm/pallet-xcm/Cargo.toml b/polkadot/xcm/pallet-xcm/Cargo.toml index b497f3a10f..bb1dff9bc2 100644 --- a/polkadot/xcm/pallet-xcm/Cargo.toml +++ b/polkadot/xcm/pallet-xcm/Cargo.toml @@ -1,6 +1,6 @@ [package] authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" name = "pallet-xcm" version = "0.9.17" diff --git a/polkadot/xcm/procedural/Cargo.toml b/polkadot/xcm/procedural/Cargo.toml index cbe7bea685..02de4fbba9 100644 --- a/polkadot/xcm/procedural/Cargo.toml +++ b/polkadot/xcm/procedural/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Parity Technologies "] name = "xcm-procedural" version = "0.1.0" -edition = "2018" +edition = "2021" [lib] proc-macro = true diff --git a/polkadot/xcm/xcm-builder/Cargo.toml b/polkadot/xcm/xcm-builder/Cargo.toml index 36be7d2e41..3929e885e8 100644 --- a/polkadot/xcm/xcm-builder/Cargo.toml +++ b/polkadot/xcm/xcm-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" name = "xcm-builder" description = "Tools & types for building with XCM and its executor." version = "0.9.17" diff --git a/polkadot/xcm/xcm-executor/Cargo.toml b/polkadot/xcm/xcm-executor/Cargo.toml index ac4f1fea51..aca64b8d90 100644 --- a/polkadot/xcm/xcm-executor/Cargo.toml +++ b/polkadot/xcm/xcm-executor/Cargo.toml @@ -1,6 +1,6 @@ [package] authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" name = "xcm-executor" description = "An abstract and configurable XCM message executor." version = "0.9.17" diff --git a/polkadot/xcm/xcm-executor/integration-tests/Cargo.toml b/polkadot/xcm/xcm-executor/integration-tests/Cargo.toml index 89ad1713ab..ffa1523bfd 100644 --- a/polkadot/xcm/xcm-executor/integration-tests/Cargo.toml +++ b/polkadot/xcm/xcm-executor/integration-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" name = "xcm-executor-integration-tests" description = "Integration tests for the XCM Executor" version = "0.9.17" diff --git a/polkadot/xcm/xcm-simulator/Cargo.toml b/polkadot/xcm/xcm-simulator/Cargo.toml index e3904603b9..5a7801987a 100644 --- a/polkadot/xcm/xcm-simulator/Cargo.toml +++ b/polkadot/xcm/xcm-simulator/Cargo.toml @@ -3,7 +3,7 @@ name = "xcm-simulator" version = "0.9.17" authors = ["Parity Technologies "] description = "Test kit to simulate cross-chain message passing and XCM execution" -edition = "2018" +edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "2.0.0" } diff --git a/polkadot/xcm/xcm-simulator/example/Cargo.toml b/polkadot/xcm/xcm-simulator/example/Cargo.toml index e4348c838d..3f0a85650b 100644 --- a/polkadot/xcm/xcm-simulator/example/Cargo.toml +++ b/polkadot/xcm/xcm-simulator/example/Cargo.toml @@ -3,7 +3,7 @@ name = "xcm-simulator-example" version = "0.9.17" authors = ["Parity Technologies "] description = "Examples of xcm-simulator usage." -edition = "2018" +edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "2.0.0" } diff --git a/polkadot/xcm/xcm-simulator/fuzzer/Cargo.toml b/polkadot/xcm/xcm-simulator/fuzzer/Cargo.toml index c6b0552d07..e3c6935ccb 100644 --- a/polkadot/xcm/xcm-simulator/fuzzer/Cargo.toml +++ b/polkadot/xcm/xcm-simulator/fuzzer/Cargo.toml @@ -3,7 +3,7 @@ name = "xcm-simulator-fuzzer" version = "0.9.17" authors = ["Parity Technologies "] description = "Examples of xcm-simulator usage." -edition = "2018" +edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "2.0.0" }