Transactions

move-lock

Move an existing lock from one hotkey to another on a subnet.

View as Markdown

Re-points the signing coldkey's entire stake lock on the subnet at the destination hotkey, carrying the locked mass with it. Accrued conviction is preserved only when the origin and destination hotkeys are owned by the same coldkey (e.g. rotating your own validator hotkeys); if the destination hotkey belongs to a different coldkey, conviction resets to zero and matures again from scratch. The destination hotkey must exist on chain (fails with HotKeyAccountNotExists). Fails if there is no existing lock on the subnet to move.

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

Parameters

ParameterTypeRequiredDescription
netuidintegeryesSubnet the lock lives on.
destination_hotkey_ss58stringyesHotkey the lock is moved to.

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 move-lock \
  --netuid <int> \
  --destination-hotkey <ss58|name> --dry-run
btcli tx move-lock \
  --netuid <int> \
  --destination-hotkey <ss58|name> -w my_coldkey

Python

import bittensor as bt
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.MoveLock(netuid=1, destination_hotkey_ss58="5F...")

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

On-chain implementation

SubtensorModule.move_lockpallets/subtensor/src/macros/dispatches.rs#L2282:

#[pallet::call_index(137)]
#[pallet::weight(<T as crate::pallet::Config>::WeightInfo::move_lock())]
pub fn move_lock(
    origin: OriginFor<T>,
    destination_hotkey: T::AccountId,
    netuid: NetUid,
) -> DispatchResult {
    let coldkey = ensure_signed(origin)?;
    Self::do_move_lock(&coldkey, &destination_hotkey, netuid)
}

Delegates to do_move_lock.

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