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

Commit

Permalink
Substrate Companion #9575 (#3695)
Browse files Browse the repository at this point in the history
* Upgrade to tokio 1.10

* update Substrate

* Fmt

Co-authored-by: parity-processbot <>
  • Loading branch information
bkchr authored Aug 24, 2021
1 parent eba8d2c commit 2a0b6ff
Show file tree
Hide file tree
Showing 8 changed files with 210 additions and 266 deletions.
412 changes: 179 additions & 233 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions node/test/polkadot-simnet/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ where
use sc_cli::{CliConfiguration, SubstrateCli};
use structopt::StructOpt;

let mut tokio_runtime = build_runtime()?;
let tokio_runtime = build_runtime()?;
let task_executor = task_executor(tokio_runtime.handle().clone());
// parse cli args
let cmd = <polkadot_cli::Cli as StructOpt>::from_args();
Expand Down Expand Up @@ -391,7 +391,7 @@ mod tests {

#[test]
fn test_runner() {
let mut runtime = build_runtime().unwrap();
let runtime = build_runtime().unwrap();
let task_executor = task_executor(runtime.handle().clone());
let (rpc, task_manager, client, pool, command_sink, backend) =
client_parts::<PolkadotChainInfo>(ConfigOrChainSpec::ChainSpec(
Expand Down
2 changes: 1 addition & 1 deletion node/test/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ substrate-test-client = { git = "https://github.com/paritytech/substrate", branc
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
serde_json = "1.0.66"
substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "master" }
tokio = { version = "0.2", features = ["macros"] }
tokio = { version = "1.10", features = ["macros"] }
2 changes: 1 addition & 1 deletion parachain/test-parachains/adder/collator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" }

tokio = { version = "0.2", features = ["macros"] }
tokio = { version = "1.10", features = ["macros"] }
17 changes: 8 additions & 9 deletions runtime/kusama/src/weights/pallet_vesting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,23 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_vesting`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
fn vest_locked(l: u32, s: u32, ) -> Weight {
fn vest_locked(l: u32, s: u32) -> Weight {
(93_789_000 as Weight)
// Standard Error: 70_000
.saturating_add((41_000 as Weight).saturating_mul(l as Weight))
// Standard Error: 182_000
.saturating_add((211_000 as Weight).saturating_mul(s as Weight))

.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn vest_unlocked(_l: u32, s: u32, ) -> Weight {
fn vest_unlocked(_l: u32, s: u32) -> Weight {
(90_737_000 as Weight)
// Standard Error: 0
.saturating_add((263_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn vest_other_locked(l: u32, s: u32, ) -> Weight {
fn vest_other_locked(l: u32, s: u32) -> Weight {
(85_211_000 as Weight)
// Standard Error: 17_000
.saturating_add((153_000 as Weight).saturating_mul(l as Weight))
Expand All @@ -68,7 +67,7 @@ impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn vest_other_unlocked(l: u32, s: u32, ) -> Weight {
fn vest_other_unlocked(l: u32, s: u32) -> Weight {
(90_368_000 as Weight)
// Standard Error: 17_000
.saturating_add((31_000 as Weight).saturating_mul(l as Weight))
Expand All @@ -77,21 +76,21 @@ impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn vested_transfer(l: u32, _s: u32, ) -> Weight {
fn vested_transfer(l: u32, _s: u32) -> Weight {
(167_500_000 as Weight)
// Standard Error: 194_000
.saturating_add((255_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn force_vested_transfer(l: u32, _s: u32, ) -> Weight {
fn force_vested_transfer(l: u32, _s: u32) -> Weight {
(174_000_000 as Weight)
// Standard Error: 70_000
.saturating_add((143_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight {
fn not_unlocking_merge_schedules(l: u32, s: u32) -> Weight {
(101_778_000 as Weight)
// Standard Error: 17_000
.saturating_add((194_000 as Weight).saturating_mul(l as Weight))
Expand All @@ -100,7 +99,7 @@ impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight {
fn unlocking_merge_schedules(l: u32, s: u32) -> Weight {
(104_111_000 as Weight)
// Standard Error: 88_000
.saturating_add((276_000 as Weight).saturating_mul(l as Weight))
Expand Down
17 changes: 8 additions & 9 deletions runtime/polkadot/src/weights/pallet_vesting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_vesting`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
fn vest_locked(l: u32, s: u32, ) -> Weight {
fn vest_locked(l: u32, s: u32) -> Weight {
(93_789_000 as Weight)
// Standard Error: 70_000
.saturating_add((41_000 as Weight).saturating_mul(l as Weight))
Expand All @@ -51,14 +51,14 @@ impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn vest_unlocked(_l: u32, s: u32, ) -> Weight {
fn vest_unlocked(_l: u32, s: u32) -> Weight {
(90_737_000 as Weight)
// Standard Error: 0
.saturating_add((263_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn vest_other_locked(l: u32, s: u32, ) -> Weight {
fn vest_other_locked(l: u32, s: u32) -> Weight {
(85_211_000 as Weight)
// Standard Error: 17_000
.saturating_add((153_000 as Weight).saturating_mul(l as Weight))
Expand All @@ -67,7 +67,7 @@ impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn vest_other_unlocked(l: u32, s: u32, ) -> Weight {
fn vest_other_unlocked(l: u32, s: u32) -> Weight {
(90_368_000 as Weight)
// Standard Error: 17_000
.saturating_add((31_000 as Weight).saturating_mul(l as Weight))
Expand All @@ -76,21 +76,21 @@ impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn vested_transfer(l: u32, _s: u32, ) -> Weight {
fn vested_transfer(l: u32, _s: u32) -> Weight {
(167_500_000 as Weight)
// Standard Error: 194_000
.saturating_add((255_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn force_vested_transfer(l: u32, _s: u32, ) -> Weight {
fn force_vested_transfer(l: u32, _s: u32) -> Weight {
(174_000_000 as Weight)
// Standard Error: 70_000
.saturating_add((143_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight {
fn not_unlocking_merge_schedules(l: u32, s: u32) -> Weight {
(101_778_000 as Weight)
// Standard Error: 17_000
.saturating_add((194_000 as Weight).saturating_mul(l as Weight))
Expand All @@ -99,7 +99,7 @@ impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight {
fn unlocking_merge_schedules(l: u32, s: u32) -> Weight {
(104_111_000 as Weight)
// Standard Error: 88_000
.saturating_add((276_000 as Weight).saturating_mul(l as Weight))
Expand All @@ -109,4 +109,3 @@ impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
}

18 changes: 9 additions & 9 deletions runtime/westend/src/weights/pallet_vesting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_vesting`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
fn vest_locked(l: u32, s: u32, ) -> Weight {
fn vest_locked(l: u32, s: u32) -> Weight {
(93_789_000 as Weight)
// Standard Error: 70_000
.saturating_add((41_000 as Weight).saturating_mul(l as Weight))
Expand All @@ -51,14 +51,14 @@ impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn vest_unlocked(_l: u32, s: u32, ) -> Weight {
fn vest_unlocked(_l: u32, s: u32) -> Weight {
(90_737_000 as Weight)
// Standard Error: 0
.saturating_add((263_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn vest_other_locked(l: u32, s: u32, ) -> Weight {
fn vest_other_locked(l: u32, s: u32) -> Weight {
(85_211_000 as Weight)
// Standard Error: 17_000
.saturating_add((153_000 as Weight).saturating_mul(l as Weight))
Expand All @@ -67,7 +67,7 @@ impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn vest_other_unlocked(l: u32, s: u32, ) -> Weight {
fn vest_other_unlocked(l: u32, s: u32) -> Weight {
(90_368_000 as Weight)
// Standard Error: 17_000
.saturating_add((31_000 as Weight).saturating_mul(l as Weight))
Expand All @@ -76,21 +76,21 @@ impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn vested_transfer(l: u32, _s: u32, ) -> Weight {
fn vested_transfer(l: u32, _s: u32) -> Weight {
(167_500_000 as Weight)
// Standard Error: 194_000
.saturating_add((255_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn force_vested_transfer(l: u32, _s: u32, ) -> Weight {
fn force_vested_transfer(l: u32, _s: u32) -> Weight {
(174_000_000 as Weight)
// Standard Error: 70_000
.saturating_add((143_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight {
fn not_unlocking_merge_schedules(l: u32, s: u32) -> Weight {
(101_778_000 as Weight)
// Standard Error: 17_000
.saturating_add((194_000 as Weight).saturating_mul(l as Weight))
Expand All @@ -99,7 +99,7 @@ impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight {
fn unlocking_merge_schedules(l: u32, s: u32) -> Weight {
(104_111_000 as Weight)
// Standard Error: 88_000
.saturating_add((276_000 as Weight).saturating_mul(l as Weight))
Expand All @@ -108,4 +108,4 @@ impl<T: frame_system::Config> pallet_vesting::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
}
}
4 changes: 2 additions & 2 deletions utils/staking-miner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ edition = "2018"

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0" }
tokio = { version = "0.2", features = ["macros"] }
tokio = { version = "1.10", features = ["macros"] }
log = "0.4.11"
env_logger = "0.9.0"
structopt = "0.3.0"
jsonrpsee-ws-client = { version = "0.3.0", default-features = false, features = ["tokio02"] }
jsonrpsee-ws-client = { version = "0.3.0", default-features = false, features = ["tokio1"] }
serde_json = "1.0"
serde = "1.0.0"
hex = "0.4.3"
Expand Down

0 comments on commit 2a0b6ff

Please sign in to comment.