Transactions
set-perpetual-lock
Enable or disable perpetual lock mode for a coldkey on a subnet.
Switches how the signing coldkey's stake lock on the subnet behaves over
time: perpetual mode keeps the lock (and its conviction) in force
indefinitely, while decaying mode lets it wind down over time so the
stake eventually becomes liquid again. A per-coldkey, per-subnet setting
that moves no funds by itself — it changes the behavior of locks created
with lock_stake. Enabling perpetual mode means the locked stake stays
illiquid until you switch back to decaying and the lock runs off.
| Signer | Pallet | Wraps |
|---|---|---|
coldkey | SubtensorModule | SubtensorModule.set_perpetual_lock |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
netuid | integer | yes | Subnet whose lock mode is changed. |
enabled | boolean | yes | True for perpetual mode (lock never decays), false for decaying mode. |
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-perpetual-lock \
--netuid <int> \
--enabled <true|false> --dry-run
btcli tx set-perpetual-lock \
--netuid <int> \
--enabled <true|false> -w my_coldkeyPython
import bittensor as sub
from bittensor.wallet import Wallet
wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = sub.SetPerpetualLock(netuid=1, enabled=True)
async with sub.Client("finney") as client:
plan = await client.plan(intent, wallet) # fee, effects, policy — no submission
result = await client.execute(intent, wallet)
if not result.success:
print(result.error.code, result.error.remediation)Or build it by op name, as an agent would:
await client.execute_tool("set_perpetual_lock", {...}, wallet)