This storage item was removed in v377

This storage item is no longer available in the current runtime. Existed from v195 to v377. Shown here for historical reference.

ColdkeySwapScheduleDuration

Storage Removed Plain v195 → v377 (removed)

Duration before scheduled coldkey swaps execute.

Queried by: walletsstakersvalidatorsdevelopers

The Big Picture

This is the security parameter for coldkey swaps. A longer duration gives more time to detect unauthorized swaps but delays legitimate key rotations. The protocol balances security vs convenience.

Why This Matters

How long do you have to catch an unauthorized swap? This duration is your security window. Also tells you how long legitimate key rotations take.

Example Scenario

Query ColdkeySwapScheduleDuration() returns 100800 blocks (~1 week at 2s/block). Any coldkey swap takes 1 week to execute, giving you time to detect and dispute unauthorized attempts.

Common Questions

Can this be changed?
It's a protocol parameter. Changes would require governance approval as it affects everyone's security model.
Is this enough time?
Depends on how often you check your accounts. Set up monitoring to alert you to pending swaps.

Use Cases

  • Calculate when a scheduled swap will complete
  • Plan legitimate key rotation timelines
  • Build security alerts with appropriate timing
  • Understand the security window for disputing swaps
  • Design wallet security features around the delay

Purpose & Usage

Purpose

Arbitration period length for swap security - how long you have to dispute an unauthorized swap.

Common Query Patterns

  • Single value query
  • Calculate when a swap will execute
  • Plan key rotation timing

Stored Value

value (u32)

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 ColdkeySwapScheduleDuration storage (no keys - plain value)
const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("ColdkeySwapScheduleDuration")]();
console.log("ColdkeySwapScheduleDuration:", result.toHuman());

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Plain
First Version
v195
Removed In
v377