From 32301364e1352f38955419e1565937a83eebfa33 Mon Sep 17 00:00:00 2001 From: unconst Date: Fri, 7 Feb 2025 16:36:34 -0500 Subject: [PATCH 1/3] moving price init from emission --- pallets/subtensor/src/migrations/migrate_rao.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pallets/subtensor/src/migrations/migrate_rao.rs b/pallets/subtensor/src/migrations/migrate_rao.rs index d6183c2d1d..0e0e725945 100644 --- a/pallets/subtensor/src/migrations/migrate_rao.rs +++ b/pallets/subtensor/src/migrations/migrate_rao.rs @@ -3,6 +3,7 @@ use alloc::string::String; use frame_support::IterableStorageMap; use frame_support::{traits::Get, weights::Weight}; use sp_runtime::format; +use substrate_fixed::types::I96F32; use substrate_fixed::types::U64F64; use super::*; @@ -88,6 +89,7 @@ pub fn migrate_rao() -> Weight { let remaining_lock = lock.saturating_sub(pool_initial_tao); // Refund the owner for the remaining lock. + SubnetMovingPrice::::insert(netuid, I96F32::from_num( EmissionValues::::get(netuid) ) ); Pallet::::add_balance_to_coldkey_account(&owner, remaining_lock); SubnetLocked::::insert(netuid, 0); // Clear lock amount. SubnetTAO::::insert(netuid, pool_initial_tao); From b0bdb1621017e340ab5d49aac4c92edc90b792f7 Mon Sep 17 00:00:00 2001 From: unconst Date: Fri, 7 Feb 2025 16:42:02 -0500 Subject: [PATCH 2/3] cargo fmt --- pallets/subtensor/src/migrations/migrate_rao.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/subtensor/src/migrations/migrate_rao.rs b/pallets/subtensor/src/migrations/migrate_rao.rs index 0e0e725945..e09d408f93 100644 --- a/pallets/subtensor/src/migrations/migrate_rao.rs +++ b/pallets/subtensor/src/migrations/migrate_rao.rs @@ -89,7 +89,7 @@ pub fn migrate_rao() -> Weight { let remaining_lock = lock.saturating_sub(pool_initial_tao); // Refund the owner for the remaining lock. - SubnetMovingPrice::::insert(netuid, I96F32::from_num( EmissionValues::::get(netuid) ) ); + SubnetMovingPrice::::insert(netuid, I96F32::from_num(EmissionValues::::get(netuid))); Pallet::::add_balance_to_coldkey_account(&owner, remaining_lock); SubnetLocked::::insert(netuid, 0); // Clear lock amount. SubnetTAO::::insert(netuid, pool_initial_tao); From 5c27d88e593033b7d9ae190eeca83433bcac2095 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Fri, 7 Feb 2025 16:42:15 -0500 Subject: [PATCH 3/3] bump spec version --- runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 03ade34d32..40e5c54f02 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -229,7 +229,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: 231, + spec_version: 232, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1,