From 6dcab245e7216f13c50a4b8b9f5926e21db32134 Mon Sep 17 00:00:00 2001 From: William Freudenberger Date: Wed, 17 Apr 2024 11:52:02 +0200 Subject: [PATCH] feat: add OpenGov to Centrifuge chain fix: centrifuge toml chore: minor centrifuge chain improvements refactor: Centrifuge OpenGov centrifuge: finalize opengov centrifuge: fix cargo tml --- Cargo.lock | 5 + Cargo.toml | 3 + libs/primitives/Cargo.toml | 4 + node/src/chain_spec.rs | 12 +- runtime/centrifuge/Cargo.toml | 23 +- runtime/centrifuge/src/lib.rs | 164 +++++- runtime/centrifuge/src/tracks.rs | 325 ++++++++++++ runtime/centrifuge/src/weights/mod.rs | 7 +- .../src/weights/pallet_collective.rs | 287 ----------- .../src/weights/pallet_collective_council.rs | 287 +++++++++++ .../pallet_collective_technical_fellowship.rs | 287 +++++++++++ .../src/weights/pallet_conviction_voting.rs | 176 +++++++ .../src/weights/pallet_membership.rs | 188 +++++++ .../src/weights/pallet_referenda.rs | 480 ++++++++++++++++++ .../src/weights/pallet_whitelist.rs | 99 ++++ 15 files changed, 2024 insertions(+), 323 deletions(-) create mode 100644 runtime/centrifuge/src/tracks.rs delete mode 100644 runtime/centrifuge/src/weights/pallet_collective.rs create mode 100644 runtime/centrifuge/src/weights/pallet_collective_council.rs create mode 100644 runtime/centrifuge/src/weights/pallet_collective_technical_fellowship.rs create mode 100644 runtime/centrifuge/src/weights/pallet_conviction_voting.rs create mode 100644 runtime/centrifuge/src/weights/pallet_membership.rs create mode 100644 runtime/centrifuge/src/weights/pallet_referenda.rs create mode 100644 runtime/centrifuge/src/weights/pallet_whitelist.rs diff --git a/Cargo.lock b/Cargo.lock index 4e5454450b..f62ad17f80 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1445,6 +1445,7 @@ dependencies = [ "pallet-collator-allowlist", "pallet-collator-selection", "pallet-collective", + "pallet-conviction-voting", "pallet-democracy", "pallet-elections-phragmen", "pallet-ethereum", @@ -1472,6 +1473,7 @@ dependencies = [ "pallet-pool-system", "pallet-preimage", "pallet-proxy", + "pallet-referenda", "pallet-remarks", "pallet-restricted-tokens", "pallet-restricted-xtokens", @@ -1489,6 +1491,7 @@ dependencies = [ "pallet-uniques", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "pallet-xcm", "pallet-xcm-transactor", "parachain-info", @@ -1499,6 +1502,7 @@ dependencies = [ "scale-info", "serde", "sp-api", + "sp-arithmetic", "sp-block-builder", "sp-consensus-aura", "sp-core", @@ -1571,6 +1575,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-collective", + "pallet-membership", "parity-scale-codec 3.6.9", "scale-info", "serde", diff --git a/Cargo.toml b/Cargo.toml index bd12d51f49..8f658d695e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -185,11 +185,13 @@ pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", default-feat pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-conviction-voting = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-elections-phragmen = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-identity = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-referenda = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } @@ -202,6 +204,7 @@ pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", default- pallet-uniques = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-vesting = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +pallet-whitelist = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } diff --git a/libs/primitives/Cargo.toml b/libs/primitives/Cargo.toml index bbd0a006f2..f8c83f3c8d 100644 --- a/libs/primitives/Cargo.toml +++ b/libs/primitives/Cargo.toml @@ -29,6 +29,7 @@ sp-std = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } pallet-collective = { workspace = true } +pallet-membership = { workspace = true } # cumulus primitives dependencies cumulus-primitives-core = { workspace = true } @@ -45,6 +46,7 @@ std = [ "frame-support/std", "frame-system/std", "pallet-collective/std", + "pallet-membership/std", "scale-info/std", "serde/std", "sp-arithmetic/std", @@ -60,6 +62,7 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-collective/runtime-benchmarks", + "pallet-membership/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "staging-xcm-executor/runtime-benchmarks", ] @@ -67,5 +70,6 @@ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "pallet-collective/try-runtime", + "pallet-membership/try-runtime", "sp-runtime/try-runtime", ] diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index 014b3fb5ed..d50a8fcedf 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -43,7 +43,7 @@ use serde::{Deserialize, Serialize}; use sp_core::{crypto::UncheckedInto, sr25519, Encode, Pair, Public, H160}; use sp_runtime::{ traits::{IdentifyAccount, Verify}, - FixedPointNumber, + BoundedVec, FixedPointNumber, }; use staging_xcm::{ latest::{MultiLocation, NetworkId}, @@ -373,7 +373,7 @@ fn centrifuge_genesis( orml_tokens: centrifuge_runtime::OrmlTokensConfig { balances: vec![] }, elections: centrifuge_runtime::ElectionsConfig { members: vec![] }, council: centrifuge_runtime::CouncilConfig { - members: council_members, + members: council_members.clone(), phantom: Default::default(), }, fees: centrifuge_runtime::FeesConfig { @@ -468,6 +468,14 @@ fn centrifuge_genesis( safe_xcm_version: Some(SAFE_XCM_VERSION), ..Default::default() }, + technical_committee: centrifuge_runtime::TechnicalCommitteeConfig { + members: council_members.clone(), + phantom: Default::default(), + }, + technical_committee_membership: centrifuge_runtime::TechnicalCommitteeMembershipConfig { + members: BoundedVec::truncate_from(council_members), + phantom: Default::default(), + }, } } diff --git a/runtime/centrifuge/Cargo.toml b/runtime/centrifuge/Cargo.toml index bc5bceac63..b33392c2e9 100644 --- a/runtime/centrifuge/Cargo.toml +++ b/runtime/centrifuge/Cargo.toml @@ -20,6 +20,7 @@ serde = { workspace = true, optional = true } static_assertions = { workspace = true } sp-api = { workspace = true } +sp-arithmetic = { workspace = true } sp-block-builder = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } @@ -90,6 +91,7 @@ pallet-bridge = { workspace = true } pallet-collator-allowlist = { workspace = true } pallet-collator-selection = { workspace = true } pallet-collective = { workspace = true } +pallet-conviction-voting = { workspace = true } pallet-democracy = { workspace = true } pallet-elections-phragmen = { workspace = true } pallet-ethereum = { workspace = true } @@ -117,6 +119,7 @@ pallet-pool-registry = { workspace = true } pallet-pool-system = { workspace = true } pallet-preimage = { workspace = true } pallet-proxy = { workspace = true } +pallet-referenda = { workspace = true } pallet-remarks = { workspace = true } pallet-restricted-tokens = { workspace = true } pallet-restricted-xtokens = { workspace = true } @@ -133,6 +136,7 @@ pallet-treasury = { workspace = true } pallet-uniques = { workspace = true } pallet-utility = { workspace = true } pallet-vesting = { workspace = true } +pallet-whitelist = { workspace = true } pallet-xcm = { workspace = true } pallet-xcm-transactor = { workspace = true } parachain-info = { workspace = true } @@ -150,9 +154,9 @@ std = [ "scale-info/std", "serde/std", "log/std", - # Substrate related "sp-api/std", + "sp-arithmetic/std", "sp-runtime/std", "sp-block-builder/std", "sp-consensus-aura/std", @@ -187,14 +191,12 @@ std = [ "pallet-transaction-payment-rpc-runtime-api/std", "polkadot-runtime-common/std", "polkadot-parachain-primitives/std", - # Locals "cfg-primitives/std", "cfg-traits/std", "cfg-types/std", "runtime-common/std", "liquidity-pools-gateway-routers/std", - # Pallet list "axelar-gateway-precompile/std", "chainbridge/std", @@ -217,6 +219,7 @@ std = [ "pallet-collator-allowlist/std", "pallet-collator-selection/std", "pallet-collective/std", + "pallet-conviction-voting/std", "pallet-democracy/std", "pallet-elections-phragmen/std", "pallet-ethereum/std", @@ -244,6 +247,7 @@ std = [ "pallet-pool-system/std", "pallet-preimage/std", "pallet-proxy/std", + "pallet-referenda/std", "pallet-remarks/std", "pallet-restricted-tokens/std", "pallet-restricted-xtokens/std", @@ -260,6 +264,7 @@ std = [ "pallet-uniques/std", "pallet-utility/std", "pallet-vesting/std", + "pallet-whitelist/std", "pallet-xcm/std", "pallet-xcm-transactor/std", "parachain-info/std", @@ -270,7 +275,6 @@ runtime-benchmarks = [ "frame-system-benchmarking/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", - # Substrate related "sp-runtime/runtime-benchmarks", "sp-staking/runtime-benchmarks", @@ -281,14 +285,12 @@ runtime-benchmarks = [ "xcm-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", - # Locals "cfg-primitives/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-types/runtime-benchmarks", "runtime-common/runtime-benchmarks", "liquidity-pools-gateway-routers/runtime-benchmarks", - # Pallet list "axelar-gateway-precompile/runtime-benchmarks", "chainbridge/runtime-benchmarks", @@ -304,6 +306,7 @@ runtime-benchmarks = [ "pallet-collator-allowlist/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", "pallet-collective/runtime-benchmarks", + "pallet-conviction-voting/runtime-benchmarks", "pallet-democracy/runtime-benchmarks", "pallet-elections-phragmen/runtime-benchmarks", "pallet-ethereum/runtime-benchmarks", @@ -330,6 +333,7 @@ runtime-benchmarks = [ "pallet-pool-system/runtime-benchmarks", "pallet-preimage/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", "pallet-remarks/runtime-benchmarks", "pallet-restricted-tokens/runtime-benchmarks", "pallet-restricted-xtokens/runtime-benchmarks", @@ -344,6 +348,7 @@ runtime-benchmarks = [ "pallet-uniques/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-vesting/runtime-benchmarks", + "pallet-whitelist/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "pallet-xcm-transactor/runtime-benchmarks", ] @@ -351,7 +356,6 @@ runtime-benchmarks = [ try-runtime = [ # Enabling optional "frame-try-runtime/try-runtime", - # Substrate related "sp-runtime/try-runtime", "frame-support/try-runtime", @@ -359,14 +363,12 @@ try-runtime = [ "frame-executive/try-runtime", "fp-self-contained/try-runtime", "polkadot-runtime-common/try-runtime", - # Locals "cfg-primitives/try-runtime", "cfg-traits/try-runtime", "cfg-types/try-runtime", "runtime-common/try-runtime", "liquidity-pools-gateway-routers/try-runtime", - # Pallet list "axelar-gateway-precompile/try-runtime", "chainbridge/try-runtime", @@ -389,6 +391,7 @@ try-runtime = [ "pallet-collator-allowlist/try-runtime", "pallet-collator-selection/try-runtime", "pallet-collective/try-runtime", + "pallet-conviction-voting/try-runtime", "pallet-democracy/try-runtime", "pallet-elections-phragmen/try-runtime", "pallet-ethereum/try-runtime", @@ -416,6 +419,7 @@ try-runtime = [ "pallet-pool-system/try-runtime", "pallet-preimage/try-runtime", "pallet-proxy/try-runtime", + "pallet-referenda/try-runtime", "pallet-remarks/try-runtime", "pallet-restricted-tokens/try-runtime", "pallet-restricted-xtokens/try-runtime", @@ -432,6 +436,7 @@ try-runtime = [ "pallet-uniques/try-runtime", "pallet-utility/try-runtime", "pallet-vesting/try-runtime", + "pallet-whitelist/try-runtime", "pallet-xcm/try-runtime", "pallet-xcm-transactor/try-runtime", "parachain-info/try-runtime", diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index 9b2bc2b0b2..66797ed1f3 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -36,12 +36,17 @@ use cfg_types::{ fee_keys::{Fee, FeeKey}, fixed_point::{Quantity, Rate, Ratio}, investments::InvestmentPortfolio, + locations::Location, oracles::OracleKey, permissions::{ PermissionRoles, PermissionScope, PermissionedCurrencyRole, PoolRole, Role, UNION, }, + pools::PoolNav, time::TimeProvider, - tokens::{AssetStringLimit, CurrencyId, CustomMetadata, StakingCurrency, TrancheCurrency}, + tokens::{ + AssetStringLimit, CurrencyId, CustomMetadata, FilterCurrency, LocalAssetId, + StakingCurrency, TrancheCurrency, + }, }; use cumulus_primitives_core::{MultiAsset, MultiLocation}; use fp_rpc::TransactionStatus; @@ -51,7 +56,7 @@ use frame_support::{ pallet_prelude::{DispatchError, DispatchResult, RuntimeDebug}, parameter_types, traits::{ - AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, Contains, EitherOfDiverse, + AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, Contains, EitherOf, EitherOfDiverse, EqualPrivilegeOnly, Get, InstanceFilter, LockIdentifier, OnFinalize, PalletInfoAccess, UnixTime, WithdrawReasons, }, @@ -63,7 +68,7 @@ use frame_support::{ }; use frame_system::{ limits::{BlockLength, BlockWeights}, - EnsureRoot, EnsureSigned, + EnsureRoot, EnsureSigned, EnsureWithSuccess, }; use orml_traits::currency::MutationHooks; use pallet_anchors::AnchorData; @@ -77,6 +82,7 @@ use pallet_investments::OrderType; use pallet_liquidity_pools::hooks::{ CollectedForeignInvestmentHook, CollectedForeignRedemptionHook, DecreasedForeignInvestOrderHook, }; +pub use pallet_loans::entities::{input::PriceCollectionInput, loans::ActiveLoanInfo}; use pallet_pool_system::{ pool_types::{PoolDetails, ScheduledUpdateDetails}, tranches::{TrancheIndex, TrancheLoc, TrancheSolution}, @@ -98,18 +104,24 @@ use runtime_common::{ }, fees::{DealWithFees, FeeToTreasury, WeightToFee}, gateway, instances, - instances::CouncilCollective, + instances::{CouncilCollective, TechnicalCollective, TechnicalMembership}, liquidity_pools::LiquidityPoolsMessage, oracle::{ Feeder, OracleConverterBridge, OracleRatioProvider, OracleRatioProviderLocalAssetExtension, }, origin::EnsureAccountOrRootOr, - origins::gov::types::{ - AllOfCouncil, EnsureRootOr, HalfOfCouncil, ThreeFourthOfCouncil, TwoThirdOfCouncil, + origins::gov::{ + pallet_custom_origins, + types::{ + AllOfCouncil, DispatchWhitelistedOrigin, EnsureRootOr, HalfOfCouncil, PoolCreateOrigin, + RefCancelOrigin, RefKillerOrigin, ThreeFourthOfCouncil, TreasuryApproveOrigin, + TwoThirdOfCouncil, WhitelistOrigin, + }, + PoolAdmin, Treasurer, }, permissions::PoolAdminCheck, rewards::SingleCurrencyMovement, - transfer_filter::PreLpTransfer, + transfer_filter::{PreLpTransfer, PreNativeTransfer}, xcm::AccountIdToMultiLocation, xcm_transactor, AllowanceDeposit, CurrencyED, HoldId, }; @@ -132,9 +144,10 @@ use sp_version::RuntimeVersion; use staging_xcm_executor::XcmExecutor; use static_assertions::const_assert; -use crate::xcm::*; +use crate::{tracks::TracksInfo, xcm::*}; mod migrations; +mod tracks; mod weights; pub mod xcm; @@ -623,6 +636,11 @@ impl InstanceFilter for ProxyType { RuntimeCall::Council(..) | RuntimeCall::Elections(..) | RuntimeCall::Democracy(..) | + RuntimeCall::ConvictionVoting(..) | + RuntimeCall::Referenda(..) | + RuntimeCall::TechnicalCommittee(..) | + RuntimeCall::TechnicalCommitteeMembership(..) | + RuntimeCall::Whitelist(..) | RuntimeCall::Identity(..) | RuntimeCall::Vesting(pallet_vesting::Call::vest {..}) | RuntimeCall::Vesting(pallet_vesting::Call::vest_other {..}) | @@ -668,6 +686,12 @@ impl InstanceFilter for ProxyType { | RuntimeCall::Council(..) | RuntimeCall::Elections(..) | RuntimeCall::Utility(..) + // OpenGov calls + | RuntimeCall::ConvictionVoting(..) + | RuntimeCall::Referenda(..) + | RuntimeCall::TechnicalCommittee(..) + | RuntimeCall::TechnicalCommitteeMembership(..) + | RuntimeCall::Whitelist(..) ), ProxyType::_Staking => false, ProxyType::NonProxy => { @@ -836,7 +860,7 @@ impl pallet_collective::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeOrigin = RuntimeOrigin; type SetMembersOrigin = EnsureRoot; - type WeightInfo = weights::pallet_collective::WeightInfo; + type WeightInfo = weights::pallet_collective_council::WeightInfo; } parameter_types! { @@ -1027,7 +1051,7 @@ parameter_types! { impl pallet_treasury::Config for Runtime { // either democracy or 50% of council votes - type ApproveOrigin = EnsureRootOr; + type ApproveOrigin = TreasuryApproveOrigin; type Burn = Burn; // we burn and dont handle the unbalance type BurnDestination = (); @@ -1040,10 +1064,10 @@ impl pallet_treasury::Config for Runtime { type ProposalBondMaximum = ProposalBondMaximum; type ProposalBondMinimum = ProposalBondMinimum; // either democracy or more than 50% council votes - type RejectOrigin = EnsureRootOr; + type RejectOrigin = TreasuryApproveOrigin; type RuntimeEvent = RuntimeEvent; type SpendFunds = (); - type SpendOrigin = frame_support::traits::NeverEnsureOrigin; + type SpendOrigin = TreasurySpender; type SpendPeriod = SpendPeriod; type WeightInfo = weights::pallet_treasury::WeightInfo; } @@ -1420,7 +1444,7 @@ impl pallet_pool_registry::Config for Runtime { type ModifyPool = pallet_pool_system::Pallet; type ModifyWriteOffPolicy = pallet_loans::Pallet; type Permission = Permissions; - type PoolCreateOrigin = EnsureRoot; + type PoolCreateOrigin = PoolCreateOrigin; type PoolFeesInspect = PoolFees; type PoolId = PoolId; type RuntimeEvent = RuntimeEvent; @@ -1450,7 +1474,7 @@ impl pallet_pool_system::Config for Runtime { type PalletId = PoolPalletId; type PalletIndex = PoolPalletIndex; type Permission = Permissions; - type PoolCreateOrigin = EnsureRoot; + type PoolCreateOrigin = PoolCreateOrigin; type PoolCurrency = PoolCurrency; type PoolDeposit = PoolDeposit; type PoolFees = PoolFees; @@ -1551,7 +1575,8 @@ impl pallet_pool_fees::Config for Runtime { } impl pallet_permissions::Config for Runtime { - type AdminOrigin = EnsureRootOr; + // TODO: Ensure PoolAdmin can be included as track + type AdminOrigin = EnsureRootOr>; type Editors = Editors; type MaxRolesPerScope = MaxRolesPerPool; type Role = Role; @@ -1713,6 +1738,7 @@ parameter_types! { } impl pallet_keystore::pallet::Config for Runtime { + // TODO: Check whether PoolAdmin can be included type AdminOrigin = EnsureRootOr; type Balance = Balance; type Currency = Balances; @@ -1987,6 +2013,91 @@ impl axelar_gateway_precompile::Config for Runtime { type WeightInfo = (); } +impl pallet_conviction_voting::Config for Runtime { + type Currency = Balances; + type MaxTurnout = + frame_support::traits::tokens::currency::ActiveIssuanceOf; + type MaxVotes = ConstU32<512>; + type Polls = Referenda; + type RuntimeEvent = RuntimeEvent; + type VoteLockingPeriod = EnactmentPeriod; + type WeightInfo = weights::pallet_conviction_voting::WeightInfo; +} + +parameter_types! { + pub const AlarmInterval: BlockNumber = 1; + pub const SubmissionDeposit: Balance = 10 * CFG; + pub const UndecidingTimeout: BlockNumber = 14 * DAYS; +} + +parameter_types! { + pub const MaxBalance: Balance = Balance::max_value(); +} +pub type TreasurySpender = EnsureWithSuccess, AccountId, MaxBalance>; + +impl pallet_custom_origins::Config for Runtime {} + +impl pallet_whitelist::Config for Runtime { + type DispatchWhitelistedOrigin = DispatchWhitelistedOrigin; + type Preimages = Preimage; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_whitelist::WeightInfo; + type WhitelistOrigin = WhitelistOrigin; +} + +impl pallet_referenda::Config for Runtime { + type AlarmInterval = AlarmInterval; + type CancelOrigin = RefCancelOrigin; + type Currency = Balances; + type KillOrigin = RefKillerOrigin; + type MaxQueued = ConstU32<100>; + type Preimages = Preimage; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type Scheduler = Scheduler; + type Slash = Treasury; + type SubmissionDeposit = SubmissionDeposit; + type SubmitOrigin = frame_system::EnsureSigned; + type Tally = pallet_conviction_voting::TallyOf; + type Tracks = TracksInfo; + type UndecidingTimeout = UndecidingTimeout; + type Votes = pallet_conviction_voting::VotesOf; + type WeightInfo = weights::pallet_referenda::WeightInfo; +} + +parameter_types! { + pub const TechnicalMotionDuration: BlockNumber = 3 * DAYS; + pub const TechnicalMaxProposals: u32 = 20; + pub const TechnicalMaxMembers: u32 = 20; +} + +impl pallet_collective::Config for Runtime { + type DefaultVote = pallet_collective::PrimeDefaultVote; + type MaxMembers = TechnicalMaxMembers; + type MaxProposalWeight = MaxProposalWeight; + type MaxProposals = TechnicalMaxProposals; + type MotionDuration = TechnicalMotionDuration; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type SetMembersOrigin = EnsureRoot; + type WeightInfo = weights::pallet_collective_technical_fellowship::WeightInfo; +} + +impl pallet_membership::Config for Runtime { + type AddOrigin = EnsureRoot; + type MaxMembers = TechnicalMaxMembers; + type MembershipChanged = TechnicalCommittee; + type MembershipInitialized = TechnicalCommittee; + type PrimeOrigin = EnsureRoot; + type RemoveOrigin = EnsureRoot; + type ResetOrigin = EnsureRoot; + type RuntimeEvent = RuntimeEvent; + type SwapOrigin = EnsureRoot; + type WeightInfo = weights::pallet_membership::WeightInfo; +} + /// Block type as expected by this runtime. pub type Block = generic::Block; /// A Block signed with a Justification @@ -2058,6 +2169,14 @@ construct_runtime!( Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 69, Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 70, + // OpenGov + ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event} = 72, + Referenda: pallet_referenda::{Pallet, Call, Storage, Event} = 73, + Origins: pallet_custom_origins::{Origin} = 74, + Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event} = 75, + TechnicalCommittee: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 76, + TechnicalCommitteeMembership: pallet_membership::::{Pallet, Call, Storage, Event, Config} = 77, + // our pallets Fees: pallet_fees::{Pallet, Call, Storage, Config, Event} = 90, Anchor: pallet_anchors::{Pallet, Call, Storage} = 91, @@ -2148,14 +2267,6 @@ impl fp_rpc::ConvertTransaction for TransactionConv } } -use cfg_types::{ - locations::Location, - pools::PoolNav, - tokens::{FilterCurrency, LocalAssetId}, -}; -pub use pallet_loans::entities::{input::PriceCollectionInput, loans::ActiveLoanInfo}; -use runtime_common::transfer_filter::PreNativeTransfer; - impl_runtime_apis! { impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { @@ -2712,7 +2823,7 @@ mod benches { [pallet_proxy, Proxy] [pallet_utility, Utility] [pallet_scheduler, Scheduler] - [pallet_collective, Council] + [pallet_collective_council, Council] [pallet_democracy, Democracy] [pallet_elections_phragmen, Elections] [pallet_identity, Identity] @@ -2745,6 +2856,11 @@ mod benches { [pallet_remarks, Remarks] [pallet_pool_fees, PoolFees] [pallet_token_mux, TokenMux] + [pallet_conviction_voting, ConvictionVoting] + [pallet_collective_technical_fellowship, TechnicalCommittee] + [pallet_membership, TechnicalCommitteeMembership] + [pallet_whitelist, Whitelist] + [pallet_referenda, Referenda] ); } diff --git a/runtime/centrifuge/src/tracks.rs b/runtime/centrifuge/src/tracks.rs new file mode 100644 index 0000000000..9c4d82d3b3 --- /dev/null +++ b/runtime/centrifuge/src/tracks.rs @@ -0,0 +1,325 @@ +// Copyright 2024 Centrifuge Foundation (centrifuge.io). +// +// This file is part of the Centrifuge chain project. +// Centrifuge 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 (see http://www.gnu.org/licenses). +// Centrifuge 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. + +//! OpenGov Tracks parametrization +//! +//! Based on [Centrifuge Chain parametrization](https://docs.google.com/document/d/1aPH1sTfAttD3K0f4AoOF2iDb3nH1GHlx5TfIP4Xi4SM). + +use cfg_primitives::{ + Balance, BlockNumber, CFG, DAYS, HOURS, MINUTES, TRACK_INDEX_POOL_ADMIN, + TRACK_INDEX_REF_CANCELLER, TRACK_INDEX_REF_KILLER, TRACK_INDEX_ROOT, TRACK_INDEX_TREASURER, + TRACK_INDEX_WHITELISTED_CALLER, +}; +use pallet_referenda::Curve; +use runtime_common::{to_percent, to_ppm}; + +use crate::RuntimeOrigin; + +const SUP_ROOT: Curve = + Curve::make_reciprocal(1, 14, to_percent(10), to_ppm(8800), to_percent(100)); +const APP_ROOT: Curve = Curve::make_linear(14, 14, to_percent(50), to_percent(100)); + +const SUP_WHITELISTED: Curve = + Curve::make_reciprocal(1, 7, to_ppm(800), to_ppm(100), to_percent(50)); +const APP_WHITELISTED: Curve = Curve::make_linear(7, 7, to_percent(50), to_percent(100)); + +const SUP_POOL_ADMIN: Curve = + Curve::make_reciprocal(1, 7, to_ppm(38500), to_ppm(5900), to_percent(50)); +const APP_POOL_ADMIN: Curve = Curve::make_linear(7, 7, to_percent(70), to_percent(100)); + +const SUP_TREASURER: Curve = Curve::make_linear(25, 28, to_percent(1), to_percent(50)); +const APP_TREASURER: Curve = Curve::make_linear(14, 14, to_percent(70), to_percent(100)); + +const SUP_REF_CANCELLER: Curve = + Curve::make_reciprocal(1, 7, to_ppm(38500), to_ppm(5900), to_percent(50)); +const APP_REF_CANCELLER: Curve = Curve::make_linear(7, 7, to_percent(70), to_percent(100)); + +const SUP_REF_KILLER: Curve = + Curve::make_reciprocal(1, 7, to_ppm(38500), to_ppm(5900), to_percent(50)); +const APP_REF_KILLER: Curve = Curve::make_linear(7, 7, to_percent(70), to_percent(100)); + +const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 6] = [ + ( + TRACK_INDEX_ROOT, + pallet_referenda::TrackInfo { + name: "root", + max_deciding: 2, + decision_deposit: 300_000 * CFG, + prepare_period: 6 * HOURS, + decision_period: 14 * DAYS, + confirm_period: 12 * HOURS, + min_enactment_period: 24 * HOURS, + min_approval: APP_ROOT, + min_support: SUP_ROOT, + }, + ), + ( + TRACK_INDEX_WHITELISTED_CALLER, + pallet_referenda::TrackInfo { + name: "whitelisted_caller", + max_deciding: 20, + decision_deposit: 1_000 * CFG, + prepare_period: 10 * MINUTES, + decision_period: 7 * DAYS, + confirm_period: 10 * MINUTES, + min_enactment_period: 10 * MINUTES, + min_approval: APP_WHITELISTED, + min_support: SUP_WHITELISTED, + }, + ), + ( + TRACK_INDEX_POOL_ADMIN, + pallet_referenda::TrackInfo { + name: "pool_admin", + max_deciding: 5, + decision_deposit: 1_000 * CFG, + prepare_period: 1 * HOURS, + decision_period: 7 * DAYS, + confirm_period: 1 * HOURS, + min_enactment_period: 1 * HOURS, + min_approval: APP_POOL_ADMIN, + min_support: SUP_POOL_ADMIN, + }, + ), + ( + TRACK_INDEX_TREASURER, + pallet_referenda::TrackInfo { + name: "treasurer", + max_deciding: 2, + decision_deposit: 10_000 * CFG, + prepare_period: 6 * HOURS, + decision_period: 14 * DAYS, + confirm_period: 12 * HOURS, + min_enactment_period: 12 * HOURS, + min_approval: APP_TREASURER, + min_support: SUP_TREASURER, + }, + ), + ( + TRACK_INDEX_REF_CANCELLER, + pallet_referenda::TrackInfo { + name: "referendum_canceller", + max_deciding: 20, + decision_deposit: 50_000 * CFG, + prepare_period: 1 * HOURS, + decision_period: 7 * DAYS, + confirm_period: 1 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_REF_CANCELLER, + min_support: SUP_REF_CANCELLER, + }, + ), + ( + TRACK_INDEX_REF_KILLER, + pallet_referenda::TrackInfo { + name: "referendum_killer", + max_deciding: 20, + decision_deposit: 75_000 * CFG, + prepare_period: 1 * HOURS, + decision_period: 7 * DAYS, + confirm_period: 1 * HOURS, + min_enactment_period: 10 * MINUTES, + min_approval: APP_REF_KILLER, + min_support: SUP_REF_KILLER, + }, + ), +]; + +pub struct TracksInfo; +impl pallet_referenda::TracksInfo for TracksInfo { + type Id = u16; + type RuntimeOrigin = ::PalletsOrigin; + + fn tracks() -> &'static [(Self::Id, pallet_referenda::TrackInfo)] { + &TRACKS_DATA[..] + } + + fn track_for(id: &Self::RuntimeOrigin) -> Result { + if let Ok(system_origin) = frame_system::RawOrigin::try_from(id.clone()) { + match system_origin { + frame_system::RawOrigin::Root => Ok(TRACK_INDEX_ROOT), + _ => Err(()), + } + } else if let Ok(custom_origin) = runtime_common::origins::gov::Origin::try_from(id.clone()) + { + match custom_origin { + runtime_common::origins::gov::Origin::WhitelistedCaller => { + Ok(TRACK_INDEX_WHITELISTED_CALLER) + } + // General admin + runtime_common::origins::gov::Origin::PoolAdmin => Ok(TRACK_INDEX_POOL_ADMIN), + runtime_common::origins::gov::Origin::Treasurer => Ok(TRACK_INDEX_TREASURER), + // Referendum admins + runtime_common::origins::gov::Origin::ReferendumCanceller => { + Ok(TRACK_INDEX_REF_CANCELLER) + } + runtime_common::origins::gov::Origin::ReferendumKiller => { + Ok(TRACK_INDEX_REF_KILLER) + } + } + } else { + Err(()) + } + } +} +pallet_referenda::impl_tracksinfo_get!(TracksInfo, Balance, BlockNumber); + +#[cfg(test)] +mod tests { + use sp_arithmetic::Perbill; + use sp_runtime::PerThing; + + use super::*; + + const PRECISION: u32 = 10000; + + fn round(x: Perbill) -> Perbill { + Perbill::from_rational(x * PRECISION, PRECISION) + } + + #[test] + fn root_track() { + todo!() + } + + #[test] + fn whitelisted_caller_track() { + todo!() + } + #[test] + fn pool_admin_track() { + todo!() + } + + #[test] + fn treasurer_track() { + const HOURS: [u32; 8] = [0, 1, 2, 3, 24, 300, 324, 336]; + let approval: [Perbill; 8] = [ + Perbill::from_rational(100, 100u32), + Perbill::from_rational(9991, 10000u32), + Perbill::from_rational(9982, 10000u32), + Perbill::from_rational(9973, 10000u32), + Perbill::from_rational(9786, 10000u32), + Perbill::from_rational(7321, 10000u32), + Perbill::from_rational(7107, 10000u32), + Perbill::from_rational(70, 100u32), + ]; + let sup: [Perbill; 8] = [ + Perbill::from_rational(50, 100u32), + Perbill::from_rational(4984, 10000u32), + Perbill::from_rational(4967, 10000u32), + Perbill::from_rational(4951, 10000u32), + Perbill::from_rational(4608, 10000u32), + Perbill::from_rational(1, 100u32), + Perbill::from_rational(1, 100u32), + Perbill::from_rational(1, 100u32), + ]; + + for (hour, y) in HOURS.into_iter().zip(approval) { + assert_eq!( + round(APP_TREASURER.threshold(Perbill::from_rational(hour, 14u32 * 24u32))), + y, + "Approval mismatch at hour {hour}" + ); + } + + for (hour, y) in HOURS.into_iter().zip(sup) { + assert_eq!( + round(SUP_TREASURER.threshold(Perbill::from_rational(hour, 14u32 * 24u32))), + y, + "Support mismatch at hour {hour}" + ); + } + } + + #[test] + fn ref_canceller_track() { + const HOURS: [u32; 8] = [0, 1, 2, 3, 24, 72, 120, 168]; + let approval: [Perbill; 8] = [ + Perbill::from_rational(100, 100u32), + Perbill::from_rational(9982, 10000u32), + Perbill::from_rational(9964, 10000u32), + Perbill::from_rational(9946, 10000u32), + Perbill::from_rational(9571, 10000u32), + Perbill::from_rational(8714, 10000u32), + Perbill::from_rational(7857, 10000u32), + Perbill::from_rational(70, 100u32), + ]; + let sup: [Perbill; 8] = [ + Perbill::from_rational(50, 100u32), + Perbill::from_rational(3333, 10000u32), + Perbill::from_rational(25, 100u32), + Perbill::from_rational(20, 100u32), + Perbill::from_rational(385, 10000u32), + Perbill::from_rational(135, 10000u32), + Perbill::from_rational(82, 10000u32), + Perbill::from_rational(59, 10000u32), + ]; + + for (hour, y) in HOURS.into_iter().zip(approval) { + assert_eq!( + round(APP_REF_CANCELLER.threshold(Perbill::from_rational(hour, 7u32 * 24u32))), + y, + "Approval mismatch at hour {hour}" + ); + } + + for (hour, y) in HOURS.into_iter().zip(sup) { + assert_eq!( + round(SUP_REF_CANCELLER.threshold(Perbill::from_rational(hour, 7u32 * 24u32))), + y, + "Support mismatch at hour {hour}" + ); + } + } + + #[test] + fn ref_killer_track() { + const HOURS: [u32; 8] = [0, 1, 2, 3, 24, 72, 120, 168]; + let approval: [Perbill; 8] = [ + Perbill::from_rational(100, 100u32), + Perbill::from_rational(9982, 10000u32), + Perbill::from_rational(9964, 10000u32), + Perbill::from_rational(9946, 10000u32), + Perbill::from_rational(9571, 10000u32), + Perbill::from_rational(8714, 10000u32), + Perbill::from_rational(7857, 10000u32), + Perbill::from_rational(70, 100u32), + ]; + let sup: [Perbill; 8] = [ + Perbill::from_rational(50, 100u32), + Perbill::from_rational(3333, 10000u32), + Perbill::from_rational(25, 100u32), + Perbill::from_rational(20, 100u32), + Perbill::from_rational(385, 10000u32), + Perbill::from_rational(135, 10000u32), + Perbill::from_rational(82, 10000u32), + Perbill::from_rational(59, 10000u32), + ]; + + for (hour, y) in HOURS.into_iter().zip(approval) { + assert_eq!( + round(APP_REF_KILLER.threshold(Perbill::from_rational(hour, 7u32 * 24u32))), + y, + "Approval mismatch at hour {hour}" + ); + } + + for (hour, y) in HOURS.into_iter().zip(sup) { + assert_eq!( + round(SUP_REF_KILLER.threshold(Perbill::from_rational(hour, 7u32 * 24u32))), + y, + "Support mismatch at hour {hour}" + ); + } + } +} diff --git a/runtime/centrifuge/src/weights/mod.rs b/runtime/centrifuge/src/weights/mod.rs index 3c26b723b1..ad05c330d0 100644 --- a/runtime/centrifuge/src/weights/mod.rs +++ b/runtime/centrifuge/src/weights/mod.rs @@ -16,7 +16,9 @@ pub mod pallet_balances; pub mod pallet_block_rewards; pub mod pallet_collator_allowlist; pub mod pallet_collator_selection; -pub mod pallet_collective; +pub mod pallet_collective_council; +pub mod pallet_collective_technical_fellowship; +pub mod pallet_conviction_voting; pub mod pallet_democracy; pub mod pallet_elections_phragmen; pub mod pallet_fees; @@ -26,6 +28,7 @@ pub mod pallet_investments; pub mod pallet_keystore; pub mod pallet_liquidity_rewards; pub mod pallet_loans; +pub mod pallet_membership; pub mod pallet_multisig; pub mod pallet_oracle_collection; pub mod pallet_oracle_feed; @@ -36,6 +39,7 @@ pub mod pallet_pool_registry; pub mod pallet_pool_system; pub mod pallet_preimage; pub mod pallet_proxy; +pub mod pallet_referenda; pub mod pallet_remarks; pub mod pallet_restricted_tokens; pub mod pallet_scheduler; @@ -47,4 +51,5 @@ pub mod pallet_treasury; pub mod pallet_uniques; pub mod pallet_utility; pub mod pallet_vesting; +pub mod pallet_whitelist; pub mod pallet_xcm; diff --git a/runtime/centrifuge/src/weights/pallet_collective.rs b/runtime/centrifuge/src/weights/pallet_collective.rs deleted file mode 100644 index 1c60d88097..0000000000 --- a/runtime/centrifuge/src/weights/pallet_collective.rs +++ /dev/null @@ -1,287 +0,0 @@ - -//! Autogenerated weights for `pallet_collective` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 - -// Executed Command: -// target/release/centrifuge-chain -// benchmark -// pallet -// --chain=centrifuge-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_collective -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --heap-pages=4096 -// --output=/tmp/runtime/centrifuge/src/weights/pallet_collective.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_collective`. -pub struct WeightInfo(PhantomData); -impl pallet_collective::WeightInfo for WeightInfo { - /// Storage: Council Members (r:1 w:1) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:0) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:100 w:100) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Prime (r:0 w:1) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `m` is `[0, 100]`. - /// The range of component `n` is `[0, 100]`. - /// The range of component `p` is `[0, 100]`. - fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` - // Estimated: `15762 + m * (1967 ±23) + p * (4332 ±23)` - // Minimum execution time: 23_504_000 picoseconds. - Weight::from_parts(24_045_000, 0) - .saturating_add(Weight::from_parts(0, 15762)) - // Standard Error: 62_373 - .saturating_add(Weight::from_parts(4_726_718, 0).saturating_mul(m.into())) - // Standard Error: 62_373 - .saturating_add(Weight::from_parts(8_779_554, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 1967).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into())) - } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `103 + m * (32 ±0)` - // Estimated: `1589 + m * (32 ±0)` - // Minimum execution time: 24_235_000 picoseconds. - Weight::from_parts(23_250_984, 0) - .saturating_add(Weight::from_parts(0, 1589)) - // Standard Error: 36 - .saturating_add(Weight::from_parts(1_948, 0).saturating_mul(b.into())) - // Standard Error: 371 - .saturating_add(Weight::from_parts(18_660, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:0) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[1, 100]`. - fn propose_execute(b: u32, m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `103 + m * (32 ±0)` - // Estimated: `3569 + m * (32 ±0)` - // Minimum execution time: 28_623_000 picoseconds. - Weight::from_parts(27_427_537, 0) - .saturating_add(Weight::from_parts(0, 3569)) - // Standard Error: 44 - .saturating_add(Weight::from_parts(1_964, 0).saturating_mul(b.into())) - // Standard Error: 459 - .saturating_add(Weight::from_parts(27_792, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) - } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalCount (r:1 w:1) - /// Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:0 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[2, 100]`. - /// The range of component `p` is `[1, 100]`. - fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `393 + m * (32 ±0) + p * (36 ±0)` - // Estimated: `3785 + m * (33 ±0) + p * (36 ±0)` - // Minimum execution time: 37_019_000 picoseconds. - Weight::from_parts(36_618_582, 0) - .saturating_add(Weight::from_parts(0, 3785)) - // Standard Error: 94 - .saturating_add(Weight::from_parts(2_958, 0).saturating_mul(b.into())) - // Standard Error: 986 - .saturating_add(Weight::from_parts(25_992, 0).saturating_mul(m.into())) - // Standard Error: 973 - .saturating_add(Weight::from_parts(241_104, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[5, 100]`. - fn vote(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `842 + m * (64 ±0)` - // Estimated: `4306 + m * (64 ±0)` - // Minimum execution time: 31_509_000 picoseconds. - Weight::from_parts(32_380_933, 0) - .saturating_add(Weight::from_parts(0, 4306)) - // Standard Error: 670 - .saturating_add(Weight::from_parts(42_211, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `431 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `3876 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 40_866_000 picoseconds. - Weight::from_parts(40_128_300, 0) - .saturating_add(Weight::from_parts(0, 3876)) - // Standard Error: 900 - .saturating_add(Weight::from_parts(35_686, 0).saturating_mul(m.into())) - // Standard Error: 878 - .saturating_add(Weight::from_parts(232_805, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `733 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `4050 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` - // Minimum execution time: 58_508_000 picoseconds. - Weight::from_parts(58_282_994, 0) - .saturating_add(Weight::from_parts(0, 4050)) - // Standard Error: 190 - .saturating_add(Weight::from_parts(2_776, 0).saturating_mul(b.into())) - // Standard Error: 2_014 - .saturating_add(Weight::from_parts(14_102, 0).saturating_mul(m.into())) - // Standard Error: 1_963 - .saturating_add(Weight::from_parts(284_218, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) - } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:0) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_disapproved(m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `451 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `3896 + m * (65 ±0) + p * (36 ±0)` - // Minimum execution time: 44_563_000 picoseconds. - Weight::from_parts(44_023_999, 0) - .saturating_add(Weight::from_parts(0, 3896)) - // Standard Error: 807 - .saturating_add(Weight::from_parts(39_142, 0).saturating_mul(m.into())) - // Standard Error: 787 - .saturating_add(Weight::from_parts(229_511, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) - } - /// Storage: Council Voting (r:1 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Members (r:1 w:0) - /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Prime (r:1 w:0) - /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:1 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `b` is `[2, 1024]`. - /// The range of component `m` is `[4, 100]`. - /// The range of component `p` is `[1, 100]`. - fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `753 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` - // Estimated: `4070 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` - // Minimum execution time: 62_106_000 picoseconds. - Weight::from_parts(62_287_266, 0) - .saturating_add(Weight::from_parts(0, 4070)) - // Standard Error: 141 - .saturating_add(Weight::from_parts(2_748, 0).saturating_mul(b.into())) - // Standard Error: 1_497 - .saturating_add(Weight::from_parts(32_032, 0).saturating_mul(m.into())) - // Standard Error: 1_459 - .saturating_add(Weight::from_parts(275_044, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) - } - /// Storage: Council Proposals (r:1 w:1) - /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Council Voting (r:0 w:1) - /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: Council ProposalOf (r:0 w:1) - /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) - /// The range of component `p` is `[1, 100]`. - fn disapprove_proposal(p: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `260 + p * (32 ±0)` - // Estimated: `1745 + p * (32 ±0)` - // Minimum execution time: 23_244_000 picoseconds. - Weight::from_parts(24_758_733, 0) - .saturating_add(Weight::from_parts(0, 1745)) - // Standard Error: 752 - .saturating_add(Weight::from_parts(216_365, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) - } -} diff --git a/runtime/centrifuge/src/weights/pallet_collective_council.rs b/runtime/centrifuge/src/weights/pallet_collective_council.rs new file mode 100644 index 0000000000..4f7d6ca0d5 --- /dev/null +++ b/runtime/centrifuge/src/weights/pallet_collective_council.rs @@ -0,0 +1,287 @@ + +//! Autogenerated weights for `pallet_collective` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/centrifuge-chain +// benchmark +// pallet +// --chain=centrifuge-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_collective +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=/tmp/runtime/centrifuge/src/weights/pallet_collective.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_collective`. +pub struct WeightInfo(PhantomData); +impl pallet_collective::WeightInfo for WeightInfo { + /// Storage: Council Members (r:1 w:1) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:0) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:100 w:100) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Prime (r:0 w:1) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` + // Estimated: `15762 + m * (1967 ±23) + p * (4332 ±23)` + // Minimum execution time: 23_504_000 picoseconds. + Weight::from_parts(24_045_000, 0) + .saturating_add(Weight::from_parts(0, 15762)) + // Standard Error: 62_373 + .saturating_add(Weight::from_parts(4_726_718, 0).saturating_mul(m.into())) + // Standard Error: 62_373 + .saturating_add(Weight::from_parts(8_779_554, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 1967).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into())) + } + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `103 + m * (32 ±0)` + // Estimated: `1589 + m * (32 ±0)` + // Minimum execution time: 24_235_000 picoseconds. + Weight::from_parts(23_250_984, 0) + .saturating_add(Weight::from_parts(0, 1589)) + // Standard Error: 36 + .saturating_add(Weight::from_parts(1_948, 0).saturating_mul(b.into())) + // Standard Error: 371 + .saturating_add(Weight::from_parts(18_660, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:0) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn propose_execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `103 + m * (32 ±0)` + // Estimated: `3569 + m * (32 ±0)` + // Minimum execution time: 28_623_000 picoseconds. + Weight::from_parts(27_427_537, 0) + .saturating_add(Weight::from_parts(0, 3569)) + // Standard Error: 44 + .saturating_add(Weight::from_parts(1_964, 0).saturating_mul(b.into())) + // Standard Error: 459 + .saturating_add(Weight::from_parts(27_792, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalCount (r:1 w:1) + /// Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:0 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `393 + m * (32 ±0) + p * (36 ±0)` + // Estimated: `3785 + m * (33 ±0) + p * (36 ±0)` + // Minimum execution time: 37_019_000 picoseconds. + Weight::from_parts(36_618_582, 0) + .saturating_add(Weight::from_parts(0, 3785)) + // Standard Error: 94 + .saturating_add(Weight::from_parts(2_958, 0).saturating_mul(b.into())) + // Standard Error: 986 + .saturating_add(Weight::from_parts(25_992, 0).saturating_mul(m.into())) + // Standard Error: 973 + .saturating_add(Weight::from_parts(241_104, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[5, 100]`. + fn vote(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `842 + m * (64 ±0)` + // Estimated: `4306 + m * (64 ±0)` + // Minimum execution time: 31_509_000 picoseconds. + Weight::from_parts(32_380_933, 0) + .saturating_add(Weight::from_parts(0, 4306)) + // Standard Error: 670 + .saturating_add(Weight::from_parts(42_211, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:0 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `431 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3876 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 40_866_000 picoseconds. + Weight::from_parts(40_128_300, 0) + .saturating_add(Weight::from_parts(0, 3876)) + // Standard Error: 900 + .saturating_add(Weight::from_parts(35_686, 0).saturating_mul(m.into())) + // Standard Error: 878 + .saturating_add(Weight::from_parts(232_805, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `733 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4050 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 58_508_000 picoseconds. + Weight::from_parts(58_282_994, 0) + .saturating_add(Weight::from_parts(0, 4050)) + // Standard Error: 190 + .saturating_add(Weight::from_parts(2_776, 0).saturating_mul(b.into())) + // Standard Error: 2_014 + .saturating_add(Weight::from_parts(14_102, 0).saturating_mul(m.into())) + // Standard Error: 1_963 + .saturating_add(Weight::from_parts(284_218, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) + } + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Prime (r:1 w:0) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:0 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `451 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3896 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 44_563_000 picoseconds. + Weight::from_parts(44_023_999, 0) + .saturating_add(Weight::from_parts(0, 3896)) + // Standard Error: 807 + .saturating_add(Weight::from_parts(39_142, 0).saturating_mul(m.into())) + // Standard Error: 787 + .saturating_add(Weight::from_parts(229_511, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Prime (r:1 w:0) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `753 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4070 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 62_106_000 picoseconds. + Weight::from_parts(62_287_266, 0) + .saturating_add(Weight::from_parts(0, 4070)) + // Standard Error: 141 + .saturating_add(Weight::from_parts(2_748, 0).saturating_mul(b.into())) + // Standard Error: 1_497 + .saturating_add(Weight::from_parts(32_032, 0).saturating_mul(m.into())) + // Standard Error: 1_459 + .saturating_add(Weight::from_parts(275_044, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) + } + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:0 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:0 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. + fn disapprove_proposal(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `260 + p * (32 ±0)` + // Estimated: `1745 + p * (32 ±0)` + // Minimum execution time: 23_244_000 picoseconds. + Weight::from_parts(24_758_733, 0) + .saturating_add(Weight::from_parts(0, 1745)) + // Standard Error: 752 + .saturating_add(Weight::from_parts(216_365, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) + } +} diff --git a/runtime/centrifuge/src/weights/pallet_collective_technical_fellowship.rs b/runtime/centrifuge/src/weights/pallet_collective_technical_fellowship.rs new file mode 100644 index 0000000000..4f7d6ca0d5 --- /dev/null +++ b/runtime/centrifuge/src/weights/pallet_collective_technical_fellowship.rs @@ -0,0 +1,287 @@ + +//! Autogenerated weights for `pallet_collective` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/centrifuge-chain +// benchmark +// pallet +// --chain=centrifuge-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_collective +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=/tmp/runtime/centrifuge/src/weights/pallet_collective.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_collective`. +pub struct WeightInfo(PhantomData); +impl pallet_collective::WeightInfo for WeightInfo { + /// Storage: Council Members (r:1 w:1) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:0) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:100 w:100) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Prime (r:0 w:1) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[0, 100]`. + /// The range of component `n` is `[0, 100]`. + /// The range of component `p` is `[0, 100]`. + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` + // Estimated: `15762 + m * (1967 ±23) + p * (4332 ±23)` + // Minimum execution time: 23_504_000 picoseconds. + Weight::from_parts(24_045_000, 0) + .saturating_add(Weight::from_parts(0, 15762)) + // Standard Error: 62_373 + .saturating_add(Weight::from_parts(4_726_718, 0).saturating_mul(m.into())) + // Standard Error: 62_373 + .saturating_add(Weight::from_parts(8_779_554, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 1967).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into())) + } + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `103 + m * (32 ±0)` + // Estimated: `1589 + m * (32 ±0)` + // Minimum execution time: 24_235_000 picoseconds. + Weight::from_parts(23_250_984, 0) + .saturating_add(Weight::from_parts(0, 1589)) + // Standard Error: 36 + .saturating_add(Weight::from_parts(1_948, 0).saturating_mul(b.into())) + // Standard Error: 371 + .saturating_add(Weight::from_parts(18_660, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:0) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[1, 100]`. + fn propose_execute(b: u32, m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `103 + m * (32 ±0)` + // Estimated: `3569 + m * (32 ±0)` + // Minimum execution time: 28_623_000 picoseconds. + Weight::from_parts(27_427_537, 0) + .saturating_add(Weight::from_parts(0, 3569)) + // Standard Error: 44 + .saturating_add(Weight::from_parts(1_964, 0).saturating_mul(b.into())) + // Standard Error: 459 + .saturating_add(Weight::from_parts(27_792, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalCount (r:1 w:1) + /// Proof Skipped: Council ProposalCount (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:0 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[2, 100]`. + /// The range of component `p` is `[1, 100]`. + fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `393 + m * (32 ±0) + p * (36 ±0)` + // Estimated: `3785 + m * (33 ±0) + p * (36 ±0)` + // Minimum execution time: 37_019_000 picoseconds. + Weight::from_parts(36_618_582, 0) + .saturating_add(Weight::from_parts(0, 3785)) + // Standard Error: 94 + .saturating_add(Weight::from_parts(2_958, 0).saturating_mul(b.into())) + // Standard Error: 986 + .saturating_add(Weight::from_parts(25_992, 0).saturating_mul(m.into())) + // Standard Error: 973 + .saturating_add(Weight::from_parts(241_104, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[5, 100]`. + fn vote(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `842 + m * (64 ±0)` + // Estimated: `4306 + m * (64 ±0)` + // Minimum execution time: 31_509_000 picoseconds. + Weight::from_parts(32_380_933, 0) + .saturating_add(Weight::from_parts(0, 4306)) + // Standard Error: 670 + .saturating_add(Weight::from_parts(42_211, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:0 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `431 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3876 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 40_866_000 picoseconds. + Weight::from_parts(40_128_300, 0) + .saturating_add(Weight::from_parts(0, 3876)) + // Standard Error: 900 + .saturating_add(Weight::from_parts(35_686, 0).saturating_mul(m.into())) + // Standard Error: 878 + .saturating_add(Weight::from_parts(232_805, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `733 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4050 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 58_508_000 picoseconds. + Weight::from_parts(58_282_994, 0) + .saturating_add(Weight::from_parts(0, 4050)) + // Standard Error: 190 + .saturating_add(Weight::from_parts(2_776, 0).saturating_mul(b.into())) + // Standard Error: 2_014 + .saturating_add(Weight::from_parts(14_102, 0).saturating_mul(m.into())) + // Standard Error: 1_963 + .saturating_add(Weight::from_parts(284_218, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) + } + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Prime (r:1 w:0) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:0 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_disapproved(m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `451 + m * (64 ±0) + p * (36 ±0)` + // Estimated: `3896 + m * (65 ±0) + p * (36 ±0)` + // Minimum execution time: 44_563_000 picoseconds. + Weight::from_parts(44_023_999, 0) + .saturating_add(Weight::from_parts(0, 3896)) + // Standard Error: 807 + .saturating_add(Weight::from_parts(39_142, 0).saturating_mul(m.into())) + // Standard Error: 787 + .saturating_add(Weight::from_parts(229_511, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(p.into())) + } + /// Storage: Council Voting (r:1 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Members (r:1 w:0) + /// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Prime (r:1 w:0) + /// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:1 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `b` is `[2, 1024]`. + /// The range of component `m` is `[4, 100]`. + /// The range of component `p` is `[1, 100]`. + fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `753 + b * (1 ±0) + m * (64 ±0) + p * (40 ±0)` + // Estimated: `4070 + b * (1 ±0) + m * (66 ±0) + p * (40 ±0)` + // Minimum execution time: 62_106_000 picoseconds. + Weight::from_parts(62_287_266, 0) + .saturating_add(Weight::from_parts(0, 4070)) + // Standard Error: 141 + .saturating_add(Weight::from_parts(2_748, 0).saturating_mul(b.into())) + // Standard Error: 1_497 + .saturating_add(Weight::from_parts(32_032, 0).saturating_mul(m.into())) + // Standard Error: 1_459 + .saturating_add(Weight::from_parts(275_044, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) + .saturating_add(Weight::from_parts(0, 66).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(p.into())) + } + /// Storage: Council Proposals (r:1 w:1) + /// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Council Voting (r:0 w:1) + /// Proof Skipped: Council Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: Council ProposalOf (r:0 w:1) + /// Proof Skipped: Council ProposalOf (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. + fn disapprove_proposal(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `260 + p * (32 ±0)` + // Estimated: `1745 + p * (32 ±0)` + // Minimum execution time: 23_244_000 picoseconds. + Weight::from_parts(24_758_733, 0) + .saturating_add(Weight::from_parts(0, 1745)) + // Standard Error: 752 + .saturating_add(Weight::from_parts(216_365, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) + } +} diff --git a/runtime/centrifuge/src/weights/pallet_conviction_voting.rs b/runtime/centrifuge/src/weights/pallet_conviction_voting.rs new file mode 100644 index 0000000000..ceacadefaa --- /dev/null +++ b/runtime/centrifuge/src/weights/pallet_conviction_voting.rs @@ -0,0 +1,176 @@ +//! Autogenerated weights for `pallet_collective` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/centrifuge-chain +// benchmark +// pallet +// --chain=centrifuge-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_collective +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=/tmp/runtime/centrifuge/src/weights/pallet_conviction_voting.rs + +#![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_conviction_voting`. +pub struct WeightInfo(PhantomData); +impl pallet_conviction_voting::WeightInfo for WeightInfo { + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1) + /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`) + /// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1) + /// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn vote_new() -> Weight { + // Proof Size summary in bytes: + // Measured: `13445` + // Estimated: `42428` + // Minimum execution time: 128_222_000 picoseconds. + Weight::from_parts(133_397_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1) + /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`) + /// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1) + /// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:2 w:2) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn vote_existing() -> Weight { + // Proof Size summary in bytes: + // Measured: `14166` + // Estimated: `83866` + // Minimum execution time: 193_274_000 picoseconds. + Weight::from_parts(206_120_000, 0) + .saturating_add(Weight::from_parts(0, 83866)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1) + /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`) + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:2 w:2) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn remove_vote() -> Weight { + // Proof Size summary in bytes: + // Measured: `13918` + // Estimated: `83866` + // Minimum execution time: 169_729_000 picoseconds. + Weight::from_parts(181_847_000, 0) + .saturating_add(Weight::from_parts(0, 83866)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1) + /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`) + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + fn remove_other_vote() -> Weight { + // Proof Size summary in bytes: + // Measured: `13004` + // Estimated: `30706` + // Minimum execution time: 74_834_000 picoseconds. + Weight::from_parts(83_047_000, 0) + .saturating_add(Weight::from_parts(0, 30706)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `ConvictionVoting::VotingFor` (r:2 w:2) + /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`) + /// Storage: `Referenda::ReferendumInfoFor` (r:512 w:512) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:2 w:2) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1) + /// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + /// The range of component `r` is `[0, 512]`. + fn delegate(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `29640 + r * (365 ±0)` + // Estimated: `83866 + r * (3411 ±0)` + // Minimum execution time: 65_741_000 picoseconds. + Weight::from_parts(1_683_585_056, 0) + .saturating_add(Weight::from_parts(0, 83866)) + // Standard Error: 146_560 + .saturating_add(Weight::from_parts(40_661_211, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(6)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 3411).saturating_mul(r.into())) + } + /// Storage: `ConvictionVoting::VotingFor` (r:2 w:2) + /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`) + /// Storage: `Referenda::ReferendumInfoFor` (r:512 w:512) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:2 w:2) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// The range of component `r` is `[0, 512]`. + fn undelegate(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `29555 + r * (365 ±0)` + // Estimated: `83866 + r * (3411 ±0)` + // Minimum execution time: 38_557_000 picoseconds. + Weight::from_parts(1_664_510_198, 0) + .saturating_add(Weight::from_parts(0, 83866)) + // Standard Error: 147_721 + .saturating_add(Weight::from_parts(40_405_805, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 3411).saturating_mul(r.into())) + } + /// Storage: `ConvictionVoting::VotingFor` (r:1 w:1) + /// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(27241), added: 29716, mode: `MaxEncodedLen`) + /// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1) + /// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(311), added: 2786, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:1) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:0) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) + fn unlock() -> Weight { + // Proof Size summary in bytes: + // Measured: `12218` + // Estimated: `30706` + // Minimum execution time: 94_790_000 picoseconds. + Weight::from_parts(100_982_000, 0) + .saturating_add(Weight::from_parts(0, 30706)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/runtime/centrifuge/src/weights/pallet_membership.rs b/runtime/centrifuge/src/weights/pallet_membership.rs new file mode 100644 index 0000000000..8641ae5ff1 --- /dev/null +++ b/runtime/centrifuge/src/weights/pallet_membership.rs @@ -0,0 +1,188 @@ +//! Autogenerated weights for `pallet_collective` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/centrifuge-chain +// benchmark +// pallet +// --chain=centrifuge-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_collective +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=/tmp/runtime/centrifuge/src/weights/pallet_membership.rs + +#![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_membership`. +pub struct WeightInfo(PhantomData); +impl pallet_membership::WeightInfo for WeightInfo { + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 99]`. + fn add_member(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `174 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 17_443_000 picoseconds. + Weight::from_parts(18_272_399, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 376 + .saturating_add(Weight::from_parts(33_633, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalMembership Prime (r:1 w:0) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[2, 100]`. + fn remove_member(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `278 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 19_826_000 picoseconds. + Weight::from_parts(20_859_732, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 667 + .saturating_add(Weight::from_parts(33_155, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalMembership Prime (r:1 w:0) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[2, 100]`. + fn swap_member(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `278 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 20_151_000 picoseconds. + Weight::from_parts(20_774_114, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 447 + .saturating_add(Weight::from_parts(44_052, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalMembership Prime (r:1 w:0) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 100]`. + fn reset_member(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `278 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 19_846_000 picoseconds. + Weight::from_parts(20_903_563, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 865 + .saturating_add(Weight::from_parts(149_306, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: TechnicalMembership Members (r:1 w:1) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Proposals (r:1 w:0) + /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalMembership Prime (r:1 w:1) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Members (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 100]`. + fn change_key(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `278 + m * (64 ±0)` + // Estimated: `4687 + m * (64 ±0)` + // Minimum execution time: 20_523_000 picoseconds. + Weight::from_parts(21_705_085, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 948 + .saturating_add(Weight::from_parts(44_568, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } + /// Storage: TechnicalMembership Members (r:1 w:0) + /// Proof: TechnicalMembership Members (max_values: Some(1), max_size: Some(3202), added: 3697, mode: MaxEncodedLen) + /// Storage: TechnicalMembership Prime (r:0 w:1) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 100]`. + fn set_prime(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `32 + m * (32 ±0)` + // Estimated: `4687 + m * (32 ±0)` + // Minimum execution time: 8_032_000 picoseconds. + Weight::from_parts(8_386_682, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 190 + .saturating_add(Weight::from_parts(9_724, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) + } + /// Storage: TechnicalMembership Prime (r:0 w:1) + /// Proof: TechnicalMembership Prime (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: TechnicalCommittee Prime (r:0 w:1) + /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `m` is `[1, 100]`. + fn clear_prime(m: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_061_000 picoseconds. + Weight::from_parts(3_304_217, 0) + .saturating_add(Weight::from_parts(0, 0)) + // Standard Error: 80 + .saturating_add(Weight::from_parts(273, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/runtime/centrifuge/src/weights/pallet_referenda.rs b/runtime/centrifuge/src/weights/pallet_referenda.rs new file mode 100644 index 0000000000..f65c6cd82a --- /dev/null +++ b/runtime/centrifuge/src/weights/pallet_referenda.rs @@ -0,0 +1,480 @@ +//! Autogenerated weights for `pallet_collective` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/centrifuge-chain +// benchmark +// pallet +// --chain=centrifuge-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_collective +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=/tmp/runtime/centrifuge/src/weights/pallet_referenda.rs + +#![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(PhantomData); +impl pallet_referenda::WeightInfo for WeightInfo { + /// Storage: `Referenda::ReferendumCount` (r:1 w:1) + /// Proof: `Referenda::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(38963), added: 41438, mode: `MaxEncodedLen`) + /// Storage: `Referenda::ReferendumInfoFor` (r:0 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + fn submit() -> Weight { + // Proof Size summary in bytes: + // Measured: `186` + // Estimated: `42428` + // Minimum execution time: 35_376_000 picoseconds. + Weight::from_parts(36_517_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:2 w:2) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn place_decision_deposit_preparing() -> Weight { + // Proof Size summary in bytes: + // Measured: `439` + // Estimated: `83866` + // Minimum execution time: 49_778_000 picoseconds. + Weight::from_parts(50_686_000, 0) + .saturating_add(Weight::from_parts(0, 83866)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Referenda::DecidingCount` (r:1 w:0) + /// Proof: `Referenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`) + /// Storage: `Referenda::TrackQueue` (r:1 w:1) + /// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn place_decision_deposit_queued() -> Weight { + // Proof Size summary in bytes: + // Measured: `3226` + // Estimated: `42428` + // Minimum execution time: 61_681_000 picoseconds. + Weight::from_parts(63_483_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Referenda::DecidingCount` (r:1 w:0) + /// Proof: `Referenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`) + /// Storage: `Referenda::TrackQueue` (r:1 w:1) + /// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn place_decision_deposit_not_queued() -> Weight { + // Proof Size summary in bytes: + // Measured: `3246` + // Estimated: `42428` + // Minimum execution time: 60_699_000 picoseconds. + Weight::from_parts(62_223_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Referenda::DecidingCount` (r:1 w:1) + /// Proof: `Referenda::DecidingCount` (`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(38963), added: 41438, mode: `MaxEncodedLen`) + fn place_decision_deposit_passing() -> Weight { + // Proof Size summary in bytes: + // Measured: `439` + // Estimated: `83866` + // Minimum execution time: 61_401_000 picoseconds. + Weight::from_parts(62_890_000, 0) + .saturating_add(Weight::from_parts(0, 83866)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Referenda::DecidingCount` (r:1 w:1) + /// Proof: `Referenda::DecidingCount` (`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(38963), added: 41438, mode: `MaxEncodedLen`) + fn place_decision_deposit_failing() -> Weight { + // Proof Size summary in bytes: + // Measured: `439` + // Estimated: `83866` + // Minimum execution time: 57_572_000 picoseconds. + Weight::from_parts(59_953_000, 0) + .saturating_add(Weight::from_parts(0, 83866)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + fn refund_decision_deposit() -> Weight { + // Proof Size summary in bytes: + // Measured: `279` + // Estimated: `4401` + // Minimum execution time: 26_730_000 picoseconds. + Weight::from_parts(28_055_000, 0) + .saturating_add(Weight::from_parts(0, 4401)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + fn refund_submission_deposit() -> Weight { + // Proof Size summary in bytes: + // Measured: `269` + // Estimated: `4401` + // Minimum execution time: 27_341_000 picoseconds. + Weight::from_parts(28_373_000, 0) + .saturating_add(Weight::from_parts(0, 4401)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:2 w:2) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn cancel() -> Weight { + // Proof Size summary in bytes: + // Measured: `347` + // Estimated: `83866` + // Minimum execution time: 33_650_000 picoseconds. + Weight::from_parts(35_107_000, 0) + .saturating_add(Weight::from_parts(0, 83866)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:2 w:2) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + /// Storage: `Referenda::MetadataOf` (r:1 w:0) + /// Proof: `Referenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn kill() -> Weight { + // Proof Size summary in bytes: + // Measured: `588` + // Estimated: `83866` + // Minimum execution time: 96_383_000 picoseconds. + Weight::from_parts(99_296_000, 0) + .saturating_add(Weight::from_parts(0, 83866)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Referenda::TrackQueue` (r:1 w:0) + /// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`) + /// Storage: `Referenda::DecidingCount` (r:1 w:1) + /// Proof: `Referenda::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: `102` + // Estimated: `5477` + // Minimum execution time: 8_323_000 picoseconds. + Weight::from_parts(8_776_000, 0) + .saturating_add(Weight::from_parts(0, 5477)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Referenda::TrackQueue` (r:1 w:1) + /// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`) + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn one_fewer_deciding_failing() -> Weight { + // Proof Size summary in bytes: + // Measured: `3116` + // Estimated: `42428` + // Minimum execution time: 46_817_000 picoseconds. + Weight::from_parts(48_988_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Referenda::TrackQueue` (r:1 w:1) + /// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`) + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn one_fewer_deciding_passing() -> Weight { + // Proof Size summary in bytes: + // Measured: `3116` + // Estimated: `42428` + // Minimum execution time: 50_644_000 picoseconds. + Weight::from_parts(51_929_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Referenda::TrackQueue` (r:1 w:1) + /// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`) + fn nudge_referendum_requeued_insertion() -> Weight { + // Proof Size summary in bytes: + // Measured: `2939` + // Estimated: `5477` + // Minimum execution time: 22_716_000 picoseconds. + Weight::from_parts(23_508_000, 0) + .saturating_add(Weight::from_parts(0, 5477)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Referenda::TrackQueue` (r:1 w:1) + /// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`) + fn nudge_referendum_requeued_slide() -> Weight { + // Proof Size summary in bytes: + // Measured: `2939` + // Estimated: `5477` + // Minimum execution time: 22_223_000 picoseconds. + Weight::from_parts(23_359_000, 0) + .saturating_add(Weight::from_parts(0, 5477)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Referenda::DecidingCount` (r:1 w:0) + /// Proof: `Referenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`) + /// Storage: `Referenda::TrackQueue` (r:1 w:1) + /// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`) + fn nudge_referendum_queued() -> Weight { + // Proof Size summary in bytes: + // Measured: `2943` + // Estimated: `5477` + // Minimum execution time: 26_541_000 picoseconds. + Weight::from_parts(27_446_000, 0) + .saturating_add(Weight::from_parts(0, 5477)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Referenda::DecidingCount` (r:1 w:0) + /// Proof: `Referenda::DecidingCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`) + /// Storage: `Referenda::TrackQueue` (r:1 w:1) + /// Proof: `Referenda::TrackQueue` (`max_values`: None, `max_size`: Some(2012), added: 4487, mode: `MaxEncodedLen`) + fn nudge_referendum_not_queued() -> Weight { + // Proof Size summary in bytes: + // Measured: `2963` + // Estimated: `5477` + // Minimum execution time: 25_749_000 picoseconds. + Weight::from_parts(26_662_000, 0) + .saturating_add(Weight::from_parts(0, 5477)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn nudge_referendum_no_deposit() -> Weight { + // Proof Size summary in bytes: + // Measured: `299` + // Estimated: `42428` + // Minimum execution time: 21_944_000 picoseconds. + Weight::from_parts(23_129_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn nudge_referendum_preparing() -> Weight { + // Proof Size summary in bytes: + // Measured: `347` + // Estimated: `42428` + // Minimum execution time: 22_252_000 picoseconds. + Weight::from_parts(23_071_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + fn nudge_referendum_timed_out() -> Weight { + // Proof Size summary in bytes: + // Measured: `206` + // Estimated: `4401` + // Minimum execution time: 14_336_000 picoseconds. + Weight::from_parts(15_039_000, 0) + .saturating_add(Weight::from_parts(0, 4401)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Referenda::DecidingCount` (r:1 w:1) + /// Proof: `Referenda::DecidingCount` (`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(38963), added: 41438, mode: `MaxEncodedLen`) + fn nudge_referendum_begin_deciding_failing() -> Weight { + // Proof Size summary in bytes: + // Measured: `347` + // Estimated: `42428` + // Minimum execution time: 31_108_000 picoseconds. + Weight::from_parts(32_446_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Referenda::DecidingCount` (r:1 w:1) + /// Proof: `Referenda::DecidingCount` (`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(38963), added: 41438, mode: `MaxEncodedLen`) + fn nudge_referendum_begin_deciding_passing() -> Weight { + // Proof Size summary in bytes: + // Measured: `347` + // Estimated: `42428` + // Minimum execution time: 33_666_000 picoseconds. + Weight::from_parts(34_575_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn nudge_referendum_begin_confirming() -> Weight { + // Proof Size summary in bytes: + // Measured: `400` + // Estimated: `42428` + // Minimum execution time: 30_250_000 picoseconds. + Weight::from_parts(31_267_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn nudge_referendum_end_confirming() -> Weight { + // Proof Size summary in bytes: + // Measured: `383` + // Estimated: `42428` + // Minimum execution time: 30_782_000 picoseconds. + Weight::from_parts(32_258_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn nudge_referendum_continue_not_confirming() -> Weight { + // Proof Size summary in bytes: + // Measured: `400` + // Estimated: `42428` + // Minimum execution time: 28_260_000 picoseconds. + Weight::from_parts(29_450_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn nudge_referendum_continue_confirming() -> Weight { + // Proof Size summary in bytes: + // Measured: `404` + // Estimated: `42428` + // Minimum execution time: 27_024_000 picoseconds. + Weight::from_parts(28_253_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:2 w:2) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, 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: `404` + // Estimated: `83866` + // Minimum execution time: 41_811_000 picoseconds. + Weight::from_parts(42_989_000, 0) + .saturating_add(Weight::from_parts(0, 83866)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`) + fn nudge_referendum_rejected() -> Weight { + // Proof Size summary in bytes: + // Measured: `400` + // Estimated: `42428` + // Minimum execution time: 30_478_000 picoseconds. + Weight::from_parts(31_556_000, 0) + .saturating_add(Weight::from_parts(0, 42428)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Referenda::MetadataOf` (r:0 w:1) + /// Proof: `Referenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn set_some_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `350` + // Estimated: `4401` + // Minimum execution time: 18_549_000 picoseconds. + Weight::from_parts(19_181_000, 0) + .saturating_add(Weight::from_parts(0, 4401)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0) + /// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`) + /// Storage: `Referenda::MetadataOf` (r:1 w:1) + /// Proof: `Referenda::MetadataOf` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + fn clear_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `283` + // Estimated: `4401` + // Minimum execution time: 16_085_000 picoseconds. + Weight::from_parts(16_480_000, 0) + .saturating_add(Weight::from_parts(0, 4401)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/runtime/centrifuge/src/weights/pallet_whitelist.rs b/runtime/centrifuge/src/weights/pallet_whitelist.rs new file mode 100644 index 0000000000..ca08d2c3c1 --- /dev/null +++ b/runtime/centrifuge/src/weights/pallet_whitelist.rs @@ -0,0 +1,99 @@ +//! Autogenerated weights for `pallet_collective` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2024-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("centrifuge-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/centrifuge-chain +// benchmark +// pallet +// --chain=centrifuge-dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_collective +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=/tmp/runtime/centrifuge/src/weights/pallet_whitelist.rs + +#![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_whitelist`. +pub struct WeightInfo(PhantomData); +impl pallet_whitelist::WeightInfo for WeightInfo { + /// Storage: `Whitelist::WhitelistedCall` (r:1 w:1) + /// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn whitelist_call() -> Weight { + // Proof Size summary in bytes: + // Measured: `84` + // Estimated: `3556` + // Minimum execution time: 18_497_000 picoseconds. + Weight::from_parts(18_977_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Whitelist::WhitelistedCall` (r:1 w:1) + /// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn remove_whitelisted_call() -> Weight { + // Proof Size summary in bytes: + // Measured: `213` + // Estimated: `3556` + // Minimum execution time: 16_070_000 picoseconds. + Weight::from_parts(16_697_000, 0) + .saturating_add(Weight::from_parts(0, 3556)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Whitelist::WhitelistedCall` (r:1 w:1) + /// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:1 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// The range of component `n` is `[1, 4194294]`. + fn dispatch_whitelisted_call(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `289 + n * (1 ±0)` + // Estimated: `3753 + n * (1 ±0)` + // Minimum execution time: 27_611_000 picoseconds. + Weight::from_parts(27_934_000, 0) + .saturating_add(Weight::from_parts(0, 3753)) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_213, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) + } + /// Storage: `Whitelist::WhitelistedCall` (r:1 w:1) + /// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:1) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// The range of component `n` is `[1, 10000]`. + fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `213` + // Estimated: `3556` + // Minimum execution time: 19_188_000 picoseconds. + Weight::from_parts(19_932_877, 0) + .saturating_add(Weight::from_parts(0, 3556)) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_418, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } +}