This event was removed in v377

This event is no longer emitted in the current runtime. Existed from v195 to v377. Shown here for historical reference.

ColdkeySwapScheduleDurationSet

Event Removed v195 → v212, v216 → v247, v252 → v265, v273 → v277, v290 → v315, v320 → v326, v334 → v367, v372 → v377 (removed) #77

Emitted when the coldkey swap schedule duration is changed.

Useful for: stakersvalidatorswalletsexchangesanalytics

The Big Picture

The coldkey swap schedule duration is a security parameter - how long you must wait between scheduling a coldkey swap and it executing. This arbitration period lets you (or others) detect and dispute unauthorized swaps. Longer durations mean more security (more time to notice problems) but slower legitimate migrations. Shorter durations mean faster migrations but less protection.

Why This Matters

If you're planning a coldkey migration, this tells you how long you'll wait. If someone maliciously schedules a swap, this is how long you have to notice and dispute. Changes to this duration affect both security and convenience for all users.

Example Scenario

Security is upgraded: ColdkeySwapScheduleDurationSet fires with 7 days instead of 3 days. Now when you schedule a coldkey swap, you wait a full week before execution. This gives more time to catch unauthorized swaps but makes legitimate migrations slower.

Common Questions

Does this affect my already-scheduled swap?
No, swaps already scheduled use the duration that was in effect when scheduled. Only new schedules use the updated duration.
What's a typical duration?
Usually a few days - long enough to notice problems, short enough for reasonable migrations. Check the current ColdkeySwapScheduleDuration constant.
Can the duration be zero for instant swaps?
Unlikely. Zero duration would defeat the security purpose. There's probably a minimum enforced by the runtime to ensure meaningful arbitration time.

Use Cases

  • Track how long coldkey migrations take
  • Plan key rotation timelines
  • Monitor security policy changes
  • Build migration planning tools

How to Use This Event

  • Monitor for changes affecting migration timelines
  • Track security policy evolution
  • Build migration planning tools with accurate timelines

From Chain Metadata

The duration of schedule coldkey swap has been set

Triggers

Preconditions

  • Caller has admin/sudo privileges

Effects

Postconditions

  • Duration for new swap schedules updated

Side Effects

  • Does not affect already scheduled swaps

Event Data

#NameTypeDescription
0
arg0
u32 Event field #0 (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 });

// Subscribe to ColdkeySwapScheduleDurationSet events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SubtensorModule") &&
      event.method === "ColdkeySwapScheduleDurationSet"
    )
    .forEach(({ event }) => {
      console.log("ColdkeySwapScheduleDurationSet:", event.data.toHuman());
    });
});

Version History

v195 block 3,791,350 1 args
v216 block 4,510,996 1 args
v252 block 5,163,656 1 args
v273 block 5,659,032 1 args
v290 block 5,947,548 1 args
v320 block 6,523,566 1 args
v334 block 6,811,690 1 args
v372 block 7,430,358 1 args
v377 Removed

Runtime Info

View Source
Pallet Index
7
Event Index
77
First Version
v195
Removed In
v377