Transactions

reset-axon

Reset (stop serving) this hotkey's axon endpoint on a subnet.

View as Markdown

Republishes the axon record as a placeholder (ip 0, port 1, protocol 4) so validators stop routing traffic to the old address; the storage entry is not removed. Signed by the hotkey. Use this when taking a miner offline or before moving it, then publish the new address with serve_axon when it is back up.

SignerOriginPalletWraps
hotkeysigned account (pallet role may apply)SubtensorModuleSubtensorModule.serve_axon

Parameters

ParameterTypeRequiredDescription
netuidintegeryesSubnet whose published axon endpoint to clear.

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 reset-axon \
  --netuid <int> --dry-run
btcli tx reset-axon \
  --netuid <int> -w my_coldkey

Python

import bittensor as bt
from bittensor.wallet import Wallet

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

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

On-chain implementation

SubtensorModule.serve_axonpallets/subtensor/src/macros/dispatches.rs#L642:

#[pallet::call_index(4)]
#[pallet::weight((<T as crate::pallet::Config>::WeightInfo::serve_axon(), DispatchClass::Normal, Pays::No))]
pub fn serve_axon(
    origin: OriginFor<T>,
    netuid: NetUid,
    version: u32,
    ip: u128,
    port: u16,
    ip_type: u8,
    protocol: u8,
    placeholder1: u8,
    placeholder2: u8,
) -> DispatchResult {
    Self::do_serve_axon(
        origin,
        netuid,
        version,
        ip,
        port,
        ip_type,
        protocol,
        placeholder1,
        placeholder2,
        None,
    )
}

Delegates to do_serve_axon.

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