Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
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
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion runtime/kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,19 @@ runtime-benchmarks = [
"runtime-common/runtime-benchmarks",
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"frame-system-benchmarking",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"pallet-babe/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-democracy/runtime-benchmarks",
"pallet-elections-phragmen/runtime-benchmarks",
"pallet-grandpa/runtime-benchmarks",
"pallet-identity/runtime-benchmarks",
"pallet-im-online/runtime-benchmarks",
"pallet-indices/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
"pallet-society/runtime-benchmarks",
"pallet-staking/runtime-benchmarks",
Expand All @@ -168,8 +172,10 @@ runtime-benchmarks = [
"pallet-vesting/runtime-benchmarks",
"pallet-offences-benchmarking",
"pallet-session-benchmarking",
"frame-system-benchmarking",
"hex-literal",
]

# When enabled, the runtime api will not be build.
#
# This is required by Cumulus to access certain types of the
Expand Down
37 changes: 20 additions & 17 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl frame_system::Trait for Runtime {
type AccountData = pallet_balances::AccountData<Balance>;
type OnNewAccount = ();
type OnKilledAccount = ();
type SystemWeightInfo = weights::frame_system::WeightInfo;
type SystemWeightInfo = weights::frame_system::WeightInfo<Runtime>;
}

parameter_types! {
Expand All @@ -164,7 +164,7 @@ impl pallet_scheduler::Trait for Runtime {
type MaximumWeight = MaximumBlockWeight;
type ScheduleOrigin = EnsureRoot<AccountId>;
type MaxScheduledPerBlock = MaxScheduledPerBlock;
type WeightInfo = weights::pallet_scheduler::WeightInfo;
type WeightInfo = weights::pallet_scheduler::WeightInfo<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -206,7 +206,7 @@ impl pallet_indices::Trait for Runtime {
type Currency = Balances;
type Deposit = IndexDeposit;
type Event = Event;
type WeightInfo = ();
type WeightInfo = weights::pallet_indices::WeightInfo<Runtime>;
}

parameter_types! {
Expand All @@ -229,7 +229,7 @@ impl pallet_balances::Trait for Runtime {
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type MaxLocks = MaxLocks;
type WeightInfo = weights::pallet_balances::WeightInfo;
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
}

parameter_types! {
Expand All @@ -251,7 +251,7 @@ impl pallet_timestamp::Trait for Runtime {
type Moment = u64;
type OnTimestampSet = Babe;
type MinimumPeriod = MinimumPeriod;
type WeightInfo = weights::pallet_timestamp::WeightInfo;
type WeightInfo = weights::pallet_timestamp::WeightInfo<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -295,7 +295,7 @@ impl pallet_session::Trait for Runtime {
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
type Keys = SessionKeys;
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
type WeightInfo = ();
type WeightInfo = weights::pallet_session::WeightInfo<Runtime>;
}

impl pallet_session::historical::Trait for Runtime {
Expand Down Expand Up @@ -362,7 +362,7 @@ impl pallet_staking::Trait for Runtime {
type UnsignedPriority = StakingUnsignedPriority;
type MaxIterations = MaxIterations;
type MinSolutionScoreBump = MinSolutionScoreBump;
type WeightInfo = weights::pallet_staking::WeightInfo;
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -443,7 +443,7 @@ impl pallet_collective::Trait<CouncilCollective> for Runtime {
type MaxProposals = CouncilMaxProposals;
type MaxMembers = CouncilMaxMembers;
type DefaultVote = pallet_collective::PrimeDefaultVote;
type WeightInfo = weights::pallet_collective::WeightInfo;
type WeightInfo = weights::pallet_collective::WeightInfo<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -473,7 +473,7 @@ impl pallet_elections_phragmen::Trait for Runtime {
type DesiredRunnersUp = DesiredRunnersUp;
type TermDuration = TermDuration;
type ModuleId = ElectionsPhragmenModuleId;
type WeightInfo = weights::pallet_elections_phragmen::WeightInfo;
type WeightInfo = weights::pallet_elections_phragmen::WeightInfo<Runtime>;
}

parameter_types! {
Expand All @@ -491,7 +491,7 @@ impl pallet_collective::Trait<TechnicalCollective> for Runtime {
type MaxProposals = TechnicalMaxProposals;
type MaxMembers = TechnicalMaxMembers;
type DefaultVote = pallet_collective::PrimeDefaultVote;
type WeightInfo = weights::pallet_collective::WeightInfo;
type WeightInfo = weights::pallet_collective::WeightInfo<Runtime>;
}

impl pallet_membership::Trait<pallet_membership::Instance1> for Runtime {
Expand Down Expand Up @@ -553,7 +553,7 @@ impl pallet_treasury::Trait for Runtime {
type BountyCuratorDeposit = BountyCuratorDeposit;
type BountyValueMinimum = BountyValueMinimum;
type BurnDestination = Society;
type WeightInfo = weights::pallet_treasury::WeightInfo;
type WeightInfo = weights::pallet_treasury::WeightInfo<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -584,7 +584,7 @@ impl pallet_im_online::Trait for Runtime {
type ReportUnresponsiveness = Offences;
type SessionDuration = SessionDuration;
type UnsignedPriority = ImOnlineUnsignedPriority;
type WeightInfo = ();
type WeightInfo = weights::pallet_im_online::WeightInfo<Runtime>;
}

impl pallet_grandpa::Trait for Runtime {
Expand Down Expand Up @@ -705,13 +705,13 @@ impl pallet_identity::Trait for Runtime {
type MaxRegistrars = MaxRegistrars;
type RegistrarOrigin = MoreThanHalfCouncil;
type ForceOrigin = MoreThanHalfCouncil;
type WeightInfo = ();
type WeightInfo = weights::pallet_identity::WeightInfo<Runtime>;
}

impl pallet_utility::Trait for Runtime {
type Event = Event;
type Call = Call;
type WeightInfo = weights::pallet_utility::WeightInfo;
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
}

parameter_types! {
Expand All @@ -729,7 +729,7 @@ impl pallet_multisig::Trait for Runtime {
type DepositBase = DepositBase;
type DepositFactor = DepositFactor;
type MaxSignatories = MaxSignatories;
type WeightInfo = ();
type WeightInfo = weights::pallet_multisig::WeightInfo<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -786,7 +786,7 @@ impl pallet_vesting::Trait for Runtime {
type Currency = Balances;
type BlockNumberToBalance = ConvertInto;
type MinVestedTransfer = MinVestedTransfer;
type WeightInfo = weights::pallet_vesting::WeightInfo;
type WeightInfo = weights::pallet_vesting::WeightInfo<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -887,7 +887,7 @@ impl pallet_proxy::Trait for Runtime {
type ProxyDepositBase = ProxyDepositBase;
type ProxyDepositFactor = ProxyDepositFactor;
type MaxProxies = MaxProxies;
type WeightInfo = weights::pallet_proxy::WeightInfo;
type WeightInfo = weights::pallet_proxy::WeightInfo<Runtime>;
type MaxPending = MaxPending;
type CallHasher = BlakeTwo256;
type AnnouncementDepositBase = AnnouncementDepositBase;
Expand Down Expand Up @@ -1285,7 +1285,10 @@ sp_api::impl_runtime_apis! {
add_benchmark!(params, batches, pallet_elections_phragmen, ElectionsPhragmen);
add_benchmark!(params, batches, pallet_identity, Identity);
add_benchmark!(params, batches, pallet_im_online, ImOnline);
add_benchmark!(params, batches, pallet_indices, Indices);
add_benchmark!(params, batches, pallet_multisig, Multisig);
add_benchmark!(params, batches, pallet_offences, OffencesBench::<Runtime>);
add_benchmark!(params, batches, pallet_proxy, Proxy);
add_benchmark!(params, batches, pallet_scheduler, Scheduler);
add_benchmark!(params, batches, pallet_session, SessionBench::<Runtime>);
add_benchmark!(params, batches, pallet_staking, Staking);
Expand Down
69 changes: 35 additions & 34 deletions runtime/kusama/src/weights/frame_system.rs
Original file line number Diff line number Diff line change
@@ -1,58 +1,59 @@
// This file is part of Substrate.
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Copyright (C) 2017-2020 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// 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.

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// 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.

//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0-rc5
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
//! Weights for frame_system
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0
//! DATE: 2020-09-28, STEPS: [50], REPEAT: 20, LOW RANGE: [], HIGH RANGE: []

#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

pub struct WeightInfo;
impl frame_system::WeightInfo for WeightInfo {
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Trait> frame_system::WeightInfo for WeightInfo<T> {
// WARNING! Some components were not used: ["b"]
fn remark() -> Weight {
(1305000 as Weight)
(1_861_000 as Weight)
}
fn set_heap_pages() -> Weight {
(2023000 as Weight)
.saturating_add(DbWeight::get().writes(1 as Weight))
(2_431_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// WARNING! Some components were not used: ["d"]
fn set_changes_trie_config() -> Weight {
(10026000 as Weight)
.saturating_add(DbWeight::get().reads(1 as Weight))
.saturating_add(DbWeight::get().writes(2 as Weight))
(9_680_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn set_storage(i: u32, ) -> Weight {
(0 as Weight)
.saturating_add((656000 as Weight).saturating_mul(i as Weight))
.saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
.saturating_add((793_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
fn kill_storage(i: u32, ) -> Weight {
(4327000 as Weight)
.saturating_add((478000 as Weight).saturating_mul(i as Weight))
.saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
(0 as Weight)
.saturating_add((552_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
}
fn kill_prefix(p: u32, ) -> Weight {
(8349000 as Weight)
.saturating_add((838000 as Weight).saturating_mul(p as Weight))
.saturating_add(DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
(0 as Weight)
.saturating_add((865_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
}
fn suicide() -> Weight {
(29247000 as Weight)
(35_363_000 as Weight)
}
}
36 changes: 20 additions & 16 deletions runtime/kusama/src/weights/mod.rs
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
// Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.
// Copyright (C) 2020 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0

// 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.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// 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/>.

/// A collection of weight modules used for pallets in the runtime.
//! A list of the different weight modules for our runtime.

pub mod frame_system;
pub mod pallet_balances;
pub mod pallet_collective;
pub mod pallet_democracy;
pub mod pallet_elections_phragmen;
pub mod pallet_identity;
pub mod pallet_im_online;
pub mod pallet_indices;
pub mod pallet_multisig;
pub mod pallet_proxy;
pub mod pallet_scheduler;
pub mod pallet_session;
pub mod pallet_staking;
pub mod pallet_timestamp;
pub mod pallet_treasury;
pub mod pallet_utility;
pub mod pallet_vesting;
pub mod pallet_elections_phragmen;
Loading