diff --git a/runtimes/common/src/constants.rs b/runtimes/common/src/constants.rs index ef7403663..0b62bbb23 100644 --- a/runtimes/common/src/constants.rs +++ b/runtimes/common/src/constants.rs @@ -138,11 +138,11 @@ parameter_types! { pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons = WithdrawReasons::except(WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE); /// Deposits per byte - pub const ByteDeposit: Balance = deposit(0, 1); + pub const ByteDeposit: Balance = 0; /// Index Pallet. Deposit taken for an account index - pub const IndicesDeposit: Balance = deposit(1, MAX_INDICES_BYTE_LENGTH); + pub const IndicesDeposit: Balance = 0; /// CType Pallet. Per byte fee for a ctype. - pub const CtypeFee: Balance = MILLI_KILT; + pub const CtypeFee: Balance = 0; } pub mod attestation { @@ -150,7 +150,7 @@ pub mod attestation { /// The size is checked in the runtime by a test. pub const MAX_ATTESTATION_BYTE_LENGTH: u32 = 179; - pub const ATTESTATION_DEPOSIT: Balance = deposit(2, MAX_ATTESTATION_BYTE_LENGTH); + pub const ATTESTATION_DEPOSIT: Balance = 0; parameter_types! { pub const MaxDelegatedAttestations: u32 = 1000; @@ -163,11 +163,8 @@ pub mod bonded_coins { /// The size is checked in the runtime by a test. pub const MAX_POOL_BYTE_LENGTH: u32 = 987; - pub const BASE_DEPOSIT: Balance = deposit(1, MAX_POOL_BYTE_LENGTH); - const ASSET_ID_BYTE_LENGTH: u32 = 8; - /// https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/assets/src/types.rs#L188 - const ASSET_METADATA_BYTE_LENGTH: u32 = 26; - pub const DEPOSIT_PER_CURRENCY: Balance = deposit(1, ASSET_ID_BYTE_LENGTH + (2 * ASSET_METADATA_BYTE_LENGTH)); + pub const BASE_DEPOSIT: Balance = 0; + pub const DEPOSIT_PER_CURRENCY: Balance = 0; pub const MAX_CURRENCIES: u32 = 50; pub const MAX_DENOMINATION: u8 = 15; pub const MAX_STRING_LENGTH: u32 = crate::constants::bonded_assets::STRING_LIMIT; @@ -210,7 +207,7 @@ pub mod delegation { use super::*; - pub const DELEGATION_DEPOSIT: Balance = KILT; + pub const DELEGATION_DEPOSIT: Balance = 0; pub const MAX_SIGNATURE_BYTE_LENGTH: u16 = 64; pub const MAX_PARENT_CHECKS: u32 = 5; pub const MAX_REVOCATIONS: u32 = 5; @@ -224,7 +221,7 @@ pub mod delegation { pub const MaxRemovals: u32 = MAX_REMOVALS; #[derive(Clone, TypeInfo)] pub const MaxChildren: u32 = MAX_CHILDREN; - pub const DelegationDeposit: Balance = DELEGATION_DEPOSIT; + pub const DelegationDeposit: Balance = 0; } } @@ -241,7 +238,7 @@ pub mod dip_provider { pub const MAX_LINKED_ACCOUNTS: u32 = 10; // Commitment are 32-byte hashes. pub const MAX_COMMITMENT_BYTE_LENGTH: u32 = 32; - pub const COMMITMENT_DEPOSIT: Balance = deposit(1, MAX_COMMITMENT_BYTE_LENGTH); + pub const COMMITMENT_DEPOSIT: Balance = 0; } pub mod staking { @@ -404,8 +401,8 @@ pub mod multisig { parameter_types! { pub const MaxSignitors: u32 = 64; - pub const DepositBase: Balance = DEPOSIT_STORAGE_ITEM; - pub const DepositFactor: Balance = DEPOSIT_STORAGE_BYTE; + pub const DepositBase: Balance = 0; + pub const DepositFactor: Balance = 0; } } @@ -441,11 +438,11 @@ pub mod did { + MAX_NUMBER_OF_URLS_PER_SERVICE * MAX_SERVICE_URL_LENGTH + 8; - pub const DID_BASE_DEPOSIT: Balance = 2 * KILT; - pub const KEY_DEPOSIT: Balance = deposit(0, MAX_KEY_LENGTH); - pub const SERVICE_ENDPOINT_DEPOSIT: Balance = deposit(1, MAX_SERVICE_ENDPOINT_BYTE_LENGTH); + pub const DID_BASE_DEPOSIT: Balance = 0; + pub const KEY_DEPOSIT: Balance = 0; + pub const SERVICE_ENDPOINT_DEPOSIT: Balance = 0; - pub const DID_FEE: Balance = 50 * MILLI_KILT; + pub const DID_FEE: Balance = 0; pub const MAX_KEY_AGREEMENT_KEYS: u32 = 10; // This has been reduced from the previous 100, but it might still need // fine-tuning depending on our needs. @@ -488,7 +485,7 @@ pub mod did_lookup { /// The size is checked in the runtime by a test. pub const MAX_CONNECTION_BYTE_LENGTH: u32 = 80; - pub const DID_CONNECTION_DEPOSIT: Balance = deposit(1, MAX_CONNECTION_BYTE_LENGTH); + pub const DID_CONNECTION_DEPOSIT: Balance = 0; parameter_types! { pub const DidLookupDeposit: Balance = DID_CONNECTION_DEPOSIT; @@ -516,12 +513,12 @@ pub mod proxy { parameter_types! { // One storage item; key size 32, value size 8; . - pub const ProxyDepositBase: Balance = deposit(1, 8); + pub const ProxyDepositBase: Balance = 0; // Additional storage item size of 33 bytes. - pub const ProxyDepositFactor: Balance = deposit(0, 33); + pub const ProxyDepositFactor: Balance = 0; pub const MaxProxies: u16 = 10; - pub const AnnouncementDepositBase: Balance = deposit(1, 8); - pub const AnnouncementDepositFactor: Balance = deposit(0, 66); + pub const AnnouncementDepositBase: Balance = 0; + pub const AnnouncementDepositFactor: Balance = 0; pub const MaxPending: u16 = 10; } } @@ -534,30 +531,7 @@ pub mod web3_names { /// The size is checked in the runtime by a test. pub const MAX_NAME_BYTE_LENGTH: u32 = 121; - pub const DEPOSIT: Balance = deposit(2, MAX_NAME_BYTE_LENGTH); - - parameter_types! { - pub const Web3NameDeposit: Balance = DEPOSIT; - pub const MinNameLength: u32 = MIN_LENGTH; - pub const MaxNameLength: u32 = MAX_LENGTH; - } -} - -pub mod dot_names { - use super::*; - - const MIN_NAME_LENGTH: u32 = 3; - const MAX_NAME_LENGTH: u32 = 28; - - pub const DOT_NAME_SUFFIX: &str = ".dot"; - #[allow(clippy::as_conversions)] - pub const MIN_LENGTH: u32 = MIN_NAME_LENGTH + DOT_NAME_SUFFIX.len() as u32; - #[allow(clippy::as_conversions)] - pub const MAX_LENGTH: u32 = MAX_NAME_LENGTH + DOT_NAME_SUFFIX.len() as u32; - - /// The size is checked in the runtime by a test. - pub const MAX_NAME_BYTE_LENGTH: u32 = 121; - pub const DEPOSIT: Balance = deposit(2, MAX_NAME_BYTE_LENGTH); + pub const DEPOSIT: Balance = 0; parameter_types! { pub const Web3NameDeposit: Balance = DEPOSIT; @@ -569,7 +543,7 @@ pub mod dot_names { pub mod preimage { use super::*; parameter_types! { - pub const PreimageBaseDeposit: Balance = deposit(2, 64); + pub const PreimageBaseDeposit: Balance = 0; } } @@ -583,7 +557,7 @@ pub mod tips { pub const MaximumReasonLength: u32 = MAXIMUM_REASON_LENGTH; pub const TipCountdown: BlockNumber = DAYS; pub const TipFindersFee: Percent = Percent::from_percent(0); - pub const TipReportDepositBase: Balance = deposit(1, 1); + pub const TipReportDepositBase: Balance = 1; pub const MaxTipAmount: Balance = 100_000 * KILT; } } @@ -608,7 +582,7 @@ pub mod public_credentials { /// The size is checked in the runtime by a test. pub const MAX_PUBLIC_CREDENTIAL_STORAGE_LENGTH: u32 = 419; // Each credential would have a different deposit, so no multiplier here - pub const PUBLIC_CREDENTIAL_DEPOSIT: Balance = deposit(1, MAX_PUBLIC_CREDENTIAL_STORAGE_LENGTH); + pub const PUBLIC_CREDENTIAL_DEPOSIT: Balance = 0; parameter_types! { pub const Deposit: Balance = PUBLIC_CREDENTIAL_DEPOSIT; diff --git a/runtimes/peregrine/src/benchmarks/mod.rs b/runtimes/peregrine/src/benchmarks/mod.rs index 7bc508d30..19a42e18c 100644 --- a/runtimes/peregrine/src/benchmarks/mod.rs +++ b/runtimes/peregrine/src/benchmarks/mod.rs @@ -39,9 +39,9 @@ use xcm::v4::{Asset, Assets, Fungibility, Location}; use crate::{ xcm::XcmConfig, AllPalletsWithSystem, AssetSwitchPool1, Attestation, Balances, BondedCurrencies, BondedFungibles, Collators, Council, Ctype, Delegation, Democracy, DepositStorage, Did, DidLookup, DipProvider, Fungibles, Indices, - Inflation, MessageQueue, Migration, Multisig, ParachainStaking, ParachainSystem, Preimage, Proxy, - PublicCredentials, Runtime, RuntimeEvent, Scheduler, Sudo, System, TechnicalCommittee, TechnicalMembership, - Timestamp, Tips, TipsMembership, Treasury, Utility, Vesting, Web3Names, + MessageQueue, Migration, Multisig, ParachainStaking, ParachainSystem, Preimage, Proxy, PublicCredentials, Runtime, + RuntimeEvent, Scheduler, Sudo, System, TechnicalCommittee, TechnicalMembership, Timestamp, Tips, TipsMembership, + Treasury, Utility, Vesting, Web3Names, }; pub(crate) mod asset_switch; @@ -81,7 +81,6 @@ define_benchmarks!( [attestation, Attestation] [delegation, Delegation] [did, Did] - [pallet_inflation, Inflation] [public_credentials, PublicCredentials] [pallet_xcm, pallet_xcm::benchmarking::Pallet::] [pallet_migration, Migration] diff --git a/runtimes/peregrine/src/governance.rs b/runtimes/peregrine/src/governance.rs index 5476e107d..6969ed983 100644 --- a/runtimes/peregrine/src/governance.rs +++ b/runtimes/peregrine/src/governance.rs @@ -89,7 +89,7 @@ impl pallet_democracy::Config for Runtime { parameter_types! { pub const ProposalBond: Permill = Permill::from_percent(5); - pub const Burn: Permill = Permill::zero(); + pub const Burn: Permill = Permill::from_percent(100); pub TreasuryAccount: AccountId = Treasury::account_id(); } diff --git a/runtimes/peregrine/src/kilt/mod.rs b/runtimes/peregrine/src/kilt/mod.rs index 0f548921e..fd749c29b 100644 --- a/runtimes/peregrine/src/kilt/mod.rs +++ b/runtimes/peregrine/src/kilt/mod.rs @@ -28,7 +28,7 @@ use runtime_common::{ NativeAndForeignAssets as NativeAndForeignAssetsType, TargetFromLeft, }, deposits::DepositNamespace, - AccountId, Balance, SendDustAndFeesToTreasury, + AccountId, Balance, }; use sp_core::{crypto::ByteArray, ConstU128, ConstU32, ConstU8}; use sp_runtime::AccountId32; @@ -69,20 +69,12 @@ impl parachain_staking::Config for Runtime { type MaxUnstakeRequests = constants::staking::MaxUnstakeRequests; type NetworkRewardRate = constants::staking::NetworkRewardRate; type NetworkRewardStart = constants::staking::NetworkRewardStart; - type NetworkRewardBeneficiary = SendDustAndFeesToTreasury; + type NetworkRewardBeneficiary = (); type WeightInfo = weights::parachain_staking::WeightInfo; const BLOCKS_PER_YEAR: BlockNumberFor = constants::BLOCKS_PER_YEAR; } -impl pallet_inflation::Config for Runtime { - type Currency = Balances; - type InitialPeriodLength = constants::treasury::InitialPeriodLength; - type InitialPeriodReward = constants::treasury::InitialPeriodReward; - type Beneficiary = SendDustAndFeesToTreasury; - type WeightInfo = weights::pallet_inflation::WeightInfo; -} - parameter_types! { pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } diff --git a/runtimes/peregrine/src/lib.rs b/runtimes/peregrine/src/lib.rs index 3bb07492a..21011dab6 100644 --- a/runtimes/peregrine/src/lib.rs +++ b/runtimes/peregrine/src/lib.rs @@ -158,7 +158,7 @@ construct_runtime! { Delegation: delegation = 63, Did: did = 64, // DELETED: CrowdloanContributors = 65, - Inflation: pallet_inflation = 66, + // DELETED: Inflation: pallet_inflation = 66, DidLookup: pallet_did_lookup = 67, Web3Names: pallet_web3_names = 68, PublicCredentials: public_credentials = 69, diff --git a/runtimes/peregrine/src/migrations/mod.rs b/runtimes/peregrine/src/migrations/mod.rs index 76762e1c0..8d6fd5ef8 100644 --- a/runtimes/peregrine/src/migrations/mod.rs +++ b/runtimes/peregrine/src/migrations/mod.rs @@ -22,16 +22,12 @@ use runtime_common::constants; use crate::{weights, Balances, Runtime, RuntimeEvent}; parameter_types! { - pub const DmpPalletName: &'static str = "DmpQueue"; - pub const DotNames: &'static str = "DotNames"; - pub const UniqueLinking: &'static str = "UniqueLinking"; + pub const Inflation: &'static str = "Inflation"; } pub type RuntimeMigrations = ( pallet_xcm::migration::MigrateToLatestXcmVersion, - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, + frame_support::migrations::RemovePallet::DbWeight>, pallet_bonded_coins::migrations::v1::MigrateV0ToV1, ); diff --git a/runtimes/peregrine/src/weights/mod.rs b/runtimes/peregrine/src/weights/mod.rs index d9e019950..e6928d4e0 100644 --- a/runtimes/peregrine/src/weights/mod.rs +++ b/runtimes/peregrine/src/weights/mod.rs @@ -35,7 +35,6 @@ pub mod pallet_deposit_storage; pub mod pallet_did_lookup; pub mod pallet_dip_provider; pub mod pallet_indices; -pub mod pallet_inflation; pub mod pallet_membership; pub mod pallet_message_queue; pub mod pallet_migration; diff --git a/runtimes/peregrine/src/weights/pallet_inflation.rs b/runtimes/peregrine/src/weights/pallet_inflation.rs deleted file mode 100644 index 1a60573d3..000000000 --- a/runtimes/peregrine/src/weights/pallet_inflation.rs +++ /dev/null @@ -1,88 +0,0 @@ -// KILT Blockchain – -// Copyright (C) 2025, KILT Foundation - -// The KILT Blockchain 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. - -// The KILT Blockchain is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// If you feel like getting in touch with us, you can do so at - -//! Autogenerated weights for `pallet_inflation` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 33.0.0 -//! DATE: 2024-06-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `eyrie-7`, CPU: `Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/kilt-parachain -// benchmark -// pallet -// --template=.maintain/runtime-weight-template.hbs -// --header=HEADER-GPL -// --wasm-execution=compiled -// --heap-pages=4096 -// --steps=50 -// --repeat=20 -// --chain=dev -// --pallet=pallet-inflation -// --extrinsic=* -// --output=./runtimes/peregrine/src/weights/pallet_inflation.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_imports)] -#![allow(clippy::as_conversions)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_inflation`. -pub struct WeightInfo(PhantomData); -impl pallet_inflation::WeightInfo for WeightInfo { - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(132), added: 2607, mode: `MaxEncodedLen`) - fn on_initialize_mint_to_treasury() -> Weight { - // Proof Size summary in bytes: - // Measured: `107` - // Estimated: `3597` - // Minimum execution time: 19_289_000 picoseconds. - Weight::from_parts(19_441_000, 0) - .saturating_add(Weight::from_parts(0, 3597)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - fn on_initialize_no_action() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 222_000 picoseconds. - Weight::from_parts(228_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } -} - -#[cfg(test)] -mod tests { - #[test] - fn test_on_initialize_mint_to_treasury() { - assert!( - ::BlockWeights::get() - .per_class - .get(frame_support::dispatch::DispatchClass::Normal) - .max_extrinsic - .unwrap_or_else(::max_value) - .proof_size() - > 3597 - ); - } -} diff --git a/runtimes/spiritnet/src/benchmarks/mod.rs b/runtimes/spiritnet/src/benchmarks/mod.rs index ee4356ec5..e26c2e22b 100644 --- a/runtimes/spiritnet/src/benchmarks/mod.rs +++ b/runtimes/spiritnet/src/benchmarks/mod.rs @@ -38,10 +38,10 @@ use xcm::v4::{Asset, Assets, Fungibility, Location}; use crate::{ xcm::XcmConfig, AllPalletsWithSystem, AssetSwitchPool1, Attestation, Balances, Collators, Council, Ctype, - Delegation, Democracy, DepositStorage, Did, DidLookup, DipProvider, Fungibles, Indices, Inflation, MessageQueue, - Migration, Multisig, ParachainStaking, ParachainSystem, Preimage, Proxy, PublicCredentials, Runtime, RuntimeEvent, - Scheduler, System, TechnicalCommittee, TechnicalMembership, Timestamp, Tips, TipsMembership, Treasury, Utility, - Vesting, Web3Names, + Delegation, Democracy, DepositStorage, Did, DidLookup, DipProvider, Fungibles, Indices, MessageQueue, Migration, + Multisig, ParachainStaking, ParachainSystem, Preimage, Proxy, PublicCredentials, Runtime, RuntimeEvent, Scheduler, + System, TechnicalCommittee, TechnicalMembership, Timestamp, Tips, TipsMembership, Treasury, Utility, Vesting, + Web3Names, }; pub(crate) mod asset_switch; @@ -79,7 +79,6 @@ define_benchmarks!( [attestation, Attestation] [delegation, Delegation] [did, Did] - [pallet_inflation, Inflation] [public_credentials, PublicCredentials] [pallet_xcm, pallet_xcm::benchmarking::Pallet::] [pallet_migration, Migration] diff --git a/runtimes/spiritnet/src/kilt/mod.rs b/runtimes/spiritnet/src/kilt/mod.rs index 5d57bcd16..078615c68 100644 --- a/runtimes/spiritnet/src/kilt/mod.rs +++ b/runtimes/spiritnet/src/kilt/mod.rs @@ -19,9 +19,7 @@ use frame_support::parameter_types; use frame_system::{pallet_prelude::BlockNumberFor, EnsureRoot, EnsureSigned}; use pallet_asset_switch::xcm::{AccountId32ToAccountId32JunctionConverter, MatchesSwitchPairXcmFeeFungibleAsset}; -use runtime_common::{ - asset_switch::hooks::RestrictSwitchDestinationToSelf, AccountId, Balance, SendDustAndFeesToTreasury, -}; +use runtime_common::{asset_switch::hooks::RestrictSwitchDestinationToSelf, AccountId, Balance}; use xcm_builder::{FungiblesAdapter, NoChecking}; use crate::{ @@ -56,20 +54,12 @@ impl parachain_staking::Config for Runtime { type MaxUnstakeRequests = constants::staking::MaxUnstakeRequests; type NetworkRewardRate = constants::staking::NetworkRewardRate; type NetworkRewardStart = constants::staking::NetworkRewardStart; - type NetworkRewardBeneficiary = SendDustAndFeesToTreasury; + type NetworkRewardBeneficiary = (); type WeightInfo = weights::parachain_staking::WeightInfo; const BLOCKS_PER_YEAR: BlockNumberFor = constants::BLOCKS_PER_YEAR; } -impl pallet_inflation::Config for Runtime { - type Currency = Balances; - type InitialPeriodLength = constants::treasury::InitialPeriodLength; - type InitialPeriodReward = constants::treasury::InitialPeriodReward; - type Beneficiary = SendDustAndFeesToTreasury; - type WeightInfo = weights::pallet_inflation::WeightInfo; -} - parameter_types! { pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } diff --git a/runtimes/spiritnet/src/lib.rs b/runtimes/spiritnet/src/lib.rs index fec68bca9..6a49ca8b1 100644 --- a/runtimes/spiritnet/src/lib.rs +++ b/runtimes/spiritnet/src/lib.rs @@ -154,7 +154,7 @@ construct_runtime! { Delegation: delegation = 63, Did: did = 64, // DELETED: CrowdloanContributors = 65, - Inflation: pallet_inflation = 66, + // DELETED: Inflation: pallet_inflation = 66, DidLookup: pallet_did_lookup = 67, Web3Names: pallet_web3_names = 68, PublicCredentials: public_credentials = 69, diff --git a/runtimes/spiritnet/src/migrations/mod.rs b/runtimes/spiritnet/src/migrations/mod.rs index f1e8d2eb7..a2458c709 100644 --- a/runtimes/spiritnet/src/migrations/mod.rs +++ b/runtimes/spiritnet/src/migrations/mod.rs @@ -22,12 +22,13 @@ use runtime_common::constants; use crate::{weights, Balances, Runtime, RuntimeEvent}; parameter_types! { - pub const DmpPalletName: &'static str = "DmpQueue"; + pub const Inflation: &'static str = "Inflation"; + } pub type RuntimeMigrations = ( pallet_xcm::migration::MigrateToLatestXcmVersion, - frame_support::migrations::RemovePallet::DbWeight>, + frame_support::migrations::RemovePallet::DbWeight>, ); impl pallet_migration::Config for Runtime { diff --git a/runtimes/spiritnet/src/weights/mod.rs b/runtimes/spiritnet/src/weights/mod.rs index bbbd83504..b4f54e293 100644 --- a/runtimes/spiritnet/src/weights/mod.rs +++ b/runtimes/spiritnet/src/weights/mod.rs @@ -33,7 +33,6 @@ pub mod pallet_deposit_storage; pub mod pallet_did_lookup; pub mod pallet_dip_provider; pub mod pallet_indices; -pub mod pallet_inflation; pub mod pallet_membership; pub mod pallet_message_queue; pub mod pallet_migration; diff --git a/runtimes/spiritnet/src/weights/pallet_inflation.rs b/runtimes/spiritnet/src/weights/pallet_inflation.rs deleted file mode 100644 index 0adc2ceb4..000000000 --- a/runtimes/spiritnet/src/weights/pallet_inflation.rs +++ /dev/null @@ -1,88 +0,0 @@ -// KILT Blockchain – -// Copyright (C) 2025, KILT Foundation - -// The KILT Blockchain 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. - -// The KILT Blockchain is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -// If you feel like getting in touch with us, you can do so at - -//! Autogenerated weights for `pallet_inflation` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 33.0.0 -//! DATE: 2024-06-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `eyrie-7`, CPU: `Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("spiritnet-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/kilt-parachain -// benchmark -// pallet -// --template=.maintain/runtime-weight-template.hbs -// --header=HEADER-GPL -// --wasm-execution=compiled -// --heap-pages=4096 -// --steps=50 -// --repeat=20 -// --chain=spiritnet-dev -// --pallet=pallet-inflation -// --extrinsic=* -// --output=./runtimes/spiritnet/src/weights/pallet_inflation.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_imports)] -#![allow(clippy::as_conversions)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_inflation`. -pub struct WeightInfo(PhantomData); -impl pallet_inflation::WeightInfo for WeightInfo { - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(132), added: 2607, mode: `MaxEncodedLen`) - fn on_initialize_mint_to_treasury() -> Weight { - // Proof Size summary in bytes: - // Measured: `107` - // Estimated: `3597` - // Minimum execution time: 19_031_000 picoseconds. - Weight::from_parts(19_533_000, 0) - .saturating_add(Weight::from_parts(0, 3597)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - fn on_initialize_no_action() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 201_000 picoseconds. - Weight::from_parts(224_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } -} - -#[cfg(test)] -mod tests { - #[test] - fn test_on_initialize_mint_to_treasury() { - assert!( - ::BlockWeights::get() - .per_class - .get(frame_support::dispatch::DispatchClass::Normal) - .max_extrinsic - .unwrap_or_else(::max_value) - .proof_size() - > 3597 - ); - } -}