The Ambassador Program (#1308)

The Ambassador Program on Polkadot Collectives Parachain

The Polkadot Ambassador Program has existed for a while; more
information can be found
[here](https://wiki.polkadot.network/docs/ambassadors).
In this PR, the program is being brought on chain.

### On Chain Structure
The on-chain program consists of nine ranks, divided into four
categories ([full
list](https://github.com/paritytech/cumulus/blob/c238fb26b75569a11abb57437fd14acd26e05f18/parachains/runtimes/collectives/collectives-polkadot/src/ambassador/mod.rs#L52)):
- Ambassadors (1-2 tiers)
- Senior Ambassadors (3-4 tiers)
- Head Ambassadors (5-7 tiers)
- Master Ambassadors (8-9 tiers)

Each rank has a corresponding `Origin` (e.g., `HeadAmbassadorsTier5` -
[full
list](https://github.com/paritytech/cumulus/blob/c238fb26b75569a11abb57437fd14acd26e05f18/parachains/runtimes/collectives/collectives-polkadot/src/ambassador/origins.rs#L35)),
which represents the collective voice of members of that rank and above.

### Referendum

The `AmbassadorReferenda` instance of [referenda
pallet](https://docs.rs/pallet-referenda/latest/pallet_referenda/)
consists of [nine
tracks](https://github.com/paritytech/cumulus/blob/c238fb26b75569a11abb57437fd14acd26e05f18/parachains/runtimes/collectives/collectives-polkadot/src/ambassador/tracks.rs#L51),
each corresponding to an `Origin`. A referendum taken on `senior
ambassador tier 4` track invites all members from rank 4 or above to
vote and commands `SeniorAmbassadors` `Origin`. Every member gets one
vote plus an additional vote for every excess rank. The referendum
proposal can be submitted by any member of a senior rank or above.

### Membership Management

Initial members will be brought on chain via migration, with subsequent
member management handled through the `AmbassadorCollective` instance of
[ranked collective
pallet](https://docs.rs/pallet-ranked-collective/latest/pallet_ranked_collective/).
Both `Root` and `FellowshipAdmin` `Origins`, commanded via public
Polkadot referendum, can promote or demote members to and from any rank.
Members themselves also have the power to promote or demote via its
referendum, with a senior member vote by the rank two above the new /
current rank - [full
configuration](https://github.com/paritytech/cumulus/blob/9ab6aa47063d7e8b67ddc10d9c136037f99c03a3/parachains/runtimes/collectives/collectives-polkadot/src/ambassador/mod.rs#L67).

### Content Management

The program's on-chain content is managed via the collectives content
pallet, allowing for setting its charter and making announcements. The
voice of head ambassadors have the authority to set the charter, while
announcements can be made by any senior rank member or through a
referendum among all members.

### Additional Functionality

The `AmbassadorCore` instance of [core fellowship
pallet](https://docs.rs/pallet-core-fellowship/latest/pallet_core_fellowship/)
decorates the ranked collectives pallet with features like salary
determination, activity/passivity registration, and the handling of
promotion and demotion periods. While the usage of this pallet is
optional in the first version, future updates will make it the exclusive
method for induction/promotion.

Periodic salaries in USDt, payable on Asset Hub, are introduced through
the [salary
pallet](https://docs.rs/pallet-salary/latest/pallet_salary/). This
requires induction into the ambassador core pallet.

Please for more information on the pallets' functionality refer to their
documentations.

### Next Steps:
- Migrate to seed the program members
- Mint ambassador NFT badges on Asset Hub when promoting
- Treasury pallet instance for the Ambassador Program

---------

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
Muharem
2023-09-20 21:55:56 +02:00
committed by GitHub
parent d6b3fc0dbb
commit 9e403629d5
29 changed files with 2945 additions and 233 deletions
@@ -72,6 +72,7 @@ cumulus-pallet-xcmp-queue = { path = "../../../../pallets/xcmp-queue", default-f
cumulus-primitives-core = { path = "../../../../primitives/core", default-features = false }
cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false }
pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false }
pallet-collective-content = { path = "../../../pallets/collective-content", default-features = false }
parachain-info = { path = "../../../pallets/parachain-info", default-features = false }
parachains-common = { path = "../../../common", default-features = false }
@@ -95,6 +96,7 @@ runtime-benchmarks = [
"pallet-alliance/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-collator-selection/runtime-benchmarks",
"pallet-collective-content/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-core-fellowship/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
@@ -129,6 +131,7 @@ try-runtime = [
"pallet-authorship/try-runtime",
"pallet-balances/try-runtime",
"pallet-collator-selection/try-runtime",
"pallet-collective-content/try-runtime",
"pallet-collective/try-runtime",
"pallet-core-fellowship/try-runtime",
"pallet-multisig/try-runtime",
@@ -170,6 +173,7 @@ std = [
"pallet-authorship/std",
"pallet-balances/std",
"pallet-collator-selection/std",
"pallet-collective-content/std",
"pallet-collective/std",
"pallet-core-fellowship/std",
"pallet-multisig/std",
@@ -0,0 +1,255 @@
// 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](pallet_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](pallet_referenda)).
//! - Managed content (charter, announcements) (via [pallet_collective_content]).
//! - Promotion and demotion periods, register of members' activity, and rank based salaries
//! (via [AmbassadorCore](pallet_core_fellowship)).
//! - Members' salaries (via [AmbassadorSalary](pallet_salary), requiring a member to be
//! imported or inducted into [AmbassadorCore](pallet_core_fellowship)).
pub mod origins;
mod tracks;
use super::*;
use crate::xcm_config::{DotAssetHub, FellowshipAdminBodyId};
use frame_support::traits::{EitherOf, MapSuccess, TryMapSuccess};
pub use origins::pallet_origins as pallet_ambassador_origins;
use origins::pallet_origins::{
EnsureAmbassadorsVoice, EnsureAmbassadorsVoiceFrom, EnsureHeadAmbassadorsVoice, Origin,
};
use parachains_common::polkadot::account;
use sp_core::ConstU128;
use sp_runtime::traits::{CheckedReduceBy, ConstU16, ConvertToValue, Replace};
use xcm::prelude::*;
use xcm_builder::{AliasesIntoAccountId32, PayOverXcm};
/// The Ambassador Program's member ranks.
pub mod ranks {
use pallet_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 pallet_ambassador_origins::Config for Runtime {}
pub type AmbassadorCollectiveInstance = pallet_ranked_collective::Instance2;
/// Demotion 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 current rank.
pub type DemoteOrigin = EitherOf<
frame_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<
pallet_ranked_collective::EnsureMember<
Runtime,
AmbassadorCollectiveInstance,
{ ranks::HEAD_AMBASSADOR_TIER_5 },
>,
Replace<ConstU16<0>>,
>,
>;
impl pallet_ranked_collective::Config<AmbassadorCollectiveInstance> for Runtime {
type WeightInfo = weights::pallet_ranked_collective_ambassador_collective::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
type PromoteOrigin = PromoteOrigin;
type DemoteOrigin = DemoteOrigin;
type Polls = AmbassadorReferenda;
type MinRankOfClass = sp_runtime::traits::Identity;
type VoteWeight = pallet_ranked_collective::Linear;
}
parameter_types! {
pub const AlarmInterval: BlockNumber = 1;
pub const SubmissionDeposit: Balance = 0;
pub const UndecidingTimeout: BlockNumber = 7 * DAYS;
// The Ambassador Referenda pallet account, used as a temporarily place to deposit a slashed imbalance before teleport to the treasury.
pub AmbassadorPalletAccount: AccountId = account::AMBASSADOR_REFERENDA_PALLET_ID.into_account_truncating();
}
pub type AmbassadorReferendaInstance = pallet_referenda::Instance2;
impl pallet_referenda::Config<AmbassadorReferendaInstance> for Runtime {
type WeightInfo = weights::pallet_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 = pallet_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<PolkadotTreasuryAccount, AmbassadorPalletAccount, Runtime>;
type Votes = pallet_ranked_collective::Votes;
type Tally = pallet_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;
}
parameter_types! {
pub const AnnouncementLifetime: BlockNumber = 180 * DAYS;
pub const MaxAnnouncements: u32 = 50;
}
pub type AmbassadorContentInstance = pallet_collective_content::Instance1;
impl pallet_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<
pallet_ranked_collective::EnsureMember<
Runtime,
AmbassadorCollectiveInstance,
{ ranks::SENIOR_AMBASSADOR_TIER_3 },
>,
EnsureAmbassadorsVoice,
>;
type MaxAnnouncements = MaxAnnouncements;
type WeightInfo = weights::pallet_collective_content::WeightInfo<Runtime>;
}
pub type AmbassadorCoreInstance = pallet_core_fellowship::Instance2;
impl pallet_core_fellowship::Config<AmbassadorCoreInstance> for Runtime {
type WeightInfo = weights::pallet_core_fellowship_ambassador_core::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
type Members = pallet_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<
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<
EnsureXcm<IsVoiceOfBody<GovernanceLocation, FellowshipAdminBodyId>>,
EitherOfDiverse<
pallet_ranked_collective::EnsureMember<
Runtime,
AmbassadorCollectiveInstance,
{ ranks::HEAD_AMBASSADOR_TIER_5 },
>,
EnsureAmbassadorsVoiceFrom<ConstU16<{ ranks::SENIOR_AMBASSADOR_TIER_3 }>>,
>,
>;
type ApproveOrigin = PromoteOrigin;
type PromoteOrigin = PromoteOrigin;
type EvidenceSize = ConstU32<65536>;
}
pub type AmbassadorSalaryInstance = pallet_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: InteriorMultiLocation = PalletInstance(74).into();
}
/// [`PayOverXcm`] setup to pay the Ambassador salary on the AssetHub in DOT.
pub type AmbassadorSalaryPaymaster = PayOverXcm<
AmbassadorSalaryLocation,
crate::xcm_config::XcmRouter,
crate::PolkadotXcm,
ConstU32<{ 6 * HOURS }>,
AccountId,
(),
ConvertToValue<DotAssetHub>,
AliasesIntoAccountId32<(), AccountId>,
>;
impl pallet_salary::Config<AmbassadorSalaryInstance> for Runtime {
type WeightInfo = weights::pallet_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 = pallet_ranked_collective::Pallet<Runtime, AmbassadorCollectiveInstance>;
#[cfg(not(feature = "runtime-benchmarks"))]
type Salary = pallet_core_fellowship::Pallet<Runtime, AmbassadorCoreInstance>;
#[cfg(feature = "runtime-benchmarks")]
type Salary = frame_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,135 @@
// 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.
#[frame_support::pallet]
pub mod pallet_origins {
use crate::ambassador::ranks;
use frame_support::pallet_prelude::*;
use pallet_ranked_collective::Rank;
#[pallet::pallet]
pub struct Pallet<T>(PhantomData<T>);
/// The pallet configuration trait.
#[pallet::config]
pub trait Config: frame_system::Config {}
#[derive(PartialEq, Eq, Clone, MaxEncodedLen, Encode, Decode, 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: Into<Result<Origin, O>> + From<Origin>> EnsureOrigin<O> for EnsureHeadAmbassadorsVoice {
type Success = ();
fn try_origin(o: O) -> Result<Self::Success, O> {
o.into().and_then(|o| match o {
Origin::HeadAmbassadors => Ok(()),
r => Err(O::from(r)),
})
}
#[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: Into<Result<Origin, O>> + From<Origin>> EnsureOrigin<O>
for EnsureAmbassadorsVoiceFrom<R>
{
type Success = Rank;
fn try_origin(o: O) -> Result<Self::Success, O> {
o.into().and_then(|o| match Origin::as_voice(&o) {
Some(r) if r >= R::get() => Ok(r),
_ => Err(O::from(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: Into<Result<Origin, O>> + From<Origin>> EnsureOrigin<O> for EnsureAmbassadorsVoice {
type Success = Rank;
fn try_origin(o: O) -> Result<Self::Success, O> {
o.into().and_then(|o| Origin::as_voice(&o).ok_or(O::from(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 sp_runtime::Perbill;
/// 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 [`pallet_referenda::TracksInfo`] trait for referenda pallet.
pub struct TracksInfo;
/// Information on the voting tracks.
impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
type Id = TrackId;
type RuntimeOrigin = <RuntimeOrigin as frame_support::traits::OriginTrait>::PalletsOrigin;
/// Return the array of available tracks and their information.
fn tracks() -> &'static [(Self::Id, pallet_referenda::TrackInfo<Balance, BlockNumber>)] {
static DATA: [(TrackId, pallet_referenda::TrackInfo<Balance, BlockNumber>); 9] = [
(
constants::AMBASSADOR_TIER_1,
pallet_referenda::TrackInfo {
name: "ambassador tier 1",
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 7 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
),
(
constants::AMBASSADOR_TIER_2,
pallet_referenda::TrackInfo {
name: "ambassador tier 2",
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 7 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
),
(
constants::SENIOR_AMBASSADOR_TIER_3,
pallet_referenda::TrackInfo {
name: "senior ambassador tier 3",
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 7 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
),
(
constants::SENIOR_AMBASSADOR_TIER_4,
pallet_referenda::TrackInfo {
name: "senior ambassador tier 4",
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 7 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
),
(
constants::HEAD_AMBASSADOR_TIER_5,
pallet_referenda::TrackInfo {
name: "head ambassador tier 5",
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 7 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
),
(
constants::HEAD_AMBASSADOR_TIER_6,
pallet_referenda::TrackInfo {
name: "head ambassador tier 6",
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 7 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
),
(
constants::HEAD_AMBASSADOR_TIER_7,
pallet_referenda::TrackInfo {
name: "head ambassador tier 7",
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 7 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
),
(
constants::MASTER_AMBASSADOR_TIER_8,
pallet_referenda::TrackInfo {
name: "master ambassador tier 8",
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 7 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
),
(
constants::MASTER_AMBASSADOR_TIER_9,
pallet_referenda::TrackInfo {
name: "master ambassador tier 9",
max_deciding: 10,
decision_deposit: 5 * DOLLARS,
prepare_period: 24 * HOURS,
decision_period: 7 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 1 * HOURS,
min_approval: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),
},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(10),
ceil: Perbill::from_percent(50),
},
},
),
];
&DATA[..]
}
/// 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 = frame_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(()),
}
}
}
// implements [`frame_support::traits::Get`] for [`TracksInfo`]
pallet_referenda::impl_tracksinfo_get!(TracksInfo, Balance, BlockNumber);
@@ -20,11 +20,12 @@ pub(crate) mod migration;
mod origins;
mod tracks;
use crate::{
impls::ToParentTreasury, weights, AccountId, Balance, Balances, FellowshipReferenda,
GovernanceLocation, PolkadotTreasuryAccount, Preimage, Runtime, RuntimeCall, RuntimeEvent,
RuntimeOrigin, Scheduler, DAYS,
impls::ToParentTreasury,
weights,
xcm_config::{FellowshipAdminBodyId, UsdtAssetHub},
AccountId, Balance, Balances, FellowshipReferenda, GovernanceLocation, PolkadotTreasuryAccount,
Preimage, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, Scheduler, DAYS,
};
use cumulus_primitives_core::Junction::GeneralIndex;
use frame_support::{
parameter_types,
traits::{EitherOf, EitherOfDiverse, MapSuccess, OriginTrait, TryWithMorphedArg},
@@ -36,12 +37,10 @@ pub use origins::{
};
use pallet_ranked_collective::EnsureOfRank;
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
use parachains_common::polkadot::account;
use polkadot_runtime_constants::{time::HOURS, xcm::body::FELLOWSHIP_ADMIN_INDEX};
use parachains_common::{polkadot::account, HOURS};
use sp_core::{ConstU128, ConstU32};
use sp_runtime::traits::{AccountIdConversion, ConstU16, ConvertToValue, Replace, TakeFirst};
use xcm::latest::BodyId;
use xcm_builder::{AliasesIntoAccountId32, LocatableAssetId, PayOverXcm};
use xcm_builder::{AliasesIntoAccountId32, PayOverXcm};
#[cfg(feature = "runtime-benchmarks")]
use crate::impls::benchmarks::{OpenHrmpChannel, PayWithEnsure};
@@ -64,7 +63,6 @@ pub mod ranks {
parameter_types! {
// Referenda pallet account, used to temporarily deposit slashed imbalance before teleporting.
pub ReferendaPalletAccount: AccountId = account::REFERENDA_PALLET_ID.into_account_truncating();
pub const FellowshipAdminBodyId: BodyId = BodyId::Index(FELLOWSHIP_ADMIN_INDEX);
}
impl pallet_fellowship_origins::Config for Runtime {}
@@ -72,7 +70,7 @@ impl pallet_fellowship_origins::Config for Runtime {}
pub type FellowshipReferendaInstance = pallet_referenda::Instance1;
impl pallet_referenda::Config<FellowshipReferendaInstance> for Runtime {
type WeightInfo = weights::pallet_referenda::WeightInfo<Runtime>;
type WeightInfo = weights::pallet_referenda_fellowship_referenda::WeightInfo<Runtime>;
type RuntimeCall = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type Scheduler = Scheduler;
@@ -107,7 +105,7 @@ impl pallet_referenda::Config<FellowshipReferendaInstance> for Runtime {
pub type FellowshipCollectiveInstance = pallet_ranked_collective::Instance1;
impl pallet_ranked_collective::Config<FellowshipCollectiveInstance> for Runtime {
type WeightInfo = weights::pallet_ranked_collective::WeightInfo<Runtime>;
type WeightInfo = weights::pallet_ranked_collective_fellowship_collective::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
#[cfg(not(feature = "runtime-benchmarks"))]
@@ -139,7 +137,7 @@ impl pallet_ranked_collective::Config<FellowshipCollectiveInstance> for Runtime
pub type FellowshipCoreInstance = pallet_core_fellowship::Instance1;
impl pallet_core_fellowship::Config<FellowshipCoreInstance> for Runtime {
type WeightInfo = weights::pallet_core_fellowship::WeightInfo<Runtime>;
type WeightInfo = weights::pallet_core_fellowship_fellowship_core::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
type Members = pallet_ranked_collective::Pallet<Runtime, FellowshipCollectiveInstance>;
type Balance = Balance;
@@ -197,12 +195,6 @@ pub type FellowshipSalaryInstance = pallet_salary::Instance1;
use xcm::prelude::*;
parameter_types! {
pub AssetHub: MultiLocation = (Parent, Parachain(1000)).into();
pub AssetHubUsdtId: AssetId = (PalletInstance(50), GeneralIndex(1984)).into();
pub UsdtAsset: LocatableAssetId = LocatableAssetId {
location: AssetHub::get(),
asset_id: AssetHubUsdtId::get(),
};
// 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: InteriorMultiLocation = PalletInstance(64).into();
@@ -218,12 +210,12 @@ pub type FellowshipSalaryPaymaster = PayOverXcm<
ConstU32<{ 6 * HOURS }>,
AccountId,
(),
ConvertToValue<UsdtAsset>,
ConvertToValue<UsdtAssetHub>,
AliasesIntoAccountId32<(), AccountId>,
>;
impl pallet_salary::Config<FellowshipSalaryInstance> for Runtime {
type WeightInfo = weights::pallet_salary::WeightInfo<Runtime>;
type WeightInfo = weights::pallet_salary_fellowship_salary::WeightInfo<Runtime>;
type RuntimeEvent = RuntimeEvent;
#[cfg(not(feature = "runtime-benchmarks"))]
@@ -36,11 +36,13 @@
#[cfg(feature = "std")]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
pub mod ambassador;
pub mod impls;
mod weights;
pub mod xcm_config;
// Fellowship configurations.
pub mod fellowship;
pub use ambassador::pallet_ambassador_origins;
use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
use fellowship::{
@@ -292,6 +294,8 @@ pub enum ProxyType {
Alliance,
/// Fellowship proxy. Allows calls related to the Fellowship.
Fellowship,
/// Ambassador proxy. Allows calls related to the Ambassador Program.
Ambassador,
}
impl Default for ProxyType {
fn default() -> Self {
@@ -326,6 +330,18 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
c,
RuntimeCall::FellowshipCollective { .. } |
RuntimeCall::FellowshipReferenda { .. } |
RuntimeCall::FellowshipCore { .. } |
RuntimeCall::FellowshipSalary { .. } |
RuntimeCall::Utility { .. } |
RuntimeCall::Multisig { .. }
),
ProxyType::Ambassador => matches!(
c,
RuntimeCall::AmbassadorCollective { .. } |
RuntimeCall::AmbassadorReferenda { .. } |
RuntimeCall::AmbassadorContent { .. } |
RuntimeCall::AmbassadorCore { .. } |
RuntimeCall::AmbassadorSalary { .. } |
RuntimeCall::Utility { .. } |
RuntimeCall::Multisig { .. }
),
@@ -616,6 +632,14 @@ construct_runtime!(
FellowshipCore: pallet_core_fellowship::<Instance1>::{Pallet, Call, Storage, Event<T>} = 63,
// pub type FellowshipSalaryInstance = pallet_salary::Instance1;
FellowshipSalary: pallet_salary::<Instance1>::{Pallet, Call, Storage, Event<T>} = 64,
// Ambassador Program.
AmbassadorCollective: pallet_ranked_collective::<Instance2>::{Pallet, Call, Storage, Event<T>} = 70,
AmbassadorReferenda: pallet_referenda::<Instance2>::{Pallet, Call, Storage, Event<T>} = 71,
AmbassadorOrigins: pallet_ambassador_origins::{Origin} = 72,
AmbassadorCore: pallet_core_fellowship::<Instance2>::{Pallet, Call, Storage, Event<T>} = 73,
AmbassadorSalary: pallet_salary::<Instance2>::{Pallet, Call, Storage, Event<T>} = 74,
AmbassadorContent: pallet_collective_content::<Instance1>::{Pallet, Call, Storage, Event<T>} = 75,
}
);
@@ -684,6 +708,11 @@ mod benches {
[pallet_ranked_collective, FellowshipCollective]
[pallet_core_fellowship, FellowshipCore]
[pallet_salary, FellowshipSalary]
[pallet_referenda, AmbassadorReferenda]
[pallet_ranked_collective, AmbassadorCollective]
[pallet_collective_content, AmbassadorContent]
[pallet_core_fellowship, AmbassadorCore]
[pallet_salary, AmbassadorSalary]
);
}
@@ -22,13 +22,18 @@ pub mod pallet_alliance;
pub mod pallet_balances;
pub mod pallet_collator_selection;
pub mod pallet_collective;
pub mod pallet_core_fellowship;
pub mod pallet_collective_content;
pub mod pallet_core_fellowship_ambassador_core;
pub mod pallet_core_fellowship_fellowship_core;
pub mod pallet_multisig;
pub mod pallet_preimage;
pub mod pallet_proxy;
pub mod pallet_ranked_collective;
pub mod pallet_referenda;
pub mod pallet_salary;
pub mod pallet_ranked_collective_ambassador_collective;
pub mod pallet_ranked_collective_fellowship_collective;
pub mod pallet_referenda_ambassador_referenda;
pub mod pallet_referenda_fellowship_referenda;
pub mod pallet_salary_ambassador_salary;
pub mod pallet_salary_fellowship_salary;
pub mod pallet_scheduler;
pub mod pallet_session;
pub mod pallet_timestamp;
@@ -0,0 +1,94 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Cumulus.
// Cumulus is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Cumulus is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_collective_content`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-08-18, STEPS: `10`, REPEAT: `3`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-polkadot-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/debug/polkadot-parachain
// benchmark
// pallet
// --chain=collectives-polkadot-dev
// --steps=10
// --repeat=3
// --pallet=pallet_collective_content
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_collective_content`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_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: 99_000_000 picoseconds.
Weight::from_parts(99_000_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::AnnouncementsCount` (r:1 w:1)
/// Proof: `AmbassadorContent::AnnouncementsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorContent::NextAnnouncementExpireAt` (r:1 w:1)
/// Proof: `AmbassadorContent::NextAnnouncementExpireAt` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorContent::Announcements` (r:0 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: `285`
// Estimated: `3507`
// Minimum execution time: 273_000_000 picoseconds.
Weight::from_parts(278_000_000, 0)
.saturating_add(Weight::from_parts(0, 3507))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// 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::AnnouncementsCount` (r:1 w:1)
/// Proof: `AmbassadorContent::AnnouncementsCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn remove_announcement() -> Weight {
// Proof Size summary in bytes:
// Measured: `450`
// Estimated: `3555`
// Minimum execution time: 326_000_000 picoseconds.
Weight::from_parts(338_000_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,223 @@
// Copyright Parity Technologies (UK) Ltd.
// This file is part of Cumulus.
// Cumulus is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Cumulus is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_core_fellowship`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-08-11, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-polkadot-dev")`, DB CACHE: 1024
// Executed Command:
// target/release/polkadot-parachain
// benchmark
// pallet
// --chain=collectives-polkadot-dev
// --wasm-execution=compiled
// --pallet=pallet_core_fellowship
// --extrinsic=*
// --steps=2
// --repeat=2
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_core_fellowship`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<T> {
/// Storage: `AmbassadorCore::Params` (r:0 w:1)
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(364), added: 859, mode: `MaxEncodedLen`)
fn set_params() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 11_000_000 picoseconds.
Weight::from_parts(11_000_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.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(364), added: 859, 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:0)
/// 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`)
fn bump_offboard() -> Weight {
// Proof Size summary in bytes:
// Measured: `66011`
// Estimated: `69046`
// Minimum execution time: 96_000_000 picoseconds.
Weight::from_parts(111_000_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(4))
}
/// 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(364), added: 859, 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:0)
/// 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`)
fn bump_demote() -> Weight {
// Proof Size summary in bytes:
// Measured: `66121`
// Estimated: `69046`
// Minimum execution time: 99_000_000 picoseconds.
Weight::from_parts(116_000_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(4))
}
/// 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: 21_000_000 picoseconds.
Weight::from_parts(22_000_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: 36_000_000 picoseconds.
Weight::from_parts(36_000_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(364), added: 859, 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: `65989`
// Estimated: `69046`
// Minimum execution time: 95_000_000 picoseconds.
Weight::from_parts(110_000_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: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: `331`
// Estimated: `3514`
// Minimum execution time: 21_000_000 picoseconds.
Weight::from_parts(22_000_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: 20_000_000 picoseconds.
Weight::from_parts(21_000_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: 78_000_000 picoseconds.
Weight::from_parts(104_000_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: 43_000_000 picoseconds.
Weight::from_parts(44_000_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
}
@@ -17,24 +17,21 @@
//! Autogenerated weights for `pallet_core_fellowship`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-08-11, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-polkadot-dev")`, DB CACHE: 1024
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-polkadot-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/production/polkadot-parachain
// target/release/polkadot-parachain
// benchmark
// pallet
// --chain=collectives-polkadot-dev
// --wasm-execution=compiled
// --pallet=pallet_core_fellowship
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --extrinsic=*
// --steps=50
// --repeat=20
// --steps=2
// --repeat=2
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights/
@@ -56,8 +53,8 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 9_077_000 picoseconds.
Weight::from_parts(9_356_000, 0)
// Minimum execution time: 11_000_000 picoseconds.
Weight::from_parts(12_000_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -75,10 +72,10 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
/// Proof: `FellowshipCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
fn bump_offboard() -> Weight {
// Proof Size summary in bytes:
// Measured: `66111`
// Measured: `66144`
// Estimated: `69046`
// Minimum execution time: 128_419_000 picoseconds.
Weight::from_parts(149_318_000, 0)
// Minimum execution time: 109_000_000 picoseconds.
Weight::from_parts(125_000_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(4))
@@ -97,10 +94,10 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
/// Proof: `FellowshipCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
fn bump_demote() -> Weight {
// Proof Size summary in bytes:
// Measured: `66221`
// Measured: `66254`
// Estimated: `69046`
// Minimum execution time: 127_629_000 picoseconds.
Weight::from_parts(130_928_000, 0)
// Minimum execution time: 112_000_000 picoseconds.
Weight::from_parts(114_000_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(4))
@@ -111,10 +108,10 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
/// Proof: `FellowshipCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
fn set_active() -> Weight {
// Proof Size summary in bytes:
// Measured: `460`
// Measured: `493`
// Estimated: `3514`
// Minimum execution time: 18_655_000 picoseconds.
Weight::from_parts(19_331_000, 0)
// Minimum execution time: 22_000_000 picoseconds.
Weight::from_parts(27_000_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
@@ -131,10 +128,10 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn induct() -> Weight {
// Proof Size summary in bytes:
// Measured: `218`
// Measured: `251`
// Estimated: `3514`
// Minimum execution time: 28_764_000 picoseconds.
Weight::from_parts(29_385_000, 0)
// Minimum execution time: 35_000_000 picoseconds.
Weight::from_parts(36_000_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(5))
@@ -155,10 +152,10 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
/// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
fn promote() -> Weight {
// Proof Size summary in bytes:
// Measured: `66089`
// Measured: `66122`
// Estimated: `69046`
// Minimum execution time: 123_179_000 picoseconds.
Weight::from_parts(125_302_000, 0)
// Minimum execution time: 97_000_000 picoseconds.
Weight::from_parts(129_000_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(6))
@@ -171,10 +168,10 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
/// Proof: `FellowshipCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
fn offboard() -> Weight {
// Proof Size summary in bytes:
// Measured: `431`
// Measured: `464`
// Estimated: `3514`
// Minimum execution time: 19_700_000 picoseconds.
Weight::from_parts(20_319_000, 0)
// Minimum execution time: 22_000_000 picoseconds.
Weight::from_parts(22_000_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
@@ -185,10 +182,10 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
/// Proof: `FellowshipCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
fn import() -> Weight {
// Proof Size summary in bytes:
// Measured: `385`
// Measured: `418`
// Estimated: `3514`
// Minimum execution time: 18_048_000 picoseconds.
Weight::from_parts(18_345_000, 0)
// Minimum execution time: 20_000_000 picoseconds.
Weight::from_parts(24_000_000, 0)
.saturating_add(Weight::from_parts(0, 3514))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
@@ -201,10 +198,10 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
/// Proof: `FellowshipCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
fn approve() -> Weight {
// Proof Size summary in bytes:
// Measured: `66067`
// Measured: `66100`
// Estimated: `69046`
// Minimum execution time: 108_578_000 picoseconds.
Weight::from_parts(111_311_000, 0)
// Minimum execution time: 89_000_000 picoseconds.
Weight::from_parts(119_000_000, 0)
.saturating_add(Weight::from_parts(0, 69046))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
@@ -215,10 +212,10 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
/// Proof: `FellowshipCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
fn submit_evidence() -> Weight {
// Proof Size summary in bytes:
// Measured: `151`
// Measured: `184`
// Estimated: `69046`
// Minimum execution time: 94_484_000 picoseconds.
Weight::from_parts(97_930_000, 0)
// Minimum execution time: 43_000_000 picoseconds.
Weight::from_parts(52_000_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,177 @@
// Copyright Parity Technologies (UK) Ltd.
// This file is part of Cumulus.
// Cumulus is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Cumulus is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_ranked_collective`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-08-11, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-polkadot-dev")`, DB CACHE: 1024
// Executed Command:
// target/release/polkadot-parachain
// benchmark
// pallet
// --chain=collectives-polkadot-dev
// --wasm-execution=compiled
// --pallet=pallet_ranked_collective
// --extrinsic=*
// --steps=2
// --repeat=2
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_ranked_collective`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_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: 21_000_000 picoseconds.
Weight::from_parts(23_000_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:11)
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IndexToId` (r:11 w:11)
/// 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: `508 + r * (281 ±0)`
// Estimated: `3519 + r * (2529 ±0)`
// Minimum execution time: 34_000_000 picoseconds.
Weight::from_parts(36_500_000, 0)
.saturating_add(Weight::from_parts(0, 3519))
// Standard Error: 158_113
.saturating_add(Weight::from_parts(16_000_000, 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(4))
.saturating_add(T::DbWeight::get().writes((3_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: `210 + r * (17 ±0)`
// Estimated: `3507`
// Minimum execution time: 25_000_000 picoseconds.
Weight::from_parts(26_000_000, 0)
.saturating_add(Weight::from_parts(0, 3507))
// Standard Error: 180_277
.saturating_add(Weight::from_parts(650_000, 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:1)
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
/// Storage: `AmbassadorCollective::IndexToId` (r:1 w:1)
/// 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: `508 + r * (71 ±0)`
// Estimated: `3519`
// Minimum execution time: 34_000_000 picoseconds.
Weight::from_parts(36_500_000, 0)
.saturating_add(Weight::from_parts(0, 3519))
// Standard Error: 335_410
.saturating_add(Weight::from_parts(550_000, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
/// 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`)
fn vote() -> Weight {
// Proof Size summary in bytes:
// Measured: `566`
// Estimated: `317568`
// Minimum execution time: 57_000_000 picoseconds.
Weight::from_parts(60_000_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: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: `209 + n * (52 ±0)`
// Estimated: `4365 + n * (2550 ±0)`
// Minimum execution time: 18_000_000 picoseconds.
Weight::from_parts(18_500_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
// Standard Error: 11_180
.saturating_add(Weight::from_parts(1_335_000, 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, 2550).saturating_mul(n.into()))
}
}
@@ -17,24 +17,21 @@
//! Autogenerated weights for `pallet_ranked_collective`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-08-11, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-polkadot-dev")`, DB CACHE: 1024
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-polkadot-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/production/polkadot-parachain
// target/release/polkadot-parachain
// benchmark
// pallet
// --chain=collectives-polkadot-dev
// --wasm-execution=compiled
// --pallet=pallet_ranked_collective
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --extrinsic=*
// --steps=50
// --repeat=20
// --steps=2
// --repeat=2
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights/
@@ -62,8 +59,8 @@ impl<T: frame_system::Config> pallet_ranked_collective::WeightInfo for WeightInf
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `3507`
// Minimum execution time: 16_027_000 picoseconds.
Weight::from_parts(16_501_000, 0)
// Minimum execution time: 21_000_000 picoseconds.
Weight::from_parts(22_000_000, 0)
.saturating_add(Weight::from_parts(0, 3507))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(4))
@@ -77,15 +74,16 @@ impl<T: frame_system::Config> pallet_ranked_collective::WeightInfo for WeightInf
/// Storage: `FellowshipCollective::IndexToId` (r:11 w:11)
/// 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: `617 + r * (281 ±0)`
// Measured: `608 + r * (281 ±0)`
// Estimated: `3519 + r * (2529 ±0)`
// Minimum execution time: 27_829_000 picoseconds.
Weight::from_parts(30_053_705, 0)
// Minimum execution time: 35_000_000 picoseconds.
Weight::from_parts(36_500_000, 0)
.saturating_add(Weight::from_parts(0, 3519))
// Standard Error: 26_813
.saturating_add(Weight::from_parts(13_088_861, 0).saturating_mul(r.into()))
// Standard Error: 254_950
.saturating_add(Weight::from_parts(15_900_000, 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(4))
@@ -101,15 +99,16 @@ impl<T: frame_system::Config> pallet_ranked_collective::WeightInfo for WeightInf
/// 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)`
// Measured: `310 + r * (17 ±0)`
// Estimated: `3507`
// Minimum execution time: 19_762_000 picoseconds.
Weight::from_parts(20_493_905, 0)
// Minimum execution time: 25_000_000 picoseconds.
Weight::from_parts(25_500_000, 0)
.saturating_add(Weight::from_parts(0, 3507))
// Standard Error: 5_519
.saturating_add(Weight::from_parts(349_033, 0).saturating_mul(r.into()))
// Standard Error: 70_710
.saturating_add(Weight::from_parts(400_000, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(4))
}
@@ -122,15 +121,16 @@ impl<T: frame_system::Config> pallet_ranked_collective::WeightInfo for WeightInf
/// Storage: `FellowshipCollective::IndexToId` (r:1 w:1)
/// 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: `632 + r * (72 ±0)`
// Measured: `608 + r * (71 ±0)`
// Estimated: `3519`
// Minimum execution time: 28_092_000 picoseconds.
Weight::from_parts(30_800_398, 0)
// Minimum execution time: 35_000_000 picoseconds.
Weight::from_parts(37_500_000, 0)
.saturating_add(Weight::from_parts(0, 3519))
// Standard Error: 17_223
.saturating_add(Weight::from_parts(615_330, 0).saturating_mul(r.into()))
// Standard Error: 150_000
.saturating_add(Weight::from_parts(350_000, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
@@ -144,10 +144,10 @@ impl<T: frame_system::Config> pallet_ranked_collective::WeightInfo for WeightInf
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn vote() -> Weight {
// Proof Size summary in bytes:
// Measured: `666`
// Measured: `700`
// Estimated: `317568`
// Minimum execution time: 46_255_000 picoseconds.
Weight::from_parts(47_590_000, 0)
// Minimum execution time: 57_000_000 picoseconds.
Weight::from_parts(57_000_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
@@ -159,18 +159,19 @@ impl<T: frame_system::Config> pallet_ranked_collective::WeightInfo for WeightInf
/// 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: `500 + n * (50 ±0)`
// Estimated: `4365 + n * (2540 ±0)`
// Minimum execution time: 14_975_000 picoseconds.
Weight::from_parts(17_408_362, 0)
// Measured: `343 + n * (52 ±0)`
// Estimated: `4365 + n * (2550 ±0)`
// Minimum execution time: 18_000_000 picoseconds.
Weight::from_parts(19_000_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
// Standard Error: 3_134
.saturating_add(Weight::from_parts(1_222_024, 0).saturating_mul(n.into()))
// Standard Error: 25_000
.saturating_add(Weight::from_parts(1_395_000, 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()))
.saturating_add(Weight::from_parts(0, 2550).saturating_mul(n.into()))
}
}
@@ -0,0 +1,536 @@
// Copyright Parity Technologies (UK) Ltd.
// This file is part of Cumulus.
// Cumulus is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Cumulus is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_referenda`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-08-11, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-polkadot-dev")`, DB CACHE: 1024
// Executed Command:
// target/release/polkadot-parachain
// benchmark
// pallet
// --chain=collectives-polkadot-dev
// --wasm-execution=compiled
// --pallet=pallet_referenda
// --extrinsic=*
// --steps=2
// --repeat=2
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_referenda`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_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: `255`
// Estimated: `159279`
// Minimum execution time: 32_000_000 picoseconds.
Weight::from_parts(34_000_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`)
fn place_decision_deposit_preparing() -> Weight {
// Proof Size summary in bytes:
// Measured: `366`
// Estimated: `317568`
// Minimum execution time: 63_000_000 picoseconds.
Weight::from_parts(68_000_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.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: `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`)
fn place_decision_deposit_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `1165`
// Estimated: `159279`
// Minimum execution time: 97_000_000 picoseconds.
Weight::from_parts(123_000_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: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`)
fn place_decision_deposit_not_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `1173`
// Estimated: `159279`
// Minimum execution time: 104_000_000 picoseconds.
Weight::from_parts(111_000_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:2 w:2)
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn place_decision_deposit_passing() -> Weight {
// Proof Size summary in bytes:
// Measured: `702`
// Estimated: `317568`
// Minimum execution time: 140_000_000 picoseconds.
Weight::from_parts(150_000_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: `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`)
fn place_decision_deposit_failing() -> Weight {
// Proof Size summary in bytes:
// Measured: `601`
// Estimated: `317568`
// Minimum execution time: 81_000_000 picoseconds.
Weight::from_parts(82_000_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`)
fn refund_decision_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `317`
// Estimated: `4365`
// Minimum execution time: 38_000_000 picoseconds.
Weight::from_parts(38_000_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: 17_000_000 picoseconds.
Weight::from_parts(18_000_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`)
fn cancel() -> Weight {
// Proof Size summary in bytes:
// Measured: `311`
// Estimated: `317568`
// Minimum execution time: 44_000_000 picoseconds.
Weight::from_parts(45_000_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.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: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AmbassadorReferenda::MetadataOf` (r:1 w:0)
/// Proof: `AmbassadorReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn kill() -> Weight {
// Proof Size summary in bytes:
// Measured: `626`
// Estimated: `317568`
// Minimum execution time: 183_000_000 picoseconds.
Weight::from_parts(187_000_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(11))
.saturating_add(T::DbWeight::get().writes(6))
}
/// 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: 12_000_000 picoseconds.
Weight::from_parts(12_000_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: `1412`
// Estimated: `159279`
// Minimum execution time: 88_000_000 picoseconds.
Weight::from_parts(97_000_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: `1412`
// Estimated: `159279`
// Minimum execution time: 87_000_000 picoseconds.
Weight::from_parts(92_000_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_000_000 picoseconds.
Weight::from_parts(46_000_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: 39_000_000 picoseconds.
Weight::from_parts(43_000_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: 48_000_000 picoseconds.
Weight::from_parts(50_000_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: 42_000_000 picoseconds.
Weight::from_parts(48_000_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: `263`
// Estimated: `159279`
// Minimum execution time: 28_000_000 picoseconds.
Weight::from_parts(30_000_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: `311`
// Estimated: `159279`
// Minimum execution time: 26_000_000 picoseconds.
Weight::from_parts(28_000_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: 19_000_000 picoseconds.
Weight::from_parts(20_000_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: `546`
// Estimated: `159279`
// Minimum execution time: 42_000_000 picoseconds.
Weight::from_parts(46_000_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: `647`
// Estimated: `159279`
// Minimum execution time: 87_000_000 picoseconds.
Weight::from_parts(93_000_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: `700`
// Estimated: `159279`
// Minimum execution time: 100_000_000 picoseconds.
Weight::from_parts(120_000_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: `683`
// Estimated: `159279`
// Minimum execution time: 90_000_000 picoseconds.
Weight::from_parts(100_000_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: `700`
// Estimated: `159279`
// Minimum execution time: 77_000_000 picoseconds.
Weight::from_parts(82_000_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: `704`
// Estimated: `159279`
// Minimum execution time: 68_000_000 picoseconds.
Weight::from_parts(77_000_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: `704`
// Estimated: `317568`
// Minimum execution time: 99_000_000 picoseconds.
Weight::from_parts(104_000_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: `700`
// Estimated: `159279`
// Minimum execution time: 87_000_000 picoseconds.
Weight::from_parts(100_000_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: `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: `419`
// Estimated: `4365`
// Minimum execution time: 23_000_000 picoseconds.
Weight::from_parts(25_000_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::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: 20_000_000 picoseconds.
Weight::from_parts(21_000_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
}
@@ -17,24 +17,21 @@
//! Autogenerated weights for `pallet_referenda`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-08-11, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-polkadot-dev")`, DB CACHE: 1024
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-polkadot-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/production/polkadot-parachain
// target/release/polkadot-parachain
// benchmark
// pallet
// --chain=collectives-polkadot-dev
// --wasm-execution=compiled
// --pallet=pallet_referenda
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --extrinsic=*
// --steps=50
// --repeat=20
// --steps=2
// --repeat=2
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights/
@@ -60,10 +57,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// Proof: `FellowshipReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(900), added: 3375, mode: `MaxEncodedLen`)
fn submit() -> Weight {
// Proof Size summary in bytes:
// Measured: `355`
// Measured: `389`
// Estimated: `159279`
// Minimum execution time: 29_271_000 picoseconds.
Weight::from_parts(30_285_000, 0)
// Minimum execution time: 34_000_000 picoseconds.
Weight::from_parts(36_000_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
@@ -74,10 +71,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn place_decision_deposit_preparing() -> Weight {
// Proof Size summary in bytes:
// Measured: `366`
// Measured: `400`
// Estimated: `317568`
// Minimum execution time: 52_128_000 picoseconds.
Weight::from_parts(53_504_000, 0)
// Minimum execution time: 64_000_000 picoseconds.
Weight::from_parts(67_000_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
@@ -92,10 +89,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn place_decision_deposit_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `2004`
// Measured: `2038`
// Estimated: `159279`
// Minimum execution time: 110_018_000 picoseconds.
Weight::from_parts(114_369_000, 0)
// Minimum execution time: 99_000_000 picoseconds.
Weight::from_parts(109_000_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
@@ -110,10 +107,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn place_decision_deposit_not_queued() -> Weight {
// Proof Size summary in bytes:
// Measured: `2045`
// Measured: `2079`
// Estimated: `159279`
// Minimum execution time: 110_231_000 picoseconds.
Weight::from_parts(114_517_000, 0)
// Minimum execution time: 101_000_000 picoseconds.
Weight::from_parts(111_000_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
@@ -128,10 +125,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn place_decision_deposit_passing() -> Weight {
// Proof Size summary in bytes:
// Measured: `802`
// Measured: `836`
// Estimated: `317568`
// Minimum execution time: 195_619_000 picoseconds.
Weight::from_parts(207_157_000, 0)
// Minimum execution time: 135_000_000 picoseconds.
Weight::from_parts(153_000_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
@@ -146,10 +143,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn place_decision_deposit_failing() -> Weight {
// Proof Size summary in bytes:
// Measured: `701`
// Measured: `735`
// Estimated: `317568`
// Minimum execution time: 64_020_000 picoseconds.
Weight::from_parts(65_463_000, 0)
// Minimum execution time: 78_000_000 picoseconds.
Weight::from_parts(82_000_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
@@ -158,10 +155,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `317`
// Measured: `351`
// Estimated: `4365`
// Minimum execution time: 30_701_000 picoseconds.
Weight::from_parts(31_528_000, 0)
// Minimum execution time: 38_000_000 picoseconds.
Weight::from_parts(39_000_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -170,10 +167,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `167`
// Measured: `201`
// Estimated: `4365`
// Minimum execution time: 15_173_000 picoseconds.
Weight::from_parts(15_787_000, 0)
// Minimum execution time: 18_000_000 picoseconds.
Weight::from_parts(19_000_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -184,10 +181,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(155814), added: 158289, mode: `MaxEncodedLen`)
fn cancel() -> Weight {
// Proof Size summary in bytes:
// Measured: `311`
// Measured: `345`
// Estimated: `317568`
// Minimum execution time: 37_886_000 picoseconds.
Weight::from_parts(38_679_000, 0)
// Minimum execution time: 45_000_000 picoseconds.
Weight::from_parts(46_000_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
@@ -214,10 +211,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// Proof: `FellowshipReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn kill() -> Weight {
// Proof Size summary in bytes:
// Measured: `517`
// Measured: `587`
// Estimated: `317568`
// Minimum execution time: 152_111_000 picoseconds.
Weight::from_parts(155_738_000, 0)
// Minimum execution time: 185_000_000 picoseconds.
Weight::from_parts(196_000_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(11))
.saturating_add(T::DbWeight::get().writes(6))
@@ -228,10 +225,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `140`
// Measured: `174`
// Estimated: `4277`
// Minimum execution time: 10_712_000 picoseconds.
Weight::from_parts(10_976_000, 0)
// Minimum execution time: 12_000_000 picoseconds.
Weight::from_parts(15_000_000, 0)
.saturating_add(Weight::from_parts(0, 4277))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
@@ -246,10 +243,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `2418`
// Measured: `2452`
// Estimated: `159279`
// Minimum execution time: 97_671_000 picoseconds.
Weight::from_parts(104_911_000, 0)
// Minimum execution time: 82_000_000 picoseconds.
Weight::from_parts(90_000_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
@@ -264,10 +261,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `2418`
// Measured: `2452`
// Estimated: `159279`
// Minimum execution time: 104_019_000 picoseconds.
Weight::from_parts(108_208_000, 0)
// Minimum execution time: 91_000_000 picoseconds.
Weight::from_parts(99_000_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
@@ -278,10 +275,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `1807`
// Measured: `1841`
// Estimated: `4365`
// Minimum execution time: 50_199_000 picoseconds.
Weight::from_parts(54_350_000, 0)
// Minimum execution time: 41_000_000 picoseconds.
Weight::from_parts(44_000_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
@@ -292,10 +289,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `1774`
// Measured: `1808`
// Estimated: `4365`
// Minimum execution time: 52_459_000 picoseconds.
Weight::from_parts(54_382_000, 0)
// Minimum execution time: 46_000_000 picoseconds.
Weight::from_parts(55_000_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
@@ -308,10 +305,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `1790`
// Measured: `1824`
// Estimated: `4365`
// Minimum execution time: 57_810_000 picoseconds.
Weight::from_parts(63_690_000, 0)
// Minimum execution time: 49_000_000 picoseconds.
Weight::from_parts(53_000_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
@@ -324,10 +321,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `1831`
// Measured: `1865`
// Estimated: `4365`
// Minimum execution time: 56_778_000 picoseconds.
Weight::from_parts(59_556_000, 0)
// Minimum execution time: 51_000_000 picoseconds.
Weight::from_parts(54_000_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
@@ -338,10 +335,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `263`
// Measured: `297`
// Estimated: `159279`
// Minimum execution time: 24_377_000 picoseconds.
Weight::from_parts(27_031_000, 0)
// Minimum execution time: 28_000_000 picoseconds.
Weight::from_parts(30_000_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
@@ -352,10 +349,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `311`
// Measured: `345`
// Estimated: `159279`
// Minimum execution time: 24_717_000 picoseconds.
Weight::from_parts(25_578_000, 0)
// Minimum execution time: 28_000_000 picoseconds.
Weight::from_parts(29_000_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
@@ -364,10 +361,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `208`
// Measured: `242`
// Estimated: `4365`
// Minimum execution time: 17_280_000 picoseconds.
Weight::from_parts(17_845_000, 0)
// Minimum execution time: 20_000_000 picoseconds.
Weight::from_parts(21_000_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -382,10 +379,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `646`
// Measured: `680`
// Estimated: `159279`
// Minimum execution time: 36_996_000 picoseconds.
Weight::from_parts(37_970_000, 0)
// Minimum execution time: 42_000_000 picoseconds.
Weight::from_parts(47_000_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
@@ -400,10 +397,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `747`
// Measured: `781`
// Estimated: `159279`
// Minimum execution time: 91_681_000 picoseconds.
Weight::from_parts(98_640_000, 0)
// Minimum execution time: 90_000_000 picoseconds.
Weight::from_parts(95_000_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
@@ -416,10 +413,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `800`
// Measured: `834`
// Estimated: `159279`
// Minimum execution time: 149_940_000 picoseconds.
Weight::from_parts(167_561_000, 0)
// Minimum execution time: 84_000_000 picoseconds.
Weight::from_parts(93_000_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
@@ -432,10 +429,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `783`
// Measured: `817`
// Estimated: `159279`
// Minimum execution time: 157_443_000 picoseconds.
Weight::from_parts(168_023_000, 0)
// Minimum execution time: 88_000_000 picoseconds.
Weight::from_parts(98_000_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
@@ -448,10 +445,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `800`
// Measured: `834`
// Estimated: `159279`
// Minimum execution time: 155_539_000 picoseconds.
Weight::from_parts(161_877_000, 0)
// Minimum execution time: 81_000_000 picoseconds.
Weight::from_parts(93_000_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
@@ -464,10 +461,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `804`
// Measured: `838`
// Estimated: `159279`
// Minimum execution time: 82_000_000 picoseconds.
Weight::from_parts(87_101_000, 0)
// Minimum execution time: 74_000_000 picoseconds.
Weight::from_parts(77_000_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
@@ -482,10 +479,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `804`
// Measured: `838`
// Estimated: `317568`
// Minimum execution time: 154_590_000 picoseconds.
Weight::from_parts(186_418_000, 0)
// Minimum execution time: 105_000_000 picoseconds.
Weight::from_parts(123_000_000, 0)
.saturating_add(Weight::from_parts(0, 317568))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
@@ -498,10 +495,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `800`
// Measured: `834`
// Estimated: `159279`
// Minimum execution time: 149_822_000 picoseconds.
Weight::from_parts(164_866_000, 0)
// Minimum execution time: 90_000_000 picoseconds.
Weight::from_parts(100_000_000, 0)
.saturating_add(Weight::from_parts(0, 159279))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
@@ -514,10 +511,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// 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: `386`
// Measured: `453`
// Estimated: `4365`
// Minimum execution time: 21_413_000 picoseconds.
Weight::from_parts(21_938_000, 0)
// Minimum execution time: 24_000_000 picoseconds.
Weight::from_parts(24_000_000, 0)
.saturating_add(Weight::from_parts(0, 4365))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
@@ -528,10 +525,10 @@ impl<T: frame_system::Config> pallet_referenda::WeightInfo for WeightInfo<T> {
/// Proof: `FellowshipReferenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn clear_metadata() -> Weight {
// Proof Size summary in bytes:
// Measured: `285`
// Measured: `319`
// Estimated: `4365`
// Minimum execution time: 18_927_000 picoseconds.
Weight::from_parts(19_423_000, 0)
// Minimum execution time: 21_000_000 picoseconds.
Weight::from_parts(23_000_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,190 @@
// Copyright Parity Technologies (UK) Ltd.
// This file is part of Cumulus.
// Cumulus is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Cumulus is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_salary`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-08-11, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-polkadot-dev")`, DB CACHE: 1024
// Executed Command:
// target/release/polkadot-parachain
// benchmark
// pallet
// --chain=collectives-polkadot-dev
// --wasm-execution=compiled
// --pallet=pallet_salary
// --extrinsic=*
// --steps=2
// --repeat=2
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_salary`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_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: `109`
// Estimated: `1541`
// Minimum execution time: 12_000_000 picoseconds.
Weight::from_parts(14_000_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: `191`
// Estimated: `1541`
// Minimum execution time: 15_000_000 picoseconds.
Weight::from_parts(16_000_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: `400`
// Estimated: `3551`
// Minimum execution time: 23_000_000 picoseconds.
Weight::from_parts(23_000_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: `467`
// Estimated: `3551`
// Minimum execution time: 27_000_000 picoseconds.
Weight::from_parts(28_000_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: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1)
/// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `ParachainSystem::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`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn payout() -> Weight {
// Proof Size summary in bytes:
// Measured: `879`
// Estimated: `4344`
// Minimum execution time: 68_000_000 picoseconds.
Weight::from_parts(72_000_000, 0)
.saturating_add(Weight::from_parts(0, 4344))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(7))
}
/// 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: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1)
/// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `ParachainSystem::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`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn payout_other() -> Weight {
// Proof Size summary in bytes:
// Measured: `879`
// Estimated: `4344`
// Minimum execution time: 69_000_000 picoseconds.
Weight::from_parts(70_000_000, 0)
.saturating_add(Weight::from_parts(0, 4344))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(7))
}
/// 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: `PolkadotXcm::Queries` (r:1 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn check_payment() -> Weight {
// Proof Size summary in bytes:
// Measured: `479`
// Estimated: `3944`
// Minimum execution time: 27_000_000 picoseconds.
Weight::from_parts(28_000_000, 0)
.saturating_add(Weight::from_parts(0, 3944))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
}
@@ -17,24 +17,21 @@
//! Autogenerated weights for `pallet_salary`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-08-11, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-polkadot-dev")`, DB CACHE: 1024
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-polkadot-dev")`, DB CACHE: 1024
// Executed Command:
// ./target/production/polkadot-parachain
// target/release/polkadot-parachain
// benchmark
// pallet
// --chain=collectives-polkadot-dev
// --wasm-execution=compiled
// --pallet=pallet_salary
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --extrinsic=*
// --steps=50
// --repeat=20
// --steps=2
// --repeat=2
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights/
@@ -56,8 +53,8 @@ impl<T: frame_system::Config> pallet_salary::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `1541`
// Minimum execution time: 10_579_000 picoseconds.
Weight::from_parts(10_898_000, 0)
// Minimum execution time: 13_000_000 picoseconds.
Weight::from_parts(17_000_000, 0)
.saturating_add(Weight::from_parts(0, 1541))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -68,8 +65,8 @@ impl<T: frame_system::Config> pallet_salary::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `224`
// Estimated: `1541`
// Minimum execution time: 12_723_000 picoseconds.
Weight::from_parts(13_221_000, 0)
// Minimum execution time: 15_000_000 picoseconds.
Weight::from_parts(18_000_000, 0)
.saturating_add(Weight::from_parts(0, 1541))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -84,8 +81,8 @@ impl<T: frame_system::Config> pallet_salary::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `395`
// Estimated: `3551`
// Minimum execution time: 18_522_000 picoseconds.
Weight::from_parts(19_120_000, 0)
// Minimum execution time: 22_000_000 picoseconds.
Weight::from_parts(25_000_000, 0)
.saturating_add(Weight::from_parts(0, 3551))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
@@ -100,8 +97,8 @@ impl<T: frame_system::Config> pallet_salary::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `462`
// Estimated: `3551`
// Minimum execution time: 22_270_000 picoseconds.
Weight::from_parts(23_325_000, 0)
// Minimum execution time: 26_000_000 picoseconds.
Weight::from_parts(29_000_000, 0)
.saturating_add(Weight::from_parts(0, 3551))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
@@ -132,11 +129,11 @@ impl<T: frame_system::Config> pallet_salary::WeightInfo for WeightInfo<T> {
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn payout() -> Weight {
// Proof Size summary in bytes:
// Measured: `703`
// Estimated: `4168`
// Minimum execution time: 54_436_000 picoseconds.
Weight::from_parts(56_347_000, 0)
.saturating_add(Weight::from_parts(0, 4168))
// Measured: `774`
// Estimated: `4239`
// Minimum execution time: 67_000_000 picoseconds.
Weight::from_parts(74_000_000, 0)
.saturating_add(Weight::from_parts(0, 4239))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(7))
}
@@ -166,11 +163,11 @@ impl<T: frame_system::Config> pallet_salary::WeightInfo for WeightInfo<T> {
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn payout_other() -> Weight {
// Proof Size summary in bytes:
// Measured: `703`
// Estimated: `4168`
// Minimum execution time: 54_140_000 picoseconds.
Weight::from_parts(56_312_000, 0)
.saturating_add(Weight::from_parts(0, 4168))
// Measured: `774`
// Estimated: `4239`
// Minimum execution time: 66_000_000 picoseconds.
Weight::from_parts(71_000_000, 0)
.saturating_add(Weight::from_parts(0, 4239))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(7))
}
@@ -182,11 +179,11 @@ impl<T: frame_system::Config> pallet_salary::WeightInfo for WeightInfo<T> {
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn check_payment() -> Weight {
// Proof Size summary in bytes:
// Measured: `478`
// Estimated: `3943`
// Minimum execution time: 24_650_000 picoseconds.
Weight::from_parts(25_242_000, 0)
.saturating_add(Weight::from_parts(0, 3943))
// Measured: `512`
// Estimated: `3977`
// Minimum execution time: 26_000_000 picoseconds.
Weight::from_parts(27_000_000, 0)
.saturating_add(Weight::from_parts(0, 3977))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
@@ -26,15 +26,16 @@ use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough;
use parachains_common::{impls::ToStakingPot, xcm_config::ConcreteNativeAssetFrom};
use polkadot_parachain_primitives::primitives::Sibling;
use polkadot_runtime_constants::xcm::body::FELLOWSHIP_ADMIN_INDEX;
use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds, IsConcrete,
OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
UsingComponents, WithComputedOrigin, WithUniqueTopic,
LocatableAssetId, OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset,
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
@@ -46,6 +47,17 @@ parameter_types! {
X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into()));
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
pub const GovernanceLocation: MultiLocation = MultiLocation::parent();
pub const FellowshipAdminBodyId: BodyId = BodyId::Index(FELLOWSHIP_ADMIN_INDEX);
pub AssetHub: MultiLocation = (Parent, Parachain(1000)).into();
pub AssetHubUsdtId: AssetId = (PalletInstance(50), GeneralIndex(1984)).into();
pub UsdtAssetHub: LocatableAssetId = LocatableAssetId {
location: AssetHub::get(),
asset_id: AssetHubUsdtId::get(),
};
pub DotAssetHub: LocatableAssetId = LocatableAssetId {
location: AssetHub::get(),
asset_id: DotLocation::get().into(),
};
}
/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used