From 4ff16b1bbf3e1edd18716cdff3ec022929a5a3f3 Mon Sep 17 00:00:00 2001 From: GlobalStar117 Date: Thu, 15 Jan 2026 22:45:16 +1100 Subject: [PATCH] fix: show max_uids in subnet hyperparameters --- bittensor_cli/src/__init__.py | 6 ++++++ bittensor_cli/src/bittensor/chain_data.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/bittensor_cli/src/__init__.py b/bittensor_cli/src/__init__.py index e4de4da53..5e5247580 100644 --- a/bittensor_cli/src/__init__.py +++ b/bittensor_cli/src/__init__.py @@ -811,6 +811,12 @@ class RootSudoOnly(Enum): "owner_settable": False, "docs_link": "docs.learnbittensor.org/subnets/subnet-hyperparameters#maxallowedvalidators", }, + "max_uids": { + "description": "Maximum number of UIDs allowed in the subnet.", + "side_effects": "Lower values cap subnet size; higher values allow more neurons to register.", + "owner_settable": False, + "docs_link": "docs.learnbittensor.org/subnets/subnet-hyperparameters#maxalloweduids", + }, "adjustment_alpha": { "description": "Alpha parameter for difficulty adjustment algorithm.", "side_effects": "Higher values make difficulty adjustments more aggressive; lower values provide smoother transitions.", diff --git a/bittensor_cli/src/bittensor/chain_data.py b/bittensor_cli/src/bittensor/chain_data.py index cfcc699f5..06e155898 100644 --- a/bittensor_cli/src/bittensor/chain_data.py +++ b/bittensor_cli/src/bittensor/chain_data.py @@ -172,6 +172,7 @@ class SubnetHyperparameters(InfoBase): max_regs_per_block (int): Maximum number of registrations per block. serving_rate_limit (int): Limit on the rate of service. max_validators (int): Maximum number of validators. + max_uids (int): Maximum number of UIDs allowed on the subnet. adjustment_alpha (int): Alpha value for adjustments. difficulty (int): Difficulty level. commit_reveal_period (int): Interval for commit-reveal weights. @@ -207,6 +208,7 @@ class SubnetHyperparameters(InfoBase): max_regs_per_block: int serving_rate_limit: int max_validators: int + max_uids: int adjustment_alpha: int difficulty: int commit_reveal_period: int @@ -246,6 +248,7 @@ def _fix_decoded( max_difficulty=decoded["max_difficulty"], max_regs_per_block=decoded["max_regs_per_block"], max_validators=decoded["max_validators"], + max_uids=decoded.get("max_uids", decoded.get("max_allowed_uids")), max_weight_limit=decoded["max_weights_limit"], min_allowed_weights=decoded["min_allowed_weights"], min_burn=decoded["min_burn"],