Transactions

set-subnet-emission-enabled

Enable or disable a subnet's pool-side TAO emission (root only).

View as Markdown

Flips the SubnetEmissionEnabled storage flag for each listed subnet — the ROOT-ONLY switch that gates whether a subnet earns its share of TAO emission on the pool side. Distinct from the owner's one-shot start_call (subnet_is_active): a subnet can be active — epochs running, alpha trading — yet earn no TAO emission share until root flips this flag on. Disabling only zeros the pool-side alpha_in / tao_in / excess_tao chain-buy paths; it does not remove the subnet from emission share calculation and does not touch alpha_out, the owner cut, root proportion, or pending server/validator emission.

Requires the chain sudo key: Executor wraps the built call in Sudo.sudo because origin is root, and when root is a multisig that Sudo.sudo call is what the multisig must dispatch. Multiple netuids batch atomically via Utility.batch_all inside the single sudo call. Verify the effect afterwards with the subnet_emission_enabled read.

SignerOriginPalletWraps
coldkeyroot (chain sudo)AdminUtilsAdminUtils.sudo_set_subnet_emission_enabled, Sudo.sudo

Verify

After inclusion, confirm the effect with the subnet-emission-enabled read:

btcli query subnet-emission-enabled --netuid <integer> --json

Parameters

ParameterTypeRequiredDescription
netuidsarray of integeryesSubnets to toggle; multiple netuids batch atomically.
enabledbooleanyesTrue to let the subnets earn their pool-side TAO emission share, false to zero the pool-side alpha_in/tao_in/excess_tao chain-buy paths.

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-subnet-emission-enabled \
  --netuids <a,b,c> \
  --enabled/--no-enabled --dry-run
btcli tx set-subnet-emission-enabled \
  --netuids <a,b,c> \
  --enabled/--no-enabled -w my_coldkey

Python

import bittensor as bt
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.SetSubnetEmissionEnabled(netuids=[...], enabled=True)

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_subnet_emission_enabled", {...}, wallet)

On-chain implementation

AdminUtils.sudo_set_subnet_emission_enabledpallets/admin-utils/src/lib.rs#L2284:

#[pallet::call_index(94)]
#[pallet::weight(<T as pallet::Config>::WeightInfo::sudo_set_subnet_emission_enabled())]
pub fn sudo_set_subnet_emission_enabled(
    origin: OriginFor<T>,
    netuid: NetUid,
    enabled: bool,
) -> DispatchResult {
    ensure_root(origin)?;

    ensure!(
        pallet_subtensor::Pallet::<T>::if_subnet_exist(netuid),
        Error::<T>::SubnetDoesNotExist
    );
    ensure!(!netuid.is_root(), Error::<T>::NotPermittedOnRootSubnet);

    pallet_subtensor::SubnetEmissionEnabled::<T>::insert(netuid, enabled);
    Self::deposit_event(Event::SubnetEmissionEnabledSet { netuid, enabled });
    log::debug!("SubnetEmissionEnabledSet( netuid: {netuid:?}, enabled: {enabled:?} )");

    Ok(())
}

Sudo.sudo is implemented by Substrate's pallet_sudo, outside this repository's pallets.

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