feat: Rebrand Polkadot/Substrate references to PezkuwiChain

This commit systematically rebrands various references from Parity Technologies'
Polkadot/Substrate ecosystem to PezkuwiChain within the kurdistan-sdk.

Key changes include:
- Updated external repository URLs (zombienet-sdk, parity-db, parity-scale-codec, wasm-instrument) to point to pezkuwichain forks.
- Modified internal documentation and code comments to reflect PezkuwiChain naming and structure.
- Replaced direct references to  with  or specific paths within the  for XCM, Pezkuwi, and other modules.
- Cleaned up deprecated  issue and PR references in various  and  files, particularly in  and  modules.
- Adjusted image and logo URLs in documentation to point to PezkuwiChain assets.
- Removed or rephrased comments related to external Polkadot/Substrate PRs and issues.

This is a significant step towards fully customizing the SDK for the PezkuwiChain ecosystem.
This commit is contained in:
2025-12-14 00:04:10 +03:00
parent 286de54384
commit 1c0e57d984
9084 changed files with 997839 additions and 997557 deletions
@@ -0,0 +1,295 @@
[package]
name = "collectives-zagros-runtime"
version = "3.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "Zagros Collectives Teyrchain Runtime"
homepage.workspace = true
repository.workspace = true
[lints]
workspace = true
[dependencies]
codec = { features = ["derive", "max-encoded-len"], workspace = true }
hex-literal = { workspace = true, default-features = true }
scale-info = { features = ["derive"], workspace = true }
serde_json = { features = ["alloc"], workspace = true }
tracing = { workspace = true }
# Bizinikiwi
pezframe-benchmarking = { optional = true, workspace = true }
pezframe-executive = { workspace = true }
pezframe-metadata-hash-extension = { workspace = true }
pezframe-support = { workspace = true }
pezframe-system = { workspace = true }
pezframe-system-benchmarking = { optional = true, workspace = true }
pezframe-system-rpc-runtime-api = { workspace = true }
pezframe-try-runtime = { optional = true, workspace = true }
pezpallet-alliance = { workspace = true }
pezpallet-asset-rate = { workspace = true }
pezpallet-aura = { workspace = true }
pezpallet-authorship = { workspace = true }
pezpallet-balances = { workspace = true }
pezpallet-collective = { workspace = true }
pezpallet-core-fellowship = { workspace = true }
pezpallet-multisig = { workspace = true }
pezpallet-preimage = { workspace = true }
pezpallet-proxy = { workspace = true }
pezpallet-ranked-collective = { workspace = true }
pezpallet-referenda = { workspace = true }
pezpallet-salary = { workspace = true }
pezpallet-scheduler = { workspace = true }
pezpallet-session = { workspace = true }
pezpallet-state-trie-migration = { workspace = true }
pezpallet-timestamp = { workspace = true }
pezpallet-transaction-payment = { workspace = true }
pezpallet-transaction-payment-rpc-runtime-api = { workspace = true }
pezpallet-treasury = { workspace = true }
pezpallet-utility = { workspace = true }
pezsp-api = { workspace = true }
pezsp-arithmetic = { workspace = true }
pezsp-block-builder = { workspace = true }
pezsp-consensus-aura = { workspace = true }
pezsp-core = { workspace = true }
pezsp-genesis-builder = { workspace = true }
pezsp-inherents = { workspace = true }
pezsp-keyring = { workspace = true }
pezsp-offchain = { workspace = true }
pezsp-runtime = { workspace = true }
pezsp-session = { workspace = true }
pezsp-std = { workspace = true }
pezsp-storage = { workspace = true }
pezsp-transaction-pool = { workspace = true }
pezsp-version = { workspace = true }
# Pezkuwi
pezpallet-xcm = { workspace = true }
pezpallet-xcm-benchmarks = { optional = true, workspace = true }
pezkuwi-runtime-common = { workspace = true }
pezkuwi-teyrchain-primitives = { workspace = true }
xcm = { workspace = true }
xcm-builder = { workspace = true }
xcm-executor = { workspace = true }
xcm-runtime-apis = { workspace = true }
zagros-runtime-constants = { workspace = true }
# Pezcumulus
pezcumulus-pezpallet-aura-ext = { workspace = true }
pezcumulus-pezpallet-session-benchmarking = { workspace = true }
pezcumulus-pezpallet-teyrchain-system = { workspace = true }
pezcumulus-pezpallet-weight-reclaim = { workspace = true }
pezcumulus-pezpallet-xcm = { workspace = true }
pezcumulus-pezpallet-xcmp-queue = { workspace = true }
pezcumulus-primitives-aura = { workspace = true }
pezcumulus-primitives-core = { workspace = true }
pezcumulus-primitives-utility = { workspace = true }
pezpallet-message-queue = { workspace = true }
pezpallet-collator-selection = { workspace = true }
pezpallet-collective-content = { workspace = true }
testnet-teyrchains-constants = { features = ["zagros"], workspace = true }
teyrchain-info = { workspace = true }
teyrchains-common = { workspace = true }
[dev-dependencies]
pezsp-io = { features = ["std"], workspace = true, default-features = true }
teyrchains-runtimes-test-utils = { workspace = true, default-features = true }
[build-dependencies]
bizinikiwi-wasm-builder = { optional = true, workspace = true, default-features = true }
[features]
default = ["std"]
runtime-benchmarks = [
"pezcumulus-pezpallet-aura-ext/runtime-benchmarks",
"pezcumulus-pezpallet-session-benchmarking/runtime-benchmarks",
"pezcumulus-pezpallet-teyrchain-system/runtime-benchmarks",
"pezcumulus-pezpallet-weight-reclaim/runtime-benchmarks",
"pezcumulus-pezpallet-xcm/runtime-benchmarks",
"pezcumulus-pezpallet-xcmp-queue/runtime-benchmarks",
"pezcumulus-primitives-aura/runtime-benchmarks",
"pezcumulus-primitives-core/runtime-benchmarks",
"pezcumulus-primitives-utility/runtime-benchmarks",
"pezframe-benchmarking/runtime-benchmarks",
"pezframe-executive/runtime-benchmarks",
"pezframe-metadata-hash-extension/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezframe-system-benchmarking/runtime-benchmarks",
"pezframe-system-rpc-runtime-api/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
"pezframe-try-runtime?/runtime-benchmarks",
"pezpallet-alliance/runtime-benchmarks",
"pezpallet-asset-rate/runtime-benchmarks",
"pezpallet-aura/runtime-benchmarks",
"pezpallet-authorship/runtime-benchmarks",
"pezpallet-balances/runtime-benchmarks",
"pezpallet-collator-selection/runtime-benchmarks",
"pezpallet-collective-content/runtime-benchmarks",
"pezpallet-collective/runtime-benchmarks",
"pezpallet-core-fellowship/runtime-benchmarks",
"pezpallet-message-queue/runtime-benchmarks",
"pezpallet-multisig/runtime-benchmarks",
"pezpallet-preimage/runtime-benchmarks",
"pezpallet-proxy/runtime-benchmarks",
"pezpallet-ranked-collective/runtime-benchmarks",
"pezpallet-referenda/runtime-benchmarks",
"pezpallet-salary/runtime-benchmarks",
"pezpallet-scheduler/runtime-benchmarks",
"pezpallet-session/runtime-benchmarks",
"pezpallet-state-trie-migration/runtime-benchmarks",
"pezpallet-timestamp/runtime-benchmarks",
"pezpallet-transaction-payment-rpc-runtime-api/runtime-benchmarks",
"pezpallet-transaction-payment/runtime-benchmarks",
"pezpallet-treasury/runtime-benchmarks",
"pezpallet-utility/runtime-benchmarks",
"pezpallet-xcm-benchmarks/runtime-benchmarks",
"pezpallet-xcm/runtime-benchmarks",
"pezkuwi-runtime-common/runtime-benchmarks",
"pezkuwi-teyrchain-primitives/runtime-benchmarks",
"pezsp-api/runtime-benchmarks",
"pezsp-block-builder/runtime-benchmarks",
"pezsp-consensus-aura/runtime-benchmarks",
"pezsp-genesis-builder/runtime-benchmarks",
"pezsp-inherents/runtime-benchmarks",
"pezsp-io/runtime-benchmarks",
"pezsp-keyring/runtime-benchmarks",
"pezsp-offchain/runtime-benchmarks",
"pezsp-runtime/runtime-benchmarks",
"pezsp-session/runtime-benchmarks",
"pezsp-transaction-pool/runtime-benchmarks",
"pezsp-version/runtime-benchmarks",
"bizinikiwi-wasm-builder?/runtime-benchmarks",
"testnet-teyrchains-constants/runtime-benchmarks",
"teyrchain-info/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
"teyrchains-runtimes-test-utils/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"xcm-runtime-apis/runtime-benchmarks",
"xcm/runtime-benchmarks",
"zagros-runtime-constants/runtime-benchmarks",
]
try-runtime = [
"pezcumulus-pezpallet-aura-ext/try-runtime",
"pezcumulus-pezpallet-teyrchain-system/try-runtime",
"pezcumulus-pezpallet-weight-reclaim/try-runtime",
"pezcumulus-pezpallet-xcm/try-runtime",
"pezcumulus-pezpallet-xcmp-queue/try-runtime",
"pezframe-executive/try-runtime",
"pezframe-support/try-runtime",
"pezframe-system/try-runtime",
"pezframe-try-runtime/try-runtime",
"pezpallet-alliance/try-runtime",
"pezpallet-asset-rate/try-runtime",
"pezpallet-aura/try-runtime",
"pezpallet-authorship/try-runtime",
"pezpallet-balances/try-runtime",
"pezpallet-collator-selection/try-runtime",
"pezpallet-collective-content/try-runtime",
"pezpallet-collective/try-runtime",
"pezpallet-core-fellowship/try-runtime",
"pezpallet-message-queue/try-runtime",
"pezpallet-multisig/try-runtime",
"pezpallet-preimage/try-runtime",
"pezpallet-proxy/try-runtime",
"pezpallet-ranked-collective/try-runtime",
"pezpallet-referenda/try-runtime",
"pezpallet-salary/try-runtime",
"pezpallet-scheduler/try-runtime",
"pezpallet-session/try-runtime",
"pezpallet-state-trie-migration/try-runtime",
"pezpallet-timestamp/try-runtime",
"pezpallet-transaction-payment/try-runtime",
"pezpallet-treasury/try-runtime",
"pezpallet-utility/try-runtime",
"pezpallet-xcm/try-runtime",
"pezkuwi-runtime-common/try-runtime",
"pezsp-runtime/try-runtime",
"teyrchain-info/try-runtime",
"teyrchains-common/try-runtime",
]
std = [
"codec/std",
"pezcumulus-pezpallet-aura-ext/std",
"pezcumulus-pezpallet-session-benchmarking/std",
"pezcumulus-pezpallet-teyrchain-system/std",
"pezcumulus-pezpallet-weight-reclaim/std",
"pezcumulus-pezpallet-xcm/std",
"pezcumulus-pezpallet-xcmp-queue/std",
"pezcumulus-primitives-aura/std",
"pezcumulus-primitives-core/std",
"pezcumulus-primitives-utility/std",
"pezframe-benchmarking?/std",
"pezframe-executive/std",
"pezframe-metadata-hash-extension/std",
"pezframe-support/std",
"pezframe-system-benchmarking?/std",
"pezframe-system-rpc-runtime-api/std",
"pezframe-system/std",
"pezframe-try-runtime?/std",
"pezpallet-alliance/std",
"pezpallet-asset-rate/std",
"pezpallet-aura/std",
"pezpallet-authorship/std",
"pezpallet-balances/std",
"pezpallet-collator-selection/std",
"pezpallet-collective-content/std",
"pezpallet-collective/std",
"pezpallet-core-fellowship/std",
"pezpallet-message-queue/std",
"pezpallet-multisig/std",
"pezpallet-preimage/std",
"pezpallet-proxy/std",
"pezpallet-ranked-collective/std",
"pezpallet-referenda/std",
"pezpallet-salary/std",
"pezpallet-scheduler/std",
"pezpallet-session/std",
"pezpallet-state-trie-migration/std",
"pezpallet-timestamp/std",
"pezpallet-transaction-payment-rpc-runtime-api/std",
"pezpallet-transaction-payment/std",
"pezpallet-treasury/std",
"pezpallet-utility/std",
"pezpallet-xcm-benchmarks?/std",
"pezpallet-xcm/std",
"pezkuwi-runtime-common/std",
"pezkuwi-teyrchain-primitives/std",
"scale-info/std",
"serde_json/std",
"pezsp-api/std",
"pezsp-arithmetic/std",
"pezsp-block-builder/std",
"pezsp-consensus-aura/std",
"pezsp-core/std",
"pezsp-genesis-builder/std",
"pezsp-inherents/std",
"pezsp-keyring/std",
"pezsp-offchain/std",
"pezsp-runtime/std",
"pezsp-session/std",
"pezsp-std/std",
"pezsp-storage/std",
"pezsp-transaction-pool/std",
"pezsp-version/std",
"bizinikiwi-wasm-builder",
"testnet-teyrchains-constants/std",
"teyrchain-info/std",
"teyrchains-common/std",
"tracing/std",
"xcm-builder/std",
"xcm-executor/std",
"xcm-runtime-apis/std",
"xcm/std",
"zagros-runtime-constants/std",
]
# Enable the metadata hash generation in the wasm builder.
metadata-hash = ["bizinikiwi-wasm-builder/metadata-hash"]
# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = ["metadata-hash"]
@@ -0,0 +1,29 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#[cfg(all(not(feature = "metadata-hash"), feature = "std"))]
fn main() {
bizinikiwi_wasm_builder::WasmBuilder::build_using_defaults();
}
#[cfg(all(feature = "metadata-hash", feature = "std"))]
fn main() {
bizinikiwi_wasm_builder::WasmBuilder::init_with_defaults()
.enable_metadata_hash("ZGR", 12)
.build();
}
#[cfg(not(feature = "std"))]
fn main() {}
@@ -0,0 +1,274 @@
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! The Ambassador Program.
//!
//! The module defines the following on-chain functionality of the Ambassador Program:
//!
//! - Managed set of program members, where every member has a [rank](ranks)
//! (via [AmbassadorCollective](pezpallet_ranked_collective)).
//! - Referendum functionality for the program members to propose, vote on, and execute
//! proposals on behalf of the members of a certain [rank](Origin)
//! (via [AmbassadorReferenda](pezpallet_referenda)).
//! - Managed content (charter, announcements) (via [pezpallet_collective_content]).
//! - Promotion and demotion periods, register of members' activity, and rank based salaries
//! (via [AmbassadorCore](pezpallet_core_fellowship)).
//! - Members' salaries (via [AmbassadorSalary](pezpallet_salary), requiring a member to be
//! imported or inducted into [AmbassadorCore](pezpallet_core_fellowship)).
pub mod origins;
mod tracks;
use super::*;
use crate::xcm_config::{FellowshipAdminBodyId, LocationToAccountId, WndAssetHub};
use pezframe_support::traits::{EitherOf, MapSuccess, TryMapSuccess};
use pezframe_system::EnsureRootWithSuccess;
pub use origins::pezpallet_origins as pezpallet_ambassador_origins;
use origins::pezpallet_origins::{
EnsureAmbassadorsVoice, EnsureAmbassadorsVoiceFrom, EnsureHeadAmbassadorsVoice, Origin,
};
use pezsp_core::ConstU128;
use pezsp_runtime::traits::{CheckedReduceBy, ConstU16, ConvertToValue, Replace, ReplaceWithDefault};
use xcm::prelude::*;
use xcm_builder::{AliasesIntoAccountId32, PayOverXcm};
/// The Ambassador Program's member ranks.
pub mod ranks {
use pezpallet_ranked_collective::Rank;
#[allow(dead_code)]
pub const CANDIDATE: Rank = 0;
pub const AMBASSADOR_TIER_1: Rank = 1;
pub const AMBASSADOR_TIER_2: Rank = 2;
pub const SENIOR_AMBASSADOR_TIER_3: Rank = 3;
pub const SENIOR_AMBASSADOR_TIER_4: Rank = 4;
pub const HEAD_AMBASSADOR_TIER_5: Rank = 5;
pub const HEAD_AMBASSADOR_TIER_6: Rank = 6;
pub const HEAD_AMBASSADOR_TIER_7: Rank = 7;
pub const MASTER_AMBASSADOR_TIER_8: Rank = 8;
pub const MASTER_AMBASSADOR_TIER_9: Rank = 9;
}
impl pezpallet_ambassador_origins::Config for Runtime {}
pub type AmbassadorCollectiveInstance = pezpallet_ranked_collective::Instance2;
/// Demotion is by any of:
/// - Root can demote arbitrarily.
/// - the FellowshipAdmin origin (i.e. token holder referendum);
/// - a senior members vote by the rank two above the current rank.
pub type DemoteOrigin = EitherOf<
pezframe_system::EnsureRootWithSuccess<AccountId, ConstU16<65535>>,
EitherOf<
MapSuccess<
EnsureXcm<IsVoiceOfBody<GovernanceLocation, FellowshipAdminBodyId>>,
Replace<ConstU16<{ ranks::MASTER_AMBASSADOR_TIER_9 }>>,
>,
TryMapSuccess<
EnsureAmbassadorsVoiceFrom<ConstU16<{ ranks::SENIOR_AMBASSADOR_TIER_3 }>>,
CheckedReduceBy<ConstU16<2>>,
>,
>,
>;
/// Promotion and approval (rank-retention) is by any of:
/// - Root can promote arbitrarily.
/// - the FellowshipAdmin origin (i.e. token holder referendum);
/// - a senior members vote by the rank two above the new/current rank.
/// - a member of rank `5` or above can add a candidate (rank `0`).
pub type PromoteOrigin = EitherOf<
DemoteOrigin,
TryMapSuccess<
pezpallet_ranked_collective::EnsureMember<
Runtime,
AmbassadorCollectiveInstance,
{ ranks::HEAD_AMBASSADOR_TIER_5 },
>,
Replace<ConstU16<0>>,
>,
>;
/// Exchange is by any of:
/// - Root can exchange arbitrarily.
/// - the Fellows origin
pub type ExchangeOrigin = EitherOf<EnsureRootWithSuccess<AccountId, ConstU16<65535>>, Fellows>;
impl pezpallet_ranked_collective::Config<AmbassadorCollectiveInstance> for Runtime {
type WeightInfo = weights::pezpallet_ranked_collective_ambassador_collective::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
type AddOrigin = MapSuccess<Self::PromoteOrigin, ReplaceWithDefault<()>>;
type PromoteOrigin = PromoteOrigin;
type DemoteOrigin = DemoteOrigin;
type RemoveOrigin = Self::DemoteOrigin;
type ExchangeOrigin = ExchangeOrigin;
type Polls = AmbassadorReferenda;
type MinRankOfClass = pezsp_runtime::traits::Identity;
type MemberSwappedHandler = (crate::AmbassadorCore, crate::AmbassadorSalary);
type VoteWeight = pezpallet_ranked_collective::Linear;
type MaxMemberCount = ();
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkSetup = (crate::AmbassadorCore, crate::AmbassadorSalary);
}
parameter_types! {
pub const AlarmInterval: BlockNumber = 1;
pub const SubmissionDeposit: Balance = 0;
pub const UndecidingTimeout: BlockNumber = 7 * DAYS;
}
pub type AmbassadorReferendaInstance = pezpallet_referenda::Instance2;
impl pezpallet_referenda::Config<AmbassadorReferendaInstance> for Runtime {
type WeightInfo = weights::pezpallet_referenda_ambassador_referenda::WeightInfo<Runtime>;
type RuntimeCall = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type Scheduler = Scheduler;
type Currency = Balances;
// A proposal can be submitted by a member of the Ambassador Program of
// [ranks::SENIOR_AMBASSADOR_TIER_3] rank or higher.
type SubmitOrigin = pezpallet_ranked_collective::EnsureMember<
Runtime,
AmbassadorCollectiveInstance,
{ ranks::SENIOR_AMBASSADOR_TIER_3 },
>;
type CancelOrigin = EitherOf<EnsureRoot<AccountId>, EnsureHeadAmbassadorsVoice>;
type KillOrigin = EitherOf<EnsureRoot<AccountId>, EnsureHeadAmbassadorsVoice>;
type Slash = ToParentTreasury<ZagrosTreasuryAccount, LocationToAccountId, Runtime>;
type Votes = pezpallet_ranked_collective::Votes;
type Tally = pezpallet_ranked_collective::TallyOf<Runtime, AmbassadorCollectiveInstance>;
type SubmissionDeposit = SubmissionDeposit;
type MaxQueued = ConstU32<20>;
type UndecidingTimeout = UndecidingTimeout;
type AlarmInterval = AlarmInterval;
type Tracks = tracks::TracksInfo;
type Preimages = Preimage;
type BlockNumberProvider = System;
}
parameter_types! {
pub const AnnouncementLifetime: BlockNumber = 180 * DAYS;
pub const MaxAnnouncements: u32 = 50;
}
pub type AmbassadorContentInstance = pezpallet_collective_content::Instance1;
impl pezpallet_collective_content::Config<AmbassadorContentInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type CharterOrigin = EitherOf<EnsureRoot<AccountId>, EnsureHeadAmbassadorsVoice>;
type AnnouncementLifetime = AnnouncementLifetime;
// An announcement can be submitted by a Senior Ambassador member or an ambassador plurality
// voice taken via referendum.
type AnnouncementOrigin = EitherOfDiverse<
pezpallet_ranked_collective::EnsureMember<
Runtime,
AmbassadorCollectiveInstance,
{ ranks::SENIOR_AMBASSADOR_TIER_3 },
>,
EnsureAmbassadorsVoice,
>;
type MaxAnnouncements = MaxAnnouncements;
type WeightInfo = weights::pezpallet_collective_content::WeightInfo<Runtime>;
}
pub type AmbassadorCoreInstance = pezpallet_core_fellowship::Instance2;
impl pezpallet_core_fellowship::Config<AmbassadorCoreInstance> for Runtime {
type WeightInfo = weights::pezpallet_core_fellowship_ambassador_core::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
type Members = pezpallet_ranked_collective::Pallet<Runtime, AmbassadorCollectiveInstance>;
type Balance = Balance;
// Parameters are set by any of:
// - Root;
// - the FellowshipAdmin origin (i.e. token holder referendum);
// - a vote among all Head Ambassadors.
type ParamsOrigin = EitherOfDiverse<
EnsureRoot<AccountId>,
EitherOfDiverse<
EnsureXcm<IsVoiceOfBody<GovernanceLocation, FellowshipAdminBodyId>>,
EnsureHeadAmbassadorsVoice,
>,
>;
// Induction (creating a candidate) is by any of:
// - Root;
// - the FellowshipAdmin origin (i.e. token holder referendum);
// - a single Head Ambassador;
// - a vote among all senior members.
type InductOrigin = EitherOfDiverse<
EnsureRoot<AccountId>,
EitherOfDiverse<
EnsureXcm<IsVoiceOfBody<GovernanceLocation, FellowshipAdminBodyId>>,
EitherOfDiverse<
pezpallet_ranked_collective::EnsureMember<
Runtime,
AmbassadorCollectiveInstance,
{ ranks::HEAD_AMBASSADOR_TIER_5 },
>,
EnsureAmbassadorsVoiceFrom<ConstU16<{ ranks::SENIOR_AMBASSADOR_TIER_3 }>>,
>,
>,
>;
type ApproveOrigin = PromoteOrigin;
type PromoteOrigin = PromoteOrigin;
type FastPromoteOrigin = Self::PromoteOrigin;
type EvidenceSize = ConstU32<65536>;
type MaxRank = ConstU16<9>;
}
pub type AmbassadorSalaryInstance = pezpallet_salary::Instance2;
parameter_types! {
// The interior location on AssetHub for the paying account. This is the Ambassador Salary
// pallet instance (which sits at index 74). This sovereign account will need funding.
pub AmbassadorSalaryLocation: InteriorLocation = PalletInstance(74).into();
}
/// [`PayOverXcm`] setup to pay the Ambassador salary on the AssetHub in ZGR.
pub type AmbassadorSalaryPaymaster = PayOverXcm<
AmbassadorSalaryLocation,
crate::xcm_config::XcmRouter,
crate::PezkuwiXcm,
ConstU32<{ 6 * HOURS }>,
AccountId,
(),
ConvertToValue<WndAssetHub>,
AliasesIntoAccountId32<(), AccountId>,
>;
impl pezpallet_salary::Config<AmbassadorSalaryInstance> for Runtime {
type WeightInfo = weights::pezpallet_salary_ambassador_salary::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
#[cfg(not(feature = "runtime-benchmarks"))]
type Paymaster = AmbassadorSalaryPaymaster;
#[cfg(feature = "runtime-benchmarks")]
type Paymaster = crate::impls::benchmarks::PayWithEnsure<
AmbassadorSalaryPaymaster,
crate::impls::benchmarks::OpenHrmpChannel<ConstU32<1000>>,
>;
type Members = pezpallet_ranked_collective::Pallet<Runtime, AmbassadorCollectiveInstance>;
#[cfg(not(feature = "runtime-benchmarks"))]
type Salary = pezpallet_core_fellowship::Pallet<Runtime, AmbassadorCoreInstance>;
#[cfg(feature = "runtime-benchmarks")]
type Salary = pezframe_support::traits::tokens::ConvertRank<
crate::impls::benchmarks::RankToSalary<Balances>,
>;
// 15 days to register for a salary payment.
type RegistrationPeriod = ConstU32<{ 15 * DAYS }>;
// 15 days to claim the salary payment.
type PayoutPeriod = ConstU32<{ 15 * DAYS }>;
// Total monthly salary budget.
type Budget = ConstU128<{ 10_000 * DOLLARS }>;
}
@@ -0,0 +1,161 @@
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! The Ambassador Program's origins.
#[pezframe_support::pallet]
pub mod pezpallet_origins {
use crate::ambassador::ranks;
use pezframe_support::pezpallet_prelude::*;
use pezpallet_ranked_collective::Rank;
#[pallet::pallet]
pub struct Pallet<T>(PhantomData<T>);
/// The pallet configuration trait.
#[pallet::config]
pub trait Config: pezframe_system::Config {}
#[derive(
PartialEq,
Eq,
Clone,
MaxEncodedLen,
Encode,
Decode,
DecodeWithMemTracking,
TypeInfo,
RuntimeDebug,
)]
#[pallet::origin]
pub enum Origin {
/// Plurality voice of the [ranks::AMBASSADOR_TIER_1] members or above given via
/// referendum.
Ambassadors,
/// Plurality voice of the [ranks::AMBASSADOR_TIER_2] members or above given via
/// referendum.
AmbassadorsTier2,
/// Plurality voice of the [ranks::SENIOR_AMBASSADOR_TIER_3] members or above given via
/// referendum.
SeniorAmbassadors,
/// Plurality voice of the [ranks::SENIOR_AMBASSADOR_TIER_4] members or above given via
/// referendum.
SeniorAmbassadorsTier4,
/// Plurality voice of the [ranks::HEAD_AMBASSADOR_TIER_5] members or above given via
/// referendum.
HeadAmbassadors,
/// Plurality voice of the [ranks::HEAD_AMBASSADOR_TIER_6] members or above given via
/// referendum.
HeadAmbassadorsTier6,
/// Plurality voice of the [ranks::HEAD_AMBASSADOR_TIER_7] members or above given via
/// referendum.
HeadAmbassadorsTier7,
/// Plurality voice of the [ranks::MASTER_AMBASSADOR_TIER_8] members or above given via
/// referendum.
MasterAmbassadors,
/// Plurality voice of the [ranks::MASTER_AMBASSADOR_TIER_9] members or above given via
/// referendum.
MasterAmbassadorsTier9,
}
impl Origin {
/// Returns the rank that the origin `self` speaks for, or `None` if it doesn't speak for
/// any.
pub fn as_voice(&self) -> Option<Rank> {
Some(match &self {
Origin::Ambassadors => ranks::AMBASSADOR_TIER_1,
Origin::AmbassadorsTier2 => ranks::AMBASSADOR_TIER_2,
Origin::SeniorAmbassadors => ranks::SENIOR_AMBASSADOR_TIER_3,
Origin::SeniorAmbassadorsTier4 => ranks::SENIOR_AMBASSADOR_TIER_4,
Origin::HeadAmbassadors => ranks::HEAD_AMBASSADOR_TIER_5,
Origin::HeadAmbassadorsTier6 => ranks::HEAD_AMBASSADOR_TIER_6,
Origin::HeadAmbassadorsTier7 => ranks::HEAD_AMBASSADOR_TIER_7,
Origin::MasterAmbassadors => ranks::MASTER_AMBASSADOR_TIER_8,
Origin::MasterAmbassadorsTier9 => ranks::MASTER_AMBASSADOR_TIER_9,
})
}
}
/// Implementation of the [EnsureOrigin] trait for the [Origin::HeadAmbassadors] origin.
pub struct EnsureHeadAmbassadorsVoice;
impl<O: OriginTrait + From<Origin>> EnsureOrigin<O> for EnsureHeadAmbassadorsVoice
where
for<'a> &'a O::PalletsOrigin: TryInto<&'a Origin>,
{
type Success = ();
fn try_origin(o: O) -> Result<Self::Success, O> {
match o.caller().try_into() {
Ok(Origin::HeadAmbassadors) => return Ok(()),
_ => (),
}
Err(o)
}
#[cfg(feature = "runtime-benchmarks")]
fn try_successful_origin() -> Result<O, ()> {
Ok(O::from(Origin::HeadAmbassadors))
}
}
/// Implementation of the [EnsureOrigin] trait for the plurality voice [Origin]s
/// from a given rank `R` with the success result of the corresponding [Rank].
pub struct EnsureAmbassadorsVoiceFrom<R>(PhantomData<R>);
impl<R: Get<Rank>, O: OriginTrait + From<Origin>> EnsureOrigin<O> for EnsureAmbassadorsVoiceFrom<R>
where
for<'a> &'a O::PalletsOrigin: TryInto<&'a Origin>,
{
type Success = Rank;
fn try_origin(o: O) -> Result<Self::Success, O> {
match o.caller().try_into().map(|o| Origin::as_voice(o)) {
Ok(Some(r)) if r >= R::get() => return Ok(r),
_ => (),
}
Err(o)
}
#[cfg(feature = "runtime-benchmarks")]
fn try_successful_origin() -> Result<O, ()> {
ranks::MASTER_AMBASSADOR_TIER_9
.ge(&R::get())
.then(|| O::from(Origin::MasterAmbassadorsTier9))
.ok_or(())
}
}
/// Implementation of the [EnsureOrigin] trait for the plurality voice [Origin]s with the
/// success result of the corresponding [Rank].
pub struct EnsureAmbassadorsVoice;
impl<O: OriginTrait + From<Origin>> EnsureOrigin<O> for EnsureAmbassadorsVoice
where
for<'a> &'a O::PalletsOrigin: TryInto<&'a Origin>,
{
type Success = Rank;
fn try_origin(o: O) -> Result<Self::Success, O> {
match o.caller().try_into().map(|o| Origin::as_voice(o)) {
Ok(Some(r)) => return Ok(r),
_ => (),
}
Err(o)
}
#[cfg(feature = "runtime-benchmarks")]
fn try_successful_origin() -> Result<O, ()> {
Ok(O::from(Origin::MasterAmbassadorsTier9))
}
}
}
@@ -0,0 +1,282 @@
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! The Ambassador Program's referenda voting tracks.
use super::Origin;
use crate::{Balance, BlockNumber, RuntimeOrigin, DAYS, DOLLARS, HOURS};
use pezsp_runtime::{str_array as s, Perbill};
use pezsp_std::borrow::Cow;
/// Referendum `TrackId` type.
pub type TrackId = u16;
/// Referendum track IDs.
pub mod constants {
use super::TrackId;
pub const AMBASSADOR_TIER_1: TrackId = 1;
pub const AMBASSADOR_TIER_2: TrackId = 2;
pub const SENIOR_AMBASSADOR_TIER_3: TrackId = 3;
pub const SENIOR_AMBASSADOR_TIER_4: TrackId = 4;
pub const HEAD_AMBASSADOR_TIER_5: TrackId = 5;
pub const HEAD_AMBASSADOR_TIER_6: TrackId = 6;
pub const HEAD_AMBASSADOR_TIER_7: TrackId = 7;
pub const MASTER_AMBASSADOR_TIER_8: TrackId = 8;
pub const MASTER_AMBASSADOR_TIER_9: TrackId = 9;
}
/// The type implementing the [`pezpallet_referenda::TracksInfo`] trait for referenda pallet.
pub struct TracksInfo;
/// Information on the voting tracks.
impl pezpallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
type Id = TrackId;
type RuntimeOrigin = <RuntimeOrigin as pezframe_support::traits::OriginTrait>::PalletsOrigin;
/// Return the list of available tracks and their information.
fn tracks(
) -> impl Iterator<Item = Cow<'static, pezpallet_referenda::Track<Self::Id, Balance, BlockNumber>>>
{
static DATA: [pezpallet_referenda::Track<TrackId, Balance, BlockNumber>; 9] = [
pezpallet_referenda::Track {
id: constants::AMBASSADOR_TIER_1,
info: pezpallet_referenda::TrackInfo {
name: s("ambassador tier 1"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 1 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
},
pezpallet_referenda::Track {
id: constants::AMBASSADOR_TIER_2,
info: pezpallet_referenda::TrackInfo {
name: s("ambassador tier 2"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 1 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
},
pezpallet_referenda::Track {
id: constants::SENIOR_AMBASSADOR_TIER_3,
info: pezpallet_referenda::TrackInfo {
name: s("senior ambassador tier 3"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 1 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
},
pezpallet_referenda::Track {
id: constants::SENIOR_AMBASSADOR_TIER_4,
info: pezpallet_referenda::TrackInfo {
name: s("senior ambassador tier 4"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 1 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
},
pezpallet_referenda::Track {
id: constants::HEAD_AMBASSADOR_TIER_5,
info: pezpallet_referenda::TrackInfo {
name: s("head ambassador tier 5"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 1 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
},
pezpallet_referenda::Track {
id: constants::HEAD_AMBASSADOR_TIER_6,
info: pezpallet_referenda::TrackInfo {
name: s("head ambassador tier 6"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 1 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
},
pezpallet_referenda::Track {
id: constants::HEAD_AMBASSADOR_TIER_7,
info: pezpallet_referenda::TrackInfo {
name: s("head ambassador tier 7"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 1 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
},
pezpallet_referenda::Track {
id: constants::MASTER_AMBASSADOR_TIER_8,
info: pezpallet_referenda::TrackInfo {
name: s("master ambassador tier 8"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 1 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
},
pezpallet_referenda::Track {
id: constants::MASTER_AMBASSADOR_TIER_9,
info: pezpallet_referenda::TrackInfo {
name: s("master ambassador tier 9"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 1 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
},
];
DATA.iter().map(Cow::Borrowed)
}
/// Determine the voting track for the given `origin`.
fn track_for(id: &Self::RuntimeOrigin) -> Result<Self::Id, ()> {
#[cfg(feature = "runtime-benchmarks")]
{
// For benchmarks, we enable a root origin.
// It is important that this is not available in production!
let root: Self::RuntimeOrigin = pezframe_system::RawOrigin::Root.into();
if &root == id {
return Ok(constants::MASTER_AMBASSADOR_TIER_9);
}
}
match Origin::try_from(id.clone()) {
Ok(Origin::Ambassadors) => Ok(constants::AMBASSADOR_TIER_1),
Ok(Origin::AmbassadorsTier2) => Ok(constants::AMBASSADOR_TIER_2),
Ok(Origin::SeniorAmbassadors) => Ok(constants::SENIOR_AMBASSADOR_TIER_3),
Ok(Origin::SeniorAmbassadorsTier4) => Ok(constants::SENIOR_AMBASSADOR_TIER_4),
Ok(Origin::HeadAmbassadors) => Ok(constants::HEAD_AMBASSADOR_TIER_5),
Ok(Origin::HeadAmbassadorsTier6) => Ok(constants::HEAD_AMBASSADOR_TIER_6),
Ok(Origin::HeadAmbassadorsTier7) => Ok(constants::HEAD_AMBASSADOR_TIER_7),
Ok(Origin::MasterAmbassadors) => Ok(constants::MASTER_AMBASSADOR_TIER_8),
Ok(Origin::MasterAmbassadorsTier9) => Ok(constants::MASTER_AMBASSADOR_TIER_9),
_ => Err(()),
}
}
}
@@ -0,0 +1,338 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Pezcumulus.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! The Zagros Technical Fellowship.
mod origins;
mod tracks;
use crate::{
weights,
xcm_config::{FellowshipAdminBodyId, LocationToAccountId, TreasurerBodyId, UsdtAssetHub},
AccountId, AssetRate, Balance, Balances, FellowshipReferenda, GovernanceLocation, Preimage,
Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, Scheduler, TeyrchainInfo,
ZagrosTreasuryAccount, DAYS,
};
use cumulus_primitives_core::ParaId;
use pezframe_support::{
parameter_types,
traits::{
tokens::UnityOrOuterConversion, EitherOf, EitherOfDiverse, FromContains, MapSuccess,
OriginTrait, TryWithMorphedArg,
},
PalletId,
};
use pezframe_system::{EnsureRoot, EnsureRootWithSuccess};
pub use origins::{
pezpallet_origins as pezpallet_fellowship_origins, Architects, EnsureCanPromoteTo, EnsureCanRetainAt,
EnsureFellowship, Fellows, Masters, Members, ToVoice,
};
use pezpallet_ranked_collective::EnsureOfRank;
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
use pezkuwi_runtime_common::impls::{
ContainsParts, LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter,
};
use pezsp_arithmetic::Permill;
use pezsp_core::{ConstU128, ConstU32, ConstU8};
use pezsp_runtime::traits::{ConstU16, ConvertToValue, IdentityLookup, Replace, TakeFirst};
use testnet_teyrchains_constants::zagros::{account, currency::GRAND};
use teyrchains_common::impls::ToParentTreasury;
use xcm::prelude::*;
use xcm_builder::{AliasesIntoAccountId32, PayOverXcm};
use zagros_runtime_constants::time::HOURS;
#[cfg(feature = "runtime-benchmarks")]
use crate::impls::benchmarks::{OpenHrmpChannel, PayWithEnsure};
/// The Fellowship members' ranks.
pub mod ranks {
use pezpallet_ranked_collective::Rank;
pub const DAN_1: Rank = 1; // aka Members.
pub const DAN_2: Rank = 2;
pub const DAN_3: Rank = 3; // aka Fellows.
pub const DAN_4: Rank = 4; // aka Architects.
pub const DAN_5: Rank = 5;
pub const DAN_6: Rank = 6;
pub const DAN_7: Rank = 7; // aka Masters.
pub const DAN_8: Rank = 8;
pub const DAN_9: Rank = 9;
}
impl pezpallet_fellowship_origins::Config for Runtime {}
pub type FellowshipReferendaInstance = pezpallet_referenda::Instance1;
impl pezpallet_referenda::Config<FellowshipReferendaInstance> for Runtime {
type WeightInfo = weights::pezpallet_referenda_fellowship_referenda::WeightInfo<Runtime>;
type RuntimeCall = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type Scheduler = Scheduler;
type Currency = Balances;
// Fellows can submit proposals.
type SubmitOrigin = EitherOf<
pezpallet_ranked_collective::EnsureMember<Runtime, FellowshipCollectiveInstance, 3>,
MapSuccess<
TryWithMorphedArg<
RuntimeOrigin,
<RuntimeOrigin as OriginTrait>::PalletsOrigin,
ToVoice,
EnsureOfRank<Runtime, FellowshipCollectiveInstance>,
(AccountId, u16),
>,
TakeFirst,
>,
>;
type CancelOrigin = Architects;
type KillOrigin = Masters;
type Slash = ToParentTreasury<ZagrosTreasuryAccount, LocationToAccountId, Runtime>;
type Votes = pezpallet_ranked_collective::Votes;
type Tally = pezpallet_ranked_collective::TallyOf<Runtime, FellowshipCollectiveInstance>;
type SubmissionDeposit = ConstU128<0>;
type MaxQueued = ConstU32<100>;
type UndecidingTimeout = ConstU32<{ 7 * DAYS }>;
type AlarmInterval = ConstU32<1>;
type Tracks = tracks::TracksInfo;
type Preimages = Preimage;
type BlockNumberProvider = crate::System;
}
pub type FellowshipCollectiveInstance = pezpallet_ranked_collective::Instance1;
impl pezpallet_ranked_collective::Config<FellowshipCollectiveInstance> for Runtime {
type WeightInfo = weights::pezpallet_ranked_collective_fellowship_collective::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
// Promotions and the induction of new members are serviced by `FellowshipCore` pallet instance.
#[cfg(not(feature = "runtime-benchmarks"))]
type AddOrigin = pezframe_system::EnsureNever<()>;
#[cfg(feature = "runtime-benchmarks")]
type AddOrigin = pezframe_system::EnsureRoot<Self::AccountId>;
// The maximum value of `u16` set as a success value for the root to ensure the benchmarks will
// pass.
#[cfg(not(feature = "runtime-benchmarks"))]
type PromoteOrigin = pezframe_system::EnsureNever<pezpallet_ranked_collective::Rank>;
#[cfg(feature = "runtime-benchmarks")]
type PromoteOrigin = EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>;
// Demotion is by any of:
// - Root can demote arbitrarily.
// - the FellowshipAdmin origin (i.e. token holder referendum);
//
// The maximum value of `u16` set as a success value for the root to ensure the benchmarks will
// pass.
type RemoveOrigin = Self::DemoteOrigin;
type DemoteOrigin = EitherOf<
EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>,
MapSuccess<
EnsureXcm<IsVoiceOfBody<GovernanceLocation, FellowshipAdminBodyId>>,
Replace<ConstU16<{ ranks::DAN_9 }>>,
>,
>;
// Exchange is by any of:
// - Root can exchange arbitrarily.
// - the Fellows origin
type ExchangeOrigin =
EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Fellows>;
type Polls = FellowshipReferenda;
type MinRankOfClass = tracks::MinRankOfClass;
type MemberSwappedHandler = (crate::FellowshipCore, crate::FellowshipSalary);
type VoteWeight = pezpallet_ranked_collective::Geometric;
type MaxMemberCount = ();
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkSetup = (crate::FellowshipCore, crate::FellowshipSalary);
}
pub type FellowshipCoreInstance = pezpallet_core_fellowship::Instance1;
impl pezpallet_core_fellowship::Config<FellowshipCoreInstance> for Runtime {
type WeightInfo = weights::pezpallet_core_fellowship_fellowship_core::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
type Members = pezpallet_ranked_collective::Pallet<Runtime, FellowshipCollectiveInstance>;
type Balance = Balance;
// Parameters are set by any of:
// - Root;
// - the FellowshipAdmin origin (i.e. token holder referendum);
// - a vote among all Fellows.
type ParamsOrigin = EitherOfDiverse<
EnsureXcm<IsVoiceOfBody<GovernanceLocation, FellowshipAdminBodyId>>,
Fellows,
>;
// Induction (creating a candidate) is by any of:
// - Root;
// - the FellowshipAdmin origin (i.e. token holder referendum);
// - a single Fellow;
// - a vote among all Members.
type InductOrigin = EitherOfDiverse<
EnsureXcm<IsVoiceOfBody<GovernanceLocation, FellowshipAdminBodyId>>,
EitherOfDiverse<
pezpallet_ranked_collective::EnsureMember<
Runtime,
FellowshipCollectiveInstance,
{ ranks::DAN_3 },
>,
Members,
>,
>;
// Approval (rank-retention) of a Member's current rank is by any of:
// - Root;
// - the FellowshipAdmin origin (i.e. token holder referendum);
// - a vote by the rank two above the current rank for all retention up to the Master rank.
type ApproveOrigin = EitherOf<
MapSuccess<
EnsureXcm<IsVoiceOfBody<GovernanceLocation, FellowshipAdminBodyId>>,
Replace<ConstU16<{ ranks::DAN_9 }>>,
>,
EnsureCanRetainAt,
>;
// Promotion is by any of:
// - Root can promote arbitrarily.
// - the FellowshipAdmin origin (i.e. token holder referendum);
// - a vote by the rank two above the new rank for all promotions up to the Master rank.
type PromoteOrigin = EitherOf<
MapSuccess<
EnsureXcm<IsVoiceOfBody<GovernanceLocation, FellowshipAdminBodyId>>,
Replace<ConstU16<{ ranks::DAN_9 }>>,
>,
EnsureCanPromoteTo,
>;
type FastPromoteOrigin = Self::PromoteOrigin;
type EvidenceSize = ConstU32<65536>;
type MaxRank = ConstU16<9>;
}
pub type FellowshipSalaryInstance = pezpallet_salary::Instance1;
parameter_types! {
// The interior location on AssetHub for the paying account. This is the Fellowship Salary
// pallet instance (which sits at index 64). This sovereign account will need funding.
pub Interior: InteriorLocation = PalletInstance(64).into();
}
const USDT_UNITS: u128 = 1_000_000;
/// [`PayOverXcm`] setup to pay the Fellowship salary on the AssetHub in USDT.
pub type FellowshipSalaryPaymaster = PayOverXcm<
Interior,
crate::xcm_config::XcmRouter,
crate::PezkuwiXcm,
ConstU32<{ 6 * HOURS }>,
AccountId,
(),
ConvertToValue<UsdtAssetHub>,
AliasesIntoAccountId32<(), AccountId>,
>;
impl pezpallet_salary::Config<FellowshipSalaryInstance> for Runtime {
type WeightInfo = weights::pezpallet_salary_fellowship_salary::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
#[cfg(not(feature = "runtime-benchmarks"))]
type Paymaster = FellowshipSalaryPaymaster;
#[cfg(feature = "runtime-benchmarks")]
type Paymaster = PayWithEnsure<FellowshipSalaryPaymaster, OpenHrmpChannel<ConstU32<1000>>>;
type Members = pezpallet_ranked_collective::Pallet<Runtime, FellowshipCollectiveInstance>;
#[cfg(not(feature = "runtime-benchmarks"))]
type Salary = pezpallet_core_fellowship::Pallet<Runtime, FellowshipCoreInstance>;
#[cfg(feature = "runtime-benchmarks")]
type Salary = pezframe_support::traits::tokens::ConvertRank<
crate::impls::benchmarks::RankToSalary<Balances>,
>;
// 15 days to register for a salary payment.
type RegistrationPeriod = ConstU32<{ 15 * DAYS }>;
// 15 days to claim the salary payment.
type PayoutPeriod = ConstU32<{ 15 * DAYS }>;
// Total monthly salary budget.
type Budget = ConstU128<{ 100_000 * USDT_UNITS }>;
}
parameter_types! {
pub const FellowshipTreasuryPalletId: PalletId = account::FELLOWSHIP_TREASURY_PALLET_ID;
pub const HundredPercent: Permill = Permill::from_percent(100);
pub const Burn: Permill = Permill::from_percent(0);
pub const MaxBalance: Balance = Balance::max_value();
// The asset's interior location for the paying account. This is the Fellowship Treasury
// pallet instance (which sits at index 65).
pub FellowshipTreasuryInteriorLocation: InteriorLocation = PalletInstance(65).into();
pub SelfParaId: ParaId = TeyrchainInfo::teyrchain_id();
}
/// [`PayOverXcm`] setup to pay the Fellowship Treasury.
pub type FellowshipTreasuryPaymaster = PayOverXcm<
FellowshipTreasuryInteriorLocation,
crate::xcm_config::XcmRouter,
crate::PezkuwiXcm,
ConstU32<{ 6 * HOURS }>,
VersionedLocation,
VersionedLocatableAsset,
LocatableAssetConverter,
VersionedLocationConverter,
>;
pub type FellowshipTreasuryInstance = pezpallet_treasury::Instance1;
impl pezpallet_treasury::Config<FellowshipTreasuryInstance> for Runtime {
type WeightInfo = weights::pezpallet_treasury::WeightInfo<Runtime>;
type PalletId = FellowshipTreasuryPalletId;
type Currency = Balances;
type RejectOrigin = EitherOfDiverse<
EnsureRoot<AccountId>,
EitherOfDiverse<EnsureXcm<IsVoiceOfBody<GovernanceLocation, TreasurerBodyId>>, Fellows>,
>;
type RuntimeEvent = RuntimeEvent;
type SpendPeriod = ConstU32<{ 7 * DAYS }>;
type Burn = Burn;
type BurnDestination = ();
type SpendFunds = ();
type MaxApprovals = ConstU32<100>;
type SpendOrigin = EitherOf<
EitherOf<
EnsureRootWithSuccess<AccountId, MaxBalance>,
MapSuccess<
EnsureXcm<IsVoiceOfBody<GovernanceLocation, TreasurerBodyId>>,
Replace<ConstU128<{ 10_000 * GRAND }>>,
>,
>,
EitherOf<
MapSuccess<Architects, Replace<ConstU128<{ 10_000 * GRAND }>>>,
MapSuccess<Fellows, Replace<ConstU128<{ 10 * GRAND }>>>,
>,
>;
type AssetKind = VersionedLocatableAsset;
type Beneficiary = VersionedLocation;
type BeneficiaryLookup = IdentityLookup<Self::Beneficiary>;
#[cfg(not(feature = "runtime-benchmarks"))]
type Paymaster = FellowshipTreasuryPaymaster;
#[cfg(feature = "runtime-benchmarks")]
type Paymaster = PayWithEnsure<FellowshipTreasuryPaymaster, OpenHrmpChannel<ConstU32<1000>>>;
type BalanceConverter = UnityOrOuterConversion<
ContainsParts<
FromContains<
xcm_builder::IsSiblingSystemTeyrchain<ParaId, SelfParaId>,
xcm_builder::IsParentsOnly<ConstU8<1>>,
>,
>,
AssetRate,
>;
type PayoutPeriod = ConstU32<{ 30 * DAYS }>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = pezkuwi_runtime_common::impls::benchmarks::TreasuryArguments<
pezsp_core::ConstU8<1>,
ConstU32<1000>,
>;
type BlockNumberProvider = crate::System;
}
@@ -0,0 +1,263 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Pezcumulus.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Fellowship custom origins.
use super::ranks;
pub use pezpallet_origins::*;
#[pezframe_support::pallet]
pub mod pezpallet_origins {
use super::ranks;
use pezframe_support::pezpallet_prelude::*;
use pezpallet_ranked_collective::Rank;
#[pallet::config]
pub trait Config: pezframe_system::Config {}
#[pallet::pallet]
pub struct Pallet<T>(_);
#[derive(
PartialEq,
Eq,
Clone,
MaxEncodedLen,
Encode,
Decode,
DecodeWithMemTracking,
TypeInfo,
RuntimeDebug,
)]
#[pallet::origin]
pub enum Origin {
/// Origin aggregated through weighted votes of those with rank 1 or above; `Success` is 1.
/// Aka the "voice" of all Members.
Members,
/// Origin aggregated through weighted votes of those with rank 2 or above; `Success` is 2.
/// Aka the "voice" of members at least II Dan.
Fellowship2Dan,
/// Origin aggregated through weighted votes of those with rank 3 or above; `Success` is 3.
/// Aka the "voice" of all Fellows.
Fellows,
/// Origin aggregated through weighted votes of those with rank 4 or above; `Success` is 4.
/// Aka the "voice" of members at least IV Dan.
Architects,
/// Origin aggregated through weighted votes of those with rank 5 or above; `Success` is 5.
/// Aka the "voice" of members at least V Dan.
Fellowship5Dan,
/// Origin aggregated through weighted votes of those with rank 6 or above; `Success` is 6.
/// Aka the "voice" of members at least VI Dan.
Fellowship6Dan,
/// Origin aggregated through weighted votes of those with rank 7 or above; `Success` is 7.
/// Aka the "voice" of all Masters.
Masters,
/// Origin aggregated through weighted votes of those with rank 8 or above; `Success` is 8.
/// Aka the "voice" of members at least VIII Dan.
Fellowship8Dan,
/// Origin aggregated through weighted votes of those with rank 9 or above; `Success` is 9.
/// Aka the "voice" of members at least IX Dan.
Fellowship9Dan,
/// Origin aggregated through weighted votes of those with rank 3 or above when voting on
/// a fortnight-long track; `Success` is 1.
RetainAt1Dan,
/// Origin aggregated through weighted votes of those with rank 4 or above when voting on
/// a fortnight-long track; `Success` is 2.
RetainAt2Dan,
/// Origin aggregated through weighted votes of those with rank 5 or above when voting on
/// a fortnight-long track; `Success` is 3.
RetainAt3Dan,
/// Origin aggregated through weighted votes of those with rank 6 or above when voting on
/// a fortnight-long track; `Success` is 4.
RetainAt4Dan,
/// Origin aggregated through weighted votes of those with rank 7 or above when voting on
/// a fortnight-long track; `Success` is 5.
RetainAt5Dan,
/// Origin aggregated through weighted votes of those with rank 8 or above when voting on
/// a fortnight-long track; `Success` is 6.
RetainAt6Dan,
/// Origin aggregated through weighted votes of those with rank 3 or above when voting on
/// a month-long track; `Success` is 1.
PromoteTo1Dan,
/// Origin aggregated through weighted votes of those with rank 4 or above when voting on
/// a month-long track; `Success` is 2.
PromoteTo2Dan,
/// Origin aggregated through weighted votes of those with rank 5 or above when voting on
/// a month-long track; `Success` is 3.
PromoteTo3Dan,
/// Origin aggregated through weighted votes of those with rank 6 or above when voting on
/// a month-long track; `Success` is 4.
PromoteTo4Dan,
/// Origin aggregated through weighted votes of those with rank 7 or above when voting on
/// a month-long track; `Success` is 5.
PromoteTo5Dan,
/// Origin aggregated through weighted votes of those with rank 8 or above when voting on
/// a month-long track; `Success` is 6.
PromoteTo6Dan,
}
impl Origin {
/// Returns the rank that the origin `self` speaks for, or `None` if it doesn't speak for
/// any.
///
/// `Some` will be returned only for the first 9 elements of [Origin].
pub fn as_voice(&self) -> Option<pezpallet_ranked_collective::Rank> {
Some(match &self {
Origin::Members => ranks::DAN_1,
Origin::Fellowship2Dan => ranks::DAN_2,
Origin::Fellows => ranks::DAN_3,
Origin::Architects => ranks::DAN_4,
Origin::Fellowship5Dan => ranks::DAN_5,
Origin::Fellowship6Dan => ranks::DAN_6,
Origin::Masters => ranks::DAN_7,
Origin::Fellowship8Dan => ranks::DAN_8,
Origin::Fellowship9Dan => ranks::DAN_9,
_ => return None,
})
}
}
/// A `TryMorph` implementation which is designed to convert an aggregate `RuntimeOrigin`
/// value into the Fellowship voice it represents if it is a Fellowship pallet origin an
/// appropriate variant. See also [Origin::as_voice].
pub struct ToVoice;
impl<'a, O: 'a + TryInto<&'a Origin>> pezsp_runtime::traits::TryMorph<O> for ToVoice {
type Outcome = pezpallet_ranked_collective::Rank;
fn try_morph(o: O) -> Result<pezpallet_ranked_collective::Rank, ()> {
o.try_into().ok().and_then(Origin::as_voice).ok_or(())
}
}
macro_rules! decl_unit_ensures {
( $name:ident: $success_type:ty = $success:expr ) => {
pub struct $name;
impl<O: OriginTrait + From<Origin>> EnsureOrigin<O> for $name
where
for <'a> &'a O::PalletsOrigin: TryInto<&'a Origin>,
{
type Success = $success_type;
fn try_origin(o: O) -> Result<Self::Success, O> {
match o.caller().try_into() {
Ok(Origin::$name) => return Ok($success),
_ => (),
}
Err(o)
}
#[cfg(feature = "runtime-benchmarks")]
fn try_successful_origin() -> Result<O, ()> {
Ok(O::from(Origin::$name))
}
}
};
( $name:ident ) => { decl_unit_ensures! { $name : () = () } };
( $name:ident: $success_type:ty = $success:expr, $( $rest:tt )* ) => {
decl_unit_ensures! { $name: $success_type = $success }
decl_unit_ensures! { $( $rest )* }
};
( $name:ident, $( $rest:tt )* ) => {
decl_unit_ensures! { $name }
decl_unit_ensures! { $( $rest )* }
};
() => {}
}
decl_unit_ensures!(
Members: Rank = ranks::DAN_1,
Fellows: Rank = ranks::DAN_3,
Architects: Rank = ranks::DAN_4,
Masters: Rank = ranks::DAN_7,
);
macro_rules! decl_ensure {
(
$vis:vis type $name:ident: EnsureOrigin<Success = $success_type:ty> {
$( $item:ident = $success:expr, )*
}
) => {
$vis struct $name;
impl<O: OriginTrait + From<Origin>> EnsureOrigin<O> for $name
where
for <'a> &'a O::PalletsOrigin: TryInto<&'a Origin>,
{
type Success = $success_type;
fn try_origin(o: O) -> Result<Self::Success, O> {
match o.caller().try_into() {
$(
Ok(Origin::$item) => return Ok($success),
)*
_ => (),
}
Err(o)
}
#[cfg(feature = "runtime-benchmarks")]
fn try_successful_origin() -> Result<O, ()> {
// By convention the more privileged origins go later, so for greatest chance
// of success, we want the last one.
let _result: Result<O, ()> = Err(());
$(
let _result: Result<O, ()> = Ok(O::from(Origin::$item));
)*
_result
}
}
}
}
// Fellowship origin indicating weighted voting from at least the rank of `Success` on a
// week-long track.
decl_ensure! {
pub type EnsureFellowship: EnsureOrigin<Success = Rank> {
Members = ranks::DAN_1,
Fellowship2Dan = ranks::DAN_2,
Fellows = ranks::DAN_3,
Architects = ranks::DAN_4,
Fellowship5Dan = ranks::DAN_5,
Fellowship6Dan = ranks::DAN_6,
Masters = ranks::DAN_7,
Fellowship8Dan = ranks::DAN_8,
Fellowship9Dan = ranks::DAN_9,
}
}
// Fellowship origin indicating weighted voting from at least the rank of `Success + 2` on
// a fortnight-long track; needed for Fellowship retention voting.
decl_ensure! {
pub type EnsureCanRetainAt: EnsureOrigin<Success = Rank> {
RetainAt1Dan = ranks::DAN_1,
RetainAt2Dan = ranks::DAN_2,
RetainAt3Dan = ranks::DAN_3,
RetainAt4Dan = ranks::DAN_4,
RetainAt5Dan = ranks::DAN_5,
RetainAt6Dan = ranks::DAN_6,
}
}
// Fellowship origin indicating weighted voting from at least the rank of `Success + 2` on
// a month-long track; needed for Fellowship promotion voting.
decl_ensure! {
pub type EnsureCanPromoteTo: EnsureOrigin<Success = Rank> {
PromoteTo1Dan = ranks::DAN_1,
PromoteTo2Dan = ranks::DAN_2,
PromoteTo3Dan = ranks::DAN_3,
PromoteTo4Dan = ranks::DAN_4,
PromoteTo5Dan = ranks::DAN_5,
PromoteTo6Dan = ranks::DAN_6,
}
}
}
@@ -0,0 +1,535 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Pezcumulus.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Track configurations for Fellowship.
use crate::{Balance, BlockNumber, RuntimeOrigin, DAYS, DOLLARS, HOURS, MINUTES};
use pezpallet_ranked_collective::Rank;
use pezsp_runtime::{str_array as s, traits::Convert, Perbill};
use pezsp_std::borrow::Cow;
/// Referendum `TrackId` type.
pub type TrackId = u16;
/// Referendum track IDs.
pub mod constants {
use super::TrackId;
// Regular tracks (7 days) used for general operations. The required rank for voting is the
// same as that which is named (and also the track ID).
pub const MEMBERS: TrackId = 1;
pub const PROFICIENTS: TrackId = 2;
pub const FELLOWS: TrackId = 3;
pub const ARCHITECTS: TrackId = 4;
pub const ARCHITECTS_ADEPT: TrackId = 5;
pub const GRAND_ARCHITECTS: TrackId = 6;
pub const MASTERS: TrackId = 7;
pub const MASTERS_CONSTANT: TrackId = 8;
pub const GRAND_MASTERS: TrackId = 9;
// Longer tracks (14 days) used for rank retention. These require a rank of two more than the
// grade at which they retain (as per the whitepaper). This works out as the track ID minus 8.
pub const RETAIN_AT_1DAN: TrackId = 11;
pub const RETAIN_AT_2DAN: TrackId = 12;
pub const RETAIN_AT_3DAN: TrackId = 13;
pub const RETAIN_AT_4DAN: TrackId = 14;
pub const RETAIN_AT_5DAN: TrackId = 15;
pub const RETAIN_AT_6DAN: TrackId = 16;
// Longest tracks (30 days) used for promotions. These require a rank of two more than the
// grade to which they promote (as per the whitepaper). This works out as the track ID minus 18.
pub const PROMOTE_TO_1DAN: TrackId = 21;
pub const PROMOTE_TO_2DAN: TrackId = 22;
pub const PROMOTE_TO_3DAN: TrackId = 23;
pub const PROMOTE_TO_4DAN: TrackId = 24;
pub const PROMOTE_TO_5DAN: TrackId = 25;
pub const PROMOTE_TO_6DAN: TrackId = 26;
}
/// Convert the track ID (defined above) into the minimum rank (i.e. fellowship Dan grade) required
/// to vote on the track.
pub struct MinRankOfClass;
impl Convert<TrackId, Rank> for MinRankOfClass {
fn convert(a: TrackId) -> Rank {
match a {
// Just a regular vote: the track ID is conveniently the same as the minimum rank.
regular @ 1..=9 => regular,
// A retention vote; the track ID turns out to be 8 more than the minimum required rank.
retention @ 11..=16 => retention - 8,
// A promotion vote; the track ID turns out to be 18 more than the minimum required
// rank.
promotion @ 21..=26 => promotion - 18,
_ => Rank::max_value(),
}
}
}
const RETAIN_MAX_DECIDING: u32 = 25;
const RETAIN_DECISION_DEPOSIT: Balance = 5 * DOLLARS;
const RETAIN_PREPARE_PERIOD: BlockNumber = 0;
const RETAIN_DECISION_PERIOD: BlockNumber = 14 * DAYS;
const RETAIN_CONFIRM_PERIOD: BlockNumber = 1 * HOURS;
const RETAIN_MIN_ENACTMENT_PERIOD: BlockNumber = 0;
const RETAIN_MIN_APPROVAL: pezpallet_referenda::Curve = pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(60),
ceil: Perbill::from_percent(100),
};
const RETAIN_MIN_SUPPORT: pezpallet_referenda::Curve = pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(100),
};
const PROMOTE_MAX_DECIDING: u32 = 10;
const PROMOTE_DECISION_DEPOSIT: Balance = 5 * DOLLARS;
const PROMOTE_PREPARE_PERIOD: BlockNumber = 0;
const PROMOTE_DECISION_PERIOD: BlockNumber = 30 * DAYS;
const PROMOTE_CONFIRM_PERIOD: BlockNumber = 1 * HOURS;
const PROMOTE_MIN_ENACTMENT_PERIOD: BlockNumber = 0;
const PROMOTE_MIN_APPROVAL: pezpallet_referenda::Curve = pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(60),
ceil: Perbill::from_percent(100),
};
const PROMOTE_MIN_SUPPORT: pezpallet_referenda::Curve = pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(100),
};
pub struct TracksInfo;
impl pezpallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
type Id = TrackId;
type RuntimeOrigin = <RuntimeOrigin as pezframe_support::traits::OriginTrait>::PalletsOrigin;
fn tracks(
) -> impl Iterator<Item = Cow<'static, pezpallet_referenda::Track<Self::Id, Balance, BlockNumber>>>
{
use constants as tracks;
static DATA: [pezpallet_referenda::Track<TrackId, Balance, BlockNumber>; 21] = [
pezpallet_referenda::Track {
id: tracks::MEMBERS,
info: pezpallet_referenda::TrackInfo {
name: s("members"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 30 * MINUTES,
decision_period: 1 * DAYS,
confirm_period: 30 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(100),
},
},
},
pezpallet_referenda::Track {
id: tracks::PROFICIENTS,
info: pezpallet_referenda::TrackInfo {
name: s("proficient members"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 30 * MINUTES,
decision_period: 1 * DAYS,
confirm_period: 30 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(100),
},
},
},
pezpallet_referenda::Track {
id: tracks::FELLOWS,
info: pezpallet_referenda::TrackInfo {
name: s("fellows"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 30 * MINUTES,
decision_period: 1 * DAYS,
confirm_period: 30 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(100),
},
},
},
pezpallet_referenda::Track {
id: tracks::ARCHITECTS,
info: pezpallet_referenda::TrackInfo {
name: s("architects"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 30 * MINUTES,
decision_period: 1 * DAYS,
confirm_period: 30 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(100),
},
},
},
pezpallet_referenda::Track {
id: tracks::ARCHITECTS_ADEPT,
info: pezpallet_referenda::TrackInfo {
name: s("architects adept"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 30 * MINUTES,
decision_period: 1 * DAYS,
confirm_period: 30 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(100),
},
},
},
pezpallet_referenda::Track {
id: tracks::GRAND_ARCHITECTS,
info: pezpallet_referenda::TrackInfo {
name: s("grand architects"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 30 * MINUTES,
decision_period: 1 * DAYS,
confirm_period: 30 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(100),
},
},
},
pezpallet_referenda::Track {
id: tracks::MASTERS,
info: pezpallet_referenda::TrackInfo {
name: s("masters"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 30 * MINUTES,
decision_period: 1 * DAYS,
confirm_period: 30 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(100),
},
},
},
pezpallet_referenda::Track {
id: tracks::MASTERS_CONSTANT,
info: pezpallet_referenda::TrackInfo {
name: s("masters constant"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 30 * MINUTES,
decision_period: 1 * DAYS,
confirm_period: 30 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(100),
},
},
},
pezpallet_referenda::Track {
id: tracks::GRAND_MASTERS,
info: pezpallet_referenda::TrackInfo {
name: s("grand masters"),
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 30 * MINUTES,
decision_period: 1 * DAYS,
confirm_period: 30 * MINUTES,
min_enactment_period: 5 * MINUTES,
min_approval: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pezpallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(100),
},
},
},
pezpallet_referenda::Track {
id: tracks::RETAIN_AT_1DAN,
info: pezpallet_referenda::TrackInfo {
name: s("retain at I Dan"),
max_deciding: RETAIN_MAX_DECIDING,
decision_deposit: RETAIN_DECISION_DEPOSIT,
prepare_period: RETAIN_PREPARE_PERIOD,
decision_period: RETAIN_DECISION_PERIOD,
confirm_period: RETAIN_CONFIRM_PERIOD,
min_enactment_period: RETAIN_MIN_ENACTMENT_PERIOD,
min_approval: RETAIN_MIN_APPROVAL,
min_support: RETAIN_MIN_SUPPORT,
},
},
pezpallet_referenda::Track {
id: tracks::RETAIN_AT_2DAN,
info: pezpallet_referenda::TrackInfo {
name: s("retain at II Dan"),
max_deciding: RETAIN_MAX_DECIDING,
decision_deposit: RETAIN_DECISION_DEPOSIT,
prepare_period: RETAIN_PREPARE_PERIOD,
decision_period: RETAIN_DECISION_PERIOD,
confirm_period: RETAIN_CONFIRM_PERIOD,
min_enactment_period: RETAIN_MIN_ENACTMENT_PERIOD,
min_approval: RETAIN_MIN_APPROVAL,
min_support: RETAIN_MIN_SUPPORT,
},
},
pezpallet_referenda::Track {
id: tracks::RETAIN_AT_3DAN,
info: pezpallet_referenda::TrackInfo {
name: s("retain at III Dan"),
max_deciding: RETAIN_MAX_DECIDING,
decision_deposit: RETAIN_DECISION_DEPOSIT,
prepare_period: RETAIN_PREPARE_PERIOD,
decision_period: RETAIN_DECISION_PERIOD,
confirm_period: RETAIN_CONFIRM_PERIOD,
min_enactment_period: RETAIN_MIN_ENACTMENT_PERIOD,
min_approval: RETAIN_MIN_APPROVAL,
min_support: RETAIN_MIN_SUPPORT,
},
},
pezpallet_referenda::Track {
id: tracks::RETAIN_AT_4DAN,
info: pezpallet_referenda::TrackInfo {
name: s("retain at IV Dan"),
max_deciding: RETAIN_MAX_DECIDING,
decision_deposit: RETAIN_DECISION_DEPOSIT,
prepare_period: RETAIN_PREPARE_PERIOD,
decision_period: RETAIN_DECISION_PERIOD,
confirm_period: RETAIN_CONFIRM_PERIOD,
min_enactment_period: RETAIN_MIN_ENACTMENT_PERIOD,
min_approval: RETAIN_MIN_APPROVAL,
min_support: RETAIN_MIN_SUPPORT,
},
},
pezpallet_referenda::Track {
id: tracks::RETAIN_AT_5DAN,
info: pezpallet_referenda::TrackInfo {
name: s("retain at V Dan"),
max_deciding: RETAIN_MAX_DECIDING,
decision_deposit: RETAIN_DECISION_DEPOSIT,
prepare_period: RETAIN_PREPARE_PERIOD,
decision_period: RETAIN_DECISION_PERIOD,
confirm_period: RETAIN_CONFIRM_PERIOD,
min_enactment_period: RETAIN_MIN_ENACTMENT_PERIOD,
min_approval: RETAIN_MIN_APPROVAL,
min_support: RETAIN_MIN_SUPPORT,
},
},
pezpallet_referenda::Track {
id: tracks::RETAIN_AT_6DAN,
info: pezpallet_referenda::TrackInfo {
name: s("retain at VI Dan"),
max_deciding: RETAIN_MAX_DECIDING,
decision_deposit: RETAIN_DECISION_DEPOSIT,
prepare_period: RETAIN_PREPARE_PERIOD,
decision_period: RETAIN_DECISION_PERIOD,
confirm_period: RETAIN_CONFIRM_PERIOD,
min_enactment_period: RETAIN_MIN_ENACTMENT_PERIOD,
min_approval: RETAIN_MIN_APPROVAL,
min_support: RETAIN_MIN_SUPPORT,
},
},
pezpallet_referenda::Track {
id: tracks::PROMOTE_TO_1DAN,
info: pezpallet_referenda::TrackInfo {
name: s("promote to I Dan"),
max_deciding: PROMOTE_MAX_DECIDING,
decision_deposit: PROMOTE_DECISION_DEPOSIT,
prepare_period: PROMOTE_PREPARE_PERIOD,
decision_period: PROMOTE_DECISION_PERIOD,
confirm_period: PROMOTE_CONFIRM_PERIOD,
min_enactment_period: PROMOTE_MIN_ENACTMENT_PERIOD,
min_approval: PROMOTE_MIN_APPROVAL,
min_support: PROMOTE_MIN_SUPPORT,
},
},
pezpallet_referenda::Track {
id: tracks::PROMOTE_TO_2DAN,
info: pezpallet_referenda::TrackInfo {
name: s("promote to II Dan"),
max_deciding: PROMOTE_MAX_DECIDING,
decision_deposit: PROMOTE_DECISION_DEPOSIT,
prepare_period: PROMOTE_PREPARE_PERIOD,
decision_period: PROMOTE_DECISION_PERIOD,
confirm_period: PROMOTE_CONFIRM_PERIOD,
min_enactment_period: PROMOTE_MIN_ENACTMENT_PERIOD,
min_approval: PROMOTE_MIN_APPROVAL,
min_support: PROMOTE_MIN_SUPPORT,
},
},
pezpallet_referenda::Track {
id: tracks::PROMOTE_TO_3DAN,
info: pezpallet_referenda::TrackInfo {
name: s("promote to III Dan"),
max_deciding: PROMOTE_MAX_DECIDING,
decision_deposit: PROMOTE_DECISION_DEPOSIT,
prepare_period: PROMOTE_PREPARE_PERIOD,
decision_period: PROMOTE_DECISION_PERIOD,
confirm_period: PROMOTE_CONFIRM_PERIOD,
min_enactment_period: PROMOTE_MIN_ENACTMENT_PERIOD,
min_approval: PROMOTE_MIN_APPROVAL,
min_support: PROMOTE_MIN_SUPPORT,
},
},
pezpallet_referenda::Track {
id: tracks::PROMOTE_TO_4DAN,
info: pezpallet_referenda::TrackInfo {
name: s("promote to IV Dan"),
max_deciding: PROMOTE_MAX_DECIDING,
decision_deposit: PROMOTE_DECISION_DEPOSIT,
prepare_period: PROMOTE_PREPARE_PERIOD,
decision_period: PROMOTE_DECISION_PERIOD,
confirm_period: PROMOTE_CONFIRM_PERIOD,
min_enactment_period: PROMOTE_MIN_ENACTMENT_PERIOD,
min_approval: PROMOTE_MIN_APPROVAL,
min_support: PROMOTE_MIN_SUPPORT,
},
},
pezpallet_referenda::Track {
id: tracks::PROMOTE_TO_5DAN,
info: pezpallet_referenda::TrackInfo {
name: s("promote to V Dan"),
max_deciding: PROMOTE_MAX_DECIDING,
decision_deposit: PROMOTE_DECISION_DEPOSIT,
prepare_period: PROMOTE_PREPARE_PERIOD,
decision_period: PROMOTE_DECISION_PERIOD,
confirm_period: PROMOTE_CONFIRM_PERIOD,
min_enactment_period: PROMOTE_MIN_ENACTMENT_PERIOD,
min_approval: PROMOTE_MIN_APPROVAL,
min_support: PROMOTE_MIN_SUPPORT,
},
},
pezpallet_referenda::Track {
id: tracks::PROMOTE_TO_6DAN,
info: pezpallet_referenda::TrackInfo {
name: s("promote to VI Dan"),
max_deciding: PROMOTE_MAX_DECIDING,
decision_deposit: PROMOTE_DECISION_DEPOSIT,
prepare_period: PROMOTE_PREPARE_PERIOD,
decision_period: PROMOTE_DECISION_PERIOD,
confirm_period: PROMOTE_CONFIRM_PERIOD,
min_enactment_period: PROMOTE_MIN_ENACTMENT_PERIOD,
min_approval: PROMOTE_MIN_APPROVAL,
min_support: PROMOTE_MIN_SUPPORT,
},
},
];
DATA.iter().map(Cow::Borrowed)
}
fn track_for(id: &Self::RuntimeOrigin) -> Result<Self::Id, ()> {
use super::origins::Origin;
use constants as tracks;
#[cfg(feature = "runtime-benchmarks")]
{
// For benchmarks, we enable a root origin.
// It is important that this is not available in production!
let root: Self::RuntimeOrigin = pezframe_system::RawOrigin::Root.into();
if &root == id {
return Ok(tracks::GRAND_MASTERS);
}
}
match Origin::try_from(id.clone()) {
Ok(Origin::Members) => Ok(tracks::MEMBERS),
Ok(Origin::Fellowship2Dan) => Ok(tracks::PROFICIENTS),
Ok(Origin::Fellows) => Ok(tracks::FELLOWS),
Ok(Origin::Architects) => Ok(tracks::ARCHITECTS),
Ok(Origin::Fellowship5Dan) => Ok(tracks::ARCHITECTS_ADEPT),
Ok(Origin::Fellowship6Dan) => Ok(tracks::GRAND_ARCHITECTS),
Ok(Origin::Masters) => Ok(tracks::MASTERS),
Ok(Origin::Fellowship8Dan) => Ok(tracks::MASTERS_CONSTANT),
Ok(Origin::Fellowship9Dan) => Ok(tracks::GRAND_MASTERS),
Ok(Origin::RetainAt1Dan) => Ok(tracks::RETAIN_AT_1DAN),
Ok(Origin::RetainAt2Dan) => Ok(tracks::RETAIN_AT_2DAN),
Ok(Origin::RetainAt3Dan) => Ok(tracks::RETAIN_AT_3DAN),
Ok(Origin::RetainAt4Dan) => Ok(tracks::RETAIN_AT_4DAN),
Ok(Origin::RetainAt5Dan) => Ok(tracks::RETAIN_AT_5DAN),
Ok(Origin::RetainAt6Dan) => Ok(tracks::RETAIN_AT_6DAN),
Ok(Origin::PromoteTo1Dan) => Ok(tracks::PROMOTE_TO_1DAN),
Ok(Origin::PromoteTo2Dan) => Ok(tracks::PROMOTE_TO_2DAN),
Ok(Origin::PromoteTo3Dan) => Ok(tracks::PROMOTE_TO_3DAN),
Ok(Origin::PromoteTo4Dan) => Ok(tracks::PROMOTE_TO_4DAN),
Ok(Origin::PromoteTo5Dan) => Ok(tracks::PROMOTE_TO_5DAN),
Ok(Origin::PromoteTo6Dan) => Ok(tracks::PROMOTE_TO_6DAN),
_ => Err(()),
}
}
}
@@ -0,0 +1,101 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! # Bridge Hub Zagros Runtime genesis config presets
use crate::*;
use alloc::{vec, vec::Vec};
use cumulus_primitives_core::ParaId;
use pezframe_support::build_struct_json_patch;
use pezsp_genesis_builder::PresetId;
use pezsp_keyring::Sr25519Keyring;
use testnet_teyrchains_constants::zagros::xcm_version::SAFE_XCM_VERSION;
use teyrchains_common::{AccountId, AuraId};
const COLLECTIVES_ZAGROS_ED: Balance = ExistentialDeposit::get();
fn collectives_zagros_genesis(
invulnerables: Vec<(AccountId, AuraId)>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
) -> serde_json::Value {
build_struct_json_patch!(RuntimeGenesisConfig {
balances: BalancesConfig {
balances: endowed_accounts
.iter()
.cloned()
.map(|k| (k, COLLECTIVES_ZAGROS_ED * 4096))
.collect::<Vec<_>>(),
},
teyrchain_info: TeyrchainInfoConfig { teyrchain_id: id },
collator_selection: CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: COLLECTIVES_ZAGROS_ED * 16,
},
session: SessionConfig {
keys: invulnerables
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
SessionKeys { aura }, // session keys
)
})
.collect(),
},
pezkuwi_xcm: PezkuwiXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION) },
})
}
/// Provides the JSON representation of predefined genesis config for given `id`.
pub fn get_preset(id: &pezsp_genesis_builder::PresetId) -> Option<pezsp_std::vec::Vec<u8>> {
let patch = match id.as_ref() {
pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET => collectives_zagros_genesis(
// initial collators.
vec![
(Sr25519Keyring::Alice.to_account_id(), Sr25519Keyring::Alice.public().into()),
(Sr25519Keyring::Bob.to_account_id(), Sr25519Keyring::Bob.public().into()),
],
Sr25519Keyring::well_known().map(|k| k.to_account_id()).collect(),
1001.into(),
),
pezsp_genesis_builder::DEV_RUNTIME_PRESET => collectives_zagros_genesis(
// initial collators.
vec![(Sr25519Keyring::Alice.to_account_id(), Sr25519Keyring::Alice.public().into())],
vec![
Sr25519Keyring::Alice.to_account_id(),
Sr25519Keyring::Bob.to_account_id(),
Sr25519Keyring::AliceStash.to_account_id(),
Sr25519Keyring::BobStash.to_account_id(),
],
1001.into(),
),
_ => return None,
};
Some(
serde_json::to_string(&patch)
.expect("serialization to json is expected to work. qed.")
.into_bytes(),
)
}
/// List of supported presets.
pub fn preset_names() -> Vec<PresetId> {
vec![
PresetId::from(pezsp_genesis_builder::DEV_RUNTIME_PRESET),
PresetId::from(pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET),
]
}
@@ -0,0 +1,183 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use crate::OriginCaller;
use alloc::boxed::Box;
use core::{cmp::Ordering, marker::PhantomData};
use pezframe_support::{
dispatch::DispatchResultWithPostInfo,
traits::{Currency, PrivilegeCmp},
weights::Weight,
};
use pezpallet_alliance::{ProposalIndex, ProposalProvider};
use pezsp_runtime::DispatchError;
type AccountIdOf<T> = <T as pezframe_system::Config>::AccountId;
type ProposalOf<T, I> = <T as pezpallet_collective::Config<I>>::Proposal;
type HashOf<T> = <T as pezframe_system::Config>::Hash;
/// Type alias to conveniently refer to the `Currency::Balance` associated type.
pub type BalanceOf<T> =
<pezpallet_balances::Pallet<T> as Currency<<T as pezframe_system::Config>::AccountId>>::Balance;
/// Proposal provider for alliance pallet.
/// Adapter from collective pallet to alliance proposal provider trait.
pub struct AllianceProposalProvider<T, I = ()>(PhantomData<(T, I)>);
impl<T, I> ProposalProvider<AccountIdOf<T>, HashOf<T>, ProposalOf<T, I>>
for AllianceProposalProvider<T, I>
where
T: pezpallet_collective::Config<I> + pezframe_system::Config,
I: 'static,
{
fn propose_proposal(
who: AccountIdOf<T>,
threshold: u32,
proposal: Box<ProposalOf<T, I>>,
length_bound: u32,
) -> Result<(u32, u32), DispatchError> {
pezpallet_collective::Pallet::<T, I>::do_propose_proposed(
who,
threshold,
proposal,
length_bound,
)
}
fn vote_proposal(
who: AccountIdOf<T>,
proposal: HashOf<T>,
index: ProposalIndex,
approve: bool,
) -> Result<bool, DispatchError> {
pezpallet_collective::Pallet::<T, I>::do_vote(who, proposal, index, approve)
}
fn close_proposal(
proposal_hash: HashOf<T>,
proposal_index: ProposalIndex,
proposal_weight_bound: Weight,
length_bound: u32,
) -> DispatchResultWithPostInfo {
pezpallet_collective::Pallet::<T, I>::do_close(
proposal_hash,
proposal_index,
proposal_weight_bound,
length_bound,
)
}
fn proposal_of(proposal_hash: HashOf<T>) -> Option<ProposalOf<T, I>> {
pezpallet_collective::ProposalOf::<T, I>::get(proposal_hash)
}
}
/// Used to compare the privilege of an origin inside the scheduler.
pub struct EqualOrGreatestRootCmp;
impl PrivilegeCmp<OriginCaller> for EqualOrGreatestRootCmp {
fn cmp_privilege(left: &OriginCaller, right: &OriginCaller) -> Option<Ordering> {
if left == right {
return Some(Ordering::Equal);
}
match (left, right) {
// Root is greater than anything.
(OriginCaller::system(pezframe_system::RawOrigin::Root), _) => Some(Ordering::Greater),
_ => None,
}
}
}
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmarks {
use super::*;
use crate::TeyrchainSystem;
use cumulus_primitives_core::{ChannelStatus, GetChannelInfo};
use pezframe_support::traits::{
fungible,
tokens::{Pay, PaymentStatus},
Get,
};
use pezpallet_ranked_collective::Rank;
use pezsp_runtime::traits::Convert;
use teyrchains_common::{AccountId, Balance};
/// Rank to salary conversion helper type.
pub struct RankToSalary<Fungible>(PhantomData<Fungible>);
impl<Fungible> Convert<Rank, Balance> for RankToSalary<Fungible>
where
Fungible: fungible::Inspect<AccountId, Balance = Balance>,
{
fn convert(r: Rank) -> Balance {
Balance::from(r).saturating_mul(Fungible::minimum_balance())
}
}
/// Trait for setting up any prerequisites for successful execution of benchmarks.
pub trait EnsureSuccessful {
fn ensure_successful();
}
/// Implementation of the [`EnsureSuccessful`] trait which opens an HRMP channel between
/// the Collectives and a teyrchain with a given ID.
pub struct OpenHrmpChannel<I>(PhantomData<I>);
impl<I: Get<u32>> EnsureSuccessful for OpenHrmpChannel<I> {
fn ensure_successful() {
if let ChannelStatus::Closed = TeyrchainSystem::get_channel_status(I::get().into()) {
TeyrchainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(I::get().into())
}
}
}
/// Type that wraps a type implementing the [`Pay`] trait to decorate its
/// [`Pay::ensure_successful`] function with a provided implementation of the
/// [`EnsureSuccessful`] trait.
pub struct PayWithEnsure<O, E>(PhantomData<(O, E)>);
impl<O, E> Pay for PayWithEnsure<O, E>
where
O: Pay,
E: EnsureSuccessful,
{
type AssetKind = O::AssetKind;
type Balance = O::Balance;
type Beneficiary = O::Beneficiary;
type Error = O::Error;
type Id = O::Id;
fn pay(
who: &Self::Beneficiary,
asset_kind: Self::AssetKind,
amount: Self::Balance,
) -> Result<Self::Id, Self::Error> {
O::pay(who, asset_kind, amount)
}
fn check_payment(id: Self::Id) -> PaymentStatus {
O::check_payment(id)
}
fn ensure_successful(
who: &Self::Beneficiary,
asset_kind: Self::AssetKind,
amount: Self::Balance,
) {
E::ensure_successful();
O::ensure_successful(who, asset_kind, amount)
}
fn ensure_concluded(id: Self::Id) {
O::ensure_concluded(id)
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,141 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Pezcumulus.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! The Zagros Technical Fellowship.
//! The Pezkuwi Secretary Collective.
use crate::{xcm_config::FellowshipAdminBodyId, *};
use pezframe_support::{
parameter_types,
traits::{tokens::GetSalary, EitherOf, MapSuccess, NoOpPoll, PalletInfoAccess},
};
use pezframe_system::{pezpallet_prelude::BlockNumberFor, EnsureRootWithSuccess};
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
use pezsp_core::{ConstU128, ConstU32};
use pezsp_runtime::traits::{ConstU16, ConvertToValue, Identity, Replace};
use zagros_runtime_constants::time::HOURS;
#[cfg(feature = "runtime-benchmarks")]
use crate::impls::benchmarks::OpenHrmpChannel;
use xcm::prelude::*;
use xcm_builder::{AliasesIntoAccountId32, PayOverXcm};
use self::xcm_config::UsdtAssetHub;
/// The Secretary members' ranks.
pub mod ranks {
use pezpallet_ranked_collective::Rank;
pub const SECRETARY_CANDIDATE: Rank = 0;
pub const SECRETARY: Rank = 1;
}
/// Origins of:
/// - Root;
/// - FellowshipAdmin (i.e. token holder referendum);
/// - Plurality vote from Fellows can promote, demote, remove and approve rank retention of members
/// of the Secretary Collective (rank `2`).
type ApproveOrigin = EitherOf<
EnsureRootWithSuccess<AccountId, ConstU16<65535>>,
EitherOf<
MapSuccess<
EnsureXcm<IsVoiceOfBody<GovernanceLocation, FellowshipAdminBodyId>>,
Replace<ConstU16<65535>>,
>,
MapSuccess<Fellows, Replace<ConstU16<65535>>>,
>,
>;
pub type SecretaryCollectiveInstance = pezpallet_ranked_collective::Instance3;
impl pezpallet_ranked_collective::Config<SecretaryCollectiveInstance> for Runtime {
type WeightInfo = ();
type RuntimeEvent = RuntimeEvent;
type AddOrigin = ApproveOrigin;
type RemoveOrigin = ApproveOrigin;
type PromoteOrigin = ApproveOrigin;
type DemoteOrigin = ApproveOrigin;
type ExchangeOrigin = ApproveOrigin;
type Polls = NoOpPoll<BlockNumberFor<Runtime>>;
type MinRankOfClass = Identity;
type MemberSwappedHandler = crate::SecretarySalary;
type VoteWeight = pezpallet_ranked_collective::Geometric;
type MaxMemberCount = ();
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkSetup = crate::SecretarySalary;
}
pub type SecretarySalaryInstance = pezpallet_salary::Instance3;
parameter_types! {
// The interior location on AssetHub for the paying account. This is the Secretary Salary
// pallet instance. This sovereign account will need funding.
pub SecretarySalaryInteriorLocation: InteriorLocation = PalletInstance(<crate::SecretarySalary as PalletInfoAccess>::index() as u8).into();
}
const USDT_UNITS: u128 = 1_000_000;
/// [`PayOverXcm`] setup to pay the Secretary salary on the AssetHub in USDT.
pub type SecretarySalaryPaymaster = PayOverXcm<
SecretarySalaryInteriorLocation,
crate::xcm_config::XcmRouter,
crate::PezkuwiXcm,
ConstU32<{ 6 * HOURS }>,
AccountId,
(),
ConvertToValue<UsdtAssetHub>,
AliasesIntoAccountId32<(), AccountId>,
>;
pub struct SalaryForRank;
impl GetSalary<u16, AccountId, Balance> for SalaryForRank {
fn get_salary(rank: u16, _who: &AccountId) -> Balance {
if rank == 1 {
6666 * USDT_UNITS
} else {
0
}
}
}
impl pezpallet_salary::Config<SecretarySalaryInstance> for Runtime {
type WeightInfo = ();
type RuntimeEvent = RuntimeEvent;
#[cfg(not(feature = "runtime-benchmarks"))]
type Paymaster = SecretarySalaryPaymaster;
#[cfg(feature = "runtime-benchmarks")]
type Paymaster = crate::impls::benchmarks::PayWithEnsure<
SecretarySalaryPaymaster,
OpenHrmpChannel<ConstU32<1000>>,
>;
type Members = pezpallet_ranked_collective::Pallet<Runtime, SecretaryCollectiveInstance>;
#[cfg(not(feature = "runtime-benchmarks"))]
type Salary = SalaryForRank;
#[cfg(feature = "runtime-benchmarks")]
type Salary = pezframe_support::traits::tokens::ConvertRank<
crate::impls::benchmarks::RankToSalary<Balances>,
>;
// 15 days to register for a salary payment.
type RegistrationPeriod = ConstU32<{ 15 * DAYS }>;
// 15 days to claim the salary payment.
type PayoutPeriod = ConstU32<{ 15 * DAYS }>;
// Total monthly salary budget.
type Budget = ConstU128<{ 6666 * USDT_UNITS }>;
}
@@ -0,0 +1,53 @@
// This file is part of Pezcumulus.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub mod constants {
use pezframe_support::{
parameter_types,
weights::{constants, Weight},
};
parameter_types! {
/// Importing a block with 0 Extrinsics.
pub const BlockExecutionWeight: Weight =
Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0);
}
#[cfg(test)]
mod test_weights {
use pezframe_support::weights::constants;
/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
// you can delete it.
#[test]
fn sane() {
let w = super::constants::BlockExecutionWeight::get();
// At least 100 µs.
assert!(
w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
"Weight should be at least 100 µs."
);
// At most 50 ms.
assert!(
w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS,
"Weight should be at most 50 ms."
);
}
}
}
@@ -0,0 +1,53 @@
// This file is part of Pezcumulus.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub mod constants {
use pezframe_support::{
parameter_types,
weights::{constants, Weight},
};
parameter_types! {
/// Executing a NO-OP `System::remarks` Extrinsic.
pub const ExtrinsicBaseWeight: Weight =
Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0);
}
#[cfg(test)]
mod test_weights {
use pezframe_support::weights::constants;
/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
// you can delete it.
#[test]
fn sane() {
let w = super::constants::ExtrinsicBaseWeight::get();
// At least 10 µs.
assert!(
w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
"Weight should be at least 10 µs."
);
// At most 1 ms.
assert!(
w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Weight should be at most 1 ms."
);
}
}
}
@@ -0,0 +1,187 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezframe_system`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezframe_system
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezframe_system`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezframe_system::WeightInfo for WeightInfo<T> {
/// The range of component `b` is `[0, 3932160]`.
fn remark(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_073_000 picoseconds.
Weight::from_parts(2_155_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 157
.saturating_add(Weight::from_parts(14_103, 0).saturating_mul(b.into()))
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 6_065_000 picoseconds.
Weight::from_parts(6_260_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 151
.saturating_add(Weight::from_parts(15_933, 0).saturating_mul(b.into()))
}
/// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
/// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
fn set_heap_pages() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_388_000 picoseconds.
Weight::from_parts(3_669_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `TeyrchainSystem::ValidationData` (r:1 w:0)
/// Proof: `TeyrchainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::UpgradeRestrictionSignal` (r:1 w:0)
/// Proof: `TeyrchainSystem::UpgradeRestrictionSignal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::PendingValidationCode` (r:1 w:1)
/// Proof: `TeyrchainSystem::PendingValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `TeyrchainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::NewValidationCode` (r:0 w:1)
/// Proof: `TeyrchainSystem::NewValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::DidSetValidationCode` (r:0 w:1)
/// Proof: `TeyrchainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn set_code() -> Weight {
// Proof Size summary in bytes:
// Measured: `164`
// Estimated: `1649`
// Minimum execution time: 181_369_683_000 picoseconds.
Weight::from_parts(183_602_069_000, 0)
.saturating_add(Weight::from_parts(0, 1649))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Skipped::Metadata` (r:0 w:0)
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `i` is `[0, 1000]`.
fn set_storage(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_058_000 picoseconds.
Weight::from_parts(2_195_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 2_092
.saturating_add(Weight::from_parts(717_860, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
/// Storage: `Skipped::Metadata` (r:0 w:0)
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `i` is `[0, 1000]`.
fn kill_storage(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_952_000 picoseconds.
Weight::from_parts(2_044_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 946
.saturating_add(Weight::from_parts(556_402, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
/// Storage: `Skipped::Metadata` (r:0 w:0)
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `p` is `[0, 1000]`.
fn kill_prefix(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `99 + p * (69 ±0)`
// Estimated: `97 + p * (70 ±0)`
// Minimum execution time: 4_145_000 picoseconds.
Weight::from_parts(4_278_000, 0)
.saturating_add(Weight::from_parts(0, 97))
// Standard Error: 1_307
.saturating_add(Weight::from_parts(1_311_588, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
.saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into()))
}
/// Storage: `System::AuthorizedUpgrade` (r:0 w:1)
/// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
fn authorize_upgrade() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 10_570_000 picoseconds.
Weight::from_parts(10_988_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::AuthorizedUpgrade` (r:1 w:1)
/// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainSystem::ValidationData` (r:1 w:0)
/// Proof: `TeyrchainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::UpgradeRestrictionSignal` (r:1 w:0)
/// Proof: `TeyrchainSystem::UpgradeRestrictionSignal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::PendingValidationCode` (r:1 w:1)
/// Proof: `TeyrchainSystem::PendingValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `TeyrchainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::NewValidationCode` (r:0 w:1)
/// Proof: `TeyrchainSystem::NewValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::DidSetValidationCode` (r:0 w:1)
/// Proof: `TeyrchainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn apply_authorized_upgrade() -> Weight {
// Proof Size summary in bytes:
// Measured: `186`
// Estimated: `1671`
// Minimum execution time: 184_883_922_000 picoseconds.
Weight::from_parts(187_106_209_000, 0)
.saturating_add(Weight::from_parts(0, 1671))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
}
}
@@ -0,0 +1,129 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezframe_system_extensions`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezframe_system_extensions
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezframe_system_extensions`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezframe_system::ExtensionsWeightInfo for WeightInfo<T> {
fn check_genesis() -> Weight {
// Proof Size summary in bytes:
// Measured: `30`
// Estimated: `0`
// Minimum execution time: 3_212_000 picoseconds.
Weight::from_parts(3_403_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn check_mortality_mortal_transaction() -> Weight {
// Proof Size summary in bytes:
// Measured: `68`
// Estimated: `0`
// Minimum execution time: 6_372_000 picoseconds.
Weight::from_parts(6_566_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn check_mortality_immortal_transaction() -> Weight {
// Proof Size summary in bytes:
// Measured: `68`
// Estimated: `0`
// Minimum execution time: 6_440_000 picoseconds.
Weight::from_parts(6_579_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn check_non_zero_sender() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 514_000 picoseconds.
Weight::from_parts(574_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn check_nonce() -> Weight {
// Proof Size summary in bytes:
// Measured: `101`
// Estimated: `3593`
// Minimum execution time: 6_850_000 picoseconds.
Weight::from_parts(7_236_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
fn check_spec_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 398_000 picoseconds.
Weight::from_parts(479_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn check_tx_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 408_000 picoseconds.
Weight::from_parts(445_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn check_weight() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_873_000 picoseconds.
Weight::from_parts(4_107_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn weight_reclaim() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_180_000 picoseconds.
Weight::from_parts(2_336_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
@@ -0,0 +1,54 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub mod block_weights;
pub mod cumulus_pallet_teyrchain_system;
pub mod cumulus_pallet_weight_reclaim;
pub mod cumulus_pallet_xcmp_queue;
pub mod extrinsic_weights;
pub mod pezframe_system;
pub mod pezframe_system_extensions;
pub mod pezpallet_alliance;
pub mod pezpallet_asset_rate;
pub mod pezpallet_balances;
pub mod pezpallet_collator_selection;
pub mod pezpallet_collective;
pub mod pezpallet_collective_content;
pub mod pezpallet_core_fellowship_ambassador_core;
pub mod pezpallet_core_fellowship_fellowship_core;
pub mod pezpallet_message_queue;
pub mod pezpallet_multisig;
pub mod pezpallet_preimage;
pub mod pezpallet_proxy;
pub mod pezpallet_ranked_collective_ambassador_collective;
pub mod pezpallet_ranked_collective_fellowship_collective;
pub mod pezpallet_referenda_ambassador_referenda;
pub mod pezpallet_referenda_fellowship_referenda;
pub mod pezpallet_salary_ambassador_salary;
pub mod pezpallet_salary_fellowship_salary;
pub mod pezpallet_scheduler;
pub mod pezpallet_session;
pub mod pezpallet_timestamp;
pub mod pezpallet_transaction_payment;
pub mod pezpallet_treasury;
pub mod pezpallet_utility;
pub mod pezpallet_xcm;
pub mod paritydb_weights;
pub mod rocksdb_weights;
pub mod xcm;
pub use block_weights::constants::BlockExecutionWeight;
pub use extrinsic_weights::constants::ExtrinsicBaseWeight;
pub use rocksdb_weights::constants::RocksDbWeight;
@@ -0,0 +1,487 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_alliance`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_alliance
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_alliance`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_alliance::WeightInfo for WeightInfo<T> {
/// Storage: `Alliance::Members` (r:1 w:0)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalCount` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Voting` (r:0 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `b` is `[1, 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: `476 + m * (32 ±0) + p * (36 ±0)`
// Estimated: `6676 + m * (32 ±0) + p * (36 ±0)`
// Minimum execution time: 33_747_000 picoseconds.
Weight::from_parts(37_704_811, 0)
.saturating_add(Weight::from_parts(0, 6676))
// Standard Error: 192
.saturating_add(Weight::from_parts(1_404, 0).saturating_mul(b.into()))
// Standard Error: 2_015
.saturating_add(Weight::from_parts(41_691, 0).saturating_mul(m.into()))
// Standard Error: 1_989
.saturating_add(Weight::from_parts(193_120, 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, 32).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
}
/// Storage: `Alliance::Members` (r:1 w:0)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::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: `905 + m * (64 ±0)`
// Estimated: `6676 + m * (64 ±0)`
// Minimum execution time: 35_702_000 picoseconds.
Weight::from_parts(36_097_764, 0)
.saturating_add(Weight::from_parts(0, 6676))
// Standard Error: 6_828
.saturating_add(Weight::from_parts(79_803, 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, 64).saturating_mul(m.into()))
}
/// Storage: `Alliance::Members` (r:1 w:0)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:0 w:1)
/// Proof: `AllianceMotion::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: `349 + m * (96 ±0) + p * (36 ±0)`
// Estimated: `6676 + m * (97 ±0) + p * (36 ±0)`
// Minimum execution time: 45_494_000 picoseconds.
Weight::from_parts(45_373_510, 0)
.saturating_add(Weight::from_parts(0, 6676))
// Standard Error: 1_314
.saturating_add(Weight::from_parts(47_248, 0).saturating_mul(m.into()))
// Standard Error: 1_282
.saturating_add(Weight::from_parts(157_090, 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, 97).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
}
/// Storage: `Alliance::Members` (r:1 w:0)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `b` is `[1, 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: `799 + m * (96 ±0) + p * (41 ±0)`
// Estimated: `6676 + m * (97 ±0) + p * (40 ±0)`
// Minimum execution time: 57_219_000 picoseconds.
Weight::from_parts(58_939_652, 0)
.saturating_add(Weight::from_parts(0, 6676))
// Standard Error: 192
.saturating_add(Weight::from_parts(180, 0).saturating_mul(b.into()))
// Standard Error: 2_031
.saturating_add(Weight::from_parts(58_445, 0).saturating_mul(m.into()))
// Standard Error: 1_980
.saturating_add(Weight::from_parts(158_385, 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, 97).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into()))
}
/// Storage: `Alliance::Members` (r:1 w:0)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:1 w:0)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Alliance::Rule` (r:0 w:1)
/// Proof: `Alliance::Rule` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`)
/// The range of component `m` is `[2, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_disapproved(m: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `555 + m * (96 ±0) + p * (41 ±0)`
// Estimated: `6676 + m * (109 ±0) + p * (43 ±0)`
// Minimum execution time: 60_124_000 picoseconds.
Weight::from_parts(58_232_090, 0)
.saturating_add(Weight::from_parts(0, 6676))
// Standard Error: 3_989
.saturating_add(Weight::from_parts(121_406, 0).saturating_mul(m.into()))
// Standard Error: 3_940
.saturating_add(Weight::from_parts(170_916, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(Weight::from_parts(0, 109).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 43).saturating_mul(p.into()))
}
/// Storage: `Alliance::Members` (r:1 w:0)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:1 w:0)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:0 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `m` is `[5, 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: `454 + m * (96 ±0) + p * (36 ±0)`
// Estimated: `6676 + m * (96 ±0) + p * (36 ±0)`
// Minimum execution time: 47_597_000 picoseconds.
Weight::from_parts(45_630_204, 0)
.saturating_add(Weight::from_parts(0, 6676))
// Standard Error: 137
.saturating_add(Weight::from_parts(558, 0).saturating_mul(b.into()))
// Standard Error: 1_467
.saturating_add(Weight::from_parts(57_705, 0).saturating_mul(m.into()))
// Standard Error: 1_414
.saturating_add(Weight::from_parts(154_447, 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, 96).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
}
/// Storage: `Alliance::Members` (r:2 w:2)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Members` (r:1 w:1)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `m` is `[1, 100]`.
/// The range of component `z` is `[0, 100]`.
fn init_members(m: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `48`
// Estimated: `12362`
// Minimum execution time: 30_473_000 picoseconds.
Weight::from_parts(21_657_476, 0)
.saturating_add(Weight::from_parts(0, 12362))
// Standard Error: 856
.saturating_add(Weight::from_parts(117_668, 0).saturating_mul(m.into()))
// Standard Error: 846
.saturating_add(Weight::from_parts(104_452, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Alliance::Members` (r:2 w:2)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:0)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Alliance::DepositOf` (r:200 w:50)
/// Proof: `Alliance::DepositOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:50 w:50)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Members` (r:0 w:1)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:0 w:1)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `x` is `[1, 100]`.
/// The range of component `y` is `[0, 100]`.
/// The range of component `z` is `[0, 50]`.
fn disband(x: u32, y: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + x * (52 ±0) + y * (53 ±0) + z * (250 ±0)`
// Estimated: `12362 + x * (2539 ±0) + y * (2539 ±0) + z * (2603 ±1)`
// Minimum execution time: 388_921_000 picoseconds.
Weight::from_parts(402_549_000, 0)
.saturating_add(Weight::from_parts(0, 12362))
// Standard Error: 33_130
.saturating_add(Weight::from_parts(781_314, 0).saturating_mul(x.into()))
// Standard Error: 32_970
.saturating_add(Weight::from_parts(772_186, 0).saturating_mul(y.into()))
// Standard Error: 65_881
.saturating_add(Weight::from_parts(15_421_636, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(y.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(z.into())))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(z.into())))
.saturating_add(Weight::from_parts(0, 2539).saturating_mul(x.into()))
.saturating_add(Weight::from_parts(0, 2539).saturating_mul(y.into()))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(z.into()))
}
/// Storage: `Alliance::Rule` (r:0 w:1)
/// Proof: `Alliance::Rule` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`)
fn set_rule() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 6_444_000 picoseconds.
Weight::from_parts(6_820_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Alliance::Announcements` (r:1 w:1)
/// Proof: `Alliance::Announcements` (`max_values`: Some(1), `max_size`: Some(8702), added: 9197, mode: `MaxEncodedLen`)
fn announce() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `10187`
// Minimum execution time: 9_778_000 picoseconds.
Weight::from_parts(10_288_000, 0)
.saturating_add(Weight::from_parts(0, 10187))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Alliance::Announcements` (r:1 w:1)
/// Proof: `Alliance::Announcements` (`max_values`: Some(1), `max_size`: Some(8702), added: 9197, mode: `MaxEncodedLen`)
fn remove_announcement() -> Weight {
// Proof Size summary in bytes:
// Measured: `149`
// Estimated: `10187`
// Minimum execution time: 11_342_000 picoseconds.
Weight::from_parts(11_930_000, 0)
.saturating_add(Weight::from_parts(0, 10187))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Alliance::Members` (r:3 w:1)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `Alliance::UnscrupulousAccounts` (r:1 w:0)
/// Proof: `Alliance::UnscrupulousAccounts` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Alliance::DepositOf` (r:0 w:1)
/// Proof: `Alliance::DepositOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
fn join_alliance() -> Weight {
// Proof Size summary in bytes:
// Measured: `300`
// Estimated: `18048`
// Minimum execution time: 45_028_000 picoseconds.
Weight::from_parts(45_950_000, 0)
.saturating_add(Weight::from_parts(0, 18048))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Alliance::Members` (r:3 w:1)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `Alliance::UnscrupulousAccounts` (r:1 w:0)
/// Proof: `Alliance::UnscrupulousAccounts` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
fn nominate_ally() -> Weight {
// Proof Size summary in bytes:
// Measured: `199`
// Estimated: `18048`
// Minimum execution time: 25_601_000 picoseconds.
Weight::from_parts(26_467_000, 0)
.saturating_add(Weight::from_parts(0, 18048))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Alliance::Members` (r:2 w:2)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:0)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:0 w:1)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:0 w:1)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn elevate_ally() -> Weight {
// Proof Size summary in bytes:
// Measured: `273`
// Estimated: `12362`
// Minimum execution time: 25_838_000 picoseconds.
Weight::from_parts(26_960_000, 0)
.saturating_add(Weight::from_parts(0, 12362))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `Alliance::Members` (r:4 w:2)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:0)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:0 w:1)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:0 w:1)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Alliance::RetiringMembers` (r:0 w:1)
/// Proof: `Alliance::RetiringMembers` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn give_retirement_notice() -> Weight {
// Proof Size summary in bytes:
// Measured: `273`
// Estimated: `23734`
// Minimum execution time: 31_072_000 picoseconds.
Weight::from_parts(32_514_000, 0)
.saturating_add(Weight::from_parts(0, 23734))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `Alliance::RetiringMembers` (r:1 w:1)
/// Proof: `Alliance::RetiringMembers` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Alliance::Members` (r:1 w:1)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `Alliance::DepositOf` (r:1 w:1)
/// Proof: `Alliance::DepositOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn retire() -> Weight {
// Proof Size summary in bytes:
// Measured: `517`
// Estimated: `6676`
// Minimum execution time: 44_011_000 picoseconds.
Weight::from_parts(45_646_000, 0)
.saturating_add(Weight::from_parts(0, 6676))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `Alliance::Members` (r:3 w:1)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:0)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Alliance::DepositOf` (r:1 w:1)
/// Proof: `Alliance::DepositOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Members` (r:0 w:1)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:0 w:1)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn kick_member() -> Weight {
// Proof Size summary in bytes:
// Measured: `537`
// Estimated: `18048`
// Minimum execution time: 55_014_000 picoseconds.
Weight::from_parts(57_979_000, 0)
.saturating_add(Weight::from_parts(0, 18048))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `Alliance::UnscrupulousAccounts` (r:1 w:1)
/// Proof: `Alliance::UnscrupulousAccounts` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `Alliance::UnscrupulousWebsites` (r:1 w:1)
/// Proof: `Alliance::UnscrupulousWebsites` (`max_values`: Some(1), `max_size`: Some(25702), added: 26197, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 100]`.
/// The range of component `l` is `[0, 255]`.
fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `27187`
// Minimum execution time: 5_950_000 picoseconds.
Weight::from_parts(6_113_000, 0)
.saturating_add(Weight::from_parts(0, 27187))
// Standard Error: 4_302
.saturating_add(Weight::from_parts(1_160_818, 0).saturating_mul(n.into()))
// Standard Error: 1_684
.saturating_add(Weight::from_parts(76_012, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Alliance::UnscrupulousAccounts` (r:1 w:1)
/// Proof: `Alliance::UnscrupulousAccounts` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`)
/// Storage: `Alliance::UnscrupulousWebsites` (r:1 w:1)
/// Proof: `Alliance::UnscrupulousWebsites` (`max_values`: Some(1), `max_size`: Some(25702), added: 26197, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 100]`.
/// The range of component `l` is `[0, 255]`.
fn remove_unscrupulous_items(n: u32, l: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + l * (100 ±0) + n * (289 ±0)`
// Estimated: `27187`
// Minimum execution time: 6_058_000 picoseconds.
Weight::from_parts(6_147_000, 0)
.saturating_add(Weight::from_parts(0, 27187))
// Standard Error: 177_005
.saturating_add(Weight::from_parts(18_061_081, 0).saturating_mul(n.into()))
// Standard Error: 69_323
.saturating_add(Weight::from_parts(89_539, 0).saturating_mul(l.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Alliance::Members` (r:3 w:2)
/// Proof: `Alliance::Members` (`max_values`: None, `max_size`: Some(3211), added: 5686, mode: `MaxEncodedLen`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:0)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:0 w:1)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:0 w:1)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn abdicate_fellow_status() -> Weight {
// Proof Size summary in bytes:
// Measured: `273`
// Estimated: `18048`
// Minimum execution time: 29_918_000 picoseconds.
Weight::from_parts(31_599_000, 0)
.saturating_add(Weight::from_parts(0, 18048))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
}
@@ -0,0 +1,89 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_asset_rate`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_asset_rate
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_asset_rate`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_asset_rate::WeightInfo for WeightInfo<T> {
/// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1)
/// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`)
fn create() -> Weight {
// Proof Size summary in bytes:
// Measured: `6`
// Estimated: `4703`
// Minimum execution time: 12_007_000 picoseconds.
Weight::from_parts(12_397_000, 0)
.saturating_add(Weight::from_parts(0, 4703))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1)
/// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`)
fn update() -> Weight {
// Proof Size summary in bytes:
// Measured: `73`
// Estimated: `4703`
// Minimum execution time: 12_685_000 picoseconds.
Weight::from_parts(13_346_000, 0)
.saturating_add(Weight::from_parts(0, 4703))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AssetRate::ConversionRateToNative` (r:1 w:1)
/// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`)
fn remove() -> Weight {
// Proof Size summary in bytes:
// Measured: `73`
// Estimated: `4703`
// Minimum execution time: 13_926_000 picoseconds.
Weight::from_parts(14_430_000, 0)
.saturating_add(Weight::from_parts(0, 4703))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
@@ -0,0 +1,177 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_balances
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_balances`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_balances::WeightInfo for WeightInfo<T> {
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_allow_death() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 52_587_000 picoseconds.
Weight::from_parts(53_746_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 42_362_000 picoseconds.
Weight::from_parts(43_924_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_set_balance_creating() -> Weight {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `3593`
// Minimum execution time: 15_364_000 picoseconds.
Weight::from_parts(16_051_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_set_balance_killing() -> Weight {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `3593`
// Minimum execution time: 23_251_000 picoseconds.
Weight::from_parts(23_875_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `6196`
// Minimum execution time: 54_792_000 picoseconds.
Weight::from_parts(58_808_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_all() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 52_035_000 picoseconds.
Weight::from_parts(54_561_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_unreserve() -> Weight {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `3593`
// Minimum execution time: 18_285_000 picoseconds.
Weight::from_parts(19_517_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:999 w:999)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `u` is `[1, 1000]`.
fn upgrade_accounts(u: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + u * (136 ±0)`
// Estimated: `990 + u * (2603 ±0)`
// Minimum execution time: 17_554_000 picoseconds.
Weight::from_parts(17_786_000, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 46_065
.saturating_add(Weight::from_parts(16_485_828, 0).saturating_mul(u.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
}
fn force_adjust_total_issuance() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 6_744_000 picoseconds.
Weight::from_parts(7_082_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn burn_allow_death() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 33_951_000 picoseconds.
Weight::from_parts(39_927_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn burn_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 22_675_000 picoseconds.
Weight::from_parts(23_233_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
@@ -0,0 +1,280 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_collator_selection`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_collator_selection
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_collator_selection`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_collator_selection::WeightInfo for WeightInfo<T> {
/// Storage: `Session::NextKeys` (r:20 w:0)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CollatorSelection::Invulnerables` (r:0 w:1)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// The range of component `b` is `[1, 20]`.
fn set_invulnerables(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `164 + b * (79 ±0)`
// Estimated: `1155 + b * (2555 ±0)`
// Minimum execution time: 13_764_000 picoseconds.
Weight::from_parts(11_523_628, 0)
.saturating_add(Weight::from_parts(0, 1155))
// Standard Error: 10_118
.saturating_add(Weight::from_parts(4_062_086, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into()))
}
/// Storage: `Session::NextKeys` (r:1 w:0)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:1)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `b` is `[1, 19]`.
/// The range of component `c` is `[1, 99]`.
fn add_invulnerable(b: u32, c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `793 + b * (32 ±0) + c * (53 ±0)`
// Estimated: `6287 + b * (37 ±0) + c * (53 ±0)`
// Minimum execution time: 51_019_000 picoseconds.
Weight::from_parts(52_207_693, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 9_905
.saturating_add(Weight::from_parts(87_209, 0).saturating_mul(b.into()))
// Standard Error: 1_877
.saturating_add(Weight::from_parts(136_234, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into()))
}
/// Storage: `CollatorSelection::CandidateList` (r:1 w:0)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:1)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// The range of component `b` is `[5, 20]`.
fn remove_invulnerable(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `153 + b * (32 ±0)`
// Estimated: `6287`
// Minimum execution time: 13_569_000 picoseconds.
Weight::from_parts(13_828_814, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 2_278
.saturating_add(Weight::from_parts(153_633, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CollatorSelection::DesiredCandidates` (r:0 w:1)
/// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn set_desired_candidates() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_650_000 picoseconds.
Weight::from_parts(5_863_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:1)
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:100 w:100)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:100)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// The range of component `c` is `[0, 100]`.
/// The range of component `k` is `[0, 100]`.
fn set_candidacy_bond(c: u32, k: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + c * (180 ±0) + k * (113 ±0)`
// Estimated: `6287 + c * (901 ±29) + k * (901 ±29)`
// Minimum execution time: 11_764_000 picoseconds.
Weight::from_parts(12_075_000, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 182_131
.saturating_add(Weight::from_parts(6_205_013, 0).saturating_mul(c.into()))
// Standard Error: 182_131
.saturating_add(Weight::from_parts(5_799_911, 0).saturating_mul(k.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into())))
.saturating_add(Weight::from_parts(0, 901).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 901).saturating_mul(k.into()))
}
/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0)
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// The range of component `c` is `[4, 100]`.
fn update_bond(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `323 + c * (50 ±0)`
// Estimated: `6287`
// Minimum execution time: 30_863_000 picoseconds.
Weight::from_parts(34_693_079, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 3_366
.saturating_add(Weight::from_parts(196_136, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `Session::NextKeys` (r:1 w:0)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0)
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// The range of component `c` is `[1, 99]`.
fn register_as_candidate(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `758 + c * (52 ±0)`
// Estimated: `6287 + c * (54 ±0)`
// Minimum execution time: 43_791_000 picoseconds.
Weight::from_parts(48_850_114, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 2_295
.saturating_add(Weight::from_parts(177_217, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into()))
}
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0)
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Session::NextKeys` (r:1 w:0)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:2)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// The range of component `c` is `[4, 100]`.
fn take_candidate_slot(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `926 + c * (52 ±0)`
// Estimated: `6287 + c * (55 ±0)`
// Minimum execution time: 61_972_000 picoseconds.
Weight::from_parts(65_916_131, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 4_193
.saturating_add(Weight::from_parts(272_995, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(Weight::from_parts(0, 55).saturating_mul(c.into()))
}
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// The range of component `c` is `[4, 100]`.
fn leave_intent(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `348 + c * (48 ±0)`
// Estimated: `6287`
// Minimum execution time: 37_663_000 picoseconds.
Weight::from_parts(37_217_061, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 3_895
.saturating_add(Weight::from_parts(325_751, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
fn note_author() -> Weight {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `6196`
// Minimum execution time: 44_444_000 picoseconds.
Weight::from_parts(45_661_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `CollatorSelection::CandidateList` (r:1 w:0)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:100 w:0)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::DesiredCandidates` (r:1 w:0)
/// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:97 w:97)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 100]`.
/// The range of component `c` is `[1, 100]`.
fn new_session(r: u32, c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2251 + c * (97 ±0) + r * (112 ±0)`
// Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)`
// Minimum execution time: 23_760_000 picoseconds.
Weight::from_parts(24_070_000, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 324_546
.saturating_add(Weight::from_parts(15_228_943, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(r.into()))
}
}
@@ -0,0 +1,344 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_collective`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_collective
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_collective`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_collective::WeightInfo for WeightInfo<T> {
/// Storage: `AllianceMotion::Members` (r:1 w:1)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:0)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Voting` (r:100 w:100)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:0 w:1)
/// Proof: `AllianceMotion::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 * (3232 ±0) + p * (3190 ±0)`
// Estimated: `15728 + m * (1967 ±23) + p * (4332 ±23)`
// Minimum execution time: 16_273_000 picoseconds.
Weight::from_parts(16_696_000, 0)
.saturating_add(Weight::from_parts(0, 15728))
// Standard Error: 74_425
.saturating_add(Weight::from_parts(5_587_078, 0).saturating_mul(m.into()))
// Standard Error: 74_425
.saturating_add(Weight::from_parts(9_950_043, 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, 1967).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into()))
}
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`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: `69 + m * (32 ±0)`
// Estimated: `1555 + m * (32 ±0)`
// Minimum execution time: 14_858_000 picoseconds.
Weight::from_parts(14_156_893, 0)
.saturating_add(Weight::from_parts(0, 1555))
// Standard Error: 31
.saturating_add(Weight::from_parts(1_367, 0).saturating_mul(b.into()))
// Standard Error: 319
.saturating_add(Weight::from_parts(16_451, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into()))
}
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:0)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `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: `69 + m * (32 ±0)`
// Estimated: `3535 + m * (32 ±0)`
// Minimum execution time: 17_653_000 picoseconds.
Weight::from_parts(16_775_034, 0)
.saturating_add(Weight::from_parts(0, 3535))
// Standard Error: 35
.saturating_add(Weight::from_parts(1_558, 0).saturating_mul(b.into()))
// Standard Error: 370
.saturating_add(Weight::from_parts(27_907, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into()))
}
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalCount` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Voting` (r:0 w:1)
/// Proof: `AllianceMotion::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: `359 + m * (32 ±0) + p * (36 ±0)`
// Estimated: `3751 + m * (33 ±0) + p * (36 ±0)`
// Minimum execution time: 23_361_000 picoseconds.
Weight::from_parts(21_486_243, 0)
.saturating_add(Weight::from_parts(0, 3751))
// Standard Error: 235
.saturating_add(Weight::from_parts(3_711, 0).saturating_mul(b.into()))
// Standard Error: 2_462
.saturating_add(Weight::from_parts(49_738, 0).saturating_mul(m.into()))
// Standard Error: 2_430
.saturating_add(Weight::from_parts(217_480, 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, 33).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
}
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::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: `808 + m * (64 ±0)`
// Estimated: `4272 + m * (64 ±0)`
// Minimum execution time: 31_498_000 picoseconds.
Weight::from_parts(32_782_494, 0)
.saturating_add(Weight::from_parts(0, 4272))
// Standard Error: 833
.saturating_add(Weight::from_parts(41_618, 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, 64).saturating_mul(m.into()))
}
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:0 w:1)
/// Proof: `AllianceMotion::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: `397 + m * (64 ±0) + p * (36 ±0)`
// Estimated: `3842 + m * (65 ±0) + p * (36 ±0)`
// Minimum execution time: 27_489_000 picoseconds.
Weight::from_parts(30_750_053, 0)
.saturating_add(Weight::from_parts(0, 3842))
// Standard Error: 1_459
.saturating_add(Weight::from_parts(43_268, 0).saturating_mul(m.into()))
// Standard Error: 1_423
.saturating_add(Weight::from_parts(204_203, 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, 65).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
}
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::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: `699 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)`
// Estimated: `4016 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)`
// Minimum execution time: 42_776_000 picoseconds.
Weight::from_parts(44_404_614, 0)
.saturating_add(Weight::from_parts(0, 4016))
// Standard Error: 192
.saturating_add(Weight::from_parts(2_919, 0).saturating_mul(b.into()))
// Standard Error: 2_034
.saturating_add(Weight::from_parts(20_724, 0).saturating_mul(m.into()))
// Standard Error: 1_982
.saturating_add(Weight::from_parts(218_386, 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, 1).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into()))
}
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:1 w:0)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:0 w:1)
/// Proof: `AllianceMotion::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: `495 + m * (48 ±0) + p * (36 ±0)`
// Estimated: `3935 + m * (49 ±0) + p * (36 ±0)`
// Minimum execution time: 32_738_000 picoseconds.
Weight::from_parts(32_423_025, 0)
.saturating_add(Weight::from_parts(0, 3935))
// Standard Error: 1_306
.saturating_add(Weight::from_parts(45_893, 0).saturating_mul(m.into()))
// Standard Error: 1_273
.saturating_add(Weight::from_parts(210_810, 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, 49).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into()))
}
/// Storage: `AllianceMotion::Voting` (r:1 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Members` (r:1 w:0)
/// Proof: `AllianceMotion::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Prime` (r:1 w:0)
/// Proof: `AllianceMotion::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::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: `719 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)`
// Estimated: `4036 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)`
// Minimum execution time: 44_168_000 picoseconds.
Weight::from_parts(46_428_136, 0)
.saturating_add(Weight::from_parts(0, 4036))
// Standard Error: 174
.saturating_add(Weight::from_parts(2_573, 0).saturating_mul(b.into()))
// Standard Error: 1_842
.saturating_add(Weight::from_parts(29_044, 0).saturating_mul(m.into()))
// Standard Error: 1_795
.saturating_add(Weight::from_parts(223_527, 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, 66).saturating_mul(m.into()))
.saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into()))
}
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Voting` (r:0 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::ProposalOf` (r:0 w:1)
/// Proof: `AllianceMotion::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: `226 + p * (32 ±0)`
// Estimated: `1711 + p * (32 ±0)`
// Minimum execution time: 14_524_000 picoseconds.
Weight::from_parts(16_298_044, 0)
.saturating_add(Weight::from_parts(0, 1711))
// Standard Error: 1_381
.saturating_add(Weight::from_parts(177_631, 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()))
}
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:1)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::CostOf` (r:1 w:0)
/// Proof: `AllianceMotion::CostOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Proposals` (r:1 w:1)
/// Proof: `AllianceMotion::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::Voting` (r:0 w:1)
/// Proof: `AllianceMotion::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `d` is `[0, 1]`.
/// The range of component `p` is `[1, 100]`.
fn kill(d: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1497 + p * (36 ±0)`
// Estimated: `4896 + d * (123 ±6) + p * (37 ±0)`
// Minimum execution time: 21_079_000 picoseconds.
Weight::from_parts(24_345_812, 0)
.saturating_add(Weight::from_parts(0, 4896))
// Standard Error: 150_548
.saturating_add(Weight::from_parts(1_841_577, 0).saturating_mul(d.into()))
// Standard Error: 2_331
.saturating_add(Weight::from_parts(242_465, 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, 123).saturating_mul(d.into()))
.saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into()))
}
/// Storage: `AllianceMotion::ProposalOf` (r:1 w:0)
/// Proof: `AllianceMotion::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AllianceMotion::CostOf` (r:1 w:0)
/// Proof: `AllianceMotion::CostOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn release_proposal_cost() -> Weight {
// Proof Size summary in bytes:
// Measured: `911`
// Estimated: `4376`
// Minimum execution time: 17_024_000 picoseconds.
Weight::from_parts(17_620_000, 0)
.saturating_add(Weight::from_parts(0, 4376))
.saturating_add(T::DbWeight::get().reads(2))
}
}
@@ -0,0 +1,96 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_collective_content`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_collective_content
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_collective_content`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_collective_content::WeightInfo for WeightInfo<T> {
/// Storage: `AmbassadorContent::Charter` (r:0 w:1)
/// Proof: `AmbassadorContent::Charter` (`max_values`: Some(1), `max_size`: Some(70), added: 565, mode: `MaxEncodedLen`)
fn set_charter() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 6_158_000 picoseconds.
Weight::from_parts(6_430_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorContent::CounterForAnnouncements` (r:1 w:1)
/// Proof: `AmbassadorContent::CounterForAnnouncements` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorContent::Announcements` (r:1 w:1)
/// Proof: `AmbassadorContent::Announcements` (`max_values`: None, `max_size`: Some(90), added: 2565, mode: `MaxEncodedLen`)
fn announce() -> Weight {
// Proof Size summary in bytes:
// Measured: `212`
// Estimated: `3555`
// Minimum execution time: 19_451_000 picoseconds.
Weight::from_parts(20_206_000, 0)
.saturating_add(Weight::from_parts(0, 3555))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorContent::Announcements` (r:1 w:1)
/// Proof: `AmbassadorContent::Announcements` (`max_values`: None, `max_size`: Some(90), added: 2565, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorContent::CounterForAnnouncements` (r:1 w:1)
/// Proof: `AmbassadorContent::CounterForAnnouncements` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn remove_announcement() -> Weight {
// Proof Size summary in bytes:
// Measured: `354`
// Estimated: `3555`
// Minimum execution time: 24_660_000 picoseconds.
Weight::from_parts(25_357_000, 0)
.saturating_add(Weight::from_parts(0, 3555))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
}
@@ -0,0 +1,285 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_core_fellowship`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-08-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `84c341e0cc82`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_core_fellowship
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_core_fellowship`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_core_fellowship::WeightInfo for WeightInfo<T> {
/// Storage: `AmbassadorCore::Params` (r:0 w:1)
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
fn set_params() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_554_000 picoseconds.
Weight::from_parts(7_864_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorCore::Params` (r:1 w:1)
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
fn set_partial_params() -> Weight {
// Proof Size summary in bytes:
// Measured: `471`
// Estimated: `1853`
// Minimum execution time: 13_535_000 picoseconds.
Weight::from_parts(14_145_000, 0)
.saturating_add(Weight::from_parts(0, 1853))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::Members` (r:1 w:1)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::Params` (r:1 w:0)
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:1)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IdToIndex` (r:1 w:1)
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::MemberEvidence` (r:1 w:1)
/// Proof: `AmbassadorCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IndexToId` (r:0 w:1)
/// Proof: `AmbassadorCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn bump_offboard() -> Weight {
// Proof Size summary in bytes:
// Measured: `66402`
// Estimated: `69046`
// Minimum execution time: 135_970_000 picoseconds.
Weight::from_parts(140_241_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::Members` (r:1 w:1)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::Params` (r:1 w:0)
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:1)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IdToIndex` (r:1 w:1)
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::MemberEvidence` (r:1 w:1)
/// Proof: `AmbassadorCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IndexToId` (r:0 w:1)
/// Proof: `AmbassadorCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn bump_demote() -> Weight {
// Proof Size summary in bytes:
// Measured: `66794`
// Estimated: `69046`
// Minimum execution time: 144_523_000 picoseconds.
Weight::from_parts(148_624_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
fn set_active() -> Weight {
// Proof Size summary in bytes:
// Measured: `360`
// Estimated: `3514`
// Minimum execution time: 18_809_000 picoseconds.
Weight::from_parts(19_532_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::Members` (r:1 w:1)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:1)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IndexToId` (r:0 w:1)
/// Proof: `AmbassadorCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IdToIndex` (r:0 w:1)
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn induct() -> Weight {
// Proof Size summary in bytes:
// Measured: `118`
// Estimated: `3514`
// Minimum execution time: 27_052_000 picoseconds.
Weight::from_parts(27_750_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `AmbassadorCollective::Members` (r:1 w:1)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::Params` (r:1 w:0)
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:1)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::MemberEvidence` (r:1 w:1)
/// Proof: `AmbassadorCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IndexToId` (r:0 w:1)
/// Proof: `AmbassadorCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IdToIndex` (r:0 w:1)
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn promote() -> Weight {
// Proof Size summary in bytes:
// Measured: `66034`
// Estimated: `69046`
// Minimum execution time: 130_553_000 picoseconds.
Weight::from_parts(134_895_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `AmbassadorCollective::Members` (r:1 w:1)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:9 w:9)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::MemberEvidence` (r:1 w:1)
/// Proof: `AmbassadorCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IndexToId` (r:0 w:9)
/// Proof: `AmbassadorCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IdToIndex` (r:0 w:9)
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 9]`.
/// The range of component `r` is `[1, 9]`.
fn promote_fast(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `65968`
// Estimated: `69046 + r * (2489 ±0)`
// Minimum execution time: 125_739_000 picoseconds.
Weight::from_parts(113_300_436, 0)
.saturating_add(Weight::from_parts(0, 69046))
// Standard Error: 56_138
.saturating_add(Weight::from_parts(17_588_278, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_parts(0, 2489).saturating_mul(r.into()))
}
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::MemberEvidence` (r:0 w:1)
/// Proof: `AmbassadorCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
fn offboard() -> Weight {
// Proof Size summary in bytes:
// Measured: `265`
// Estimated: `3514`
// Minimum execution time: 20_086_000 picoseconds.
Weight::from_parts(21_944_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
fn import() -> Weight {
// Proof Size summary in bytes:
// Measured: `285`
// Estimated: `3514`
// Minimum execution time: 17_667_000 picoseconds.
Weight::from_parts(18_528_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
fn import_member() -> Weight {
// Proof Size summary in bytes:
// Measured: `285`
// Estimated: `3514`
// Minimum execution time: 17_270_000 picoseconds.
Weight::from_parts(18_034_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::MemberEvidence` (r:1 w:1)
/// Proof: `AmbassadorCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
fn approve() -> Weight {
// Proof Size summary in bytes:
// Measured: `65967`
// Estimated: `69046`
// Minimum execution time: 114_446_000 picoseconds.
Weight::from_parts(116_637_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `AmbassadorCore::Member` (r:1 w:0)
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::MemberEvidence` (r:1 w:1)
/// Proof: `AmbassadorCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
fn submit_evidence() -> Weight {
// Proof Size summary in bytes:
// Measured: `151`
// Estimated: `69046`
// Minimum execution time: 93_223_000 picoseconds.
Weight::from_parts(94_688_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
}
@@ -0,0 +1,285 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_core_fellowship`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-08-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `84c341e0cc82`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_core_fellowship
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_core_fellowship`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_core_fellowship::WeightInfo for WeightInfo<T> {
/// Storage: `FellowshipCore::Params` (r:0 w:1)
/// Proof: `FellowshipCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
fn set_params() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_455_000 picoseconds.
Weight::from_parts(8_021_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipCore::Params` (r:1 w:1)
/// Proof: `FellowshipCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
fn set_partial_params() -> Weight {
// Proof Size summary in bytes:
// Measured: `399`
// Estimated: `1853`
// Minimum execution time: 12_844_000 picoseconds.
Weight::from_parts(13_388_000, 0)
.saturating_add(Weight::from_parts(0, 1853))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipCore::Member` (r:1 w:1)
/// Proof: `FellowshipCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::Members` (r:1 w:1)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::Params` (r:1 w:0)
/// Proof: `FellowshipCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:1)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IdToIndex` (r:1 w:1)
/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::MemberEvidence` (r:1 w:1)
/// Proof: `FellowshipCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IndexToId` (r:0 w:1)
/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn bump_offboard() -> Weight {
// Proof Size summary in bytes:
// Measured: `66430`
// Estimated: `69046`
// Minimum execution time: 136_300_000 picoseconds.
Weight::from_parts(139_333_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `FellowshipCore::Member` (r:1 w:1)
/// Proof: `FellowshipCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::Members` (r:1 w:1)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::Params` (r:1 w:0)
/// Proof: `FellowshipCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:1)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IdToIndex` (r:1 w:1)
/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::MemberEvidence` (r:1 w:1)
/// Proof: `FellowshipCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IndexToId` (r:0 w:1)
/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn bump_demote() -> Weight {
// Proof Size summary in bytes:
// Measured: `66822`
// Estimated: `69046`
// Minimum execution time: 146_172_000 picoseconds.
Weight::from_parts(149_061_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `FellowshipCollective::Members` (r:1 w:0)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::Member` (r:1 w:1)
/// Proof: `FellowshipCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
fn set_active() -> Weight {
// Proof Size summary in bytes:
// Measured: `388`
// Estimated: `3514`
// Minimum execution time: 18_312_000 picoseconds.
Weight::from_parts(18_790_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipCore::Member` (r:1 w:1)
/// Proof: `FellowshipCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::Members` (r:1 w:1)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:1)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IndexToId` (r:0 w:1)
/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IdToIndex` (r:0 w:1)
/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn induct() -> Weight {
// Proof Size summary in bytes:
// Measured: `146`
// Estimated: `3514`
// Minimum execution time: 26_303_000 picoseconds.
Weight::from_parts(27_122_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `FellowshipCollective::Members` (r:1 w:1)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::Member` (r:1 w:1)
/// Proof: `FellowshipCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::Params` (r:1 w:0)
/// Proof: `FellowshipCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:1)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::MemberEvidence` (r:1 w:1)
/// Proof: `FellowshipCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IndexToId` (r:0 w:1)
/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IdToIndex` (r:0 w:1)
/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn promote() -> Weight {
// Proof Size summary in bytes:
// Measured: `66062`
// Estimated: `69046`
// Minimum execution time: 131_037_000 picoseconds.
Weight::from_parts(133_767_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `FellowshipCollective::Members` (r:1 w:1)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::Member` (r:1 w:1)
/// Proof: `FellowshipCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:9 w:9)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::MemberEvidence` (r:1 w:1)
/// Proof: `FellowshipCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IndexToId` (r:0 w:9)
/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IdToIndex` (r:0 w:9)
/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 9]`.
/// The range of component `r` is `[1, 9]`.
fn promote_fast(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `65996`
// Estimated: `69046 + r * (2489 ±0)`
// Minimum execution time: 124_574_000 picoseconds.
Weight::from_parts(114_614_991, 0)
.saturating_add(Weight::from_parts(0, 69046))
// Standard Error: 64_534
.saturating_add(Weight::from_parts(17_415_815, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_parts(0, 2489).saturating_mul(r.into()))
}
/// Storage: `FellowshipCollective::Members` (r:1 w:0)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::Member` (r:1 w:1)
/// Proof: `FellowshipCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::MemberEvidence` (r:0 w:1)
/// Proof: `FellowshipCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
fn offboard() -> Weight {
// Proof Size summary in bytes:
// Measured: `293`
// Estimated: `3514`
// Minimum execution time: 19_710_000 picoseconds.
Weight::from_parts(20_542_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FellowshipCore::Member` (r:1 w:1)
/// Proof: `FellowshipCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::Members` (r:1 w:0)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
fn import() -> Weight {
// Proof Size summary in bytes:
// Measured: `313`
// Estimated: `3514`
// Minimum execution time: 16_592_000 picoseconds.
Weight::from_parts(17_755_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipCore::Member` (r:1 w:1)
/// Proof: `FellowshipCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::Members` (r:1 w:0)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
fn import_member() -> Weight {
// Proof Size summary in bytes:
// Measured: `313`
// Estimated: `3514`
// Minimum execution time: 16_967_000 picoseconds.
Weight::from_parts(17_431_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipCollective::Members` (r:1 w:0)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::Member` (r:1 w:1)
/// Proof: `FellowshipCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::MemberEvidence` (r:1 w:1)
/// Proof: `FellowshipCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
fn approve() -> Weight {
// Proof Size summary in bytes:
// Measured: `65995`
// Estimated: `69046`
// Minimum execution time: 113_258_000 picoseconds.
Weight::from_parts(115_605_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FellowshipCore::Member` (r:1 w:0)
/// Proof: `FellowshipCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::MemberEvidence` (r:1 w:1)
/// Proof: `FellowshipCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
fn submit_evidence() -> Weight {
// Proof Size summary in bytes:
// Measured: `79`
// Estimated: `69046`
// Minimum execution time: 93_773_000 picoseconds.
Weight::from_parts(95_088_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
}
@@ -0,0 +1,200 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_message_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_message_queue
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_message_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_message_queue::WeightInfo for WeightInfo<T> {
/// Storage: `MessageQueue::ServiceHead` (r:1 w:0)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn ready_ring_knit() -> Weight {
// Proof Size summary in bytes:
// Measured: `223`
// Estimated: `6044`
// Minimum execution time: 13_391_000 picoseconds.
Weight::from_parts(14_057_000, 0)
.saturating_add(Weight::from_parts(0, 6044))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
fn ready_ring_unknit() -> Weight {
// Proof Size summary in bytes:
// Measured: `218`
// Estimated: `6044`
// Minimum execution time: 12_223_000 picoseconds.
Weight::from_parts(12_820_000, 0)
.saturating_add(Weight::from_parts(0, 6044))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn service_queue_base() -> Weight {
// Proof Size summary in bytes:
// Measured: `6`
// Estimated: `3517`
// Minimum execution time: 4_189_000 picoseconds.
Weight::from_parts(4_423_000, 0)
.saturating_add(Weight::from_parts(0, 3517))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn service_page_base_completion() -> Weight {
// Proof Size summary in bytes:
// Measured: `72`
// Estimated: `108986`
// Minimum execution time: 6_432_000 picoseconds.
Weight::from_parts(6_723_000, 0)
.saturating_add(Weight::from_parts(0, 108986))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn service_page_base_no_completion() -> Weight {
// Proof Size summary in bytes:
// Measured: `72`
// Estimated: `108986`
// Minimum execution time: 6_642_000 picoseconds.
Weight::from_parts(6_878_000, 0)
.saturating_add(Weight::from_parts(0, 108986))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::BookStateFor` (r:0 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn service_page_item() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 306_545_000 picoseconds.
Weight::from_parts(308_777_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn bump_service_head() -> Weight {
// Proof Size summary in bytes:
// Measured: `171`
// Estimated: `3517`
// Minimum execution time: 7_861_000 picoseconds.
Weight::from_parts(8_586_000, 0)
.saturating_add(Weight::from_parts(0, 3517))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:0 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
fn set_service_head() -> Weight {
// Proof Size summary in bytes:
// Measured: `161`
// Estimated: `3517`
// Minimum execution time: 6_347_000 picoseconds.
Weight::from_parts(6_660_000, 0)
.saturating_add(Weight::from_parts(0, 3517))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn reap_page() -> Weight {
// Proof Size summary in bytes:
// Measured: `105609`
// Estimated: `108986`
// Minimum execution time: 126_011_000 picoseconds.
Weight::from_parts(128_941_000, 0)
.saturating_add(Weight::from_parts(0, 108986))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn execute_overweight_page_removed() -> Weight {
// Proof Size summary in bytes:
// Measured: `105609`
// Estimated: `108986`
// Minimum execution time: 152_270_000 picoseconds.
Weight::from_parts(155_202_000, 0)
.saturating_add(Weight::from_parts(0, 108986))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn execute_overweight_page_updated() -> Weight {
// Proof Size summary in bytes:
// Measured: `105609`
// Estimated: `108986`
// Minimum execution time: 220_531_000 picoseconds.
Weight::from_parts(222_698_000, 0)
.saturating_add(Weight::from_parts(0, 108986))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
}
@@ -0,0 +1,180 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_multisig`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `c8c7296f7413`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_multisig
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_multisig`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `z` is `[0, 10000]`.
fn as_multi_threshold_1(z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 15_445_000 picoseconds.
Weight::from_parts(16_746_680, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 9
.saturating_add(Weight::from_parts(438, 0).saturating_mul(z.into()))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `328 + s * (2 ±0)`
// Estimated: `6811`
// Minimum execution time: 48_846_000 picoseconds.
Weight::from_parts(34_395_780, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 4_494
.saturating_add(Weight::from_parts(222_389, 0).saturating_mul(s.into()))
// Standard Error: 44
.saturating_add(Weight::from_parts(1_895, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `348`
// Estimated: `6811`
// Minimum execution time: 30_576_000 picoseconds.
Weight::from_parts(18_763_978, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 1_097
.saturating_add(Weight::from_parts(140_137, 0).saturating_mul(s.into()))
// Standard Error: 10
.saturating_add(Weight::from_parts(1_915, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `451 + s * (33 ±0)`
// Estimated: `6811`
// Minimum execution time: 53_269_000 picoseconds.
Weight::from_parts(36_529_777, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 2_752
.saturating_add(Weight::from_parts(190_931, 0).saturating_mul(s.into()))
// Standard Error: 26
.saturating_add(Weight::from_parts(2_136, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_create(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `329 + s * (2 ±0)`
// Estimated: `6811`
// Minimum execution time: 30_485_000 picoseconds.
Weight::from_parts(32_275_917, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 1_395
.saturating_add(Weight::from_parts(163_554, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_approve(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `348`
// Estimated: `6811`
// Minimum execution time: 17_030_000 picoseconds.
Weight::from_parts(18_316_018, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 1_407
.saturating_add(Weight::from_parts(138_516, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn cancel_as_multi(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `520 + s * (1 ±0)`
// Estimated: `6811`
// Minimum execution time: 31_503_000 picoseconds.
Weight::from_parts(33_555_853, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 1_535
.saturating_add(Weight::from_parts(143_177, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn poke_deposit(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `520 + s * (1 ±0)`
// Estimated: `6811`
// Minimum execution time: 29_729_000 picoseconds.
Weight::from_parts(31_737_165, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 1_058
.saturating_add(Weight::from_parts(140_714, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
@@ -0,0 +1,268 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_preimage`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_preimage
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_preimage`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_preimage::WeightInfo for WeightInfo<T> {
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 4194304]`.
fn note_preimage(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `4`
// Estimated: `3586`
// Minimum execution time: 49_388_000 picoseconds.
Weight::from_parts(50_164_000, 0)
.saturating_add(Weight::from_parts(0, 3586))
// Standard Error: 173
.saturating_add(Weight::from_parts(16_897, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 4194304]`.
fn note_requested_preimage(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `68`
// Estimated: `3556`
// Minimum execution time: 16_616_000 picoseconds.
Weight::from_parts(16_886_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
// Standard Error: 172
.saturating_add(Weight::from_parts(16_881, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 4194304]`.
fn note_no_deposit_preimage(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `68`
// Estimated: `3556`
// Minimum execution time: 15_632_000 picoseconds.
Weight::from_parts(15_946_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
// Standard Error: 172
.saturating_add(Weight::from_parts(16_902, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
fn unnote_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `205`
// Estimated: `3586`
// Minimum execution time: 51_926_000 picoseconds.
Weight::from_parts(54_251_000, 0)
.saturating_add(Weight::from_parts(0, 3586))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
fn unnote_no_deposit_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `3556`
// Minimum execution time: 23_075_000 picoseconds.
Weight::from_parts(24_053_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
fn request_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `150`
// Estimated: `3556`
// Minimum execution time: 19_418_000 picoseconds.
Weight::from_parts(20_348_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
fn request_no_deposit_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `3556`
// Minimum execution time: 14_183_000 picoseconds.
Weight::from_parts(14_713_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
fn request_unnoted_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `4`
// Estimated: `3556`
// Minimum execution time: 15_521_000 picoseconds.
Weight::from_parts(15_847_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
fn request_requested_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `68`
// Estimated: `3556`
// Minimum execution time: 10_520_000 picoseconds.
Weight::from_parts(10_868_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::PreimageFor` (r:0 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
fn unrequest_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `3556`
// Minimum execution time: 20_938_000 picoseconds.
Weight::from_parts(22_474_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
fn unrequest_unnoted_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `68`
// Estimated: `3556`
// Minimum execution time: 10_448_000 picoseconds.
Weight::from_parts(11_190_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
fn unrequest_multi_referenced_preimage() -> Weight {
// Proof Size summary in bytes:
// Measured: `68`
// Estimated: `3556`
// Minimum execution time: 10_367_000 picoseconds.
Weight::from_parts(10_853_000, 0)
.saturating_add(Weight::from_parts(0, 3556))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Preimage::StatusFor` (r:1023 w:1023)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1023 w:1023)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Balances::Holds` (r:1023 w:1023)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:0 w:1023)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 1024]`.
fn ensure_updated(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + n * (227 ±0)`
// Estimated: `990 + n * (2603 ±0)`
// Minimum execution time: 54_455_000 picoseconds.
Weight::from_parts(55_985_000, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 34_540
.saturating_add(Weight::from_parts(55_843_928, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into()))
}
}
@@ -0,0 +1,242 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_proxy`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-03-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `99fc4dfa9c86`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_proxy
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_proxy`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_proxy::WeightInfo for WeightInfo<T> {
/// Storage: `Proxy::Proxies` (r:1 w:0)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn proxy(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `161 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 14_410_000 picoseconds.
Weight::from_parts(15_193_802, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 997
.saturating_add(Weight::from_parts(30_486, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:0)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn proxy_announced(a: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `488 + a * (68 ±0) + p * (37 ±0)`
// Estimated: `5698`
// Minimum execution time: 42_192_000 picoseconds.
Weight::from_parts(42_093_319, 0)
.saturating_add(Weight::from_parts(0, 5698))
// Standard Error: 2_704
.saturating_add(Weight::from_parts(158_968, 0).saturating_mul(a.into()))
// Standard Error: 2_794
.saturating_add(Weight::from_parts(61_101, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn remove_announcement(a: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `403 + a * (68 ±0)`
// Estimated: `5698`
// Minimum execution time: 30_338_000 picoseconds.
Weight::from_parts(28_843_418, 0)
.saturating_add(Weight::from_parts(0, 5698))
// Standard Error: 6_326
.saturating_add(Weight::from_parts(124_307, 0).saturating_mul(a.into()))
// Standard Error: 6_536
.saturating_add(Weight::from_parts(97_949, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn reject_announcement(a: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `403 + a * (68 ±0)`
// Estimated: `5698`
// Minimum execution time: 29_682_000 picoseconds.
Weight::from_parts(28_524_214, 0)
.saturating_add(Weight::from_parts(0, 5698))
// Standard Error: 6_288
.saturating_add(Weight::from_parts(127_666, 0).saturating_mul(a.into()))
// Standard Error: 6_497
.saturating_add(Weight::from_parts(103_590, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Proxy::Proxies` (r:1 w:0)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn announce(a: u32, p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `420 + a * (68 ±0) + p * (37 ±0)`
// Estimated: `5698`
// Minimum execution time: 37_999_000 picoseconds.
Weight::from_parts(37_895_047, 0)
.saturating_add(Weight::from_parts(0, 5698))
// Standard Error: 2_480
.saturating_add(Weight::from_parts(165_564, 0).saturating_mul(a.into()))
// Standard Error: 2_562
.saturating_add(Weight::from_parts(66_557, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn add_proxy(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `161 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 25_113_000 picoseconds.
Weight::from_parts(26_024_377, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 1_385
.saturating_add(Weight::from_parts(45_544, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn remove_proxy(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `161 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 25_130_000 picoseconds.
Weight::from_parts(26_149_710, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 1_578
.saturating_add(Weight::from_parts(35_938, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn remove_proxies(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `161 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 22_244_000 picoseconds.
Weight::from_parts(23_072_656, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 1_299
.saturating_add(Weight::from_parts(34_781, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
fn create_pure(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `173`
// Estimated: `4706`
// Minimum execution time: 26_399_000 picoseconds.
Weight::from_parts(27_535_679, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 1_302
.saturating_add(Weight::from_parts(10_041, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[0, 30]`.
fn kill_pure(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `198 + p * (37 ±0)`
// Estimated: `4706`
// Minimum execution time: 23_128_000 picoseconds.
Weight::from_parts(24_202_796, 0)
.saturating_add(Weight::from_parts(0, 4706))
// Standard Error: 1_739
.saturating_add(Weight::from_parts(27_659, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Proxy::Proxies` (r:1 w:1)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Proxy::Announcements` (r:1 w:1)
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
fn poke_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `487`
// Estimated: `5698`
// Minimum execution time: 49_692_000 picoseconds.
Weight::from_parts(51_121_000, 0)
.saturating_add(Weight::from_parts(0, 5698))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
}
@@ -0,0 +1,206 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_ranked_collective`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_ranked_collective
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_ranked_collective`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_ranked_collective::WeightInfo for WeightInfo<T> {
/// Storage: `AmbassadorCollective::Members` (r:1 w:1)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:1)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IndexToId` (r:0 w:1)
/// Proof: `AmbassadorCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IdToIndex` (r:0 w:1)
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn add_member() -> Weight {
// Proof Size summary in bytes:
// Measured: `42`
// Estimated: `3507`
// Minimum execution time: 16_784_000 picoseconds.
Weight::from_parts(17_177_000, 0)
.saturating_add(Weight::from_parts(0, 3507))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `AmbassadorCollective::Members` (r:1 w:1)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:11 w:11)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IdToIndex` (r:11 w:22)
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IndexToId` (r:11 w:22)
/// Proof: `AmbassadorCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// The range of component `r` is `[0, 10]`.
/// The range of component `r` is `[0, 10]`.
fn remove_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `414 + r * (213 ±0)`
// Estimated: `3519 + r * (2529 ±0)`
// Minimum execution time: 36_242_000 picoseconds.
Weight::from_parts(39_089_749, 0)
.saturating_add(Weight::from_parts(0, 3519))
// Standard Error: 31_470
.saturating_add(Weight::from_parts(17_700_585, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(6))
.saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_parts(0, 2529).saturating_mul(r.into()))
}
/// Storage: `AmbassadorCollective::Members` (r:1 w:1)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:1)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IndexToId` (r:0 w:1)
/// Proof: `AmbassadorCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IdToIndex` (r:0 w:1)
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// The range of component `r` is `[0, 10]`.
/// The range of component `r` is `[0, 10]`.
fn promote_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `214 + r * (17 ±0)`
// Estimated: `3507`
// Minimum execution time: 20_363_000 picoseconds.
Weight::from_parts(21_753_026, 0)
.saturating_add(Weight::from_parts(0, 3507))
// Standard Error: 6_072
.saturating_add(Weight::from_parts(380_671, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `AmbassadorCollective::Members` (r:1 w:1)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:1)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IdToIndex` (r:1 w:2)
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IndexToId` (r:1 w:2)
/// Proof: `AmbassadorCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// The range of component `r` is `[0, 10]`.
/// The range of component `r` is `[0, 10]`.
fn demote_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `430 + r * (72 ±0)`
// Estimated: `3519`
// Minimum execution time: 36_630_000 picoseconds.
Weight::from_parts(40_091_658, 0)
.saturating_add(Weight::from_parts(0, 3519))
// Standard Error: 23_729
.saturating_add(Weight::from_parts(816_694, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::Voting` (r:1 w:1)
/// Proof: `AmbassadorCollective::Voting` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn vote() -> Weight {
// Proof Size summary in bytes:
// Measured: `529`
// Estimated: `317568`
// Minimum execution time: 50_172_000 picoseconds.
Weight::from_parts(53_697_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::VotingCleanup` (r:1 w:0)
/// Proof: `AmbassadorCollective::VotingCleanup` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::Voting` (r:100 w:100)
/// Proof: `AmbassadorCollective::Voting` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 100]`.
/// The range of component `n` is `[0, 100]`.
fn cleanup_poll(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `400 + n * (50 ±0)`
// Estimated: `4365 + n * (2540 ±0)`
// Minimum execution time: 15_768_000 picoseconds.
Weight::from_parts(21_127_585, 0)
.saturating_add(Weight::from_parts(0, 4365))
// Standard Error: 4_931
.saturating_add(Weight::from_parts(1_356_379, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2540).saturating_mul(n.into()))
}
/// Storage: `AmbassadorCollective::Members` (r:2 w:2)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:2 w:2)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IdToIndex` (r:2 w:4)
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::Member` (r:2 w:2)
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCore::MemberEvidence` (r:1 w:0)
/// Proof: `AmbassadorCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorSalary::Claimant` (r:2 w:2)
/// Proof: `AmbassadorSalary::Claimant` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IndexToId` (r:0 w:2)
/// Proof: `AmbassadorCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn exchange_member() -> Weight {
// Proof Size summary in bytes:
// Measured: `597`
// Estimated: `69046`
// Minimum execution time: 84_850_000 picoseconds.
Weight::from_parts(87_564_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(11))
.saturating_add(T::DbWeight::get().writes(14))
}
}
@@ -0,0 +1,206 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_ranked_collective`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_ranked_collective
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_ranked_collective`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_ranked_collective::WeightInfo for WeightInfo<T> {
/// Storage: `FellowshipCollective::Members` (r:1 w:1)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:1)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IndexToId` (r:0 w:1)
/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IdToIndex` (r:0 w:1)
/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn add_member() -> Weight {
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `3507`
// Minimum execution time: 17_035_000 picoseconds.
Weight::from_parts(17_772_000, 0)
.saturating_add(Weight::from_parts(0, 3507))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `FellowshipCollective::Members` (r:1 w:1)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:11 w:11)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IdToIndex` (r:11 w:22)
/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IndexToId` (r:11 w:22)
/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// The range of component `r` is `[0, 10]`.
/// The range of component `r` is `[0, 10]`.
fn remove_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `514 + r * (213 ±0)`
// Estimated: `3519 + r * (2529 ±0)`
// Minimum execution time: 36_318_000 picoseconds.
Weight::from_parts(39_397_066, 0)
.saturating_add(Weight::from_parts(0, 3519))
// Standard Error: 30_185
.saturating_add(Weight::from_parts(17_919_026, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(6))
.saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_parts(0, 2529).saturating_mul(r.into()))
}
/// Storage: `FellowshipCollective::Members` (r:1 w:1)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:1)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IndexToId` (r:0 w:1)
/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IdToIndex` (r:0 w:1)
/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// The range of component `r` is `[0, 10]`.
/// The range of component `r` is `[0, 10]`.
fn promote_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `314 + r * (17 ±0)`
// Estimated: `3507`
// Minimum execution time: 20_667_000 picoseconds.
Weight::from_parts(21_656_410, 0)
.saturating_add(Weight::from_parts(0, 3507))
// Standard Error: 8_086
.saturating_add(Weight::from_parts(433_934, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `FellowshipCollective::Members` (r:1 w:1)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:1)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IdToIndex` (r:1 w:2)
/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IndexToId` (r:1 w:2)
/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// The range of component `r` is `[0, 10]`.
/// The range of component `r` is `[0, 10]`.
fn demote_member(r: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `530 + r * (72 ±0)`
// Estimated: `3519`
// Minimum execution time: 36_485_000 picoseconds.
Weight::from_parts(40_326_029, 0)
.saturating_add(Weight::from_parts(0, 3519))
// Standard Error: 27_200
.saturating_add(Weight::from_parts(906_945, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `FellowshipCollective::Members` (r:1 w:0)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::Voting` (r:1 w:1)
/// Proof: `FellowshipCollective::Voting` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn vote() -> Weight {
// Proof Size summary in bytes:
// Measured: `590`
// Estimated: `317568`
// Minimum execution time: 49_849_000 picoseconds.
Weight::from_parts(51_587_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::VotingCleanup` (r:1 w:0)
/// Proof: `FellowshipCollective::VotingCleanup` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::Voting` (r:100 w:100)
/// Proof: `FellowshipCollective::Voting` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 100]`.
/// The range of component `n` is `[0, 100]`.
fn cleanup_poll(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `461 + n * (50 ±0)`
// Estimated: `4365 + n * (2540 ±0)`
// Minimum execution time: 15_287_000 picoseconds.
Weight::from_parts(19_668_916, 0)
.saturating_add(Weight::from_parts(0, 4365))
// Standard Error: 4_879
.saturating_add(Weight::from_parts(1_371_347, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_parts(0, 2540).saturating_mul(n.into()))
}
/// Storage: `FellowshipCollective::Members` (r:2 w:2)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:2 w:2)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IdToIndex` (r:2 w:4)
/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::Member` (r:2 w:2)
/// Proof: `FellowshipCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCore::MemberEvidence` (r:1 w:0)
/// Proof: `FellowshipCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
/// Storage: `FellowshipSalary::Claimant` (r:2 w:2)
/// Proof: `FellowshipSalary::Claimant` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::IndexToId` (r:0 w:2)
/// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn exchange_member() -> Weight {
// Proof Size summary in bytes:
// Measured: `625`
// Estimated: `69046`
// Minimum execution time: 84_574_000 picoseconds.
Weight::from_parts(86_910_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(11))
.saturating_add(T::DbWeight::get().writes(14))
}
}
@@ -0,0 +1,541 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_referenda`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_referenda
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_referenda`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_referenda::WeightInfo for WeightInfo<T> {
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::ReferendumCount` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:0 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
fn submit() -> Weight {
// Proof Size summary in bytes:
// Measured: `254`
// Estimated: `159279`
// Minimum execution time: 26_280_000 picoseconds.
Weight::from_parts(27_583_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_preparing() -> Weight {
// Proof Size summary in bytes:
// Measured: `365`
// Estimated: `317568`
// Minimum execution time: 51_856_000 picoseconds.
Weight::from_parts(53_756_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::DecidingCount` (r:1 w:0)
/// Proof: `AmbassadorReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::TrackQueue` (r:1 w:1)
/// Proof: `AmbassadorReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `1164`
// Estimated: `159279`
// Minimum execution time: 110_259_000 picoseconds.
Weight::from_parts(129_048_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::DecidingCount` (r:1 w:0)
/// Proof: `AmbassadorReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::TrackQueue` (r:1 w:1)
/// Proof: `AmbassadorReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_not_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `1172`
// Estimated: `159279`
// Minimum execution time: 113_384_000 picoseconds.
Weight::from_parts(125_747_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::DecidingCount` (r:1 w:1)
/// Proof: `AmbassadorReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:0)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_passing() -> Weight {
// Proof Size summary in bytes:
// Measured: `701`
// Estimated: `317568`
// Minimum execution time: 154_089_000 picoseconds.
Weight::from_parts(237_608_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::DecidingCount` (r:1 w:1)
/// Proof: `AmbassadorReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:0)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_failing() -> Weight {
// Proof Size summary in bytes:
// Measured: `600`
// Estimated: `317568`
// Minimum execution time: 69_683_000 picoseconds.
Weight::from_parts(71_743_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
fn refund_decision_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `317`
// Estimated: `4365`
// Minimum execution time: 29_900_000 picoseconds.
Weight::from_parts(30_905_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
fn refund_submission_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `167`
// Estimated: `4365`
// Minimum execution time: 14_298_000 picoseconds.
Weight::from_parts(14_987_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn cancel() -> Weight {
// Proof Size summary in bytes:
// Measured: `310`
// Estimated: `317568`
// Minimum execution time: 35_731_000 picoseconds.
Weight::from_parts(36_747_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::MetadataOf` (r:1 w:0)
/// Proof: `AmbassadorReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn kill() -> Weight {
// Proof Size summary in bytes:
// Measured: `411`
// Estimated: `317568`
// Minimum execution time: 62_566_000 picoseconds.
Weight::from_parts(64_081_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `AmbassadorReferenda::TrackQueue` (r:1 w:0)
/// Proof: `AmbassadorReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::DecidingCount` (r:1 w:1)
/// Proof: `AmbassadorReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
fn one_fewer_deciding_queue_empty() -> Weight {
// Proof Size summary in bytes:
// Measured: `140`
// Estimated: `3636`
// Minimum execution time: 11_698_000 picoseconds.
Weight::from_parts(12_362_000, 0)
.saturating_add(Weight::from_parts(0, 3636))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorReferenda::TrackQueue` (r:1 w:1)
/// Proof: `AmbassadorReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:0)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn one_fewer_deciding_failing() -> Weight {
// Proof Size summary in bytes:
// Measured: `1411`
// Estimated: `159279`
// Minimum execution time: 101_346_000 picoseconds.
Weight::from_parts(146_910_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `AmbassadorReferenda::TrackQueue` (r:1 w:1)
/// Proof: `AmbassadorReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:0)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn one_fewer_deciding_passing() -> Weight {
// Proof Size summary in bytes:
// Measured: `1525`
// Estimated: `159279`
// Minimum execution time: 102_013_000 picoseconds.
Weight::from_parts(110_210_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::TrackQueue` (r:1 w:1)
/// Proof: `AmbassadorReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`)
fn nudge_referendum_requeued_insertion() -> Weight {
// Proof Size summary in bytes:
// Measured: `935`
// Estimated: `4365`
// Minimum execution time: 43_920_000 picoseconds.
Weight::from_parts(52_557_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::TrackQueue` (r:1 w:1)
/// Proof: `AmbassadorReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`)
fn nudge_referendum_requeued_slide() -> Weight {
// Proof Size summary in bytes:
// Measured: `935`
// Estimated: `4365`
// Minimum execution time: 43_333_000 picoseconds.
Weight::from_parts(51_712_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::DecidingCount` (r:1 w:0)
/// Proof: `AmbassadorReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::TrackQueue` (r:1 w:1)
/// Proof: `AmbassadorReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`)
fn nudge_referendum_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `951`
// Estimated: `4365`
// Minimum execution time: 51_743_000 picoseconds.
Weight::from_parts(61_818_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::DecidingCount` (r:1 w:0)
/// Proof: `AmbassadorReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::TrackQueue` (r:1 w:1)
/// Proof: `AmbassadorReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(171), added: 2646, mode: `MaxEncodedLen`)
fn nudge_referendum_not_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `959`
// Estimated: `4365`
// Minimum execution time: 51_969_000 picoseconds.
Weight::from_parts(56_872_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_no_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `262`
// Estimated: `159279`
// Minimum execution time: 23_590_000 picoseconds.
Weight::from_parts(24_523_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_preparing() -> Weight {
// Proof Size summary in bytes:
// Measured: `310`
// Estimated: `159279`
// Minimum execution time: 24_155_000 picoseconds.
Weight::from_parts(25_093_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
fn nudge_referendum_timed_out() -> Weight {
// Proof Size summary in bytes:
// Measured: `208`
// Estimated: `4365`
// Minimum execution time: 15_623_000 picoseconds.
Weight::from_parts(16_278_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::DecidingCount` (r:1 w:1)
/// Proof: `AmbassadorReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:0)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_begin_deciding_failing() -> Weight {
// Proof Size summary in bytes:
// Measured: `545`
// Estimated: `159279`
// Minimum execution time: 40_380_000 picoseconds.
Weight::from_parts(41_343_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::DecidingCount` (r:1 w:1)
/// Proof: `AmbassadorReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:0)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_begin_deciding_passing() -> Weight {
// Proof Size summary in bytes:
// Measured: `646`
// Estimated: `159279`
// Minimum execution time: 80_025_000 picoseconds.
Weight::from_parts(88_956_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:0)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_begin_confirming() -> Weight {
// Proof Size summary in bytes:
// Measured: `699`
// Estimated: `159279`
// Minimum execution time: 106_597_000 picoseconds.
Weight::from_parts(133_288_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:0)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_end_confirming() -> Weight {
// Proof Size summary in bytes:
// Measured: `682`
// Estimated: `159279`
// Minimum execution time: 126_869_000 picoseconds.
Weight::from_parts(143_083_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:0)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_continue_not_confirming() -> Weight {
// Proof Size summary in bytes:
// Measured: `699`
// Estimated: `159279`
// Minimum execution time: 114_095_000 picoseconds.
Weight::from_parts(147_290_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:0)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_continue_confirming() -> Weight {
// Proof Size summary in bytes:
// Measured: `703`
// Estimated: `159279`
// Minimum execution time: 70_631_000 picoseconds.
Weight::from_parts(81_326_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:0)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Lookup` (r:1 w:1)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn nudge_referendum_approved() -> Weight {
// Proof Size summary in bytes:
// Measured: `703`
// Estimated: `317568`
// Minimum execution time: 121_161_000 picoseconds.
Weight::from_parts(157_050_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:0)
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_rejected() -> Weight {
// Proof Size summary in bytes:
// Measured: `699`
// Estimated: `159279`
// Minimum execution time: 107_304_000 picoseconds.
Weight::from_parts(155_388_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:0)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::MetadataOf` (r:0 w:1)
/// Proof: `AmbassadorReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn set_some_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `314`
// Estimated: `4365`
// Minimum execution time: 22_134_000 picoseconds.
Weight::from_parts(23_291_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `AmbassadorReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorReferenda::MetadataOf` (r:1 w:1)
/// Proof: `AmbassadorReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn clear_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `285`
// Estimated: `4365`
// Minimum execution time: 18_374_000 picoseconds.
Weight::from_parts(19_127_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
}
@@ -0,0 +1,541 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_referenda`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_referenda
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_referenda`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_referenda::WeightInfo for WeightInfo<T> {
/// Storage: `FellowshipCollective::Members` (r:1 w:0)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::ReferendumCount` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:0 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
fn submit() -> Weight {
// Proof Size summary in bytes:
// Measured: `315`
// Estimated: `159279`
// Minimum execution time: 25_608_000 picoseconds.
Weight::from_parts(26_613_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_preparing() -> Weight {
// Proof Size summary in bytes:
// Measured: `326`
// Estimated: `317568`
// Minimum execution time: 50_710_000 picoseconds.
Weight::from_parts(52_652_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::DecidingCount` (r:1 w:0)
/// Proof: `FellowshipReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::TrackQueue` (r:1 w:1)
/// Proof: `FellowshipReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `1964`
// Estimated: `159279`
// Minimum execution time: 94_123_000 picoseconds.
Weight::from_parts(100_860_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::DecidingCount` (r:1 w:0)
/// Proof: `FellowshipReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::TrackQueue` (r:1 w:1)
/// Proof: `FellowshipReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_not_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `2005`
// Estimated: `159279`
// Minimum execution time: 92_227_000 picoseconds.
Weight::from_parts(102_540_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::DecidingCount` (r:1 w:1)
/// Proof: `FellowshipReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:0)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_passing() -> Weight {
// Proof Size summary in bytes:
// Measured: `762`
// Estimated: `317568`
// Minimum execution time: 136_440_000 picoseconds.
Weight::from_parts(158_720_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::DecidingCount` (r:1 w:1)
/// Proof: `FellowshipReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:0)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn place_decision_deposit_failing() -> Weight {
// Proof Size summary in bytes:
// Measured: `661`
// Estimated: `317568`
// Minimum execution time: 68_946_000 picoseconds.
Weight::from_parts(70_116_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
fn refund_decision_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `278`
// Estimated: `4365`
// Minimum execution time: 29_287_000 picoseconds.
Weight::from_parts(30_333_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
fn refund_submission_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `128`
// Estimated: `4365`
// Minimum execution time: 13_802_000 picoseconds.
Weight::from_parts(14_486_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn cancel() -> Weight {
// Proof Size summary in bytes:
// Measured: `271`
// Estimated: `317568`
// Minimum execution time: 35_056_000 picoseconds.
Weight::from_parts(35_556_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::MetadataOf` (r:1 w:0)
/// Proof: `FellowshipReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn kill() -> Weight {
// Proof Size summary in bytes:
// Measured: `372`
// Estimated: `317568`
// Minimum execution time: 61_033_000 picoseconds.
Weight::from_parts(63_401_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `FellowshipReferenda::TrackQueue` (r:1 w:0)
/// Proof: `FellowshipReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::DecidingCount` (r:1 w:1)
/// Proof: `FellowshipReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
fn one_fewer_deciding_queue_empty() -> Weight {
// Proof Size summary in bytes:
// Measured: `101`
// Estimated: `4277`
// Minimum execution time: 11_165_000 picoseconds.
Weight::from_parts(11_768_000, 0)
.saturating_add(Weight::from_parts(0, 4277))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipReferenda::TrackQueue` (r:1 w:1)
/// Proof: `FellowshipReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:0)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn one_fewer_deciding_failing() -> Weight {
// Proof Size summary in bytes:
// Measured: `2350`
// Estimated: `159279`
// Minimum execution time: 80_672_000 picoseconds.
Weight::from_parts(83_925_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `FellowshipReferenda::TrackQueue` (r:1 w:1)
/// Proof: `FellowshipReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:0)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn one_fewer_deciding_passing() -> Weight {
// Proof Size summary in bytes:
// Measured: `2350`
// Estimated: `159279`
// Minimum execution time: 81_147_000 picoseconds.
Weight::from_parts(84_636_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::TrackQueue` (r:1 w:1)
/// Proof: `FellowshipReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
fn nudge_referendum_requeued_insertion() -> Weight {
// Proof Size summary in bytes:
// Measured: `1768`
// Estimated: `4365`
// Minimum execution time: 45_304_000 picoseconds.
Weight::from_parts(53_869_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::TrackQueue` (r:1 w:1)
/// Proof: `FellowshipReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
fn nudge_referendum_requeued_slide() -> Weight {
// Proof Size summary in bytes:
// Measured: `1735`
// Estimated: `4365`
// Minimum execution time: 43_802_000 picoseconds.
Weight::from_parts(51_495_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::DecidingCount` (r:1 w:0)
/// Proof: `FellowshipReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::TrackQueue` (r:1 w:1)
/// Proof: `FellowshipReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
fn nudge_referendum_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `1751`
// Estimated: `4365`
// Minimum execution time: 51_133_000 picoseconds.
Weight::from_parts(58_941_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::DecidingCount` (r:1 w:0)
/// Proof: `FellowshipReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::TrackQueue` (r:1 w:1)
/// Proof: `FellowshipReferenda::TrackQueue` (`max_values`: None, `max_size`: Some(812), added: 3287, mode: `MaxEncodedLen`)
fn nudge_referendum_not_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `1792`
// Estimated: `4365`
// Minimum execution time: 52_734_000 picoseconds.
Weight::from_parts(58_840_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_no_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `223`
// Estimated: `159279`
// Minimum execution time: 23_415_000 picoseconds.
Weight::from_parts(24_322_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_preparing() -> Weight {
// Proof Size summary in bytes:
// Measured: `271`
// Estimated: `159279`
// Minimum execution time: 23_298_000 picoseconds.
Weight::from_parts(24_469_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
fn nudge_referendum_timed_out() -> Weight {
// Proof Size summary in bytes:
// Measured: `169`
// Estimated: `4365`
// Minimum execution time: 15_335_000 picoseconds.
Weight::from_parts(15_843_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::DecidingCount` (r:1 w:1)
/// Proof: `FellowshipReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:0)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_begin_deciding_failing() -> Weight {
// Proof Size summary in bytes:
// Measured: `606`
// Estimated: `159279`
// Minimum execution time: 37_153_000 picoseconds.
Weight::from_parts(38_139_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::DecidingCount` (r:1 w:1)
/// Proof: `FellowshipReferenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:0)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_begin_deciding_passing() -> Weight {
// Proof Size summary in bytes:
// Measured: `707`
// Estimated: `159279`
// Minimum execution time: 73_395_000 picoseconds.
Weight::from_parts(78_026_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:0)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_begin_confirming() -> Weight {
// Proof Size summary in bytes:
// Measured: `758`
// Estimated: `159279`
// Minimum execution time: 107_223_000 picoseconds.
Weight::from_parts(127_463_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:0)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_end_confirming() -> Weight {
// Proof Size summary in bytes:
// Measured: `743`
// Estimated: `159279`
// Minimum execution time: 111_791_000 picoseconds.
Weight::from_parts(142_696_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:0)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_continue_not_confirming() -> Weight {
// Proof Size summary in bytes:
// Measured: `758`
// Estimated: `159279`
// Minimum execution time: 105_650_000 picoseconds.
Weight::from_parts(131_614_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:0)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_continue_confirming() -> Weight {
// Proof Size summary in bytes:
// Measured: `764`
// Estimated: `159279`
// Minimum execution time: 80_058_000 picoseconds.
Weight::from_parts(92_293_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:0)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Lookup` (r:1 w:1)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn nudge_referendum_approved() -> Weight {
// Proof Size summary in bytes:
// Measured: `764`
// Estimated: `317568`
// Minimum execution time: 139_560_000 picoseconds.
Weight::from_parts(189_387_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::MemberCount` (r:1 w:0)
/// Proof: `FellowshipCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn nudge_referendum_rejected() -> Weight {
// Proof Size summary in bytes:
// Measured: `760`
// Estimated: `159279`
// Minimum execution time: 127_944_000 picoseconds.
Weight::from_parts(187_713_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:0)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::MetadataOf` (r:0 w:1)
/// Proof: `FellowshipReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn set_some_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `275`
// Estimated: `4365`
// Minimum execution time: 21_822_000 picoseconds.
Weight::from_parts(22_462_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipReferenda::ReferendumInfoFor` (r:1 w:0)
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
/// Storage: `FellowshipReferenda::MetadataOf` (r:1 w:1)
/// Proof: `FellowshipReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn clear_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `246`
// Estimated: `4365`
// Minimum execution time: 17_442_000 picoseconds.
Weight::from_parts(18_450_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
}
@@ -0,0 +1,189 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_salary`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_salary
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_salary`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_salary::WeightInfo for WeightInfo<T> {
/// Storage: `AmbassadorSalary::Status` (r:1 w:1)
/// Proof: `AmbassadorSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
fn init() -> Weight {
// Proof Size summary in bytes:
// Measured: `4`
// Estimated: `1541`
// Minimum execution time: 8_278_000 picoseconds.
Weight::from_parts(8_563_000, 0)
.saturating_add(Weight::from_parts(0, 1541))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorSalary::Status` (r:1 w:1)
/// Proof: `AmbassadorSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
fn bump() -> Weight {
// Proof Size summary in bytes:
// Measured: `86`
// Estimated: `1541`
// Minimum execution time: 10_099_000 picoseconds.
Weight::from_parts(10_580_000, 0)
.saturating_add(Weight::from_parts(0, 1541))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorSalary::Status` (r:1 w:0)
/// Proof: `AmbassadorSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorSalary::Claimant` (r:1 w:1)
/// Proof: `AmbassadorSalary::Claimant` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`)
fn induct() -> Weight {
// Proof Size summary in bytes:
// Measured: `295`
// Estimated: `3551`
// Minimum execution time: 18_750_000 picoseconds.
Weight::from_parts(19_375_000, 0)
.saturating_add(Weight::from_parts(0, 3551))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorSalary::Status` (r:1 w:1)
/// Proof: `AmbassadorSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorSalary::Claimant` (r:1 w:1)
/// Proof: `AmbassadorSalary::Claimant` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`)
fn register() -> Weight {
// Proof Size summary in bytes:
// Measured: `362`
// Estimated: `3551`
// Minimum execution time: 22_651_000 picoseconds.
Weight::from_parts(23_354_000, 0)
.saturating_add(Weight::from_parts(0, 3551))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `AmbassadorSalary::Status` (r:1 w:1)
/// Proof: `AmbassadorSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorSalary::Claimant` (r:1 w:1)
/// Proof: `AmbassadorSalary::Claimant` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::QueryCounter` (r:1 w:1)
/// Proof: `PezkuwiXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn payout() -> Weight {
// Proof Size summary in bytes:
// Measured: `671`
// Estimated: `4136`
// Minimum execution time: 64_853_000 picoseconds.
Weight::from_parts(67_282_000, 0)
.saturating_add(Weight::from_parts(0, 4136))
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `AmbassadorSalary::Status` (r:1 w:1)
/// Proof: `AmbassadorSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorSalary::Claimant` (r:1 w:1)
/// Proof: `AmbassadorSalary::Claimant` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::QueryCounter` (r:1 w:1)
/// Proof: `PezkuwiXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn payout_other() -> Weight {
// Proof Size summary in bytes:
// Measured: `671`
// Estimated: `4136`
// Minimum execution time: 64_349_000 picoseconds.
Weight::from_parts(67_452_000, 0)
.saturating_add(Weight::from_parts(0, 4136))
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `AmbassadorSalary::Status` (r:1 w:1)
/// Proof: `AmbassadorSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorSalary::Claimant` (r:1 w:1)
/// Proof: `AmbassadorSalary::Claimant` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::Queries` (r:1 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn check_payment() -> Weight {
// Proof Size summary in bytes:
// Measured: `198`
// Estimated: `3663`
// Minimum execution time: 26_071_000 picoseconds.
Weight::from_parts(27_044_000, 0)
.saturating_add(Weight::from_parts(0, 3663))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
}
@@ -0,0 +1,189 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_salary`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_salary
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_salary`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_salary::WeightInfo for WeightInfo<T> {
/// Storage: `FellowshipSalary::Status` (r:1 w:1)
/// Proof: `FellowshipSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
fn init() -> Weight {
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `1541`
// Minimum execution time: 9_151_000 picoseconds.
Weight::from_parts(9_614_000, 0)
.saturating_add(Weight::from_parts(0, 1541))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipSalary::Status` (r:1 w:1)
/// Proof: `FellowshipSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
fn bump() -> Weight {
// Proof Size summary in bytes:
// Measured: `224`
// Estimated: `1541`
// Minimum execution time: 11_013_000 picoseconds.
Weight::from_parts(11_413_000, 0)
.saturating_add(Weight::from_parts(0, 1541))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipSalary::Status` (r:1 w:0)
/// Proof: `FellowshipSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::Members` (r:1 w:0)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipSalary::Claimant` (r:1 w:1)
/// Proof: `FellowshipSalary::Claimant` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`)
fn induct() -> Weight {
// Proof Size summary in bytes:
// Measured: `395`
// Estimated: `3551`
// Minimum execution time: 19_112_000 picoseconds.
Weight::from_parts(20_006_000, 0)
.saturating_add(Weight::from_parts(0, 3551))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `FellowshipCollective::Members` (r:1 w:0)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `FellowshipSalary::Status` (r:1 w:1)
/// Proof: `FellowshipSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `FellowshipSalary::Claimant` (r:1 w:1)
/// Proof: `FellowshipSalary::Claimant` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`)
fn register() -> Weight {
// Proof Size summary in bytes:
// Measured: `462`
// Estimated: `3551`
// Minimum execution time: 22_794_000 picoseconds.
Weight::from_parts(23_572_000, 0)
.saturating_add(Weight::from_parts(0, 3551))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FellowshipSalary::Status` (r:1 w:1)
/// Proof: `FellowshipSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `FellowshipSalary::Claimant` (r:1 w:1)
/// Proof: `FellowshipSalary::Claimant` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::Members` (r:1 w:0)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::QueryCounter` (r:1 w:1)
/// Proof: `PezkuwiXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn payout() -> Weight {
// Proof Size summary in bytes:
// Measured: `671`
// Estimated: `4136`
// Minimum execution time: 65_374_000 picoseconds.
Weight::from_parts(67_506_000, 0)
.saturating_add(Weight::from_parts(0, 4136))
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `FellowshipSalary::Status` (r:1 w:1)
/// Proof: `FellowshipSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `FellowshipSalary::Claimant` (r:1 w:1)
/// Proof: `FellowshipSalary::Claimant` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`)
/// Storage: `FellowshipCollective::Members` (r:1 w:0)
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::QueryCounter` (r:1 w:1)
/// Proof: `PezkuwiXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn payout_other() -> Weight {
// Proof Size summary in bytes:
// Measured: `671`
// Estimated: `4136`
// Minimum execution time: 65_359_000 picoseconds.
Weight::from_parts(67_759_000, 0)
.saturating_add(Weight::from_parts(0, 4136))
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `FellowshipSalary::Status` (r:1 w:1)
/// Proof: `FellowshipSalary::Status` (`max_values`: Some(1), `max_size`: Some(56), added: 551, mode: `MaxEncodedLen`)
/// Storage: `FellowshipSalary::Claimant` (r:1 w:1)
/// Proof: `FellowshipSalary::Claimant` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::Queries` (r:1 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn check_payment() -> Weight {
// Proof Size summary in bytes:
// Measured: `336`
// Estimated: `3801`
// Minimum execution time: 26_856_000 picoseconds.
Weight::from_parts(27_572_000, 0)
.saturating_add(Weight::from_parts(0, 3801))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
}
@@ -0,0 +1,290 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_scheduler`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_scheduler
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_scheduler`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_scheduler::WeightInfo for WeightInfo<T> {
/// Storage: `Scheduler::IncompleteSince` (r:1 w:1)
/// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn service_agendas_base() -> Weight {
// Proof Size summary in bytes:
// Measured: `30`
// Estimated: `1489`
// Minimum execution time: 3_657_000 picoseconds.
Weight::from_parts(3_803_000, 0)
.saturating_add(Weight::from_parts(0, 1489))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 200]`.
fn service_agenda_base(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `76 + s * (177 ±0)`
// Estimated: `159279`
// Minimum execution time: 4_335_000 picoseconds.
Weight::from_parts(652_490, 0)
.saturating_add(Weight::from_parts(0, 159279))
// Standard Error: 6_261
.saturating_add(Weight::from_parts(505_822, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
fn service_task_base() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_847_000 picoseconds.
Weight::from_parts(4_078_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `Preimage::PreimageFor` (r:1 w:1)
/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// The range of component `s` is `[128, 4194304]`.
fn service_task_fetched(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `141 + s * (1 ±0)`
// Estimated: `3606 + s * (1 ±0)`
// Minimum execution time: 19_942_000 picoseconds.
Weight::from_parts(20_478_000, 0)
.saturating_add(Weight::from_parts(0, 3606))
// Standard Error: 325
.saturating_add(Weight::from_parts(30_896, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into()))
}
/// Storage: `Scheduler::Lookup` (r:0 w:1)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
fn service_task_named() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_476_000 picoseconds.
Weight::from_parts(5_797_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
fn service_task_periodic() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_756_000 picoseconds.
Weight::from_parts(3_950_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn execute_dispatch_signed() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_205_000 picoseconds.
Weight::from_parts(2_407_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn execute_dispatch_unsigned() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_188_000 picoseconds.
Weight::from_parts(2_313_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 199]`.
fn schedule(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `76 + s * (177 ±0)`
// Estimated: `159279`
// Minimum execution time: 11_131_000 picoseconds.
Weight::from_parts(9_815_127, 0)
.saturating_add(Weight::from_parts(0, 159279))
// Standard Error: 4_777
.saturating_add(Weight::from_parts(480_266, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Lookup` (r:0 w:1)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// The range of component `s` is `[1, 200]`.
fn cancel(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `76 + s * (177 ±0)`
// Estimated: `159279`
// Minimum execution time: 17_237_000 picoseconds.
Weight::from_parts(11_083_199, 0)
.saturating_add(Weight::from_parts(0, 159279))
// Standard Error: 5_569
.saturating_add(Weight::from_parts(707_879, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Scheduler::Lookup` (r:1 w:1)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// The range of component `s` is `[0, 199]`.
fn schedule_named(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `467 + s * (179 ±0)`
// Estimated: `159279`
// Minimum execution time: 14_435_000 picoseconds.
Weight::from_parts(15_995_475, 0)
.saturating_add(Weight::from_parts(0, 159279))
// Standard Error: 4_486
.saturating_add(Weight::from_parts(500_209, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Scheduler::Lookup` (r:1 w:1)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
/// The range of component `s` is `[1, 200]`.
fn cancel_named(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `508 + s * (179 ±0)`
// Estimated: `159279`
// Minimum execution time: 19_568_000 picoseconds.
Weight::from_parts(16_398_260, 0)
.saturating_add(Weight::from_parts(0, 159279))
// Standard Error: 4_753
.saturating_add(Weight::from_parts(700_992, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Scheduler::Agenda` (r:1 w:1)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
/// The range of component `s` is `[1, 200]`.
fn schedule_retry(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `117`
// Estimated: `159279`
// Minimum execution time: 10_535_000 picoseconds.
Weight::from_parts(11_022_574, 0)
.saturating_add(Weight::from_parts(0, 159279))
// Standard Error: 294
.saturating_add(Weight::from_parts(28_445, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Scheduler::Agenda` (r:1 w:0)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn set_retry() -> Weight {
// Proof Size summary in bytes:
// Measured: `35480`
// Estimated: `159279`
// Minimum execution time: 70_733_000 picoseconds.
Weight::from_parts(73_390_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Scheduler::Lookup` (r:1 w:0)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:0)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn set_retry_named() -> Weight {
// Proof Size summary in bytes:
// Measured: `36252`
// Estimated: `159279`
// Minimum execution time: 78_863_000 picoseconds.
Weight::from_parts(80_810_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Scheduler::Agenda` (r:1 w:0)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn cancel_retry() -> Weight {
// Proof Size summary in bytes:
// Measured: `35492`
// Estimated: `159279`
// Minimum execution time: 71_348_000 picoseconds.
Weight::from_parts(73_177_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Scheduler::Lookup` (r:1 w:0)
/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:0)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Retries` (r:0 w:1)
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
fn cancel_retry_named() -> Weight {
// Proof Size summary in bytes:
// Measured: `36264`
// Estimated: `159279`
// Minimum execution time: 78_998_000 picoseconds.
Weight::from_parts(80_991_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
}
@@ -0,0 +1,81 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_session`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_session
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_session`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_session::WeightInfo for WeightInfo<T> {
/// Storage: `Session::NextKeys` (r:1 w:1)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Session::KeyOwner` (r:1 w:1)
/// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn set_keys() -> Weight {
// Proof Size summary in bytes:
// Measured: `271`
// Estimated: `3736`
// Minimum execution time: 18_347_000 picoseconds.
Weight::from_parts(18_972_000, 0)
.saturating_add(Weight::from_parts(0, 3736))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Session::NextKeys` (r:1 w:1)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Session::KeyOwner` (r:0 w:1)
/// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn purge_keys() -> Weight {
// Proof Size summary in bytes:
// Measured: `243`
// Estimated: `3708`
// Minimum execution time: 13_129_000 picoseconds.
Weight::from_parts(13_515_000, 0)
.saturating_add(Weight::from_parts(0, 3708))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
}
@@ -0,0 +1,75 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_timestamp`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_timestamp
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_timestamp`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_timestamp::WeightInfo for WeightInfo<T> {
/// Storage: `Timestamp::Now` (r:1 w:1)
/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Aura::CurrentSlot` (r:1 w:0)
/// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
fn set() -> Weight {
// Proof Size summary in bytes:
// Measured: `85`
// Estimated: `1493`
// Minimum execution time: 8_237_000 picoseconds.
Weight::from_parts(8_808_000, 0)
.saturating_add(Weight::from_parts(0, 1493))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
fn on_finalize() -> Weight {
// Proof Size summary in bytes:
// Measured: `94`
// Estimated: `0`
// Minimum execution time: 4_470_000 picoseconds.
Weight::from_parts(4_709_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
@@ -0,0 +1,65 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_transaction_payment`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_transaction_payment
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_transaction_payment`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_transaction_payment::WeightInfo for WeightInfo<T> {
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn charge_transaction_payment() -> Weight {
// Proof Size summary in bytes:
// Measured: `101`
// Estimated: `6196`
// Minimum execution time: 46_274_000 picoseconds.
Weight::from_parts(47_083_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
}
@@ -0,0 +1,172 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_treasury`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_treasury
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_treasury`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_treasury::WeightInfo for WeightInfo<T> {
/// Storage: `FellowshipTreasury::ProposalCount` (r:1 w:1)
/// Proof: `FellowshipTreasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `FellowshipTreasury::Approvals` (r:1 w:1)
/// Proof: `FellowshipTreasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
/// Storage: `FellowshipTreasury::Proposals` (r:0 w:1)
/// Proof: `FellowshipTreasury::Proposals` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
fn spend_local() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `1887`
// Minimum execution time: 12_879_000 picoseconds.
Weight::from_parts(13_346_000, 0)
.saturating_add(Weight::from_parts(0, 1887))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `FellowshipTreasury::Approvals` (r:1 w:1)
/// Proof: `FellowshipTreasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
fn remove_approval() -> Weight {
// Proof Size summary in bytes:
// Measured: `161`
// Estimated: `1887`
// Minimum execution time: 6_978_000 picoseconds.
Weight::from_parts(7_278_000, 0)
.saturating_add(Weight::from_parts(0, 1887))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:0)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `FellowshipTreasury::Deactivated` (r:1 w:1)
/// Proof: `FellowshipTreasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `FellowshipTreasury::LastSpendPeriod` (r:1 w:1)
/// Proof: `FellowshipTreasury::LastSpendPeriod` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// The range of component `p` is `[0, 99]`.
fn on_initialize_proposals(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `280 + p * (1 ±0)`
// Estimated: `3593`
// Minimum execution time: 13_758_000 picoseconds.
Weight::from_parts(17_033_109, 0)
.saturating_add(Weight::from_parts(0, 3593))
// Standard Error: 1_091
.saturating_add(Weight::from_parts(70_962, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0)
/// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`)
/// Storage: `FellowshipTreasury::SpendCount` (r:1 w:1)
/// Proof: `FellowshipTreasury::SpendCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `FellowshipTreasury::Spends` (r:0 w:1)
/// Proof: `FellowshipTreasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
fn spend() -> Weight {
// Proof Size summary in bytes:
// Measured: `219`
// Estimated: `4703`
// Minimum execution time: 24_150_000 picoseconds.
Weight::from_parts(24_739_000, 0)
.saturating_add(Weight::from_parts(0, 4703))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FellowshipTreasury::Spends` (r:1 w:1)
/// Proof: `FellowshipTreasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::QueryCounter` (r:1 w:1)
/// Proof: `PezkuwiXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn payout() -> Weight {
// Proof Size summary in bytes:
// Measured: `559`
// Estimated: `5318`
// Minimum execution time: 59_146_000 picoseconds.
Weight::from_parts(62_110_000, 0)
.saturating_add(Weight::from_parts(0, 5318))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `FellowshipTreasury::Spends` (r:1 w:1)
/// Proof: `FellowshipTreasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::Queries` (r:1 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn check_status() -> Weight {
// Proof Size summary in bytes:
// Measured: `240`
// Estimated: `5318`
// Minimum execution time: 25_460_000 picoseconds.
Weight::from_parts(26_237_000, 0)
.saturating_add(Weight::from_parts(0, 5318))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `FellowshipTreasury::Spends` (r:1 w:1)
/// Proof: `FellowshipTreasury::Spends` (`max_values`: None, `max_size`: Some(1853), added: 4328, mode: `MaxEncodedLen`)
fn void_spend() -> Weight {
// Proof Size summary in bytes:
// Measured: `212`
// Estimated: `5318`
// Minimum execution time: 15_357_000 picoseconds.
Weight::from_parts(15_787_000, 0)
.saturating_add(Weight::from_parts(0, 5318))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
@@ -0,0 +1,118 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_utility`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_utility
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_utility`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_utility::WeightInfo for WeightInfo<T> {
/// The range of component `c` is `[0, 1000]`.
fn batch(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_500_000 picoseconds.
Weight::from_parts(5_697_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 879
.saturating_add(Weight::from_parts(3_415_859, 0).saturating_mul(c.into()))
}
fn as_derivative() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_567_000 picoseconds.
Weight::from_parts(4_786_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// The range of component `c` is `[0, 1000]`.
fn batch_all(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_467_000 picoseconds.
Weight::from_parts(786_773, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 1_123
.saturating_add(Weight::from_parts(3_694_730, 0).saturating_mul(c.into()))
}
fn dispatch_as() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_072_000 picoseconds.
Weight::from_parts(7_494_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// The range of component `c` is `[0, 1000]`.
fn force_batch(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_387_000 picoseconds.
Weight::from_parts(1_811_137, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 1_396
.saturating_add(Weight::from_parts(3_460_305, 0).saturating_mul(c.into()))
}
fn dispatch_as_fallible() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_386_000 picoseconds.
Weight::from_parts(7_590_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn if_else() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_776_000 picoseconds.
Weight::from_parts(9_166_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
@@ -0,0 +1,398 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_xcm`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-07-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `a49f76527979`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_xcm
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_xcm::WeightInfo for WeightInfo<T> {
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
fn send() -> Weight {
// Proof Size summary in bytes:
// Measured: `347`
// Estimated: `3812`
// Minimum execution time: 36_462_000 picoseconds.
Weight::from_parts(37_913_000, 0)
.saturating_add(Weight::from_parts(0, 3812))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PezkuwiXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
fn teleport_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `347`
// Estimated: `3812`
// Minimum execution time: 124_821_000 picoseconds.
Weight::from_parts(129_294_000, 0)
.saturating_add(Weight::from_parts(0, 3812))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn reserve_transfer_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PezkuwiXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
fn transfer_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `347`
// Estimated: `3812`
// Minimum execution time: 125_175_000 picoseconds.
Weight::from_parts(129_316_000, 0)
.saturating_add(Weight::from_parts(0, 3812))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `PezkuwiXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PezkuwiXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn execute() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `1485`
// Minimum execution time: 9_788_000 picoseconds.
Weight::from_parts(10_155_000, 0)
.saturating_add(Weight::from_parts(0, 1485))
.saturating_add(T::DbWeight::get().reads(1))
}
/// Storage: `PezkuwiXcm::SupportedVersion` (r:0 w:1)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_xcm_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_371_000 picoseconds.
Weight::from_parts(8_737_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
fn force_default_xcm_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_326_000 picoseconds.
Weight::from_parts(2_620_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `PezkuwiXcm::VersionNotifiers` (r:1 w:1)
/// Proof: `PezkuwiXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::QueryCounter` (r:1 w:1)
/// Proof: `PezkuwiXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_subscribe_version_notify() -> Weight {
// Proof Size summary in bytes:
// Measured: `278`
// Estimated: `3743`
// Minimum execution time: 40_534_000 picoseconds.
Weight::from_parts(43_788_000, 0)
.saturating_add(Weight::from_parts(0, 3743))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `PezkuwiXcm::VersionNotifiers` (r:1 w:1)
/// Proof: `PezkuwiXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_unsubscribe_version_notify() -> Weight {
// Proof Size summary in bytes:
// Measured: `437`
// Estimated: `108971`
// Minimum execution time: 45_700_000 picoseconds.
Weight::from_parts(46_886_000, 0)
.saturating_add(Weight::from_parts(0, 108971))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `PezkuwiXcm::XcmExecutionSuspended` (r:0 w:1)
/// Proof: `PezkuwiXcm::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn force_suspension() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_405_000 picoseconds.
Weight::from_parts(2_537_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PezkuwiXcm::SupportedVersion` (r:6 w:2)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn migrate_supported_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `22`
// Estimated: `15862`
// Minimum execution time: 22_934_000 picoseconds.
Weight::from_parts(23_538_000, 0)
.saturating_add(Weight::from_parts(0, 15862))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PezkuwiXcm::VersionNotifiers` (r:6 w:2)
/// Proof: `PezkuwiXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn migrate_version_notifiers() -> Weight {
// Proof Size summary in bytes:
// Measured: `26`
// Estimated: `15866`
// Minimum execution time: 22_627_000 picoseconds.
Weight::from_parts(23_273_000, 0)
.saturating_add(Weight::from_parts(0, 15866))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:7 w:0)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn already_notified_target() -> Weight {
// Proof Size summary in bytes:
// Measured: `39`
// Estimated: `18354`
// Minimum execution time: 25_357_000 picoseconds.
Weight::from_parts(25_887_000, 0)
.saturating_add(Weight::from_parts(0, 18354))
.saturating_add(T::DbWeight::get().reads(7))
}
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:2 w:1)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn notify_current_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `220`
// Estimated: `6160`
// Minimum execution time: 37_185_000 picoseconds.
Weight::from_parts(38_533_000, 0)
.saturating_add(Weight::from_parts(0, 6160))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:5 w:0)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn notify_target_migration_fail() -> Weight {
// Proof Size summary in bytes:
// Measured: `39`
// Estimated: `13404`
// Minimum execution time: 17_694_000 picoseconds.
Weight::from_parts(18_163_000, 0)
.saturating_add(Weight::from_parts(0, 13404))
.saturating_add(T::DbWeight::get().reads(5))
}
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:6 w:2)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn migrate_version_notify_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `33`
// Estimated: `15873`
// Minimum execution time: 22_115_000 picoseconds.
Weight::from_parts(23_026_000, 0)
.saturating_add(Weight::from_parts(0, 15873))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:6 w:1)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn migrate_and_notify_old_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `220`
// Estimated: `16060`
// Minimum execution time: 48_193_000 picoseconds.
Weight::from_parts(49_682_000, 0)
.saturating_add(Weight::from_parts(0, 16060))
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PezkuwiXcm::QueryCounter` (r:1 w:1)
/// Proof: `PezkuwiXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn new_query() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `1485`
// Minimum execution time: 2_749_000 picoseconds.
Weight::from_parts(2_872_000, 0)
.saturating_add(Weight::from_parts(0, 1485))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PezkuwiXcm::Queries` (r:1 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn take_response() -> Weight {
// Proof Size summary in bytes:
// Measured: `7576`
// Estimated: `11041`
// Minimum execution time: 30_864_000 picoseconds.
Weight::from_parts(31_461_000, 0)
.saturating_add(Weight::from_parts(0, 11041))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PezkuwiXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PezkuwiXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::AssetTraps` (r:1 w:1)
/// Proof: `PezkuwiXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn claim_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `23`
// Estimated: `3488`
// Minimum execution time: 40_991_000 picoseconds.
Weight::from_parts(42_264_000, 0)
.saturating_add(Weight::from_parts(0, 3488))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PezkuwiXcm::AuthorizedAliases` (r:1 w:1)
/// Proof: `PezkuwiXcm::AuthorizedAliases` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)
fn add_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `160`
// Estimated: `3625`
// Minimum execution time: 52_085_000 picoseconds.
Weight::from_parts(53_710_000, 0)
.saturating_add(Weight::from_parts(0, 3625))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PezkuwiXcm::AuthorizedAliases` (r:1 w:1)
/// Proof: `PezkuwiXcm::AuthorizedAliases` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)
fn remove_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `516`
// Estimated: `3981`
// Minimum execution time: 53_918_000 picoseconds.
Weight::from_parts(54_668_000, 0)
.saturating_add(Weight::from_parts(0, 3981))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
fn weigh_message() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_201_000 picoseconds.
Weight::from_parts(8_365_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
@@ -0,0 +1,63 @@
// This file is part of Pezcumulus.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub mod constants {
use pezframe_support::{
parameter_types,
weights::{constants, RuntimeDbWeight},
};
parameter_types! {
/// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights
/// are available for brave runtime engineers who may want to try this out as default.
pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
};
}
#[cfg(test)]
mod test_db_weights {
use super::constants::ParityDbWeight as W;
use pezframe_support::weights::constants;
/// Checks that all weights exist and have sane values.
// NOTE: If this test fails but you are sure that the generated values are fine,
// you can delete it.
#[test]
fn sane() {
// At least 1 µs.
assert!(
W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
"Read weight should be at least 1 µs."
);
assert!(
W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
"Write weight should be at least 1 µs."
);
// At most 1 ms.
assert!(
W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Read weight should be at most 1 ms."
);
assert!(
W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Write weight should be at most 1 ms."
);
}
}
}
@@ -0,0 +1,77 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `cumulus_pallet_teyrchain_system`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=cumulus_pallet_teyrchain_system
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `cumulus_pallet_teyrchain_system`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> cumulus_pallet_teyrchain_system::WeightInfo for WeightInfo<T> {
/// Storage: `TeyrchainSystem::LastDmqMqcHead` (r:1 w:1)
/// Proof: `TeyrchainSystem::LastDmqMqcHead` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainSystem::ProcessedDownwardMessages` (r:0 w:1)
/// Proof: `TeyrchainSystem::ProcessedDownwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:0 w:1000)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn enqueue_inbound_downward_messages(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `48`
// Estimated: `3517`
// Minimum execution time: 2_928_000 picoseconds.
Weight::from_parts(2_990_000, 0)
.saturating_add(Weight::from_parts(0, 3517))
// Standard Error: 53_001
.saturating_add(Weight::from_parts(353_140_275, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
}
}
@@ -0,0 +1,61 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `cumulus_pallet_weight_reclaim`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=cumulus_pallet_weight_reclaim
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `cumulus_pallet_weight_reclaim`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> cumulus_pallet_weight_reclaim::WeightInfo for WeightInfo<T> {
fn storage_weight_reclaim() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_846_000 picoseconds.
Weight::from_parts(3_998_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
@@ -0,0 +1,258 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-09-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `4e9548205c14`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=cumulus_pallet_xcmp_queue
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `cumulus_pallet_xcmp_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:1)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
fn set_config_with_u32() -> Weight {
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `1497`
// Minimum execution time: 5_160_000 picoseconds.
Weight::from_parts(5_543_000, 0)
.saturating_add(Weight::from_parts(0, 1497))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 105467]`.
fn enqueue_n_bytes_xcmp_message(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `184`
// Estimated: `5487`
// Minimum execution time: 14_830_000 picoseconds.
Weight::from_parts(10_769_141, 0)
.saturating_add(Weight::from_parts(0, 5487))
// Standard Error: 7
.saturating_add(Weight::from_parts(1_037, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn enqueue_n_empty_xcmp_messages(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `184`
// Estimated: `5487`
// Minimum execution time: 12_541_000 picoseconds.
Weight::from_parts(17_430_070, 0)
.saturating_add(Weight::from_parts(0, 5487))
// Standard Error: 161
.saturating_add(Weight::from_parts(142_769, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `Measured`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `Measured`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `Measured`)
/// The range of component `n` is `[0, 105457]`.
fn enqueue_empty_xcmp_message_at(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `367 + n * (1 ±0)`
// Estimated: `3830 + n * (1 ±0)`
// Minimum execution time: 22_018_000 picoseconds.
Weight::from_parts(13_620_241, 0)
.saturating_add(Weight::from_parts(0, 3830))
// Standard Error: 12
.saturating_add(Weight::from_parts(2_284, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
}
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:100)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 100]`.
fn enqueue_n_full_pages(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `219`
// Estimated: `5487`
// Minimum execution time: 14_029_000 picoseconds.
Weight::from_parts(14_190_000, 0)
.saturating_add(Weight::from_parts(0, 5487))
// Standard Error: 73_749
.saturating_add(Weight::from_parts(98_141_067, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
}
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `Measured`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `Measured`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `Measured`)
fn enqueue_1000_small_xcmp_messages() -> Weight {
// Proof Size summary in bytes:
// Measured: `53100`
// Estimated: `56565`
// Minimum execution time: 281_701_000 picoseconds.
Weight::from_parts(285_132_000, 0)
.saturating_add(Weight::from_parts(0, 56565))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
fn suspend_channel() -> Weight {
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `2767`
// Minimum execution time: 3_257_000 picoseconds.
Weight::from_parts(3_552_000, 0)
.saturating_add(Weight::from_parts(0, 2767))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
fn resume_channel() -> Weight {
// Proof Size summary in bytes:
// Measured: `177`
// Estimated: `2767`
// Minimum execution time: 4_703_000 picoseconds.
Weight::from_parts(4_867_000, 0)
.saturating_add(Weight::from_parts(0, 2767))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// The range of component `n` is `[0, 92]`.
fn take_first_concatenated_xcm(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_039_000 picoseconds.
Weight::from_parts(2_360_236, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 103
.saturating_add(Weight::from_parts(17_740, 0).saturating_mul(n.into()))
}
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn on_idle_good_msg() -> Weight {
// Proof Size summary in bytes:
// Measured: `105749`
// Estimated: `109214`
// Minimum execution time: 186_842_000 picoseconds.
Weight::from_parts(194_767_000, 0)
.saturating_add(Weight::from_parts(0, 109214))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn on_idle_large_msg() -> Weight {
// Proof Size summary in bytes:
// Measured: `65818`
// Estimated: `69283`
// Minimum execution time: 124_013_000 picoseconds.
Weight::from_parts(129_392_000, 0)
.saturating_add(Weight::from_parts(0, 69283))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
}
}
@@ -0,0 +1,63 @@
// This file is part of Pezcumulus.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub mod constants {
use pezframe_support::{
parameter_types,
weights::{constants, RuntimeDbWeight},
};
parameter_types! {
/// By default, Bizinikiwi uses `RocksDB`, so this will be the weight used throughout
/// the runtime.
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
};
}
#[cfg(test)]
mod test_db_weights {
use super::constants::RocksDbWeight as W;
use pezframe_support::weights::constants;
/// Checks that all weights exist and have sane values.
// NOTE: If this test fails but you are sure that the generated values are fine,
// you can delete it.
#[test]
fn sane() {
// At least 1 µs.
assert!(
W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
"Read weight should be at least 1 µs."
);
assert!(
W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
"Write weight should be at least 1 µs."
);
// At most 1 ms.
assert!(
W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Read weight should be at most 1 ms."
);
assert!(
W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Write weight should be at most 1 ms."
);
}
}
}
@@ -0,0 +1,273 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
mod pezpallet_xcm_benchmarks_fungible;
mod pezpallet_xcm_benchmarks_generic;
use crate::{xcm_config::MaxAssetsIntoHolding, Runtime};
use alloc::vec::Vec;
use pezframe_support::weights::Weight;
use pezpallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight;
use pezpallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric;
use pezsp_runtime::BoundedVec;
use xcm::{
latest::{prelude::*, AssetTransferFilter},
DoubleEncoded,
};
trait WeighAssets {
fn weigh_assets(&self, weight: Weight) -> Weight;
}
// Collectives only knows about ZGR.
const MAX_ASSETS: u64 = 1;
impl WeighAssets for AssetFilter {
fn weigh_assets(&self, weight: Weight) -> Weight {
match self {
Self::Definite(assets) => weight.saturating_mul(assets.inner().iter().count() as u64),
Self::Wild(asset) => match asset {
All => weight.saturating_mul(MAX_ASSETS),
AllOf { fun, .. } => match fun {
WildFungibility::Fungible => weight,
// Magic number 2 has to do with the fact that we could have up to 2 times
// MaxAssetsIntoHolding in the worst-case scenario.
WildFungibility::NonFungible =>
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64),
},
AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
},
}
}
}
impl WeighAssets for Assets {
fn weigh_assets(&self, weight: Weight) -> Weight {
weight.saturating_mul(self.inner().iter().count() as u64)
}
}
pub struct CollectivesZagrosXcmWeight<Call>(core::marker::PhantomData<Call>);
impl<Call> XcmWeightInfo<Call> for CollectivesZagrosXcmWeight<Call> {
fn withdraw_asset(assets: &Assets) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::withdraw_asset())
}
fn reserve_asset_deposited(assets: &Assets) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::reserve_asset_deposited())
}
fn receive_teleported_asset(assets: &Assets) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::receive_teleported_asset())
}
fn query_response(
_query_id: &u64,
_response: &Response,
_max_weight: &Weight,
_querier: &Option<Location>,
) -> Weight {
XcmGeneric::<Runtime>::query_response()
}
fn transfer_asset(assets: &Assets, _dest: &Location) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::transfer_asset())
}
fn transfer_reserve_asset(assets: &Assets, _dest: &Location, _xcm: &Xcm<()>) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::transfer_reserve_asset())
}
fn transact(
_origin_type: &OriginKind,
_fallback_max_weight: &Option<Weight>,
_call: &DoubleEncoded<Call>,
) -> Weight {
XcmGeneric::<Runtime>::transact()
}
fn hrmp_new_channel_open_request(
_sender: &u32,
_max_message_size: &u32,
_max_capacity: &u32,
) -> Weight {
// XCM Executor does not currently support HRMP channel operations
Weight::MAX
}
fn hrmp_channel_accepted(_recipient: &u32) -> Weight {
// XCM Executor does not currently support HRMP channel operations
Weight::MAX
}
fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight {
// XCM Executor does not currently support HRMP channel operations
Weight::MAX
}
fn clear_origin() -> Weight {
XcmGeneric::<Runtime>::clear_origin()
}
fn descend_origin(_who: &InteriorLocation) -> Weight {
XcmGeneric::<Runtime>::descend_origin()
}
fn report_error(_query_response_info: &QueryResponseInfo) -> Weight {
XcmGeneric::<Runtime>::report_error()
}
fn deposit_asset(assets: &AssetFilter, _dest: &Location) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::deposit_asset())
}
fn deposit_reserve_asset(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::deposit_reserve_asset())
}
fn exchange_asset(_give: &AssetFilter, _receive: &Assets, _maximal: &bool) -> Weight {
Weight::MAX
}
fn initiate_reserve_withdraw(
assets: &AssetFilter,
_reserve: &Location,
_xcm: &Xcm<()>,
) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::initiate_reserve_withdraw())
}
fn initiate_teleport(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::initiate_teleport())
}
fn initiate_transfer(
_dest: &Location,
remote_fees: &Option<AssetTransferFilter>,
_preserve_origin: &bool,
assets: &BoundedVec<AssetTransferFilter, MaxAssetTransferFilters>,
_xcm: &Xcm<()>,
) -> Weight {
let mut weight = if let Some(remote_fees) = remote_fees {
let fees = remote_fees.inner();
fees.weigh_assets(XcmFungibleWeight::<Runtime>::initiate_transfer())
} else {
Weight::zero()
};
for asset_filter in assets {
let assets = asset_filter.inner();
let extra = assets.weigh_assets(XcmFungibleWeight::<Runtime>::initiate_transfer());
weight = weight.saturating_add(extra);
}
weight
}
fn report_holding(_response_info: &QueryResponseInfo, _assets: &AssetFilter) -> Weight {
XcmGeneric::<Runtime>::report_holding()
}
fn buy_execution(_fees: &Asset, _weight_limit: &WeightLimit) -> Weight {
XcmGeneric::<Runtime>::buy_execution()
}
fn pay_fees(_asset: &Asset) -> Weight {
XcmGeneric::<Runtime>::pay_fees()
}
fn refund_surplus() -> Weight {
XcmGeneric::<Runtime>::refund_surplus()
}
fn set_error_handler(_xcm: &Xcm<Call>) -> Weight {
XcmGeneric::<Runtime>::set_error_handler()
}
fn set_appendix(_xcm: &Xcm<Call>) -> Weight {
XcmGeneric::<Runtime>::set_appendix()
}
fn clear_error() -> Weight {
XcmGeneric::<Runtime>::clear_error()
}
fn set_hints(hints: &BoundedVec<Hint, HintNumVariants>) -> Weight {
let mut weight = Weight::zero();
for hint in hints {
match hint {
AssetClaimer { .. } => {
weight = weight.saturating_add(XcmGeneric::<Runtime>::asset_claimer());
},
}
}
weight
}
fn claim_asset(_assets: &Assets, _ticket: &Location) -> Weight {
XcmGeneric::<Runtime>::claim_asset()
}
fn trap(_code: &u64) -> Weight {
XcmGeneric::<Runtime>::trap()
}
fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight {
XcmGeneric::<Runtime>::subscribe_version()
}
fn unsubscribe_version() -> Weight {
XcmGeneric::<Runtime>::unsubscribe_version()
}
fn burn_asset(assets: &Assets) -> Weight {
assets.weigh_assets(XcmGeneric::<Runtime>::burn_asset())
}
fn expect_asset(assets: &Assets) -> Weight {
assets.weigh_assets(XcmGeneric::<Runtime>::expect_asset())
}
fn expect_origin(_origin: &Option<Location>) -> Weight {
XcmGeneric::<Runtime>::expect_origin()
}
fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight {
XcmGeneric::<Runtime>::expect_error()
}
fn expect_transact_status(_transact_status: &MaybeErrorCode) -> Weight {
XcmGeneric::<Runtime>::expect_transact_status()
}
fn query_pallet(_module_name: &Vec<u8>, _response_info: &QueryResponseInfo) -> Weight {
XcmGeneric::<Runtime>::query_pallet()
}
fn expect_pallet(
_index: &u32,
_name: &Vec<u8>,
_module_name: &Vec<u8>,
_crate_major: &u32,
_min_crate_minor: &u32,
) -> Weight {
XcmGeneric::<Runtime>::expect_pallet()
}
fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight {
XcmGeneric::<Runtime>::report_transact_status()
}
fn clear_transact_status() -> Weight {
XcmGeneric::<Runtime>::clear_transact_status()
}
fn universal_origin(_: &Junction) -> Weight {
Weight::MAX
}
fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight {
Weight::MAX
}
fn lock_asset(_: &Asset, _: &Location) -> Weight {
Weight::MAX
}
fn unlock_asset(_: &Asset, _: &Location) -> Weight {
Weight::MAX
}
fn note_unlockable(_: &Asset, _: &Location) -> Weight {
Weight::MAX
}
fn request_unlock(_: &Asset, _: &Location) -> Weight {
Weight::MAX
}
fn set_fees_mode(_: &bool) -> Weight {
XcmGeneric::<Runtime>::set_fees_mode()
}
fn set_topic(_topic: &[u8; 32]) -> Weight {
XcmGeneric::<Runtime>::set_topic()
}
fn clear_topic() -> Weight {
XcmGeneric::<Runtime>::clear_topic()
}
fn alias_origin(_: &Location) -> Weight {
XcmGeneric::<Runtime>::alias_origin()
}
fn unpaid_execution(_: &WeightLimit, _: &Option<Location>) -> Weight {
XcmGeneric::<Runtime>::unpaid_execution()
}
fn execute_with_origin(_: &Option<InteriorLocation>, _: &Xcm<Call>) -> Weight {
XcmGeneric::<Runtime>::execute_with_origin()
}
}
@@ -0,0 +1,215 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_xcm_benchmarks::fungible`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-07-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `a49f76527979`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_xcm_benchmarks::fungible
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights/xcm
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --template=pezcumulus/templates/xcm-bench-template.hbs
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weights for `pezpallet_xcm_benchmarks::fungible`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> WeightInfo<T> {
// Storage: `System::Account` (r:1 w:1)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
pub fn withdraw_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `101`
// Estimated: `3593`
// Minimum execution time: 32_178_000 picoseconds.
Weight::from_parts(33_259_000, 3593)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
pub fn transfer_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `101`
// Estimated: `6196`
// Minimum execution time: 44_300_000 picoseconds.
Weight::from_parts(45_380_000, 6196)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: `System::Account` (r:3 w:3)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn transfer_reserve_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `448`
// Estimated: `8799`
// Minimum execution time: 119_384_000 picoseconds.
Weight::from_parts(124_635_000, 8799)
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(5))
}
// Storage: `Benchmark::Override` (r:0 w:0)
// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
pub fn reserve_asset_deposited() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
}
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn initiate_reserve_withdraw() -> Weight {
// Proof Size summary in bytes:
// Measured: `448`
// Estimated: `6196`
// Minimum execution time: 87_192_000 picoseconds.
Weight::from_parts(89_659_000, 6196)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
pub fn receive_teleported_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_551_000 picoseconds.
Weight::from_parts(2_775_000, 0)
}
// Storage: `System::Account` (r:1 w:1)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
pub fn deposit_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 25_223_000 picoseconds.
Weight::from_parts(25_656_000, 3593)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `System::Account` (r:1 w:1)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn deposit_reserve_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `347`
// Estimated: `3812`
// Minimum execution time: 71_055_000 picoseconds.
Weight::from_parts(74_130_000, 3812)
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn initiate_teleport() -> Weight {
// Proof Size summary in bytes:
// Measured: `347`
// Estimated: `3812`
// Minimum execution time: 49_498_000 picoseconds.
Weight::from_parts(51_347_000, 3812)
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn initiate_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `347`
// Estimated: `6196`
// Minimum execution time: 99_704_000 picoseconds.
Weight::from_parts(103_937_000, 6196)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
}
@@ -0,0 +1,375 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_xcm_benchmarks::generic`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-07-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `a49f76527979`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/collectives-zagros-runtime/collectives_zagros_runtime.wasm
// --pallet=pezpallet_xcm_benchmarks::generic
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/collectives/collectives-zagros/src/weights/xcm
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --template=pezcumulus/templates/xcm-bench-template.hbs
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weights for `pezpallet_xcm_benchmarks::generic`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> WeightInfo<T> {
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn report_holding() -> Weight {
// Proof Size summary in bytes:
// Measured: `448`
// Estimated: `6196`
// Minimum execution time: 83_204_000 picoseconds.
Weight::from_parts(85_444_000, 6196)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: `System::Account` (r:1 w:1)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
pub fn buy_execution() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 3_812_000 picoseconds.
Weight::from_parts(4_044_000, 3593)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: `System::Account` (r:1 w:1)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
pub fn pay_fees() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 3_805_000 picoseconds.
Weight::from_parts(3_986_000, 3593)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
pub fn asset_claimer() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 722_000 picoseconds.
Weight::from_parts(782_000, 0)
}
// Storage: `PezkuwiXcm::Queries` (r:1 w:0)
// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
pub fn query_response() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3465`
// Minimum execution time: 6_110_000 picoseconds.
Weight::from_parts(6_319_000, 3465)
.saturating_add(T::DbWeight::get().reads(1))
}
pub fn transact() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_483_000 picoseconds.
Weight::from_parts(7_709_000, 0)
}
pub fn refund_surplus() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_210_000 picoseconds.
Weight::from_parts(1_300_000, 0)
}
pub fn set_error_handler() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 707_000 picoseconds.
Weight::from_parts(801_000, 0)
}
pub fn set_appendix() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 724_000 picoseconds.
Weight::from_parts(780_000, 0)
}
pub fn clear_error() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 702_000 picoseconds.
Weight::from_parts(786_000, 0)
}
pub fn descend_origin() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 722_000 picoseconds.
Weight::from_parts(773_000, 0)
}
// Storage: `Benchmark::Override` (r:0 w:0)
// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
pub fn execute_with_origin() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
}
pub fn clear_origin() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 680_000 picoseconds.
Weight::from_parts(758_000, 0)
}
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn report_error() -> Weight {
// Proof Size summary in bytes:
// Measured: `448`
// Estimated: `6196`
// Minimum execution time: 79_918_000 picoseconds.
Weight::from_parts(81_914_000, 6196)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: `PezkuwiXcm::AssetTraps` (r:1 w:1)
// Proof: `PezkuwiXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`)
pub fn claim_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `23`
// Estimated: `3488`
// Minimum execution time: 9_800_000 picoseconds.
Weight::from_parts(10_101_000, 3488)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
pub fn trap() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_689_000 picoseconds.
Weight::from_parts(3_865_000, 0)
}
// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:1 w:1)
// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn subscribe_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `278`
// Estimated: `3743`
// Minimum execution time: 33_263_000 picoseconds.
Weight::from_parts(34_232_000, 3743)
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:0 w:1)
// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
pub fn unsubscribe_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_416_000 picoseconds.
Weight::from_parts(3_603_000, 0)
.saturating_add(T::DbWeight::get().writes(1))
}
pub fn burn_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_104_000 picoseconds.
Weight::from_parts(1_189_000, 0)
}
pub fn expect_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 766_000 picoseconds.
Weight::from_parts(817_000, 0)
}
pub fn expect_origin() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_668_000 picoseconds.
Weight::from_parts(3_796_000, 0)
}
pub fn expect_error() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_634_000 picoseconds.
Weight::from_parts(3_824_000, 0)
}
pub fn expect_transact_status() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 850_000 picoseconds.
Weight::from_parts(934_000, 0)
}
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn query_pallet() -> Weight {
// Proof Size summary in bytes:
// Measured: `448`
// Estimated: `6196`
// Minimum execution time: 86_934_000 picoseconds.
Weight::from_parts(88_810_000, 6196)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
pub fn expect_pallet() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_523_000 picoseconds.
Weight::from_parts(5_685_000, 0)
}
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn report_transact_status() -> Weight {
// Proof Size summary in bytes:
// Measured: `448`
// Estimated: `6196`
// Minimum execution time: 80_346_000 picoseconds.
Weight::from_parts(82_126_000, 6196)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
pub fn clear_transact_status() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 751_000 picoseconds.
Weight::from_parts(821_000, 0)
}
pub fn set_topic() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 679_000 picoseconds.
Weight::from_parts(747_000, 0)
}
pub fn clear_topic() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 657_000 picoseconds.
Weight::from_parts(761_000, 0)
}
pub fn set_fees_mode() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 732_000 picoseconds.
Weight::from_parts(766_000, 0)
}
pub fn unpaid_execution() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 729_000 picoseconds.
Weight::from_parts(779_000, 0)
}
pub fn alias_origin() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 730_000 picoseconds.
Weight::from_parts(784_000, 0)
}
}
@@ -0,0 +1,335 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use super::{
AccountId, AllPalletsWithSystem, Balance, Balances, BaseDeliveryFee, FeeAssetId, Fellows,
PezkuwiXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, RuntimeOrigin,
TeyrchainInfo, TeyrchainSystem, TransactionByteFee, WeightToFee, XcmpQueue,
ZagrosTreasuryAccount,
};
use pezframe_support::{
parameter_types,
traits::{
fungible::HoldConsideration, tokens::imbalance::ResolveTo, ConstU32, Contains, Equals,
Everything, LinearStoragePrice, Nothing,
},
};
use pezframe_system::EnsureRoot;
use pezpallet_collator_selection::StakingPotAccountId;
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
use pezkuwi_runtime_common::xcm_sender::ExponentialPrice;
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use teyrchains_common::xcm_config::{
AliasAccountId32FromSiblingSystemChain, AllSiblingSystemTeyrchains, ConcreteAssetFromSystem,
ParentRelayOrSiblingTeyrchains, RelayOrOtherSystemTeyrchains,
};
use xcm::latest::{prelude::*, ZAGROS_GENESIS_HASH};
use xcm_builder::{
AccountId32Aliases, AliasChildLocation, AliasOriginRootUsingFilter,
AllowExplicitUnpaidExecutionFrom, AllowHrmpNotificationsFromRelayChain,
AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom,
DenyRecursively, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal,
DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter,
HashedDescription, IsConcrete, LocatableAssetId, LocationAsSuperuser, OriginToPluralityVoice,
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SendXcmFeeToAccount,
SiblingTeyrchainAsNative, SiblingTeyrchainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
XcmFeeManagerFromComponents,
};
use xcm_executor::XcmExecutor;
use zagros_runtime_constants::{system_teyrchain::ASSET_HUB_ID, xcm as xcm_constants};
// Re-export
pub use testnet_teyrchains_constants::zagros::locations::GovernanceLocation;
parameter_types! {
pub const RootLocation: Location = Location::here();
pub const WndLocation: Location = Location::parent();
pub const RelayNetwork: Option<NetworkId> = Some(NetworkId::ByGenesis(ZAGROS_GENESIS_HASH));
pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
pub UniversalLocation: InteriorLocation =
[GlobalConsensus(RelayNetwork::get().unwrap()), Teyrchain(TeyrchainInfo::teyrchain_id().into())].into();
pub RelayTreasuryLocation: Location = (Parent, PalletInstance(zagros_runtime_constants::TREASURY_PALLET_ID)).into();
pub CheckingAccount: AccountId = PezkuwiXcm::check_account();
pub const FellowshipAdminBodyId: BodyId = BodyId::Index(xcm_constants::body::FELLOWSHIP_ADMIN_INDEX);
pub AssetHub: Location = (Parent, Teyrchain(ASSET_HUB_ID)).into();
pub const TreasurerBodyId: BodyId = BodyId::Treasury;
pub AssetHubUsdtId: AssetId = (PalletInstance(50), GeneralIndex(1984)).into();
pub UsdtAssetHub: LocatableAssetId = LocatableAssetId {
location: AssetHub::get(),
asset_id: AssetHubUsdtId::get(),
};
pub WndAssetHub: LocatableAssetId = LocatableAssetId {
location: AssetHub::get(),
asset_id: WndLocation::get().into(),
};
}
/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used
/// when determining ownership of accounts for asset transacting and when attempting to use XCM
/// `Transact` in order to determine the dispatch Origin.
pub type LocationToAccountId = (
// The parent (Relay-chain) origin converts to the parent `AccountId`.
ParentIsPreset<AccountId>,
// Sibling teyrchain origins convert to AccountId via the `ParaId::into`.
SiblingTeyrchainConvertsVia<Sibling, AccountId>,
// Straight up local `AccountId32` origins just alias directly to `AccountId`.
AccountId32Aliases<RelayNetwork, AccountId>,
// Foreign locations alias into accounts according to a hash of their standard description.
HashedDescription<AccountId, DescribeFamily<DescribeAllTerminal>>,
);
/// Means for transacting the native currency on this chain.#[allow(deprecated)]
pub type FungibleTransactor = FungibleAdapter<
// Use this currency:
Balances,
// Use this currency when it is a fungible asset matching the given location or name:
IsConcrete<WndLocation>,
// Convert an XCM Location into a local account id:
LocationToAccountId,
// Our chain's account ID type (we can't get away without mentioning it explicitly):
AccountId,
// We don't track any teleports of `Balances`.
(),
>;
/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,
/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can
/// biases the kind of local `Origin` it will become.
pub type XcmOriginToTransactDispatchOrigin = (
// Governance location can gain root.
LocationAsSuperuser<Equals<GovernanceLocation>, RuntimeOrigin>,
// Sovereign account converter; this attempts to derive an `AccountId` from the origin location
// using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for
// foreign chains who want to have a local sovereign account on this chain which they control.
SovereignSignedViaLocation<LocationToAccountId, RuntimeOrigin>,
// Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when
// recognised.
RelayChainAsNative<RelayChainOrigin, RuntimeOrigin>,
// Native converter for sibling Teyrchains; will convert to a `SiblingPara` origin when
// recognised.
SiblingTeyrchainAsNative<cumulus_pallet_xcm::Origin, RuntimeOrigin>,
// Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a
// transaction from the Root origin.
ParentAsSuperuser<RuntimeOrigin>,
// Native signed account converter; this just converts an `AccountId32` origin into a normal
// `RuntimeOrigin::Signed` origin of the same 32-byte value.
SignedAccountId32AsNative<RelayNetwork, RuntimeOrigin>,
// Xcm origins can be represented natively under the Xcm pallet's Xcm origin.
XcmPassthrough<RuntimeOrigin>,
);
parameter_types! {
pub const MaxInstructions: u32 = 100;
pub const MaxAssetsIntoHolding: u32 = 64;
// Fellows pluralistic body.
pub const FellowsBodyId: BodyId = BodyId::Technical;
}
pub struct ParentOrParentsPlurality;
impl Contains<Location> for ParentOrParentsPlurality {
fn contains(location: &Location) -> bool {
matches!(location.unpack(), (1, []) | (1, [Plurality { .. }]))
}
}
pub struct LocalPlurality;
impl Contains<Location> for LocalPlurality {
fn contains(loc: &Location) -> bool {
matches!(loc.unpack(), (0, [Plurality { .. }]))
}
}
pub type Barrier = TrailingSetTopicAsId<
DenyThenTry<
DenyRecursively<DenyReserveTransferToRelayChain>,
(
// Allow local users to buy weight credit.
TakeWeightCredit,
// Expected responses are OK.
AllowKnownQueryResponses<PezkuwiXcm>,
// Allow XCMs with some computed origins to pass through.
WithComputedOrigin<
(
// If the message is one that immediately attempts to pay for execution, then
// allow it.
AllowTopLevelPaidExecutionFrom<Everything>,
// Parent and its pluralities (i.e. governance bodies) get free execution.
AllowExplicitUnpaidExecutionFrom<(
ParentOrParentsPlurality,
Equals<GovernanceLocation>,
)>,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom<ParentRelayOrSiblingTeyrchains>,
// HRMP notifications from the relay chain are OK.
AllowHrmpNotificationsFromRelayChain,
),
UniversalLocation,
ConstU32<8>,
>,
),
>,
>;
/// Locations that will not be charged fees in the executor,
/// either execution or delivery.
/// We only waive fees for system functions, which these locations represent.
pub type WaivedLocations = (
RelayOrOtherSystemTeyrchains<AllSiblingSystemTeyrchains, Runtime>,
Equals<RelayTreasuryLocation>,
Equals<RootLocation>,
LocalPlurality,
);
/// Cases where a remote origin is accepted as trusted Teleporter for a given asset:
/// - ZGR with the parent Relay Chain and sibling teyrchains.
pub type TrustedTeleporters = ConcreteAssetFromSystem<WndLocation>;
/// Defines origin aliasing rules for this chain.
///
/// - Allow any origin to alias into a child sub-location (equivalent to DescendOrigin),
/// - Allow same accounts to alias into each other across system chains,
/// - Allow AssetHub root to alias into anything,
/// - Allow origins explicitly authorized to alias into target location.
pub type TrustedAliasers = (
AliasChildLocation,
AliasAccountId32FromSiblingSystemChain,
AliasOriginRootUsingFilter<AssetHub, Everything>,
AuthorizedAliasers<Runtime>,
);
pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
type XcmSender = XcmRouter;
type XcmEventEmitter = PezkuwiXcm;
type AssetTransactor = FungibleTransactor;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
// Collectives does not recognize a reserve location for any asset. Users must teleport ZGR
// where allowed (e.g. with the Relay Chain).
type IsReserve = ();
type IsTeleporter = TrustedTeleporters;
type UniversalLocation = UniversalLocation;
type Barrier = Barrier;
type Weigher = WeightInfoBounds<
crate::weights::xcm::CollectivesZagrosXcmWeight<RuntimeCall>,
RuntimeCall,
MaxInstructions,
>;
type Trader = UsingComponents<
WeightToFee,
WndLocation,
AccountId,
Balances,
ResolveTo<StakingPotAccountId<Runtime>, Balances>,
>;
type ResponseHandler = PezkuwiXcm;
type AssetTrap = PezkuwiXcm;
type AssetClaims = PezkuwiXcm;
type SubscriptionService = PezkuwiXcm;
type PalletInstancesInfo = AllPalletsWithSystem;
type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
type AssetLocker = ();
type AssetExchanger = ();
type FeeManager = XcmFeeManagerFromComponents<
WaivedLocations,
SendXcmFeeToAccount<Self::AssetTransactor, ZagrosTreasuryAccount>,
>;
type MessageExporter = ();
type UniversalAliases = Nothing;
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
type Aliasers = TrustedAliasers;
type TransactionalProcessor = FrameTransactionalProcessor;
type HrmpNewChannelOpenRequestHandler = ();
type HrmpChannelAcceptedHandler = ();
type HrmpChannelClosingHandler = ();
type XcmRecorder = PezkuwiXcm;
}
/// Converts a local signed origin into an XCM location. Forms the basis for local origins
/// sending/executing XCMs.
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, RelayNetwork>;
pub type PriceForParentDelivery =
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, TeyrchainSystem>;
/// The means for routing XCM messages which are not for local execution into the right message
/// queues.
pub type XcmRouter = WithUniqueTopic<(
// Two routers - use UMP to communicate with the relay chain:
cumulus_primitives_utility::ParentAsUmp<TeyrchainSystem, PezkuwiXcm, PriceForParentDelivery>,
// ..and XCMP to communicate with the sibling chains.
XcmpQueue,
)>;
#[cfg(feature = "runtime-benchmarks")]
parameter_types! {
pub ReachableDest: Option<Location> = Some(Parent.into());
}
/// Type to convert the Fellows origin to a Plurality `Location` value.
pub type FellowsToPlurality = OriginToPluralityVoice<RuntimeOrigin, Fellows, FellowsBodyId>;
parameter_types! {
pub const DepositPerItem: Balance = crate::deposit(1, 0);
pub const DepositPerByte: Balance = crate::deposit(0, 1);
pub const AuthorizeAliasHoldReason: RuntimeHoldReason = RuntimeHoldReason::PezkuwiXcm(pezpallet_xcm::HoldReason::AuthorizeAlias);
}
impl pezpallet_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
// We only allow the Fellows to send messages.
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, FellowsToPlurality>;
type XcmRouter = XcmRouter;
// We support local origins dispatching XCM executions.
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
type XcmExecuteFilter = Everything;
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Nothing; // This teyrchain is not meant as a reserve location.
type Weigher = WeightInfoBounds<
crate::weights::xcm::CollectivesZagrosXcmWeight<RuntimeCall>,
RuntimeCall,
MaxInstructions,
>;
type UniversalLocation = UniversalLocation;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
type AdvertisedXcmVersion = pezpallet_xcm::CurrentXcmVersion;
type Currency = Balances;
type CurrencyMatcher = ();
type TrustedLockers = ();
type SovereignAccountOf = LocationToAccountId;
type MaxLockers = ConstU32<8>;
type WeightInfo = crate::weights::pezpallet_xcm::WeightInfo<Runtime>;
type AdminOrigin = EnsureRoot<AccountId>;
type MaxRemoteLockConsumers = ConstU32<0>;
type RemoteLockConsumerIdentifier = ();
// xcm_executor::Config::Aliasers also uses pezpallet_xcm::AuthorizedAliasers.
type AuthorizedAliasConsideration = HoldConsideration<
AccountId,
Balances,
AuthorizeAliasHoldReason,
LinearStoragePrice<DepositPerItem, DepositPerByte, Balance>,
>;
}
impl cumulus_pallet_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type XcmExecutor = XcmExecutor<XcmConfig>;
}
@@ -0,0 +1,202 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Pezcumulus.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#![cfg(test)]
use collectives_zagros_runtime::{
xcm_config::{GovernanceLocation, LocationToAccountId},
Block, Runtime, RuntimeCall, RuntimeOrigin,
};
use pezframe_support::{assert_err, assert_ok};
use pezsp_core::crypto::Ss58Codec;
use pezsp_runtime::Either;
use testnet_teyrchains_constants::zagros::fee::WeightToFee;
use teyrchains_common::AccountId;
use teyrchains_runtimes_test_utils::GovernanceOrigin;
use xcm::latest::prelude::*;
use xcm_runtime_apis::conversions::LocationToAccountHelper;
const ALICE: [u8; 32] = [1u8; 32];
#[test]
fn location_conversion_works() {
// the purpose of hardcoded values is to catch an unintended location conversion logic change.
struct TestCase {
description: &'static str,
location: Location,
expected_account_id_str: &'static str,
}
let test_cases = vec![
// DescribeTerminus
TestCase {
description: "DescribeTerminus Parent",
location: Location::new(1, Here),
expected_account_id_str: "5Dt6dpkWPwLaH4BBCKJwjiWrFVAGyYk3tLUabvyn4v7KtESG",
},
TestCase {
description: "DescribeTerminus Sibling",
location: Location::new(1, [Teyrchain(1111)]),
expected_account_id_str: "5Eg2fnssmmJnF3z1iZ1NouAuzciDaaDQH7qURAy3w15jULDk",
},
// DescribePalletTerminal
TestCase {
description: "DescribePalletTerminal Parent",
location: Location::new(1, [PalletInstance(50)]),
expected_account_id_str: "5CnwemvaAXkWFVwibiCvf2EjqwiqBi29S5cLLydZLEaEw6jZ",
},
TestCase {
description: "DescribePalletTerminal Sibling",
location: Location::new(1, [Teyrchain(1111), PalletInstance(50)]),
expected_account_id_str: "5GFBgPjpEQPdaxEnFirUoa51u5erVx84twYxJVuBRAT2UP2g",
},
// DescribeAccountId32Terminal
TestCase {
description: "DescribeAccountId32Terminal Parent",
location: Location::new(
1,
[Junction::AccountId32 { network: None, id: AccountId::from(ALICE).into() }],
),
expected_account_id_str: "5DN5SGsuUG7PAqFL47J9meViwdnk9AdeSWKFkcHC45hEzVz4",
},
TestCase {
description: "DescribeAccountId32Terminal Sibling",
location: Location::new(
1,
[
Teyrchain(1111),
Junction::AccountId32 { network: None, id: AccountId::from(ALICE).into() },
],
),
expected_account_id_str: "5DGRXLYwWGce7wvm14vX1Ms4Vf118FSWQbJkyQigY2pfm6bg",
},
// DescribeAccountKey20Terminal
TestCase {
description: "DescribeAccountKey20Terminal Parent",
location: Location::new(1, [AccountKey20 { network: None, key: [0u8; 20] }]),
expected_account_id_str: "5F5Ec11567pa919wJkX6VHtv2ZXS5W698YCW35EdEbrg14cg",
},
TestCase {
description: "DescribeAccountKey20Terminal Sibling",
location: Location::new(
1,
[Teyrchain(1111), AccountKey20 { network: None, key: [0u8; 20] }],
),
expected_account_id_str: "5CB2FbUds2qvcJNhDiTbRZwiS3trAy6ydFGMSVutmYijpPAg",
},
// DescribeTreasuryVoiceTerminal
TestCase {
description: "DescribeTreasuryVoiceTerminal Parent",
location: Location::new(1, [Plurality { id: BodyId::Treasury, part: BodyPart::Voice }]),
expected_account_id_str: "5CUjnE2vgcUCuhxPwFoQ5r7p1DkhujgvMNDHaF2bLqRp4D5F",
},
TestCase {
description: "DescribeTreasuryVoiceTerminal Sibling",
location: Location::new(
1,
[Teyrchain(1111), Plurality { id: BodyId::Treasury, part: BodyPart::Voice }],
),
expected_account_id_str: "5G6TDwaVgbWmhqRUKjBhRRnH4ry9L9cjRymUEmiRsLbSE4gB",
},
// DescribeBodyTerminal
TestCase {
description: "DescribeBodyTerminal Parent",
location: Location::new(1, [Plurality { id: BodyId::Unit, part: BodyPart::Voice }]),
expected_account_id_str: "5EBRMTBkDisEXsaN283SRbzx9Xf2PXwUxxFCJohSGo4jYe6B",
},
TestCase {
description: "DescribeBodyTerminal Sibling",
location: Location::new(
1,
[Teyrchain(1111), Plurality { id: BodyId::Unit, part: BodyPart::Voice }],
),
expected_account_id_str: "5DBoExvojy8tYnHgLL97phNH975CyT45PWTZEeGoBZfAyRMH",
},
];
for tc in test_cases {
let expected =
AccountId::from_string(tc.expected_account_id_str).expect("Invalid AccountId string");
let got = LocationToAccountHelper::<AccountId, LocationToAccountId>::convert_location(
tc.location.into(),
)
.unwrap();
assert_eq!(got, expected, "{}", tc.description);
}
}
#[test]
fn xcm_payment_api_works() {
teyrchains_runtimes_test_utils::test_cases::xcm_payment_api_with_native_token_works::<
Runtime,
RuntimeCall,
RuntimeOrigin,
Block,
WeightToFee,
>();
}
#[test]
fn governance_authorize_upgrade_works() {
use zagros_runtime_constants::system_teyrchain::{ASSET_HUB_ID, COLLECTIVES_ID};
// no - random para
assert_err!(
teyrchains_runtimes_test_utils::test_cases::can_governance_authorize_upgrade::<
Runtime,
RuntimeOrigin,
>(GovernanceOrigin::Location(Location::new(1, Teyrchain(12334)))),
Either::Right(InstructionError { index: 0, error: XcmError::Barrier })
);
// ok - AssetHub
assert_ok!(teyrchains_runtimes_test_utils::test_cases::can_governance_authorize_upgrade::<
Runtime,
RuntimeOrigin,
>(GovernanceOrigin::Location(Location::new(1, Teyrchain(ASSET_HUB_ID)))));
// no - Collectives
assert_err!(
teyrchains_runtimes_test_utils::test_cases::can_governance_authorize_upgrade::<
Runtime,
RuntimeOrigin,
>(GovernanceOrigin::Location(Location::new(1, Teyrchain(COLLECTIVES_ID)))),
Either::Right(InstructionError { index: 0, error: XcmError::Barrier })
);
// no - Collectives Voice of Fellows plurality
assert_err!(
teyrchains_runtimes_test_utils::test_cases::can_governance_authorize_upgrade::<
Runtime,
RuntimeOrigin,
>(GovernanceOrigin::LocationAndDescendOrigin(
Location::new(1, Teyrchain(COLLECTIVES_ID)),
Plurality { id: BodyId::Technical, part: BodyPart::Voice }.into()
)),
Either::Right(InstructionError { index: 0, error: XcmError::Barrier })
);
// ok - relaychain
assert_ok!(teyrchains_runtimes_test_utils::test_cases::can_governance_authorize_upgrade::<
Runtime,
RuntimeOrigin,
>(GovernanceOrigin::Location(Location::parent())));
// ok - governance location
assert_ok!(teyrchains_runtimes_test_utils::test_cases::can_governance_authorize_upgrade::<
Runtime,
RuntimeOrigin,
>(GovernanceOrigin::Location(GovernanceLocation::get())));
}