ColdkeySwapAnnouncementDelay
Storage Plain v385 → currentBlocks a coldkey swap announcement must wait before it can be executed.
Explore chainThe Big Picture
This is the length of the window in which an unauthorised rotation can be noticed and disputed. It is the parameter the whole commit-reveal design rests on.
Why This Matters
For a pending announcement the authoritative figure is the executable block already stored, not this value. Use this only to predict a rotation that has not been announced yet.
Example Scenario
A wallet quotes a waiting period from this storage item for a rotation the user is about to start, then switches to the stored executable block once the announcement lands.
Use Cases
- Show an accurate waiting period in a wallet
- Model the security window on key rotation
From Chain Metadata
The delay after an announcement before a coldkey swap can be performed.
Purpose & Usage
Purpose
The live waiting period applied when an announcement is made. Added to the current block to produce the executable block stored in ColdkeySwapAnnouncements.
Common Query Patterns
- Estimate how long a new rotation will take
- Explain the gap between ColdkeySwapAnnounced and ColdkeySwapped
Notes
- First appears at runtime v385.
- Governance-set and changed via ColdkeySwapAnnouncementDelaySet. Read it rather than assuming the genesis default in InitialColdkeySwapAnnouncementDelay.
- Applied at announcement time only. Changing it does not move announcements already made.
Stored Value
value (u32)
Default Value
Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.
Code Examples
import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443
const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);
// Query ColdkeySwapAnnouncementDelay storage (no keys - plain value)
const result = await api.query.SubtensorModule.ColdkeySwapAnnouncementDelay.getValue();
console.log("ColdkeySwapAnnouncementDelay:", result);Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Plain
- First Version
- v385
- Current Version
- v472