diff --git a/pallets/subtensor/src/macros/hooks.rs b/pallets/subtensor/src/macros/hooks.rs
index a0e2fc6e7..102507337 100644
--- a/pallets/subtensor/src/macros/hooks.rs
+++ b/pallets/subtensor/src/macros/hooks.rs
@@ -102,9 +102,7 @@ mod hooks {
// Remove all entries in TotalHotkeyColdkeyStakesThisInterval
.saturating_add(migrations::migrate_remove_total_hotkey_coldkey_stakes_this_interval::migrate_remove_total_hotkey_coldkey_stakes_this_interval::())
// Wipe the deprecated RateLimit storage item in the commitments pallet
- .saturating_add(migrations::migrate_remove_commitments_rate_limit::migrate_remove_commitments_rate_limit::());
-
- weight
+ .saturating_add(migrations::migrate_remove_commitments_rate_limit::migrate_remove_commitments_rate_limit::())
// Remove all entries in orphaned storage items
.saturating_add(
migrations::migrate_orphaned_storage_items::migrate_orphaned_storage_items::(
@@ -116,6 +114,20 @@ mod hooks {
.saturating_add(migrations::migrate_reset_max_burn::migrate_reset_max_burn::())
// Migrate ColdkeySwapScheduled structure to new format
.saturating_add(migrations::migrate_coldkey_swap_scheduled::migrate_coldkey_swap_scheduled::());
+
+ // fix storage version for subtensor pallet
+ use frame_support::traits::{GetStorageVersion, StorageVersion};
+ let current_version = as GetStorageVersion>::on_chain_storage_version();
+ let v7 = StorageVersion::new(7);
+ if current_version == StorageVersion::new(6) {
+ v7.put::>();
+ } else if current_version < v7 {
+ panic!(
+ "Storage version mismatch: expected at least {:?}, found {:?}",
+ v7, current_version
+ );
+ }
+
weight
}
diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs
index 64937fd3b..219b1673e 100644
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -209,7 +209,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
- spec_version: 271,
+ spec_version: 272,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,