From 670af340c872ba32eb4e09bd11f2cfa42f6f294d Mon Sep 17 00:00:00 2001 From: Klapeyron <11329616+Klapeyron@users.noreply.github.com> Date: Thu, 30 Jan 2025 16:22:11 +0100 Subject: [PATCH] Replaced custom weights with substrate ones (#433) * Replaced custom weights with substrate ones * Switching between rocks/paritydb * Removed all custom weights * Updated changelog * Restored Cargo.lock * Updated Earthfile * Fixed formatting * Fixed build typo --- Earthfile | 1 - changelog.md | 2 +- node/node/Cargo.toml | 9 + node/runtime/Cargo.toml | 4 +- node/runtime/src/lib.rs | 46 ++--- node/runtime/src/weights/block_weights.rs | 62 ------- node/runtime/src/weights/extrinsic_weights.rs | 62 ------- node/runtime/src/weights/frame_system.rs | 154 ----------------- node/runtime/src/weights/mod.rs | 9 - node/runtime/src/weights/pallet_balances.rs | 157 ------------------ .../pallet_session_validator_management.rs | 50 ------ node/runtime/src/weights/pallet_sudo.rs | 79 --------- node/runtime/src/weights/pallet_timestamp.rs | 55 ------ node/runtime/src/weights/paritydb_weights.rs | 93 ----------- node/runtime/src/weights/rocksdb_weights.rs | 92 ---------- .../session-validator-management/src/lib.rs | 2 +- 16 files changed, 29 insertions(+), 848 deletions(-) delete mode 100644 node/runtime/src/weights/block_weights.rs delete mode 100644 node/runtime/src/weights/extrinsic_weights.rs delete mode 100644 node/runtime/src/weights/frame_system.rs delete mode 100644 node/runtime/src/weights/mod.rs delete mode 100644 node/runtime/src/weights/pallet_balances.rs delete mode 100644 node/runtime/src/weights/pallet_session_validator_management.rs delete mode 100644 node/runtime/src/weights/pallet_sudo.rs delete mode 100644 node/runtime/src/weights/pallet_timestamp.rs delete mode 100644 node/runtime/src/weights/paritydb_weights.rs delete mode 100644 node/runtime/src/weights/rocksdb_weights.rs diff --git a/Earthfile b/Earthfile index 1bb88a0d2..5c423dab5 100644 --- a/Earthfile +++ b/Earthfile @@ -69,7 +69,6 @@ licenses: fmt: FROM +source CACHE --sharing shared --id cargo $CARGO_HOME - RUN find node/runtime/src/weights -type f -name '*.rs' -exec cargo fmt -- {} + RUN cargo fmt --check docker: diff --git a/changelog.md b/changelog.md index fc43e8467..691d4948f 100644 --- a/changelog.md +++ b/changelog.md @@ -5,7 +5,7 @@ This changelog is based on [Keep A Changelog](https://keepachangelog.com/en/1.1. # Unreleased ## Changed - +* Replaced custom weights with default substrate weights for few pallets * Updated to polkadot-stable2409-4 (aka v1.16.4). * `setup-main-chain-state` command now uses native Rust to upsert the D-Parameter and upsert permissioned candidates * Changed the `smart-contracts init-governance` command to `smart-contracts governance init` diff --git a/node/node/Cargo.toml b/node/node/Cargo.toml index 131b0978e..c3ccd9465 100644 --- a/node/node/Cargo.toml +++ b/node/node/Cargo.toml @@ -108,9 +108,18 @@ authority-selection-inherents = { workspace = true, features = ["mock"] } [features] default = ["sidechain-domain/std"] +rocksdb = [ + "sc-cli/rocksdb", + "sc-service/rocksdb", + "sidechain-runtime/with-rocksdb-weights", +] +paritydb = [ + "sidechain-runtime/with-paritydb-weights", +] # Dependencies that are only required if runtime benchmarking should be build. runtime-benchmarks = [ "sidechain-runtime/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-benchmarking-cli/runtime-benchmarks", ] + \ No newline at end of file diff --git a/node/runtime/Cargo.toml b/node/runtime/Cargo.toml index 2583d6217..fdea76d74 100644 --- a/node/runtime/Cargo.toml +++ b/node/runtime/Cargo.toml @@ -87,7 +87,9 @@ serde_json = { workspace = true } substrate-wasm-builder = { workspace = true, optional = true } [features] -default = ["std"] +default = ["std", "with-rocksdb-weights"] +with-rocksdb-weights = [] +with-paritydb-weights = [] std = [ "authority-selection-inherents/std", "sp-block-rewards/std", diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index bbae16898..4e972e9e8 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -7,7 +7,6 @@ extern crate frame_benchmarking; // A few exports that help ease life for downstream crates. -use crate::weights::rocksdb_weights::constants::RocksDbWeight; use authority_selection_inherents::authority_selection_inputs::AuthoritySelectionInputs; use authority_selection_inherents::filter_invalid_candidates::{ validate_permissioned_candidate_data, PermissionedCandidateDataError, RegistrationDataError, @@ -15,6 +14,10 @@ use authority_selection_inherents::filter_invalid_candidates::{ }; use authority_selection_inherents::select_authorities::select_authorities; use frame_support::genesis_builder_helper::{build_state, get_preset}; +#[cfg(feature = "with-paritydb-weights")] +use frame_support::weights::constants::ParityDbWeight as RuntimeDbWeight; +#[cfg(feature = "with-rocksdb-weights")] +use frame_support::weights::constants::RocksDbWeight as RuntimeDbWeight; use frame_support::BoundedVec; pub use frame_support::{ construct_runtime, parameter_types, @@ -68,9 +71,6 @@ use sp_weights::Weight; #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -#[allow(warnings)] -mod weights; - #[cfg(test)] mod mock; @@ -96,8 +96,6 @@ pub type Nonce = u32; /// A hash of some data used by the chain. pub type Hash = sp_core::H256; -type DbWeight = RocksDbWeight; - /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know /// the specifics of the runtime. They can then be made to be agnostic over specific formats /// of data like extrinsics, allowing for them to continue syncing the network through upgrades @@ -233,28 +231,15 @@ const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 2 seconds of compute with a 6 second average block time. pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX); +pub const MAXIMUM_BLOCK_LENGTH: u32 = 5 * 1024 * 1024; parameter_types! { pub const BlockHashCount: BlockNumber = 2400; pub const Version: RuntimeVersion = VERSION; - pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights::builder() - .base_block(weights::block_weights::BlockExecutionWeight::get()) - .for_class(frame_support::dispatch::DispatchClass::all(), |weights| { - weights.base_extrinsic = weights::extrinsic_weights::ExtrinsicBaseWeight::get(); - }) - .for_class(frame_support::dispatch::DispatchClass::Normal, |weights| { - weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); - }) - .for_class(frame_support::dispatch::DispatchClass::Operational, |weights| { - weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); - weights.reserved = Some( - MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT, - ); - }) - .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) - .build_or_panic(); + pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights + ::with_sensible_defaults(MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO); pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength - ::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + ::max_with_normal_ratio(MAXIMUM_BLOCK_LENGTH, NORMAL_DISPATCH_RATIO); pub const SS58Prefix: u8 = 42; } @@ -288,7 +273,7 @@ impl frame_system::Config for Runtime { /// Maximum number of block number to block hash mappings to keep (oldest pruned first). type BlockHashCount = BlockHashCount; /// The weight of database operations that the runtime can invoke. - type DbWeight = DbWeight; + type DbWeight = RuntimeDbWeight; /// Version of the runtime. type Version = Version; /// Converts a module to the index of the module in `construct_runtime!`. @@ -302,7 +287,7 @@ impl frame_system::Config for Runtime { /// The data to be stored in an account. type AccountData = pallet_balances::AccountData; /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = weights::frame_system::WeightInfo; + type SystemWeightInfo = frame_system::weights::SubstrateWeight; /// This is used as an identifier of the chain. 42 is the generic substrate prefix. type SS58Prefix = SS58Prefix; /// The set code logic, just the default since we're not a parachain. @@ -357,7 +342,7 @@ impl pallet_timestamp::Config for Runtime { type Moment = u64; type OnTimestampSet = Aura; type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; - type WeightInfo = weights::pallet_timestamp::WeightInfo; + type WeightInfo = pallet_timestamp::weights::SubstrateWeight; } /// Existential deposit. @@ -374,7 +359,7 @@ impl pallet_balances::Config for Runtime { type DustRemoval = (); type ExistentialDeposit = ConstU128; type AccountStore = System; - type WeightInfo = weights::pallet_balances::WeightInfo; + type WeightInfo = pallet_balances::weights::SubstrateWeight; type FreezeIdentifier = (); type MaxFreezes = (); type RuntimeHoldReason = (); @@ -397,7 +382,7 @@ impl pallet_transaction_payment::Config for Runtime { impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; - type WeightInfo = weights::pallet_sudo::WeightInfo; + type WeightInfo = pallet_sudo::weights::SubstrateWeight; } impl pallet_partner_chains_session::Config for Runtime { @@ -421,6 +406,7 @@ impl pallet_session_validator_management::Config for Runtime { type AuthorityKeys = SessionKeys; type AuthoritySelectionInputs = AuthoritySelectionInputs; type ScEpochNumber = ScEpochNumber; + type WeightInfo = pallet_session_validator_management::weights::SubstrateWeight; fn select_authorities( input: AuthoritySelectionInputs, @@ -432,8 +418,6 @@ impl pallet_session_validator_management::Config for Runtime { fn current_epoch_number() -> ScEpochNumber { Sidechain::current_epoch_number() } - - type WeightInfo = weights::pallet_session_validator_management::WeightInfo; } parameter_types! { @@ -447,7 +431,7 @@ impl sp_sidechain::OnNewEpoch for LogBeneficiaries { let rewards = BlockRewards::get_rewards_and_clear(); log::info!("Rewards accrued in epoch {old_epoch}: {rewards:?}"); - DbWeight::get().reads_writes(1, 1) + RuntimeDbWeight::get().reads_writes(1, 1) } } diff --git a/node/runtime/src/weights/block_weights.rs b/node/runtime/src/weights/block_weights.rs deleted file mode 100644 index daefa5597..000000000 --- a/node/runtime/src/weights/block_weights.rs +++ /dev/null @@ -1,62 +0,0 @@ -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-05-28 (Y/M/D) -//! HOSTNAME: `michal-pc`, CPU: `AMD Ryzen 9 5950X 16-Core Processor` -//! -//! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Local Testnet` -//! WARMUPS: `10`, REPEAT: `100` -//! WEIGHT-PATH: `./runtime/src/weights/` -//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` - -// Executed Command: -// ./target/production/partner-chains-node -// benchmark -// overhead -// --wasm-execution=compiled -// --weight-path=./runtime/src/weights/ -// --warmup=10 -// --repeat=100 - -use sp_core::parameter_types; -use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; - -parameter_types! { - /// Time to execute an empty block. - /// Calculated by multiplying the *Average* with `1.0` and adding `0`. - /// - /// Stats nanoseconds: - /// Min, Max: 152_141, 212_591 - /// Average: 158_172 - /// Median: 155_790 - /// Std-Dev: 7422.77 - /// - /// Percentiles nanoseconds: - /// 99th: 178_491 - /// 95th: 171_111 - /// 75th: 158_810 - pub const BlockExecutionWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(158_172), 0); -} - -#[cfg(test)] -mod test_weights { - use sp_weights::constants; - - /// Checks that the weight exists and is sane. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn sane() { - let w = super::BlockExecutionWeight::get(); - - // At least 100 µs. - assert!( - w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS, - "Weight should be at least 100 µs." - ); - // At most 50 ms. - assert!( - w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS, - "Weight should be at most 50 ms." - ); - } -} diff --git a/node/runtime/src/weights/extrinsic_weights.rs b/node/runtime/src/weights/extrinsic_weights.rs deleted file mode 100644 index c1b4f5a83..000000000 --- a/node/runtime/src/weights/extrinsic_weights.rs +++ /dev/null @@ -1,62 +0,0 @@ -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-05-28 (Y/M/D) -//! HOSTNAME: `michal-pc`, CPU: `AMD Ryzen 9 5950X 16-Core Processor` -//! -//! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Local Testnet` -//! WARMUPS: `10`, REPEAT: `100` -//! WEIGHT-PATH: `./runtime/src/weights/` -//! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` - -// Executed Command: -// ./target/production/partner-chains-node -// benchmark -// overhead -// --wasm-execution=compiled -// --weight-path=./runtime/src/weights/ -// --warmup=10 -// --repeat=100 - -use sp_core::parameter_types; -use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight}; - -parameter_types! { - /// Time to execute a NO-OP extrinsic, for example `System::remark`. - /// Calculated by multiplying the *Average* with `1.0` and adding `0`. - /// - /// Stats nanoseconds: - /// Min, Max: 61_608, 65_174 - /// Average: 64_178 - /// Median: 64_369 - /// Std-Dev: 630.57 - /// - /// Percentiles nanoseconds: - /// 99th: 64_950 - /// 95th: 64_694 - /// 75th: 64_511 - pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(64_178), 0); -} - -#[cfg(test)] -mod test_weights { - use sp_weights::constants; - - /// Checks that the weight exists and is sane. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn sane() { - let w = super::ExtrinsicBaseWeight::get(); - - // At least 10 µs. - assert!( - w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS, - "Weight should be at least 10 µs." - ); - // At most 1 ms. - assert!( - w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Weight should be at most 1 ms." - ); - } -} diff --git a/node/runtime/src/weights/frame_system.rs b/node/runtime/src/weights/frame_system.rs deleted file mode 100644 index a544ce0c0..000000000 --- a/node/runtime/src/weights/frame_system.rs +++ /dev/null @@ -1,154 +0,0 @@ - -//! Autogenerated weights for `frame_system` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `michal-pc`, CPU: `AMD Ryzen 9 5950X 16-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 - -// Executed Command: -// ./target/production/partner-chains-node -// benchmark -// pallet -// --steps=50 -// --repeat=20 -// --pallet=frame_system -// --extrinsic=* -// --wasm-execution=compiled -// --heap-pages=4096 -// --output=./runtime/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `frame_system`. -pub struct WeightInfo(PhantomData); -impl frame_system::WeightInfo for WeightInfo { - /// The range of component `b` is `[0, 3932160]`. - fn remark(b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_370_000 picoseconds. - Weight::from_parts(3_196_749, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 0 - .saturating_add(Weight::from_parts(264, 0).saturating_mul(b.into())) - } - /// The range of component `b` is `[0, 3932160]`. - fn remark_with_event(b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_560_000 picoseconds. - Weight::from_parts(3_700_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1_028, 0).saturating_mul(b.into())) - } - /// Storage: `System::Digest` (r:1 w:1) - /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) - /// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) - fn set_heap_pages() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `1485` - // Minimum execution time: 2_460_000 picoseconds. - Weight::from_parts(2_620_000, 0) - .saturating_add(Weight::from_parts(0, 1485)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `System::Digest` (r:1 w:1) - /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) - /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) - fn set_code() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `1485` - // Minimum execution time: 55_861_022_000 picoseconds. - Weight::from_parts(56_314_742_000, 0) - .saturating_add(Weight::from_parts(0, 1485)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Skipped::Metadata` (r:0 w:0) - /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `i` is `[0, 1000]`. - fn set_storage(i: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_470_000 picoseconds. - Weight::from_parts(1_550_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 883 - .saturating_add(Weight::from_parts(550_895, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) - } - /// Storage: `Skipped::Metadata` (r:0 w:0) - /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `i` is `[0, 1000]`. - fn kill_storage(i: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_370_000 picoseconds. - Weight::from_parts(1_460_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 827 - .saturating_add(Weight::from_parts(431_853, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) - } - /// Storage: `Skipped::Metadata` (r:0 w:0) - /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `p` is `[0, 1000]`. - fn kill_prefix(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `29 + p * (69 ±0)` - // Estimated: `43 + p * (70 ±0)` - // Minimum execution time: 2_570_000 picoseconds. - Weight::from_parts(2_660_000, 0) - .saturating_add(Weight::from_parts(0, 43)) - // Standard Error: 1_052 - .saturating_add(Weight::from_parts(861_832, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) - } - /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) - /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) - fn authorize_upgrade() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_390_000 picoseconds. - Weight::from_parts(5_130_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) - /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) - /// Storage: `System::Digest` (r:1 w:1) - /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) - /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) - fn apply_authorized_upgrade() -> Weight { - // Proof Size summary in bytes: - // Measured: `22` - // Estimated: `1518` - // Minimum execution time: 58_692_395_000 picoseconds. - Weight::from_parts(59_379_038_000, 0) - .saturating_add(Weight::from_parts(0, 1518)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(3)) - } -} diff --git a/node/runtime/src/weights/mod.rs b/node/runtime/src/weights/mod.rs deleted file mode 100644 index 7a814b9b5..000000000 --- a/node/runtime/src/weights/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -pub mod block_weights; -pub mod extrinsic_weights; -pub mod frame_system; -pub mod pallet_balances; -pub mod pallet_session_validator_management; -pub mod pallet_sudo; -pub mod pallet_timestamp; -// pub mod paritydb_weights; -pub mod rocksdb_weights; diff --git a/node/runtime/src/weights/pallet_balances.rs b/node/runtime/src/weights/pallet_balances.rs deleted file mode 100644 index 43e4a2dab..000000000 --- a/node/runtime/src/weights/pallet_balances.rs +++ /dev/null @@ -1,157 +0,0 @@ - -//! Autogenerated weights for `pallet_balances` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `michal-pc`, CPU: `AMD Ryzen 9 5950X 16-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 - -// Executed Command: -// ./target/production/partner-chains-node -// benchmark -// pallet -// --steps=50 -// --repeat=20 -// --pallet=pallet_balances -// --extrinsic=* -// --wasm-execution=compiled -// --heap-pages=4096 -// --output=./runtime/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_balances`. -pub struct WeightInfo(PhantomData); -impl pallet_balances::WeightInfo for WeightInfo { - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn transfer_allow_death() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 32_320_000 picoseconds. - Weight::from_parts(32_970_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn transfer_keep_alive() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 25_620_000 picoseconds. - Weight::from_parts(26_011_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn force_set_balance_creating() -> Weight { - // Proof Size summary in bytes: - // Measured: `140` - // Estimated: `3593` - // Minimum execution time: 10_401_000 picoseconds. - Weight::from_parts(10_610_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn force_set_balance_killing() -> Weight { - // Proof Size summary in bytes: - // Measured: `140` - // Estimated: `3593` - // Minimum execution time: 13_760_000 picoseconds. - Weight::from_parts(14_050_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn force_transfer() -> Weight { - // Proof Size summary in bytes: - // Measured: `174` - // Estimated: `6196` - // Minimum execution time: 33_910_000 picoseconds. - Weight::from_parts(34_440_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn transfer_all() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3593` - // Minimum execution time: 31_640_000 picoseconds. - Weight::from_parts(31_930_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - fn force_unreserve() -> Weight { - // Proof Size summary in bytes: - // Measured: `140` - // Estimated: `3593` - // Minimum execution time: 12_080_000 picoseconds. - Weight::from_parts(12_530_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `System::Account` (r:999 w:999) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `u` is `[1, 1000]`. - fn upgrade_accounts(u: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + u * (136 ±0)` - // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 12_120_000 picoseconds. - Weight::from_parts(12_420_000, 0) - .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 14_590 - .saturating_add(Weight::from_parts(9_998_986, 0).saturating_mul(u.into())) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) - .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) - } - fn force_adjust_total_issuance() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_110_000 picoseconds. - Weight::from_parts(4_270_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn burn_allow_death() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 20_680_000 picoseconds. - Weight::from_parts(21_010_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn burn_keep_alive() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 13_810_000 picoseconds. - Weight::from_parts(14_240_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } -} diff --git a/node/runtime/src/weights/pallet_session_validator_management.rs b/node/runtime/src/weights/pallet_session_validator_management.rs deleted file mode 100644 index 2860e686c..000000000 --- a/node/runtime/src/weights/pallet_session_validator_management.rs +++ /dev/null @@ -1,50 +0,0 @@ - -//! Autogenerated weights for `pallet_session_validator_management` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `michal-pc`, CPU: `AMD Ryzen 9 5950X 16-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 - -// Executed Command: -// ./target/production/partner-chains-node -// benchmark -// pallet -// --steps=50 -// --repeat=20 -// --pallet=pallet_session_validator_management -// --extrinsic=* -// --wasm-execution=compiled -// --heap-pages=4096 -// --output=./runtime/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_session_validator_management`. -pub struct WeightInfo(PhantomData); -impl pallet_session_validator_management::WeightInfo for WeightInfo { - /// Storage: `SessionCommitteeManagement::CurrentCommittee` (r:1 w:0) - /// Proof: `SessionCommitteeManagement::CurrentCommittee` (`max_values`: Some(1), `max_size`: Some(3113), added: 3608, mode: `MaxEncodedLen`) - /// Storage: `SessionCommitteeManagement::NextCommittee` (r:0 w:1) - /// Proof: `SessionCommitteeManagement::NextCommittee` (`max_values`: Some(1), `max_size`: Some(3113), added: 3608, mode: `MaxEncodedLen`) - /// The range of component `v` is `[0, 32]`. - fn set(v: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `138` - // Estimated: `4598` - // Minimum execution time: 6_660_000 picoseconds. - Weight::from_parts(7_070_352, 0) - .saturating_add(Weight::from_parts(0, 4598)) - // Standard Error: 831 - .saturating_add(Weight::from_parts(58_063, 0).saturating_mul(v.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/node/runtime/src/weights/pallet_sudo.rs b/node/runtime/src/weights/pallet_sudo.rs deleted file mode 100644 index afc77482c..000000000 --- a/node/runtime/src/weights/pallet_sudo.rs +++ /dev/null @@ -1,79 +0,0 @@ - -//! Autogenerated weights for `pallet_sudo` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `michal-pc`, CPU: `AMD Ryzen 9 5950X 16-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 - -// Executed Command: -// ./target/production/partner-chains-node -// benchmark -// pallet -// --steps=50 -// --repeat=20 -// --pallet=pallet_sudo -// --extrinsic=* -// --wasm-execution=compiled -// --heap-pages=4096 -// --output=./runtime/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_sudo`. -pub struct WeightInfo(PhantomData); -impl pallet_sudo::WeightInfo for WeightInfo { - /// Storage: `Sudo::Key` (r:1 w:1) - /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - fn set_key() -> Weight { - // Proof Size summary in bytes: - // Measured: `132` - // Estimated: `1517` - // Minimum execution time: 6_840_000 picoseconds. - Weight::from_parts(7_100_000, 0) - .saturating_add(Weight::from_parts(0, 1517)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Sudo::Key` (r:1 w:0) - /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - fn sudo() -> Weight { - // Proof Size summary in bytes: - // Measured: `132` - // Estimated: `1517` - // Minimum execution time: 7_150_000 picoseconds. - Weight::from_parts(7_440_000, 0) - .saturating_add(Weight::from_parts(0, 1517)) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: `Sudo::Key` (r:1 w:0) - /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - fn sudo_as() -> Weight { - // Proof Size summary in bytes: - // Measured: `132` - // Estimated: `1517` - // Minimum execution time: 7_350_000 picoseconds. - Weight::from_parts(7_470_000, 0) - .saturating_add(Weight::from_parts(0, 1517)) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: `Sudo::Key` (r:1 w:1) - /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - fn remove_key() -> Weight { - // Proof Size summary in bytes: - // Measured: `132` - // Estimated: `1517` - // Minimum execution time: 6_210_000 picoseconds. - Weight::from_parts(6_440_000, 0) - .saturating_add(Weight::from_parts(0, 1517)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/node/runtime/src/weights/pallet_timestamp.rs b/node/runtime/src/weights/pallet_timestamp.rs deleted file mode 100644 index b95fbfa62..000000000 --- a/node/runtime/src/weights/pallet_timestamp.rs +++ /dev/null @@ -1,55 +0,0 @@ - -//! Autogenerated weights for `pallet_timestamp` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `michal-pc`, CPU: `AMD Ryzen 9 5950X 16-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 - -// Executed Command: -// ./target/production/partner-chains-node -// benchmark -// pallet -// --steps=50 -// --repeat=20 -// --pallet=pallet_timestamp -// --extrinsic=* -// --wasm-execution=compiled -// --heap-pages=4096 -// --output=./runtime/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_timestamp`. -pub struct WeightInfo(PhantomData); -impl pallet_timestamp::WeightInfo for WeightInfo { - /// Storage: `Timestamp::Now` (r:1 w:1) - /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - /// Storage: `Aura::CurrentSlot` (r:1 w:0) - /// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) - fn set() -> Weight { - // Proof Size summary in bytes: - // Measured: `120` - // Estimated: `1493` - // Minimum execution time: 5_440_000 picoseconds. - Weight::from_parts(5_630_000, 0) - .saturating_add(Weight::from_parts(0, 1493)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - fn on_finalize() -> Weight { - // Proof Size summary in bytes: - // Measured: `57` - // Estimated: `0` - // Minimum execution time: 2_360_000 picoseconds. - Weight::from_parts(2_470_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } -} diff --git a/node/runtime/src/weights/paritydb_weights.rs b/node/runtime/src/weights/paritydb_weights.rs deleted file mode 100644 index 6c66a60e3..000000000 --- a/node/runtime/src/weights/paritydb_weights.rs +++ /dev/null @@ -1,93 +0,0 @@ -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-05-28 (Y/M/D) -//! HOSTNAME: `michal-pc`, CPU: `AMD Ryzen 9 5950X 16-Core Processor` -//! -//! DATABASE: `ParityDb`, RUNTIME: `Local Testnet` -//! BLOCK-NUM: `BlockId::Number(404)` -//! SKIP-WRITE: `false`, SKIP-READ: `false`, WARMUPS: `1` -//! STATE-VERSION: `V1`, STATE-CACHE-SIZE: `` -//! WEIGHT-PATH: `./runtime/src/weights/` -//! METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` - -// Executed Command: -// ./target/production/partner-chains-node -// benchmark -// storage -// --base-path=/tmp/alice -// --state-version=1 -// --warmups=1 -// --weight-path=./runtime/src/weights/ - -/// Storage DB weights for the `Local Testnet` runtime and `ParityDb`. -pub mod constants { - use frame_support::weights::constants; - use sp_core::parameter_types; - use sp_weights::RuntimeDbWeight; - - parameter_types! { - /// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights - /// are available for brave runtime engineers who may want to try this out as default. - pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight { - /// Time to read one storage item. - /// Calculated by multiplying the *Average* of all values with `1.0` and adding `0`. - /// - /// Stats nanoseconds: - /// Min, Max: 1_150, 574_580 - /// Average: 3_790 - /// Median: 2_660 - /// Std-Dev: 26304.89 - /// - /// Percentiles nanoseconds: - /// 99th: 3_370 - /// 95th: 3_070 - /// 75th: 2_760 - read: 3_790 * constants::WEIGHT_REF_TIME_PER_NANOS, - - /// Time to write one storage item. - /// Calculated by multiplying the *Average* of all values with `1.0` and adding `0`. - /// - /// Stats nanoseconds: - /// Min, Max: 4_950, 1_373_861 - /// Average: 22_524 - /// Median: 20_420 - /// Std-Dev: 62471.08 - /// - /// Percentiles nanoseconds: - /// 99th: 32_000 - /// 95th: 26_900 - /// 75th: 22_380 - write: 22_524 * constants::WEIGHT_REF_TIME_PER_NANOS, - }; - } - - #[cfg(test)] - mod test_db_weights { - use super::constants::ParityDbWeight as W; - use sp_weights::constants; - - /// Checks that all weights exist and have sane values. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn bound() { - // At least 1 µs. - assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Read weight should be at least 1 µs." - ); - assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Write weight should be at least 1 µs." - ); - // At most 1 ms. - assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Read weight should be at most 1 ms." - ); - assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Write weight should be at most 1 ms." - ); - } - } -} diff --git a/node/runtime/src/weights/rocksdb_weights.rs b/node/runtime/src/weights/rocksdb_weights.rs deleted file mode 100644 index 6fbcb3d6c..000000000 --- a/node/runtime/src/weights/rocksdb_weights.rs +++ /dev/null @@ -1,92 +0,0 @@ -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-05-30 (Y/M/D) -//! HOSTNAME: `0138a9af6c6b`, CPU: `AMD EPYC 7763 64-Core Processor` -//! -//! DATABASE: `RocksDb`, RUNTIME: `Local Testnet` -//! BLOCK-NUM: `BlockId::Number(0)` -//! SKIP-WRITE: `false`, SKIP-READ: `false`, WARMUPS: `1` -//! STATE-VERSION: `V1`, STATE-CACHE-SIZE: `` -//! WEIGHT-PATH: `./runtime/src/weights/` -//! METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` - -// Executed Command: -// ./target/production/partner-chains-node -// benchmark -// storage -// --state-version=1 -// --warmups=1 -// --weight-path=./runtime/src/weights/ - -/// Storage DB weights for the `Local Testnet` runtime and `RocksDb`. -pub mod constants { - use frame_support::weights::constants; - use sp_core::parameter_types; - use sp_weights::RuntimeDbWeight; - - parameter_types! { - /// By default, Substrate uses `RocksDB`, so this will be the weight used throughout - /// the runtime. - pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight { - /// Time to read one storage item. - /// Calculated by multiplying the *Average* of all values with `1.0` and adding `0`. - /// - /// Stats nanoseconds: - /// Min, Max: 2_054, 877_284 - /// Average: 20_301 - /// Median: 3_927 - /// Std-Dev: 118845.44 - /// - /// Percentiles nanoseconds: - /// 99th: 877_284 - /// 95th: 5_179 - /// 75th: 4_699 - read: 20_301 * constants::WEIGHT_REF_TIME_PER_NANOS, - - /// Time to write one storage item. - /// Calculated by multiplying the *Average* of all values with `1.0` and adding `0`. - /// - /// Stats nanoseconds: - /// Min, Max: 12_313, 20_813_489 - /// Average: 416_545 - /// Median: 23_234 - /// Std-Dev: 2828556.47 - /// - /// Percentiles nanoseconds: - /// 99th: 20_813_489 - /// 95th: 38_583 - /// 75th: 28_745 - write: 416_545 * constants::WEIGHT_REF_TIME_PER_NANOS, - }; - } - - #[cfg(test)] - mod test_db_weights { - use super::constants::RocksDbWeight as W; - use sp_weights::constants; - - /// Checks that all weights exist and have sane values. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn bound() { - // At least 1 µs. - assert!( - W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Read weight should be at least 1 µs." - ); - assert!( - W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS, - "Write weight should be at least 1 µs." - ); - // At most 1 ms. - assert!( - W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Read weight should be at most 1 ms." - ); - assert!( - W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS, - "Write weight should be at most 1 ms." - ); - } - } -} diff --git a/toolkit/pallets/session-validator-management/src/lib.rs b/toolkit/pallets/session-validator-management/src/lib.rs index 8166ed034..e449fa199 100644 --- a/toolkit/pallets/session-validator-management/src/lib.rs +++ b/toolkit/pallets/session-validator-management/src/lib.rs @@ -11,7 +11,7 @@ pub mod mock; #[cfg(test)] mod tests; -mod weights; +pub mod weights; pub use weights::WeightInfo;