Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Switch to edition 2021 #4976

Merged
merged 5 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"]
edition = "2018"
edition = "2021"
rust-version = "1.57.0" # custom profiles
readme = "README.md"

Expand Down
16 changes: 8 additions & 8 deletions bridges/bin/runtime-common/src/messages_benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -102,7 +102,7 @@ where
let mut root = Default::default();
let mut mdb = MemoryDB::default();
{
let mut trie = TrieDBMut::<H>::new(&mut mdb, &mut root);
let mut trie = TrieDBMutV1::<H>::new(&mut mdb, &mut root);

// insert messages
for nonce in params.message_nonces.clone() {
Expand Down Expand Up @@ -131,7 +131,7 @@ where

// generate storage proof to be delivered to This chain
let mut proof_recorder = Recorder::<H::Out>::new();
record_all_keys::<Layout<H>, _>(&mdb, &root, &mut proof_recorder)
record_all_keys::<LayoutV1<H>, _>(&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();
Expand Down Expand Up @@ -175,7 +175,7 @@ where
let mut root = Default::default();
let mut mdb = MemoryDB::default();
{
let mut trie = TrieDBMut::<H>::new(&mut mdb, &mut root);
let mut trie = TrieDBMutV1::<H>::new(&mut mdb, &mut root);
trie.insert(&storage_key, &params.inbound_lane_data.encode())
.map_err(|_| "TrieMut::insert has failed")
.expect("TrieMut::insert should not fail in benchmarks");
Expand All @@ -184,7 +184,7 @@ where

// generate storage proof to be delivered to This chain
let mut proof_recorder = Recorder::<H::Out>::new();
record_all_keys::<Layout<H>, _>(&mdb, &root, &mut proof_recorder)
record_all_keys::<LayoutV1<H>, _>(&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();
Expand All @@ -209,19 +209,19 @@ fn grow_trie<H: Hasher>(mut root: H::Out, mdb: &mut MemoryDB<H>, 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::<H::Out>::new();
record_all_keys::<Layout<H>, _>(mdb, &root, &mut proof_recorder)
record_all_keys::<LayoutV1<H>, _>(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();
if size > minimal_trie_size as _ {
return root
}

let mut trie = TrieDBMut::<H>::from_existing(mdb, &mut root)
let mut trie = TrieDBMutV1::<H>::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 {
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "polkadot-cli"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
description = "Polkadot Relay-chain Client Node"
edition = "2018"
edition = "2021"

[package.metadata.wasm-pack.profile.release]
# `wasm-opt` has some problems on Linux, see
Expand Down
2 changes: 1 addition & 1 deletion core-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-core-primitives"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion erasure-coding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-erasure-coding"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
polkadot-primitives = { path = "../primitives" }
Expand Down
2 changes: 1 addition & 1 deletion erasure-coding/fuzzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "erasure_coding_fuzzer"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
polkadot-erasure-coding = { path = ".." }
Expand Down
2 changes: 1 addition & 1 deletion node/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-client"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
2 changes: 1 addition & 1 deletion node/collation-generation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-collation-generation"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/core/approval-voting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-core-approval-voting"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/core/av-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-core-av-store"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/core/backing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-core-backing"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/core/bitfield-signing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-core-bitfield-signing"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/core/candidate-validation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-core-candidate-validation"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
async-trait = "0.1.52"
Expand Down
2 changes: 1 addition & 1 deletion node/core/chain-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-core-chain-api"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/core/chain-selection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "polkadot-node-core-chain-selection"
description = "Chain Selection Subsystem"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/core/dispute-coordinator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-core-dispute-coordinator"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/core/parachains-inherent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-core-parachains-inherent"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/core/provisioner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-core-provisioner"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
Expand Down
2 changes: 1 addition & 1 deletion node/core/pvf-checker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-core-pvf-checker"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/core/pvf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-core-pvf"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[[bin]]
name = "puppet_worker"
Expand Down
2 changes: 1 addition & 1 deletion node/core/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-core-runtime-api"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/jaeger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-jaeger"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"
description = "Polkadot Jaeger primitives"

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions node/malus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"]
edition = "2018"
edition = "2021"
readme = "README.md"
publish = false

Expand All @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion node/metered-channel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "metered-channel"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"
description = "Channels with attached Meters"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion node/metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-metrics"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"
description = "Subsystem metric helpers"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion node/network/approval-distribution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-approval-distribution"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
polkadot-node-primitives = { path = "../../primitives" }
Expand Down
2 changes: 1 addition & 1 deletion node/network/availability-distribution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-availability-distribution"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/network/availability-recovery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-availability-recovery"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/network/bitfield-distribution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-availability-bitfield-distribution"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/network/bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-network-bridge"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
async-trait = "0.1.52"
Expand Down
2 changes: 1 addition & 1 deletion node/network/collator-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-collator-protocol"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
always-assert = "0.1.2"
Expand Down
2 changes: 1 addition & 1 deletion node/network/dispute-distribution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-dispute-distribution"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/network/gossip-support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-gossip-support"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
2 changes: 1 addition & 1 deletion node/network/protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-node-network-protocol"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"
description = "Primitives types for the Node-side"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion node/network/statement-distribution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "polkadot-statement-distribution"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
description = "Statement Distribution Subsystem"
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion node/overseer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "polkadot-overseer"
version = "0.9.17"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
client = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
Loading