diff --git a/.github/workflows/check-benchmarks.yml b/.github/workflows/check-benchmarks.yml index db0a49f52e1..5850c624b27 100644 --- a/.github/workflows/check-benchmarks.yml +++ b/.github/workflows/check-benchmarks.yml @@ -5,6 +5,9 @@ on: schedule: - cron: "0 5 * * 0" # Runs every Sunday at 5:00 AM UTC - cron: "0 5 * * 3" # Runs every Wednesday at 5:00 AM UTC + +env: + FRAME_OMNI_BENCHER_RELEASE_VERSION: polkadot-stable2412 jobs: set-tags: @@ -59,6 +62,12 @@ jobs: rustup override unset rustup show rustup target add wasm32-unknown-unknown + - name: Install frame-omni-bencher + shell: bash + run: | + curl -sL https://github.com/paritytech/polkadot-sdk/releases/download/$FRAME_OMNI_BENCHER_RELEASE_VERSION/frame-omni-bencher -o frame-omni-bencher + chmod +x ./frame-omni-bencher + ./frame-omni-bencher --version - name: Run benchmarks shell: bash run: | diff --git a/runtime/moonbase/src/governance/councils.rs b/runtime/moonbase/src/governance/councils.rs index 14d398a4c11..f102d2bc41c 100644 --- a/runtime/moonbase/src/governance/councils.rs +++ b/runtime/moonbase/src/governance/councils.rs @@ -39,7 +39,7 @@ impl pallet_collective::Config for Runtime { /// The maximum number of treasury council members. type MaxMembers = ConstU32<9>; type DefaultVote = pallet_collective::MoreThanMajorityThenPrimeDefaultVote; - type WeightInfo = moonbase_weights::pallet_collective::WeightInfo; + type WeightInfo = moonbase_weights::pallet_collective_treasury_council::WeightInfo; type SetMembersOrigin = referenda::GeneralAdminOrRoot; type MaxProposalWeight = MaxProposalWeight; } @@ -56,7 +56,7 @@ impl pallet_collective::Config for Runtime { /// The maximum number of technical committee members. type MaxMembers = ConstU32<100>; type DefaultVote = pallet_collective::MoreThanMajorityThenPrimeDefaultVote; - type WeightInfo = moonbase_weights::pallet_collective::WeightInfo; + type WeightInfo = moonbase_weights::pallet_collective_open_tech_committee::WeightInfo; type SetMembersOrigin = referenda::GeneralAdminOrRoot; type MaxProposalWeight = MaxProposalWeight; } diff --git a/runtime/moonbase/src/lib.rs b/runtime/moonbase/src/lib.rs index 82cc15e691c..03c62b39676 100644 --- a/runtime/moonbase/src/lib.rs +++ b/runtime/moonbase/src/lib.rs @@ -1462,6 +1462,12 @@ use moonbeam_runtime_common::deal_with_fees::{ #[cfg(feature = "runtime-benchmarks")] mod benches { + // TODO: Temporary workaround before upgrading to latest polkadot-sdk - fix https://github.com/paritytech/polkadot-sdk/pull/6435 + #[allow(unused_imports)] + use pallet_collective as pallet_collective_treasury_council; + #[allow(unused_imports)] + use pallet_collective as pallet_collective_open_tech_committee; + frame_support::parameter_types! { pub const MaxBalance: crate::Balance = crate::Balance::max_value(); } @@ -1501,6 +1507,8 @@ mod benches { [pallet_precompile_benchmarks, PrecompileBenchmarks] [pallet_parameters, Parameters] [pallet_xcm_weight_trader, XcmWeightTrader] + [pallet_collective_treasury_council, TreasuryCouncilCollective] + [pallet_collective_open_tech_committee, OpenTechCommitteeCollective] ); } diff --git a/runtime/moonbase/src/weights/mod.rs b/runtime/moonbase/src/weights/mod.rs index 5a896532cdf..c7b75eced26 100644 --- a/runtime/moonbase/src/weights/mod.rs +++ b/runtime/moonbase/src/weights/mod.rs @@ -25,7 +25,8 @@ pub mod pallet_author_inherent; pub mod pallet_author_mapping; pub mod pallet_author_slot_filter; pub mod pallet_balances; -pub mod pallet_collective; +pub mod pallet_collective_open_tech_committee; +pub mod pallet_collective_treasury_council; pub mod pallet_conviction_voting; pub mod pallet_crowdloan_rewards; pub mod pallet_evm; diff --git a/runtime/moonbase/src/weights/pallet_collective.rs b/runtime/moonbase/src/weights/pallet_collective.rs deleted file mode 100644 index 577119bd3e4..00000000000 --- a/runtime/moonbase/src/weights/pallet_collective.rs +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright 2019-2025 PureStake Inc. -// This file is part of Moonbeam. - -// Moonbeam is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Moonbeam is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Moonbeam. If not, see . -//! Autogenerated weights for `pallet_collective` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/moonbeam -// benchmark -// pallet -// --chain=moonbase-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_collective -// --extrinsic=* -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/common/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_collective`. -pub struct WeightInfo(PhantomData); -impl pallet_collective::WeightInfo for WeightInfo { - /// Storage: CouncilCollective Members (r:1 w:1) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:0) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Voting (r:100 w:100) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Prime (r:0 w:1) - /// Proof Skipped: CouncilCollective Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[0, 100]`. - /// The range of component `n` is `[0, 100]`. - /// The range of component `p` is `[0, 100]`. - fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + m * (2021 ±0) + p * (2026 ±0)` - // Estimated: `12238 + m * (1231 ±14) + p * (3660 ±14)` - // Minimum execution time: 13_785_000 picoseconds. - Weight::from_parts(14_085_000, 0) - .saturating_add(Weight::from_parts(0, 12238)) - // Standard Error: 34_315 - .saturating_add(Weight::from_parts(2_414_144, 0).saturating_mul(m.into())) - // Standard Error: 34_315 - .saturating_add(Weight::from_parts(5_345_562, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 1231).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 3660).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: MaintenanceMode MaintenanceMode (r:1 w:0) - /// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `149 + m * (20 ±0)` - // Estimated: `1634 + m * (20 ±0)` - // Minimum execution time: 12_726_000 picoseconds. - Weight::from_parts(12_294_605, 0) - .saturating_add(Weight::from_parts(0, 1634)) - // Standard Error: 18 - .saturating_add(Weight::from_parts(910, 0).saturating_mul(b.into())) - // Standard Error: 192 - .saturating_add(Weight::from_parts(13_235, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) - } - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:1 w:0) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: MaintenanceMode MaintenanceMode (r:1 w:0) - /// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn propose_execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `149 + m * (20 ±0)` - // Estimated: `3614 + m * (20 ±0)` - // Minimum execution time: 14_722_000 picoseconds. - Weight::from_parts(14_487_427, 0) - .saturating_add(Weight::from_parts(0, 3614)) - // Standard Error: 20 - .saturating_add(Weight::from_parts(944, 0).saturating_mul(b.into())) - // Standard Error: 215 - .saturating_add(Weight::from_parts(25_619, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) - } - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:1 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalCount (r:1 w:1) - /// Proof Skipped: CouncilCollective ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Voting (r:0 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[2, 100]`. - /// The range of component `p` is `[1, 100]`. - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `395 + m * (20 ±0) + p * (36 ±0)` - // Estimated: `3789 + m * (21 ±0) + p * (36 ±0)` - // Minimum execution time: 17_107_000 picoseconds. - Weight::from_parts(15_172_014, 0) - .saturating_add(Weight::from_parts(0, 3789)) - // Standard Error: 104 - .saturating_add(Weight::from_parts(3_191, 0).saturating_mul(b.into())) - // Standard Error: 1_090 - .saturating_add(Weight::from_parts(31_145, 0).saturating_mul(m.into())) - // Standard Error: 1_077 - .saturating_add(Weight::from_parts(131_855, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 21).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[5, 100]`. - fn vote(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `870 + m * (40 ±0)` - // Estimated: `4334 + m * (40 ±0)` - // Minimum execution time: 21_423_000 picoseconds. - Weight::from_parts(22_311_906, 0) - .saturating_add(Weight::from_parts(0, 4334)) - // Standard Error: 415 - .saturating_add(Weight::from_parts(32_990, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) - } - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:0 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `447 + m * (40 ±0) + p * (36 ±0)` - // Estimated: `3892 + m * (41 ±0) + p * (36 ±0)` - // Minimum execution time: 20_010_000 picoseconds. - Weight::from_parts(20_008_777, 0) - .saturating_add(Weight::from_parts(0, 3892)) - // Standard Error: 1_391 - .saturating_add(Weight::from_parts(39_960, 0).saturating_mul(m.into())) - // Standard Error: 1_356 - .saturating_add(Weight::from_parts(126_447, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 41).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:1 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: MaintenanceMode MaintenanceMode (r:1 w:0) - /// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `791 + b * (1 ±0) + m * (40 ±0) + p * (40 ±0)` - // Estimated: `4108 + b * (1 ±0) + m * (42 ±0) + p * (40 ±0)` - // Minimum execution time: 30_647_000 picoseconds. - Weight::from_parts(30_084_699, 0) - .saturating_add(Weight::from_parts(0, 4108)) - // Standard Error: 123 - .saturating_add(Weight::from_parts(2_876, 0).saturating_mul(b.into())) - // Standard Error: 1_307 - .saturating_add(Weight::from_parts(31_661, 0).saturating_mul(m.into())) - // Standard Error: 1_274 - .saturating_add(Weight::from_parts(154_567, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 42).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Prime (r:1 w:0) - /// Proof Skipped: CouncilCollective Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:0 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `516 + m * (30 ±0) + p * (36 ±0)` - // Estimated: `3958 + m * (31 ±0) + p * (36 ±0)` - // Minimum execution time: 20_735_000 picoseconds. - Weight::from_parts(22_649_363, 0) - .saturating_add(Weight::from_parts(0, 3958)) - // Standard Error: 1_082 - .saturating_add(Weight::from_parts(32_331, 0).saturating_mul(m.into())) - // Standard Error: 1_055 - .saturating_add(Weight::from_parts(122_034, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 31).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Prime (r:1 w:0) - /// Proof Skipped: CouncilCollective Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:1 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: MaintenanceMode MaintenanceMode (r:1 w:0) - /// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `811 + b * (1 ±0) + m * (40 ±0) + p * (40 ±0)` - // Estimated: `4128 + b * (1 ±0) + m * (42 ±0) + p * (40 ±0)` - // Minimum execution time: 32_927_000 picoseconds. - Weight::from_parts(32_086_367, 0) - .saturating_add(Weight::from_parts(0, 4128)) - // Standard Error: 122 - .saturating_add(Weight::from_parts(2_962, 0).saturating_mul(b.into())) - // Standard Error: 1_299 - .saturating_add(Weight::from_parts(32_167, 0).saturating_mul(m.into())) - // Standard Error: 1_266 - .saturating_add(Weight::from_parts(154_131, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 42).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Voting (r:0 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:0 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `p` is `[1, 100]`. - fn disapprove_proposal(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `264 + p * (32 ±0)` - // Estimated: `1749 + p * (32 ±0)` - // Minimum execution time: 10_334_000 picoseconds. - Weight::from_parts(11_413_201, 0) - .saturating_add(Weight::from_parts(0, 1749)) - // Standard Error: 1_033 - .saturating_add(Weight::from_parts(95_458, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) - } -} diff --git a/runtime/moonbase/src/weights/pallet_collective_open_tech_committee.rs b/runtime/moonbase/src/weights/pallet_collective_open_tech_committee.rs new file mode 100644 index 00000000000..3014dbaa65d --- /dev/null +++ b/runtime/moonbase/src/weights/pallet_collective_open_tech_committee.rs @@ -0,0 +1,289 @@ +// Copyright 2025 Moonbeam foundation +// This file is part of Moonbeam. + +// Moonbeam is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Moonbeam is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Moonbeam. If not, see . + + +//! Autogenerated weights for `pallet_collective_open_tech_committee` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0 +//! DATE: 2025-03-07, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Mac`, CPU: `` +//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 + +// Executed Command: +// frame-omni-bencher +// v1 +// benchmark +// pallet +// --runtime=./target/release/wbuild/moonbase-runtime/moonbase_runtime.wasm +// --genesis-builder=runtime +// --genesis-builder-preset=development +// --steps=2 +// --repeat=1 +// --pallet=pallet_collective_open_tech_committee +// --extrinsic=* +// --wasm-execution=compiled +// --header=./file_header.txt +// --template=./benchmarking/frame-weight-template.hbs +// --output=./runtime/moonbase/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +use pallet_collective as pallet_collective_open_tech_committee; + +/// Weights for `pallet_collective_open_tech_committee`. +pub struct WeightInfo(PhantomData); +impl pallet_collective_open_tech_committee::WeightInfo for WeightInfo { + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Voting` (r:100 w:100) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Prime` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + m * (2048 ±0) + p * (2027 ±0)` + // Estimated: `1618 + m * (1268 ±467) + p * (1248 ±467)` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 1618) + // Standard Error: 1_627_307 + .saturating_add(Weight::from_parts(4_763_846, 0).saturating_mul(m.into())) + // Standard Error: 1_627_307 + .saturating_add(Weight::from_parts(4_753_846, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 1268).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 1248).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn execute(_b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `175 + m * (20 ±0)` + // Estimated: `1661 + m * (20 ±0)` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(17_503_755, 1661) + // Standard Error: 8_747 + .saturating_add(Weight::from_parts(5_050, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + } + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn propose_execute(_b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `175 + m * (20 ±0)` + // Estimated: `3641 + m * (20 ±0)` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(13_989_898, 3641) + // Standard Error: 0 + .saturating_add(Weight::from_parts(10_101, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + } + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalCount` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Voting` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + fn propose_proposed(_b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `70 + m * (20 ±0) + p * (39 ±0)` + // Estimated: `3535 + m * (20 ±0) + p * (39 ±0)` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(18_519_580, 3535) + // Standard Error: 6_802 + .saturating_add(Weight::from_parts(6_802, 0).saturating_mul(m.into())) + // Standard Error: 6_734 + .saturating_add(Weight::from_parts(138_047, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[5, 100]`. + fn vote(_m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `898 + m * (40 ±0)` + // Estimated: `8366` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(18_000_000, 8366) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `260 + m * (40 ±0) + p * (38 ±0)` + // Estimated: `3725 + m * (40 ±0) + p * (39 ±0)` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(16_848_484, 3725) + // Standard Error: 0 + .saturating_add(Weight::from_parts(151_515, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `517 + m * (40 ±0) + p * (44 ±0)` + // Estimated: `3982 + b * (1 ±0) + m * (40 ±0) + p * (45 ±0)` + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(25_394_044, 3982) + // Standard Error: 3_261 + .saturating_add(Weight::from_parts(1_630, 0).saturating_mul(b.into())) + // Standard Error: 34_722 + .saturating_add(Weight::from_parts(27_777, 0).saturating_mul(m.into())) + // Standard Error: 33_670 + .saturating_add(Weight::from_parts(158_249, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 45).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Prime` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `318 + m * (30 ±0) + p * (38 ±0)` + // Estimated: `3784 + m * (30 ±0) + p * (39 ±0)` + // Minimum execution time: 22_000_000 picoseconds. + Weight::from_parts(21_878_787, 3784) + // Standard Error: 0 + .saturating_add(Weight::from_parts(121_212, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 30).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Prime` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `536 + m * (40 ±0) + p * (44 ±0)` + // Estimated: `4001 + b * (1 ±0) + m * (40 ±0) + p * (45 ±0)` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(31_493_350, 4001) + // Standard Error: 13_888 + .saturating_add(Weight::from_parts(6_944, 0).saturating_mul(m.into())) + // Standard Error: 13_468 + .saturating_add(Weight::from_parts(148_148, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 45).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Voting` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[1, 100]`. + fn disapprove_proposal(_p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `291 + p * (32 ±0)` + // Estimated: `4979` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(21_000_000, 4979) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } +} diff --git a/runtime/moonbase/src/weights/pallet_collective_treasury_council.rs b/runtime/moonbase/src/weights/pallet_collective_treasury_council.rs new file mode 100644 index 00000000000..95a4075c582 --- /dev/null +++ b/runtime/moonbase/src/weights/pallet_collective_treasury_council.rs @@ -0,0 +1,291 @@ +// Copyright 2025 Moonbeam foundation +// This file is part of Moonbeam. + +// Moonbeam is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Moonbeam is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Moonbeam. If not, see . + + +//! Autogenerated weights for `pallet_collective_treasury_council` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0 +//! DATE: 2025-03-07, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Mac`, CPU: `` +//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 + +// Executed Command: +// frame-omni-bencher +// v1 +// benchmark +// pallet +// --runtime=./target/release/wbuild/moonbase-runtime/moonbase_runtime.wasm +// --genesis-builder=runtime +// --genesis-builder-preset=development +// --steps=2 +// --repeat=1 +// --pallet=pallet_collective_treasury_council +// --extrinsic=* +// --wasm-execution=compiled +// --header=./file_header.txt +// --template=./benchmarking/frame-weight-template.hbs +// --output=./runtime/moonbase/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +use pallet_collective as pallet_collective_treasury_council; + +/// Weights for `pallet_collective_treasury_council`. +pub struct WeightInfo(PhantomData); +impl pallet_collective_treasury_council::WeightInfo for WeightInfo { + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Voting` (r:20 w:20) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Prime` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[0, 9]`. + /// The range of component `n` is `[0, 9]`. + /// The range of component `p` is `[0, 20]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + m * (493 ±0) + p * (211 ±0)` + // Estimated: `1651 + m * (313 ±108) + p * (8192 ±48)` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(7_000_000, 1651) + // Standard Error: 2_208_008 + .saturating_add(Weight::from_parts(5_179_487, 0).saturating_mul(m.into())) + // Standard Error: 993_603 + .saturating_add(Weight::from_parts(2_280_769, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 313).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 8192).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 9]`. + fn execute(_b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `208 + m * (20 ±0)` + // Estimated: `1694 + m * (20 ±0)` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 1694) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + } + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 9]`. + fn propose_execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `208 + m * (20 ±0)` + // Estimated: `3674 + m * (20 ±0)` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(13_436_521, 3674) + // Standard Error: 847 + .saturating_add(Weight::from_parts(489, 0).saturating_mul(b.into())) + // Standard Error: 108_253 + .saturating_add(Weight::from_parts(62_500, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + } + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalCount` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Voting` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 9]`. + /// The range of component `p` is `[1, 20]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `83 + m * (20 ±0) + p * (58 ±0)` + // Estimated: `3548 + m * (20 ±0) + p * (58 ±0)` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(11_561_849, 3548) + // Standard Error: 2_609 + .saturating_add(Weight::from_parts(2_283, 0).saturating_mul(b.into())) + // Standard Error: 380_952 + .saturating_add(Weight::from_parts(190_476, 0).saturating_mul(m.into())) + // Standard Error: 140_350 + .saturating_add(Weight::from_parts(385_964, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 58).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[5, 9]`. + fn vote(_m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `734 + m * (40 ±0)` + // Estimated: `4559` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_000_000, 4559) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 9]`. + /// The range of component `p` is `[1, 20]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `276 + m * (40 ±0) + p * (55 ±0)` + // Estimated: `3742 + m * (40 ±0) + p * (55 ±0)` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(16_684_210, 3742) + // Standard Error: 0 + .saturating_add(Weight::from_parts(315_789, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 55).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 9]`. + /// The range of component `p` is `[1, 20]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `242 + b * (1 ±0) + m * (40 ±0) + p * (78 ±0)` + // Estimated: `3707 + b * (1 ±0) + m * (40 ±0) + p * (79 ±0)` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(26_629_622, 3707) + // Standard Error: 0 + .saturating_add(Weight::from_parts(978, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(368_421, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 79).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Prime` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 9]`. + /// The range of component `p` is `[1, 20]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `327 + m * (32 ±0) + p * (55 ±0)` + // Estimated: `3792 + m * (32 ±0) + p * (55 ±0)` + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(18_863_157, 3792) + // Standard Error: 173_205 + .saturating_add(Weight::from_parts(100_000, 0).saturating_mul(m.into())) + // Standard Error: 45_580 + .saturating_add(Weight::from_parts(236_842, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 55).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Prime` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 9]`. + /// The range of component `p` is `[1, 20]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `260 + b * (1 ±0) + m * (40 ±0) + p * (78 ±0)` + // Estimated: `3725 + b * (1 ±0) + m * (40 ±0) + p * (79 ±0)` + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(28_478_092, 3725) + // Standard Error: 652 + .saturating_add(Weight::from_parts(1_304, 0).saturating_mul(b.into())) + // Standard Error: 35_087 + .saturating_add(Weight::from_parts(385_964, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 79).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Voting` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[1, 20]`. + fn disapprove_proposal(_p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `324 + p * (32 ±0)` + // Estimated: `2451` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 2451) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } +} diff --git a/runtime/moonbeam/src/governance/councils.rs b/runtime/moonbeam/src/governance/councils.rs index 3618d8a2189..f8ae14803af 100644 --- a/runtime/moonbeam/src/governance/councils.rs +++ b/runtime/moonbeam/src/governance/councils.rs @@ -38,7 +38,7 @@ impl pallet_collective::Config for Runtime { /// The maximum number of treasury council members. type MaxMembers = ConstU32<9>; type DefaultVote = pallet_collective::MoreThanMajorityThenPrimeDefaultVote; - type WeightInfo = moonbeam_weights::pallet_collective::WeightInfo; + type WeightInfo = moonbeam_weights::pallet_collective_treasury_council::WeightInfo; type SetMembersOrigin = referenda::GeneralAdminOrRoot; type MaxProposalWeight = MaxProposalWeight; } @@ -55,7 +55,7 @@ impl pallet_collective::Config for Runtime { /// The maximum number of technical committee members. type MaxMembers = ConstU32<100>; type DefaultVote = pallet_collective::MoreThanMajorityThenPrimeDefaultVote; - type WeightInfo = moonbeam_weights::pallet_collective::WeightInfo; + type WeightInfo = moonbeam_weights::pallet_collective_open_tech_committee::WeightInfo; type SetMembersOrigin = referenda::GeneralAdminOrRoot; type MaxProposalWeight = MaxProposalWeight; } diff --git a/runtime/moonbeam/src/lib.rs b/runtime/moonbeam/src/lib.rs index 4b0a18b0352..46f9aa23680 100644 --- a/runtime/moonbeam/src/lib.rs +++ b/runtime/moonbeam/src/lib.rs @@ -1457,6 +1457,12 @@ use moonbeam_runtime_common::deal_with_fees::{ #[cfg(feature = "runtime-benchmarks")] mod benches { + // TODO: Temporary workaround before upgrading to latest polkadot-sdk - fix https://github.com/paritytech/polkadot-sdk/pull/6435 + #[allow(unused_imports)] + use pallet_collective as pallet_collective_treasury_council; + #[allow(unused_imports)] + use pallet_collective as pallet_collective_open_tech_committee; + frame_support::parameter_types! { pub const MaxBalance: crate::Balance = crate::Balance::max_value(); } @@ -1495,6 +1501,8 @@ mod benches { [pallet_precompile_benchmarks, PrecompileBenchmarks] [pallet_parameters, Parameters] [pallet_xcm_weight_trader, XcmWeightTrader] + [pallet_collective_treasury_council, TreasuryCouncilCollective] + [pallet_collective_open_tech_committee, OpenTechCommitteeCollective] ); } diff --git a/runtime/moonbeam/src/weights/mod.rs b/runtime/moonbeam/src/weights/mod.rs index e22717e3214..891601dcbb8 100644 --- a/runtime/moonbeam/src/weights/mod.rs +++ b/runtime/moonbeam/src/weights/mod.rs @@ -25,7 +25,8 @@ pub mod pallet_author_inherent; pub mod pallet_author_mapping; pub mod pallet_author_slot_filter; pub mod pallet_balances; -pub mod pallet_collective; +pub mod pallet_collective_open_tech_committee; +pub mod pallet_collective_treasury_council; pub mod pallet_conviction_voting; pub mod pallet_crowdloan_rewards; pub mod pallet_evm; diff --git a/runtime/moonbeam/src/weights/pallet_collective.rs b/runtime/moonbeam/src/weights/pallet_collective.rs deleted file mode 100644 index 577119bd3e4..00000000000 --- a/runtime/moonbeam/src/weights/pallet_collective.rs +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright 2019-2025 PureStake Inc. -// This file is part of Moonbeam. - -// Moonbeam is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Moonbeam is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Moonbeam. If not, see . -//! Autogenerated weights for `pallet_collective` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/moonbeam -// benchmark -// pallet -// --chain=moonbase-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_collective -// --extrinsic=* -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/common/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_collective`. -pub struct WeightInfo(PhantomData); -impl pallet_collective::WeightInfo for WeightInfo { - /// Storage: CouncilCollective Members (r:1 w:1) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:0) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Voting (r:100 w:100) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Prime (r:0 w:1) - /// Proof Skipped: CouncilCollective Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[0, 100]`. - /// The range of component `n` is `[0, 100]`. - /// The range of component `p` is `[0, 100]`. - fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + m * (2021 ±0) + p * (2026 ±0)` - // Estimated: `12238 + m * (1231 ±14) + p * (3660 ±14)` - // Minimum execution time: 13_785_000 picoseconds. - Weight::from_parts(14_085_000, 0) - .saturating_add(Weight::from_parts(0, 12238)) - // Standard Error: 34_315 - .saturating_add(Weight::from_parts(2_414_144, 0).saturating_mul(m.into())) - // Standard Error: 34_315 - .saturating_add(Weight::from_parts(5_345_562, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 1231).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 3660).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: MaintenanceMode MaintenanceMode (r:1 w:0) - /// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `149 + m * (20 ±0)` - // Estimated: `1634 + m * (20 ±0)` - // Minimum execution time: 12_726_000 picoseconds. - Weight::from_parts(12_294_605, 0) - .saturating_add(Weight::from_parts(0, 1634)) - // Standard Error: 18 - .saturating_add(Weight::from_parts(910, 0).saturating_mul(b.into())) - // Standard Error: 192 - .saturating_add(Weight::from_parts(13_235, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) - } - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:1 w:0) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: MaintenanceMode MaintenanceMode (r:1 w:0) - /// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn propose_execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `149 + m * (20 ±0)` - // Estimated: `3614 + m * (20 ±0)` - // Minimum execution time: 14_722_000 picoseconds. - Weight::from_parts(14_487_427, 0) - .saturating_add(Weight::from_parts(0, 3614)) - // Standard Error: 20 - .saturating_add(Weight::from_parts(944, 0).saturating_mul(b.into())) - // Standard Error: 215 - .saturating_add(Weight::from_parts(25_619, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) - } - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:1 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalCount (r:1 w:1) - /// Proof Skipped: CouncilCollective ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Voting (r:0 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[2, 100]`. - /// The range of component `p` is `[1, 100]`. - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `395 + m * (20 ±0) + p * (36 ±0)` - // Estimated: `3789 + m * (21 ±0) + p * (36 ±0)` - // Minimum execution time: 17_107_000 picoseconds. - Weight::from_parts(15_172_014, 0) - .saturating_add(Weight::from_parts(0, 3789)) - // Standard Error: 104 - .saturating_add(Weight::from_parts(3_191, 0).saturating_mul(b.into())) - // Standard Error: 1_090 - .saturating_add(Weight::from_parts(31_145, 0).saturating_mul(m.into())) - // Standard Error: 1_077 - .saturating_add(Weight::from_parts(131_855, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 21).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[5, 100]`. - fn vote(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `870 + m * (40 ±0)` - // Estimated: `4334 + m * (40 ±0)` - // Minimum execution time: 21_423_000 picoseconds. - Weight::from_parts(22_311_906, 0) - .saturating_add(Weight::from_parts(0, 4334)) - // Standard Error: 415 - .saturating_add(Weight::from_parts(32_990, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) - } - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:0 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `447 + m * (40 ±0) + p * (36 ±0)` - // Estimated: `3892 + m * (41 ±0) + p * (36 ±0)` - // Minimum execution time: 20_010_000 picoseconds. - Weight::from_parts(20_008_777, 0) - .saturating_add(Weight::from_parts(0, 3892)) - // Standard Error: 1_391 - .saturating_add(Weight::from_parts(39_960, 0).saturating_mul(m.into())) - // Standard Error: 1_356 - .saturating_add(Weight::from_parts(126_447, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 41).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:1 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: MaintenanceMode MaintenanceMode (r:1 w:0) - /// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `791 + b * (1 ±0) + m * (40 ±0) + p * (40 ±0)` - // Estimated: `4108 + b * (1 ±0) + m * (42 ±0) + p * (40 ±0)` - // Minimum execution time: 30_647_000 picoseconds. - Weight::from_parts(30_084_699, 0) - .saturating_add(Weight::from_parts(0, 4108)) - // Standard Error: 123 - .saturating_add(Weight::from_parts(2_876, 0).saturating_mul(b.into())) - // Standard Error: 1_307 - .saturating_add(Weight::from_parts(31_661, 0).saturating_mul(m.into())) - // Standard Error: 1_274 - .saturating_add(Weight::from_parts(154_567, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 42).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Prime (r:1 w:0) - /// Proof Skipped: CouncilCollective Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:0 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `516 + m * (30 ±0) + p * (36 ±0)` - // Estimated: `3958 + m * (31 ±0) + p * (36 ±0)` - // Minimum execution time: 20_735_000 picoseconds. - Weight::from_parts(22_649_363, 0) - .saturating_add(Weight::from_parts(0, 3958)) - // Standard Error: 1_082 - .saturating_add(Weight::from_parts(32_331, 0).saturating_mul(m.into())) - // Standard Error: 1_055 - .saturating_add(Weight::from_parts(122_034, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 31).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Prime (r:1 w:0) - /// Proof Skipped: CouncilCollective Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:1 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: MaintenanceMode MaintenanceMode (r:1 w:0) - /// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `811 + b * (1 ±0) + m * (40 ±0) + p * (40 ±0)` - // Estimated: `4128 + b * (1 ±0) + m * (42 ±0) + p * (40 ±0)` - // Minimum execution time: 32_927_000 picoseconds. - Weight::from_parts(32_086_367, 0) - .saturating_add(Weight::from_parts(0, 4128)) - // Standard Error: 122 - .saturating_add(Weight::from_parts(2_962, 0).saturating_mul(b.into())) - // Standard Error: 1_299 - .saturating_add(Weight::from_parts(32_167, 0).saturating_mul(m.into())) - // Standard Error: 1_266 - .saturating_add(Weight::from_parts(154_131, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 42).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Voting (r:0 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:0 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `p` is `[1, 100]`. - fn disapprove_proposal(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `264 + p * (32 ±0)` - // Estimated: `1749 + p * (32 ±0)` - // Minimum execution time: 10_334_000 picoseconds. - Weight::from_parts(11_413_201, 0) - .saturating_add(Weight::from_parts(0, 1749)) - // Standard Error: 1_033 - .saturating_add(Weight::from_parts(95_458, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) - } -} diff --git a/runtime/moonbeam/src/weights/pallet_collective_open_tech_committee.rs b/runtime/moonbeam/src/weights/pallet_collective_open_tech_committee.rs new file mode 100644 index 00000000000..f3f69d13734 --- /dev/null +++ b/runtime/moonbeam/src/weights/pallet_collective_open_tech_committee.rs @@ -0,0 +1,295 @@ +// Copyright 2025 Moonbeam foundation +// This file is part of Moonbeam. + +// Moonbeam is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Moonbeam is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Moonbeam. If not, see . + + +//! Autogenerated weights for `pallet_collective_open_tech_committee` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0 +//! DATE: 2025-03-07, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Mac`, CPU: `` +//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 + +// Executed Command: +// frame-omni-bencher +// v1 +// benchmark +// pallet +// --runtime=./target/release/wbuild/moonbeam-runtime/moonbeam_runtime.wasm +// --genesis-builder=runtime +// --genesis-builder-preset=development +// --steps=2 +// --repeat=1 +// --pallet=pallet_collective_open_tech_committee +// --extrinsic=* +// --wasm-execution=compiled +// --header=./file_header.txt +// --template=./benchmarking/frame-weight-template.hbs +// --output=./runtime/moonbeam/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +use pallet_collective as pallet_collective_open_tech_committee; + +/// Weights for `pallet_collective_open_tech_committee`. +pub struct WeightInfo(PhantomData); +impl pallet_collective_open_tech_committee::WeightInfo for WeightInfo { + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Voting` (r:100 w:100) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Prime` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + m * (2048 ±0) + p * (2027 ±0)` + // Estimated: `1585 + m * (65536 ±2_000_011_713_608_241_905_664) + p * (1248 ±467)` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(12_000_000, 1585) + // Standard Error: 1_898_490 + .saturating_add(Weight::from_parts(4_542_307, 0).saturating_mul(m.into())) + // Standard Error: 1_898_490 + .saturating_add(Weight::from_parts(4_492_307, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 65536).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 1248).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn execute(_b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `142 + m * (20 ±0)` + // Estimated: `1628 + m * (20 ±0)` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_495_927, 1628) + // Standard Error: 8_747 + .saturating_add(Weight::from_parts(5_050, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + } + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn propose_execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `142 + m * (20 ±0)` + // Estimated: `3608 + m * (20 ±0)` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(12_975_884, 3608) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1_956, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(20_202, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + } + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalCount` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Voting` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `37 + m * (20 ±0) + p * (39 ±0)` + // Estimated: `3502 + m * (20 ±0) + p * (39 ±0)` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(9_043_088, 3502) + // Standard Error: 4_566 + .saturating_add(Weight::from_parts(3_261, 0).saturating_mul(b.into())) + // Standard Error: 47_619 + .saturating_add(Weight::from_parts(44_217, 0).saturating_mul(m.into())) + // Standard Error: 47_138 + .saturating_add(Weight::from_parts(195_286, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[5, 100]`. + fn vote(_m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `865 + m * (40 ±0)` + // Estimated: `8333` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(19_000_000, 8333) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `227 + m * (40 ±0) + p * (38 ±0)` + // Estimated: `3692 + m * (40 ±0) + p * (39 ±0)` + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(9_825_126, 3692) + // Standard Error: 99_232 + .saturating_add(Weight::from_parts(109_375, 0).saturating_mul(m.into())) + // Standard Error: 96_225 + .saturating_add(Weight::from_parts(237_373, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `484 + m * (40 ±0) + p * (44 ±0)` + // Estimated: `3949 + b * (1 ±0) + m * (40 ±0) + p * (45 ±0)` + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(27_076_053, 3949) + // Standard Error: 15_003 + .saturating_add(Weight::from_parts(8_480, 0).saturating_mul(b.into())) + // Standard Error: 159_722 + .saturating_add(Weight::from_parts(121_527, 0).saturating_mul(m.into())) + // Standard Error: 154_882 + .saturating_add(Weight::from_parts(87_542, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 45).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Prime` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `285 + m * (30 ±0) + p * (38 ±0)` + // Estimated: `3751 + m * (30 ±0) + p * (39 ±0)` + // Minimum execution time: 24_000_000 picoseconds. + Weight::from_parts(28_470_328, 3751) + // Standard Error: 61_234 + .saturating_add(Weight::from_parts(217_171, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 30).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Prime` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `503 + m * (40 ±0) + p * (44 ±0)` + // Estimated: `3968 + b * (1 ±0) + m * (40 ±0) + p * (45 ±0)` + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(54_476_491, 3968) + // Standard Error: 18_373 + .saturating_add(Weight::from_parts(17_361, 0).saturating_mul(m.into())) + // Standard Error: 17_816 + .saturating_add(Weight::from_parts(168_350, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 45).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Voting` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[1, 100]`. + fn disapprove_proposal(_p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `258 + p * (32 ±0)` + // Estimated: `4946` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(22_000_000, 4946) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } +} diff --git a/runtime/moonbeam/src/weights/pallet_collective_treasury_council.rs b/runtime/moonbeam/src/weights/pallet_collective_treasury_council.rs new file mode 100644 index 00000000000..1759e8dcb3a --- /dev/null +++ b/runtime/moonbeam/src/weights/pallet_collective_treasury_council.rs @@ -0,0 +1,291 @@ +// Copyright 2025 Moonbeam foundation +// This file is part of Moonbeam. + +// Moonbeam is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Moonbeam is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Moonbeam. If not, see . + + +//! Autogenerated weights for `pallet_collective_treasury_council` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0 +//! DATE: 2025-03-07, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Mac`, CPU: `` +//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 + +// Executed Command: +// frame-omni-bencher +// v1 +// benchmark +// pallet +// --runtime=./target/release/wbuild/moonbeam-runtime/moonbeam_runtime.wasm +// --genesis-builder=runtime +// --genesis-builder-preset=development +// --steps=2 +// --repeat=1 +// --pallet=pallet_collective_treasury_council +// --extrinsic=* +// --wasm-execution=compiled +// --header=./file_header.txt +// --template=./benchmarking/frame-weight-template.hbs +// --output=./runtime/moonbeam/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +use pallet_collective as pallet_collective_treasury_council; + +/// Weights for `pallet_collective_treasury_council`. +pub struct WeightInfo(PhantomData); +impl pallet_collective_treasury_council::WeightInfo for WeightInfo { + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Voting` (r:20 w:20) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Prime` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[0, 9]`. + /// The range of component `n` is `[0, 9]`. + /// The range of component `p` is `[0, 20]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + m * (493 ±0) + p * (211 ±0)` + // Estimated: `1651 + m * (313 ±108) + p * (8192 ±48)` + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(8_000_000, 1651) + // Standard Error: 2_656_002 + .saturating_add(Weight::from_parts(5_205_128, 0).saturating_mul(m.into())) + // Standard Error: 1_195_201 + .saturating_add(Weight::from_parts(2_442_307, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 313).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 8192).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 9]`. + fn execute(_b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `208 + m * (20 ±0)` + // Estimated: `1694 + m * (20 ±0)` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(11_875_000, 1694) + // Standard Error: 0 + .saturating_add(Weight::from_parts(125_000, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + } + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 9]`. + fn propose_execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `208 + m * (20 ±0)` + // Estimated: `3674 + m * (20 ±0)` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(21_309_564, 3674) + // Standard Error: 2_542 + .saturating_add(Weight::from_parts(1_467, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + } + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalCount` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Voting` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 9]`. + /// The range of component `p` is `[1, 20]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `83 + m * (20 ±0) + p * (58 ±0)` + // Estimated: `3548 + m * (20 ±0) + p * (58 ±0)` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(11_678_442, 3548) + // Standard Error: 1_725 + .saturating_add(Weight::from_parts(1_630, 0).saturating_mul(b.into())) + // Standard Error: 251_976 + .saturating_add(Weight::from_parts(238_095, 0).saturating_mul(m.into())) + // Standard Error: 92_833 + .saturating_add(Weight::from_parts(508_771, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 58).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[5, 9]`. + fn vote(_m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `734 + m * (40 ±0)` + // Estimated: `4559` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(19_000_000, 4559) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 9]`. + /// The range of component `p` is `[1, 20]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `276 + m * (40 ±0) + p * (55 ±0)` + // Estimated: `3742 + m * (40 ±0) + p * (55 ±0)` + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(22_263_157, 3742) + // Standard Error: 45_580 + .saturating_add(Weight::from_parts(236_842, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 55).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 9]`. + /// The range of component `p` is `[1, 20]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `242 + b * (1 ±0) + m * (40 ±0) + p * (78 ±0)` + // Estimated: `3707 + b * (1 ±0) + m * (40 ±0) + p * (79 ±0)` + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(26_675_888, 3707) + // Standard Error: 2_351 + .saturating_add(Weight::from_parts(652, 0).saturating_mul(b.into())) + // Standard Error: 480_740 + .saturating_add(Weight::from_parts(133_333, 0).saturating_mul(m.into())) + // Standard Error: 126_510 + .saturating_add(Weight::from_parts(456_140, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 79).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Prime` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 9]`. + /// The range of component `p` is `[1, 20]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `327 + m * (32 ±0) + p * (55 ±0)` + // Estimated: `3792 + m * (32 ±0) + p * (55 ±0)` + // Minimum execution time: 24_000_000 picoseconds. + Weight::from_parts(42_021_052, 3792) + // Standard Error: 173_205 + .saturating_add(Weight::from_parts(100_000, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 55).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Prime` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 9]`. + /// The range of component `p` is `[1, 20]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `260 + b * (1 ±0) + m * (40 ±0) + p * (78 ±0)` + // Estimated: `3725 + b * (1 ±0) + m * (40 ±0) + p * (79 ±0)` + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(37_530_724, 3725) + // Standard Error: 652 + .saturating_add(Weight::from_parts(1_304, 0).saturating_mul(b.into())) + // Standard Error: 35_087 + .saturating_add(Weight::from_parts(333_333, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 79).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Voting` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[1, 20]`. + fn disapprove_proposal(_p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `324 + p * (32 ±0)` + // Estimated: `2451` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(22_000_000, 2451) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } +} diff --git a/runtime/moonriver/src/governance/councils.rs b/runtime/moonriver/src/governance/councils.rs index dd008234f50..574311c3056 100644 --- a/runtime/moonriver/src/governance/councils.rs +++ b/runtime/moonriver/src/governance/councils.rs @@ -38,7 +38,7 @@ impl pallet_collective::Config for Runtime { /// The maximum number of treasury council members. type MaxMembers = ConstU32<9>; type DefaultVote = pallet_collective::MoreThanMajorityThenPrimeDefaultVote; - type WeightInfo = moonriver_weights::pallet_collective::WeightInfo; + type WeightInfo = moonriver_weights::pallet_collective_treasury_council::WeightInfo; type SetMembersOrigin = referenda::GeneralAdminOrRoot; type MaxProposalWeight = MaxProposalWeight; } @@ -55,7 +55,7 @@ impl pallet_collective::Config for Runtime { /// The maximum number of technical committee members. type MaxMembers = ConstU32<100>; type DefaultVote = pallet_collective::MoreThanMajorityThenPrimeDefaultVote; - type WeightInfo = moonriver_weights::pallet_collective::WeightInfo; + type WeightInfo = moonriver_weights::pallet_collective_open_tech_committee::WeightInfo; type SetMembersOrigin = referenda::GeneralAdminOrRoot; type MaxProposalWeight = MaxProposalWeight; } diff --git a/runtime/moonriver/src/lib.rs b/runtime/moonriver/src/lib.rs index 906fa7fb858..5a71a81fdff 100644 --- a/runtime/moonriver/src/lib.rs +++ b/runtime/moonriver/src/lib.rs @@ -1458,6 +1458,12 @@ construct_runtime! { use moonbeam_runtime_common::benchmarking::BenchmarkHelper; #[cfg(feature = "runtime-benchmarks")] mod benches { + // TODO: Temporary workaround before upgrading to latest polkadot-sdk - fix https://github.com/paritytech/polkadot-sdk/pull/6435 + #[allow(unused_imports)] + use pallet_collective as pallet_collective_treasury_council; + #[allow(unused_imports)] + use pallet_collective as pallet_collective_open_tech_committee; + frame_support::parameter_types! { pub const MaxBalance: crate::Balance = crate::Balance::max_value(); } @@ -1496,6 +1502,8 @@ mod benches { [pallet_precompile_benchmarks, PrecompileBenchmarks] [pallet_parameters, Parameters] [pallet_xcm_weight_trader, XcmWeightTrader] + [pallet_collective_treasury_council, TreasuryCouncilCollective] + [pallet_collective_open_tech_committee, OpenTechCommitteeCollective] ); } diff --git a/runtime/moonriver/src/weights/mod.rs b/runtime/moonriver/src/weights/mod.rs index e22717e3214..891601dcbb8 100644 --- a/runtime/moonriver/src/weights/mod.rs +++ b/runtime/moonriver/src/weights/mod.rs @@ -25,7 +25,8 @@ pub mod pallet_author_inherent; pub mod pallet_author_mapping; pub mod pallet_author_slot_filter; pub mod pallet_balances; -pub mod pallet_collective; +pub mod pallet_collective_open_tech_committee; +pub mod pallet_collective_treasury_council; pub mod pallet_conviction_voting; pub mod pallet_crowdloan_rewards; pub mod pallet_evm; diff --git a/runtime/moonriver/src/weights/pallet_collective.rs b/runtime/moonriver/src/weights/pallet_collective.rs deleted file mode 100644 index 577119bd3e4..00000000000 --- a/runtime/moonriver/src/weights/pallet_collective.rs +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright 2019-2025 PureStake Inc. -// This file is part of Moonbeam. - -// Moonbeam is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Moonbeam is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Moonbeam. If not, see . -//! Autogenerated weights for `pallet_collective` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/moonbeam -// benchmark -// pallet -// --chain=moonbase-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_collective -// --extrinsic=* -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/common/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_collective`. -pub struct WeightInfo(PhantomData); -impl pallet_collective::WeightInfo for WeightInfo { - /// Storage: CouncilCollective Members (r:1 w:1) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:0) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Voting (r:100 w:100) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Prime (r:0 w:1) - /// Proof Skipped: CouncilCollective Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[0, 100]`. - /// The range of component `n` is `[0, 100]`. - /// The range of component `p` is `[0, 100]`. - fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + m * (2021 ±0) + p * (2026 ±0)` - // Estimated: `12238 + m * (1231 ±14) + p * (3660 ±14)` - // Minimum execution time: 13_785_000 picoseconds. - Weight::from_parts(14_085_000, 0) - .saturating_add(Weight::from_parts(0, 12238)) - // Standard Error: 34_315 - .saturating_add(Weight::from_parts(2_414_144, 0).saturating_mul(m.into())) - // Standard Error: 34_315 - .saturating_add(Weight::from_parts(5_345_562, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 1231).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 3660).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: MaintenanceMode MaintenanceMode (r:1 w:0) - /// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `149 + m * (20 ±0)` - // Estimated: `1634 + m * (20 ±0)` - // Minimum execution time: 12_726_000 picoseconds. - Weight::from_parts(12_294_605, 0) - .saturating_add(Weight::from_parts(0, 1634)) - // Standard Error: 18 - .saturating_add(Weight::from_parts(910, 0).saturating_mul(b.into())) - // Standard Error: 192 - .saturating_add(Weight::from_parts(13_235, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) - } - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:1 w:0) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: MaintenanceMode MaintenanceMode (r:1 w:0) - /// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn propose_execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `149 + m * (20 ±0)` - // Estimated: `3614 + m * (20 ±0)` - // Minimum execution time: 14_722_000 picoseconds. - Weight::from_parts(14_487_427, 0) - .saturating_add(Weight::from_parts(0, 3614)) - // Standard Error: 20 - .saturating_add(Weight::from_parts(944, 0).saturating_mul(b.into())) - // Standard Error: 215 - .saturating_add(Weight::from_parts(25_619, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) - } - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:1 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalCount (r:1 w:1) - /// Proof Skipped: CouncilCollective ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Voting (r:0 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[2, 100]`. - /// The range of component `p` is `[1, 100]`. - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `395 + m * (20 ±0) + p * (36 ±0)` - // Estimated: `3789 + m * (21 ±0) + p * (36 ±0)` - // Minimum execution time: 17_107_000 picoseconds. - Weight::from_parts(15_172_014, 0) - .saturating_add(Weight::from_parts(0, 3789)) - // Standard Error: 104 - .saturating_add(Weight::from_parts(3_191, 0).saturating_mul(b.into())) - // Standard Error: 1_090 - .saturating_add(Weight::from_parts(31_145, 0).saturating_mul(m.into())) - // Standard Error: 1_077 - .saturating_add(Weight::from_parts(131_855, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 21).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[5, 100]`. - fn vote(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `870 + m * (40 ±0)` - // Estimated: `4334 + m * (40 ±0)` - // Minimum execution time: 21_423_000 picoseconds. - Weight::from_parts(22_311_906, 0) - .saturating_add(Weight::from_parts(0, 4334)) - // Standard Error: 415 - .saturating_add(Weight::from_parts(32_990, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) - } - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:0 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `447 + m * (40 ±0) + p * (36 ±0)` - // Estimated: `3892 + m * (41 ±0) + p * (36 ±0)` - // Minimum execution time: 20_010_000 picoseconds. - Weight::from_parts(20_008_777, 0) - .saturating_add(Weight::from_parts(0, 3892)) - // Standard Error: 1_391 - .saturating_add(Weight::from_parts(39_960, 0).saturating_mul(m.into())) - // Standard Error: 1_356 - .saturating_add(Weight::from_parts(126_447, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 41).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:1 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: MaintenanceMode MaintenanceMode (r:1 w:0) - /// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `791 + b * (1 ±0) + m * (40 ±0) + p * (40 ±0)` - // Estimated: `4108 + b * (1 ±0) + m * (42 ±0) + p * (40 ±0)` - // Minimum execution time: 30_647_000 picoseconds. - Weight::from_parts(30_084_699, 0) - .saturating_add(Weight::from_parts(0, 4108)) - // Standard Error: 123 - .saturating_add(Weight::from_parts(2_876, 0).saturating_mul(b.into())) - // Standard Error: 1_307 - .saturating_add(Weight::from_parts(31_661, 0).saturating_mul(m.into())) - // Standard Error: 1_274 - .saturating_add(Weight::from_parts(154_567, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 42).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Prime (r:1 w:0) - /// Proof Skipped: CouncilCollective Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:0 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `516 + m * (30 ±0) + p * (36 ±0)` - // Estimated: `3958 + m * (31 ±0) + p * (36 ±0)` - // Minimum execution time: 20_735_000 picoseconds. - Weight::from_parts(22_649_363, 0) - .saturating_add(Weight::from_parts(0, 3958)) - // Standard Error: 1_082 - .saturating_add(Weight::from_parts(32_331, 0).saturating_mul(m.into())) - // Standard Error: 1_055 - .saturating_add(Weight::from_parts(122_034, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 31).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Voting (r:1 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective Members (r:1 w:0) - /// Proof Skipped: CouncilCollective Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Prime (r:1 w:0) - /// Proof Skipped: CouncilCollective Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:1 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: MaintenanceMode MaintenanceMode (r:1 w:0) - /// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `811 + b * (1 ±0) + m * (40 ±0) + p * (40 ±0)` - // Estimated: `4128 + b * (1 ±0) + m * (42 ±0) + p * (40 ±0)` - // Minimum execution time: 32_927_000 picoseconds. - Weight::from_parts(32_086_367, 0) - .saturating_add(Weight::from_parts(0, 4128)) - // Standard Error: 122 - .saturating_add(Weight::from_parts(2_962, 0).saturating_mul(b.into())) - // Standard Error: 1_299 - .saturating_add(Weight::from_parts(32_167, 0).saturating_mul(m.into())) - // Standard Error: 1_266 - .saturating_add(Weight::from_parts(154_131, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 42).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) - } - /// Storage: CouncilCollective Proposals (r:1 w:1) - /// Proof Skipped: CouncilCollective Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: CouncilCollective Voting (r:0 w:1) - /// Proof Skipped: CouncilCollective Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: CouncilCollective ProposalOf (r:0 w:1) - /// Proof Skipped: CouncilCollective ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `p` is `[1, 100]`. - fn disapprove_proposal(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `264 + p * (32 ±0)` - // Estimated: `1749 + p * (32 ±0)` - // Minimum execution time: 10_334_000 picoseconds. - Weight::from_parts(11_413_201, 0) - .saturating_add(Weight::from_parts(0, 1749)) - // Standard Error: 1_033 - .saturating_add(Weight::from_parts(95_458, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) - } -} diff --git a/runtime/moonriver/src/weights/pallet_collective_open_tech_committee.rs b/runtime/moonriver/src/weights/pallet_collective_open_tech_committee.rs new file mode 100644 index 00000000000..50ef211166e --- /dev/null +++ b/runtime/moonriver/src/weights/pallet_collective_open_tech_committee.rs @@ -0,0 +1,293 @@ +// Copyright 2025 Moonbeam foundation +// This file is part of Moonbeam. + +// Moonbeam is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Moonbeam is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Moonbeam. If not, see . + + +//! Autogenerated weights for `pallet_collective_open_tech_committee` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0 +//! DATE: 2025-03-07, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Mac`, CPU: `` +//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 + +// Executed Command: +// frame-omni-bencher +// v1 +// benchmark +// pallet +// --runtime=./target/release/wbuild/moonriver-runtime/moonriver_runtime.wasm +// --genesis-builder=runtime +// --genesis-builder-preset=development +// --steps=2 +// --repeat=1 +// --pallet=pallet_collective_open_tech_committee +// --extrinsic=* +// --wasm-execution=compiled +// --header=./file_header.txt +// --template=./benchmarking/frame-weight-template.hbs +// --output=./runtime/moonriver/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +use pallet_collective as pallet_collective_open_tech_committee; + +/// Weights for `pallet_collective_open_tech_committee`. +pub struct WeightInfo(PhantomData); +impl pallet_collective_open_tech_committee::WeightInfo for WeightInfo { + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Voting` (r:100 w:100) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Prime` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + m * (2048 ±0) + p * (2027 ±0)` + // Estimated: `1585 + m * (65536 ±467) + p * (1248 ±467)` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 1585) + // Standard Error: 1_801_570 + .saturating_add(Weight::from_parts(4_481_538, 0).saturating_mul(m.into())) + // Standard Error: 1_801_570 + .saturating_add(Weight::from_parts(4_451_538, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 65536).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 1248).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `142 + m * (20 ±0)` + // Estimated: `1628 + m * (20 ±0)` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(11_987_942, 1628) + // Standard Error: 0 + .saturating_add(Weight::from_parts(978, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(10_101, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + } + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn propose_execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `142 + m * (20 ±0)` + // Estimated: `3608 + m * (20 ±0)` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(12_975_884, 3608) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1_956, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(20_202, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + } + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalCount` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Voting` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `37 + m * (20 ±0) + p * (39 ±0)` + // Estimated: `3502 + m * (20 ±0) + p * (39 ±0)` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(16_171_202, 3502) + // Standard Error: 652 + .saturating_add(Weight::from_parts(326, 0).saturating_mul(b.into())) + // Standard Error: 6_734 + .saturating_add(Weight::from_parts(175_084, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[5, 100]`. + fn vote(_m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `865 + m * (40 ±0)` + // Estimated: `8333` + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(19_000_000, 8333) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `227 + m * (40 ±0) + p * (38 ±0)` + // Estimated: `3692 + m * (40 ±0) + p * (39 ±0)` + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(19_342_803, 3692) + // Standard Error: 9_021 + .saturating_add(Weight::from_parts(5_208, 0).saturating_mul(m.into())) + // Standard Error: 8_747 + .saturating_add(Weight::from_parts(136_363, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `484 + m * (40 ±0) + p * (44 ±0)` + // Estimated: `3949 + b * (1 ±0) + m * (40 ±0) + p * (45 ±0)` + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(37_824_430, 3949) + // Standard Error: 0 + .saturating_add(Weight::from_parts(10_416, 0).saturating_mul(m.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(151_515, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 45).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Prime` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `285 + m * (30 ±0) + p * (38 ±0)` + // Estimated: `3751 + m * (30 ±0) + p * (39 ±0)` + // Minimum execution time: 22_000_000 picoseconds. + Weight::from_parts(19_775_252, 3751) + // Standard Error: 18_042 + .saturating_add(Weight::from_parts(20_833, 0).saturating_mul(m.into())) + // Standard Error: 17_495 + .saturating_add(Weight::from_parts(141_414, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 30).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Voting` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Members` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Prime` (r:1 w:0) + /// Proof: `OpenTechCommitteeCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `503 + m * (40 ±0) + p * (44 ±0)` + // Estimated: `3968 + b * (1 ±0) + m * (40 ±0) + p * (45 ±0)` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(34_211_447, 3968) + // Standard Error: 6_734 + .saturating_add(Weight::from_parts(154_882, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 45).saturating_mul(p.into())) + } + /// Storage: `OpenTechCommitteeCollective::Proposals` (r:1 w:1) + /// Proof: `OpenTechCommitteeCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::Voting` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `OpenTechCommitteeCollective::ProposalOf` (r:0 w:1) + /// Proof: `OpenTechCommitteeCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[1, 100]`. + fn disapprove_proposal(_p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `258 + p * (32 ±0)` + // Estimated: `4946` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(22_000_000, 4946) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } +} diff --git a/runtime/moonriver/src/weights/pallet_collective_treasury_council.rs b/runtime/moonriver/src/weights/pallet_collective_treasury_council.rs new file mode 100644 index 00000000000..c1ec923ea75 --- /dev/null +++ b/runtime/moonriver/src/weights/pallet_collective_treasury_council.rs @@ -0,0 +1,295 @@ +// Copyright 2025 Moonbeam foundation +// This file is part of Moonbeam. + +// Moonbeam is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Moonbeam is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Moonbeam. If not, see . + + +//! Autogenerated weights for `pallet_collective_treasury_council` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0 +//! DATE: 2025-03-07, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Mac`, CPU: `` +//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 + +// Executed Command: +// frame-omni-bencher +// v1 +// benchmark +// pallet +// --runtime=./target/release/wbuild/moonriver-runtime/moonriver_runtime.wasm +// --genesis-builder=runtime +// --genesis-builder-preset=development +// --steps=2 +// --repeat=1 +// --pallet=pallet_collective_treasury_council +// --extrinsic=* +// --wasm-execution=compiled +// --header=./file_header.txt +// --template=./benchmarking/frame-weight-template.hbs +// --output=./runtime/moonriver/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +use pallet_collective as pallet_collective_treasury_council; + +/// Weights for `pallet_collective_treasury_council`. +pub struct WeightInfo(PhantomData); +impl pallet_collective_treasury_council::WeightInfo for WeightInfo { + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Voting` (r:20 w:20) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Prime` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[0, 9]`. + /// The range of component `n` is `[0, 9]`. + /// The range of component `p` is `[0, 20]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + m * (493 ±0) + p * (211 ±0)` + // Estimated: `1651 + m * (313 ±108) + p * (8192 ±48)` + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(8_000_000, 1651) + // Standard Error: 2_454_584 + .saturating_add(Weight::from_parts(5_341_880, 0).saturating_mul(m.into())) + // Standard Error: 1_104_562 + .saturating_add(Weight::from_parts(2_353_846, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 313).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 8192).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 9]`. + fn execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `208 + m * (20 ±0)` + // Estimated: `1694 + m * (20 ±0)` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(5_674_779, 1694) + // Standard Error: 9_321 + .saturating_add(Weight::from_parts(6_360, 0).saturating_mul(b.into())) + // Standard Error: 1_190_784 + .saturating_add(Weight::from_parts(812_500, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + } + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 9]`. + fn propose_execute(_b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `208 + m * (20 ±0)` + // Estimated: `3674 + m * (20 ±0)` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(14_750_000, 3674) + // Standard Error: 433_012 + .saturating_add(Weight::from_parts(250_000, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + } + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalCount` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Voting` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 9]`. + /// The range of component `p` is `[1, 20]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `83 + m * (20 ±0) + p * (58 ±0)` + // Estimated: `3548 + m * (20 ±0) + p * (58 ±0)` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(9_843_753, 3548) + // Standard Error: 2_989 + .saturating_add(Weight::from_parts(2_935, 0).saturating_mul(b.into())) + // Standard Error: 436_435 + .saturating_add(Weight::from_parts(285_714, 0).saturating_mul(m.into())) + // Standard Error: 160_792 + .saturating_add(Weight::from_parts(578_947, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(Weight::from_parts(0, 20).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 58).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[5, 9]`. + fn vote(_m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `734 + m * (40 ±0)` + // Estimated: `4559` + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_000_000, 4559) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 9]`. + /// The range of component `p` is `[1, 20]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `276 + m * (40 ±0) + p * (55 ±0)` + // Estimated: `3742 + m * (40 ±0) + p * (55 ±0)` + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(18_757_894, 3742) + // Standard Error: 866_025 + .saturating_add(Weight::from_parts(100_000, 0).saturating_mul(m.into())) + // Standard Error: 227_901 + .saturating_add(Weight::from_parts(342_105, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 55).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 9]`. + /// The range of component `p` is `[1, 20]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `242 + b * (1 ±0) + m * (40 ±0) + p * (78 ±0)` + // Estimated: `3707 + b * (1 ±0) + m * (40 ±0) + p * (79 ±0)` + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(25_417_385, 3707) + // Standard Error: 4_277 + .saturating_add(Weight::from_parts(3_587, 0).saturating_mul(b.into())) + // Standard Error: 230_085 + .saturating_add(Weight::from_parts(508_771, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 79).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Prime` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `m` is `[4, 9]`. + /// The range of component `p` is `[1, 20]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `327 + m * (32 ±0) + p * (55 ±0)` + // Estimated: `3792 + m * (32 ±0) + p * (55 ±0)` + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(21_715_789, 3792) + // Standard Error: 45_580 + .saturating_add(Weight::from_parts(184_210, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 55).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Voting` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Members` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Prime` (r:1 w:0) + /// Proof: `TreasuryCouncilCollective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) + /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 9]`. + /// The range of component `p` is `[1, 20]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `260 + b * (1 ±0) + m * (40 ±0) + p * (78 ±0)` + // Estimated: `3725 + b * (1 ±0) + m * (40 ±0) + p * (79 ±0)` + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(27_678_092, 3725) + // Standard Error: 652 + .saturating_add(Weight::from_parts(1_304, 0).saturating_mul(b.into())) + // Standard Error: 133_333 + .saturating_add(Weight::from_parts(66_666, 0).saturating_mul(m.into())) + // Standard Error: 35_087 + .saturating_add(Weight::from_parts(385_964, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 79).saturating_mul(p.into())) + } + /// Storage: `TreasuryCouncilCollective::Proposals` (r:1 w:1) + /// Proof: `TreasuryCouncilCollective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::Voting` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TreasuryCouncilCollective::ProposalOf` (r:0 w:1) + /// Proof: `TreasuryCouncilCollective::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[1, 20]`. + fn disapprove_proposal(_p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `324 + p * (32 ±0)` + // Estimated: `2451` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(15_000_000, 2451) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } +} diff --git a/scripts/run-benches-for-runtime.sh b/scripts/run-benches-for-runtime.sh index f35c251b6e5..7d9d2eb282e 100755 --- a/scripts/run-benches-for-runtime.sh +++ b/scripts/run-benches-for-runtime.sh @@ -42,7 +42,7 @@ for PALLET in "${PALLETS[@]}"; do fi OUTPUT=$( - ./target/${profile}/moonbeam benchmark pallet \ + ./frame-omni-bencher v1 benchmark pallet \ --runtime="./target/${profile}/wbuild/${runtime}-runtime/${runtime}_runtime.wasm" \ --genesis-builder=runtime \ --genesis-builder-preset=development \ @@ -53,7 +53,7 @@ for PALLET in "${PALLETS[@]}"; do --wasm-execution=compiled \ --header=./file_header.txt \ --template=./benchmarking/frame-weight-template.hbs \ - --output="./runtime/${output}/src/weights/${output_file}" 2>&1 + --output="./runtime/${output}/src/weights" 2>&1 ) if [ $? -ne 0 ]; then echo "$OUTPUT" >> "$ERR_FILE"