From 406767de1a6e343c3dad782a1fd5e582836030eb Mon Sep 17 00:00:00 2001 From: Maciej Kula Date: Wed, 2 Jul 2025 21:09:43 +0200 Subject: [PATCH 01/10] Create BIT-0010-Adjustable-Max-UIDs.md --- BIT-0010-Adjustable-Max-UIDs.md | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 BIT-0010-Adjustable-Max-UIDs.md diff --git a/BIT-0010-Adjustable-Max-UIDs.md b/BIT-0010-Adjustable-Max-UIDs.md new file mode 100644 index 0000000..265b26c --- /dev/null +++ b/BIT-0010-Adjustable-Max-UIDs.md @@ -0,0 +1,46 @@ +# BIT-0010: Adjustable Max UIDs + +- **BIT Number:** 0010 +- **Title:** Adjustable Max UIDs +- **Author(s):** Namoray, "Maciej Kula" +- **Discussions-to:** https://discord.com/channels/1120750674595024897/1389781506444230656 +- **Status:** Draft +- **Type:** Core +- **Created:** 02/07/2025 +- **Updated:** 02/07/2025 +- **Requires:** - +- **Replaces:** - + +## Abstract + +This BIT proposes allowing subnet owners to reduce the maximum number of UIDs on their subnet below the current fixed limit of 256. Subnet owners would be able to set their maximum UIDs down to a minimum threshold of 64, with changes taking effect immediately and excess UIDs being deregistered based on lowest emissions first. + +## Motivation + +Every subnet currently operates with a fixed maximum of 256 UIDs regardless of actual demand. No subnet also currently has close to that many unique entities mining, yet validators are still required to evaluate up to 256 miners every epoch. For some subnets, forming opinions on this many miners per epoch is not feasible. + +## Specification + +This proposal would make the existing `max_uids` hyperparameter modifiable by subnet owners, allowing them to reduce it from the current fixed value of 256 down to a minimum threshold between 32-64 UIDs, with 64 being the preferred lower bound. + +When a subnet owner reduces the `max_uids` value, the change would take effect immediately in the next epoch. Any UIDs beyond the new maximum would be automatically deregistered in order of rewards per epoch, with lowest-performing UIDs removed first. All UIDs would be eligible for deregistration based solely on emission performance, not just zero-emission UIDs. + +## Rationale + +- + +## Backwards Compatibility + +This change maintains full backwards compatibility. Existing subnets will continue operating with their current 256 UID maximum unless explicitly modified by subnet owners. + +## Reference Implementation (Optional) + +TBD - Reference implementation to be developed following community consensus on technical approach. + +## Security Considerations + +- + +## Copyright + +This document is licensed under [The Unlicense](https://unlicense.org/). From 84ba78c86b9c449d8fea1b6d59831d114b09a61c Mon Sep 17 00:00:00 2001 From: Maciej Kula Date: Wed, 2 Jul 2025 21:10:31 +0200 Subject: [PATCH 02/10] Update BIT-0010-Adjustable-Max-UIDs.md --- BIT-0010-Adjustable-Max-UIDs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BIT-0010-Adjustable-Max-UIDs.md b/BIT-0010-Adjustable-Max-UIDs.md index 265b26c..17495fc 100644 --- a/BIT-0010-Adjustable-Max-UIDs.md +++ b/BIT-0010-Adjustable-Max-UIDs.md @@ -27,7 +27,7 @@ When a subnet owner reduces the `max_uids` value, the change would take effect i ## Rationale -- +TBD ## Backwards Compatibility @@ -35,11 +35,11 @@ This change maintains full backwards compatibility. Existing subnets will contin ## Reference Implementation (Optional) -TBD - Reference implementation to be developed following community consensus on technical approach. +TBD (to be developed following community consensus on technical approach) ## Security Considerations -- +TBD ## Copyright From f2a7556a0370a18f21c8357764b50b3210d684e3 Mon Sep 17 00:00:00 2001 From: Maciej Kula Date: Wed, 2 Jul 2025 21:13:16 +0200 Subject: [PATCH 03/10] Update BIT-0010-Adjustable-Max-UIDs.md --- BIT-0010-Adjustable-Max-UIDs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BIT-0010-Adjustable-Max-UIDs.md b/BIT-0010-Adjustable-Max-UIDs.md index 17495fc..1097c11 100644 --- a/BIT-0010-Adjustable-Max-UIDs.md +++ b/BIT-0010-Adjustable-Max-UIDs.md @@ -23,7 +23,7 @@ Every subnet currently operates with a fixed maximum of 256 UIDs regardless of a This proposal would make the existing `max_uids` hyperparameter modifiable by subnet owners, allowing them to reduce it from the current fixed value of 256 down to a minimum threshold between 32-64 UIDs, with 64 being the preferred lower bound. -When a subnet owner reduces the `max_uids` value, the change would take effect immediately in the next epoch. Any UIDs beyond the new maximum would be automatically deregistered in order of rewards per epoch, with lowest-performing UIDs removed first. All UIDs would be eligible for deregistration based solely on emission performance, not just zero-emission UIDs. +When a subnet owner reduces the `max_uids` value, the change would take effect immediately in the next epoch. Any UIDs beyond the new maximum would be automatically deregistered in order of emissions, with lowest-performing UIDs removed first. All UIDs would be eligible for deregistration, not just zero-emission UIDs. ## Rationale From 0a1e33bb73a9511e1ceaf33543026add56d36af0 Mon Sep 17 00:00:00 2001 From: Maciej Kula Date: Wed, 2 Jul 2025 21:13:31 +0200 Subject: [PATCH 04/10] Update BIT-0010-Adjustable-Max-UIDs.md --- BIT-0010-Adjustable-Max-UIDs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BIT-0010-Adjustable-Max-UIDs.md b/BIT-0010-Adjustable-Max-UIDs.md index 1097c11..01d2c04 100644 --- a/BIT-0010-Adjustable-Max-UIDs.md +++ b/BIT-0010-Adjustable-Max-UIDs.md @@ -2,7 +2,7 @@ - **BIT Number:** 0010 - **Title:** Adjustable Max UIDs -- **Author(s):** Namoray, "Maciej Kula" +- **Author(s):** Namoray - **Discussions-to:** https://discord.com/channels/1120750674595024897/1389781506444230656 - **Status:** Draft - **Type:** Core From 5cee362ebb93fa5ea1febe12e9f0deda39ff5139 Mon Sep 17 00:00:00 2001 From: Maciej Kula Date: Wed, 2 Jul 2025 22:16:46 +0200 Subject: [PATCH 05/10] Delete BIT-0010-Adjustable-Max-UIDs.md --- BIT-0010-Adjustable-Max-UIDs.md | 46 --------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 BIT-0010-Adjustable-Max-UIDs.md diff --git a/BIT-0010-Adjustable-Max-UIDs.md b/BIT-0010-Adjustable-Max-UIDs.md deleted file mode 100644 index 01d2c04..0000000 --- a/BIT-0010-Adjustable-Max-UIDs.md +++ /dev/null @@ -1,46 +0,0 @@ -# BIT-0010: Adjustable Max UIDs - -- **BIT Number:** 0010 -- **Title:** Adjustable Max UIDs -- **Author(s):** Namoray -- **Discussions-to:** https://discord.com/channels/1120750674595024897/1389781506444230656 -- **Status:** Draft -- **Type:** Core -- **Created:** 02/07/2025 -- **Updated:** 02/07/2025 -- **Requires:** - -- **Replaces:** - - -## Abstract - -This BIT proposes allowing subnet owners to reduce the maximum number of UIDs on their subnet below the current fixed limit of 256. Subnet owners would be able to set their maximum UIDs down to a minimum threshold of 64, with changes taking effect immediately and excess UIDs being deregistered based on lowest emissions first. - -## Motivation - -Every subnet currently operates with a fixed maximum of 256 UIDs regardless of actual demand. No subnet also currently has close to that many unique entities mining, yet validators are still required to evaluate up to 256 miners every epoch. For some subnets, forming opinions on this many miners per epoch is not feasible. - -## Specification - -This proposal would make the existing `max_uids` hyperparameter modifiable by subnet owners, allowing them to reduce it from the current fixed value of 256 down to a minimum threshold between 32-64 UIDs, with 64 being the preferred lower bound. - -When a subnet owner reduces the `max_uids` value, the change would take effect immediately in the next epoch. Any UIDs beyond the new maximum would be automatically deregistered in order of emissions, with lowest-performing UIDs removed first. All UIDs would be eligible for deregistration, not just zero-emission UIDs. - -## Rationale - -TBD - -## Backwards Compatibility - -This change maintains full backwards compatibility. Existing subnets will continue operating with their current 256 UID maximum unless explicitly modified by subnet owners. - -## Reference Implementation (Optional) - -TBD (to be developed following community consensus on technical approach) - -## Security Considerations - -TBD - -## Copyright - -This document is licensed under [The Unlicense](https://unlicense.org/). From e52a939548e8cb5610359d1036d5fa381506b422 Mon Sep 17 00:00:00 2001 From: Maciej Kula Date: Wed, 2 Jul 2025 22:17:12 +0200 Subject: [PATCH 06/10] Create BIT-0010-Adjustable-Max-UIDs.md --- bits/BIT-0010-Adjustable-Max-UIDs.md | 46 ++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 bits/BIT-0010-Adjustable-Max-UIDs.md diff --git a/bits/BIT-0010-Adjustable-Max-UIDs.md b/bits/BIT-0010-Adjustable-Max-UIDs.md new file mode 100644 index 0000000..01d2c04 --- /dev/null +++ b/bits/BIT-0010-Adjustable-Max-UIDs.md @@ -0,0 +1,46 @@ +# BIT-0010: Adjustable Max UIDs + +- **BIT Number:** 0010 +- **Title:** Adjustable Max UIDs +- **Author(s):** Namoray +- **Discussions-to:** https://discord.com/channels/1120750674595024897/1389781506444230656 +- **Status:** Draft +- **Type:** Core +- **Created:** 02/07/2025 +- **Updated:** 02/07/2025 +- **Requires:** - +- **Replaces:** - + +## Abstract + +This BIT proposes allowing subnet owners to reduce the maximum number of UIDs on their subnet below the current fixed limit of 256. Subnet owners would be able to set their maximum UIDs down to a minimum threshold of 64, with changes taking effect immediately and excess UIDs being deregistered based on lowest emissions first. + +## Motivation + +Every subnet currently operates with a fixed maximum of 256 UIDs regardless of actual demand. No subnet also currently has close to that many unique entities mining, yet validators are still required to evaluate up to 256 miners every epoch. For some subnets, forming opinions on this many miners per epoch is not feasible. + +## Specification + +This proposal would make the existing `max_uids` hyperparameter modifiable by subnet owners, allowing them to reduce it from the current fixed value of 256 down to a minimum threshold between 32-64 UIDs, with 64 being the preferred lower bound. + +When a subnet owner reduces the `max_uids` value, the change would take effect immediately in the next epoch. Any UIDs beyond the new maximum would be automatically deregistered in order of emissions, with lowest-performing UIDs removed first. All UIDs would be eligible for deregistration, not just zero-emission UIDs. + +## Rationale + +TBD + +## Backwards Compatibility + +This change maintains full backwards compatibility. Existing subnets will continue operating with their current 256 UID maximum unless explicitly modified by subnet owners. + +## Reference Implementation (Optional) + +TBD (to be developed following community consensus on technical approach) + +## Security Considerations + +TBD + +## Copyright + +This document is licensed under [The Unlicense](https://unlicense.org/). From f09db21332e863e259cc538bb619cb5ec9e4d221 Mon Sep 17 00:00:00 2001 From: Maciej Kula Date: Fri, 18 Jul 2025 16:28:46 +0200 Subject: [PATCH 07/10] Update BIT-0010-Adjustable-Max-UIDs.md --- bits/BIT-0010-Adjustable-Max-UIDs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bits/BIT-0010-Adjustable-Max-UIDs.md b/bits/BIT-0010-Adjustable-Max-UIDs.md index 01d2c04..784c5fb 100644 --- a/bits/BIT-0010-Adjustable-Max-UIDs.md +++ b/bits/BIT-0010-Adjustable-Max-UIDs.md @@ -4,10 +4,10 @@ - **Title:** Adjustable Max UIDs - **Author(s):** Namoray - **Discussions-to:** https://discord.com/channels/1120750674595024897/1389781506444230656 -- **Status:** Draft +- **Status:** Withdrawn - **Type:** Core -- **Created:** 02/07/2025 -- **Updated:** 02/07/2025 +- **Created:** 2025-07-02 +- **Updated:** 2025-07-18 - **Requires:** - - **Replaces:** - From 6684be50f526adb7ecd34e4bec6aef125f00105d Mon Sep 17 00:00:00 2001 From: Maciej Kula Date: Mon, 13 Apr 2026 03:30:01 +0200 Subject: [PATCH 08/10] Update and rename BIT-0010-Adjustable-Max-UIDs.md to BIT-0004-Adjustable-Max-UIDs.md --- bits/BIT-0004-Adjustable-Max-UIDs.md | 54 ++++++++++++++++++++++++++++ bits/BIT-0010-Adjustable-Max-UIDs.md | 46 ------------------------ 2 files changed, 54 insertions(+), 46 deletions(-) create mode 100644 bits/BIT-0004-Adjustable-Max-UIDs.md delete mode 100644 bits/BIT-0010-Adjustable-Max-UIDs.md diff --git a/bits/BIT-0004-Adjustable-Max-UIDs.md b/bits/BIT-0004-Adjustable-Max-UIDs.md new file mode 100644 index 0000000..736ee87 --- /dev/null +++ b/bits/BIT-0004-Adjustable-Max-UIDs.md @@ -0,0 +1,54 @@ +# BIT-0004: Adjustable Max UIDs + +- **BIT Number:** 0004 +- **Title:** Adjustable Max UIDs +- **Author(s):** Namoray +- **Discussions-to:** https://discord.com/channels/1120750674595024897/1389781506444230656 +- **Status:** Final +- **Type:** Core +- **Created:** 2025-07-02 +- **Updated:** 2026-04-13 +- **Requires:** - +- **Replaces:** - + +## Abstract + +This BIT proposes allowing subnet owners to adjust the maximum number of UIDs on their subnet below the current fixed limit of 256. Subnet owners would be able to set their maximum UIDs down to a minimum threshold of 64, provided the new value does not fall below the subnet's current UID count. + +## Motivation + +This proposal makes the existing max_allowed_uids hyperparameter modifiable by subnet owners (and root), via the sudo_set_max_allowed_uids extrinsic in the admin-utils pallet. The value can be set within the following constraints: + +- The new value must be greater than or equal to the subnet's `min_allowed_uids` (default: 64). +- The new value must be greater than or equal to the subnet's current UID count (`subnetwork_n`). Reducing below the current count is not permitted. +- The new value must be less than or equal to the global `DefaultMaxAllowedUids` (256). +- The new value multiplied by the subnet's current mechanism count must not exceed `DefaultMaxAllowedUids`, to prevent chain bloat. +- The extrinsic is callable by the subnet owner or root. + +## Specification + +This proposal would make the existing `max_uids` hyperparameter modifiable by subnet owners, allowing them to reduce it from the current fixed value of 256 down to a minimum threshold between 32-64 UIDs, with 64 being the preferred lower bound. + +When a subnet owner reduces the `max_uids` value, the change would take effect immediately in the next epoch. Any UIDs beyond the new maximum would be automatically deregistered in order of emissions, with lowest-performing UIDs removed first. All UIDs would be eligible for deregistration, not just zero-emission UIDs. + +## Rationale + +The constraints ensure that adjusting the maximum UIDs cannot disrupt existing registered miners (no auto-deregistration), cannot exceed global bounds, and accounts for multi-mechanism subnets where the effective UID footprint is multiplied by the mechanism count. + +## Backwards Compatibility + +This change maintains full backwards compatibility. Existing subnets will continue operating with their current 256 UID maximum unless explicitly modified by subnet owners. + +## Reference Implementation (Optional) + +Implemented in `pallets/admin-utils/src/lib.rs` via `sudo_set_max_allowed_uids` (call_index 15), with supporting storage in `pallets/subtensor/src/lib.rs` (MaxAllowedUids storage map) and setter in `pallets/subtensor/src/utils/misc.rs`. + +## Security Considerations + +- The `max_allowed_uids` cannot be set below the current number of registered UIDs, preventing involuntary deregistration of miners. +- The mechanism count multiplier check prevents chain state bloat on multi-mechanism subnets. +- Access is restricted to subnet owners and root. + +## Copyright + +This document is licensed under [The Unlicense](https://unlicense.org/). diff --git a/bits/BIT-0010-Adjustable-Max-UIDs.md b/bits/BIT-0010-Adjustable-Max-UIDs.md deleted file mode 100644 index 784c5fb..0000000 --- a/bits/BIT-0010-Adjustable-Max-UIDs.md +++ /dev/null @@ -1,46 +0,0 @@ -# BIT-0010: Adjustable Max UIDs - -- **BIT Number:** 0010 -- **Title:** Adjustable Max UIDs -- **Author(s):** Namoray -- **Discussions-to:** https://discord.com/channels/1120750674595024897/1389781506444230656 -- **Status:** Withdrawn -- **Type:** Core -- **Created:** 2025-07-02 -- **Updated:** 2025-07-18 -- **Requires:** - -- **Replaces:** - - -## Abstract - -This BIT proposes allowing subnet owners to reduce the maximum number of UIDs on their subnet below the current fixed limit of 256. Subnet owners would be able to set their maximum UIDs down to a minimum threshold of 64, with changes taking effect immediately and excess UIDs being deregistered based on lowest emissions first. - -## Motivation - -Every subnet currently operates with a fixed maximum of 256 UIDs regardless of actual demand. No subnet also currently has close to that many unique entities mining, yet validators are still required to evaluate up to 256 miners every epoch. For some subnets, forming opinions on this many miners per epoch is not feasible. - -## Specification - -This proposal would make the existing `max_uids` hyperparameter modifiable by subnet owners, allowing them to reduce it from the current fixed value of 256 down to a minimum threshold between 32-64 UIDs, with 64 being the preferred lower bound. - -When a subnet owner reduces the `max_uids` value, the change would take effect immediately in the next epoch. Any UIDs beyond the new maximum would be automatically deregistered in order of emissions, with lowest-performing UIDs removed first. All UIDs would be eligible for deregistration, not just zero-emission UIDs. - -## Rationale - -TBD - -## Backwards Compatibility - -This change maintains full backwards compatibility. Existing subnets will continue operating with their current 256 UID maximum unless explicitly modified by subnet owners. - -## Reference Implementation (Optional) - -TBD (to be developed following community consensus on technical approach) - -## Security Considerations - -TBD - -## Copyright - -This document is licensed under [The Unlicense](https://unlicense.org/). From 9c8329989fde0819758669b42657355121727aa6 Mon Sep 17 00:00:00 2001 From: Maciej Kula Date: Mon, 13 Apr 2026 03:34:03 +0200 Subject: [PATCH 09/10] Revise specification for adjustable max UIDs This update modifies the specification section to clarify the constraints and implications of adjusting the maximum UIDs for subnets, including the immediate effect on UIDs and the rationale behind the changes. --- bits/BIT-0004-Adjustable-Max-UIDs.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bits/BIT-0004-Adjustable-Max-UIDs.md b/bits/BIT-0004-Adjustable-Max-UIDs.md index 736ee87..8d04426 100644 --- a/bits/BIT-0004-Adjustable-Max-UIDs.md +++ b/bits/BIT-0004-Adjustable-Max-UIDs.md @@ -17,6 +17,10 @@ This BIT proposes allowing subnet owners to adjust the maximum number of UIDs on ## Motivation +Every subnet currently operates with a fixed maximum of 256 UIDs regardless of actual demand. No subnet also currently has close to that many unique entities mining, yet validators are still required to evaluate up to 256 miners every epoch. For some subnets, forming opinions on this many miners per epoch is not feasible. + +## Specification + This proposal makes the existing max_allowed_uids hyperparameter modifiable by subnet owners (and root), via the sudo_set_max_allowed_uids extrinsic in the admin-utils pallet. The value can be set within the following constraints: - The new value must be greater than or equal to the subnet's `min_allowed_uids` (default: 64). @@ -25,12 +29,6 @@ This proposal makes the existing max_allowed_uids hyperparameter modifiable by s - The new value multiplied by the subnet's current mechanism count must not exceed `DefaultMaxAllowedUids`, to prevent chain bloat. - The extrinsic is callable by the subnet owner or root. -## Specification - -This proposal would make the existing `max_uids` hyperparameter modifiable by subnet owners, allowing them to reduce it from the current fixed value of 256 down to a minimum threshold between 32-64 UIDs, with 64 being the preferred lower bound. - -When a subnet owner reduces the `max_uids` value, the change would take effect immediately in the next epoch. Any UIDs beyond the new maximum would be automatically deregistered in order of emissions, with lowest-performing UIDs removed first. All UIDs would be eligible for deregistration, not just zero-emission UIDs. - ## Rationale The constraints ensure that adjusting the maximum UIDs cannot disrupt existing registered miners (no auto-deregistration), cannot exceed global bounds, and accounts for multi-mechanism subnets where the effective UID footprint is multiplied by the mechanism count. From 602d7215c36b25a7dfb7669dce85e3ca2c5bda91 Mon Sep 17 00:00:00 2001 From: Maciej Kula Date: Mon, 13 Apr 2026 04:14:57 +0200 Subject: [PATCH 10/10] Rename BIT-0004 to BIT-0005 for UID adjustments --- ...Adjustable-Max-UIDs.md => BIT-0005-Adjustable-Max-UIDs.md} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename bits/{BIT-0004-Adjustable-Max-UIDs.md => BIT-0005-Adjustable-Max-UIDs.md} (98%) diff --git a/bits/BIT-0004-Adjustable-Max-UIDs.md b/bits/BIT-0005-Adjustable-Max-UIDs.md similarity index 98% rename from bits/BIT-0004-Adjustable-Max-UIDs.md rename to bits/BIT-0005-Adjustable-Max-UIDs.md index 8d04426..01e6ac4 100644 --- a/bits/BIT-0004-Adjustable-Max-UIDs.md +++ b/bits/BIT-0005-Adjustable-Max-UIDs.md @@ -1,6 +1,6 @@ -# BIT-0004: Adjustable Max UIDs +# BIT-0005: Adjustable Max UIDs -- **BIT Number:** 0004 +- **BIT Number:** 0005 - **Title:** Adjustable Max UIDs - **Author(s):** Namoray - **Discussions-to:** https://discord.com/channels/1120750674595024897/1389781506444230656