From 8b238f8af9bc976c45b20028aa5d3cdc98d327f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dino=20Pa=C4=8Dandi?= <3002868+Dinonard@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:30:35 +0100 Subject: [PATCH] Tier param setting call (#1421) * Tier param setting call * Cleanup & benchmarks * REmove todo * Add event * Review comments * Update migration * Fix * Fix comment * Weights updates --- .github/workflows/README.md | 4 +- pallets/dapp-staking/src/benchmarking/mod.rs | 22 + .../dapp-staking/src/benchmarking/utils.rs | 3 +- pallets/dapp-staking/src/lib.rs | 41 +- pallets/dapp-staking/src/migration.rs | 77 +- pallets/dapp-staking/src/test/mock.rs | 5 +- pallets/dapp-staking/src/test/tests.rs | 71 +- pallets/dapp-staking/src/test/tests_types.rs | 4 +- pallets/dapp-staking/src/types.rs | 8 +- pallets/dapp-staking/src/weights.rs | 1135 +++++++++-------- precompiles/dapp-staking/src/test/mock.rs | 3 +- primitives/src/dapp_staking.rs | 16 +- runtime/astar/src/lib.rs | 7 +- .../astar/src/weights/pallet_dapp_staking.rs | 240 ++-- runtime/shibuya/src/lib.rs | 7 +- .../src/weights/pallet_dapp_staking.rs | 238 ++-- runtime/shiden/src/lib.rs | 20 +- .../shiden/src/weights/pallet_dapp_staking.rs | 243 ++-- 18 files changed, 1226 insertions(+), 918 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index c3ba6487e0..f49159f8c0 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -17,13 +17,13 @@ Usage /bench astar-dev pallet_balances # benchmark multiple pallets -/bench astar-dev pallet_balances,pallet_dapps_staking +/bench astar-dev pallet_balances,pallet_dapp_staking # benchmark all pallets /bench astar-dev all # benchmark multiple runtimes with multiple pallets -/bench astar-dev,shibuya-dev pallet_balances,pallet_dapps_staking +/bench astar-dev,shibuya-dev pallet_balances,pallet_dapp_staking ``` diff --git a/pallets/dapp-staking/src/benchmarking/mod.rs b/pallets/dapp-staking/src/benchmarking/mod.rs index a1092dedfd..461977c8bf 100644 --- a/pallets/dapp-staking/src/benchmarking/mod.rs +++ b/pallets/dapp-staking/src/benchmarking/mod.rs @@ -1247,6 +1247,28 @@ mod benchmarks { ); } + #[benchmark] + fn set_static_tier_params() { + initial_config::(); + + let mut tier_params = StaticTierParams::::get(); + assert!(tier_params.is_valid(), "Sanity check"); + + // Modify them so they aren't the same anymore + tier_params.reward_portion[0] = Permill::zero(); + + #[extrinsic_call] + _(RawOrigin::Root, tier_params.clone()); + + assert_eq!(StaticTierParams::::get(), tier_params); + assert_last_event::( + Event::::NewTierParameters { + params: tier_params, + } + .into(), + ); + } + /// TODO: remove this benchmark once BonusStatus update is done #[benchmark] fn update_bonus_step_success() { diff --git a/pallets/dapp-staking/src/benchmarking/utils.rs b/pallets/dapp-staking/src/benchmarking/utils.rs index 5e9ee0fb24..6180a154b5 100644 --- a/pallets/dapp-staking/src/benchmarking/utils.rs +++ b/pallets/dapp-staking/src/benchmarking/utils.rs @@ -18,7 +18,7 @@ use super::{Pallet as DappStaking, *}; -use astar_primitives::Balance; +use astar_primitives::{dapp_staking::STANDARD_TIER_SLOTS_ARGS, Balance}; use frame_system::Pallet as System; @@ -194,6 +194,7 @@ pub(super) fn init_tier_settings() { }, ]) .unwrap(), + slot_number_args: STANDARD_TIER_SLOTS_ARGS, }; let total_issuance = 1000 * MIN_TIER_THRESHOLD; diff --git a/pallets/dapp-staking/src/lib.rs b/pallets/dapp-staking/src/lib.rs index ac4051e11d..56e3eb4505 100644 --- a/pallets/dapp-staking/src/lib.rs +++ b/pallets/dapp-staking/src/lib.rs @@ -56,7 +56,7 @@ use astar_primitives::{ dapp_staking::{ AccountCheck, CycleConfiguration, DAppId, EraNumber, Observer as DAppStakingObserver, PeriodNumber, Rank, RankedTier, SmartContractHandle, StakingRewardHandler, TierId, - TierSlots as TierSlotFunc, + TierSlots as TierSlotFunc, STANDARD_TIER_SLOTS_ARGS, }, oracle::PriceProvider, Balance, BlockNumber, @@ -330,6 +330,10 @@ pub mod pallet { destination_contract: T::SmartContract, amount: Balance, }, + /// Tier parameters, used to calculate tier configuration, have been updated, and will be applicable from next era. + NewTierParameters { + params: TierParameters, + }, } #[pallet::error] @@ -406,6 +410,8 @@ pub mod pallet { NoExpiredEntries, /// Force call is not allowed in production. ForceNotAllowed, + /// Invalid tier parameters were provided. This can happen if any number exceeds 100% or if number of elements does not match the number of tiers. + InvalidTierParams, /// Same contract specified as source and destination. SameContracts, } @@ -523,10 +529,11 @@ pub mod pallet { StorageValue<_, BonusUpdateStateFor, ValueQuery>; #[pallet::genesis_config] - pub struct GenesisConfig { + pub struct GenesisConfig { pub reward_portion: Vec, pub slot_distribution: Vec, pub tier_thresholds: Vec, + pub slot_number_args: (u64, u64), pub slots_per_tier: Vec, pub safeguard: Option, #[serde(skip)] @@ -546,6 +553,7 @@ pub mod pallet { required_percentage: Perbill::from_percent(i), }) .collect(), + slot_number_args: STANDARD_TIER_SLOTS_ARGS, slots_per_tier: vec![100; num_tiers as usize], safeguard: None, _config: Default::default(), @@ -570,6 +578,7 @@ pub mod pallet { self.tier_thresholds.clone(), ) .expect("Invalid number of tier thresholds provided."), + slot_number_args: self.slot_number_args, }; assert!( tier_params.is_valid(), @@ -1399,6 +1408,28 @@ pub mod pallet { .into()) } + /// Used to set static tier parameters, which are used to calculate tier configuration. + /// Tier configuration defines tier entry threshold values, number of slots, and reward portions. + /// + /// This is a delicate call and great care should be taken when changing these + /// values since it has a significant impact on the reward system. + #[pallet::call_index(22)] + #[pallet::weight(T::WeightInfo::set_static_tier_params())] + pub fn set_static_tier_params( + origin: OriginFor, + params: TierParameters, + ) -> DispatchResult { + Self::ensure_pallet_enabled()?; + ensure_root(origin)?; + ensure!(params.is_valid(), Error::::InvalidTierParams); + + StaticTierParams::::set(params.clone()); + + Self::deposit_event(Event::::NewTierParameters { params }); + + Ok(()) + } + /// Active update `BonusStatus` according to the new MaxBonusSafeMovesPerPeriod from config /// for all already existing StakerInfo in steps, consuming up to the specified amount of /// weight. @@ -1407,7 +1438,7 @@ pub mod pallet { /// In any case the weight_limit is clamped between the minimum & maximum allowed values. /// /// TODO: remove this extrinsic once BonusStatus update is done - #[pallet::call_index(22)] + #[pallet::call_index(200)] #[pallet::weight({ Pallet::::clamp_call_weight(*weight_limit) })] @@ -2773,7 +2804,9 @@ pub mod pallet { let new_staking_info = SingularStakingInfo { previous_staked: staking_info.previous_staked, staked: staking_info.staked, - bonus_status: *BonusStatusWrapperFor::::default(), + bonus_status: staking_info + .bonus_status + .saturating_add(T::MaxBonusSafeMovesPerPeriod::get()), }; StakerInfo::::insert(&account, &smart_contract, new_staking_info); diff --git a/pallets/dapp-staking/src/migration.rs b/pallets/dapp-staking/src/migration.rs index 16c87e505c..dca0849545 100644 --- a/pallets/dapp-staking/src/migration.rs +++ b/pallets/dapp-staking/src/migration.rs @@ -54,12 +54,13 @@ pub mod versioned_migrations { Pallet, ::DbWeight, >; + /// Migration V8 to V9 wrapped in a [`frame_support::migrations::VersionedMigration`], ensuring /// the migration is only performed when on-chain version is 9. - pub type V8ToV9 = frame_support::migrations::VersionedMigration< + pub type V8ToV9 = frame_support::migrations::VersionedMigration< 8, 9, - v9::ActiveUpdateBonusStatus, + v9::VersionMigrateV8ToV9, Pallet, ::DbWeight, >; @@ -67,20 +68,68 @@ pub mod versioned_migrations { mod v9 { use super::*; + use frame_support::DefaultNoBound; + + #[derive( + Encode, + Decode, + MaxEncodedLen, + RuntimeDebugNoBound, + PartialEqNoBound, + DefaultNoBound, + EqNoBound, + CloneNoBound, + TypeInfo, + )] + #[scale_info(skip_type_params(NT))] + pub struct TierParametersV8> { + /// Reward distribution per tier, in percentage. + /// First entry refers to the first tier, and so on. + /// The sum of all values must not exceed 100%. + /// In case it is less, portion of rewards will never be distributed. + pub(crate) reward_portion: BoundedVec, + /// Distribution of number of slots per tier, in percentage. + /// First entry refers to the first tier, and so on. + /// The sum of all values must not exceed 100%. + /// In case it is less, slot capacity will never be fully filled. + pub(crate) slot_distribution: BoundedVec, + /// Requirements for entry into each tier. + /// First entry refers to the first tier, and so on. + pub(crate) tier_thresholds: BoundedVec, + } // The loyal staker flag is updated to `u8` with the new MaxBonusSafeMovesPerPeriod from config // for all already existing StakerInfo. - pub struct ActiveUpdateBonusStatus(PhantomData); + pub struct VersionMigrateV8ToV9(PhantomData<(T, InitArgs)>); - impl UncheckedOnRuntimeUpgrade for ActiveUpdateBonusStatus { + impl> UncheckedOnRuntimeUpgrade + for VersionMigrateV8ToV9 + { fn on_runtime_upgrade() -> Weight { - // When upgrade happens, we need to put dApp staking v3 into maintenance mode immediately. - let mut consumed_weight = T::DbWeight::get().reads_writes(1, 2); + let mut consumed_weight = T::DbWeight::get().reads_writes(2, 3); + + // When upgrade happens, we need to put dApp staking into maintenance mode immediately. ActiveProtocolState::::mutate(|state| { state.maintenance = true; }); log::info!("Maintenance mode enabled."); + // Result is ignored - upgrade must succeed, there's no fallback in case it doesn't. + let _ignore = StaticTierParams::::translate::, _>( + |maybe_old_params| match maybe_old_params { + Some(old_params) => Some(TierParameters { + slot_distribution: old_params.slot_distribution, + reward_portion: old_params.reward_portion, + tier_thresholds: old_params.tier_thresholds, + slot_number_args: InitArgs::get(), + }), + _ => { + log::error!("Failed to translate StaticTierParams from previous V8 type to current V9 type."); + None + } + }, + ); + // In case of try-runtime, we want to execute the whole logic, to ensure it works // with on-chain data. if cfg!(feature = "try-runtime") { @@ -126,10 +175,11 @@ mod v9 { #[cfg(feature = "try-runtime")] fn post_upgrade(_: Vec) -> Result<(), TryRuntimeError> { - ensure!( + assert!( Pallet::::on_chain_storage_version() >= 9, "dapp-staking::migration::v9: wrong storage version" ); + assert!( !ActiveProtocolState::::get().maintenance, "Maintenance mode must be disabled after the successful runtime upgrade." @@ -137,13 +187,23 @@ mod v9 { let new_default_bonus_status = *crate::types::BonusStatusWrapperFor::::default(); for (_, _, staking_info) in StakerInfo::::iter() { - assert_eq!(staking_info.bonus_status, new_default_bonus_status); + assert!( + staking_info.bonus_status >= new_default_bonus_status.saturating_sub(1) + && staking_info.bonus_status <= new_default_bonus_status + ); } log::info!( target: LOG_TARGET, "All entries updated to new_default_bonus_status {}", new_default_bonus_status, ); + let new_tier_params = StaticTierParams::::get(); + assert!( + new_tier_params.is_valid(), + "New tier params are invalid, re-check the values!" + ); + assert_eq!(new_tier_params.slot_number_args, InitArgs::get()); + Ok(()) } } @@ -206,6 +266,7 @@ pub mod v8 { slot_distribution: old_params.slot_distribution, reward_portion: old_params.reward_portion, tier_thresholds, + slot_number_args: Default::default(), }), Err(err) => { log::error!( diff --git a/pallets/dapp-staking/src/test/mock.rs b/pallets/dapp-staking/src/test/mock.rs index 5bc86da768..5b21afb152 100644 --- a/pallets/dapp-staking/src/test/mock.rs +++ b/pallets/dapp-staking/src/test/mock.rs @@ -35,7 +35,9 @@ use sp_runtime::{BuildStorage, Permill}; use sp_std::cell::RefCell; use astar_primitives::{ - dapp_staking::{Observer as DappStakingObserver, SmartContract, StandardTierSlots}, + dapp_staking::{ + Observer as DappStakingObserver, SmartContract, StandardTierSlots, STANDARD_TIER_SLOTS_ARGS, + }, Balance, BlockNumber, }; use frame_system::{EnsureRoot, EnsureSignedBy}; @@ -333,6 +335,7 @@ impl ExtBuilder { }, ]) .unwrap(), + slot_number_args: STANDARD_TIER_SLOTS_ARGS, }; let total_issuance = ::Currency::total_issuance(); diff --git a/pallets/dapp-staking/src/test/tests.rs b/pallets/dapp-staking/src/test/tests.rs index 52c72d09cf..57d870100a 100644 --- a/pallets/dapp-staking/src/test/tests.rs +++ b/pallets/dapp-staking/src/test/tests.rs @@ -22,7 +22,7 @@ use crate::{ DAppId, DAppTierRewardsFor, DAppTiers, EraReward, EraRewards, Error, Event, ForcingType, GenesisConfig, IntegratedDApps, Ledger, NextDAppId, Perbill, PeriodNumber, Permill, Safeguard, SingularStakingInfo, StakeAmount, StakerInfo, StaticTierParams, Subperiod, TierConfig, - TierThreshold, + TierParameters, TierThreshold, }; use frame_support::{ @@ -3441,7 +3441,11 @@ fn base_number_of_slots_is_respected() { // 0. Get expected number of slots for the base price let total_issuance = ::Currency::total_issuance(); let base_native_price = ::BaseNativeCurrencyPrice::get(); - let base_number_of_slots = ::TierSlots::number_of_slots(base_native_price); + let tier_params = StaticTierParams::::get(); + let base_number_of_slots = ::TierSlots::number_of_slots( + base_native_price, + tier_params.slot_number_args, + ); // 1. Make sure base native price is set initially and calculate the new config. Store the thresholds for later comparison. NATIVE_PRICE.with(|v| *v.borrow_mut() = base_native_price); @@ -3468,7 +3472,10 @@ fn base_number_of_slots_is_respected() { ); assert_eq!( TierConfig::::get().total_number_of_slots(), - ::TierSlots::number_of_slots(higher_price), + ::TierSlots::number_of_slots( + higher_price, + tier_params.slot_number_args + ), ); for (amount, static_tier_threshold) in TierConfig::::get() @@ -3516,7 +3523,7 @@ fn base_number_of_slots_is_respected() { ); assert_eq!( TierConfig::::get().total_number_of_slots(), - ::TierSlots::number_of_slots(lower_price), + ::TierSlots::number_of_slots(lower_price, tier_params.slot_number_args), ); // 5. Bring it back to the base price, and expect number of slots to be the same as the base number of slots, @@ -3805,10 +3812,21 @@ fn claim_bonus_reward_for_works() { } #[test] +fn set_static_tier_params_incorrect_origin_fails() { + ExtBuilder::default().build_and_execute(|| { + let tier_params = StaticTierParams::::get(); + assert_noop!( + DappStaking::set_static_tier_params(RuntimeOrigin::signed(1), tier_params), + BadOrigin + ); + }) +} + // Tests moving stakes from unregistered contracts to another contract while verifying that: // - All staked funds are moved from the unregistered contracts. // - The bonus_status is preserved during the move from an unregistered contract. // - Destination stake is successfully created if entry does not exist yet. +#[test] fn move_stake_from_unregistered_contract_is_ok() { ExtBuilder::default().build_and_execute(|| { // Register smart contracts 1 & 2, lock&stake some amount on 1, unregister the smart contract 1 @@ -4180,6 +4198,51 @@ fn move_to_invalid_dapp_fails() { }) } +#[test] +fn set_static_tier_params_invalid_params_fails() { + ExtBuilder::default().build_and_execute(|| { + // Base value is assumed to be correct + let tier_params = StaticTierParams::::get(); + assert!(tier_params.is_valid(), "Sanity check"); + type NumberOfTiers = ::NumberOfTiers; + + let invalid_tier_params = TierParameters:: { + reward_portion: tier_params.reward_portion[1..].to_vec().try_into().unwrap(), + ..tier_params.clone() + }; + assert!(!invalid_tier_params.is_valid(), "Sanity check"); + + assert_noop!( + DappStaking::set_static_tier_params(RuntimeOrigin::root(), invalid_tier_params), + Error::::InvalidTierParams + ); + }) +} + +#[test] +fn set_static_tier_params_works() { + ExtBuilder::default().build_and_execute(|| { + let mut tier_params = StaticTierParams::::get(); + + // An example of complete invalidation of the first tier - still valid params. + tier_params.reward_portion[0] = Permill::zero(); + tier_params.slot_distribution[0] = Permill::zero(); + tier_params.tier_thresholds[0] = TierThreshold::FixedPercentage { + required_percentage: Perbill::one(), + }; + + assert_ok!(DappStaking::set_static_tier_params( + RuntimeOrigin::root(), + tier_params.clone() + )); + + assert_eq!(StaticTierParams::::get(), tier_params); + System::assert_last_event(RuntimeEvent::DappStaking(Event::NewTierParameters { + params: tier_params, + })); + }) +} + #[test] fn active_update_bonus_status() { ExtBuilder::default() diff --git a/pallets/dapp-staking/src/test/tests_types.rs b/pallets/dapp-staking/src/test/tests_types.rs index 1b37325912..3c71f06d03 100644 --- a/pallets/dapp-staking/src/test/tests_types.rs +++ b/pallets/dapp-staking/src/test/tests_types.rs @@ -17,7 +17,7 @@ // along with Astar. If not, see . use astar_primitives::{ - dapp_staking::{RankedTier, StandardTierSlots}, + dapp_staking::{RankedTier, StandardTierSlots, STANDARD_TIER_SLOTS_ARGS}, Balance, }; use frame_support::{assert_ok, parameter_types}; @@ -3368,6 +3368,7 @@ fn tier_params_check_is_ok() { }, ]) .unwrap(), + slot_number_args: STANDARD_TIER_SLOTS_ARGS, }; assert!(params.is_valid()); @@ -3453,6 +3454,7 @@ fn tier_configuration_basic_tests() { }, ]) .unwrap(), + slot_number_args: STANDARD_TIER_SLOTS_ARGS, }; assert!(params.is_valid(), "Example params must be valid!"); diff --git a/pallets/dapp-staking/src/types.rs b/pallets/dapp-staking/src/types.rs index 0d5da12e22..981337189d 100644 --- a/pallets/dapp-staking/src/types.rs +++ b/pallets/dapp-staking/src/types.rs @@ -1687,6 +1687,10 @@ pub struct TierParameters> { /// Requirements for entry into each tier. /// First entry refers to the first tier, and so on. pub(crate) tier_thresholds: BoundedVec, + /// Arguments for the linear equation used to calculate the number of slots. + /// This can be made more generic in the future in case more complex equations are required. + /// But for now this simple tuple serves the purpose. + pub(crate) slot_number_args: (u64, u64), } impl> TierParameters { @@ -1778,8 +1782,8 @@ impl, T: TierSlotsFunc, P: Get> TiersConfiguration Self { // It must always be at least 1 slot. - let base_number_of_slots = T::number_of_slots(P::get()).max(1); - let new_number_of_slots = T::number_of_slots(native_price).max(1); + let base_number_of_slots = T::number_of_slots(P::get(), params.slot_number_args).max(1); + let new_number_of_slots = T::number_of_slots(native_price, params.slot_number_args).max(1); // Calculate how much each tier gets slots. let new_slots_per_tier: Vec = params diff --git a/pallets/dapp-staking/src/weights.rs b/pallets/dapp-staking/src/weights.rs index 5c24e668dd..0ea0423e8f 100644 --- a/pallets/dapp-staking/src/weights.rs +++ b/pallets/dapp-staking/src/weights.rs @@ -19,25 +19,24 @@ //! Autogenerated weights for pallet_dapp_staking //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.1 +//! DATE: 2025-02-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `gh-runner-01-ovh`, CPU: `Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("shiden-dev"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("astar-dev"), DB CACHE: 1024 // Executed Command: // ./target/release/astar-collator // benchmark // pallet -// --chain=shiden-dev +// --chain=astar-dev // --steps=50 // --repeat=20 // --pallet=pallet_dapp_staking // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./benchmark-results/shiden-dev/dapp_staking_weights.rs +// --output=./benchmark-results/astar-dev/dapp_staking_weights.rs // --template=./scripts/templates/weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] @@ -76,7 +75,7 @@ pub trait WeightInfo { fn dapp_tier_assignment(x: u32, ) -> Weight; fn on_idle_cleanup() -> Weight; fn step() -> Weight; - /// TODO: remove both weights once BonusStatus update is done + fn set_static_tier_params() -> Weight; fn update_bonus_step_success() -> Weight; fn update_bonus_step_noop() -> Weight; } @@ -88,338 +87,343 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_967_000 picoseconds. - Weight::from_parts(9_242_000, 0) + // Minimum execution time: 6_160_000 picoseconds. + Weight::from_parts(6_345_000, 0) } - /// Storage: DappStaking IntegratedDApps (r:1 w:1) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) - /// Storage: DappStaking CounterForIntegratedDApps (r:1 w:1) - /// Proof: DappStaking CounterForIntegratedDApps (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: DappStaking NextDAppId (r:1 w:1) - /// Proof: DappStaking NextDAppId (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:1) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CounterForIntegratedDApps` (r:1 w:1) + /// Proof: `DappStaking::CounterForIntegratedDApps` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::NextDAppId` (r:1 w:1) + /// Proof: `DappStaking::NextDAppId` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) fn register() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3086` - // Minimum execution time: 17_044_000 picoseconds. - Weight::from_parts(17_328_000, 3086) + // Minimum execution time: 12_235_000 picoseconds. + Weight::from_parts(12_512_000, 3086) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: DappStaking IntegratedDApps (r:1 w:1) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:1) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) fn set_dapp_reward_beneficiary() -> Weight { // Proof Size summary in bytes: - // Measured: `74` + // Measured: `97` // Estimated: `3086` - // Minimum execution time: 13_369_000 picoseconds. - Weight::from_parts(13_617_000, 3086) + // Minimum execution time: 10_517_000 picoseconds. + Weight::from_parts(10_793_000, 3086) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: DappStaking IntegratedDApps (r:1 w:1) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:1) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) fn set_dapp_owner() -> Weight { // Proof Size summary in bytes: - // Measured: `74` + // Measured: `97` // Estimated: `3086` - // Minimum execution time: 13_421_000 picoseconds. - Weight::from_parts(13_692_000, 3086) + // Minimum execution time: 10_363_000 picoseconds. + Weight::from_parts(10_656_000, 3086) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: DappStaking IntegratedDApps (r:1 w:1) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) - /// Storage: DappStaking CounterForIntegratedDApps (r:1 w:1) - /// Proof: DappStaking CounterForIntegratedDApps (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: DappStaking ContractStake (r:0 w:1) - /// Proof: DappStaking ContractStake (max_values: Some(65535), max_size: Some(91), added: 2071, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:1) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CounterForIntegratedDApps` (r:1 w:1) + /// Proof: `DappStaking::CounterForIntegratedDApps` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::ContractStake` (r:0 w:1) + /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) fn unregister() -> Weight { // Proof Size summary in bytes: - // Measured: `74` + // Measured: `97` // Estimated: `3086` - // Minimum execution time: 18_458_000 picoseconds. - Weight::from_parts(18_864_000, 3086) + // Minimum execution time: 14_595_000 picoseconds. + Weight::from_parts(14_935_000, 3086) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: CollatorSelection Candidates (r:1 w:0) - /// Proof Skipped: CollatorSelection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Candidates` (r:1 w:0) + /// Proof: `CollatorSelection::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) fn lock_new_account() -> Weight { // Proof Size summary in bytes: // Measured: `138` // Estimated: `4764` - // Minimum execution time: 62_743_000 picoseconds. - Weight::from_parts(64_992_000, 4764) + // Minimum execution time: 31_874_000 picoseconds. + Weight::from_parts(32_108_000, 4764) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) fn lock_existing_account() -> Weight { // Proof Size summary in bytes: // Measured: `158` // Estimated: `4764` - // Minimum execution time: 38_250_000 picoseconds. - Weight::from_parts(38_835_000, 4764) + // Minimum execution time: 32_204_000 picoseconds. + Weight::from_parts(32_658_000, 4764) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) fn unlock() -> Weight { // Proof Size summary in bytes: // Measured: `158` // Estimated: `4764` - // Minimum execution time: 34_582_000 picoseconds. - Weight::from_parts(35_126_000, 4764) + // Minimum execution time: 28_967_000 picoseconds. + Weight::from_parts(29_523_000, 4764) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 16]`. fn claim_unlocked(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `191` + // Measured: `190` // Estimated: `4764` - // Minimum execution time: 37_740_000 picoseconds. - Weight::from_parts(39_064_684, 4764) - // Standard Error: 2_750 - .saturating_add(Weight::from_parts(120_539, 0).saturating_mul(x.into())) + // Minimum execution time: 29_887_000 picoseconds. + Weight::from_parts(31_172_595, 4764) + // Standard Error: 2_859 + .saturating_add(Weight::from_parts(124_029, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) fn relock_unlocking() -> Weight { // Proof Size summary in bytes: // Measured: `200` // Estimated: `4764` - // Minimum execution time: 33_298_000 picoseconds. - Weight::from_parts(33_903_000, 4764) + // Minimum execution time: 27_384_000 picoseconds. + Weight::from_parts(27_620_000, 4764) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: DappStaking IntegratedDApps (r:1 w:0) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: DappStaking StakerInfo (r:1 w:1) - /// Proof: DappStaking StakerInfo (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: DappStaking ContractStake (r:1 w:1) - /// Proof: DappStaking ContractStake (max_values: Some(65535), max_size: Some(91), added: 2071, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:0) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StakerInfo` (r:1 w:1) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::ContractStake` (r:1 w:1) + /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn stake() -> Weight { // Proof Size summary in bytes: - // Measured: `251` + // Measured: `274` // Estimated: `4764` - // Minimum execution time: 44_905_000 picoseconds. - Weight::from_parts(45_261_000, 4764) + // Minimum execution time: 40_988_000 picoseconds. + Weight::from_parts(41_562_000, 4764) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } - /// Storage: DappStaking IntegratedDApps (r:1 w:0) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: DappStaking StakerInfo (r:1 w:1) - /// Proof: DappStaking StakerInfo (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: DappStaking ContractStake (r:1 w:1) - /// Proof: DappStaking ContractStake (max_values: Some(65535), max_size: Some(91), added: 2071, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:0) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StakerInfo` (r:1 w:1) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::ContractStake` (r:1 w:1) + /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn unstake() -> Weight { // Proof Size summary in bytes: - // Measured: `432` + // Measured: `459` // Estimated: `4764` - // Minimum execution time: 48_594_000 picoseconds. - Weight::from_parts(49_441_000, 4764) + // Minimum execution time: 45_212_000 picoseconds. + Weight::from_parts(45_611_000, 4764) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: DappStaking EraRewards (r:1 w:0) - /// Proof: DappStaking EraRewards (max_values: None, max_size: Some(789), added: 3264, mode: MaxEncodedLen) - /// Storage: DappStaking PeriodEnd (r:1 w:0) - /// Proof: DappStaking PeriodEnd (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::EraRewards` (r:1 w:0) + /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::PeriodEnd` (r:1 w:0) + /// Proof: `DappStaking::PeriodEnd` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) /// The range of component `x` is `[1, 16]`. fn claim_staker_rewards_past_period(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `541` // Estimated: `4764` - // Minimum execution time: 52_182_000 picoseconds. - Weight::from_parts(50_073_700, 4764) - // Standard Error: 4_907 - .saturating_add(Weight::from_parts(3_301_788, 0).saturating_mul(x.into())) + // Minimum execution time: 50_966_000 picoseconds. + Weight::from_parts(50_088_222, 4764) + // Standard Error: 4_812 + .saturating_add(Weight::from_parts(1_932_998, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: DappStaking EraRewards (r:1 w:0) - /// Proof: DappStaking EraRewards (max_values: None, max_size: Some(789), added: 3264, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::EraRewards` (r:1 w:0) + /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) /// The range of component `x` is `[1, 16]`. fn claim_staker_rewards_ongoing_period(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `519` // Estimated: `4764` - // Minimum execution time: 49_637_000 picoseconds. - Weight::from_parts(47_809_537, 4764) - // Standard Error: 5_850 - .saturating_add(Weight::from_parts(3_304_857, 0).saturating_mul(x.into())) + // Minimum execution time: 48_396_000 picoseconds. + Weight::from_parts(47_718_494, 4764) + // Standard Error: 3_774 + .saturating_add(Weight::from_parts(1_922_497, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: DappStaking StakerInfo (r:1 w:1) - /// Proof: DappStaking StakerInfo (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: DappStaking PeriodEnd (r:1 w:0) - /// Proof: DappStaking PeriodEnd (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) + /// Storage: `DappStaking::StakerInfo` (r:1 w:1) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::PeriodEnd` (r:1 w:0) + /// Proof: `DappStaking::PeriodEnd` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) fn claim_bonus_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `271` + // Measured: `275` // Estimated: `3775` - // Minimum execution time: 41_926_000 picoseconds. - Weight::from_parts(42_718_000, 3775) + // Minimum execution time: 37_169_000 picoseconds. + Weight::from_parts(37_719_000, 3775) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: DappStaking IntegratedDApps (r:1 w:0) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) - /// Storage: DappStaking DAppTiers (r:1 w:1) - /// Proof: DappStaking DAppTiers (max_values: None, max_size: Some(1583), added: 4058, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:0) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::DAppTiers` (r:1 w:1) + /// Proof: `DappStaking::DAppTiers` (`max_values`: None, `max_size`: Some(1648), added: 4123, mode: `MaxEncodedLen`) fn claim_dapp_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `2584` - // Estimated: `5048` - // Minimum execution time: 57_183_000 picoseconds. - Weight::from_parts(58_197_000, 5048) + // Measured: `2672` + // Estimated: `5113` + // Minimum execution time: 54_124_000 picoseconds. + Weight::from_parts(54_932_000, 5113) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: DappStaking IntegratedDApps (r:1 w:0) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) - /// Storage: DappStaking StakerInfo (r:1 w:1) - /// Proof: DappStaking StakerInfo (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:0) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StakerInfo` (r:1 w:1) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn unstake_from_unregistered() -> Weight { // Proof Size summary in bytes: - // Measured: `318` + // Measured: `322` // Estimated: `4764` - // Minimum execution time: 41_858_000 picoseconds. - Weight::from_parts(42_476_000, 4764) + // Minimum execution time: 37_145_000 picoseconds. + Weight::from_parts(37_697_000, 4764) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - /// Storage: DappStaking StakerInfo (r:17 w:16) - /// Proof: DappStaking StakerInfo (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: `DappStaking::StakerInfo` (r:17 w:16) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) /// The range of component `x` is `[1, 16]`. fn cleanup_expired_entries(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `256 + x * (69 ±0)` - // Estimated: `4764 + x * (2613 ±0)` - // Minimum execution time: 43_103_000 picoseconds. - Weight::from_parts(39_876_215, 4764) - // Standard Error: 8_123 - .saturating_add(Weight::from_parts(5_014_232, 0).saturating_mul(x.into())) + // Measured: `257 + x * (73 ±0)` + // Estimated: `4764 + x * (2653 ±0)` + // Minimum execution time: 37_160_000 picoseconds. + Weight::from_parts(34_175_483, 4764) + // Standard Error: 8_747 + .saturating_add(Weight::from_parts(4_882_773, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(x.into()))) - .saturating_add(Weight::from_parts(0, 2613).saturating_mul(x.into())) + .saturating_add(Weight::from_parts(0, 2653).saturating_mul(x.into())) } + /// Storage: `DappStaking::Safeguard` (r:1 w:0) + /// Proof: `DappStaking::Safeguard` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn force() -> Weight { // Proof Size summary in bytes: // Measured: `0` - // Estimated: `0` - // Minimum execution time: 11_543_000 picoseconds. - Weight::from_parts(11_735_000, 0) + // Estimated: `1486` + // Minimum execution time: 8_714_000 picoseconds. + Weight::from_parts(8_924_000, 1486) + .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `DappStaking::IntegratedDApps` (r:2 w:0) /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) /// Storage: `DappStaking::Ledger` (r:1 w:1) /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) /// Storage: `DappStaking::StakerInfo` (r:2 w:2) - /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(179), added: 2654, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) /// Storage: `DappStaking::ContractStake` (r:2 w:2) /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) /// Storage: `Balances::Freezes` (r:1 w:1) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:0) /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn move_stake_from_registered_source() -> Weight { // Proof Size summary in bytes: - // Measured: `536` - // Estimated: `6298` - // Minimum execution time: 59_000_000 picoseconds. - Weight::from_parts(60_000_000, 6298) - .saturating_add(T::DbWeight::get().reads(9_u64)) - .saturating_add(T::DbWeight::get().writes(6_u64)) + // Measured: `553` + // Estimated: `6296` + // Minimum execution time: 71_782_000 picoseconds. + Weight::from_parts(72_398_000, 6296) + .saturating_add(T::DbWeight::get().reads(10_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: `DappStaking::IntegratedDApps` (r:2 w:0) /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) @@ -437,93 +441,107 @@ impl WeightInfo for SubstrateWeight { /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) fn move_stake_unregistered_source() -> Weight { // Proof Size summary in bytes: - // Measured: `414` + // Measured: `419` // Estimated: `6296` - // Minimum execution time: 62_000_000 picoseconds. - Weight::from_parts(64_000_000, 6296) + // Minimum execution time: 63_766_000 picoseconds. + Weight::from_parts(64_076_000, 6296) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) - /// Storage: DappStaking EraRewards (r:1 w:1) - /// Proof: DappStaking EraRewards (max_values: None, max_size: Some(789), added: 3264, mode: MaxEncodedLen) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::EraRewards` (r:1 w:1) + /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) + /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) + /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::TierConfig` (r:1 w:1) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) fn on_initialize_voting_to_build_and_earn() -> Weight { // Proof Size summary in bytes: - // Measured: `16` + // Measured: `212` // Estimated: `4254` - // Minimum execution time: 17_687_000 picoseconds. - Weight::from_parts(18_283_000, 4254) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) + // Minimum execution time: 26_591_000 picoseconds. + Weight::from_parts(27_310_000, 4254) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) - /// Storage: DappStaking StaticTierParams (r:1 w:0) - /// Proof: DappStaking StaticTierParams (max_values: Some(1), max_size: Some(167), added: 662, mode: MaxEncodedLen) - /// Storage: DappStaking TierConfig (r:1 w:1) - /// Proof: DappStaking TierConfig (max_values: Some(1), max_size: Some(161), added: 656, mode: MaxEncodedLen) - /// Storage: DappStaking PeriodEnd (r:1 w:2) - /// Proof: DappStaking PeriodEnd (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: DappStaking HistoryCleanupMarker (r:1 w:1) - /// Proof: DappStaking HistoryCleanupMarker (max_values: Some(1), max_size: Some(12), added: 507, mode: MaxEncodedLen) - /// Storage: DappStaking EraRewards (r:1 w:1) - /// Proof: DappStaking EraRewards (max_values: None, max_size: Some(789), added: 3264, mode: MaxEncodedLen) - /// Storage: DappStaking DAppTiers (r:0 w:1) - /// Proof: DappStaking DAppTiers (max_values: None, max_size: Some(1583), added: 4058, mode: MaxEncodedLen) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::PeriodEnd` (r:1 w:2) + /// Proof: `DappStaking::PeriodEnd` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::HistoryCleanupMarker` (r:1 w:1) + /// Proof: `DappStaking::HistoryCleanupMarker` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::EraRewards` (r:1 w:1) + /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) + /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) + /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::TierConfig` (r:1 w:1) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::DAppTiers` (r:0 w:1) + /// Proof: `DappStaking::DAppTiers` (`max_values`: None, `max_size`: Some(1648), added: 4123, mode: `MaxEncodedLen`) fn on_initialize_build_and_earn_to_voting() -> Weight { // Proof Size summary in bytes: - // Measured: `839` + // Measured: `719` // Estimated: `4254` - // Minimum execution time: 47_901_000 picoseconds. - Weight::from_parts(49_554_000, 4254) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 42_054_000 picoseconds. + Weight::from_parts(43_015_000, 4254) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) - /// Storage: DappStaking EraRewards (r:1 w:1) - /// Proof: DappStaking EraRewards (max_values: None, max_size: Some(789), added: 3264, mode: MaxEncodedLen) - /// Storage: DappStaking DAppTiers (r:0 w:1) - /// Proof: DappStaking DAppTiers (max_values: None, max_size: Some(1583), added: 4058, mode: MaxEncodedLen) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::EraRewards` (r:1 w:1) + /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) + /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) + /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::TierConfig` (r:1 w:1) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::DAppTiers` (r:0 w:1) + /// Proof: `DappStaking::DAppTiers` (`max_values`: None, `max_size`: Some(1648), added: 4123, mode: `MaxEncodedLen`) fn on_initialize_build_and_earn_to_build_and_earn() -> Weight { // Proof Size summary in bytes: - // Measured: `68` + // Measured: `264` // Estimated: `4254` - // Minimum execution time: 23_705_000 picoseconds. - Weight::from_parts(24_313_000, 4254) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) + // Minimum execution time: 29_233_000 picoseconds. + Weight::from_parts(30_149_000, 4254) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } - /// Storage: DappStaking ContractStake (r:101 w:0) - /// Proof: DappStaking ContractStake (max_values: Some(65535), max_size: Some(91), added: 2071, mode: MaxEncodedLen) - /// Storage: DappStaking TierConfig (r:1 w:0) - /// Proof: DappStaking TierConfig (max_values: Some(1), max_size: Some(161), added: 656, mode: MaxEncodedLen) + /// Storage: `DappStaking::ContractStake` (r:101 w:0) + /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::TierConfig` (r:1 w:0) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 100]`. fn dapp_tier_assignment(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `152 + x * (32 ±0)` + // Measured: `98 + x * (32 ±0)` // Estimated: `3061 + x * (2071 ±0)` - // Minimum execution time: 7_549_000 picoseconds. - Weight::from_parts(12_476_634, 3061) - // Standard Error: 3_594 - .saturating_add(Weight::from_parts(2_387_577, 0).saturating_mul(x.into())) + // Minimum execution time: 8_483_000 picoseconds. + Weight::from_parts(10_922_590, 3061) + // Standard Error: 2_388 + .saturating_add(Weight::from_parts(2_420_114, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(Weight::from_parts(0, 2071).saturating_mul(x.into())) } - /// Storage: DappStaking HistoryCleanupMarker (r:1 w:1) - /// Proof: DappStaking HistoryCleanupMarker (max_values: Some(1), max_size: Some(12), added: 507, mode: MaxEncodedLen) - /// Storage: DappStaking EraRewards (r:1 w:1) - /// Proof: DappStaking EraRewards (max_values: None, max_size: Some(789), added: 3264, mode: MaxEncodedLen) - /// Storage: DappStaking DAppTiers (r:0 w:1) - /// Proof: DappStaking DAppTiers (max_values: None, max_size: Some(1583), added: 4058, mode: MaxEncodedLen) + /// Storage: `DappStaking::HistoryCleanupMarker` (r:1 w:1) + /// Proof: `DappStaking::HistoryCleanupMarker` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::EraRewards` (r:1 w:1) + /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::DAppTiers` (r:0 w:1) + /// Proof: `DappStaking::DAppTiers` (`max_values`: None, `max_size`: Some(1648), added: 4123, mode: `MaxEncodedLen`) fn on_idle_cleanup() -> Weight { // Proof Size summary in bytes: // Measured: `293` // Estimated: `4254` - // Minimum execution time: 8_529_000 picoseconds. - Weight::from_parts(8_772_000, 4254) + // Minimum execution time: 8_164_000 picoseconds. + Weight::from_parts(8_352_000, 4254) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -533,19 +551,29 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `6560` - // Minimum execution time: 10_060_000 picoseconds. - Weight::from_parts(10_314_000, 6560) + // Minimum execution time: 13_041_000 picoseconds. + Weight::from_parts(13_375_000, 6560) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } + /// Storage: `DappStaking::StaticTierParams` (r:0 w:1) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) + fn set_static_tier_params() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_279_000 picoseconds. + Weight::from_parts(7_452_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } /// Storage: `DappStaking::StakerInfo` (r:2 w:1) /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) fn update_bonus_step_success() -> Weight { // Proof Size summary in bytes: - // Measured: `141` + // Measured: `142` // Estimated: `6296` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_000_000, 6296) + // Minimum execution time: 12_431_000 picoseconds. + Weight::from_parts(12_622_000, 6296) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -555,8 +583,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `19` // Estimated: `3643` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(3_000_000, 3643) + // Minimum execution time: 2_434_000 picoseconds. + Weight::from_parts(2_573_000, 3643) .saturating_add(T::DbWeight::get().reads(1_u64)) } } @@ -567,338 +595,343 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_967_000 picoseconds. - Weight::from_parts(9_242_000, 0) + // Minimum execution time: 6_160_000 picoseconds. + Weight::from_parts(6_345_000, 0) } - /// Storage: DappStaking IntegratedDApps (r:1 w:1) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) - /// Storage: DappStaking CounterForIntegratedDApps (r:1 w:1) - /// Proof: DappStaking CounterForIntegratedDApps (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: DappStaking NextDAppId (r:1 w:1) - /// Proof: DappStaking NextDAppId (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:1) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CounterForIntegratedDApps` (r:1 w:1) + /// Proof: `DappStaking::CounterForIntegratedDApps` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::NextDAppId` (r:1 w:1) + /// Proof: `DappStaking::NextDAppId` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) fn register() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3086` - // Minimum execution time: 17_044_000 picoseconds. - Weight::from_parts(17_328_000, 3086) + // Minimum execution time: 12_235_000 picoseconds. + Weight::from_parts(12_512_000, 3086) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: DappStaking IntegratedDApps (r:1 w:1) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:1) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) fn set_dapp_reward_beneficiary() -> Weight { // Proof Size summary in bytes: - // Measured: `74` + // Measured: `97` // Estimated: `3086` - // Minimum execution time: 13_369_000 picoseconds. - Weight::from_parts(13_617_000, 3086) + // Minimum execution time: 10_517_000 picoseconds. + Weight::from_parts(10_793_000, 3086) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: DappStaking IntegratedDApps (r:1 w:1) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:1) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) fn set_dapp_owner() -> Weight { // Proof Size summary in bytes: - // Measured: `74` + // Measured: `97` // Estimated: `3086` - // Minimum execution time: 13_421_000 picoseconds. - Weight::from_parts(13_692_000, 3086) + // Minimum execution time: 10_363_000 picoseconds. + Weight::from_parts(10_656_000, 3086) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: DappStaking IntegratedDApps (r:1 w:1) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) - /// Storage: DappStaking CounterForIntegratedDApps (r:1 w:1) - /// Proof: DappStaking CounterForIntegratedDApps (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: DappStaking ContractStake (r:0 w:1) - /// Proof: DappStaking ContractStake (max_values: Some(65535), max_size: Some(91), added: 2071, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:1) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CounterForIntegratedDApps` (r:1 w:1) + /// Proof: `DappStaking::CounterForIntegratedDApps` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::ContractStake` (r:0 w:1) + /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) fn unregister() -> Weight { // Proof Size summary in bytes: - // Measured: `74` + // Measured: `97` // Estimated: `3086` - // Minimum execution time: 18_458_000 picoseconds. - Weight::from_parts(18_864_000, 3086) + // Minimum execution time: 14_595_000 picoseconds. + Weight::from_parts(14_935_000, 3086) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: CollatorSelection Candidates (r:1 w:0) - /// Proof Skipped: CollatorSelection Candidates (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `CollatorSelection::Candidates` (r:1 w:0) + /// Proof: `CollatorSelection::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) fn lock_new_account() -> Weight { // Proof Size summary in bytes: // Measured: `138` // Estimated: `4764` - // Minimum execution time: 62_743_000 picoseconds. - Weight::from_parts(64_992_000, 4764) + // Minimum execution time: 31_874_000 picoseconds. + Weight::from_parts(32_108_000, 4764) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) fn lock_existing_account() -> Weight { // Proof Size summary in bytes: // Measured: `158` // Estimated: `4764` - // Minimum execution time: 38_250_000 picoseconds. - Weight::from_parts(38_835_000, 4764) + // Minimum execution time: 32_204_000 picoseconds. + Weight::from_parts(32_658_000, 4764) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) fn unlock() -> Weight { // Proof Size summary in bytes: // Measured: `158` // Estimated: `4764` - // Minimum execution time: 34_582_000 picoseconds. - Weight::from_parts(35_126_000, 4764) + // Minimum execution time: 28_967_000 picoseconds. + Weight::from_parts(29_523_000, 4764) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 16]`. fn claim_unlocked(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `191` + // Measured: `190` // Estimated: `4764` - // Minimum execution time: 37_740_000 picoseconds. - Weight::from_parts(39_064_684, 4764) - // Standard Error: 2_750 - .saturating_add(Weight::from_parts(120_539, 0).saturating_mul(x.into())) + // Minimum execution time: 29_887_000 picoseconds. + Weight::from_parts(31_172_595, 4764) + // Standard Error: 2_859 + .saturating_add(Weight::from_parts(124_029, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) fn relock_unlocking() -> Weight { // Proof Size summary in bytes: // Measured: `200` // Estimated: `4764` - // Minimum execution time: 33_298_000 picoseconds. - Weight::from_parts(33_903_000, 4764) + // Minimum execution time: 27_384_000 picoseconds. + Weight::from_parts(27_620_000, 4764) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: DappStaking IntegratedDApps (r:1 w:0) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: DappStaking StakerInfo (r:1 w:1) - /// Proof: DappStaking StakerInfo (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: DappStaking ContractStake (r:1 w:1) - /// Proof: DappStaking ContractStake (max_values: Some(65535), max_size: Some(91), added: 2071, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:0) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StakerInfo` (r:1 w:1) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::ContractStake` (r:1 w:1) + /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn stake() -> Weight { // Proof Size summary in bytes: - // Measured: `251` + // Measured: `274` // Estimated: `4764` - // Minimum execution time: 44_905_000 picoseconds. - Weight::from_parts(45_261_000, 4764) + // Minimum execution time: 40_988_000 picoseconds. + Weight::from_parts(41_562_000, 4764) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } - /// Storage: DappStaking IntegratedDApps (r:1 w:0) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: DappStaking StakerInfo (r:1 w:1) - /// Proof: DappStaking StakerInfo (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: DappStaking ContractStake (r:1 w:1) - /// Proof: DappStaking ContractStake (max_values: Some(65535), max_size: Some(91), added: 2071, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:0) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StakerInfo` (r:1 w:1) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::ContractStake` (r:1 w:1) + /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn unstake() -> Weight { // Proof Size summary in bytes: - // Measured: `432` + // Measured: `459` // Estimated: `4764` - // Minimum execution time: 48_594_000 picoseconds. - Weight::from_parts(49_441_000, 4764) + // Minimum execution time: 45_212_000 picoseconds. + Weight::from_parts(45_611_000, 4764) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: DappStaking EraRewards (r:1 w:0) - /// Proof: DappStaking EraRewards (max_values: None, max_size: Some(789), added: 3264, mode: MaxEncodedLen) - /// Storage: DappStaking PeriodEnd (r:1 w:0) - /// Proof: DappStaking PeriodEnd (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::EraRewards` (r:1 w:0) + /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::PeriodEnd` (r:1 w:0) + /// Proof: `DappStaking::PeriodEnd` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) /// The range of component `x` is `[1, 16]`. fn claim_staker_rewards_past_period(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `541` // Estimated: `4764` - // Minimum execution time: 52_182_000 picoseconds. - Weight::from_parts(50_073_700, 4764) - // Standard Error: 4_907 - .saturating_add(Weight::from_parts(3_301_788, 0).saturating_mul(x.into())) + // Minimum execution time: 50_966_000 picoseconds. + Weight::from_parts(50_088_222, 4764) + // Standard Error: 4_812 + .saturating_add(Weight::from_parts(1_932_998, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: DappStaking EraRewards (r:1 w:0) - /// Proof: DappStaking EraRewards (max_values: None, max_size: Some(789), added: 3264, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::EraRewards` (r:1 w:0) + /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) /// The range of component `x` is `[1, 16]`. fn claim_staker_rewards_ongoing_period(x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `519` // Estimated: `4764` - // Minimum execution time: 49_637_000 picoseconds. - Weight::from_parts(47_809_537, 4764) - // Standard Error: 5_850 - .saturating_add(Weight::from_parts(3_304_857, 0).saturating_mul(x.into())) + // Minimum execution time: 48_396_000 picoseconds. + Weight::from_parts(47_718_494, 4764) + // Standard Error: 3_774 + .saturating_add(Weight::from_parts(1_922_497, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } - /// Storage: DappStaking StakerInfo (r:1 w:1) - /// Proof: DappStaking StakerInfo (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: DappStaking PeriodEnd (r:1 w:0) - /// Proof: DappStaking PeriodEnd (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) + /// Storage: `DappStaking::StakerInfo` (r:1 w:1) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::PeriodEnd` (r:1 w:0) + /// Proof: `DappStaking::PeriodEnd` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) fn claim_bonus_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `271` + // Measured: `275` // Estimated: `3775` - // Minimum execution time: 41_926_000 picoseconds. - Weight::from_parts(42_718_000, 3775) + // Minimum execution time: 37_169_000 picoseconds. + Weight::from_parts(37_719_000, 3775) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } - /// Storage: DappStaking IntegratedDApps (r:1 w:0) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) - /// Storage: DappStaking DAppTiers (r:1 w:1) - /// Proof: DappStaking DAppTiers (max_values: None, max_size: Some(1583), added: 4058, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:0) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::DAppTiers` (r:1 w:1) + /// Proof: `DappStaking::DAppTiers` (`max_values`: None, `max_size`: Some(1648), added: 4123, mode: `MaxEncodedLen`) fn claim_dapp_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `2584` - // Estimated: `5048` - // Minimum execution time: 57_183_000 picoseconds. - Weight::from_parts(58_197_000, 5048) + // Measured: `2672` + // Estimated: `5113` + // Minimum execution time: 54_124_000 picoseconds. + Weight::from_parts(54_932_000, 5113) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: DappStaking IntegratedDApps (r:1 w:0) - /// Proof: DappStaking IntegratedDApps (max_values: Some(65535), max_size: Some(116), added: 2096, mode: MaxEncodedLen) - /// Storage: DappStaking StakerInfo (r:1 w:1) - /// Proof: DappStaking StakerInfo (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: `DappStaking::IntegratedDApps` (r:1 w:0) + /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StakerInfo` (r:1 w:1) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn unstake_from_unregistered() -> Weight { // Proof Size summary in bytes: - // Measured: `318` + // Measured: `322` // Estimated: `4764` - // Minimum execution time: 41_858_000 picoseconds. - Weight::from_parts(42_476_000, 4764) + // Minimum execution time: 37_145_000 picoseconds. + Weight::from_parts(37_697_000, 4764) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } - /// Storage: DappStaking StakerInfo (r:17 w:16) - /// Proof: DappStaking StakerInfo (max_values: None, max_size: Some(138), added: 2613, mode: MaxEncodedLen) - /// Storage: DappStaking Ledger (r:1 w:1) - /// Proof: DappStaking Ledger (max_values: None, max_size: Some(310), added: 2785, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:1) - /// Proof: Balances Freezes (max_values: None, max_size: Some(67), added: 2542, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:0) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: `DappStaking::StakerInfo` (r:17 w:16) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) /// The range of component `x` is `[1, 16]`. fn cleanup_expired_entries(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `256 + x * (69 ±0)` - // Estimated: `4764 + x * (2613 ±0)` - // Minimum execution time: 43_103_000 picoseconds. - Weight::from_parts(39_876_215, 4764) - // Standard Error: 8_123 - .saturating_add(Weight::from_parts(5_014_232, 0).saturating_mul(x.into())) + // Measured: `257 + x * (73 ±0)` + // Estimated: `4764 + x * (2653 ±0)` + // Minimum execution time: 37_160_000 picoseconds. + Weight::from_parts(34_175_483, 4764) + // Standard Error: 8_747 + .saturating_add(Weight::from_parts(4_882_773, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(RocksDbWeight::get().writes(2_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(x.into()))) - .saturating_add(Weight::from_parts(0, 2613).saturating_mul(x.into())) + .saturating_add(Weight::from_parts(0, 2653).saturating_mul(x.into())) } + /// Storage: `DappStaking::Safeguard` (r:1 w:0) + /// Proof: `DappStaking::Safeguard` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn force() -> Weight { // Proof Size summary in bytes: // Measured: `0` - // Estimated: `0` - // Minimum execution time: 11_543_000 picoseconds. - Weight::from_parts(11_735_000, 0) + // Estimated: `1486` + // Minimum execution time: 8_714_000 picoseconds. + Weight::from_parts(8_924_000, 1486) + .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `DappStaking::IntegratedDApps` (r:2 w:0) /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) /// Storage: `DappStaking::Ledger` (r:1 w:1) /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) /// Storage: `DappStaking::StakerInfo` (r:2 w:2) - /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(179), added: 2654, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) /// Storage: `DappStaking::ContractStake` (r:2 w:2) /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) /// Storage: `Balances::Freezes` (r:1 w:1) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:0) /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn move_stake_from_registered_source() -> Weight { // Proof Size summary in bytes: - // Measured: `536` - // Estimated: `6298` - // Minimum execution time: 59_000_000 picoseconds. - Weight::from_parts(60_000_000, 6298) - .saturating_add(RocksDbWeight::get().reads(9_u64)) - .saturating_add(RocksDbWeight::get().writes(6_u64)) + // Measured: `553` + // Estimated: `6296` + // Minimum execution time: 71_782_000 picoseconds. + Weight::from_parts(72_398_000, 6296) + .saturating_add(RocksDbWeight::get().reads(10_u64)) + .saturating_add(RocksDbWeight::get().writes(7_u64)) } /// Storage: `DappStaking::IntegratedDApps` (r:2 w:0) /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) @@ -916,93 +949,107 @@ impl WeightInfo for () { /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) fn move_stake_unregistered_source() -> Weight { // Proof Size summary in bytes: - // Measured: `414` + // Measured: `419` // Estimated: `6296` - // Minimum execution time: 62_000_000 picoseconds. - Weight::from_parts(64_000_000, 6296) + // Minimum execution time: 63_766_000 picoseconds. + Weight::from_parts(64_076_000, 6296) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) - /// Storage: DappStaking EraRewards (r:1 w:1) - /// Proof: DappStaking EraRewards (max_values: None, max_size: Some(789), added: 3264, mode: MaxEncodedLen) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::EraRewards` (r:1 w:1) + /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) + /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) + /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::TierConfig` (r:1 w:1) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) fn on_initialize_voting_to_build_and_earn() -> Weight { // Proof Size summary in bytes: - // Measured: `16` + // Measured: `212` // Estimated: `4254` - // Minimum execution time: 17_687_000 picoseconds. - Weight::from_parts(18_283_000, 4254) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) + // Minimum execution time: 26_591_000 picoseconds. + Weight::from_parts(27_310_000, 4254) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) - /// Storage: DappStaking StaticTierParams (r:1 w:0) - /// Proof: DappStaking StaticTierParams (max_values: Some(1), max_size: Some(167), added: 662, mode: MaxEncodedLen) - /// Storage: DappStaking TierConfig (r:1 w:1) - /// Proof: DappStaking TierConfig (max_values: Some(1), max_size: Some(161), added: 656, mode: MaxEncodedLen) - /// Storage: DappStaking PeriodEnd (r:1 w:2) - /// Proof: DappStaking PeriodEnd (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: DappStaking HistoryCleanupMarker (r:1 w:1) - /// Proof: DappStaking HistoryCleanupMarker (max_values: Some(1), max_size: Some(12), added: 507, mode: MaxEncodedLen) - /// Storage: DappStaking EraRewards (r:1 w:1) - /// Proof: DappStaking EraRewards (max_values: None, max_size: Some(789), added: 3264, mode: MaxEncodedLen) - /// Storage: DappStaking DAppTiers (r:0 w:1) - /// Proof: DappStaking DAppTiers (max_values: None, max_size: Some(1583), added: 4058, mode: MaxEncodedLen) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::PeriodEnd` (r:1 w:2) + /// Proof: `DappStaking::PeriodEnd` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::HistoryCleanupMarker` (r:1 w:1) + /// Proof: `DappStaking::HistoryCleanupMarker` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::EraRewards` (r:1 w:1) + /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) + /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) + /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::TierConfig` (r:1 w:1) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::DAppTiers` (r:0 w:1) + /// Proof: `DappStaking::DAppTiers` (`max_values`: None, `max_size`: Some(1648), added: 4123, mode: `MaxEncodedLen`) fn on_initialize_build_and_earn_to_voting() -> Weight { // Proof Size summary in bytes: - // Measured: `839` + // Measured: `719` // Estimated: `4254` - // Minimum execution time: 47_901_000 picoseconds. - Weight::from_parts(49_554_000, 4254) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 42_054_000 picoseconds. + Weight::from_parts(43_015_000, 4254) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } - /// Storage: DappStaking CurrentEraInfo (r:1 w:1) - /// Proof: DappStaking CurrentEraInfo (max_values: Some(1), max_size: Some(112), added: 607, mode: MaxEncodedLen) - /// Storage: DappStaking EraRewards (r:1 w:1) - /// Proof: DappStaking EraRewards (max_values: None, max_size: Some(789), added: 3264, mode: MaxEncodedLen) - /// Storage: DappStaking DAppTiers (r:0 w:1) - /// Proof: DappStaking DAppTiers (max_values: None, max_size: Some(1583), added: 4058, mode: MaxEncodedLen) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::EraRewards` (r:1 w:1) + /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) + /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) + /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::TierConfig` (r:1 w:1) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::DAppTiers` (r:0 w:1) + /// Proof: `DappStaking::DAppTiers` (`max_values`: None, `max_size`: Some(1648), added: 4123, mode: `MaxEncodedLen`) fn on_initialize_build_and_earn_to_build_and_earn() -> Weight { // Proof Size summary in bytes: - // Measured: `68` + // Measured: `264` // Estimated: `4254` - // Minimum execution time: 23_705_000 picoseconds. - Weight::from_parts(24_313_000, 4254) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(3_u64)) + // Minimum execution time: 29_233_000 picoseconds. + Weight::from_parts(30_149_000, 4254) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(4_u64)) } - /// Storage: DappStaking ContractStake (r:101 w:0) - /// Proof: DappStaking ContractStake (max_values: Some(65535), max_size: Some(91), added: 2071, mode: MaxEncodedLen) - /// Storage: DappStaking TierConfig (r:1 w:0) - /// Proof: DappStaking TierConfig (max_values: Some(1), max_size: Some(161), added: 656, mode: MaxEncodedLen) + /// Storage: `DappStaking::ContractStake` (r:101 w:0) + /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::TierConfig` (r:1 w:0) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 100]`. fn dapp_tier_assignment(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `152 + x * (32 ±0)` + // Measured: `98 + x * (32 ±0)` // Estimated: `3061 + x * (2071 ±0)` - // Minimum execution time: 7_549_000 picoseconds. - Weight::from_parts(12_476_634, 3061) - // Standard Error: 3_594 - .saturating_add(Weight::from_parts(2_387_577, 0).saturating_mul(x.into())) + // Minimum execution time: 8_483_000 picoseconds. + Weight::from_parts(10_922_590, 3061) + // Standard Error: 2_388 + .saturating_add(Weight::from_parts(2_420_114, 0).saturating_mul(x.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(Weight::from_parts(0, 2071).saturating_mul(x.into())) } - /// Storage: DappStaking HistoryCleanupMarker (r:1 w:1) - /// Proof: DappStaking HistoryCleanupMarker (max_values: Some(1), max_size: Some(12), added: 507, mode: MaxEncodedLen) - /// Storage: DappStaking EraRewards (r:1 w:1) - /// Proof: DappStaking EraRewards (max_values: None, max_size: Some(789), added: 3264, mode: MaxEncodedLen) - /// Storage: DappStaking DAppTiers (r:0 w:1) - /// Proof: DappStaking DAppTiers (max_values: None, max_size: Some(1583), added: 4058, mode: MaxEncodedLen) + /// Storage: `DappStaking::HistoryCleanupMarker` (r:1 w:1) + /// Proof: `DappStaking::HistoryCleanupMarker` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::EraRewards` (r:1 w:1) + /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::DAppTiers` (r:0 w:1) + /// Proof: `DappStaking::DAppTiers` (`max_values`: None, `max_size`: Some(1648), added: 4123, mode: `MaxEncodedLen`) fn on_idle_cleanup() -> Weight { // Proof Size summary in bytes: // Measured: `293` // Estimated: `4254` - // Minimum execution time: 8_529_000 picoseconds. - Weight::from_parts(8_772_000, 4254) + // Minimum execution time: 8_164_000 picoseconds. + Weight::from_parts(8_352_000, 4254) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -1012,19 +1059,29 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `76` // Estimated: `6560` - // Minimum execution time: 10_060_000 picoseconds. - Weight::from_parts(10_314_000, 6560) + // Minimum execution time: 13_041_000 picoseconds. + Weight::from_parts(13_375_000, 6560) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } + /// Storage: `DappStaking::StaticTierParams` (r:0 w:1) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) + fn set_static_tier_params() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_279_000 picoseconds. + Weight::from_parts(7_452_000, 0) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } /// Storage: `DappStaking::StakerInfo` (r:2 w:1) /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) fn update_bonus_step_success() -> Weight { // Proof Size summary in bytes: - // Measured: `141` + // Measured: `142` // Estimated: `6296` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_000_000, 6296) + // Minimum execution time: 12_431_000 picoseconds. + Weight::from_parts(12_622_000, 6296) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1034,8 +1091,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `19` // Estimated: `3643` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(3_000_000, 3643) + // Minimum execution time: 2_434_000 picoseconds. + Weight::from_parts(2_573_000, 3643) .saturating_add(RocksDbWeight::get().reads(1_u64)) } } diff --git a/precompiles/dapp-staking/src/test/mock.rs b/precompiles/dapp-staking/src/test/mock.rs index 605092f3d3..efe546ed00 100644 --- a/precompiles/dapp-staking/src/test/mock.rs +++ b/precompiles/dapp-staking/src/test/mock.rs @@ -43,7 +43,7 @@ extern crate alloc; use astar_primitives::{ dapp_staking::{ CycleConfiguration, EraNumber, PeriodNumber, SmartContract, StakingRewardHandler, - StandardTierSlots, + StandardTierSlots, STANDARD_TIER_SLOTS_ARGS, }, oracle::PriceProvider, AccountId, Balance, BlockNumber, @@ -298,6 +298,7 @@ impl ExternalityBuilder { required_percentage: Perbill::from_percent(1), }, ], + slot_number_args: STANDARD_TIER_SLOTS_ARGS, slots_per_tier: vec![10, 20, 30, 40], safeguard: None, _config: PhantomData, diff --git a/primitives/src/dapp_staking.rs b/primitives/src/dapp_staking.rs index e44c61caf3..183c3c4958 100644 --- a/primitives/src/dapp_staking.rs +++ b/primitives/src/dapp_staking.rs @@ -186,18 +186,28 @@ impl AccountCheck for () { /// Trait for calculating the total number of tier slots for the given price. pub trait TierSlots { /// Returns the total number of tier slots for the given price. - fn number_of_slots(price: CurrencyAmount) -> u16; + /// + /// # Arguments + /// * `price` - price (e.g. moving average over some time period) of the native currency. + /// * `args` - arguments, `a` & `b`, for the linear equation `number_of_slots = a * price + b`. + /// + /// Returns the total number of tier slots. + fn number_of_slots(price: CurrencyAmount, args: (u64, u64)) -> u16; } /// Standard tier slots implementation, as proposed in the Tokenomics 2.0 document. pub struct StandardTierSlots; impl TierSlots for StandardTierSlots { - fn number_of_slots(price: CurrencyAmount) -> u16 { - let result: u64 = price.saturating_mul_int(1000_u64).saturating_add(50); + fn number_of_slots(price: CurrencyAmount, args: (u64, u64)) -> u16 { + let result: u64 = price.saturating_mul_int(args.0).saturating_add(args.1); result.unique_saturated_into() } } +/// Standard tier slots arguments. +/// Initially decided for Astar, during the Tokenomics 2.0 work. +pub const STANDARD_TIER_SLOTS_ARGS: (u64, u64) = (1000, 50); + /// RankedTier is wrapper around u8 to hold both tier and rank. u8 has 2 bytes (8bits) and they're using in this order `0xrank_tier`. /// First 4 bits are used to hold rank and second 4 bits are used to hold tier. /// i.e: 0xa1 will hold rank: 10 and tier: 1 (0xa1 & 0xf == 1; 0xa1 >> 4 == 10;) diff --git a/runtime/astar/src/lib.rs b/runtime/astar/src/lib.rs index d7aeb6d56c..972ced732f 100644 --- a/runtime/astar/src/lib.rs +++ b/runtime/astar/src/lib.rs @@ -1590,11 +1590,16 @@ pub type Executive = frame_executive::Executive< pub type Migrations = (Unreleased, Permanent); /// Unreleased migrations. Add new ones here: -pub type Unreleased = pallet_dapp_staking::migration::versioned_migrations::V8ToV9; +pub type Unreleased = + (pallet_dapp_staking::migration::versioned_migrations::V8ToV9,); /// Migrations/checks that do not need to be versioned and can run on every upgrade. pub type Permanent = (pallet_xcm::migration::MigrateToLatestXcmVersion,); +parameter_types! { + pub const TierSlotsArgs: (u64, u64) = (1000, 50); +} + type EventRecord = frame_system::EventRecord< ::RuntimeEvent, ::Hash, diff --git a/runtime/astar/src/weights/pallet_dapp_staking.rs b/runtime/astar/src/weights/pallet_dapp_staking.rs index 43b28ee7a6..57153cc532 100644 --- a/runtime/astar/src/weights/pallet_dapp_staking.rs +++ b/runtime/astar/src/weights/pallet_dapp_staking.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_dapp_staking //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-04-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.1 +//! DATE: 2025-02-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `gh-runner-01-ovh`, CPU: `Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("astar-dev"), DB CACHE: 1024 @@ -34,14 +34,11 @@ // --repeat=20 // --pallet=pallet_dapp_staking // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=./benchmark-results/astar-dev/dapp_staking_weights.rs // --template=./scripts/templates/weight-template.hbs -// TODO: Dummy values for move_stake: do proper benchmark using gha - #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] @@ -50,15 +47,15 @@ use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use core::marker::PhantomData; use pallet_dapp_staking::WeightInfo; -// Weights for pallet_dapp_staking using the Substrate node and recommended hardware. +/// Weights for pallet_dapp_staking using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { fn maintenance_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_096_000 picoseconds. - Weight::from_parts(6_258_000, 0) + // Minimum execution time: 6_160_000 picoseconds. + Weight::from_parts(6_345_000, 0) } /// Storage: `DappStaking::IntegratedDApps` (r:1 w:1) /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) @@ -70,8 +67,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3086` - // Minimum execution time: 12_438_000 picoseconds. - Weight::from_parts(12_827_000, 3086) + // Minimum execution time: 12_235_000 picoseconds. + Weight::from_parts(12_512_000, 3086) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -81,8 +78,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `97` // Estimated: `3086` - // Minimum execution time: 10_853_000 picoseconds. - Weight::from_parts(11_125_000, 3086) + // Minimum execution time: 10_517_000 picoseconds. + Weight::from_parts(10_793_000, 3086) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -92,8 +89,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `97` // Estimated: `3086` - // Minimum execution time: 10_931_000 picoseconds. - Weight::from_parts(11_327_000, 3086) + // Minimum execution time: 10_363_000 picoseconds. + Weight::from_parts(10_656_000, 3086) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -107,8 +104,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `97` // Estimated: `3086` - // Minimum execution time: 15_048_000 picoseconds. - Weight::from_parts(15_439_000, 3086) + // Minimum execution time: 14_595_000 picoseconds. + Weight::from_parts(14_935_000, 3086) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -126,8 +123,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `138` // Estimated: `4764` - // Minimum execution time: 28_197_000 picoseconds. - Weight::from_parts(28_589_000, 4764) + // Minimum execution time: 31_874_000 picoseconds. + Weight::from_parts(32_108_000, 4764) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -143,8 +140,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `158` // Estimated: `4764` - // Minimum execution time: 31_817_000 picoseconds. - Weight::from_parts(32_385_000, 4764) + // Minimum execution time: 32_204_000 picoseconds. + Weight::from_parts(32_658_000, 4764) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -160,8 +157,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `158` // Estimated: `4764` - // Minimum execution time: 28_990_000 picoseconds. - Weight::from_parts(29_442_000, 4764) + // Minimum execution time: 28_967_000 picoseconds. + Weight::from_parts(29_523_000, 4764) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -178,10 +175,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `190` // Estimated: `4764` - // Minimum execution time: 28_802_000 picoseconds. - Weight::from_parts(29_890_431, 4764) - // Standard Error: 2_601 - .saturating_add(Weight::from_parts(119_567, 0).saturating_mul(x.into())) + // Minimum execution time: 29_887_000 picoseconds. + Weight::from_parts(31_172_595, 4764) + // Standard Error: 2_859 + .saturating_add(Weight::from_parts(124_029, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -197,8 +194,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `200` // Estimated: `4764` - // Minimum execution time: 26_863_000 picoseconds. - Weight::from_parts(27_357_000, 4764) + // Minimum execution time: 27_384_000 picoseconds. + Weight::from_parts(27_620_000, 4764) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -220,8 +217,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `274` // Estimated: `4764` - // Minimum execution time: 40_414_000 picoseconds. - Weight::from_parts(41_054_000, 4764) + // Minimum execution time: 40_988_000 picoseconds. + Weight::from_parts(41_562_000, 4764) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -243,8 +240,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `459` // Estimated: `4764` - // Minimum execution time: 44_604_000 picoseconds. - Weight::from_parts(45_089_000, 4764) + // Minimum execution time: 45_212_000 picoseconds. + Weight::from_parts(45_611_000, 4764) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -263,10 +260,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `541` // Estimated: `4764` - // Minimum execution time: 48_438_000 picoseconds. - Weight::from_parts(47_832_086, 4764) - // Standard Error: 3_498 - .saturating_add(Weight::from_parts(1_886_107, 0).saturating_mul(x.into())) + // Minimum execution time: 50_966_000 picoseconds. + Weight::from_parts(50_088_222, 4764) + // Standard Error: 4_812 + .saturating_add(Weight::from_parts(1_932_998, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -283,10 +280,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `519` // Estimated: `4764` - // Minimum execution time: 46_018_000 picoseconds. - Weight::from_parts(45_177_385, 4764) - // Standard Error: 3_286 - .saturating_add(Weight::from_parts(1_902_280, 0).saturating_mul(x.into())) + // Minimum execution time: 48_396_000 picoseconds. + Weight::from_parts(47_718_494, 4764) + // Standard Error: 3_774 + .saturating_add(Weight::from_parts(1_922_497, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -300,8 +297,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `275` // Estimated: `3775` - // Minimum execution time: 35_985_000 picoseconds. - Weight::from_parts(36_345_000, 3775) + // Minimum execution time: 37_169_000 picoseconds. + Weight::from_parts(37_719_000, 3775) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -313,8 +310,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2672` // Estimated: `5113` - // Minimum execution time: 53_382_000 picoseconds. - Weight::from_parts(55_179_000, 5113) + // Minimum execution time: 54_124_000 picoseconds. + Weight::from_parts(54_932_000, 5113) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -334,8 +331,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `322` // Estimated: `4764` - // Minimum execution time: 35_930_000 picoseconds. - Weight::from_parts(36_779_000, 4764) + // Minimum execution time: 37_145_000 picoseconds. + Weight::from_parts(37_697_000, 4764) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -352,10 +349,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `257 + x * (73 ±0)` // Estimated: `4764 + x * (2653 ±0)` - // Minimum execution time: 35_936_000 picoseconds. - Weight::from_parts(32_624_459, 4764) - // Standard Error: 7_148 - .saturating_add(Weight::from_parts(4_932_135, 0).saturating_mul(x.into())) + // Minimum execution time: 37_160_000 picoseconds. + Weight::from_parts(34_175_483, 4764) + // Standard Error: 8_747 + .saturating_add(Weight::from_parts(4_882_773, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(2_u64)) @@ -368,62 +365,72 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1486` - // Minimum execution time: 8_769_000 picoseconds. - Weight::from_parts(8_948_000, 1486) + // Minimum execution time: 8_714_000 picoseconds. + Weight::from_parts(8_924_000, 1486) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `DappStaking::IntegratedDApps` (r:2 w:0) /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) /// Storage: `DappStaking::StakerInfo` (r:2 w:2) - /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(179), added: 2654, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) /// Storage: `DappStaking::ContractStake` (r:2 w:2) /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn move_stake_from_registered_source() -> Weight { // Proof Size summary in bytes: - // Measured: `373` - // Estimated: `6298` - // Minimum execution time: 38_000_000 picoseconds. - Weight::from_parts(38_000_000, 6298) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Measured: `553` + // Estimated: `6296` + // Minimum execution time: 71_782_000 picoseconds. + Weight::from_parts(72_398_000, 6296) + .saturating_add(T::DbWeight::get().reads(10_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: `DappStaking::IntegratedDApps` (r:2 w:0) /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StakerInfo` (r:2 w:2) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) /// Storage: `DappStaking::Ledger` (r:1 w:1) /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) - /// Storage: `DappStaking::StakerInfo` (r:2 w:2) - /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(179), added: 2654, mode: `MaxEncodedLen`) - /// Storage: `DappStaking::ContractStake` (r:2 w:2) - /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) /// Storage: `Balances::Freezes` (r:1 w:1) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:0) /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::ContractStake` (r:1 w:1) + /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) fn move_stake_unregistered_source() -> Weight { // Proof Size summary in bytes: - // Measured: `536` - // Estimated: `6298` - // Minimum execution time: 59_000_000 picoseconds. - Weight::from_parts(60_000_000, 6298) - .saturating_add(RocksDbWeight::get().reads(9_u64)) - .saturating_add(RocksDbWeight::get().writes(6_u64)) + // Measured: `419` + // Estimated: `6296` + // Minimum execution time: 63_766_000 picoseconds. + Weight::from_parts(64_076_000, 6296) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) } /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) /// Storage: `DappStaking::EraRewards` (r:1 w:1) /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) - /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(167), added: 662, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) /// Storage: `DappStaking::TierConfig` (r:1 w:1) - /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) fn on_initialize_voting_to_build_and_earn() -> Weight { // Proof Size summary in bytes: - // Measured: `334` + // Measured: `212` // Estimated: `4254` - // Minimum execution time: 24_922_000 picoseconds. - Weight::from_parts(25_631_000, 4254) + // Minimum execution time: 26_591_000 picoseconds. + Weight::from_parts(27_310_000, 4254) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -436,19 +443,19 @@ impl WeightInfo for SubstrateWeight { /// Storage: `DappStaking::EraRewards` (r:1 w:1) /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) - /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(167), added: 662, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) /// Storage: `DappStaking::TierConfig` (r:1 w:1) - /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) /// Storage: `DappStaking::DAppTiers` (r:0 w:1) /// Proof: `DappStaking::DAppTiers` (`max_values`: None, `max_size`: Some(1648), added: 4123, mode: `MaxEncodedLen`) fn on_initialize_build_and_earn_to_voting() -> Weight { // Proof Size summary in bytes: - // Measured: `841` + // Measured: `719` // Estimated: `4254` - // Minimum execution time: 40_873_000 picoseconds. - Weight::from_parts(42_059_000, 4254) + // Minimum execution time: 42_054_000 picoseconds. + Weight::from_parts(43_015_000, 4254) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -457,35 +464,35 @@ impl WeightInfo for SubstrateWeight { /// Storage: `DappStaking::EraRewards` (r:1 w:1) /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) - /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(167), added: 662, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) /// Storage: `DappStaking::TierConfig` (r:1 w:1) - /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) /// Storage: `DappStaking::DAppTiers` (r:0 w:1) /// Proof: `DappStaking::DAppTiers` (`max_values`: None, `max_size`: Some(1648), added: 4123, mode: `MaxEncodedLen`) fn on_initialize_build_and_earn_to_build_and_earn() -> Weight { // Proof Size summary in bytes: - // Measured: `386` + // Measured: `264` // Estimated: `4254` - // Minimum execution time: 28_009_000 picoseconds. - Weight::from_parts(28_696_000, 4254) + // Minimum execution time: 29_233_000 picoseconds. + Weight::from_parts(30_149_000, 4254) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: `DappStaking::ContractStake` (r:101 w:0) /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) /// Storage: `DappStaking::TierConfig` (r:1 w:0) - /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 100]`. fn dapp_tier_assignment(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `152 + x * (32 ±0)` + // Measured: `98 + x * (32 ±0)` // Estimated: `3061 + x * (2071 ±0)` - // Minimum execution time: 6_611_000 picoseconds. - Weight::from_parts(10_996_104, 3061) - // Standard Error: 2_861 - .saturating_add(Weight::from_parts(2_367_291, 0).saturating_mul(x.into())) + // Minimum execution time: 8_483_000 picoseconds. + Weight::from_parts(10_922_590, 3061) + // Standard Error: 2_388 + .saturating_add(Weight::from_parts(2_420_114, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(Weight::from_parts(0, 2071).saturating_mul(x.into())) @@ -500,8 +507,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `293` // Estimated: `4254` - // Minimum execution time: 8_185_000 picoseconds. - Weight::from_parts(8_340_000, 4254) + // Minimum execution time: 8_164_000 picoseconds. + Weight::from_parts(8_352_000, 4254) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -511,31 +518,40 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `6560` - // Minimum execution time: 10_060_000 picoseconds. - Weight::from_parts(10_314_000, 6560) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) + // Minimum execution time: 13_041_000 picoseconds. + Weight::from_parts(13_375_000, 6560) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: `DappStaking::Ledger` (r:2 w:1) - /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StaticTierParams` (r:0 w:1) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) + fn set_static_tier_params() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_279_000 picoseconds. + Weight::from_parts(7_452_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `DappStaking::StakerInfo` (r:2 w:1) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) fn update_bonus_step_success() -> Weight { // Proof Size summary in bytes: - // Measured: `76` - // Estimated: `6560` - // Minimum execution time: 10_060_000 picoseconds. - Weight::from_parts(10_314_000, 6560) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) + // Measured: `142` + // Estimated: `6296` + // Minimum execution time: 12_431_000 picoseconds. + Weight::from_parts(12_622_000, 6296) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: `DappStaking::Ledger` (r:2 w:1) - /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StakerInfo` (r:1 w:0) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) fn update_bonus_step_noop() -> Weight { // Proof Size summary in bytes: - // Measured: `76` - // Estimated: `6560` - // Minimum execution time: 10_060_000 picoseconds. - Weight::from_parts(10_314_000, 6560) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) + // Measured: `19` + // Estimated: `3643` + // Minimum execution time: 2_434_000 picoseconds. + Weight::from_parts(2_573_000, 3643) + .saturating_add(T::DbWeight::get().reads(1_u64)) } } diff --git a/runtime/shibuya/src/lib.rs b/runtime/shibuya/src/lib.rs index 8b8cb64311..d2627daae5 100644 --- a/runtime/shibuya/src/lib.rs +++ b/runtime/shibuya/src/lib.rs @@ -1687,11 +1687,16 @@ pub type Executive = frame_executive::Executive< pub type Migrations = (Unreleased, Permanent); /// Unreleased migrations. Add new ones here: -pub type Unreleased = pallet_dapp_staking::migration::versioned_migrations::V8ToV9; +pub type Unreleased = + (pallet_dapp_staking::migration::versioned_migrations::V8ToV9,); /// Migrations/checks that do not need to be versioned and can run on every upgrade. pub type Permanent = (pallet_xcm::migration::MigrateToLatestXcmVersion,); +parameter_types! { + pub const TierSlotsArgs: (u64, u64) = (1000, 50); +} + type EventRecord = frame_system::EventRecord< ::RuntimeEvent, ::Hash, diff --git a/runtime/shibuya/src/weights/pallet_dapp_staking.rs b/runtime/shibuya/src/weights/pallet_dapp_staking.rs index 758c4548a7..f49e04f05e 100644 --- a/runtime/shibuya/src/weights/pallet_dapp_staking.rs +++ b/runtime/shibuya/src/weights/pallet_dapp_staking.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_dapp_staking //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-04-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.1 +//! DATE: 2025-02-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `gh-runner-01-ovh`, CPU: `Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("shibuya-dev"), DB CACHE: 1024 @@ -34,14 +34,11 @@ // --repeat=20 // --pallet=pallet_dapp_staking // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=./benchmark-results/shibuya-dev/dapp_staking_weights.rs // --template=./scripts/templates/weight-template.hbs -// TODO: Dummy values for move_stake: do proper benchmark using gha - #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] @@ -57,8 +54,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_644_000 picoseconds. - Weight::from_parts(5_873_000, 0) + // Minimum execution time: 5_814_000 picoseconds. + Weight::from_parts(6_046_000, 0) } /// Storage: `DappStaking::IntegratedDApps` (r:1 w:1) /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) @@ -70,8 +67,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3086` - // Minimum execution time: 11_812_000 picoseconds. - Weight::from_parts(12_247_000, 3086) + // Minimum execution time: 18_311_000 picoseconds. + Weight::from_parts(18_641_000, 3086) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -81,8 +78,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `97` // Estimated: `3086` - // Minimum execution time: 10_416_000 picoseconds. - Weight::from_parts(10_663_000, 3086) + // Minimum execution time: 10_167_000 picoseconds. + Weight::from_parts(10_416_000, 3086) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -92,8 +89,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `97` // Estimated: `3086` - // Minimum execution time: 10_216_000 picoseconds. - Weight::from_parts(10_571_000, 3086) + // Minimum execution time: 10_273_000 picoseconds. + Weight::from_parts(10_424_000, 3086) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -107,8 +104,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `97` // Estimated: `3086` - // Minimum execution time: 14_241_000 picoseconds. - Weight::from_parts(14_711_000, 3086) + // Minimum execution time: 14_121_000 picoseconds. + Weight::from_parts(14_390_000, 3086) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -126,8 +123,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `138` // Estimated: `4764` - // Minimum execution time: 30_193_000 picoseconds. - Weight::from_parts(30_498_000, 4764) + // Minimum execution time: 31_369_000 picoseconds. + Weight::from_parts(31_759_000, 4764) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -143,8 +140,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `156` // Estimated: `4764` - // Minimum execution time: 30_765_000 picoseconds. - Weight::from_parts(31_167_000, 4764) + // Minimum execution time: 31_464_000 picoseconds. + Weight::from_parts(31_883_000, 4764) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -160,8 +157,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `156` // Estimated: `4764` - // Minimum execution time: 28_141_000 picoseconds. - Weight::from_parts(28_502_000, 4764) + // Minimum execution time: 28_773_000 picoseconds. + Weight::from_parts(29_179_000, 4764) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -174,14 +171,12 @@ impl WeightInfo for SubstrateWeight { /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 8]`. - fn claim_unlocked(x: u32, ) -> Weight { + fn claim_unlocked(_x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `187` // Estimated: `4764` - // Minimum execution time: 27_809_000 picoseconds. - Weight::from_parts(28_780_892, 4764) - // Standard Error: 4_544 - .saturating_add(Weight::from_parts(190_464, 0).saturating_mul(x.into())) + // Minimum execution time: 29_085_000 picoseconds. + Weight::from_parts(32_203_292, 4764) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -197,8 +192,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `182` // Estimated: `4764` - // Minimum execution time: 25_097_000 picoseconds. - Weight::from_parts(25_376_000, 4764) + // Minimum execution time: 26_301_000 picoseconds. + Weight::from_parts(26_779_000, 4764) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -220,8 +215,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `272` // Estimated: `4764` - // Minimum execution time: 38_233_000 picoseconds. - Weight::from_parts(38_804_000, 4764) + // Minimum execution time: 39_576_000 picoseconds. + Weight::from_parts(40_156_000, 4764) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -243,8 +238,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `453` // Estimated: `4764` - // Minimum execution time: 42_466_000 picoseconds. - Weight::from_parts(42_850_000, 4764) + // Minimum execution time: 43_291_000 picoseconds. + Weight::from_parts(43_884_000, 4764) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -263,10 +258,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `522` // Estimated: `4764` - // Minimum execution time: 46_446_000 picoseconds. - Weight::from_parts(45_930_258, 4764) - // Standard Error: 4_071 - .saturating_add(Weight::from_parts(1_720_079, 0).saturating_mul(x.into())) + // Minimum execution time: 48_749_000 picoseconds. + Weight::from_parts(46_216_134, 4764) + // Standard Error: 136_585 + .saturating_add(Weight::from_parts(2_527_528, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -283,10 +278,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `501` // Estimated: `4764` - // Minimum execution time: 44_171_000 picoseconds. - Weight::from_parts(43_679_252, 4764) - // Standard Error: 4_295 - .saturating_add(Weight::from_parts(1_728_663, 0).saturating_mul(x.into())) + // Minimum execution time: 46_259_000 picoseconds. + Weight::from_parts(48_794_041, 4764) + // Standard Error: 110_072 + .saturating_add(Weight::from_parts(1_735_569, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -300,8 +295,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `271` // Estimated: `3775` - // Minimum execution time: 34_646_000 picoseconds. - Weight::from_parts(34_959_000, 3775) + // Minimum execution time: 58_018_000 picoseconds. + Weight::from_parts(58_233_000, 3775) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -313,8 +308,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2672` // Estimated: `5113` - // Minimum execution time: 50_005_000 picoseconds. - Weight::from_parts(50_884_000, 5113) + // Minimum execution time: 53_482_000 picoseconds. + Weight::from_parts(55_287_000, 5113) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -334,8 +329,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `317` // Estimated: `4764` - // Minimum execution time: 36_058_000 picoseconds. - Weight::from_parts(36_468_000, 4764) + // Minimum execution time: 37_452_000 picoseconds. + Weight::from_parts(37_739_000, 4764) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -352,10 +347,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `255 + x * (73 ±0)` // Estimated: `4764 + x * (2653 ±0)` - // Minimum execution time: 35_401_000 picoseconds. - Weight::from_parts(31_550_798, 4764) - // Standard Error: 9_420 - .saturating_add(Weight::from_parts(4_950_275, 0).saturating_mul(x.into())) + // Minimum execution time: 36_245_000 picoseconds. + Weight::from_parts(32_822_702, 4764) + // Standard Error: 10_278 + .saturating_add(Weight::from_parts(4_896_050, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(2_u64)) @@ -368,62 +363,72 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1486` - // Minimum execution time: 8_432_000 picoseconds. - Weight::from_parts(8_696_000, 1486) + // Minimum execution time: 8_315_000 picoseconds. + Weight::from_parts(8_568_000, 1486) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `DappStaking::IntegratedDApps` (r:2 w:0) /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) /// Storage: `DappStaking::StakerInfo` (r:2 w:2) - /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(179), added: 2654, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) /// Storage: `DappStaking::ContractStake` (r:2 w:2) /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn move_stake_from_registered_source() -> Weight { // Proof Size summary in bytes: - // Measured: `373` - // Estimated: `6298` - // Minimum execution time: 38_000_000 picoseconds. - Weight::from_parts(38_000_000, 6298) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Measured: `547` + // Estimated: `6296` + // Minimum execution time: 68_551_000 picoseconds. + Weight::from_parts(69_024_000, 6296) + .saturating_add(T::DbWeight::get().reads(10_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: `DappStaking::IntegratedDApps` (r:2 w:0) /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StakerInfo` (r:2 w:2) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) /// Storage: `DappStaking::Ledger` (r:1 w:1) /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) - /// Storage: `DappStaking::StakerInfo` (r:2 w:2) - /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(179), added: 2654, mode: `MaxEncodedLen`) - /// Storage: `DappStaking::ContractStake` (r:2 w:2) - /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) /// Storage: `Balances::Freezes` (r:1 w:1) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:0) /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::ContractStake` (r:1 w:1) + /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) fn move_stake_unregistered_source() -> Weight { // Proof Size summary in bytes: - // Measured: `536` - // Estimated: `6298` - // Minimum execution time: 59_000_000 picoseconds. - Weight::from_parts(60_000_000, 6298) - .saturating_add(RocksDbWeight::get().reads(9_u64)) - .saturating_add(RocksDbWeight::get().writes(6_u64)) + // Measured: `414` + // Estimated: `6296` + // Minimum execution time: 62_211_000 picoseconds. + Weight::from_parts(62_815_000, 6296) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) } /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) /// Storage: `DappStaking::EraRewards` (r:1 w:1) /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) - /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(167), added: 662, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) /// Storage: `DappStaking::TierConfig` (r:1 w:1) - /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) fn on_initialize_voting_to_build_and_earn() -> Weight { // Proof Size summary in bytes: - // Measured: `334` + // Measured: `212` // Estimated: `4254` - // Minimum execution time: 24_158_000 picoseconds. - Weight::from_parts(24_700_000, 4254) + // Minimum execution time: 25_319_000 picoseconds. + Weight::from_parts(26_079_000, 4254) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -436,19 +441,19 @@ impl WeightInfo for SubstrateWeight { /// Storage: `DappStaking::EraRewards` (r:1 w:1) /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) - /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(167), added: 662, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) /// Storage: `DappStaking::TierConfig` (r:1 w:1) - /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) /// Storage: `DappStaking::DAppTiers` (r:0 w:1) /// Proof: `DappStaking::DAppTiers` (`max_values`: None, `max_size`: Some(1648), added: 4123, mode: `MaxEncodedLen`) fn on_initialize_build_and_earn_to_voting() -> Weight { // Proof Size summary in bytes: - // Measured: `631` + // Measured: `527` // Estimated: `4254` - // Minimum execution time: 37_971_000 picoseconds. - Weight::from_parts(38_780_000, 4254) + // Minimum execution time: 37_260_000 picoseconds. + Weight::from_parts(37_871_000, 4254) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -457,35 +462,35 @@ impl WeightInfo for SubstrateWeight { /// Storage: `DappStaking::EraRewards` (r:1 w:1) /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) - /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(167), added: 662, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) /// Storage: `DappStaking::TierConfig` (r:1 w:1) - /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) /// Storage: `DappStaking::DAppTiers` (r:0 w:1) /// Proof: `DappStaking::DAppTiers` (`max_values`: None, `max_size`: Some(1648), added: 4123, mode: `MaxEncodedLen`) fn on_initialize_build_and_earn_to_build_and_earn() -> Weight { // Proof Size summary in bytes: - // Measured: `386` + // Measured: `266` // Estimated: `4254` - // Minimum execution time: 27_435_000 picoseconds. - Weight::from_parts(28_483_000, 4254) + // Minimum execution time: 29_070_000 picoseconds. + Weight::from_parts(29_635_000, 4254) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: `DappStaking::ContractStake` (r:101 w:0) /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) /// Storage: `DappStaking::TierConfig` (r:1 w:0) - /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 100]`. fn dapp_tier_assignment(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `152 + x * (32 ±0)` + // Measured: `97 + x * (32 ±0)` // Estimated: `3061 + x * (2071 ±0)` - // Minimum execution time: 8_569_000 picoseconds. - Weight::from_parts(11_220_207, 3061) - // Standard Error: 2_396 - .saturating_add(Weight::from_parts(2_393_849, 0).saturating_mul(x.into())) + // Minimum execution time: 8_294_000 picoseconds. + Weight::from_parts(10_943_494, 3061) + // Standard Error: 2_629 + .saturating_add(Weight::from_parts(2_386_167, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(Weight::from_parts(0, 2071).saturating_mul(x.into())) @@ -500,8 +505,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `293` // Estimated: `4254` - // Minimum execution time: 8_023_000 picoseconds. - Weight::from_parts(8_354_000, 4254) + // Minimum execution time: 8_016_000 picoseconds. + Weight::from_parts(8_213_000, 4254) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -511,31 +516,40 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `6560` - // Minimum execution time: 10_060_000 picoseconds. - Weight::from_parts(10_314_000, 6560) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) + // Minimum execution time: 12_432_000 picoseconds. + Weight::from_parts(12_891_000, 6560) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: `DappStaking::Ledger` (r:2 w:1) - /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StaticTierParams` (r:0 w:1) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) + fn set_static_tier_params() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_725_000 picoseconds. + Weight::from_parts(6_999_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `DappStaking::StakerInfo` (r:2 w:1) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) fn update_bonus_step_success() -> Weight { // Proof Size summary in bytes: - // Measured: `76` - // Estimated: `6560` - // Minimum execution time: 10_060_000 picoseconds. - Weight::from_parts(10_314_000, 6560) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) + // Measured: `141` + // Estimated: `6296` + // Minimum execution time: 11_951_000 picoseconds. + Weight::from_parts(12_306_000, 6296) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: `DappStaking::Ledger` (r:2 w:1) - /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StakerInfo` (r:1 w:0) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) fn update_bonus_step_noop() -> Weight { // Proof Size summary in bytes: - // Measured: `76` - // Estimated: `6560` - // Minimum execution time: 10_060_000 picoseconds. - Weight::from_parts(10_314_000, 6560) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) + // Measured: `19` + // Estimated: `3643` + // Minimum execution time: 2_547_000 picoseconds. + Weight::from_parts(2_605_000, 3643) + .saturating_add(T::DbWeight::get().reads(1_u64)) } } diff --git a/runtime/shiden/src/lib.rs b/runtime/shiden/src/lib.rs index ebde5aa3e2..dc5be17557 100644 --- a/runtime/shiden/src/lib.rs +++ b/runtime/shiden/src/lib.rs @@ -78,7 +78,7 @@ use xcm_runtime_apis::{ use astar_primitives::{ dapp_staking::{ AccountCheck as DappStakingAccountCheck, CycleConfiguration, DAppId, EraNumber, - PeriodNumber, RankedTier, SmartContract, TierSlots as TierSlotsFunc, + PeriodNumber, RankedTier, SmartContract, StandardTierSlots, }, evm::{EVMFungibleAdapterWrapper, EvmRevertCodeHandler}, governance::OracleMembershipInst, @@ -411,15 +411,6 @@ impl DappStakingAccountCheck for AccountCheck { } } -pub struct ShidenTierSlots; -impl TierSlotsFunc for ShidenTierSlots { - fn number_of_slots(price: Price) -> u16 { - // According to the forum proposal, the original formula's factor is reduced from 1000x to 100x. - let result: u64 = price.saturating_mul_int(100_u64).saturating_add(50); - result.unique_saturated_into() - } -} - parameter_types! { pub const MinimumStakingAmount: Balance = 50 * SDN; pub const BaseNativeCurrencyPrice: FixedU128 = FixedU128::from_rational(5, 100); @@ -438,7 +429,7 @@ impl pallet_dapp_staking::Config for Runtime { type CycleConfiguration = InflationCycleConfig; type Observers = Inflation; type AccountCheck = AccountCheck; - type TierSlots = ShidenTierSlots; + type TierSlots = StandardTierSlots; type BaseNativeCurrencyPrice = BaseNativeCurrencyPrice; type EraRewardSpanLength = ConstU32<16>; type RewardRetentionInPeriods = ConstU32<3>; @@ -1294,11 +1285,16 @@ pub type Executive = frame_executive::Executive< pub type Migrations = (Unreleased, Permanent); /// Unreleased migrations. Add new ones here: -pub type Unreleased = pallet_dapp_staking::migration::versioned_migrations::V8ToV9; +pub type Unreleased = + (pallet_dapp_staking::migration::versioned_migrations::V8ToV9,); /// Migrations/checks that do not need to be versioned and can run on every upgrade. pub type Permanent = (pallet_xcm::migration::MigrateToLatestXcmVersion,); +parameter_types! { + pub const TierSlotsArgs: (u64, u64) = (100, 50); +} + type EventRecord = frame_system::EventRecord< ::RuntimeEvent, ::Hash, diff --git a/runtime/shiden/src/weights/pallet_dapp_staking.rs b/runtime/shiden/src/weights/pallet_dapp_staking.rs index 0eb2589620..6682859198 100644 --- a/runtime/shiden/src/weights/pallet_dapp_staking.rs +++ b/runtime/shiden/src/weights/pallet_dapp_staking.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_dapp_staking //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-05-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.1 +//! DATE: 2025-02-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `gh-runner-01-ovh`, CPU: `Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("shiden-dev"), DB CACHE: 1024 @@ -34,14 +34,11 @@ // --repeat=20 // --pallet=pallet_dapp_staking // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --output=./benchmark-results/shiden-dev/dapp_staking_weights.rs // --template=./scripts/templates/weight-template.hbs -// TODO: Dummy values for move_stake: do proper benchmark using gha - #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] @@ -57,8 +54,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_968_000 picoseconds. - Weight::from_parts(6_128_000, 0) + // Minimum execution time: 6_302_000 picoseconds. + Weight::from_parts(6_551_000, 0) } /// Storage: `DappStaking::IntegratedDApps` (r:1 w:1) /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) @@ -70,8 +67,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3086` - // Minimum execution time: 12_156_000 picoseconds. - Weight::from_parts(12_383_000, 3086) + // Minimum execution time: 12_583_000 picoseconds. + Weight::from_parts(12_925_000, 3086) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -81,8 +78,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `97` // Estimated: `3086` - // Minimum execution time: 10_444_000 picoseconds. - Weight::from_parts(10_815_000, 3086) + // Minimum execution time: 10_983_000 picoseconds. + Weight::from_parts(11_229_000, 3086) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -92,8 +89,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `97` // Estimated: `3086` - // Minimum execution time: 10_370_000 picoseconds. - Weight::from_parts(10_652_000, 3086) + // Minimum execution time: 10_834_000 picoseconds. + Weight::from_parts(11_105_000, 3086) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -107,8 +104,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `97` // Estimated: `3086` - // Minimum execution time: 14_692_000 picoseconds. - Weight::from_parts(14_973_000, 3086) + // Minimum execution time: 14_967_000 picoseconds. + Weight::from_parts(15_435_000, 3086) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -126,8 +123,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `138` // Estimated: `4764` - // Minimum execution time: 27_703_000 picoseconds. - Weight::from_parts(28_088_000, 4764) + // Minimum execution time: 29_798_000 picoseconds. + Weight::from_parts(30_315_000, 4764) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -143,8 +140,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `158` // Estimated: `4764` - // Minimum execution time: 31_136_000 picoseconds. - Weight::from_parts(31_749_000, 4764) + // Minimum execution time: 33_619_000 picoseconds. + Weight::from_parts(33_983_000, 4764) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -160,8 +157,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `158` // Estimated: `4764` - // Minimum execution time: 28_484_000 picoseconds. - Weight::from_parts(28_994_000, 4764) + // Minimum execution time: 30_595_000 picoseconds. + Weight::from_parts(31_048_000, 4764) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -178,10 +175,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `191` // Estimated: `4764` - // Minimum execution time: 28_418_000 picoseconds. - Weight::from_parts(29_649_616, 4764) - // Standard Error: 2_468 - .saturating_add(Weight::from_parts(117_983, 0).saturating_mul(x.into())) + // Minimum execution time: 30_945_000 picoseconds. + Weight::from_parts(32_298_956, 4764) + // Standard Error: 2_418 + .saturating_add(Weight::from_parts(106_026, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -197,8 +194,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `200` // Estimated: `4764` - // Minimum execution time: 25_786_000 picoseconds. - Weight::from_parts(26_585_000, 4764) + // Minimum execution time: 28_074_000 picoseconds. + Weight::from_parts(28_410_000, 4764) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -220,8 +217,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `274` // Estimated: `4764` - // Minimum execution time: 38_893_000 picoseconds. - Weight::from_parts(39_246_000, 4764) + // Minimum execution time: 41_767_000 picoseconds. + Weight::from_parts(42_395_000, 4764) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -243,8 +240,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `459` // Estimated: `4764` - // Minimum execution time: 43_357_000 picoseconds. - Weight::from_parts(43_678_000, 4764) + // Minimum execution time: 45_973_000 picoseconds. + Weight::from_parts(47_056_000, 4764) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -261,12 +258,12 @@ impl WeightInfo for SubstrateWeight { /// The range of component `x` is `[1, 16]`. fn claim_staker_rewards_past_period(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `541` + // Measured: `542` // Estimated: `4764` - // Minimum execution time: 48_239_000 picoseconds. - Weight::from_parts(47_380_121, 4764) - // Standard Error: 3_818 - .saturating_add(Weight::from_parts(1_938_013, 0).saturating_mul(x.into())) + // Minimum execution time: 52_907_000 picoseconds. + Weight::from_parts(51_696_879, 4764) + // Standard Error: 3_925 + .saturating_add(Weight::from_parts(1_974_903, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -283,10 +280,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `519` // Estimated: `4764` - // Minimum execution time: 45_792_000 picoseconds. - Weight::from_parts(45_193_051, 4764) - // Standard Error: 5_334 - .saturating_add(Weight::from_parts(1_945_694, 0).saturating_mul(x.into())) + // Minimum execution time: 50_190_000 picoseconds. + Weight::from_parts(49_292_465, 4764) + // Standard Error: 4_217 + .saturating_add(Weight::from_parts(1_961_682, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -298,10 +295,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) fn claim_bonus_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `275` + // Measured: `276` // Estimated: `3775` - // Minimum execution time: 35_426_000 picoseconds. - Weight::from_parts(35_776_000, 3775) + // Minimum execution time: 38_205_000 picoseconds. + Weight::from_parts(38_754_000, 3775) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -313,8 +310,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2672` // Estimated: `5113` - // Minimum execution time: 48_587_000 picoseconds. - Weight::from_parts(49_645_000, 5113) + // Minimum execution time: 54_241_000 picoseconds. + Weight::from_parts(55_270_000, 5113) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -334,8 +331,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `322` // Estimated: `4764` - // Minimum execution time: 35_966_000 picoseconds. - Weight::from_parts(36_190_000, 4764) + // Minimum execution time: 38_812_000 picoseconds. + Weight::from_parts(39_373_000, 4764) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -352,10 +349,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `256 + x * (73 ±0)` // Estimated: `4764 + x * (2653 ±0)` - // Minimum execution time: 35_797_000 picoseconds. - Weight::from_parts(32_229_929, 4764) - // Standard Error: 6_544 - .saturating_add(Weight::from_parts(4_898_852, 0).saturating_mul(x.into())) + // Minimum execution time: 38_576_000 picoseconds. + Weight::from_parts(35_251_524, 4764) + // Standard Error: 6_010 + .saturating_add(Weight::from_parts(5_005_912, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(T::DbWeight::get().writes(2_u64)) @@ -368,62 +365,72 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1486` - // Minimum execution time: 8_530_000 picoseconds. - Weight::from_parts(8_785_000, 1486) + // Minimum execution time: 9_038_000 picoseconds. + Weight::from_parts(9_308_000, 1486) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `DappStaking::IntegratedDApps` (r:2 w:0) /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::Ledger` (r:1 w:1) + /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) /// Storage: `DappStaking::StakerInfo` (r:2 w:2) - /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(179), added: 2654, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) /// Storage: `DappStaking::ContractStake` (r:2 w:2) /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `Balances::Freezes` (r:1 w:1) + /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + /// Storage: `Balances::Locks` (r:1 w:0) + /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) fn move_stake_from_registered_source() -> Weight { // Proof Size summary in bytes: - // Measured: `373` - // Estimated: `6298` - // Minimum execution time: 38_000_000 picoseconds. - Weight::from_parts(38_000_000, 6298) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Measured: `553` + // Estimated: `6296` + // Minimum execution time: 72_418_000 picoseconds. + Weight::from_parts(73_041_000, 6296) + .saturating_add(T::DbWeight::get().reads(10_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: `DappStaking::IntegratedDApps` (r:2 w:0) /// Proof: `DappStaking::IntegratedDApps` (`max_values`: Some(65535), `max_size`: Some(116), added: 2096, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StakerInfo` (r:2 w:2) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) /// Storage: `DappStaking::Ledger` (r:1 w:1) /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) - /// Storage: `DappStaking::StakerInfo` (r:2 w:2) - /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(179), added: 2654, mode: `MaxEncodedLen`) - /// Storage: `DappStaking::ContractStake` (r:2 w:2) - /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) + /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) /// Storage: `Balances::Freezes` (r:1 w:1) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:0) /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::ContractStake` (r:1 w:1) + /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) fn move_stake_unregistered_source() -> Weight { // Proof Size summary in bytes: - // Measured: `536` - // Estimated: `6298` - // Minimum execution time: 59_000_000 picoseconds. - Weight::from_parts(60_000_000, 6298) - .saturating_add(RocksDbWeight::get().reads(9_u64)) - .saturating_add(RocksDbWeight::get().writes(6_u64)) + // Measured: `419` + // Estimated: `6296` + // Minimum execution time: 65_226_000 picoseconds. + Weight::from_parts(65_723_000, 6296) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) } /// Storage: `DappStaking::CurrentEraInfo` (r:1 w:1) /// Proof: `DappStaking::CurrentEraInfo` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) /// Storage: `DappStaking::EraRewards` (r:1 w:1) /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) - /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(167), added: 662, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) /// Storage: `DappStaking::TierConfig` (r:1 w:1) - /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) fn on_initialize_voting_to_build_and_earn() -> Weight { // Proof Size summary in bytes: - // Measured: `334` + // Measured: `212` // Estimated: `4254` - // Minimum execution time: 24_436_000 picoseconds. - Weight::from_parts(25_190_000, 4254) + // Minimum execution time: 26_554_000 picoseconds. + Weight::from_parts(27_397_000, 4254) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -436,19 +443,19 @@ impl WeightInfo for SubstrateWeight { /// Storage: `DappStaking::EraRewards` (r:1 w:1) /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) - /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(167), added: 662, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) /// Storage: `DappStaking::TierConfig` (r:1 w:1) - /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) /// Storage: `DappStaking::DAppTiers` (r:0 w:1) /// Proof: `DappStaking::DAppTiers` (`max_values`: None, `max_size`: Some(1648), added: 4123, mode: `MaxEncodedLen`) fn on_initialize_build_and_earn_to_voting() -> Weight { // Proof Size summary in bytes: - // Measured: `843` + // Measured: `752` // Estimated: `4254` - // Minimum execution time: 39_979_000 picoseconds. - Weight::from_parts(41_027_000, 4254) + // Minimum execution time: 43_837_000 picoseconds. + Weight::from_parts(44_768_000, 4254) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -457,35 +464,35 @@ impl WeightInfo for SubstrateWeight { /// Storage: `DappStaking::EraRewards` (r:1 w:1) /// Proof: `DappStaking::EraRewards` (`max_values`: None, `max_size`: Some(789), added: 3264, mode: `MaxEncodedLen`) /// Storage: `DappStaking::StaticTierParams` (r:1 w:0) - /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(167), added: 662, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) /// Storage: `PriceAggregator::ValuesCircularBuffer` (r:1 w:0) /// Proof: `PriceAggregator::ValuesCircularBuffer` (`max_values`: Some(1), `max_size`: Some(117), added: 612, mode: `MaxEncodedLen`) /// Storage: `DappStaking::TierConfig` (r:1 w:1) - /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) /// Storage: `DappStaking::DAppTiers` (r:0 w:1) /// Proof: `DappStaking::DAppTiers` (`max_values`: None, `max_size`: Some(1648), added: 4123, mode: `MaxEncodedLen`) fn on_initialize_build_and_earn_to_build_and_earn() -> Weight { // Proof Size summary in bytes: - // Measured: `386` + // Measured: `266` // Estimated: `4254` - // Minimum execution time: 27_746_000 picoseconds. - Weight::from_parts(27_938_000, 4254) + // Minimum execution time: 30_131_000 picoseconds. + Weight::from_parts(30_669_000, 4254) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } /// Storage: `DappStaking::ContractStake` (r:101 w:0) /// Proof: `DappStaking::ContractStake` (`max_values`: Some(65535), `max_size`: Some(91), added: 2071, mode: `MaxEncodedLen`) /// Storage: `DappStaking::TierConfig` (r:1 w:0) - /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`) + /// Proof: `DappStaking::TierConfig` (`max_values`: Some(1), `max_size`: Some(91), added: 586, mode: `MaxEncodedLen`) /// The range of component `x` is `[0, 100]`. fn dapp_tier_assignment(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `152 + x * (32 ±0)` + // Measured: `98 + x * (32 ±0)` // Estimated: `3061 + x * (2071 ±0)` - // Minimum execution time: 6_531_000 picoseconds. - Weight::from_parts(10_637_970, 3061) - // Standard Error: 3_112 - .saturating_add(Weight::from_parts(2_395_087, 0).saturating_mul(x.into())) + // Minimum execution time: 6_527_000 picoseconds. + Weight::from_parts(10_441_884, 3061) + // Standard Error: 2_869 + .saturating_add(Weight::from_parts(2_469_904, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into()))) .saturating_add(Weight::from_parts(0, 2071).saturating_mul(x.into())) @@ -500,8 +507,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `293` // Estimated: `4254` - // Minimum execution time: 8_145_000 picoseconds. - Weight::from_parts(8_379_000, 4254) + // Minimum execution time: 8_347_000 picoseconds. + Weight::from_parts(8_554_000, 4254) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -511,32 +518,40 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `6560` - // Minimum execution time: 10_060_000 picoseconds. - Weight::from_parts(10_314_000, 6560) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) + // Minimum execution time: 13_128_000 picoseconds. + Weight::from_parts(13_373_000, 6560) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: `DappStaking::Ledger` (r:2 w:1) - /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StaticTierParams` (r:0 w:1) + /// Proof: `DappStaking::StaticTierParams` (`max_values`: Some(1), `max_size`: Some(87), added: 582, mode: `MaxEncodedLen`) + fn set_static_tier_params() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_366_000 picoseconds. + Weight::from_parts(7_478_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `DappStaking::StakerInfo` (r:2 w:1) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) fn update_bonus_step_success() -> Weight { // Proof Size summary in bytes: - // Measured: `76` - // Estimated: `6560` - // Minimum execution time: 10_060_000 picoseconds. - Weight::from_parts(10_314_000, 6560) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) + // Measured: `142` + // Estimated: `6296` + // Minimum execution time: 10_322_000 picoseconds. + Weight::from_parts(10_521_000, 6296) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: `DappStaking::Ledger` (r:2 w:1) - /// Proof: `DappStaking::Ledger` (`max_values`: None, `max_size`: Some(310), added: 2785, mode: `MaxEncodedLen`) + /// Storage: `DappStaking::StakerInfo` (r:1 w:0) + /// Proof: `DappStaking::StakerInfo` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) fn update_bonus_step_noop() -> Weight { // Proof Size summary in bytes: - // Measured: `76` - // Estimated: `6560` - // Minimum execution time: 10_060_000 picoseconds. - Weight::from_parts(10_314_000, 6560) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) + // Measured: `19` + // Estimated: `3643` + // Minimum execution time: 2_511_000 picoseconds. + Weight::from_parts(2_624_000, 3643) + .saturating_add(T::DbWeight::get().reads(1_u64)) } - }