Transactions

set-reject-staking-hotkey-growth

Refuse new staking hotkeys introduced by other accounts.

View as Markdown

Off by default. Incoming transfers can still use hotkeys already listed or owned by the receiver. A subnet hotkey swap renames an existing entry when possible; otherwise the receiver's stake stays on the old hotkey. The flag follows a coldkey swap and does not move funds. The coldkey's own staking actions remain subject to the overall 256-entry cap.

SignerOriginPalletWraps
coldkeysigned account (pallet role may apply)SubtensorModuleSubtensorModule.set_reject_staking_hotkey_growth

Parameters

ParameterTypeRequiredDescription
enabledbooleanyesTrue to refuse third-party staking-list growth; false to allow it up to the third-party cap.

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-reject-staking-hotkey-growth \
  --enabled/--no-enabled --dry-run
btcli tx set-reject-staking-hotkey-growth \
  --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.SetRejectStakingHotkeyGrowth(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_reject_staking_hotkey_growth", {...}, wallet)

On-chain implementation

SubtensorModule.set_reject_staking_hotkey_growth — pallets/subtensor/src/macros/dispatches.rs#L2795:

#[pallet::call_index(153)]
#[pallet::weight((<T as Config>::WeightInfo::set_reject_staking_hotkey_growth(), DispatchClass::Normal, Pays::Yes))]
pub fn set_reject_staking_hotkey_growth(
    origin: OriginFor<T>,
    enabled: bool,
) -> DispatchResult {
    let coldkey = ensure_signed(origin)?;
    AccountFlags::<T>::mutate_exists(&coldkey, |stored| {
        let flags = stored.unwrap_or_default();
        let flags = if enabled {
            flags | crate::ACCOUNT_FLAGS_REJECT_STAKING_HOTKEY_GROWTH
        } else {
            flags & !crate::ACCOUNT_FLAGS_REJECT_STAKING_HOTKEY_GROWTH
        };
        *stored = if flags == 0 { None } else { Some(flags) };
    });
    Self::deposit_event(Event::RejectStakingHotkeyGrowthUpdated { coldkey, enabled });
    Ok(())
}

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