@@ -626,47 +626,62 @@ class WalletValidationTypes(Enum):
626626}
627627
628628
629+ class RootSudoOnly (Enum ):
630+ FALSE = 0
631+ TRUE = 1
632+ COMPLICATED = 2
633+
634+
629635HYPERPARAMS = {
630- # btcli name: (subtensor method, root-only bool)
631- "rho" : ("sudo_set_rho" , False ),
632- "kappa" : ("sudo_set_kappa" , False ),
633- "immunity_period" : ("sudo_set_immunity_period" , False ),
634- "min_allowed_weights" : ("sudo_set_min_allowed_weights" , False ),
635- "max_weights_limit" : ("sudo_set_max_weight_limit" , False ),
636- "tempo" : ("sudo_set_tempo" , True ),
637- "min_difficulty" : ("sudo_set_min_difficulty" , True ),
638- "max_difficulty" : ("sudo_set_max_difficulty" , False ),
639- "weights_version" : ("sudo_set_weights_version_key" , False ),
640- "weights_rate_limit" : ("sudo_set_weights_set_rate_limit" , True ),
641- "adjustment_interval" : ("sudo_set_adjustment_interval" , True ),
642- "activity_cutoff" : ("sudo_set_activity_cutoff" , False ),
643- "target_regs_per_interval" : ("sudo_set_target_registrations_per_interval" , True ),
644- "min_burn" : ("sudo_set_min_burn" , False ),
645- "max_burn" : ("sudo_set_max_burn" , True ),
646- "bonds_moving_avg" : ("sudo_set_bonds_moving_average" , False ),
647- "max_regs_per_block" : ("sudo_set_max_registrations_per_block" , True ),
648- "serving_rate_limit" : ("sudo_set_serving_rate_limit" , False ),
649- "max_validators" : ("sudo_set_max_allowed_validators" , True ),
650- "adjustment_alpha" : ("sudo_set_adjustment_alpha" , False ),
651- "difficulty" : ("sudo_set_difficulty" , True ),
636+ # btcli name: (subtensor method, root-only enum)
637+ "rho" : ("sudo_set_rho" , RootSudoOnly .FALSE ),
638+ "kappa" : ("sudo_set_kappa" , RootSudoOnly .FALSE ),
639+ "immunity_period" : ("sudo_set_immunity_period" , RootSudoOnly .FALSE ),
640+ "min_allowed_weights" : ("sudo_set_min_allowed_weights" , RootSudoOnly .FALSE ),
641+ "max_weights_limit" : ("sudo_set_max_weight_limit" , RootSudoOnly .FALSE ),
642+ "tempo" : ("sudo_set_tempo" , RootSudoOnly .TRUE ),
643+ "min_difficulty" : ("sudo_set_min_difficulty" , RootSudoOnly .TRUE ),
644+ "max_difficulty" : ("sudo_set_max_difficulty" , RootSudoOnly .FALSE ),
645+ "weights_version" : ("sudo_set_weights_version_key" , RootSudoOnly .FALSE ),
646+ "weights_rate_limit" : ("sudo_set_weights_set_rate_limit" , RootSudoOnly .TRUE ),
647+ "adjustment_interval" : ("sudo_set_adjustment_interval" , RootSudoOnly .TRUE ),
648+ "activity_cutoff" : ("sudo_set_activity_cutoff" , RootSudoOnly .FALSE ),
649+ "target_regs_per_interval" : (
650+ "sudo_set_target_registrations_per_interval" ,
651+ RootSudoOnly .TRUE ,
652+ ),
653+ "min_burn" : ("sudo_set_min_burn" , RootSudoOnly .FALSE ),
654+ "max_burn" : ("sudo_set_max_burn" , RootSudoOnly .TRUE ),
655+ "bonds_moving_avg" : ("sudo_set_bonds_moving_average" , RootSudoOnly .FALSE ),
656+ "max_regs_per_block" : ("sudo_set_max_registrations_per_block" , RootSudoOnly .TRUE ),
657+ "serving_rate_limit" : ("sudo_set_serving_rate_limit" , RootSudoOnly .FALSE ),
658+ "max_validators" : ("sudo_set_max_allowed_validators" , RootSudoOnly .TRUE ),
659+ "adjustment_alpha" : ("sudo_set_adjustment_alpha" , RootSudoOnly .FALSE ),
660+ "difficulty" : ("sudo_set_difficulty" , RootSudoOnly .TRUE ),
652661 "commit_reveal_period" : (
653662 "sudo_set_commit_reveal_weights_interval" ,
654- False ,
663+ RootSudoOnly .FALSE ,
664+ ),
665+ "commit_reveal_weights_enabled" : (
666+ "sudo_set_commit_reveal_weights_enabled" ,
667+ RootSudoOnly .FALSE ,
668+ ),
669+ "alpha_values" : ("sudo_set_alpha_values" , RootSudoOnly .FALSE ),
670+ "liquid_alpha_enabled" : ("sudo_set_liquid_alpha_enabled" , RootSudoOnly .FALSE ),
671+ "registration_allowed" : (
672+ "sudo_set_network_registration_allowed" ,
673+ RootSudoOnly .TRUE ,
655674 ),
656- "commit_reveal_weights_enabled" : ("sudo_set_commit_reveal_weights_enabled" , False ),
657- "alpha_values" : ("sudo_set_alpha_values" , False ),
658- "liquid_alpha_enabled" : ("sudo_set_liquid_alpha_enabled" , False ),
659- "registration_allowed" : ("sudo_set_network_registration_allowed" , True ),
660675 "network_pow_registration_allowed" : (
661676 "sudo_set_network_pow_registration_allowed" ,
662- False ,
677+ RootSudoOnly . FALSE ,
663678 ),
664- "yuma3_enabled" : ("sudo_set_yuma3_enabled" , False ),
665- "alpha_sigmoid_steepness" : ("sudo_set_alpha_sigmoid_steepness" , True ),
666- "user_liquidity_enabled" : ("toggle_user_liquidity" , True ),
667- "bonds_reset_enabled" : ("sudo_set_bonds_reset_enabled" , False ),
668- "transfers_enabled" : ("sudo_set_toggle_transfer" , False ),
669- "min_allowed_uids" : ("sudo_set_min_allowed_uids" , True ),
679+ "yuma3_enabled" : ("sudo_set_yuma3_enabled" , RootSudoOnly . FALSE ),
680+ "alpha_sigmoid_steepness" : ("sudo_set_alpha_sigmoid_steepness" , RootSudoOnly . TRUE ),
681+ "user_liquidity_enabled" : ("toggle_user_liquidity" , RootSudoOnly . COMPLICATED ),
682+ "bonds_reset_enabled" : ("sudo_set_bonds_reset_enabled" , RootSudoOnly . FALSE ),
683+ "transfers_enabled" : ("sudo_set_toggle_transfer" , RootSudoOnly . FALSE ),
684+ "min_allowed_uids" : ("sudo_set_min_allowed_uids" , RootSudoOnly . TRUE ),
670685}
671686
672687HYPERPARAMS_MODULE = {
0 commit comments