diff --git a/pallets/governance/src/weights.rs b/pallets/governance/src/weights.rs index 0b13bd63..38e02412 100644 --- a/pallets/governance/src/weights.rs +++ b/pallets/governance/src/weights.rs @@ -91,8 +91,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1316` // Estimated: `3569` - // Minimum execution time: 99_137_000 picoseconds. - Weight::from_parts(102_083_000, 3569) + // Minimum execution time: 99_207_000 picoseconds. + Weight::from_parts(100_810_000, 3569) .saturating_add(T::DbWeight::get().reads(17_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -176,8 +176,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2633` // Estimated: `18473` - // Minimum execution time: 234_062_000 picoseconds. - Weight::from_parts(246_625_000, 18473) + // Minimum execution time: 240_284_000 picoseconds. + Weight::from_parts(247_908_000, 18473) .saturating_add(T::DbWeight::get().reads(43_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -191,8 +191,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `120` // Estimated: `3569` - // Minimum execution time: 43_492_000 picoseconds. - Weight::from_parts(44_705_000, 3569) + // Minimum execution time: 44_263_000 picoseconds. + Weight::from_parts(45_276_000, 3569) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -206,8 +206,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `120` // Estimated: `3569` - // Minimum execution time: 49_043_000 picoseconds. - Weight::from_parts(52_258_000, 3569) + // Minimum execution time: 49_733_000 picoseconds. + Weight::from_parts(50_996_000, 3569) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -223,8 +223,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `318` // Estimated: `6148` - // Minimum execution time: 54_624_000 picoseconds. - Weight::from_parts(57_578_000, 6148) + // Minimum execution time: 54_382_000 picoseconds. + Weight::from_parts(55_495_000, 6148) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -240,8 +240,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1186` // Estimated: `7126` - // Minimum execution time: 58_180_000 picoseconds. - Weight::from_parts(62_097_000, 7126) + // Minimum execution time: 56_987_000 picoseconds. + Weight::from_parts(58_510_000, 7126) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -251,8 +251,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `195` // Estimated: `3464` - // Minimum execution time: 22_513_000 picoseconds. - Weight::from_parts(25_056_000, 3464) + // Minimum execution time: 21_802_000 picoseconds. + Weight::from_parts(22_642_000, 3464) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -262,8 +262,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `43` // Estimated: `1484` - // Minimum execution time: 8_005_000 picoseconds. - Weight::from_parts(9_187_000, 1484) + // Minimum execution time: 7_615_000 picoseconds. + Weight::from_parts(7_975_000, 1484) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -273,8 +273,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `43` // Estimated: `1484` - // Minimum execution time: 8_326_000 picoseconds. - Weight::from_parts(8_766_000, 1484) + // Minimum execution time: 8_096_000 picoseconds. + Weight::from_parts(8_486_000, 1484) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -290,8 +290,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `120` // Estimated: `3820` - // Minimum execution time: 48_932_000 picoseconds. - Weight::from_parts(50_404_000, 3820) + // Minimum execution time: 49_253_000 picoseconds. + Weight::from_parts(50_515_000, 3820) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -303,8 +303,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `222` // Estimated: `3820` - // Minimum execution time: 15_409_000 picoseconds. - Weight::from_parts(15_870_000, 3820) + // Minimum execution time: 15_109_000 picoseconds. + Weight::from_parts(15_529_000, 3820) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -320,8 +320,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `299` // Estimated: `6650` - // Minimum execution time: 58_402_000 picoseconds. - Weight::from_parts(59_694_000, 6650) + // Minimum execution time: 58_280_000 picoseconds. + Weight::from_parts(60_474_000, 6650) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -335,8 +335,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `275` // Estimated: `6650` - // Minimum execution time: 34_966_000 picoseconds. - Weight::from_parts(36_459_000, 6650) + // Minimum execution time: 33_903_000 picoseconds. + Weight::from_parts(34_826_000, 6650) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -382,8 +382,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1316` // Estimated: `3569` - // Minimum execution time: 99_137_000 picoseconds. - Weight::from_parts(102_083_000, 3569) + // Minimum execution time: 99_207_000 picoseconds. + Weight::from_parts(100_810_000, 3569) .saturating_add(RocksDbWeight::get().reads(17_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -467,8 +467,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2633` // Estimated: `18473` - // Minimum execution time: 234_062_000 picoseconds. - Weight::from_parts(246_625_000, 18473) + // Minimum execution time: 240_284_000 picoseconds. + Weight::from_parts(247_908_000, 18473) .saturating_add(RocksDbWeight::get().reads(43_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -482,8 +482,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `120` // Estimated: `3569` - // Minimum execution time: 43_492_000 picoseconds. - Weight::from_parts(44_705_000, 3569) + // Minimum execution time: 44_263_000 picoseconds. + Weight::from_parts(45_276_000, 3569) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -497,8 +497,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `120` // Estimated: `3569` - // Minimum execution time: 49_043_000 picoseconds. - Weight::from_parts(52_258_000, 3569) + // Minimum execution time: 49_733_000 picoseconds. + Weight::from_parts(50_996_000, 3569) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -514,8 +514,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `318` // Estimated: `6148` - // Minimum execution time: 54_624_000 picoseconds. - Weight::from_parts(57_578_000, 6148) + // Minimum execution time: 54_382_000 picoseconds. + Weight::from_parts(55_495_000, 6148) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -531,8 +531,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1186` // Estimated: `7126` - // Minimum execution time: 58_180_000 picoseconds. - Weight::from_parts(62_097_000, 7126) + // Minimum execution time: 56_987_000 picoseconds. + Weight::from_parts(58_510_000, 7126) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -542,8 +542,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `195` // Estimated: `3464` - // Minimum execution time: 22_513_000 picoseconds. - Weight::from_parts(25_056_000, 3464) + // Minimum execution time: 21_802_000 picoseconds. + Weight::from_parts(22_642_000, 3464) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -553,8 +553,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `43` // Estimated: `1484` - // Minimum execution time: 8_005_000 picoseconds. - Weight::from_parts(9_187_000, 1484) + // Minimum execution time: 7_615_000 picoseconds. + Weight::from_parts(7_975_000, 1484) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -564,8 +564,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `43` // Estimated: `1484` - // Minimum execution time: 8_326_000 picoseconds. - Weight::from_parts(8_766_000, 1484) + // Minimum execution time: 8_096_000 picoseconds. + Weight::from_parts(8_486_000, 1484) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -581,8 +581,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `120` // Estimated: `3820` - // Minimum execution time: 48_932_000 picoseconds. - Weight::from_parts(50_404_000, 3820) + // Minimum execution time: 49_253_000 picoseconds. + Weight::from_parts(50_515_000, 3820) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -594,8 +594,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `222` // Estimated: `3820` - // Minimum execution time: 15_409_000 picoseconds. - Weight::from_parts(15_870_000, 3820) + // Minimum execution time: 15_109_000 picoseconds. + Weight::from_parts(15_529_000, 3820) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -611,8 +611,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `299` // Estimated: `6650` - // Minimum execution time: 58_402_000 picoseconds. - Weight::from_parts(59_694_000, 6650) + // Minimum execution time: 58_280_000 picoseconds. + Weight::from_parts(60_474_000, 6650) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -626,8 +626,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `275` // Estimated: `6650` - // Minimum execution time: 34_966_000 picoseconds. - Weight::from_parts(36_459_000, 6650) + // Minimum execution time: 33_903_000 picoseconds. + Weight::from_parts(34_826_000, 6650) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } diff --git a/pallets/subnet_emission/src/benchmarking.rs b/pallets/subnet_emission/src/benchmarking.rs index 33dcca18..b8f47bd4 100644 --- a/pallets/subnet_emission/src/benchmarking.rs +++ b/pallets/subnet_emission/src/benchmarking.rs @@ -65,4 +65,28 @@ benchmarks! { let hash = vec![10u8]; MinValidatorStake::::set(netuid, 0); }: set_weights_encrypted(RawOrigin::Signed(module_key2), netuid, weights, hash) + + delegate_weight_control { + let module_key: T::AccountId = account("ModuleKey", 0, 2); + let module_key2: T::AccountId = account("ModuleKey2", 0, 3); + + register_mock::(module_key.clone(), module_key.clone(), "test".as_bytes().to_vec())?; + register_mock::(module_key2.clone(), module_key2.clone(), "test1".as_bytes().to_vec())?; + let netuid = SubspaceMod::::get_netuid_for_name("testnet".as_bytes()).unwrap(); + + }: delegate_weight_control(RawOrigin::Signed(module_key), netuid, module_key2.clone()) + + remove_weight_control { + // we first delegate + let module_key: T::AccountId = account("ModuleKey", 0, 2); + let module_key2: T::AccountId = account("ModuleKey2", 0, 3); + + register_mock::(module_key.clone(), module_key.clone(), "test".as_bytes().to_vec())?; + register_mock::(module_key2.clone(), module_key2.clone(), "test1".as_bytes().to_vec())?; + + let netuid = SubspaceMod::::get_netuid_for_name("testnet".as_bytes()).unwrap(); + + let _ = Pallet::::delegate_weight_control(RawOrigin::Signed(module_key.clone()).into(), netuid, module_key2.clone()); + + }: remove_weight_control(RawOrigin::Signed(module_key), netuid) } diff --git a/pallets/subnet_emission/src/lib.rs b/pallets/subnet_emission/src/lib.rs index 50758270..c7394ef5 100644 --- a/pallets/subnet_emission/src/lib.rs +++ b/pallets/subnet_emission/src/lib.rs @@ -42,6 +42,7 @@ pub mod pallet { use pallet_subnet_emission_api::SubnetConsensus; use pallet_subspace::{define_module_includes, define_subnet_includes, TotalStake}; use subnet_pricing::root::RootPricing; + pub use crate::weights::WeightInfo; #[cfg(feature = "testnet")] const STORAGE_VERSION: StorageVersion = StorageVersion::new(16); @@ -104,6 +105,8 @@ pub mod pallet { /// node. So the final count is `MaxEncryptionPeriod + EncryptionPeriodBuffer` #[pallet::constant] type EncryptionPeriodBuffer: Get; + + type WeightInfo: WeightInfo; } type BalanceOf = @@ -389,12 +392,11 @@ pub mod pallet { } } - // TODO: // add benchmarks #[pallet::call] impl Pallet { #[pallet::call_index(0)] - #[pallet::weight((0, DispatchClass::Normal, Pays::No))] + #[pallet::weight((::WeightInfo::set_weights(), DispatchClass::Normal, Pays::No))] pub fn set_weights( origin: OriginFor, netuid: u16, @@ -405,7 +407,7 @@ pub mod pallet { } #[pallet::call_index(1)] - #[pallet::weight((0, DispatchClass::Normal, Pays::No))] + #[pallet::weight((::WeightInfo::set_weights_encrypted(), DispatchClass::Normal, Pays::No))] pub fn set_weights_encrypted( origin: OriginFor, netuid: u16, @@ -422,7 +424,7 @@ pub mod pallet { } #[pallet::call_index(2)] - #[pallet::weight((0, DispatchClass::Normal, Pays::No))] + #[pallet::weight((::WeightInfo::set_weights_encrypted(), DispatchClass::Normal, Pays::No))] pub fn delegate_weight_control( origin: OriginFor, netuid: u16, @@ -432,7 +434,7 @@ pub mod pallet { } #[pallet::call_index(3)] - #[pallet::weight((0, DispatchClass::Normal, Pays::No))] + #[pallet::weight((::WeightInfo::set_weights_encrypted(), DispatchClass::Normal, Pays::No))] pub fn remove_weight_control(origin: OriginFor, netuid: u16) -> DispatchResult { Self::do_remove_weight_control(origin, netuid) } diff --git a/pallets/subnet_emission/src/weights.rs b/pallets/subnet_emission/src/weights.rs index c5a73f56..15e540c6 100644 --- a/pallets/subnet_emission/src/weights.rs +++ b/pallets/subnet_emission/src/weights.rs @@ -37,6 +37,8 @@ use core::marker::PhantomData; pub trait WeightInfo { fn set_weights() -> Weight; fn set_weights_encrypted() -> Weight; + fn delegate_weight_control() -> Weight; + fn remove_weight_control() -> Weight; } /// Weights for `pallet_subnet_emission` using the Substrate node and recommended hardware. @@ -74,8 +76,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2481` // Estimated: `18321` - // Minimum execution time: 164_911_000 picoseconds. - Weight::from_parts(168_457_000, 18321) + // Minimum execution time: 169_260_000 picoseconds. + Weight::from_parts(174_900_000, 18321) .saturating_add(T::DbWeight::get().reads(20_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -101,11 +103,41 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1742` // Estimated: `7682` - // Minimum execution time: 100_870_000 picoseconds. - Weight::from_parts(103_245_000, 7682) + // Minimum execution time: 95_751_000 picoseconds. + Weight::from_parts(97_594_000, 7682) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } + /// Storage: `SubspaceModule::Uids` (r:2 w:0) + /// Proof: `SubspaceModule::Uids` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubspaceModule::WeightSettingDelegation` (r:1 w:1) + /// Proof: `SubspaceModule::WeightSettingDelegation` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubspaceModule::UseWeightsEncryption` (r:1 w:0) + /// Proof: `SubspaceModule::UseWeightsEncryption` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubnetEmissionModule::WeightEncryptionData` (r:1 w:0) + /// Proof: `SubnetEmissionModule::WeightEncryptionData` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn delegate_weight_control() -> Weight { + // Proof Size summary in bytes: + // Measured: `1200` + // Estimated: `7140` + // Minimum execution time: 47_329_000 picoseconds. + Weight::from_parts(48_051_000, 7140) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `SubspaceModule::Uids` (r:1 w:0) + /// Proof: `SubspaceModule::Uids` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubspaceModule::WeightSettingDelegation` (r:1 w:1) + /// Proof: `SubspaceModule::WeightSettingDelegation` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn remove_weight_control() -> Weight { + // Proof Size summary in bytes: + // Measured: `967` + // Estimated: `4432` + // Minimum execution time: 28_353_000 picoseconds. + Weight::from_parts(29_045_000, 4432) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } } // For backwards compatibility and tests. @@ -142,8 +174,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2481` // Estimated: `18321` - // Minimum execution time: 164_911_000 picoseconds. - Weight::from_parts(168_457_000, 18321) + // Minimum execution time: 169_260_000 picoseconds. + Weight::from_parts(174_900_000, 18321) .saturating_add(RocksDbWeight::get().reads(20_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -169,9 +201,39 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1742` // Estimated: `7682` - // Minimum execution time: 100_870_000 picoseconds. - Weight::from_parts(103_245_000, 7682) + // Minimum execution time: 95_751_000 picoseconds. + Weight::from_parts(97_594_000, 7682) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } + /// Storage: `SubspaceModule::Uids` (r:2 w:0) + /// Proof: `SubspaceModule::Uids` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubspaceModule::WeightSettingDelegation` (r:1 w:1) + /// Proof: `SubspaceModule::WeightSettingDelegation` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubspaceModule::UseWeightsEncryption` (r:1 w:0) + /// Proof: `SubspaceModule::UseWeightsEncryption` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubnetEmissionModule::WeightEncryptionData` (r:1 w:0) + /// Proof: `SubnetEmissionModule::WeightEncryptionData` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn delegate_weight_control() -> Weight { + // Proof Size summary in bytes: + // Measured: `1200` + // Estimated: `7140` + // Minimum execution time: 47_329_000 picoseconds. + Weight::from_parts(48_051_000, 7140) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `SubspaceModule::Uids` (r:1 w:0) + /// Proof: `SubspaceModule::Uids` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SubspaceModule::WeightSettingDelegation` (r:1 w:1) + /// Proof: `SubspaceModule::WeightSettingDelegation` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn remove_weight_control() -> Weight { + // Proof Size summary in bytes: + // Measured: `967` + // Estimated: `4432` + // Minimum execution time: 28_353_000 picoseconds. + Weight::from_parts(29_045_000, 4432) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } } \ No newline at end of file diff --git a/pallets/subspace/src/weights.rs b/pallets/subspace/src/weights.rs index 3cc1b012..50237e1e 100644 --- a/pallets/subspace/src/weights.rs +++ b/pallets/subspace/src/weights.rs @@ -69,8 +69,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1576` // Estimated: `14941` - // Minimum execution time: 150_706_000 picoseconds. - Weight::from_parts(153_339_000, 14941) + // Minimum execution time: 151_216_000 picoseconds. + Weight::from_parts(153_059_000, 14941) .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -92,8 +92,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1660` // Estimated: `15025` - // Minimum execution time: 159_390_000 picoseconds. - Weight::from_parts(162_525_000, 15025) + // Minimum execution time: 160_063_000 picoseconds. + Weight::from_parts(162_045_000, 15025) .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -115,8 +115,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1792` // Estimated: `27532` - // Minimum execution time: 277_163_000 picoseconds. - Weight::from_parts(281_291_000, 27532) + // Minimum execution time: 282_442_000 picoseconds. + Weight::from_parts(285_408_000, 27532) .saturating_add(T::DbWeight::get().reads(27_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -138,8 +138,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1930` // Estimated: `27670` - // Minimum execution time: 325_905_000 picoseconds. - Weight::from_parts(330_334_000, 27670) + // Minimum execution time: 332_348_000 picoseconds. + Weight::from_parts(337_758_000, 27670) .saturating_add(T::DbWeight::get().reads(27_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -161,8 +161,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1876` // Estimated: `27616` - // Minimum execution time: 331_206_000 picoseconds. - Weight::from_parts(349_069_000, 27616) + // Minimum execution time: 327_098_000 picoseconds. + Weight::from_parts(331_797_000, 27616) .saturating_add(T::DbWeight::get().reads(27_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -172,8 +172,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `77` // Estimated: `8727` - // Minimum execution time: 110_470_000 picoseconds. - Weight::from_parts(112_422_000, 8727) + // Minimum execution time: 118_274_000 picoseconds. + Weight::from_parts(120_186_000, 8727) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -253,8 +253,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2889` // Estimated: `18729` - // Minimum execution time: 363_165_000 picoseconds. - Weight::from_parts(368_075_000, 18729) + // Minimum execution time: 370_069_000 picoseconds. + Weight::from_parts(375_410_000, 18729) .saturating_add(T::DbWeight::get().reads(47_u64)) .saturating_add(T::DbWeight::get().writes(26_u64)) } @@ -372,8 +372,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `3297` // Estimated: `21612` - // Minimum execution time: 474_686_000 picoseconds. - Weight::from_parts(490_637_000, 21612) + // Minimum execution time: 493_932_000 picoseconds. + Weight::from_parts(499_553_000, 21612) .saturating_add(T::DbWeight::get().reads(34_u64)) .saturating_add(T::DbWeight::get().writes(54_u64)) } @@ -397,8 +397,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1629` // Estimated: `7569` - // Minimum execution time: 101_962_000 picoseconds. - Weight::from_parts(106_371_000, 7569) + // Minimum execution time: 104_376_000 picoseconds. + Weight::from_parts(105_519_000, 7569) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -476,8 +476,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1854` // Estimated: `17694` - // Minimum execution time: 146_978_000 picoseconds. - Weight::from_parts(151_185_000, 17694) + // Minimum execution time: 151_205_000 picoseconds. + Weight::from_parts(153_158_000, 17694) .saturating_add(T::DbWeight::get().reads(24_u64)) .saturating_add(T::DbWeight::get().writes(19_u64)) } @@ -571,8 +571,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1497` // Estimated: `17337` - // Minimum execution time: 211_259_000 picoseconds. - Weight::from_parts(215_388_000, 17337) + // Minimum execution time: 212_812_000 picoseconds. + Weight::from_parts(216_789_000, 17337) .saturating_add(T::DbWeight::get().reads(30_u64)) .saturating_add(T::DbWeight::get().writes(27_u64)) } @@ -598,8 +598,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1576` // Estimated: `14941` - // Minimum execution time: 150_706_000 picoseconds. - Weight::from_parts(153_339_000, 14941) + // Minimum execution time: 151_216_000 picoseconds. + Weight::from_parts(153_059_000, 14941) .saturating_add(RocksDbWeight::get().reads(18_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -621,8 +621,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1660` // Estimated: `15025` - // Minimum execution time: 159_390_000 picoseconds. - Weight::from_parts(162_525_000, 15025) + // Minimum execution time: 160_063_000 picoseconds. + Weight::from_parts(162_045_000, 15025) .saturating_add(RocksDbWeight::get().reads(18_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -644,8 +644,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1792` // Estimated: `27532` - // Minimum execution time: 277_163_000 picoseconds. - Weight::from_parts(281_291_000, 27532) + // Minimum execution time: 282_442_000 picoseconds. + Weight::from_parts(285_408_000, 27532) .saturating_add(RocksDbWeight::get().reads(27_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -667,8 +667,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1930` // Estimated: `27670` - // Minimum execution time: 325_905_000 picoseconds. - Weight::from_parts(330_334_000, 27670) + // Minimum execution time: 332_348_000 picoseconds. + Weight::from_parts(337_758_000, 27670) .saturating_add(RocksDbWeight::get().reads(27_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -690,8 +690,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1876` // Estimated: `27616` - // Minimum execution time: 331_206_000 picoseconds. - Weight::from_parts(349_069_000, 27616) + // Minimum execution time: 327_098_000 picoseconds. + Weight::from_parts(331_797_000, 27616) .saturating_add(RocksDbWeight::get().reads(27_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -701,8 +701,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `77` // Estimated: `8727` - // Minimum execution time: 110_470_000 picoseconds. - Weight::from_parts(112_422_000, 8727) + // Minimum execution time: 118_274_000 picoseconds. + Weight::from_parts(120_186_000, 8727) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -782,8 +782,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2889` // Estimated: `18729` - // Minimum execution time: 363_165_000 picoseconds. - Weight::from_parts(368_075_000, 18729) + // Minimum execution time: 370_069_000 picoseconds. + Weight::from_parts(375_410_000, 18729) .saturating_add(RocksDbWeight::get().reads(47_u64)) .saturating_add(RocksDbWeight::get().writes(26_u64)) } @@ -901,8 +901,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `3297` // Estimated: `21612` - // Minimum execution time: 474_686_000 picoseconds. - Weight::from_parts(490_637_000, 21612) + // Minimum execution time: 493_932_000 picoseconds. + Weight::from_parts(499_553_000, 21612) .saturating_add(RocksDbWeight::get().reads(34_u64)) .saturating_add(RocksDbWeight::get().writes(54_u64)) } @@ -926,8 +926,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1629` // Estimated: `7569` - // Minimum execution time: 101_962_000 picoseconds. - Weight::from_parts(106_371_000, 7569) + // Minimum execution time: 104_376_000 picoseconds. + Weight::from_parts(105_519_000, 7569) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -1005,8 +1005,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1854` // Estimated: `17694` - // Minimum execution time: 146_978_000 picoseconds. - Weight::from_parts(151_185_000, 17694) + // Minimum execution time: 151_205_000 picoseconds. + Weight::from_parts(153_158_000, 17694) .saturating_add(RocksDbWeight::get().reads(24_u64)) .saturating_add(RocksDbWeight::get().writes(19_u64)) } @@ -1100,8 +1100,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1497` // Estimated: `17337` - // Minimum execution time: 211_259_000 picoseconds. - Weight::from_parts(215_388_000, 17337) + // Minimum execution time: 212_812_000 picoseconds. + Weight::from_parts(216_789_000, 17337) .saturating_add(RocksDbWeight::get().reads(30_u64)) .saturating_add(RocksDbWeight::get().writes(27_u64)) } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 6cb9cd92..50fc74a8 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -501,6 +501,7 @@ impl pallet_subnet_emission::Config for Runtime { // Represented in number of blocks, defines how often node sends keep-alive ping type PingInterval = ConstU64<50>; type EncryptionPeriodBuffer = ConstU64<100>; + type WeightInfo = pallet_subnet_emission::weights::SubstrateWeight; } #[cfg(feature = "testnet-faucet")]