diff --git a/pallets/communities/src/benchmarking.rs b/pallets/communities/src/benchmarking.rs index af0d80e8..7ab084d5 100644 --- a/pallets/communities/src/benchmarking.rs +++ b/pallets/communities/src/benchmarking.rs @@ -8,7 +8,7 @@ use self::{ AccountIdOf, CommunityIdOf, DecisionMethodFor, MembershipIdOf, NativeBalanceOf, PalletsOriginOf, PollIndexOf, RuntimeCallFor, Vote, }, - Event, HoldReason, Pallet as Communities, + CommunityDecisionMethod, Event, HoldReason, Pallet as Communities, }; use fc_traits_memberships::{Inspect, Rank}; use frame_benchmarking::v2::*; @@ -56,17 +56,15 @@ fn setup_accounts() -> Result>, BenchmarkError> { fn community_params( maybe_decision_method: Option>, -) -> ( - CommunityIdOf, - DecisionMethodFor, - T::RuntimeOrigin, - PalletsOriginOf, -) { +) -> (CommunityIdOf, DecisionMethodFor, OriginFor, PalletsOriginOf) +where + OriginFor: From>, +{ let community_id = T::BenchmarkHelper::community_id(); let decision_method = maybe_decision_method.unwrap_or(DecisionMethod::Rank); - let admin_origin: T::RuntimeOrigin = T::BenchmarkHelper::community_origin(decision_method.clone()); - let admin_origin_caller: PalletsOriginOf = admin_origin.clone().into_caller(); + let admin_origin: OriginFor = Origin::::new(community_id).into(); + let admin_origin_caller = admin_origin.clone().into_caller(); (community_id, decision_method, admin_origin, admin_origin_caller) } @@ -76,7 +74,10 @@ fn community_params( fn create_community( origin: OriginFor, maybe_decision_method: Option>, -) -> Result<(CommunityIdOf, OriginFor), BenchmarkError> { +) -> Result<(CommunityIdOf, OriginFor), BenchmarkError> +where + OriginFor: From>, +{ T::BenchmarkHelper::initialize_memberships_collection()?; let (community_id, decision_method, admin_origin, admin_origin_caller) = community_params::(maybe_decision_method); @@ -136,6 +137,7 @@ where #[benchmarks( where T: frame_system::Config + crate::Config, + OriginFor: From>, ::RuntimeEvent: From>, MembershipIdOf: From, BlockNumberFor: From @@ -177,9 +179,9 @@ mod benchmarks { #[benchmark] fn set_decision_method() -> Result<(), BenchmarkError> { // setup code - let (id, _, _, admin_origin) = community_params::(Default::default()); + let (id, decision_method, _, admin_origin) = community_params::(None); Communities::::create(RawOrigin::Root.into(), admin_origin, id)?; - crate::pallet::CommunityDecisionMethod::::set(id, DecisionMethod::Rank); + CommunityDecisionMethod::::set(id, decision_method); #[extrinsic_call] _( diff --git a/pallets/communities/src/mock.rs b/pallets/communities/src/mock.rs index 700e5834..75ce82f3 100644 --- a/pallets/communities/src/mock.rs +++ b/pallets/communities/src/mock.rs @@ -297,8 +297,8 @@ type MembershipCollection = ItemOf for CommunityBenchmarkHelper { u8::MAX as u32 } - fn community_origin(decision_method: DecisionMethodFor) -> OriginFor { - let mut origin = Origin::::new(Self::community_id()); - origin.with_decision_method(decision_method); - - origin.into() - } - fn initialize_memberships_collection() -> Result<(), frame_benchmarking::BenchmarkError> { TestEnvBuilder::initialize_memberships_manager_collection()?; TestEnvBuilder::initialize_community_memberships_collection(&Self::community_id())?; @@ -546,7 +539,7 @@ impl TestEnvBuilder { .decision_methods .get(community_id) .expect("should include decision_method on add_community"); - let community_origin: RuntimeOrigin = Self::create_community_origin(community_id, decision_method); + let community_origin: RuntimeOrigin = Self::create_community_origin(community_id); Communities::create(RuntimeOrigin::root(), community_origin.caller().clone(), *community_id) .expect("can add community"); @@ -618,13 +611,7 @@ impl TestEnvBuilder { ) } - pub fn create_community_origin( - community_id: &CommunityId, - decision_method: &DecisionMethod, - ) -> RuntimeOrigin { - let mut origin = pallet_communities::Origin::::new(*community_id); - origin.with_decision_method(decision_method.clone()); - - origin.into() + pub fn create_community_origin(community_id: &CommunityId) -> RuntimeOrigin { + pallet_communities::Origin::::new(*community_id).into() } } diff --git a/pallets/communities/src/origin.rs b/pallets/communities/src/origin.rs index 536de1ab..8acc1447 100644 --- a/pallets/communities/src/origin.rs +++ b/pallets/communities/src/origin.rs @@ -1,5 +1,5 @@ use crate::{ - types::{AssetIdOf, CommunityIdOf, CommunityState::Active, MembershipIdOf}, + types::{CommunityIdOf, CommunityState::Active, MembershipIdOf}, CommunityIdFor, Config, Info, Pallet, }; use core::marker::PhantomData; @@ -78,7 +78,6 @@ where #[derive(TypeInfo, Encode, Decode, MaxEncodedLen, Clone, Eq, PartialEq, Debug)] pub struct RawOrigin { community_id: CommunityIdOf, - method: DecisionMethod>, subset: Option>, } @@ -86,7 +85,6 @@ impl RawOrigin { pub const fn new(community_id: CommunityIdOf) -> Self { RawOrigin { community_id, - method: DecisionMethod::Membership, subset: None, } } @@ -95,17 +93,9 @@ impl RawOrigin { self.subset = Some(s); } - pub fn with_decision_method(&mut self, m: DecisionMethod>) { - self.method = m; - } - pub fn id(&self) -> CommunityIdOf { self.community_id } - - pub fn decision_method(&self) -> DecisionMethod> { - self.method.clone() - } } /// Subsets of the community can also have a voice diff --git a/pallets/communities/src/tests/governance.rs b/pallets/communities/src/tests/governance.rs index 9462acee..55608b45 100644 --- a/pallets/communities/src/tests/governance.rs +++ b/pallets/communities/src/tests/governance.rs @@ -45,13 +45,13 @@ const CHARLIE: AccountId = AccountId::new([3; 32]); parameter_types! { pub OriginForCommunityA: Box = - Box::new(TestEnvBuilder::create_community_origin(&COMMUNITY_A, &DecisionMethod::Membership).caller().clone()); + Box::new(TestEnvBuilder::create_community_origin(&COMMUNITY_A).caller().clone()); pub OriginForCommunityB: Box = - Box::new(TestEnvBuilder::create_community_origin(&COMMUNITY_B, &DecisionMethod::CommunityAsset(COMMUNITY_B_ASSET_ID)).caller().clone()); + Box::new(TestEnvBuilder::create_community_origin(&COMMUNITY_B).caller().clone()); pub OriginForCommunityC: Box = - Box::new(TestEnvBuilder::create_community_origin(&COMMUNITY_C, &DecisionMethod::NativeToken).caller().clone()); + Box::new(TestEnvBuilder::create_community_origin(&COMMUNITY_C).caller().clone()); pub OriginForCommunityD: Box = - Box::new(TestEnvBuilder::create_community_origin(&COMMUNITY_D, &DecisionMethod::Rank).caller().clone()); + Box::new(TestEnvBuilder::create_community_origin(&COMMUNITY_D).caller().clone()); pub CommunityTrack: TrackInfoOf = TrackInfo { name: s("Community"), diff --git a/pallets/communities/src/types.rs b/pallets/communities/src/types.rs index d6221c9c..07755b1e 100644 --- a/pallets/communities/src/types.rs +++ b/pallets/communities/src/types.rs @@ -163,10 +163,6 @@ pub trait BenchmarkHelper { /// effects of benchmark testing fn community_desired_size() -> u32; - /// Returns the origin for the community - /// as well as the caller - fn community_origin(decision_method: DecisionMethodFor) -> OriginFor; - /// Initializes the membership collection of a community. fn initialize_memberships_collection() -> Result<(), frame_benchmarking::BenchmarkError>; diff --git a/pallets/communities/src/weights.rs b/pallets/communities/src/weights.rs index 994cf91d..e764a82e 100644 --- a/pallets/communities/src/weights.rs +++ b/pallets/communities/src/weights.rs @@ -59,8 +59,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `56` // Estimated: `3593` - // Minimum execution time: 55_549_000 picoseconds. - Weight::from_parts(56_676_000, 0) + // Minimum execution time: 39_126_000 picoseconds. + Weight::from_parts(46_625_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -70,15 +70,17 @@ impl WeightInfo for SubstrateWeight { /// The range of component `n` is `[1, 64]`. /// The range of component `d` is `[1, 256]`. /// The range of component `u` is `[1, 256]`. - fn set_metadata(_n: u32, d: u32, _u: u32, ) -> Weight { + fn set_metadata(_n: u32, d: u32, u: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `75` // Estimated: `4065` - // Minimum execution time: 22_518_000 picoseconds. - Weight::from_parts(34_920_208, 0) + // Minimum execution time: 23_340_000 picoseconds. + Weight::from_parts(37_081_339, 0) .saturating_add(Weight::from_parts(0, 4065)) - // Standard Error: 789 - .saturating_add(Weight::from_parts(1_595, 0).saturating_mul(d.into())) + // Standard Error: 1_334 + .saturating_add(Weight::from_parts(4_526, 0).saturating_mul(d.into())) + // Standard Error: 1_334 + .saturating_add(Weight::from_parts(2_575, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -88,8 +90,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 21_329_000 picoseconds. - Weight::from_parts(22_468_000, 0) + // Minimum execution time: 17_407_000 picoseconds. + Weight::from_parts(26_505_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -121,8 +123,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1123` // Estimated: `9846` - // Minimum execution time: 437_134_000 picoseconds. - Weight::from_parts(447_852_000, 0) + // Minimum execution time: 446_737_000 picoseconds. + Weight::from_parts(472_105_000, 0) .saturating_add(Weight::from_parts(0, 9846)) .saturating_add(T::DbWeight::get().reads(15)) .saturating_add(T::DbWeight::get().writes(15)) @@ -153,8 +155,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1146` // Estimated: `9846` - // Minimum execution time: 423_215_000 picoseconds. - Weight::from_parts(438_281_000, 0) + // Minimum execution time: 286_361_000 picoseconds. + Weight::from_parts(479_050_000, 0) .saturating_add(Weight::from_parts(0, 9846)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(10)) @@ -169,8 +171,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `717` // Estimated: `6894` - // Minimum execution time: 208_110_000 picoseconds. - Weight::from_parts(212_825_000, 0) + // Minimum execution time: 136_612_000 picoseconds. + Weight::from_parts(161_764_000, 0) .saturating_add(Weight::from_parts(0, 6894)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -185,8 +187,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `717` // Estimated: `6894` - // Minimum execution time: 207_928_000 picoseconds. - Weight::from_parts(218_116_000, 0) + // Minimum execution time: 136_647_000 picoseconds. + Weight::from_parts(175_816_000, 0) .saturating_add(Weight::from_parts(0, 6894)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -205,10 +207,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`) fn vote() -> Weight { // Proof Size summary in bytes: - // Measured: `2892` + // Measured: `2891` // Estimated: `317568` - // Minimum execution time: 213_100_000 picoseconds. - Weight::from_parts(268_914_000, 0) + // Minimum execution time: 229_153_000 picoseconds. + Weight::from_parts(308_906_000, 0) .saturating_add(Weight::from_parts(0, 317568)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) @@ -225,10 +227,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) fn remove_vote() -> Weight { // Proof Size summary in bytes: - // Measured: `2894` + // Measured: `2893` // Estimated: `4365` - // Minimum execution time: 176_517_000 picoseconds. - Weight::from_parts(220_787_000, 0) + // Minimum execution time: 166_028_000 picoseconds. + Weight::from_parts(219_123_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -247,8 +249,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1046` // Estimated: `9147` - // Minimum execution time: 128_897_000 picoseconds. - Weight::from_parts(170_404_000, 0) + // Minimum execution time: 122_533_000 picoseconds. + Weight::from_parts(173_769_000, 0) .saturating_add(Weight::from_parts(0, 9147)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -259,8 +261,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `115` // Estimated: `3484` - // Minimum execution time: 36_477_000 picoseconds. - Weight::from_parts(48_974_000, 0) + // Minimum execution time: 31_529_000 picoseconds. + Weight::from_parts(33_449_000, 0) .saturating_add(Weight::from_parts(0, 3484)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -278,8 +280,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `56` // Estimated: `3593` - // Minimum execution time: 55_549_000 picoseconds. - Weight::from_parts(56_676_000, 0) + // Minimum execution time: 39_126_000 picoseconds. + Weight::from_parts(46_625_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(RocksDbWeight::get().reads(2)) .saturating_add(RocksDbWeight::get().writes(3)) @@ -289,15 +291,17 @@ impl WeightInfo for () { /// The range of component `n` is `[1, 64]`. /// The range of component `d` is `[1, 256]`. /// The range of component `u` is `[1, 256]`. - fn set_metadata(_n: u32, d: u32, _u: u32, ) -> Weight { + fn set_metadata(_n: u32, d: u32, u: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `75` // Estimated: `4065` - // Minimum execution time: 22_518_000 picoseconds. - Weight::from_parts(34_920_208, 0) + // Minimum execution time: 23_340_000 picoseconds. + Weight::from_parts(37_081_339, 0) .saturating_add(Weight::from_parts(0, 4065)) - // Standard Error: 789 - .saturating_add(Weight::from_parts(1_595, 0).saturating_mul(d.into())) + // Standard Error: 1_334 + .saturating_add(Weight::from_parts(4_526, 0).saturating_mul(d.into())) + // Standard Error: 1_334 + .saturating_add(Weight::from_parts(2_575, 0).saturating_mul(u.into())) .saturating_add(RocksDbWeight::get().reads(1)) .saturating_add(RocksDbWeight::get().writes(1)) } @@ -307,8 +311,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 21_329_000 picoseconds. - Weight::from_parts(22_468_000, 0) + // Minimum execution time: 17_407_000 picoseconds. + Weight::from_parts(26_505_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(RocksDbWeight::get().writes(1)) } @@ -340,8 +344,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1123` // Estimated: `9846` - // Minimum execution time: 437_134_000 picoseconds. - Weight::from_parts(447_852_000, 0) + // Minimum execution time: 446_737_000 picoseconds. + Weight::from_parts(472_105_000, 0) .saturating_add(Weight::from_parts(0, 9846)) .saturating_add(RocksDbWeight::get().reads(15)) .saturating_add(RocksDbWeight::get().writes(15)) @@ -372,8 +376,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1146` // Estimated: `9846` - // Minimum execution time: 423_215_000 picoseconds. - Weight::from_parts(438_281_000, 0) + // Minimum execution time: 286_361_000 picoseconds. + Weight::from_parts(479_050_000, 0) .saturating_add(Weight::from_parts(0, 9846)) .saturating_add(RocksDbWeight::get().reads(10)) .saturating_add(RocksDbWeight::get().writes(10)) @@ -388,8 +392,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `717` // Estimated: `6894` - // Minimum execution time: 208_110_000 picoseconds. - Weight::from_parts(212_825_000, 0) + // Minimum execution time: 136_612_000 picoseconds. + Weight::from_parts(161_764_000, 0) .saturating_add(Weight::from_parts(0, 6894)) .saturating_add(RocksDbWeight::get().reads(4)) .saturating_add(RocksDbWeight::get().writes(3)) @@ -404,8 +408,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `717` // Estimated: `6894` - // Minimum execution time: 207_928_000 picoseconds. - Weight::from_parts(218_116_000, 0) + // Minimum execution time: 136_647_000 picoseconds. + Weight::from_parts(175_816_000, 0) .saturating_add(Weight::from_parts(0, 6894)) .saturating_add(RocksDbWeight::get().reads(4)) .saturating_add(RocksDbWeight::get().writes(3)) @@ -424,10 +428,10 @@ impl WeightInfo for () { /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`) fn vote() -> Weight { // Proof Size summary in bytes: - // Measured: `2892` + // Measured: `2891` // Estimated: `317568` - // Minimum execution time: 213_100_000 picoseconds. - Weight::from_parts(268_914_000, 0) + // Minimum execution time: 229_153_000 picoseconds. + Weight::from_parts(308_906_000, 0) .saturating_add(Weight::from_parts(0, 317568)) .saturating_add(RocksDbWeight::get().reads(7)) .saturating_add(RocksDbWeight::get().writes(4)) @@ -444,10 +448,10 @@ impl WeightInfo for () { /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) fn remove_vote() -> Weight { // Proof Size summary in bytes: - // Measured: `2894` + // Measured: `2893` // Estimated: `4365` - // Minimum execution time: 176_517_000 picoseconds. - Weight::from_parts(220_787_000, 0) + // Minimum execution time: 166_028_000 picoseconds. + Weight::from_parts(219_123_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(RocksDbWeight::get().reads(5)) .saturating_add(RocksDbWeight::get().writes(2)) @@ -466,8 +470,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1046` // Estimated: `9147` - // Minimum execution time: 128_897_000 picoseconds. - Weight::from_parts(170_404_000, 0) + // Minimum execution time: 122_533_000 picoseconds. + Weight::from_parts(173_769_000, 0) .saturating_add(Weight::from_parts(0, 9147)) .saturating_add(RocksDbWeight::get().reads(5)) .saturating_add(RocksDbWeight::get().writes(3)) @@ -478,8 +482,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `115` // Estimated: `3484` - // Minimum execution time: 36_477_000 picoseconds. - Weight::from_parts(48_974_000, 0) + // Minimum execution time: 31_529_000 picoseconds. + Weight::from_parts(33_449_000, 0) .saturating_add(Weight::from_parts(0, 3484)) .saturating_add(RocksDbWeight::get().reads(1)) } diff --git a/runtime/kreivo/src/communities/mod.rs b/runtime/kreivo/src/communities/mod.rs index be4d0693..b06e4613 100644 --- a/runtime/kreivo/src/communities/mod.rs +++ b/runtime/kreivo/src/communities/mod.rs @@ -23,7 +23,7 @@ use ::{ frame_support::traits::{schedule::DispatchTime, tokens::nonfungible_v2::ItemOf, tokens::nonfungible_v2::Mutate}, frame_system::pallet_prelude::{OriginFor, RuntimeCallFor}, pallet_communities::{ - types::{CommunityIdOf, DecisionMethodFor, MembershipIdOf, PalletsOriginOf, PollIndexOf}, + types::{CommunityIdOf, MembershipIdOf, PalletsOriginOf, PollIndexOf}, BenchmarkHelper, Origin, }, pallet_nfts::Pallet as Nfts, @@ -105,12 +105,6 @@ impl BenchmarkHelper for CommunityBenchmarkHelper { fn community_desired_size() -> u32 { u8::MAX.into() } - fn community_origin(decision_method: DecisionMethodFor) -> OriginFor { - let mut origin = Origin::::new(Self::community_id()); - origin.with_decision_method(decision_method.clone()); - origin.into() - } - fn initialize_memberships_collection() -> Result<(), BenchmarkError> { let collection = MembershipsCollectionId::get(); Nfts::::do_create_collection( diff --git a/runtime/kreivo/src/weights/pallet_burner.rs b/runtime/kreivo/src/weights/pallet_burner.rs index 89bd9530..93834125 100644 --- a/runtime/kreivo/src/weights/pallet_burner.rs +++ b/runtime/kreivo/src/weights/pallet_burner.rs @@ -39,8 +39,8 @@ impl pallet_burner::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 58_843_000 picoseconds. - Weight::from_parts(61_533_000, 0) + // Minimum execution time: 48_818_000 picoseconds. + Weight::from_parts(53_460_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/runtime/kreivo/src/weights/pallet_communities.rs b/runtime/kreivo/src/weights/pallet_communities.rs index e968c14c..1de048e6 100644 --- a/runtime/kreivo/src/weights/pallet_communities.rs +++ b/runtime/kreivo/src/weights/pallet_communities.rs @@ -45,8 +45,8 @@ impl pallet_communities::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `56` // Estimated: `3593` - // Minimum execution time: 55_549_000 picoseconds. - Weight::from_parts(56_676_000, 0) + // Minimum execution time: 39_126_000 picoseconds. + Weight::from_parts(46_625_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -56,15 +56,17 @@ impl pallet_communities::WeightInfo for WeightInfo { /// The range of component `n` is `[1, 64]`. /// The range of component `d` is `[1, 256]`. /// The range of component `u` is `[1, 256]`. - fn set_metadata(_n: u32, d: u32, _u: u32, ) -> Weight { + fn set_metadata(_n: u32, d: u32, u: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `75` // Estimated: `4065` - // Minimum execution time: 22_518_000 picoseconds. - Weight::from_parts(34_920_208, 0) + // Minimum execution time: 23_340_000 picoseconds. + Weight::from_parts(37_081_339, 0) .saturating_add(Weight::from_parts(0, 4065)) - // Standard Error: 789 - .saturating_add(Weight::from_parts(1_595, 0).saturating_mul(d.into())) + // Standard Error: 1_334 + .saturating_add(Weight::from_parts(4_526, 0).saturating_mul(d.into())) + // Standard Error: 1_334 + .saturating_add(Weight::from_parts(2_575, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -74,8 +76,8 @@ impl pallet_communities::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 21_329_000 picoseconds. - Weight::from_parts(22_468_000, 0) + // Minimum execution time: 17_407_000 picoseconds. + Weight::from_parts(26_505_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -107,8 +109,8 @@ impl pallet_communities::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1123` // Estimated: `9846` - // Minimum execution time: 437_134_000 picoseconds. - Weight::from_parts(447_852_000, 0) + // Minimum execution time: 446_737_000 picoseconds. + Weight::from_parts(472_105_000, 0) .saturating_add(Weight::from_parts(0, 9846)) .saturating_add(T::DbWeight::get().reads(15)) .saturating_add(T::DbWeight::get().writes(15)) @@ -139,8 +141,8 @@ impl pallet_communities::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1146` // Estimated: `9846` - // Minimum execution time: 423_215_000 picoseconds. - Weight::from_parts(438_281_000, 0) + // Minimum execution time: 286_361_000 picoseconds. + Weight::from_parts(479_050_000, 0) .saturating_add(Weight::from_parts(0, 9846)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(10)) @@ -155,8 +157,8 @@ impl pallet_communities::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `717` // Estimated: `6894` - // Minimum execution time: 208_110_000 picoseconds. - Weight::from_parts(212_825_000, 0) + // Minimum execution time: 136_612_000 picoseconds. + Weight::from_parts(161_764_000, 0) .saturating_add(Weight::from_parts(0, 6894)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -171,8 +173,8 @@ impl pallet_communities::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `717` // Estimated: `6894` - // Minimum execution time: 207_928_000 picoseconds. - Weight::from_parts(218_116_000, 0) + // Minimum execution time: 136_647_000 picoseconds. + Weight::from_parts(175_816_000, 0) .saturating_add(Weight::from_parts(0, 6894)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -191,10 +193,10 @@ impl pallet_communities::WeightInfo for WeightInfo { /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`) fn vote() -> Weight { // Proof Size summary in bytes: - // Measured: `2892` + // Measured: `2891` // Estimated: `317568` - // Minimum execution time: 213_100_000 picoseconds. - Weight::from_parts(268_914_000, 0) + // Minimum execution time: 229_153_000 picoseconds. + Weight::from_parts(308_906_000, 0) .saturating_add(Weight::from_parts(0, 317568)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) @@ -211,10 +213,10 @@ impl pallet_communities::WeightInfo for WeightInfo { /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) fn remove_vote() -> Weight { // Proof Size summary in bytes: - // Measured: `2894` + // Measured: `2893` // Estimated: `4365` - // Minimum execution time: 176_517_000 picoseconds. - Weight::from_parts(220_787_000, 0) + // Minimum execution time: 166_028_000 picoseconds. + Weight::from_parts(219_123_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -233,8 +235,8 @@ impl pallet_communities::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1046` // Estimated: `9147` - // Minimum execution time: 128_897_000 picoseconds. - Weight::from_parts(170_404_000, 0) + // Minimum execution time: 122_533_000 picoseconds. + Weight::from_parts(173_769_000, 0) .saturating_add(Weight::from_parts(0, 9147)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -245,8 +247,8 @@ impl pallet_communities::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `115` // Estimated: `3484` - // Minimum execution time: 36_477_000 picoseconds. - Weight::from_parts(48_974_000, 0) + // Minimum execution time: 31_529_000 picoseconds. + Weight::from_parts(33_449_000, 0) .saturating_add(Weight::from_parts(0, 3484)) .saturating_add(T::DbWeight::get().reads(1)) } diff --git a/runtime/kreivo/src/weights/pallet_payments.rs b/runtime/kreivo/src/weights/pallet_payments.rs index 475fd4c5..212745f4 100644 --- a/runtime/kreivo/src/weights/pallet_payments.rs +++ b/runtime/kreivo/src/weights/pallet_payments.rs @@ -50,8 +50,8 @@ impl pallet_payments::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `510` // Estimated: `8517` - // Minimum execution time: 155_153_000 picoseconds. - Weight::from_parts(205_242_584, 0) + // Minimum execution time: 161_437_000 picoseconds. + Weight::from_parts(243_625_056, 0) .saturating_add(Weight::from_parts(0, 8517)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) @@ -70,8 +70,8 @@ impl pallet_payments::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1119` // Estimated: `8856` - // Minimum execution time: 256_380_000 picoseconds. - Weight::from_parts(293_341_000, 0) + // Minimum execution time: 263_269_000 picoseconds. + Weight::from_parts(336_806_000, 0) .saturating_add(Weight::from_parts(0, 8856)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(8)) @@ -90,8 +90,8 @@ impl pallet_payments::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1086` // Estimated: `8517` - // Minimum execution time: 197_679_000 picoseconds. - Weight::from_parts(267_826_000, 0) + // Minimum execution time: 204_349_000 picoseconds. + Weight::from_parts(254_506_000, 0) .saturating_add(Weight::from_parts(0, 8517)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(7)) @@ -106,8 +106,8 @@ impl pallet_payments::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `343` // Estimated: `159279` - // Minimum execution time: 56_205_000 picoseconds. - Weight::from_parts(64_958_000, 0) + // Minimum execution time: 59_774_000 picoseconds. + Weight::from_parts(68_590_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -130,8 +130,8 @@ impl pallet_payments::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1187` // Estimated: `159279` - // Minimum execution time: 140_389_000 picoseconds. - Weight::from_parts(166_468_000, 0) + // Minimum execution time: 144_132_000 picoseconds. + Weight::from_parts(164_914_000, 0) .saturating_add(Weight::from_parts(0, 159279)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(6)) @@ -152,8 +152,8 @@ impl pallet_payments::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1189` // Estimated: `8856` - // Minimum execution time: 370_958_000 picoseconds. - Weight::from_parts(405_768_000, 0) + // Minimum execution time: 371_278_000 picoseconds. + Weight::from_parts(422_852_000, 0) .saturating_add(Weight::from_parts(0, 8856)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(8)) @@ -168,8 +168,8 @@ impl pallet_payments::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `357` // Estimated: `8517` - // Minimum execution time: 39_779_000 picoseconds. - Weight::from_parts(44_499_000, 0) + // Minimum execution time: 41_756_000 picoseconds. + Weight::from_parts(60_208_000, 0) .saturating_add(Weight::from_parts(0, 8517)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -188,8 +188,8 @@ impl pallet_payments::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `980` // Estimated: `8856` - // Minimum execution time: 227_669_000 picoseconds. - Weight::from_parts(254_716_000, 0) + // Minimum execution time: 333_981_000 picoseconds. + Weight::from_parts(364_695_000, 0) .saturating_add(Weight::from_parts(0, 8856)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(6))