diff --git a/node/src/chain_spec/g1.rs b/node/src/chain_spec/g1.rs index 78f879a8c8e75c9c6775634e93b75560c2477c9e..90a0294d5a374b867094af6cbf9e89b42c73a502 100644 --- a/node/src/chain_spec/g1.rs +++ b/node/src/chain_spec/g1.rs @@ -20,8 +20,7 @@ use crate::chain_spec::gen_genesis_data::{ }; use common_runtime::{constants::*, entities::IdtyData, GenesisIdty}; use g1_runtime::{ - opaque::SessionKeys, pallet_universal_dividend, parameters, Runtime, RuntimeGenesisConfig, - WASM_BINARY, + opaque::SessionKeys, pallet_universal_dividend, parameters, Runtime, WASM_BINARY, }; use sc_service::ChainType; use serde::Deserialize; diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs index 04fa45d061f2ee8a191a9dd12db531d536707677..705d82f08a906e2db0163f76f2586c1212d603fe 100644 --- a/runtime/common/src/pallets_config.rs +++ b/runtime/common/src/pallets_config.rs @@ -398,7 +398,7 @@ macro_rules! pallets_config { type RejectOrigin = TreasuryRejectOrigin; type RuntimeEvent = RuntimeEvent; type SpendFunds = TreasurySpendFunds<Self>; - type SpendOrigin = frame_support::traits::NeverEnsureOrigin<Balance>; + type SpendOrigin = TreasuryApproveOrigin; type SpendPeriod = SpendPeriod; type WeightInfo = weights::pallet_treasury::WeightInfo<Runtime>; } diff --git a/runtime/g1/src/parameters.rs b/runtime/g1/src/parameters.rs index d787eb5bf38e58c37ed0bc6d078f449c9617d983..f68118907bb80a9fedfc9987a7b641ea7720fda9 100644 --- a/runtime/g1/src/parameters.rs +++ b/runtime/g1/src/parameters.rs @@ -16,7 +16,10 @@ use crate::*; use common_runtime::{constants::*, Moment}; -use frame_support::{parameter_types, weights::constants::WEIGHT_REF_TIME_PER_SECOND}; +use frame_support::{ + parameter_types, traits::EitherOfDiverse, weights::constants::WEIGHT_REF_TIME_PER_SECOND, +}; +use frame_system::EnsureWithSuccess; use sp_runtime::transaction_validity::TransactionPriority; parameter_types! { @@ -146,10 +149,17 @@ parameter_types! { // Multisig parameter_types! { pub const MaxSignatories: u16 = 10; + pub const MaxBalance: Balance = Balance::MAX; } // Treasury -pub type TreasuryApproveOrigin = - pallet_collective::EnsureProportionMoreThan<AccountId, TechnicalCommitteeInstance, 1, 2>; +pub type TreasuryApproveOrigin = EnsureWithSuccess< + EitherOfDiverse< + EnsureRoot<AccountId>, + pallet_collective::EnsureProportionMoreThan<AccountId, TechnicalCommitteeInstance, 1, 2>, + >, + AccountId, + MaxBalance, +>; // Root is needed for benchmarking pub type TreasuryRejectOrigin = pallet_collective::EnsureProportionMoreThan<AccountId, TechnicalCommitteeInstance, 1, 3>; diff --git a/runtime/g1/src/weights/pallet_treasury.rs b/runtime/g1/src/weights/pallet_treasury.rs index 8a74b9be4c2bad5bd0b19912c82822b585a78460..2280ece2b541fac99054de88d8aacbb17821de16 100644 --- a/runtime/g1/src/weights/pallet_treasury.rs +++ b/runtime/g1/src/weights/pallet_treasury.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-01-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-02-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 @@ -29,7 +29,7 @@ // --genesis-builder=spec-genesis // --steps=50 // --repeat=20 -// --pallet=* +// --pallet=pallet_treasury // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 @@ -47,24 +47,33 @@ use core::marker::PhantomData; /// Weight functions for `pallet_treasury`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { + /// Storage: `Treasury::ProposalCount` (r:1 w:1) + /// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Proposals` (r:0 w:1) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn spend_local() -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(0, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Measured: `6` + // Estimated: `1887` + // Minimum execution time: 12_816_000 picoseconds. + Weight::from_parts(17_705_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: `Treasury::Approvals` (r:1 w:0) + /// Storage: `Treasury::Approvals` (r:1 w:1) /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn remove_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `6` + // Measured: `90` // Estimated: `1887` - // Minimum execution time: 3_556_000 picoseconds. - Weight::from_parts(3_805_000, 0) + // Minimum execution time: 6_252_000 picoseconds. + Weight::from_parts(8_521_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `System::Account` (r:1 w:0) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) @@ -75,55 +84,66 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[0, 99]`. fn on_initialize_proposals(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `82 + p * (1 ±0)` + // Measured: `173 + p * (1 ±0)` // Estimated: `3558` - // Minimum execution time: 11_461_000 picoseconds. - Weight::from_parts(12_397_435, 0) + // Minimum execution time: 11_412_000 picoseconds. + Weight::from_parts(15_421_603, 0) .saturating_add(Weight::from_parts(0, 3558)) - // Standard Error: 376 - .saturating_add(Weight::from_parts(20_402, 0).saturating_mul(p.into())) + // Standard Error: 1_811 + .saturating_add(Weight::from_parts(41_456, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } + /// Storage: `Treasury::SpendCount` (r:1 w:1) + /// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Spends` (r:0 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn spend() -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(0, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Measured: `6` + // Estimated: `1489` + // Minimum execution time: 9_147_000 picoseconds. + Weight::from_parts(9_483_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `Treasury::Spends` (r:1 w:0) + /// Storage: `Treasury::Spends` (r:1 w:1) /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) fn payout() -> Weight { // Proof Size summary in bytes: - // Measured: `6` - // Estimated: `3526` - // Minimum execution time: 4_855_000 picoseconds. - Weight::from_parts(5_244_000, 0) - .saturating_add(Weight::from_parts(0, 3526)) - .saturating_add(T::DbWeight::get().reads(1)) + // Measured: `179` + // Estimated: `6126` + // Minimum execution time: 42_637_000 picoseconds. + Weight::from_parts(46_638_000, 0) + .saturating_add(Weight::from_parts(0, 6126)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: `Treasury::Spends` (r:1 w:0) + /// Storage: `Treasury::Spends` (r:1 w:1) /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn check_status() -> Weight { // Proof Size summary in bytes: - // Measured: `6` + // Measured: `116` // Estimated: `3526` - // Minimum execution time: 4_857_000 picoseconds. - Weight::from_parts(5_162_000, 0) + // Minimum execution time: 10_962_000 picoseconds. + Weight::from_parts(11_678_000, 0) .saturating_add(Weight::from_parts(0, 3526)) .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Treasury::Spends` (r:1 w:0) + /// Storage: `Treasury::Spends` (r:1 w:1) /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn void_spend() -> Weight { // Proof Size summary in bytes: - // Measured: `6` + // Measured: `116` // Estimated: `3526` - // Minimum execution time: 4_559_000 picoseconds. - Weight::from_parts(4_803_000, 0) + // Minimum execution time: 10_355_000 picoseconds. + Weight::from_parts(11_353_000, 0) .saturating_add(Weight::from_parts(0, 3526)) .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/gdev/src/parameters.rs b/runtime/gdev/src/parameters.rs index bcca8e7d2315b7d331a026fc53174199fbe31571..aa4a9d827db59495f0faaf79a2333ba0e65f0d8c 100644 --- a/runtime/gdev/src/parameters.rs +++ b/runtime/gdev/src/parameters.rs @@ -19,6 +19,7 @@ use common_runtime::constants::*; use frame_support::{ parameter_types, traits::EitherOfDiverse, weights::constants::WEIGHT_REF_TIME_PER_SECOND, }; +use frame_system::EnsureWithSuccess; use sp_runtime::transaction_validity::TransactionPriority; parameter_types! { @@ -108,12 +109,17 @@ frame_support::parameter_types! { // Multisig parameter_types! { pub const MaxSignatories: u16 = 10; + pub const MaxBalance: Balance = Balance::MAX; } // Treasury -pub type TreasuryApproveOrigin = EitherOfDiverse< - EnsureRoot<AccountId>, - pallet_collective::EnsureProportionMoreThan<AccountId, TechnicalCommitteeInstance, 1, 2>, +pub type TreasuryApproveOrigin = EnsureWithSuccess< + EitherOfDiverse< + EnsureRoot<AccountId>, + pallet_collective::EnsureProportionMoreThan<AccountId, TechnicalCommitteeInstance, 1, 2>, + >, + AccountId, + MaxBalance, >; // Root is needed for benchmarking pub type TreasuryRejectOrigin = pallet_collective::EnsureProportionMoreThan<AccountId, TechnicalCommitteeInstance, 1, 3>; diff --git a/runtime/gdev/src/weights/pallet_treasury.rs b/runtime/gdev/src/weights/pallet_treasury.rs index 1d8b9ffb1c5a32bb1051f3c73c3f540a5acc2fd1..083141d7d6eff9cef2e29230933384404a3d0830 100644 --- a/runtime/gdev/src/weights/pallet_treasury.rs +++ b/runtime/gdev/src/weights/pallet_treasury.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-01-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-02-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 @@ -29,7 +29,7 @@ // --genesis-builder=spec-genesis // --steps=50 // --repeat=20 -// --pallet=* +// --pallet=pallet_treasury // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 @@ -47,24 +47,33 @@ use core::marker::PhantomData; /// Weight functions for `pallet_treasury`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { + /// Storage: `Treasury::ProposalCount` (r:1 w:1) + /// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Proposals` (r:0 w:1) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn spend_local() -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(0, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Measured: `6` + // Estimated: `1887` + // Minimum execution time: 10_391_000 picoseconds. + Weight::from_parts(11_591_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: `Treasury::Approvals` (r:1 w:0) + /// Storage: `Treasury::Approvals` (r:1 w:1) /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn remove_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `6` + // Measured: `90` // Estimated: `1887` - // Minimum execution time: 3_605_000 picoseconds. - Weight::from_parts(3_896_000, 0) + // Minimum execution time: 5_672_000 picoseconds. + Weight::from_parts(5_892_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `System::Account` (r:1 w:0) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) @@ -75,55 +84,66 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[0, 99]`. fn on_initialize_proposals(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `82 + p * (1 ±0)` + // Measured: `173 + p * (1 ±0)` // Estimated: `3558` - // Minimum execution time: 10_805_000 picoseconds. - Weight::from_parts(12_178_298, 0) + // Minimum execution time: 11_705_000 picoseconds. + Weight::from_parts(14_836_921, 0) .saturating_add(Weight::from_parts(0, 3558)) - // Standard Error: 476 - .saturating_add(Weight::from_parts(26_138, 0).saturating_mul(p.into())) + // Standard Error: 1_697 + .saturating_add(Weight::from_parts(47_143, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } + /// Storage: `Treasury::SpendCount` (r:1 w:1) + /// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Spends` (r:0 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn spend() -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(0, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Measured: `6` + // Estimated: `1489` + // Minimum execution time: 9_047_000 picoseconds. + Weight::from_parts(9_641_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `Treasury::Spends` (r:1 w:0) + /// Storage: `Treasury::Spends` (r:1 w:1) /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) fn payout() -> Weight { // Proof Size summary in bytes: - // Measured: `6` - // Estimated: `3526` - // Minimum execution time: 4_499_000 picoseconds. - Weight::from_parts(4_892_000, 0) - .saturating_add(Weight::from_parts(0, 3526)) - .saturating_add(T::DbWeight::get().reads(1)) + // Measured: `179` + // Estimated: `6126` + // Minimum execution time: 44_565_000 picoseconds. + Weight::from_parts(46_238_000, 0) + .saturating_add(Weight::from_parts(0, 6126)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: `Treasury::Spends` (r:1 w:0) + /// Storage: `Treasury::Spends` (r:1 w:1) /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn check_status() -> Weight { // Proof Size summary in bytes: - // Measured: `6` + // Measured: `116` // Estimated: `3526` - // Minimum execution time: 4_644_000 picoseconds. - Weight::from_parts(4_823_000, 0) + // Minimum execution time: 10_752_000 picoseconds. + Weight::from_parts(11_997_000, 0) .saturating_add(Weight::from_parts(0, 3526)) .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Treasury::Spends` (r:1 w:0) + /// Storage: `Treasury::Spends` (r:1 w:1) /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn void_spend() -> Weight { // Proof Size summary in bytes: - // Measured: `6` + // Measured: `116` // Estimated: `3526` - // Minimum execution time: 4_098_000 picoseconds. - Weight::from_parts(4_374_000, 0) + // Minimum execution time: 9_980_000 picoseconds. + Weight::from_parts(10_455_000, 0) .saturating_add(Weight::from_parts(0, 3526)) .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/gtest/src/parameters.rs b/runtime/gtest/src/parameters.rs index 307f59b19733e1ad99bfb62bb656e9dc51bb70f1..b3525eab4a6d96a15fe86deb8ee0e3d6cf4fbf6e 100644 --- a/runtime/gtest/src/parameters.rs +++ b/runtime/gtest/src/parameters.rs @@ -16,7 +16,10 @@ use crate::*; use common_runtime::constants::*; -use frame_support::{parameter_types, weights::constants::WEIGHT_REF_TIME_PER_SECOND}; +use frame_support::{ + parameter_types, traits::EitherOfDiverse, weights::constants::WEIGHT_REF_TIME_PER_SECOND, +}; +use frame_system::EnsureWithSuccess; use sp_runtime::transaction_validity::TransactionPriority; parameter_types! { @@ -138,10 +141,17 @@ parameter_types! { // Multisig parameter_types! { pub const MaxSignatories: u16 = 10; + pub const MaxBalance: Balance = Balance::MAX; } // Treasury -pub type TreasuryApproveOrigin = - pallet_collective::EnsureProportionMoreThan<AccountId, TechnicalCommitteeInstance, 1, 2>; +pub type TreasuryApproveOrigin = EnsureWithSuccess< + EitherOfDiverse< + EnsureRoot<AccountId>, + pallet_collective::EnsureProportionMoreThan<AccountId, TechnicalCommitteeInstance, 1, 2>, + >, + AccountId, + MaxBalance, +>; // Root is needed for benchmarking pub type TreasuryRejectOrigin = pallet_collective::EnsureProportionMoreThan<AccountId, TechnicalCommitteeInstance, 1, 3>; diff --git a/runtime/gtest/src/weights/pallet_treasury.rs b/runtime/gtest/src/weights/pallet_treasury.rs index 414a962bd4562235b0b7d77106c6826848fef755..0ad5d626e51d9d88379b02c7f4d3e0603485a8ee 100644 --- a/runtime/gtest/src/weights/pallet_treasury.rs +++ b/runtime/gtest/src/weights/pallet_treasury.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-01-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-02-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 @@ -29,7 +29,7 @@ // --genesis-builder=spec-genesis // --steps=50 // --repeat=20 -// --pallet=* +// --pallet=pallet_treasury // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 @@ -47,24 +47,33 @@ use core::marker::PhantomData; /// Weight functions for `pallet_treasury`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { + /// Storage: `Treasury::ProposalCount` (r:1 w:1) + /// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Proposals` (r:0 w:1) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn spend_local() -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(0, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Measured: `6` + // Estimated: `1887` + // Minimum execution time: 10_200_000 picoseconds. + Weight::from_parts(11_023_000, 0) + .saturating_add(Weight::from_parts(0, 1887)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: `Treasury::Approvals` (r:1 w:0) + /// Storage: `Treasury::Approvals` (r:1 w:1) /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn remove_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `6` + // Measured: `90` // Estimated: `1887` - // Minimum execution time: 3_447_000 picoseconds. - Weight::from_parts(3_621_000, 0) + // Minimum execution time: 6_002_000 picoseconds. + Weight::from_parts(6_292_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `System::Account` (r:1 w:0) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) @@ -75,55 +84,66 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { /// The range of component `p` is `[0, 99]`. fn on_initialize_proposals(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `82 + p * (1 ±0)` + // Measured: `173 + p * (1 ±0)` // Estimated: `3558` - // Minimum execution time: 10_682_000 picoseconds. - Weight::from_parts(12_020_888, 0) + // Minimum execution time: 11_741_000 picoseconds. + Weight::from_parts(14_618_792, 0) .saturating_add(Weight::from_parts(0, 3558)) - // Standard Error: 417 - .saturating_add(Weight::from_parts(22_993, 0).saturating_mul(p.into())) + // Standard Error: 946 + .saturating_add(Weight::from_parts(39_436, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } + /// Storage: `Treasury::SpendCount` (r:1 w:1) + /// Proof: `Treasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Spends` (r:0 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn spend() -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(0, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Measured: `6` + // Estimated: `1489` + // Minimum execution time: 9_166_000 picoseconds. + Weight::from_parts(9_685_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `Treasury::Spends` (r:1 w:0) + /// Storage: `Treasury::Spends` (r:1 w:1) /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) fn payout() -> Weight { // Proof Size summary in bytes: - // Measured: `6` - // Estimated: `3526` - // Minimum execution time: 4_535_000 picoseconds. - Weight::from_parts(4_862_000, 0) - .saturating_add(Weight::from_parts(0, 3526)) - .saturating_add(T::DbWeight::get().reads(1)) + // Measured: `179` + // Estimated: `6126` + // Minimum execution time: 44_377_000 picoseconds. + Weight::from_parts(46_847_000, 0) + .saturating_add(Weight::from_parts(0, 6126)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: `Treasury::Spends` (r:1 w:0) + /// Storage: `Treasury::Spends` (r:1 w:1) /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn check_status() -> Weight { // Proof Size summary in bytes: - // Measured: `6` + // Measured: `116` // Estimated: `3526` - // Minimum execution time: 4_604_000 picoseconds. - Weight::from_parts(4_766_000, 0) + // Minimum execution time: 10_849_000 picoseconds. + Weight::from_parts(11_380_000, 0) .saturating_add(Weight::from_parts(0, 3526)) .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Treasury::Spends` (r:1 w:0) + /// Storage: `Treasury::Spends` (r:1 w:1) /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) fn void_spend() -> Weight { // Proof Size summary in bytes: - // Measured: `6` + // Measured: `116` // Estimated: `3526` - // Minimum execution time: 4_143_000 picoseconds. - Weight::from_parts(4_415_000, 0) + // Minimum execution time: 9_761_000 picoseconds. + Weight::from_parts(10_219_000, 0) .saturating_add(Weight::from_parts(0, 3526)) .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } }