From d48e2bfbda2222244f469cc5150bb458eb4f0b5d Mon Sep 17 00:00:00 2001 From: johnreedv Date: Mon, 4 Nov 2024 13:50:36 -0800 Subject: [PATCH 1/5] Add key swaps & set_children to proxies --- runtime/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 3d1cbb582..fcceb66b3 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -663,6 +663,10 @@ impl InstanceFilter for ProxyType { | RuntimeCall::SubtensorModule(pallet_subtensor::Call::remove_stake { .. }) | RuntimeCall::SubtensorModule(pallet_subtensor::Call::burned_register { .. }) | RuntimeCall::SubtensorModule(pallet_subtensor::Call::root_register { .. }) + | RuntimeCall::SubtensorModule( + pallet_subtensor::Call::schedule_swap_coldkey { .. } + ) + | RuntimeCall::SubtensorModule(pallet_subtensor::Call::swap_hotkey { .. }) ), ProxyType::Transfer => matches!( c, @@ -704,6 +708,7 @@ impl InstanceFilter for ProxyType { c, RuntimeCall::SubtensorModule(pallet_subtensor::Call::add_stake { .. }) | RuntimeCall::SubtensorModule(pallet_subtensor::Call::remove_stake { .. }) + | RuntimeCall::SubtensorModule(pallet_subtensor::Call::set_children { .. }) ), ProxyType::Registration => matches!( c, From aa5c4f030aaf5098dd9fc3ae34cfe5b7e4f82930 Mon Sep 17 00:00:00 2001 From: johnreedv Date: Mon, 4 Nov 2024 14:13:53 -0800 Subject: [PATCH 2/5] new ProxyType for childkeys --- runtime/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index fcceb66b3..33e2c3853 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -643,6 +643,7 @@ pub enum ProxyType { Transfer, SmallTransfer, RootWeights, + ChildKeys, } // Transfers below SMALL_TRANSFER_LIMIT are considered small transfers pub const SMALL_TRANSFER_LIMIT: Balance = 500_000_000; // 0.5 TAO @@ -708,7 +709,6 @@ impl InstanceFilter for ProxyType { c, RuntimeCall::SubtensorModule(pallet_subtensor::Call::add_stake { .. }) | RuntimeCall::SubtensorModule(pallet_subtensor::Call::remove_stake { .. }) - | RuntimeCall::SubtensorModule(pallet_subtensor::Call::set_children { .. }) ), ProxyType::Registration => matches!( c, @@ -719,6 +719,10 @@ impl InstanceFilter for ProxyType { c, RuntimeCall::SubtensorModule(pallet_subtensor::Call::set_root_weights { .. }) ), + ProxyType::ChildKeys => matches!( + c, + RuntimeCall::SubtensorModule(pallet_subtensor::Call::set_children { .. }) + ), } } fn is_superset(&self, o: &Self) -> bool { From 9ddbf101df4c6b38ccc215c8609017dc71c2e2a5 Mon Sep 17 00:00:00 2001 From: johnreedv Date: Tue, 5 Nov 2024 08:00:27 -0800 Subject: [PATCH 3/5] bump spec --- 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 33e2c3853..9bd636da4 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -160,7 +160,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: 206, + spec_version: 207, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, From 1a98baedaacba5647d872bae8b36eb66bda60a96 Mon Sep 17 00:00:00 2001 From: johnreedv Date: Tue, 5 Nov 2024 14:15:21 -0800 Subject: [PATCH 4/5] add set_childkey_take to ChildKeys ProxyType --- runtime/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 9bd636da4..9fe6c5854 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -722,6 +722,9 @@ impl InstanceFilter for ProxyType { ProxyType::ChildKeys => matches!( c, RuntimeCall::SubtensorModule(pallet_subtensor::Call::set_children { .. }) + | RuntimeCall::SubtensorModule( + pallet_subtensor::Call::set_childkey_take { .. } + ) ), } } From 4550edd1b34c5be5d05d7dc32cf0d6112a1148d0 Mon Sep 17 00:00:00 2001 From: johnreedv Date: Thu, 7 Nov 2024 21:03:17 -0800 Subject: [PATCH 5/5] fmt & bump spec --- runtime/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 6d2611a1d..2455da5d0 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -160,7 +160,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: 207, + spec_version: 208, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -645,7 +645,6 @@ pub enum ProxyType { RootWeights, ChildKeys, SudoUncheckedSetCode, - } // Transfers below SMALL_TRANSFER_LIMIT are considered small transfers pub const SMALL_TRANSFER_LIMIT: Balance = 500_000_000; // 0.5 TAO