Transactions

set-hyperparameter

Set an owner-settable subnet hyperparameter (btcli `sudo set`).

View as Markdown

Dispatches the matching AdminUtils sudo_set_* call for the named parameter (alpha_low/alpha_high read the current pair from chain and set both via sudo_set_alpha_values). The signer must be the subnet's owner coldkey; root-only parameters are not available here and must go through the raw-call escape hatch. Changes take effect on chain immediately and shape subnet economics and consensus (registration costs, weight rules, immunity, transfers), so verify the raw value before sending — value accepts either the raw on-chain integer or a human form that is converted for you. Some parameters are rate-limited by the chain, so a quick follow-up change can fail. Read current values back with the subnet_hyperparameters read.

SignerOriginPalletWraps
coldkeysubnet ownerAdminUtilsAdminUtils.sudo_set_tempo, AdminUtils.sudo_set_immunity_period, AdminUtils.sudo_set_min_allowed_weights, AdminUtils.sudo_set_weights_version_key, AdminUtils.sudo_set_activity_cutoff_factor, AdminUtils.sudo_set_min_burn, AdminUtils.sudo_set_max_burn, AdminUtils.sudo_set_bonds_moving_average, AdminUtils.sudo_set_bonds_penalty, AdminUtils.sudo_set_serving_rate_limit, AdminUtils.sudo_set_commit_reveal_weights_interval, AdminUtils.sudo_set_max_allowed_uids, AdminUtils.sudo_set_burn_increase_mult, AdminUtils.sudo_set_burn_half_life, AdminUtils.sudo_set_collateral_lock_share, AdminUtils.sudo_set_collateral_drain_ratio, AdminUtils.sudo_set_adjustment_alpha, AdminUtils.sudo_set_rho, AdminUtils.sudo_set_max_difficulty, AdminUtils.sudo_set_alpha_sigmoid_steepness, AdminUtils.sudo_set_min_childkey_take_per_subnet, AdminUtils.sudo_set_owner_immune_neuron_limit, AdminUtils.sudo_set_alpha_values, AdminUtils.sudo_set_commit_reveal_weights_enabled, AdminUtils.sudo_set_liquid_alpha_enabled, AdminUtils.sudo_set_network_pow_registration_allowed, AdminUtils.sudo_set_yuma3_enabled, AdminUtils.sudo_set_bonds_reset_enabled, AdminUtils.sudo_set_toggle_transfer, AdminUtils.sudo_set_owner_cut_enabled, AdminUtils.sudo_set_owner_cut_auto_lock_enabled

Parameters

ParameterTypeRequiredDescription
netuidintegeryesSubnet to configure; the signer must be its owner.
namestringyesHyperparameter to set. One of: activity_cutoff_factor, adjustment_alpha, alpha_high, alpha_low, alpha_sigmoid_steepness, bonds_moving_avg, bonds_penalty, bonds_reset_enabled, burn_half_life, burn_increase_mult, collateral_drain_ratio, collateral_lock_share, commit_reveal_period, commit_reveal_weights_enabled, immunity_period, liquid_alpha_enabled, max_allowed_uids, max_burn, max_difficulty, min_allowed_weights, min_burn, min_childkey_take, network_pow_registration_allowed, owner_cut_auto_lock_enabled, owner_cut_enabled, owner_immune_neuron_limit, rho, serving_rate_limit, tempo, transfers_enabled, weights_version, yuma3_enabled.
valueinteger | number | stringyesNew value. Give the raw on-chain integer (within the parameter's codec bounds), or the human form as a float or a string with a decimal point (a 0..1 fraction for normalized parameters, a non-negative TAO amount for rao parameters). Boolean parameters take true/false or 0/1 only.

Address parameters (--hotkey, --coldkey, --dest, ...) accept a raw ss58 address, an address-book or proxy-book name, or a local wallet/hotkey name.

CLI

Preview with --dry-run (shows fee, effects, and policy result without submitting), then submit:

btcli tx set-hyperparameter \
  --netuid <int> \
  --name <value> \
  --value <value> --dry-run
btcli tx set-hyperparameter \
  --netuid <int> \
  --name <value> \
  --value <value> -w my_coldkey

Python

import bittensor as bt
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.SetHyperparameter(netuid=1, name="...", value="...")

sub = bt.Subtensor()
plan = sub.plan(intent, wallet)   # fee, effects, policy — no submission
result = sub.execute(intent, wallet)
if not result.success:
    print(result.error.code, result.error.remediation)

(bt.Subtensor is also the async client — async with bt.Subtensor() as client: — see The client.) Or build the intent by op name, as an agent would:

result = sub.execute_tool("set_hyperparameter", {...}, wallet)

On-chain implementation

Chain callSource
AdminUtils.sudo_set_tempopallets/admin-utils/src/lib.rs#L1032
AdminUtils.sudo_set_immunity_periodpallets/admin-utils/src/lib.rs#L476
AdminUtils.sudo_set_min_allowed_weightspallets/admin-utils/src/lib.rs#L509
AdminUtils.sudo_set_weights_version_keypallets/admin-utils/src/lib.rs#L361
AdminUtils.sudo_set_activity_cutoff_factorpallets/admin-utils/src/lib.rs#L681
AdminUtils.sudo_set_min_burnpallets/admin-utils/src/lib.rs#L763
AdminUtils.sudo_set_max_burnpallets/admin-utils/src/lib.rs#L802
AdminUtils.sudo_set_bonds_moving_averagepallets/admin-utils/src/lib.rs#L894
AdminUtils.sudo_set_bonds_penaltypallets/admin-utils/src/lib.rs#L933
AdminUtils.sudo_set_serving_rate_limitpallets/admin-utils/src/lib.rs#L278
AdminUtils.sudo_set_commit_reveal_weights_intervalpallets/admin-utils/src/lib.rs#L1376
AdminUtils.sudo_set_max_allowed_uidspallets/admin-utils/src/lib.rs#L542
AdminUtils.sudo_set_burn_increase_multpallets/admin-utils/src/lib.rs#L2151
AdminUtils.sudo_set_burn_half_lifepallets/admin-utils/src/lib.rs#L2109
AdminUtils.sudo_set_collateral_lock_sharepallets/admin-utils/src/lib.rs#L2275
AdminUtils.sudo_set_collateral_drain_ratiopallets/admin-utils/src/lib.rs#L2318
AdminUtils.sudo_set_adjustment_alphapallets/admin-utils/src/lib.rs#L445
AdminUtils.sudo_set_rhopallets/admin-utils/src/lib.rs#L608
AdminUtils.sudo_set_max_difficultypallets/admin-utils/src/lib.rs#L328
AdminUtils.sudo_set_alpha_sigmoid_steepnesspallets/admin-utils/src/lib.rs#L1627
AdminUtils.sudo_set_min_childkey_take_per_subnetpallets/admin-utils/src/lib.rs#L1200
AdminUtils.sudo_set_owner_immune_neuron_limitpallets/admin-utils/src/lib.rs#L1813
AdminUtils.sudo_set_alpha_valuespallets/admin-utils/src/lib.rs#L1301
AdminUtils.sudo_set_commit_reveal_weights_enabledpallets/admin-utils/src/lib.rs#L1239
AdminUtils.sudo_set_liquid_alpha_enabledpallets/admin-utils/src/lib.rs#L1277
AdminUtils.sudo_set_network_pow_registration_allowedpallets/admin-utils/src/lib.rs#L723
AdminUtils.sudo_set_yuma3_enabledpallets/admin-utils/src/lib.rs#L1672
AdminUtils.sudo_set_bonds_reset_enabledpallets/admin-utils/src/lib.rs#L1706
AdminUtils.sudo_set_toggle_transferpallets/admin-utils/src/lib.rs#L1465
AdminUtils.sudo_set_owner_cut_enabledpallets/admin-utils/src/lib.rs#L2195
AdminUtils.sudo_set_owner_cut_auto_lock_enabledpallets/admin-utils/src/lib.rs#L2219

Every file is browsable under /code exactly as built into the runtime, or as plain text under /code/raw/<path> (index: /code/index.json).