From cc17b277fdd4477a01ad1e3759f517cebd78e41c Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Tue, 28 May 2024 11:04:33 +0200 Subject: [PATCH] [runtime] remove obsolete state migrations and add missing collator-selection migration (#57) --- runtime/bajun/src/lib.rs | 17 +-- runtime/bajun/src/weights/mod.rs | 1 - .../pallet_ajuna_awesome_avatars_mbm.rs | 102 ------------------ 3 files changed, 2 insertions(+), 118 deletions(-) delete mode 100644 runtime/bajun/src/weights/pallet_ajuna_awesome_avatars_mbm.rs diff --git a/runtime/bajun/src/lib.rs b/runtime/bajun/src/lib.rs index e9660b5..5b09321 100644 --- a/runtime/bajun/src/lib.rs +++ b/runtime/bajun/src/lib.rs @@ -381,27 +381,14 @@ impl frame_system::Config for Runtime { type PostTransactions = (); } -type SingleBlockMigrations = (pallet_ajuna_awesome_avatars::migration::v6::MigrateToV6,); +type SingleBlockMigrations = (pallet_collator_selection::migration::v2::MigrationToV2,); #[cfg(not(feature = "runtime-benchmarks"))] use mbm::MultiBlockMigrations; #[cfg(not(feature = "runtime-benchmarks"))] mod mbm { - use crate::Runtime; - use pallet_ajuna_awesome_avatars::migration::v6::mbm::{ - LazyMigrationAvatarV5ToV6, LazyMigrationPlayerSeasonConfigsV5ToV6, - LazyMigrationSeasonStatsV5ToV6, LazyTradeStatsMapCleanup, - }; - - use crate::weights::pallet_ajuna_awesome_avatars_mbm::WeightInfo as AaaMbmWeight; - - pub type MultiBlockMigrations = ( - LazyMigrationPlayerSeasonConfigsV5ToV6>, - LazyMigrationSeasonStatsV5ToV6>, - LazyMigrationAvatarV5ToV6>, - LazyTradeStatsMapCleanup>, - ); + pub type MultiBlockMigrations = (); } parameter_types! { diff --git a/runtime/bajun/src/weights/mod.rs b/runtime/bajun/src/weights/mod.rs index a00b678..0399748 100644 --- a/runtime/bajun/src/weights/mod.rs +++ b/runtime/bajun/src/weights/mod.rs @@ -26,7 +26,6 @@ pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod frame_system; pub mod orml_vesting; -pub mod pallet_ajuna_awesome_avatars_mbm; pub mod pallet_balances; pub mod pallet_collator_selection; pub mod pallet_collective; diff --git a/runtime/bajun/src/weights/pallet_ajuna_awesome_avatars_mbm.rs b/runtime/bajun/src/weights/pallet_ajuna_awesome_avatars_mbm.rs deleted file mode 100644 index 3dbf31a..0000000 --- a/runtime/bajun/src/weights/pallet_ajuna_awesome_avatars_mbm.rs +++ /dev/null @@ -1,102 +0,0 @@ -// Ajuna Node -// Copyright (C) 2022 BlogaTech AG - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. - -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -//! Autogenerated weights for `pallet_ajuna_awesome_avatars_mbm` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 36.0.0 -//! DATE: 2024-04-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `DESKTOP-0F6V7QQ`, CPU: `Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bajun-rococo-local")`, DB CACHE: 1024 - -// Executed Command: -// ./target/release/bajun-node -// benchmark -// pallet -// --chain=bajun-rococo-local -// --steps=50 -// --repeat=20 -// --pallet=pallet_ajuna_awesome_avatars_mbm -// --extrinsic=* -// --wasm-execution=compiled -// --heap-pages=4096 -// --header=./HEADER-AGPL -// --output=./runtime/bajun/src/weights/pallet_ajuna_awesome_avatars_mbm.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_ajuna_awesome_avatars_mbm`. -pub struct WeightInfo(PhantomData); -impl pallet_ajuna_awesome_avatars::migration::v6::WeightInfo for WeightInfo { - /// Storage: `AwesomeAvatars::PlayerSeasonConfigs` (r:2 w:1) - /// Proof: `AwesomeAvatars::PlayerSeasonConfigs` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`) - /// Storage: `AwesomeAvatars::TradeStatsMap` (r:0 w:1) - /// Proof: `AwesomeAvatars::TradeStatsMap` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`) - fn player_season_configs_step() -> Weight { - // Proof Size summary in bytes: - // Measured: `156` - // Estimated: `6048` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(57_200_000, 0) - .saturating_add(Weight::from_parts(0, 6048)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `AwesomeAvatars::SeasonStats` (r:2 w:1) - /// Proof: `AwesomeAvatars::SeasonStats` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`) - /// Storage: `AwesomeAvatars::TradeStatsMap` (r:1 w:1) - /// Proof: `AwesomeAvatars::TradeStatsMap` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`) - fn season_stats_step() -> Weight { - // Proof Size summary in bytes: - // Measured: `199` - // Estimated: `6048` - // Minimum execution time: 40_200_000 picoseconds. - Weight::from_parts(46_000_000, 0) - .saturating_add(Weight::from_parts(0, 6048)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `AwesomeAvatars::Avatars` (r:2 w:1) - /// Proof: `AwesomeAvatars::Avatars` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`) - fn avatar_step() -> Weight { - // Proof Size summary in bytes: - // Measured: `168` - // Estimated: `6294` - // Minimum execution time: 31_400_000 picoseconds. - Weight::from_parts(32_900_000, 0) - .saturating_add(Weight::from_parts(0, 6294)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `AwesomeAvatars::TradeStatsMap` (r:2 w:1) - /// Proof: `AwesomeAvatars::TradeStatsMap` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`) - fn trade_stats_map_cleanup_step() -> Weight { - // Proof Size summary in bytes: - // Measured: `136` - // Estimated: `6024` - // Minimum execution time: 25_900_000 picoseconds. - Weight::from_parts(32_200_000, 0) - .saturating_add(Weight::from_parts(0, 6024)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } -}