diff --git a/Cargo.lock b/Cargo.lock index 14cffed1..acf97c66 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4678,7 +4678,7 @@ checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" [[package]] name = "kreivo-runtime" -version = "0.8.1" +version = "0.9.0" dependencies = [ "assets-common", "cumulus-pallet-aura-ext", @@ -13791,7 +13791,7 @@ dependencies = [ [[package]] name = "virto-node" -version = "0.8.1" +version = "0.9.0" dependencies = [ "assert_cmd", "async-trait", diff --git a/node/Cargo.toml b/node/Cargo.toml index 54a5cb22..5c452959 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "virto-node" -version = "0.8.1" +version = "0.9.0" authors = ['Virto Team '] license = "GPL-3.0-only" homepage = 'https://github.com/virto-network/virto-node' diff --git a/pallets/communities/src/benchmarking.rs b/pallets/communities/src/benchmarking.rs index 9efd44c2..af0d80e8 100644 --- a/pallets/communities/src/benchmarking.rs +++ b/pallets/communities/src/benchmarking.rs @@ -6,7 +6,7 @@ use self::{ origin::DecisionMethod, types::{ AccountIdOf, CommunityIdOf, DecisionMethodFor, MembershipIdOf, NativeBalanceOf, PalletsOriginOf, PollIndexOf, - Vote, + RuntimeCallFor, Vote, }, Event, HoldReason, Pallet as Communities, }; @@ -20,11 +20,11 @@ use frame_support::{ BoundedVec, }; use frame_system::{ - pallet_prelude::{BlockNumberFor, OriginFor, RuntimeCallFor}, + pallet_prelude::{BlockNumberFor, OriginFor}, RawOrigin, }; -use sp_runtime::traits::StaticLookup; -use sp_std::{vec, vec::Vec}; +use sp_runtime::traits::{Hash, StaticLookup}; +use sp_std::{boxed::Box, vec, vec::Vec}; fn assert_has_event(generic_event: ::RuntimeEvent) { frame_system::Pallet::::assert_has_event(generic_event.into()); @@ -136,7 +136,7 @@ where #[benchmarks( where T: frame_system::Config + crate::Config, - RuntimeCallFor: From>, + ::RuntimeEvent: From>, MembershipIdOf: From, BlockNumberFor: From )] @@ -407,6 +407,27 @@ mod benchmarks { Ok(()) } + #[benchmark] + fn dispatch_as_account() -> Result<(), BenchmarkError> { + // setup code + let (id, origin) = create_community::(RawOrigin::Root.into(), Some(DecisionMethod::NativeToken))?; + let remark = b"Hello, world".to_vec(); + + #[extrinsic_call] + _( + origin.into_caller(), + Box::new(frame_system::Call::::remark_with_event { remark: remark.clone() }.into()), + ); + + // verification code + let sender = Communities::::community_account(&id); + let hash = ::Hashing::hash(&remark); + + assert_has_event::(frame_system::Event::::Remarked { sender, hash }.into()); + + Ok(()) + } + impl_benchmark_test_suite!( Communities, sp_io::TestExternalities::new(Default::default()), diff --git a/pallets/communities/src/functions.rs b/pallets/communities/src/functions.rs index b0e59162..3f29bbb5 100644 --- a/pallets/communities/src/functions.rs +++ b/pallets/communities/src/functions.rs @@ -2,19 +2,23 @@ use crate::{ origin::DecisionMethod, types::{ AccountIdOf, CommunityIdOf, CommunityInfo, CommunityState, ConstSizedField, MembershipIdOf, PalletsOriginOf, - PollIndexOf, Tally, Vote, VoteOf, VoteWeight, + PollIndexOf, RuntimeCallFor, Tally, Vote, VoteOf, VoteWeight, }, CommunityDecisionMethod, CommunityIdFor, CommunityVotes, Config, Error, HoldReason, Info, Metadata, Pallet, }; use fc_traits_memberships::{GenericRank, Inspect, Rank}; use frame_support::{ + dispatch::PostDispatchInfo, fail, pallet_prelude::*, traits::{ fungible::MutateFreeze as FunMutateFreeze, fungibles::MutateHold as FunsMutateHold, tokens::Precision, Polling, }, }; -use sp_runtime::{traits::AccountIdConversion, TokenError}; +use sp_runtime::{ + traits::{AccountIdConversion, Dispatchable}, + DispatchResultWithInfo, TokenError, +}; use sp_std::vec::Vec; impl Pallet { @@ -189,6 +193,17 @@ impl Pallet { _ => Err(Error::::NoLocksInPlace.into()), } } + + pub(crate) fn do_dispatch_as_community_account( + community_id: &CommunityIdOf, + call: RuntimeCallFor, + ) -> DispatchResultWithInfo { + let community_account = Self::community_account(community_id); + let signer = frame_system::RawOrigin::Signed(community_account); + + let post = call.dispatch(signer.into()).map_err(|e| e.error)?; + Ok(post) + } } impl Tally { diff --git a/pallets/communities/src/lib.rs b/pallets/communities/src/lib.rs index 9bcffe3e..6d60810a 100644 --- a/pallets/communities/src/lib.rs +++ b/pallets/communities/src/lib.rs @@ -140,13 +140,15 @@ pub mod pallet { use core::num::NonZeroU8; use fc_traits_memberships::{self as membership, Inspect, Manager, Rank}; use frame_support::{ + dispatch::{DispatchResultWithPostInfo, GetDispatchInfo, PostDispatchInfo}, pallet_prelude::*, - traits::{fungible, fungibles, EnsureOrigin, Polling}, + traits::{fungible, fungibles, EnsureOrigin, IsSubType, Polling}, Blake2_128Concat, Parameter, }; use frame_system::pallet_prelude::{OriginFor, *}; - use sp_runtime::traits::StaticLookup; - use types::{PollIndexOf, *}; + use sp_runtime::traits::{Dispatchable, StaticLookup}; + use sp_std::prelude::Box; + use types::{PollIndexOf, RuntimeCallFor, *}; const ONE: NonZeroU8 = NonZeroU8::MIN; #[pallet::pallet] @@ -192,6 +194,15 @@ pub mod pallet { + fungible::freeze::Inspect + fungible::freeze::Mutate; + /// The overarching call type. + type RuntimeCall: Parameter + + Dispatchable + + GetDispatchInfo + + From> + + From> + + IsSubType> + + IsType<::RuntimeCall>; + /// The overarching hold reason. type RuntimeHoldReason: From; @@ -499,5 +510,19 @@ pub mod pallet { Self::do_unlock_for_vote(&who, &poll_index, &vote) } + + /// Dispatch a callable as the community account + #[pallet::call_index(11)] + #[pallet::weight({ + let di = call.get_dispatch_info(); + let weight = T::WeightInfo::dispatch_as_account() + .saturating_add(T::DbWeight::get().reads_writes(1, 1)) + .saturating_add(di.weight); + (weight, di.class) + })] + pub fn dispatch_as_account(origin: OriginFor, call: Box>) -> DispatchResultWithPostInfo { + let community_id = T::MemberMgmtOrigin::ensure_origin(origin)?; + Self::do_dispatch_as_community_account(&community_id, *call) + } } } diff --git a/pallets/communities/src/mock.rs b/pallets/communities/src/mock.rs index f616a86a..700e5834 100644 --- a/pallets/communities/src/mock.rs +++ b/pallets/communities/src/mock.rs @@ -426,6 +426,7 @@ impl pallet_communities::Config for Test { type CommunityMgmtOrigin = EnsureRoot; type MemberMgmtOrigin = EnsureCommunity; + type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = WeightInfo; diff --git a/pallets/communities/src/tests/weights.rs b/pallets/communities/src/tests/weights.rs index eb5af141..ed35d32f 100644 --- a/pallets/communities/src/tests/weights.rs +++ b/pallets/communities/src/tests/weights.rs @@ -33,6 +33,7 @@ fn weights() { ("vote", SubstrateWeight::::vote()), ("remove_vote", SubstrateWeight::::remove_vote()), ("unlock", SubstrateWeight::::unlock()), + ("dispatch_as_account", SubstrateWeight::::dispatch_as_account()), ] { println!("{function}: {weight:?}",); println!( diff --git a/pallets/communities/src/types.rs b/pallets/communities/src/types.rs index f0411384..d6221c9c 100644 --- a/pallets/communities/src/types.rs +++ b/pallets/communities/src/types.rs @@ -22,6 +22,7 @@ pub type AccountIdLookupOf = <::Lookup as StaticLo pub type PalletsOriginOf = <::RuntimeOrigin as frame_support::traits::OriginTrait>::PalletsOrigin; pub type MembershipIdOf = ::MembershipId; +pub type RuntimeCallFor = ::RuntimeCall; pub type SizedField = BoundedVec; pub type ConstSizedField = SizedField>; @@ -148,10 +149,7 @@ impl Tally { } #[cfg(feature = "runtime-benchmarks")] -use { - frame_benchmarking::BenchmarkError, - frame_system::pallet_prelude::{OriginFor, RuntimeCallFor}, -}; +use {frame_benchmarking::BenchmarkError, frame_system::pallet_prelude::OriginFor}; #[cfg(feature = "runtime-benchmarks")] pub trait BenchmarkHelper { diff --git a/pallets/communities/src/weights.rs b/pallets/communities/src/weights.rs index d2fbfec5..994cf91d 100644 --- a/pallets/communities/src/weights.rs +++ b/pallets/communities/src/weights.rs @@ -1,9 +1,8 @@ - //! Autogenerated weights for `pallet_communities` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-04-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `virto-builder`, CPU: `Intel(R) Xeon(R) Silver 4216 CPU @ 2.10GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("kreivo-local")`, DB CACHE: 1024 @@ -44,6 +43,7 @@ pub trait WeightInfo { fn vote() -> Weight; fn remove_vote() -> Weight; fn unlock() -> Weight; + fn dispatch_as_account() -> Weight; } /// Weights for pallet_communities using the Substrate node and recommended hardware. @@ -59,8 +59,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `56` // Estimated: `3593` - // Minimum execution time: 55_066_000 picoseconds. - Weight::from_parts(57_633_000, 0) + // Minimum execution time: 55_549_000 picoseconds. + Weight::from_parts(56_676_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -74,11 +74,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `75` // Estimated: `4065` - // Minimum execution time: 22_674_000 picoseconds. - Weight::from_parts(37_944_303, 0) + // Minimum execution time: 22_518_000 picoseconds. + Weight::from_parts(34_920_208, 0) .saturating_add(Weight::from_parts(0, 4065)) - // Standard Error: 2_160 - .saturating_add(Weight::from_parts(8_887, 0).saturating_mul(d.into())) + // Standard Error: 789 + .saturating_add(Weight::from_parts(1_595, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -88,145 +88,133 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 21_543_000 picoseconds. - Weight::from_parts(23_007_000, 0) + // Minimum execution time: 21_329_000 picoseconds. + Weight::from_parts(22_468_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Communities::Info` (r:1 w:0) /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Account` (r:1 w:2) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:3 w:1) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:3 w:2) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemConfigOf` (r:2 w:2) - /// Proof: `CommunityMemberships::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemConfigOf` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Collection` (r:2 w:2) /// Proof: `CommunityMemberships::Collection` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Item` (r:2 w:2) - /// Proof: `CommunityMemberships::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Item` (`max_values`: None, `max_size`: Some(859), added: 3334, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemMetadataOf` (r:1 w:0) - /// Proof: `CommunityMemberships::ItemMetadataOf` (`max_values`: None, `max_size`: Some(347), added: 2822, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemMetadataOf` (`max_values`: None, `max_size`: Some(345), added: 2820, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::CollectionConfigOf` (r:1 w:0) /// Proof: `CommunityMemberships::CollectionConfigOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`) - /// Storage: `Communities::CommunityRanksSum` (r:1 w:1) - /// Proof: `Communities::CommunityRanksSum` (`max_values`: None, `max_size`: Some(22), added: 2497, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemPriceOf` (r:0 w:1) - /// Proof: `CommunityMemberships::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemPriceOf` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemAttributesApprovalsOf` (r:0 w:1) - /// Proof: `CommunityMemberships::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(1001), added: 3476, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(999), added: 3474, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::PendingSwapOf` (r:0 w:1) - /// Proof: `CommunityMemberships::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::PendingSwapOf` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) fn add_member() -> Weight { // Proof Size summary in bytes: - // Measured: `1129` - // Estimated: `9852` - // Minimum execution time: 399_514_000 picoseconds. - Weight::from_parts(421_451_000, 0) - .saturating_add(Weight::from_parts(0, 9852)) - .saturating_add(T::DbWeight::get().reads(16)) + // Measured: `1123` + // Estimated: `9846` + // Minimum execution time: 437_134_000 picoseconds. + Weight::from_parts(447_852_000, 0) + .saturating_add(Weight::from_parts(0, 9846)) + .saturating_add(T::DbWeight::get().reads(15)) .saturating_add(T::DbWeight::get().writes(15)) } /// Storage: `Communities::Info` (r:1 w:0) /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Account` (r:1 w:1) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) - /// Storage: `Communities::CommunityRanksSum` (r:1 w:1) - /// Proof: `Communities::CommunityRanksSum` (`max_values`: None, `max_size`: Some(22), added: 2497, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:3 w:1) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::ItemConfigOf` (r:1 w:1) - /// Proof: `CommunityMemberships::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:3 w:2) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Collection` (r:1 w:1) /// Proof: `CommunityMemberships::Collection` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::ItemConfigOf` (r:1 w:1) + /// Proof: `CommunityMemberships::ItemConfigOf` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Item` (r:1 w:1) - /// Proof: `CommunityMemberships::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Item` (`max_values`: None, `max_size`: Some(859), added: 3334, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemMetadataOf` (r:1 w:0) - /// Proof: `CommunityMemberships::ItemMetadataOf` (`max_values`: None, `max_size`: Some(347), added: 2822, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemMetadataOf` (`max_values`: None, `max_size`: Some(345), added: 2820, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemPriceOf` (r:0 w:1) - /// Proof: `CommunityMemberships::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemPriceOf` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemAttributesApprovalsOf` (r:0 w:1) - /// Proof: `CommunityMemberships::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(1001), added: 3476, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(999), added: 3474, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::PendingSwapOf` (r:0 w:1) - /// Proof: `CommunityMemberships::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::PendingSwapOf` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) fn remove_member() -> Weight { // Proof Size summary in bytes: - // Measured: `1086` - // Estimated: `9852` - // Minimum execution time: 297_243_000 picoseconds. - Weight::from_parts(302_455_000, 0) - .saturating_add(Weight::from_parts(0, 9852)) - .saturating_add(T::DbWeight::get().reads(11)) + // Measured: `1146` + // Estimated: `9846` + // Minimum execution time: 423_215_000 picoseconds. + Weight::from_parts(438_281_000, 0) + .saturating_add(Weight::from_parts(0, 9846)) + .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(10)) } /// Storage: `Communities::Info` (r:1 w:0) /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Account` (r:1 w:0) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) - /// Storage: `Communities::CommunityRanksSum` (r:1 w:1) - /// Proof: `Communities::CommunityRanksSum` (`max_values`: None, `max_size`: Some(22), added: 2497, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:1 w:1) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:2 w:2) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Collection` (r:1 w:1) /// Proof: `CommunityMemberships::Collection` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) fn promote() -> Weight { // Proof Size summary in bytes: - // Measured: `799` - // Estimated: `3944` - // Minimum execution time: 135_659_000 picoseconds. - Weight::from_parts(141_620_000, 0) - .saturating_add(Weight::from_parts(0, 3944)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `717` + // Estimated: `6894` + // Minimum execution time: 208_110_000 picoseconds. + Weight::from_parts(212_825_000, 0) + .saturating_add(Weight::from_parts(0, 6894)) + .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `Communities::Info` (r:1 w:0) /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Account` (r:1 w:0) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) - /// Storage: `Communities::CommunityRanksSum` (r:1 w:1) - /// Proof: `Communities::CommunityRanksSum` (`max_values`: None, `max_size`: Some(22), added: 2497, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:1 w:1) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:2 w:2) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Collection` (r:1 w:1) /// Proof: `CommunityMemberships::Collection` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) fn demote() -> Weight { // Proof Size summary in bytes: - // Measured: `841` - // Estimated: `3944` - // Minimum execution time: 141_099_000 picoseconds. - Weight::from_parts(154_144_000, 0) - .saturating_add(Weight::from_parts(0, 3944)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `717` + // Estimated: `6894` + // Minimum execution time: 207_928_000 picoseconds. + Weight::from_parts(218_116_000, 0) + .saturating_add(Weight::from_parts(0, 6894)) + .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `CommunityMemberships::Account` (r:1 w:0) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) /// Storage: `CommunityReferenda::ReferendumInfoFor` (r:1 w:1) /// Proof: `CommunityReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`) /// Storage: `Communities::CommunityDecisionMethod` (r:1 w:0) /// Proof: `Communities::CommunityDecisionMethod` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:1 w:0) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `Communities::CommunityVotes` (r:1 w:1) /// Proof: `Communities::CommunityVotes` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:1 w:0) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) /// Storage: `Scheduler::Agenda` (r:2 w:2) /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`) fn vote() -> Weight { // Proof Size summary in bytes: - // Measured: `2796` + // Measured: `2892` // Estimated: `317568` - // Minimum execution time: 217_945_000 picoseconds. - Weight::from_parts(301_813_000, 0) + // Minimum execution time: 213_100_000 picoseconds. + Weight::from_parts(268_914_000, 0) .saturating_add(Weight::from_parts(0, 317568)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `CommunityMemberships::Account` (r:1 w:0) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) /// Storage: `CommunityReferenda::ReferendumInfoFor` (r:1 w:1) /// Proof: `CommunityReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`) /// Storage: `Communities::CommunityVotes` (r:1 w:1) @@ -234,13 +222,13 @@ impl WeightInfo for SubstrateWeight { /// Storage: `Communities::CommunityDecisionMethod` (r:1 w:0) /// Proof: `Communities::CommunityDecisionMethod` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Attribute` (r:1 w:0) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) fn remove_vote() -> Weight { // Proof Size summary in bytes: - // Measured: `2798` + // Measured: `2894` // Estimated: `4365` - // Minimum execution time: 168_668_000 picoseconds. - Weight::from_parts(221_558_000, 0) + // Minimum execution time: 176_517_000 picoseconds. + Weight::from_parts(220_787_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -257,14 +245,25 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn unlock() -> Weight { // Proof Size summary in bytes: - // Measured: `1079` + // Measured: `1046` // Estimated: `9147` - // Minimum execution time: 128_764_000 picoseconds. - Weight::from_parts(166_719_000, 0) + // Minimum execution time: 128_897_000 picoseconds. + Weight::from_parts(170_404_000, 0) .saturating_add(Weight::from_parts(0, 9147)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } + /// Storage: `Communities::Info` (r:1 w:0) + /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) + fn dispatch_as_account() -> Weight { + // Proof Size summary in bytes: + // Measured: `115` + // Estimated: `3484` + // Minimum execution time: 36_477_000 picoseconds. + Weight::from_parts(48_974_000, 0) + .saturating_add(Weight::from_parts(0, 3484)) + .saturating_add(T::DbWeight::get().reads(1)) + } } // For backwards compatibility and tests @@ -279,8 +278,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `56` // Estimated: `3593` - // Minimum execution time: 55_066_000 picoseconds. - Weight::from_parts(57_633_000, 0) + // Minimum execution time: 55_549_000 picoseconds. + Weight::from_parts(56_676_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(RocksDbWeight::get().reads(2)) .saturating_add(RocksDbWeight::get().writes(3)) @@ -294,11 +293,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `75` // Estimated: `4065` - // Minimum execution time: 22_674_000 picoseconds. - Weight::from_parts(37_944_303, 0) + // Minimum execution time: 22_518_000 picoseconds. + Weight::from_parts(34_920_208, 0) .saturating_add(Weight::from_parts(0, 4065)) - // Standard Error: 2_160 - .saturating_add(Weight::from_parts(8_887, 0).saturating_mul(d.into())) + // Standard Error: 789 + .saturating_add(Weight::from_parts(1_595, 0).saturating_mul(d.into())) .saturating_add(RocksDbWeight::get().reads(1)) .saturating_add(RocksDbWeight::get().writes(1)) } @@ -308,145 +307,133 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 21_543_000 picoseconds. - Weight::from_parts(23_007_000, 0) + // Minimum execution time: 21_329_000 picoseconds. + Weight::from_parts(22_468_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(RocksDbWeight::get().writes(1)) } /// Storage: `Communities::Info` (r:1 w:0) /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Account` (r:1 w:2) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:3 w:1) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:3 w:2) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemConfigOf` (r:2 w:2) - /// Proof: `CommunityMemberships::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemConfigOf` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Collection` (r:2 w:2) /// Proof: `CommunityMemberships::Collection` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Item` (r:2 w:2) - /// Proof: `CommunityMemberships::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Item` (`max_values`: None, `max_size`: Some(859), added: 3334, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemMetadataOf` (r:1 w:0) - /// Proof: `CommunityMemberships::ItemMetadataOf` (`max_values`: None, `max_size`: Some(347), added: 2822, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemMetadataOf` (`max_values`: None, `max_size`: Some(345), added: 2820, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::CollectionConfigOf` (r:1 w:0) /// Proof: `CommunityMemberships::CollectionConfigOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`) - /// Storage: `Communities::CommunityRanksSum` (r:1 w:1) - /// Proof: `Communities::CommunityRanksSum` (`max_values`: None, `max_size`: Some(22), added: 2497, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemPriceOf` (r:0 w:1) - /// Proof: `CommunityMemberships::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemPriceOf` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemAttributesApprovalsOf` (r:0 w:1) - /// Proof: `CommunityMemberships::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(1001), added: 3476, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(999), added: 3474, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::PendingSwapOf` (r:0 w:1) - /// Proof: `CommunityMemberships::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::PendingSwapOf` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) fn add_member() -> Weight { // Proof Size summary in bytes: - // Measured: `1129` - // Estimated: `9852` - // Minimum execution time: 399_514_000 picoseconds. - Weight::from_parts(421_451_000, 0) - .saturating_add(Weight::from_parts(0, 9852)) - .saturating_add(RocksDbWeight::get().reads(16)) + // Measured: `1123` + // Estimated: `9846` + // Minimum execution time: 437_134_000 picoseconds. + Weight::from_parts(447_852_000, 0) + .saturating_add(Weight::from_parts(0, 9846)) + .saturating_add(RocksDbWeight::get().reads(15)) .saturating_add(RocksDbWeight::get().writes(15)) } /// Storage: `Communities::Info` (r:1 w:0) /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Account` (r:1 w:1) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) - /// Storage: `Communities::CommunityRanksSum` (r:1 w:1) - /// Proof: `Communities::CommunityRanksSum` (`max_values`: None, `max_size`: Some(22), added: 2497, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:3 w:1) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::ItemConfigOf` (r:1 w:1) - /// Proof: `CommunityMemberships::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:3 w:2) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Collection` (r:1 w:1) /// Proof: `CommunityMemberships::Collection` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::ItemConfigOf` (r:1 w:1) + /// Proof: `CommunityMemberships::ItemConfigOf` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Item` (r:1 w:1) - /// Proof: `CommunityMemberships::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Item` (`max_values`: None, `max_size`: Some(859), added: 3334, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemMetadataOf` (r:1 w:0) - /// Proof: `CommunityMemberships::ItemMetadataOf` (`max_values`: None, `max_size`: Some(347), added: 2822, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemMetadataOf` (`max_values`: None, `max_size`: Some(345), added: 2820, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemPriceOf` (r:0 w:1) - /// Proof: `CommunityMemberships::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemPriceOf` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemAttributesApprovalsOf` (r:0 w:1) - /// Proof: `CommunityMemberships::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(1001), added: 3476, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(999), added: 3474, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::PendingSwapOf` (r:0 w:1) - /// Proof: `CommunityMemberships::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::PendingSwapOf` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) fn remove_member() -> Weight { // Proof Size summary in bytes: - // Measured: `1086` - // Estimated: `9852` - // Minimum execution time: 297_243_000 picoseconds. - Weight::from_parts(302_455_000, 0) - .saturating_add(Weight::from_parts(0, 9852)) - .saturating_add(RocksDbWeight::get().reads(11)) + // Measured: `1146` + // Estimated: `9846` + // Minimum execution time: 423_215_000 picoseconds. + Weight::from_parts(438_281_000, 0) + .saturating_add(Weight::from_parts(0, 9846)) + .saturating_add(RocksDbWeight::get().reads(10)) .saturating_add(RocksDbWeight::get().writes(10)) } /// Storage: `Communities::Info` (r:1 w:0) /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Account` (r:1 w:0) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) - /// Storage: `Communities::CommunityRanksSum` (r:1 w:1) - /// Proof: `Communities::CommunityRanksSum` (`max_values`: None, `max_size`: Some(22), added: 2497, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:1 w:1) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:2 w:2) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Collection` (r:1 w:1) /// Proof: `CommunityMemberships::Collection` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) fn promote() -> Weight { // Proof Size summary in bytes: - // Measured: `799` - // Estimated: `3944` - // Minimum execution time: 135_659_000 picoseconds. - Weight::from_parts(141_620_000, 0) - .saturating_add(Weight::from_parts(0, 3944)) - .saturating_add(RocksDbWeight::get().reads(5)) + // Measured: `717` + // Estimated: `6894` + // Minimum execution time: 208_110_000 picoseconds. + Weight::from_parts(212_825_000, 0) + .saturating_add(Weight::from_parts(0, 6894)) + .saturating_add(RocksDbWeight::get().reads(4)) .saturating_add(RocksDbWeight::get().writes(3)) } /// Storage: `Communities::Info` (r:1 w:0) /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Account` (r:1 w:0) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) - /// Storage: `Communities::CommunityRanksSum` (r:1 w:1) - /// Proof: `Communities::CommunityRanksSum` (`max_values`: None, `max_size`: Some(22), added: 2497, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:1 w:1) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:2 w:2) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Collection` (r:1 w:1) /// Proof: `CommunityMemberships::Collection` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) fn demote() -> Weight { // Proof Size summary in bytes: - // Measured: `841` - // Estimated: `3944` - // Minimum execution time: 141_099_000 picoseconds. - Weight::from_parts(154_144_000, 0) - .saturating_add(Weight::from_parts(0, 3944)) - .saturating_add(RocksDbWeight::get().reads(5)) + // Measured: `717` + // Estimated: `6894` + // Minimum execution time: 207_928_000 picoseconds. + Weight::from_parts(218_116_000, 0) + .saturating_add(Weight::from_parts(0, 6894)) + .saturating_add(RocksDbWeight::get().reads(4)) .saturating_add(RocksDbWeight::get().writes(3)) } /// Storage: `CommunityMemberships::Account` (r:1 w:0) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) /// Storage: `CommunityReferenda::ReferendumInfoFor` (r:1 w:1) /// Proof: `CommunityReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`) /// Storage: `Communities::CommunityDecisionMethod` (r:1 w:0) /// Proof: `Communities::CommunityDecisionMethod` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:1 w:0) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `Communities::CommunityVotes` (r:1 w:1) /// Proof: `Communities::CommunityVotes` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:1 w:0) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) /// Storage: `Scheduler::Agenda` (r:2 w:2) /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`) fn vote() -> Weight { // Proof Size summary in bytes: - // Measured: `2796` + // Measured: `2892` // Estimated: `317568` - // Minimum execution time: 217_945_000 picoseconds. - Weight::from_parts(301_813_000, 0) + // Minimum execution time: 213_100_000 picoseconds. + Weight::from_parts(268_914_000, 0) .saturating_add(Weight::from_parts(0, 317568)) .saturating_add(RocksDbWeight::get().reads(7)) .saturating_add(RocksDbWeight::get().writes(4)) } /// Storage: `CommunityMemberships::Account` (r:1 w:0) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) /// Storage: `CommunityReferenda::ReferendumInfoFor` (r:1 w:1) /// Proof: `CommunityReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`) /// Storage: `Communities::CommunityVotes` (r:1 w:1) @@ -454,13 +441,13 @@ impl WeightInfo for () { /// Storage: `Communities::CommunityDecisionMethod` (r:1 w:0) /// Proof: `Communities::CommunityDecisionMethod` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Attribute` (r:1 w:0) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) fn remove_vote() -> Weight { // Proof Size summary in bytes: - // Measured: `2798` + // Measured: `2894` // Estimated: `4365` - // Minimum execution time: 168_668_000 picoseconds. - Weight::from_parts(221_558_000, 0) + // Minimum execution time: 176_517_000 picoseconds. + Weight::from_parts(220_787_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(RocksDbWeight::get().reads(5)) .saturating_add(RocksDbWeight::get().writes(2)) @@ -477,12 +464,23 @@ impl WeightInfo for () { /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn unlock() -> Weight { // Proof Size summary in bytes: - // Measured: `1079` + // Measured: `1046` // Estimated: `9147` - // Minimum execution time: 128_764_000 picoseconds. - Weight::from_parts(166_719_000, 0) + // Minimum execution time: 128_897_000 picoseconds. + Weight::from_parts(170_404_000, 0) .saturating_add(Weight::from_parts(0, 9147)) .saturating_add(RocksDbWeight::get().reads(5)) .saturating_add(RocksDbWeight::get().writes(3)) } + /// Storage: `Communities::Info` (r:1 w:0) + /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) + fn dispatch_as_account() -> Weight { + // Proof Size summary in bytes: + // Measured: `115` + // Estimated: `3484` + // Minimum execution time: 36_477_000 picoseconds. + Weight::from_parts(48_974_000, 0) + .saturating_add(Weight::from_parts(0, 3484)) + .saturating_add(RocksDbWeight::get().reads(1)) + } } diff --git a/runtime/kreivo/Cargo.toml b/runtime/kreivo/Cargo.toml index 19c10626..3fe12cb9 100644 --- a/runtime/kreivo/Cargo.toml +++ b/runtime/kreivo/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "kreivo-runtime" description = "Kreivo Runtime" -version = "0.8.1" +version = "0.9.0" authors = ['Virto Team '] license = "GPL-3.0-only" homepage = 'https://github.com/virto-network/virto-node' diff --git a/runtime/kreivo/src/communities/mod.rs b/runtime/kreivo/src/communities/mod.rs index 3f60c0d2..be4d0693 100644 --- a/runtime/kreivo/src/communities/mod.rs +++ b/runtime/kreivo/src/communities/mod.rs @@ -76,6 +76,8 @@ impl pallet_communities::Config for Runtime { type Assets = Assets; type Balances = Balances; + + type RuntimeCall = RuntimeCall; type RuntimeHoldReason = RuntimeHoldReason; type RuntimeEvent = RuntimeEvent; type WeightInfo = crate::weights::pallet_communities::WeightInfo; diff --git a/runtime/kreivo/src/lib.rs b/runtime/kreivo/src/lib.rs index e947f344..c198ef72 100644 --- a/runtime/kreivo/src/lib.rs +++ b/runtime/kreivo/src/lib.rs @@ -141,10 +141,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("kreivo-parachain"), impl_name: create_runtime_str!("kreivo-parachain"), authoring_version: 1, - spec_version: 102, + spec_version: 103, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 3, + transaction_version: 4, state_version: 1, }; diff --git a/runtime/kreivo/src/weights/pallet_burner.rs b/runtime/kreivo/src/weights/pallet_burner.rs index a1f78c5b..89bd9530 100644 --- a/runtime/kreivo/src/weights/pallet_burner.rs +++ b/runtime/kreivo/src/weights/pallet_burner.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_burner` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-04-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `virto-builder`, CPU: `Intel(R) Xeon(R) Silver 4216 CPU @ 2.10GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("kreivo-local")`, DB CACHE: 1024 @@ -39,8 +39,8 @@ impl pallet_burner::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 29_592_000 picoseconds. - Weight::from_parts(43_449_000, 0) + // Minimum execution time: 58_843_000 picoseconds. + Weight::from_parts(61_533_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 0bdd7882..e968c14c 100644 --- a/runtime/kreivo/src/weights/pallet_communities.rs +++ b/runtime/kreivo/src/weights/pallet_communities.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_communities` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-04-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `virto-builder`, CPU: `Intel(R) Xeon(R) Silver 4216 CPU @ 2.10GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("kreivo-local")`, DB CACHE: 1024 @@ -45,8 +45,8 @@ impl pallet_communities::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `56` // Estimated: `3593` - // Minimum execution time: 55_066_000 picoseconds. - Weight::from_parts(57_633_000, 0) + // Minimum execution time: 55_549_000 picoseconds. + Weight::from_parts(56_676_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -60,11 +60,11 @@ impl pallet_communities::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `75` // Estimated: `4065` - // Minimum execution time: 22_674_000 picoseconds. - Weight::from_parts(37_944_303, 0) + // Minimum execution time: 22_518_000 picoseconds. + Weight::from_parts(34_920_208, 0) .saturating_add(Weight::from_parts(0, 4065)) - // Standard Error: 2_160 - .saturating_add(Weight::from_parts(8_887, 0).saturating_mul(d.into())) + // Standard Error: 789 + .saturating_add(Weight::from_parts(1_595, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -74,145 +74,133 @@ impl pallet_communities::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 21_543_000 picoseconds. - Weight::from_parts(23_007_000, 0) + // Minimum execution time: 21_329_000 picoseconds. + Weight::from_parts(22_468_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Communities::Info` (r:1 w:0) /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Account` (r:1 w:2) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:3 w:1) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:3 w:2) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemConfigOf` (r:2 w:2) - /// Proof: `CommunityMemberships::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemConfigOf` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Collection` (r:2 w:2) /// Proof: `CommunityMemberships::Collection` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Item` (r:2 w:2) - /// Proof: `CommunityMemberships::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Item` (`max_values`: None, `max_size`: Some(859), added: 3334, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemMetadataOf` (r:1 w:0) - /// Proof: `CommunityMemberships::ItemMetadataOf` (`max_values`: None, `max_size`: Some(347), added: 2822, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemMetadataOf` (`max_values`: None, `max_size`: Some(345), added: 2820, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::CollectionConfigOf` (r:1 w:0) /// Proof: `CommunityMemberships::CollectionConfigOf` (`max_values`: None, `max_size`: Some(69), added: 2544, mode: `MaxEncodedLen`) - /// Storage: `Communities::CommunityRanksSum` (r:1 w:1) - /// Proof: `Communities::CommunityRanksSum` (`max_values`: None, `max_size`: Some(22), added: 2497, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemPriceOf` (r:0 w:1) - /// Proof: `CommunityMemberships::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemPriceOf` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemAttributesApprovalsOf` (r:0 w:1) - /// Proof: `CommunityMemberships::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(1001), added: 3476, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(999), added: 3474, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::PendingSwapOf` (r:0 w:1) - /// Proof: `CommunityMemberships::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::PendingSwapOf` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) fn add_member() -> Weight { // Proof Size summary in bytes: - // Measured: `1129` - // Estimated: `9852` - // Minimum execution time: 399_514_000 picoseconds. - Weight::from_parts(421_451_000, 0) - .saturating_add(Weight::from_parts(0, 9852)) - .saturating_add(T::DbWeight::get().reads(16)) + // Measured: `1123` + // Estimated: `9846` + // Minimum execution time: 437_134_000 picoseconds. + Weight::from_parts(447_852_000, 0) + .saturating_add(Weight::from_parts(0, 9846)) + .saturating_add(T::DbWeight::get().reads(15)) .saturating_add(T::DbWeight::get().writes(15)) } /// Storage: `Communities::Info` (r:1 w:0) /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Account` (r:1 w:1) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) - /// Storage: `Communities::CommunityRanksSum` (r:1 w:1) - /// Proof: `Communities::CommunityRanksSum` (`max_values`: None, `max_size`: Some(22), added: 2497, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:3 w:1) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::ItemConfigOf` (r:1 w:1) - /// Proof: `CommunityMemberships::ItemConfigOf` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:3 w:2) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Collection` (r:1 w:1) /// Proof: `CommunityMemberships::Collection` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::ItemConfigOf` (r:1 w:1) + /// Proof: `CommunityMemberships::ItemConfigOf` (`max_values`: None, `max_size`: Some(46), added: 2521, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Item` (r:1 w:1) - /// Proof: `CommunityMemberships::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Item` (`max_values`: None, `max_size`: Some(859), added: 3334, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemMetadataOf` (r:1 w:0) - /// Proof: `CommunityMemberships::ItemMetadataOf` (`max_values`: None, `max_size`: Some(347), added: 2822, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemMetadataOf` (`max_values`: None, `max_size`: Some(345), added: 2820, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemPriceOf` (r:0 w:1) - /// Proof: `CommunityMemberships::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemPriceOf` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::ItemAttributesApprovalsOf` (r:0 w:1) - /// Proof: `CommunityMemberships::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(1001), added: 3476, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::ItemAttributesApprovalsOf` (`max_values`: None, `max_size`: Some(999), added: 3474, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::PendingSwapOf` (r:0 w:1) - /// Proof: `CommunityMemberships::PendingSwapOf` (`max_values`: None, `max_size`: Some(71), added: 2546, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::PendingSwapOf` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) fn remove_member() -> Weight { // Proof Size summary in bytes: - // Measured: `1086` - // Estimated: `9852` - // Minimum execution time: 297_243_000 picoseconds. - Weight::from_parts(302_455_000, 0) - .saturating_add(Weight::from_parts(0, 9852)) - .saturating_add(T::DbWeight::get().reads(11)) + // Measured: `1146` + // Estimated: `9846` + // Minimum execution time: 423_215_000 picoseconds. + Weight::from_parts(438_281_000, 0) + .saturating_add(Weight::from_parts(0, 9846)) + .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(10)) } /// Storage: `Communities::Info` (r:1 w:0) /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Account` (r:1 w:0) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) - /// Storage: `Communities::CommunityRanksSum` (r:1 w:1) - /// Proof: `Communities::CommunityRanksSum` (`max_values`: None, `max_size`: Some(22), added: 2497, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:1 w:1) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:2 w:2) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Collection` (r:1 w:1) /// Proof: `CommunityMemberships::Collection` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) fn promote() -> Weight { // Proof Size summary in bytes: - // Measured: `799` - // Estimated: `3944` - // Minimum execution time: 135_659_000 picoseconds. - Weight::from_parts(141_620_000, 0) - .saturating_add(Weight::from_parts(0, 3944)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `717` + // Estimated: `6894` + // Minimum execution time: 208_110_000 picoseconds. + Weight::from_parts(212_825_000, 0) + .saturating_add(Weight::from_parts(0, 6894)) + .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `Communities::Info` (r:1 w:0) /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Account` (r:1 w:0) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) - /// Storage: `Communities::CommunityRanksSum` (r:1 w:1) - /// Proof: `Communities::CommunityRanksSum` (`max_values`: None, `max_size`: Some(22), added: 2497, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:1 w:1) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:2 w:2) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Collection` (r:1 w:1) /// Proof: `CommunityMemberships::Collection` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`) fn demote() -> Weight { // Proof Size summary in bytes: - // Measured: `841` - // Estimated: `3944` - // Minimum execution time: 141_099_000 picoseconds. - Weight::from_parts(154_144_000, 0) - .saturating_add(Weight::from_parts(0, 3944)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `717` + // Estimated: `6894` + // Minimum execution time: 207_928_000 picoseconds. + Weight::from_parts(218_116_000, 0) + .saturating_add(Weight::from_parts(0, 6894)) + .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `CommunityMemberships::Account` (r:1 w:0) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) /// Storage: `CommunityReferenda::ReferendumInfoFor` (r:1 w:1) /// Proof: `CommunityReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`) /// Storage: `Communities::CommunityDecisionMethod` (r:1 w:0) /// Proof: `Communities::CommunityDecisionMethod` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `CommunityMemberships::Attribute` (r:1 w:0) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) /// Storage: `Communities::CommunityVotes` (r:1 w:1) /// Proof: `Communities::CommunityVotes` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`) - /// Storage: `CommunityMemberships::Attribute` (r:1 w:0) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) /// Storage: `Scheduler::Agenda` (r:2 w:2) /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`) fn vote() -> Weight { // Proof Size summary in bytes: - // Measured: `2796` + // Measured: `2892` // Estimated: `317568` - // Minimum execution time: 217_945_000 picoseconds. - Weight::from_parts(301_813_000, 0) + // Minimum execution time: 213_100_000 picoseconds. + Weight::from_parts(268_914_000, 0) .saturating_add(Weight::from_parts(0, 317568)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `CommunityMemberships::Account` (r:1 w:0) - /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Account` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`) /// Storage: `CommunityReferenda::ReferendumInfoFor` (r:1 w:1) /// Proof: `CommunityReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`) /// Storage: `Communities::CommunityVotes` (r:1 w:1) @@ -220,13 +208,13 @@ impl pallet_communities::WeightInfo for WeightInfo { /// Storage: `Communities::CommunityDecisionMethod` (r:1 w:0) /// Proof: `Communities::CommunityDecisionMethod` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) /// Storage: `CommunityMemberships::Attribute` (r:1 w:0) - /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(479), added: 2954, mode: `MaxEncodedLen`) + /// Proof: `CommunityMemberships::Attribute` (`max_values`: None, `max_size`: Some(477), added: 2952, mode: `MaxEncodedLen`) fn remove_vote() -> Weight { // Proof Size summary in bytes: - // Measured: `2798` + // Measured: `2894` // Estimated: `4365` - // Minimum execution time: 168_668_000 picoseconds. - Weight::from_parts(221_558_000, 0) + // Minimum execution time: 176_517_000 picoseconds. + Weight::from_parts(220_787_000, 0) .saturating_add(Weight::from_parts(0, 4365)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -243,12 +231,23 @@ impl pallet_communities::WeightInfo for WeightInfo { /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn unlock() -> Weight { // Proof Size summary in bytes: - // Measured: `1079` + // Measured: `1046` // Estimated: `9147` - // Minimum execution time: 128_764_000 picoseconds. - Weight::from_parts(166_719_000, 0) + // Minimum execution time: 128_897_000 picoseconds. + Weight::from_parts(170_404_000, 0) .saturating_add(Weight::from_parts(0, 9147)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } + /// Storage: `Communities::Info` (r:1 w:0) + /// Proof: `Communities::Info` (`max_values`: None, `max_size`: Some(19), added: 2494, mode: `MaxEncodedLen`) + fn dispatch_as_account() -> Weight { + // Proof Size summary in bytes: + // Measured: `115` + // Estimated: `3484` + // Minimum execution time: 36_477_000 picoseconds. + Weight::from_parts(48_974_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 c6654a81..475fd4c5 100644 --- a/runtime/kreivo/src/weights/pallet_payments.rs +++ b/runtime/kreivo/src/weights/pallet_payments.rs @@ -2,7 +2,7 @@ //! Autogenerated weights for `pallet_payments` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-04-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `virto-builder`, CPU: `Intel(R) Xeon(R) Silver 4216 CPU @ 2.10GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("kreivo-local")`, DB CACHE: 1024 @@ -50,8 +50,8 @@ impl pallet_payments::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `510` // Estimated: `8517` - // Minimum execution time: 158_440_000 picoseconds. - Weight::from_parts(261_788_690, 0) + // Minimum execution time: 155_153_000 picoseconds. + Weight::from_parts(205_242_584, 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: 389_717_000 picoseconds. - Weight::from_parts(411_183_000, 0) + // Minimum execution time: 256_380_000 picoseconds. + Weight::from_parts(293_341_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: 287_452_000 picoseconds. - Weight::from_parts(304_880_000, 0) + // Minimum execution time: 197_679_000 picoseconds. + Weight::from_parts(267_826_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: 77_629_000 picoseconds. - Weight::from_parts(83_710_000, 0) + // Minimum execution time: 56_205_000 picoseconds. + Weight::from_parts(64_958_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: 143_872_000 picoseconds. - Weight::from_parts(211_428_000, 0) + // Minimum execution time: 140_389_000 picoseconds. + Weight::from_parts(166_468_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: 555_143_000 picoseconds. - Weight::from_parts(685_098_000, 0) + // Minimum execution time: 370_958_000 picoseconds. + Weight::from_parts(405_768_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: 63_928_000 picoseconds. - Weight::from_parts(73_374_000, 0) + // Minimum execution time: 39_779_000 picoseconds. + Weight::from_parts(44_499_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: 229_573_000 picoseconds. - Weight::from_parts(352_516_000, 0) + // Minimum execution time: 227_669_000 picoseconds. + Weight::from_parts(254_716_000, 0) .saturating_add(Weight::from_parts(0, 8856)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(6))