Transactions

dispute-coldkey-swap

Freeze this coldkey entirely until root resolves the dispute.

View as Markdown

The recovery path for a compromised coldkey: if a swap was announced on your coldkey that you did not initiate, disputing freezes the account entirely — the chain rejects ALL signed extrinsics from it, including executing the swap, clearing the announcement, or disputing again — until root clears the state via reset_coldkey_swap. Sign it from the affected coldkey itself. It does not cancel the announcement or move anything — it locks the situation so an attacker cannot complete the takeover while governance investigates; only root can unfreeze. Use clear_coldkey_swap_announcement instead to withdraw an announcement you made yourself.

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

Parameters

This operation takes no parameters.

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 dispute-coldkey-swap --dry-run
btcli tx dispute-coldkey-swap -w my_coldkey

Python

import bittensor as bt
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.DisputeColdkeySwap()

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

On-chain implementation

SubtensorModule.dispute_coldkey_swappallets/subtensor/src/macros/dispatches.rs#L2056:

#[pallet::call_index(127)]
#[pallet::weight(<T as crate::pallet::Config>::WeightInfo::dispute_coldkey_swap())]
pub fn dispute_coldkey_swap(origin: OriginFor<T>) -> DispatchResult {
    let coldkey = ensure_signed(origin)?;

    ensure!(
        ColdkeySwapAnnouncements::<T>::contains_key(&coldkey),
        Error::<T>::ColdkeySwapAnnouncementNotFound
    );
    ensure!(
        !ColdkeySwapDisputes::<T>::contains_key(&coldkey),
        Error::<T>::ColdkeySwapAlreadyDisputed
    );

    let now = <frame_system::Pallet<T>>::block_number();
    ColdkeySwapDisputes::<T>::insert(&coldkey, now);

    Self::deposit_event(Event::ColdkeySwapDisputed { coldkey });
    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).