diff --git a/Cargo.lock b/Cargo.lock index b97857c073..83ad56e56f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -891,7 +891,7 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "basilisk" -version = "15.0.0" +version = "16.0.0" dependencies = [ "basilisk-runtime", "clap", @@ -973,7 +973,7 @@ dependencies = [ [[package]] name = "basilisk-runtime" -version = "119.0.0" +version = "120.0.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -11178,7 +11178,7 @@ dependencies = [ [[package]] name = "runtime-integration-tests" -version = "1.0.3" +version = "1.0.4" dependencies = [ "basilisk-runtime", "cumulus-pallet-aura-ext", @@ -11213,9 +11213,7 @@ dependencies = [ "pallet-collator-selection", "pallet-collective", "pallet-currencies", - "pallet-democracy 28.0.0", "pallet-duster", - "pallet-elections-phragmen", "pallet-ema-oracle", "pallet-im-online", "pallet-lbp", @@ -11226,7 +11224,6 @@ dependencies = [ "pallet-scheduler", "pallet-session", "pallet-timestamp", - "pallet-tips", "pallet-transaction-multi-payment", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index 38c959ecb9..cf5a340c85 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "runtime-integration-tests" -version = "1.0.3" +version = "1.0.4" description = "Integration tests" authors = ["GalacticCouncil"] edition = "2021" @@ -26,10 +26,7 @@ pallet-marketplace = { workspace = true} primitives = { default-features = false, path = "../primitives" } pallet-treasury = { workspace = true } -pallet-democracy = { workspace = true } pallet-scheduler = { workspace = true } -pallet-elections-phragmen = { workspace = true } -pallet-tips = { workspace = true } # collator support pallet-collator-selection = { workspace = true } @@ -148,7 +145,6 @@ std = [ "pallet-asset-registry/std", "pallet-aura/std", "pallet-balances/std", - "pallet-elections-phragmen/std", "pallet-nft/std", "pallet-marketplace/std", "pallet-session/std", @@ -178,9 +174,7 @@ std = [ "sp-version/std", "pallet-treasury/std", "pallet-collective/std", - "pallet-democracy/std", "pallet-scheduler/std", - "pallet-tips/std", "pallet-collator-selection/std", "pallet-authorship/std", "basilisk-runtime/std", diff --git a/integration-tests/src/transact_call_filter.rs b/integration-tests/src/transact_call_filter.rs index 11b0c9f36d..666e59d408 100644 --- a/integration-tests/src/transact_call_filter.rs +++ b/integration-tests/src/transact_call_filter.rs @@ -117,10 +117,11 @@ fn blocked_transact_calls_should_not_pass_filter() { OtherParachain::execute_with(|| { // filtered by SafeCallFilter - let call = pallet_tips::Call::::report_awesome { - reason: vec![0, 10], - who: BOB.into(), + let call = pallet_treasury::Call::::spend_local { + amount: UNITS, + beneficiary: ALICE.into(), }; + let bsx_loc = Location::new( 1, cumulus_primitives_core::Junctions::X2(Arc::new( @@ -150,7 +151,7 @@ fn blocked_transact_calls_should_not_pass_filter() { Transact { require_weight_at_most: Weight::from_parts(10_000_000_000, 0u64), origin_kind: OriginKind::Native, - call: basilisk_runtime::RuntimeCall::Tips(call).encode().into(), + call: basilisk_runtime::RuntimeCall::Treasury(call).encode().into(), }, ExpectTransactStatus(MaybeErrorCode::Success), RefundSurplus, diff --git a/launch-configs/chopsticks/basilisk.yml b/launch-configs/chopsticks/basilisk.yml index a75c84942d..1aa08466f5 100644 --- a/launch-configs/chopsticks/basilisk.yml +++ b/launch-configs/chopsticks/basilisk.yml @@ -26,7 +26,5 @@ import-storage: - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY - 1 - free: '100000000000000000000' - Council: - Members: [5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY] TechnicalCommittee: Members: [5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY] diff --git a/node/Cargo.toml b/node/Cargo.toml index 67321e501c..87055455c7 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "basilisk" -version = "15.0.0" +version = "16.0.0" description = "Basilisk node" authors = ["GalacticCouncil"] edition = "2021" diff --git a/node/src/chain_spec/local.rs b/node/src/chain_spec/local.rs index 528f929bf0..63fdbfecca 100644 --- a/node/src/chain_spec/local.rs +++ b/node/src/chain_spec/local.rs @@ -76,8 +76,6 @@ pub fn parachain_config() -> Result { INITIAL_BALANCE, ), ], - // council_members - vec![get_account_id_from_seed::("Alice")], // tech_committee_members vec![ get_account_id_from_seed::("Alice"), @@ -102,11 +100,6 @@ pub fn parachain_config() -> Result { vec![(1, INITIAL_TOKEN_BALANCE), (2, INITIAL_TOKEN_BALANCE)], ), ], - // elections - vec![( - get_account_id_from_seed::("Alice"), - INITIAL_TOKEN_BALANCE, - )], // parachain ID PARA_ID.into(), ); diff --git a/node/src/chain_spec/mod.rs b/node/src/chain_spec/mod.rs index cf66af6b21..f68794a008 100644 --- a/node/src/chain_spec/mod.rs +++ b/node/src/chain_spec/mod.rs @@ -84,12 +84,10 @@ where pub fn parachain_genesis( initial_authorities: (Vec<(AccountId, AuraId)>, Balance), // (initial auths, candidacy bond) endowed_accounts: Vec<(AccountId, Balance)>, - council_members: Vec, tech_committee_members: Vec, registered_assets: Vec<(Vec, Balance, Option)>, accepted_assets: Vec<(AssetId, Price)>, // (Asset id, Fallback price) - asset which fee can be paid with token_balances: Vec<(AccountId, Vec<(AssetId, Balance)>)>, - elections: Vec<(AccountId, Balance)>, parachain_id: ParaId, ) -> serde_json::Value { serde_json::json!({ @@ -130,17 +128,11 @@ pub fn parachain_genesis( "candidacyBond": initial_authorities.1, "desiredCandidates": 0u32, }, - "council": { - "members": council_members, - }, "duster": { "accountBlacklist": vec![get_account_id_from_seed::("Duster")], "rewardAccount": Some(get_account_id_from_seed::("Duster")), "dustAccount": Some(get_account_id_from_seed::("Duster")) }, - "elections": { - "members": elections, - }, "emaOracle": { }, "multiTransactionPayment": { diff --git a/node/src/chain_spec/paseo.rs b/node/src/chain_spec/paseo.rs index 96fa23f546..4fb4264c0e 100644 --- a/node/src/chain_spec/paseo.rs +++ b/node/src/chain_spec/paseo.rs @@ -68,8 +68,6 @@ pub fn _parachain_config_paseo() -> Result { INITIAL_BALANCE, ), // collator-02 ], - // council_members - vec![get_account_id_from_seed::("Alice")], // tech_committee_members vec![hex!["3418b257de81886bef265495f3609def9a083869f32ef5a03f7351956497d41a"].into()], // same as sudo // registered_assets @@ -81,8 +79,6 @@ pub fn _parachain_config_paseo() -> Result { vec![(1, Price::from_float(0.0000212)), (2, Price::from_float(0.000806))], // token_balances vec![], - // elections - vec![], // parachain ID PARA_ID.into(), ); diff --git a/node/src/chain_spec/rococo.rs b/node/src/chain_spec/rococo.rs index 0b34a954bd..a61a735152 100644 --- a/node/src/chain_spec/rococo.rs +++ b/node/src/chain_spec/rococo.rs @@ -66,8 +66,6 @@ pub fn _parachain_config_rococo() -> Result { INITIAL_BALANCE, ), // collator-02 ], - // council_members - vec![get_account_id_from_seed::("Alice")], // tech_committee_members vec![hex!["3418b257de81886bef265495f3609def9a083869f32ef5a03f7351956497d41a"].into()], // same as sudo // registered_assets @@ -79,8 +77,6 @@ pub fn _parachain_config_rococo() -> Result { vec![(1, Price::from_float(0.0000212)), (2, Price::from_float(0.000806))], // token_balances vec![], - // elections - vec![], // parachain ID PARA_ID.into(), ); diff --git a/runtime/basilisk/Cargo.toml b/runtime/basilisk/Cargo.toml index c4b45f20e0..5a85ecfdb0 100644 --- a/runtime/basilisk/Cargo.toml +++ b/runtime/basilisk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "basilisk-runtime" -version = "119.0.0" +version = "120.0.0" authors = ["GalacticCouncil"] edition = "2021" homepage = "https://github.com/galacticcouncil/Basilisk-node" diff --git a/runtime/basilisk/src/governance/mod.rs b/runtime/basilisk/src/governance/mod.rs index 2a9a0a2a32..4ab8562145 100644 --- a/runtime/basilisk/src/governance/mod.rs +++ b/runtime/basilisk/src/governance/mod.rs @@ -36,7 +36,7 @@ use sp_runtime::{traits::IdentityLookup, DispatchError}; pub mod origins; mod tracks; -// Old governance configurations. +// Old governance pallet, remove once storage is safe to wipe (6mo voting lockup). pub mod old; pub type TechCommitteeMajority = EnsureProportionAtLeast; diff --git a/runtime/basilisk/src/governance/old.rs b/runtime/basilisk/src/governance/old.rs index 3a8646862c..8ab47b4d5d 100644 --- a/runtime/basilisk/src/governance/old.rs +++ b/runtime/basilisk/src/governance/old.rs @@ -19,29 +19,12 @@ use crate::governance::TechnicalCollective; use crate::*; use primitives::constants::{ - currency::{CENTS, DOLLARS, UNITS}, + currency::DOLLARS, time::{DAYS, HOURS}, }; -use frame_support::{ - parameter_types, - sp_runtime::{Perbill, Percent}, - traits::{EitherOfDiverse, LockIdentifier}, -}; +use frame_support::parameter_types; use frame_system::{EnsureRoot, EnsureSigned}; -use pallet_collective::EnsureProportionAtLeast; -use sp_staking::currency_to_vote::U128CurrencyToVote; - -pub type MajorityCouncilOrRoot = - EitherOfDiverse, EnsureRoot>; -pub type UnanimousCouncilOrRoot = - EitherOfDiverse, EnsureRoot>; -pub type SuperMajorityCouncilOrRoot = - EitherOfDiverse, EnsureRoot>; -pub type UnanimousTechCommitteeOrRoot = - EitherOfDiverse, EnsureRoot>; -pub type MajorityTechCommitteeOrRoot = - EitherOfDiverse, EnsureRoot>; parameter_types! { pub const LaunchPeriod: BlockNumber = 3 * DAYS; @@ -75,23 +58,18 @@ impl pallet_democracy::Config for Runtime { type MaxProposals = MaxProposals; type MaxDeposits = ConstU32<100>; type MaxBlacklisted = ConstU32<100>; - /// A straight majority of the council can decide what their next motion is. - type ExternalOrigin = MajorityCouncilOrRoot; - /// A majority can have the next scheduled referendum be a straight majority-carries vote - type ExternalMajorityOrigin = MajorityCouncilOrRoot; - /// A unanimous council can have the next scheduled referendum be a straight default-carries - /// (NTB) vote. - type ExternalDefaultOrigin = UnanimousCouncilOrRoot; + type ExternalOrigin = EnsureRoot; + type ExternalMajorityOrigin = EnsureRoot; + type ExternalDefaultOrigin = EnsureRoot; /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote /// be tabled immediately and with a shorter voting/enactment period. - type FastTrackOrigin = MajorityTechCommitteeOrRoot; - type InstantOrigin = UnanimousTechCommitteeOrRoot; - // To cancel a proposal which has been passed, 2/3 of the council must agree to it. - type CancellationOrigin = SuperMajorityCouncilOrRoot; + type FastTrackOrigin = EnsureRoot; + type InstantOrigin = EnsureRoot; + type CancellationOrigin = EnsureRoot; type BlacklistOrigin = EnsureRoot; // To cancel a proposal before it has been passed, the technical committee must be unanimous or // Root must agree. - type CancelProposalOrigin = UnanimousTechCommitteeOrRoot; + type CancelProposalOrigin = EnsureRoot; // Any single technical committee member may veto a coming council proposal, however they can // only do it once and it lasts only for the cooloff period. type VetoOrigin = pallet_collective::EnsureMember; @@ -99,83 +77,3 @@ impl pallet_democracy::Config for Runtime { type Slash = Treasury; type SubmitOrigin = EnsureSigned; } - -parameter_types! { - // Bond for candidacy into governance - pub const CandidacyBond: Balance = 5 * DOLLARS; - // 1 storage item created, key size is 32 bytes, value size is 16+16. - pub const VotingBondBase: Balance = CENTS; - // additional data per vote is 32 bytes (account id). - pub const VotingBondFactor: Balance = CENTS; - pub const TermDuration: BlockNumber = 7 * DAYS; - pub const DesiredMembers: u32 = 7; - pub const DesiredRunnersUp: u32 = 9; - pub const ElectionsPhragmenPalletId: LockIdentifier = *b"phrelect"; - pub const MaxElectionCandidates: u32 = 100; - pub const MaxElectionVoters: u32 = 768; - pub const MaxVotesPerVoter: u32 = 10; -} - -impl pallet_elections_phragmen::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type PalletId = ElectionsPhragmenPalletId; - type Currency = Balances; - type ChangeMembers = Council; - type InitializeMembers = (); // Set to () if defined in chain spec - type CurrencyToVote = U128CurrencyToVote; - type CandidacyBond = CandidacyBond; - type VotingBondBase = VotingBondBase; - type VotingBondFactor = VotingBondFactor; - type LoserCandidate = Treasury; - type KickedMember = Treasury; - type DesiredMembers = DesiredMembers; - type DesiredRunnersUp = DesiredRunnersUp; - type TermDuration = TermDuration; - type MaxCandidates = MaxElectionCandidates; - type MaxVoters = MaxElectionVoters; - type MaxVotesPerVoter = MaxVotesPerVoter; - type WeightInfo = weights::pallet_elections_phragmen::BasiliskWeight; -} - -parameter_types! { - pub const CouncilMotionDuration: BlockNumber = 5 * DAYS; - pub const CouncilMaxProposals: u32 = 13; - pub const CouncilMaxMembers: u32 = 7; - pub MaxProposalWeight: Weight = Perbill::from_percent(50) * BlockWeights::get().max_block; -} - -type CouncilCollective = pallet_collective::Instance1; -impl pallet_collective::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type Proposal = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type MotionDuration = CouncilMotionDuration; - type MaxProposals = CouncilMaxProposals; - type MaxMembers = CouncilMaxMembers; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type WeightInfo = weights::pallet_collective::BasiliskWeight; // use the weights from TechnicalCommittee because we are not able to benchmark both pallets - type MaxProposalWeight = MaxProposalWeight; - type SetMembersOrigin = EnsureRoot; -} - -parameter_types! { - pub const DataDepositPerByte: Balance = CENTS; - pub const TipCountdown: BlockNumber = 24 * HOURS; - pub const TipFindersFee: Percent = Percent::from_percent(1); - pub const TipReportDepositBase: Balance = 10 * DOLLARS; - pub const TipReportDepositPerByte: Balance = CENTS; - pub const MaximumReasonLength: u32 = 1024; - pub const MaxTipAmount: u128 = 200_000_000 * UNITS; -} - -impl pallet_tips::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type MaximumReasonLength = MaximumReasonLength; - type DataDepositPerByte = DataDepositPerByte; - type TipCountdown = TipCountdown; - type TipFindersFee = TipFindersFee; - type TipReportDepositBase = TipReportDepositBase; - type MaxTipAmount = MaxTipAmount; - type Tippers = Elections; - type WeightInfo = weights::pallet_tips::BasiliskWeight; -} diff --git a/runtime/basilisk/src/lib.rs b/runtime/basilisk/src/lib.rs index 463d65fb19..5d6e70d80c 100644 --- a/runtime/basilisk/src/lib.rs +++ b/runtime/basilisk/src/lib.rs @@ -48,6 +48,7 @@ pub use governance::*; pub use system::*; pub use xcm::*; +use frame_support::parameter_types; use frame_support::sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{AccountIdConversion, BlakeTwo256, Block as BlockT}, @@ -99,7 +100,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("basilisk"), impl_name: create_runtime_str!("basilisk"), authoring_version: 1, - spec_version: 119, + spec_version: 120, impl_version: 0, apis: apis::RUNTIME_API_VERSIONS, transaction_version: 1, @@ -169,14 +170,12 @@ construct_runtime!( MultiTransactionPayment: pallet_transaction_multi_payment = 106, Treasury: pallet_treasury = 4, Utility: pallet_utility = 5, - //NOTE: 6 - is used by Scheduler which must be after cumulus_pallet_parachain_system + // NOTE: 6 - is used by Scheduler which must be after cumulus_pallet_parachain_system Democracy: pallet_democracy exclude_parts { Config } = 7, - Elections: pallet_elections_phragmen = 8, - Council: pallet_collective:: = 9, + // NOTE 7, 8, 9 are retired (used by gov v1) TechnicalCommittee: pallet_collective:: = 10, Vesting: orml_vesting = 11, Proxy: pallet_proxy = 12, - Tips: pallet_tips = 13, // The order of next 4 is important, and it cannot change. Authorship: pallet_authorship = 14, @@ -267,9 +266,63 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - pallet_collator_selection::migration::v2::MigrationToV2, + migrations::Migrations, >; +pub mod migrations { + use super::*; + use frame_support::traits::LockIdentifier; + use frame_system::pallet_prelude::BlockNumberFor; + + parameter_types! { + pub const CouncilPalletName: &'static str = "Council"; + // pub const TechnicalCommitteePalletName: &'static str = "TechnicalCommittee"; + pub const PhragmenElectionPalletName: &'static str = "Elections"; + // pub const TechnicalMembershipPalletName: &'static str = "TechnicalMembership"; + pub const TipsPalletName: &'static str = "Tips"; + pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect"; + pub const DataDepositPerByte: Balance = primitives::constants::currency::CENTS; + pub const TipReportDepositBase: Balance = 10 * primitives::constants::currency::DOLLARS; + } + + // Special Config for Gov V1 pallets, allowing us to run migrations for them without + // implementing their configs on [`Runtime`]. + pub struct UnlockConfig; + impl pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockConfig for UnlockConfig { + type Currency = Balances; + type MaxVotesPerVoter = ConstU32<16>; + type PalletId = PhragmenElectionPalletId; + type AccountId = AccountId; + type DbWeight = ::DbWeight; + type PalletName = PhragmenElectionPalletName; + } + impl pallet_tips::migrations::unreserve_deposits::UnlockConfig<()> for UnlockConfig { + type Currency = Balances; + type Hash = Hash; + type DataDepositPerByte = DataDepositPerByte; + type TipReportDepositBase = TipReportDepositBase; + type AccountId = AccountId; + type BlockNumber = BlockNumberFor; + type DbWeight = ::DbWeight; + type PalletName = TipsPalletName; + } + + pub type Migrations = ( + pallet_collator_selection::migration::v2::MigrationToV2, + // Unlock/unreserve balances from Gov v1 pallets that hold them + // https://github.com/paritytech/polkadot/issues/6749 + pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockAndUnreserveAllFunds, + pallet_tips::migrations::unreserve_deposits::UnreserveDeposits, + // Delete storage key/values from all Gov v1 pallets + frame_support::migrations::RemovePallet::DbWeight>, + frame_support::migrations::RemovePallet< + PhragmenElectionPalletName, + ::DbWeight, + >, + frame_support::migrations::RemovePallet::DbWeight>, + ); +} + #[cfg(feature = "runtime-benchmarks")] mod benches { frame_support::parameter_types! { @@ -286,11 +339,9 @@ mod benches { [pallet_balances, Balances] [pallet_timestamp, Timestamp] [pallet_democracy, Democracy] - [pallet_elections_phragmen, Elections] [pallet_treasury, Treasury] [pallet_scheduler, Scheduler] [pallet_utility, Utility] - [pallet_tips, Tips] [pallet_identity, Identity] [pallet_collective, TechnicalCommittee] [cumulus_pallet_xcmp_queue, XcmpQueue] diff --git a/runtime/basilisk/src/system.rs b/runtime/basilisk/src/system.rs index 9484d945aa..f57f903759 100644 --- a/runtime/basilisk/src/system.rs +++ b/runtime/basilisk/src/system.rs @@ -76,6 +76,7 @@ impl Contains for BaseFilter { RuntimeCall::Uniques(_) => false, RuntimeCall::PolkadotXcm(_) => false, RuntimeCall::OrmlXcm(_) => false, + RuntimeCall::Democracy(pallet_democracy::Call::propose { .. }) => false, _ => true, } } @@ -307,13 +308,7 @@ impl InstanceFilter for ProxyType { ProxyType::CancelProxy => matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })), ProxyType::Governance => matches!( c, - RuntimeCall::Democracy(..) - | RuntimeCall::Council(..) - | RuntimeCall::TechnicalCommittee(..) - | RuntimeCall::Elections(..) - | RuntimeCall::Treasury(..) - | RuntimeCall::Tips(..) - | RuntimeCall::Utility(..) + RuntimeCall::TechnicalCommittee(..) | RuntimeCall::Treasury(..) | RuntimeCall::Utility(..) ), ProxyType::Exchange => matches!(c, RuntimeCall::XYK(..) | RuntimeCall::LBP(..) | RuntimeCall::NFT(..)), // Transfer group doesn't include cross-chain transfers diff --git a/runtime/basilisk/src/weights/mod.rs b/runtime/basilisk/src/weights/mod.rs index a267cb75e5..ec969176fc 100644 --- a/runtime/basilisk/src/weights/mod.rs +++ b/runtime/basilisk/src/weights/mod.rs @@ -11,7 +11,6 @@ pub mod pallet_conviction_voting; pub mod pallet_currencies; pub mod pallet_democracy; pub mod pallet_duster; -pub mod pallet_elections_phragmen; pub mod pallet_ema_oracle; pub mod pallet_identity; pub mod pallet_lbp; @@ -26,7 +25,6 @@ pub mod pallet_route_executor; pub mod pallet_scheduler; pub mod pallet_state_trie_migration; pub mod pallet_timestamp; -pub mod pallet_tips; pub mod pallet_transaction_multi_payment; pub mod pallet_transaction_pause; pub mod pallet_treasury; diff --git a/runtime/basilisk/src/weights/pallet_democracy.rs b/runtime/basilisk/src/weights/pallet_democracy.rs index e5d8504399..c1b5b5e263 100644 --- a/runtime/basilisk/src/weights/pallet_democracy.rs +++ b/runtime/basilisk/src/weights/pallet_democracy.rs @@ -508,4 +508,4 @@ impl pallet_democracy::WeightInfo for BasiliskWeight .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } -} \ No newline at end of file +} diff --git a/runtime/basilisk/src/weights/pallet_elections_phragmen.rs b/runtime/basilisk/src/weights/pallet_elections_phragmen.rs deleted file mode 100644 index cdbd37e035..0000000000 --- a/runtime/basilisk/src/weights/pallet_elections_phragmen.rs +++ /dev/null @@ -1,314 +0,0 @@ -// This file is part of Basilisk. - -// Copyright (C) 2020-2023 Intergalactic, Limited (GIB). -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -//! Autogenerated weights for `pallet_elections_phragmen` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 -//! DATE: 2024-08-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` - -// Executed Command: -// frame-omni-bencher -// v1 -// benchmark -// pallet -// --runtime -// target/release/wbuild/basilisk-runtime/basilisk_runtime.compact.compressed.wasm -// --extrinsic -// -// --heap-pages=4096 -// --steps=50 -// --repeat=20 -// --template=scripts/pallet-weight-template.hbs -// --pallet -// pallet_elections_phragmen -// --output=./weights/pallet_elections_phragmen - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use core::marker::PhantomData; - -/// Weights for `pallet_elections_phragmen`. -pub struct WeightInfo(PhantomData); - -/// Weights for `pallet_elections_phragmen` using the Basilisk node and recommended hardware. -pub struct BasiliskWeight(PhantomData); -impl pallet_elections_phragmen::WeightInfo for BasiliskWeight { - /// Storage: `Elections::Candidates` (r:1 w:0) - /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::Members` (r:1 w:0) - /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::RunnersUp` (r:1 w:0) - /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::Voting` (r:1 w:1) - /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// 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 `v` is `[1, 10]`. - fn vote_equal(v: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `227 + v * (85 ±0)` - // Estimated: `4764 + v * (87 ±0)` - // Minimum execution time: 39_175_000 picoseconds. - Weight::from_parts(39_808_615, 4764) - // Standard Error: 4_611 - .saturating_add(Weight::from_parts(229_878, 0).saturating_mul(v.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - .saturating_add(Weight::from_parts(0, 87).saturating_mul(v.into())) - } - /// Storage: `Elections::Candidates` (r:1 w:0) - /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::Members` (r:1 w:0) - /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::RunnersUp` (r:1 w:0) - /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::Voting` (r:1 w:1) - /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// 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 `v` is `[2, 10]`. - fn vote_more(v: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `241 + v * (80 ±0)` - // Estimated: `4764 + v * (87 ±0)` - // Minimum execution time: 54_129_000 picoseconds. - Weight::from_parts(54_923_975, 4764) - // Standard Error: 5_785 - .saturating_add(Weight::from_parts(150_913, 0).saturating_mul(v.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - .saturating_add(Weight::from_parts(0, 87).saturating_mul(v.into())) - } - /// Storage: `Elections::Candidates` (r:1 w:0) - /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::Members` (r:1 w:0) - /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::RunnersUp` (r:1 w:0) - /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::Voting` (r:1 w:1) - /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// 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 `v` is `[2, 10]`. - fn vote_less(v: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `273 + v * (80 ±0)` - // Estimated: `4764 + v * (87 ±0)` - // Minimum execution time: 54_236_000 picoseconds. - Weight::from_parts(55_103_138, 4764) - // Standard Error: 5_184 - .saturating_add(Weight::from_parts(110_314, 0).saturating_mul(v.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - .saturating_add(Weight::from_parts(0, 87).saturating_mul(v.into())) - } - /// Storage: `Elections::Voting` (r:1 w:1) - /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// 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 remove_voter() -> Weight { - // Proof Size summary in bytes: - // Measured: `602` - // Estimated: `4764` - // Minimum execution time: 54_587_000 picoseconds. - Weight::from_parts(55_179_000, 4764) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } - /// Storage: `Elections::Candidates` (r:1 w:1) - /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::Members` (r:1 w:0) - /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::RunnersUp` (r:1 w:0) - /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `c` is `[1, 100]`. - fn submit_candidacy(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1218 + c * (48 ±0)` - // Estimated: `2703 + c * (48 ±0)` - // Minimum execution time: 38_939_000 picoseconds. - Weight::from_parts(39_691_635, 2703) - // Standard Error: 548 - .saturating_add(Weight::from_parts(57_937, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) - } - /// Storage: `Elections::Candidates` (r:1 w:1) - /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `c` is `[1, 100]`. - fn renounce_candidacy_candidate(c: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `264 + c * (48 ±0)` - // Estimated: `1744 + c * (48 ±0)` - // Minimum execution time: 34_275_000 picoseconds. - Weight::from_parts(35_159_106, 1744) - // Standard Error: 715 - .saturating_add(Weight::from_parts(33_313, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) - } - /// Storage: `Elections::Members` (r:1 w:1) - /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::RunnersUp` (r:1 w:1) - /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Prime` (r:1 w:1) - /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Proposals` (r:1 w:0) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Members` (r:0 w:1) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn renounce_candidacy_members() -> Weight { - // Proof Size summary in bytes: - // Measured: `1268` - // Estimated: `2753` - // Minimum execution time: 44_398_000 picoseconds. - Weight::from_parts(45_289_000, 2753) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - /// Storage: `Elections::RunnersUp` (r:1 w:1) - /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn renounce_candidacy_runners_up() -> Weight { - // Proof Size summary in bytes: - // Measured: `828` - // Estimated: `2313` - // Minimum execution time: 32_790_000 picoseconds. - Weight::from_parts(33_152_000, 2313) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - /// Storage: `Benchmark::Override` (r:0 w:0) - /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn remove_member_without_replacement() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 500_000_000_000 picoseconds. - Weight::from_parts(500_000_000_000, 0) - } - /// Storage: `Elections::Members` (r:1 w:1) - /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Elections::RunnersUp` (r:1 w:1) - /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Prime` (r:1 w:1) - /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Proposals` (r:1 w:0) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Members` (r:0 w:1) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - fn remove_member_with_replacement() -> Weight { - // Proof Size summary in bytes: - // Measured: `1268` - // Estimated: `3593` - // Minimum execution time: 67_856_000 picoseconds. - Weight::from_parts(69_572_000, 3593) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(5_u64)) - } - /// Storage: `Elections::Voting` (r:385 w:384) - /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Elections::Members` (r:1 w:0) - /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::RunnersUp` (r:1 w:0) - /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::Candidates` (r:1 w:0) - /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Balances::Locks` (r:384 w:384) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:384 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:384 w:384) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `v` is `[384, 768]`. - /// The range of component `d` is `[0, 384]`. - fn clean_defunct_voters(v: u32, d: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + d * (630 ±0) + v * (57 ±0)` - // Estimated: `32060 + d * (3774 ±1) + v * (24 ±0)` - // Minimum execution time: 10_336_000 picoseconds. - Weight::from_parts(10_931_000, 32060) - // Standard Error: 10_413 - .saturating_add(Weight::from_parts(98_834, 0).saturating_mul(v.into())) - // Standard Error: 22_676 - .saturating_add(Weight::from_parts(61_735_059, 0).saturating_mul(d.into())) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(d.into()))) - .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(d.into()))) - .saturating_add(Weight::from_parts(0, 3774).saturating_mul(d.into())) - .saturating_add(Weight::from_parts(0, 24).saturating_mul(v.into())) - } - /// Storage: `Elections::Candidates` (r:1 w:1) - /// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::Members` (r:1 w:1) - /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::RunnersUp` (r:1 w:1) - /// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Elections::Voting` (r:769 w:0) - /// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Council::Proposals` (r:1 w:0) - /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:84 w:84) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Elections::ElectionRounds` (r:1 w:1) - /// Proof: `Elections::ElectionRounds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Members` (r:0 w:1) - /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Council::Prime` (r:0 w:1) - /// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `c` is `[1, 100]`. - /// The range of component `v` is `[1, 768]`. - /// The range of component `e` is `[768, 7680]`. - fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0 + c * (9 ±0) + e * (27 ±0) + v * (414 ±0)` - // Estimated: `278441 + c * (2405 ±3) + e * (14 ±0) + v * (2572 ±3)` - // Minimum execution time: 3_258_751_000 picoseconds. - Weight::from_parts(3_266_513_000, 278441) - // Standard Error: 359_672 - .saturating_add(Weight::from_parts(16_487_259, 0).saturating_mul(v.into())) - // Standard Error: 37_522 - .saturating_add(Weight::from_parts(1_139_946, 0).saturating_mul(e.into())) - .saturating_add(T::DbWeight::get().reads(32_u64)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) - .saturating_add(T::DbWeight::get().writes(6_u64)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_parts(0, 2405).saturating_mul(c.into())) - .saturating_add(Weight::from_parts(0, 14).saturating_mul(e.into())) - .saturating_add(Weight::from_parts(0, 2572).saturating_mul(v.into())) - } -} \ No newline at end of file diff --git a/runtime/basilisk/src/weights/pallet_tips.rs b/runtime/basilisk/src/weights/pallet_tips.rs deleted file mode 100644 index 4837e94ab6..0000000000 --- a/runtime/basilisk/src/weights/pallet_tips.rs +++ /dev/null @@ -1,161 +0,0 @@ -// This file is part of Basilisk. - -// Copyright (C) 2020-2023 Intergalactic, Limited (GIB). -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -//! Autogenerated weights for `pallet_tips` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 -//! DATE: 2024-08-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` - -// Executed Command: -// frame-omni-bencher -// v1 -// benchmark -// pallet -// --runtime -// target/release/wbuild/basilisk-runtime/basilisk_runtime.compact.compressed.wasm -// --extrinsic -// -// --heap-pages=4096 -// --steps=50 -// --repeat=20 -// --template=scripts/pallet-weight-template.hbs -// --pallet -// pallet_tips -// --output=./weights/pallet_tips - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use core::marker::PhantomData; - -/// Weights for `pallet_tips`. -pub struct WeightInfo(PhantomData); - -/// Weights for `pallet_tips` using the Basilisk node and recommended hardware. -pub struct BasiliskWeight(PhantomData); -impl pallet_tips::WeightInfo for BasiliskWeight { - /// Storage: `Tips::Reasons` (r:1 w:1) - /// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Tips::Tips` (r:1 w:1) - /// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `r` is `[0, 1024]`. - fn report_awesome(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `3465` - // Minimum execution time: 37_077_000 picoseconds. - Weight::from_parts(37_892_785, 3465) - // Standard Error: 33 - .saturating_add(Weight::from_parts(1_738, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } - /// Storage: `Tips::Tips` (r:1 w:1) - /// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Tips::Reasons` (r:0 w:1) - /// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn retract_tip() -> Weight { - // Proof Size summary in bytes: - // Measured: `199` - // Estimated: `3664` - // Minimum execution time: 36_309_000 picoseconds. - Weight::from_parts(36_864_000, 3664) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } - /// Storage: `Elections::Members` (r:1 w:0) - /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Tips::Reasons` (r:1 w:1) - /// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Tips::Tips` (r:0 w:1) - /// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `r` is `[0, 1024]`. - /// The range of component `t` is `[1, 7]`. - fn tip_new(r: u32, t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `8 + t * (64 ±0)` - // Estimated: `3473 + t * (64 ±0)` - // Minimum execution time: 20_788_000 picoseconds. - Weight::from_parts(21_952_844, 3473) - // Standard Error: 31 - .saturating_add(Weight::from_parts(1_650, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(t.into())) - } - /// Storage: `Elections::Members` (r:1 w:0) - /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Tips::Tips` (r:1 w:1) - /// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `t` is `[1, 7]`. - fn tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `211 + t * (112 ±0)` - // Estimated: `3676 + t * (112 ±0)` - // Minimum execution time: 17_703_000 picoseconds. - Weight::from_parts(18_104_368, 3676) - // Standard Error: 3_036 - .saturating_add(Weight::from_parts(179_123, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) - .saturating_add(Weight::from_parts(0, 112).saturating_mul(t.into())) - } - /// Storage: `Tips::Tips` (r:1 w:1) - /// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Elections::Members` (r:1 w:0) - /// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Tips::Reasons` (r:0 w:1) - /// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `t` is `[1, 7]`. - fn close_tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `211 + t * (112 ±0)` - // Estimated: `3676 + t * (112 ±0)` - // Minimum execution time: 73_506_000 picoseconds. - Weight::from_parts(74_203_921, 3676) - // Standard Error: 5_193 - .saturating_add(Weight::from_parts(225_442, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - .saturating_add(Weight::from_parts(0, 112).saturating_mul(t.into())) - } - /// Storage: `Tips::Tips` (r:1 w:1) - /// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Tips::Reasons` (r:0 w:1) - /// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `t` is `[1, 7]`. - fn slash_tip(t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `247` - // Estimated: `3712` - // Minimum execution time: 17_028_000 picoseconds. - Weight::from_parts(17_659_551, 3712) - // Standard Error: 2_757 - .saturating_add(Weight::from_parts(26_655, 0).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(1_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) - } -} \ No newline at end of file