HotkeySwapOnSubnetInterval

Constant Re-added v276 → v385, v391 → current Changed in v391 u64

Rate limits hotkey swapping per subnet .

Current Value

7200
Relevant for: validatorsminersdevelopers

The Big Picture

Hotkey swaps are rate-limited to prevent abuse. This constant sets the cooldown between swaps on any given subnet. It prevents rapid key cycling that could be used to game identity systems or confuse tracking. Legitimate stakers rotations are still possible, just not rapid-fire changes.

Why This Matters

Plan key rotations around this cooldown. If you swap today, you can't swap again until the interval passes. Emergency rotations are still possible on other subnets.

Example

With HotkeySwapOnSubnetInterval of 7200 blocks (~24 hours), after swapping your hotkey on subnet 1 at noon, you can't swap on subnet 1 again until noon tomorrow. Subnets 2 and 3 have independent cooldowns.

Common Questions

Does this affect coldkey swaps?
No, coldkey and hotkey swaps have separate limits. This is specifically for hotkey rotation on individual subnets.
What if I absolutely need to swap sooner?
You must wait. The rate limit is enforced on-chain. Plan rotations to not overlap with potential emergency needs.

From Chain Metadata

Block number for a coldkey swap the hotkey in specific subnet.

Use Cases

  • Hotkey swap
  • Rate limiting

Value History

VersionBlockChangeValue
v276#5,781,672Added36000
v391#7,782,857Changed36000 → 7200

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Query HotkeySwapOnSubnetInterval constant
const value = api.consts[stringCamelCase("SubtensorModule")][stringCamelCase("HotkeySwapOnSubnetInterval")];
console.log("HotkeySwapOnSubnetInterval:", value.toHuman());

// Convert RAO to TAO if this is a balance value
const taoValue = value.toBigInt() / BigInt(1e9);
console.log("TAO:", taoValue.toString());

Type Information

Type
u64
Byte Size
8 bytes
Encoding
fixed
Raw Hex
0x201c000000000000

Version History

v276 block 5,781,672 Added
v391 block 7,782,857 Re-added Current

Runtime Info

Pallet
SubtensorModule
First Version
v276
Latest Version
v276
Current Runtime
v393