feat: Add hyperparams: sudo_set_sn_owner_hotkey, sudo_set_subnet_owner_hotkey, sudo_set_recycle_or_burn#827
Open
MkDev11 wants to merge 12 commits intoopentensor:mainfrom
Open
feat: Add hyperparams: sudo_set_sn_owner_hotkey, sudo_set_subnet_owner_hotkey, sudo_set_recycle_or_burn#827MkDev11 wants to merge 12 commits intoopentensor:mainfrom
MkDev11 wants to merge 12 commits intoopentensor:mainfrom
Conversation
…y, sudo_set_recycle_or_burn to HYPERPARAMS - Register three hyperparams that could not be set via arbitrary path (AdminUtils search_metadata only supports bool/u16/u64; hotkey params use AccountId). - Alias sudo_set_subnet_owner_hotkey -> same extrinsic as sudo_set_sn_owner_hotkey. - All three root-only (RootSudoOnly.TRUE), with HYPERPARAMS_METADATA. - Add unit tests for presence and alias. Closes opentensor#826
Contributor
Author
|
@thewhaleking could you please review the PR and let me know your feedback? thanks. |
bittensor_cli/cli.py imports Annotated from typing_extensions directly. On Python 3.13+, transitive deps (typer, etc.) no longer pull it in, causing ImportError in CI.
Contributor
Author
|
The E2E tests are failing due to a CI infrastructure issue: the |
thewhaleking
requested changes
Feb 20, 2026
…t_owner_hotkey, recycle_or_burn), drop typing_extensions, move hyperparam tests to test_cli.py
… adding dependency)
thewhaleking
requested changes
Feb 21, 2026
thewhaleking
requested changes
Feb 21, 2026
Address reviewer feedback: sn_owner_hotkey, subnet_owner_hotkey, and recycle_or_burn are root sudo only operations, so RootSudoOnly must be TRUE. Add unit tests verifying the new hyperparameters and their metadata.
Per reviewer feedback: sn_owner_hotkey, subnet_owner_hotkey, and recycle_or_burn are owner-settable hyperparameters, not root sudo only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds three hyperparameters as first-class CLI params so they can be set via
btcli sudo set --param <name> --value <value>. They were previously unreachable because the arbitrary path only supports bool/u16/u64 and a single pallet.Closes #826
Type of change
What's changed
sudo_set_sn_owner_hotkeysudo_set_subnet_owner_hotkeysudo_set_recycle_or_burnbittensor_cli/src/__init__.py: Added all three toHYPERPARAMS(alias maps to same extrinsic) andHYPERPARAMS_METADATA(descriptions, side_effects, owner_settable=False, docs_link).tests/unit_tests/test_hyperparams.py: New tests for presence in HYPERPARAMS, alias→same extrinsic, metadata, and owner_settable False.No changes to
sudo.py; existing first-class path already handles single extra arg (SS58 or bool).Testing
Unit tests (hyperparams)
Full unit test suite
Lint
Checklist