mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
Remove Executed Migrations (#7495)
* Polkadot is at .42 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Kusama is on .43 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Westend is at .43 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Rococo is at .42 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make UMP limits migration more idempotentish Already 100% idempotent per design, but not it wont try to schedule an unneeded upgrade. Note that the case that the new upgrade is already scheduled is not checked. In that case it will still upgrade the same thing again, but should be no problem. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Clippy Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Delete old migration code Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove old tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Polkadot is at .43 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove a ton of shit Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove more Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove unused code Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Rococo is NOT yet at .43, but remove anyway Rococo is the only runtime that is not yet at .43, but keeping the migration code just for it is not worth it since devops can just apply it at any time. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove old test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
a1eadbff3b
commit
3bbb336ea7
@@ -1275,55 +1275,13 @@ impl Get<Perbill> for NominationPoolsMigrationV4OldPallet {
|
||||
///
|
||||
/// This contains the combined migrations of the last 10 releases. It allows to skip runtime
|
||||
/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT.
|
||||
pub type Migrations = (
|
||||
migrations::V0940,
|
||||
migrations::V0941,
|
||||
migrations::V0942,
|
||||
migrations::V0943,
|
||||
migrations::Unreleased,
|
||||
);
|
||||
pub type Migrations = migrations::Unreleased;
|
||||
|
||||
/// The runtime migrations per release.
|
||||
#[allow(deprecated, missing_docs)]
|
||||
pub mod migrations {
|
||||
use frame_support::traits::{GetStorageVersion, OnRuntimeUpgrade, StorageVersion};
|
||||
|
||||
use super::*;
|
||||
|
||||
pub type V0940 = (
|
||||
clean_state_migration::CleanMigrate,
|
||||
pallet_nomination_pools::migration::v4::MigrateToV4<
|
||||
Runtime,
|
||||
NominationPoolsMigrationV4OldPallet,
|
||||
>,
|
||||
pallet_nomination_pools::migration::v5::MigrateToV5<Runtime>,
|
||||
);
|
||||
pub type V0941 = (); // Node only release - no migrations.
|
||||
pub type V0942 = (
|
||||
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
|
||||
pallet_offences::migration::v1::MigrateToV1<Runtime>,
|
||||
);
|
||||
pub type V0943 = (
|
||||
SetStorageVersions,
|
||||
// Remove UMP dispatch queue <https://github.com/paritytech/polkadot/pull/6271>
|
||||
parachains_configuration::migration::v6::MigrateToV6<Runtime>,
|
||||
ump_migrations::UpdateUmpLimits,
|
||||
);
|
||||
|
||||
/// Migrations that set `StorageVersion`s we missed to set.
|
||||
pub struct SetStorageVersions;
|
||||
|
||||
impl OnRuntimeUpgrade for SetStorageVersions {
|
||||
fn on_runtime_upgrade() -> Weight {
|
||||
if FastUnstake::on_chain_storage_version() < 1 {
|
||||
StorageVersion::new(1).put::<FastUnstake>();
|
||||
return RocksDbWeight::get().reads_writes(1, 1)
|
||||
}
|
||||
|
||||
RocksDbWeight::get().reads(1)
|
||||
}
|
||||
}
|
||||
|
||||
/// Unreleased migrations. Add new ones here:
|
||||
pub type Unreleased = (
|
||||
pallet_im_online::migration::v1::Migration<Runtime>,
|
||||
@@ -1331,24 +1289,6 @@ pub mod migrations {
|
||||
);
|
||||
}
|
||||
|
||||
/// Helpers to configure all migrations.
|
||||
pub mod ump_migrations {
|
||||
use runtime_parachains::configuration::migration_ump;
|
||||
|
||||
pub const MAX_UPWARD_QUEUE_SIZE: u32 = 8 * 1024 * 1024;
|
||||
pub const MAX_UPWARD_QUEUE_COUNT: u32 = 1398101;
|
||||
pub const MAX_UPWARD_MESSAGE_SIZE: u32 = (1 << 17) - 5; // Checked in test `max_upward_message_size`.
|
||||
pub const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32 = 512;
|
||||
|
||||
pub type UpdateUmpLimits = migration_ump::latest::ScheduleConfigUpdate<
|
||||
super::Runtime,
|
||||
MAX_UPWARD_QUEUE_SIZE,
|
||||
MAX_UPWARD_QUEUE_COUNT,
|
||||
MAX_UPWARD_MESSAGE_SIZE,
|
||||
MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE,
|
||||
>;
|
||||
}
|
||||
|
||||
/// Unchecked extrinsic type as expected by this runtime.
|
||||
pub type UncheckedExtrinsic =
|
||||
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||
@@ -2039,19 +1979,6 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn max_upward_message_size() {
|
||||
assert_eq!(
|
||||
ump_migrations::MAX_UPWARD_MESSAGE_SIZE,
|
||||
pallet_message_queue::MaxMessageLenOf::<Runtime>::get()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(test, feature = "try-runtime"))]
|
||||
mod remote_tests {
|
||||
use super::*;
|
||||
|
||||
@@ -50,14 +50,6 @@ fn call_size() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn max_upward_message_size() {
|
||||
assert_eq!(
|
||||
ump_migrations::MAX_UPWARD_MESSAGE_SIZE,
|
||||
pallet_message_queue::MaxMessageLenOf::<Runtime>::get()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sanity_check_teleport_assets_weight() {
|
||||
// This test sanity checks that at least 50 teleports can exist in a block.
|
||||
|
||||
Reference in New Issue
Block a user