mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +00:00
Companion for substrate#8665 (Bounded Treasury) (#2932)
* Add MaxApprovals for Bounded Treasury * update weight * update Substrate * cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_treasury --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/ * cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_treasury --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/ Co-authored-by: parity-processbot <> Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
This commit is contained in:
Generated
+149
-149
File diff suppressed because it is too large
Load Diff
@@ -142,6 +142,7 @@ mod tests {
|
|||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry");
|
pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry");
|
||||||
|
pub const MaxApprovals: u32 = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_treasury::Config for Test {
|
impl pallet_treasury::Config for Test {
|
||||||
@@ -157,6 +158,7 @@ mod tests {
|
|||||||
type BurnDestination = ();
|
type BurnDestination = ();
|
||||||
type PalletId = TreasuryPalletId;
|
type PalletId = TreasuryPalletId;
|
||||||
type SpendFunds = ();
|
type SpendFunds = ();
|
||||||
|
type MaxApprovals = MaxApprovals;
|
||||||
type WeightInfo = ();
|
type WeightInfo = ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -568,6 +568,7 @@ parameter_types! {
|
|||||||
pub const MaximumReasonLength: u32 = 16384;
|
pub const MaximumReasonLength: u32 = 16384;
|
||||||
pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);
|
pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);
|
||||||
pub const BountyValueMinimum: Balance = 2 * DOLLARS;
|
pub const BountyValueMinimum: Balance = 2 * DOLLARS;
|
||||||
|
pub const MaxApprovals: u32 = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
type ApproveOrigin = EnsureOneOf<
|
type ApproveOrigin = EnsureOneOf<
|
||||||
@@ -589,6 +590,7 @@ impl pallet_treasury::Config for Runtime {
|
|||||||
type Burn = Burn;
|
type Burn = Burn;
|
||||||
type BurnDestination = Society;
|
type BurnDestination = Society;
|
||||||
type SpendFunds = Bounties;
|
type SpendFunds = Bounties;
|
||||||
|
type MaxApprovals = MaxApprovals;
|
||||||
type WeightInfo = weights::pallet_treasury::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_treasury::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
//! Autogenerated weights for pallet_treasury
|
//! Autogenerated weights for pallet_treasury
|
||||||
//!
|
//!
|
||||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||||
//! DATE: 2021-03-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
//! DATE: 2021-04-26, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128
|
||||||
|
|
||||||
// Executed Command:
|
// Executed Command:
|
||||||
@@ -44,24 +44,26 @@ use sp_std::marker::PhantomData;
|
|||||||
pub struct WeightInfo<T>(PhantomData<T>);
|
pub struct WeightInfo<T>(PhantomData<T>);
|
||||||
impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
|
impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
|
||||||
fn propose_spend() -> Weight {
|
fn propose_spend() -> Weight {
|
||||||
(42_554_000 as Weight)
|
(41_284_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn reject_proposal() -> Weight {
|
fn reject_proposal() -> Weight {
|
||||||
(58_924_000 as Weight)
|
(51_908_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn approve_proposal() -> Weight {
|
fn approve_proposal(p: u32, ) -> Weight {
|
||||||
(8_849_000 as Weight)
|
(11_930_000 as Weight)
|
||||||
|
// Standard Error: 0
|
||||||
|
.saturating_add((33_000 as Weight).saturating_mul(p as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn on_initialize_proposals(p: u32, ) -> Weight {
|
fn on_initialize_proposals(p: u32, ) -> Weight {
|
||||||
(79_990_000 as Weight)
|
(64_191_000 as Weight)
|
||||||
// Standard Error: 18_000
|
// Standard Error: 48_000
|
||||||
.saturating_add((62_979_000 as Weight).saturating_mul(p as Weight))
|
.saturating_add((62_265_000 as Weight).saturating_mul(p as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight)))
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
|
|||||||
@@ -615,6 +615,7 @@ parameter_types! {
|
|||||||
pub const MaximumReasonLength: u32 = 16384;
|
pub const MaximumReasonLength: u32 = 16384;
|
||||||
pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);
|
pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);
|
||||||
pub const BountyValueMinimum: Balance = 10 * DOLLARS;
|
pub const BountyValueMinimum: Balance = 10 * DOLLARS;
|
||||||
|
pub const MaxApprovals: u32 = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
type ApproveOrigin = EnsureOneOf<
|
type ApproveOrigin = EnsureOneOf<
|
||||||
@@ -636,6 +637,7 @@ impl pallet_treasury::Config for Runtime {
|
|||||||
type Burn = Burn;
|
type Burn = Burn;
|
||||||
type BurnDestination = ();
|
type BurnDestination = ();
|
||||||
type SpendFunds = Bounties;
|
type SpendFunds = Bounties;
|
||||||
|
type MaxApprovals = MaxApprovals;
|
||||||
type WeightInfo = weights::pallet_treasury::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_treasury::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
//! Autogenerated weights for pallet_treasury
|
//! Autogenerated weights for pallet_treasury
|
||||||
//!
|
//!
|
||||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||||
//! DATE: 2021-03-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
//! DATE: 2021-04-26, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128
|
||||||
|
|
||||||
// Executed Command:
|
// Executed Command:
|
||||||
@@ -44,24 +44,26 @@ use sp_std::marker::PhantomData;
|
|||||||
pub struct WeightInfo<T>(PhantomData<T>);
|
pub struct WeightInfo<T>(PhantomData<T>);
|
||||||
impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
|
impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> {
|
||||||
fn propose_spend() -> Weight {
|
fn propose_spend() -> Weight {
|
||||||
(41_733_000 as Weight)
|
(41_419_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn reject_proposal() -> Weight {
|
fn reject_proposal() -> Weight {
|
||||||
(56_699_000 as Weight)
|
(51_744_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
fn approve_proposal() -> Weight {
|
fn approve_proposal(p: u32, ) -> Weight {
|
||||||
(8_440_000 as Weight)
|
(11_705_000 as Weight)
|
||||||
|
// Standard Error: 0
|
||||||
|
.saturating_add((33_000 as Weight).saturating_mul(p as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
fn on_initialize_proposals(p: u32, ) -> Weight {
|
fn on_initialize_proposals(p: u32, ) -> Weight {
|
||||||
(45_163_000 as Weight)
|
(46_880_000 as Weight)
|
||||||
// Standard Error: 16_000
|
// Standard Error: 31_000
|
||||||
.saturating_add((61_739_000 as Weight).saturating_mul(p as Weight))
|
.saturating_add((62_733_000 as Weight).saturating_mul(p as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight)))
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
|
|||||||
Reference in New Issue
Block a user