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

Introduce NIS functionality into Kusama/Rococo #6352

Merged
merged 14 commits into from
Dec 5, 2022
Prev Previous commit
Next Next commit
Add Kusama weights
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
ggwpez committed Nov 28, 2022
commit dba2d8412c1c5bfc62dab5ab1606cfa20dbcbb8e
1 change: 1 addition & 0 deletions runtime/kusama/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub mod frame_election_provider_support;
pub mod frame_system;
pub mod pallet_bags_list;
pub mod pallet_balances;
pub mod pallet_balances_nis_counterpart_balances;
pub mod pallet_bounties;
pub mod pallet_child_bounties;
pub mod pallet_collective_council;
Expand Down
105 changes: 105 additions & 0 deletions runtime/kusama/src/weights/pallet_balances_nis_counterpart_balances.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Polkadot is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-11-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024

// Executed Command:
// ./target/production/polkadot
// benchmark
// pallet
// --chain=kusama-dev
// --steps=50
// --repeat=20
// --pallet=pallet-balances
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --header=./file_header.txt
// --output=./runtime/kusama/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for `pallet_balances`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Storage: NisCounterpartBalances Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
fn transfer() -> Weight {
// Minimum execution time: 41_890 nanoseconds.
Weight::from_ref_time(42_832_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: NisCounterpartBalances Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
// Minimum execution time: 30_130 nanoseconds.
Weight::from_ref_time(31_076_000)
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: NisCounterpartBalances Account (r:1 w:1)
// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
fn set_balance_creating() -> Weight {
// Minimum execution time: 20_254 nanoseconds.
Weight::from_ref_time(20_956_000)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: NisCounterpartBalances Account (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
fn set_balance_killing() -> Weight {
// Minimum execution time: 27_767 nanoseconds.
Weight::from_ref_time(28_472_000)
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: NisCounterpartBalances Account (r:2 w:2)
// Storage: System Account (r:2 w:2)
// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
fn force_transfer() -> Weight {
// Minimum execution time: 41_369 nanoseconds.
Weight::from_ref_time(41_831_000)
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
// Storage: NisCounterpartBalances Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer_all() -> Weight {
// Minimum execution time: 37_413 nanoseconds.
Weight::from_ref_time(38_587_000)
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: NisCounterpartBalances Account (r:1 w:1)
fn force_unreserve() -> Weight {
// Minimum execution time: 19_049 nanoseconds.
Weight::from_ref_time(19_464_000)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
109 changes: 57 additions & 52 deletions runtime/kusama/src/weights/pallet_nis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
//! Autogenerated weights for `pallet_nis`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-09-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! DATE: 2022-11-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024

// Executed Command:
// ./target/production/polkadot
// target/production/polkadot
// benchmark
// pallet
// --chain=kusama-dev
// --steps=50
// --repeat=20
// --pallet=pallet_nis
// --pallet=pallet-nis
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
Expand All @@ -38,78 +38,83 @@
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight}};
use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for `pallet_nis`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_nis::WeightInfo for WeightInfo<T> {
// Storage: Nis Queues (r:1 w:1)
// Storage: Nis QueueTotals (r:1 w:1)
/// The range of component `l` is `[0, 999]`.
fn place_bid(l: u32, ) -> Weight {
// Minimum execution time: 42_332 nanoseconds.
Weight::from_ref_time(45_584_514 as u64)
// Standard Error: 129
.saturating_add(Weight::from_ref_time(45_727 as u64).saturating_mul(l as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 30_459 nanoseconds.
Weight::from_ref_time(32_349_906)
// Standard Error: 665
.saturating_add(Weight::from_ref_time(69_112).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: Nis Queues (r:1 w:1)
// Storage: Nis QueueTotals (r:1 w:1)
fn place_bid_max() -> Weight {
// Minimum execution time: 85_866 nanoseconds.
Weight::from_ref_time(87_171_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 97_650 nanoseconds.
Weight::from_ref_time(98_686_000)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: Nis Queues (r:1 w:1)
// Storage: Nis QueueTotals (r:1 w:1)
/// The range of component `l` is `[1, 1000]`.
fn retract_bid(l: u32, ) -> Weight {
// Minimum execution time: 44_605 nanoseconds.
Weight::from_ref_time(46_850_108 as u64)
// Standard Error: 135
.saturating_add(Weight::from_ref_time(34_178 as u64).saturating_mul(l as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 35_900 nanoseconds.
Weight::from_ref_time(33_339_608)
// Standard Error: 622
.saturating_add(Weight::from_ref_time(56_155).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: Nis Active (r:1 w:1)
// Storage: Nis ActiveTotal (r:1 w:1)
fn thaw() -> Weight {
// Minimum execution time: 55_143 nanoseconds.
Weight::from_ref_time(55_845_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Nis Active (r:1 w:1)
// Storage: Nis ActiveTotal (r:1 w:1)
// Storage: Nis Summary (r:1 w:0)
// Storage: System Account (r:1 w:1)
fn fund_deficit() -> Weight {
Weight::from_ref_time(47_753_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 38_649 nanoseconds.
Weight::from_ref_time(39_329_000)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: Nis ActiveTotal (r:1 w:0)
fn process_queues() -> Weight {
Weight::from_ref_time(1_663_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
// Storage: Nis Receipts (r:1 w:1)
// Storage: Nis Summary (r:1 w:1)
// Storage: NisCounterpartBalances Account (r:1 w:1)
// Storage: NisCounterpartBalances TotalIssuance (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn thaw() -> Weight {
// Minimum execution time: 58_772 nanoseconds.
Weight::from_ref_time(59_392_000)
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
// Storage: Nis ActiveTotal (r:1 w:1)
// Storage: Nis Summary (r:1 w:1)
// Storage: System Account (r:1 w:0)
// Storage: Nis QueueTotals (r:1 w:1)
fn process_queues() -> Weight {
// Minimum execution time: 30_798 nanoseconds.
Weight::from_ref_time(32_162_000)
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: Nis Queues (r:1 w:1)
// Storage: Nis Active (r:0 w:1)
fn process_queue() -> Weight {
Weight::from_ref_time(40_797_000 as u64)
// Standard Error: 1_000
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
// Minimum execution time: 3_624 nanoseconds.
Weight::from_ref_time(3_794_000)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: Nis ActiveTotal (r:1 w:1)
// Storage: Nis QueueTotals (r:1 w:1)
// Storage: Nis Queues (r:1 w:1)
// Storage: Nis Active (r:0 w:1)
// Storage: System Account (r:1 w:0)
// Storage: Nis Receipts (r:0 w:1)
fn process_bid() -> Weight {
Weight::from_ref_time(14_944_000 as u64)
// Standard Error: 6_000
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Minimum execution time: 12_102 nanoseconds.
Weight::from_ref_time(12_339_000)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}