This event was removed in v385
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) #77Emitted when the coldkey swap schedule duration is changed.
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. Read the current ColdkeySwapAnnouncementDelay storage value.
- Can the duration be zero for instant swaps?
- The runtime enforces no non-zero floor on the delay itself; the value is whatever governance sets ColdkeySwapAnnouncementDelay to. Setting it to zero would remove the dispute window, which is the point of the delay.
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
Emitted by
Preconditions
- Caller has admin/sudo privileges
Effects
Postconditions
- Duration for new swap schedules updated
Side Effects
- Does not affect already scheduled swaps
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | arg0 → block_number | u32 BlockNumberFor<T> | Block number |
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);
// Subscribe to ColdkeySwapScheduleDurationSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.SubtensorModule.ColdkeySwapScheduleDurationSet.get(block.hash);
for (const evt of events) {
console.log("ColdkeySwapScheduleDurationSet:", evt.payload);
}
});Version History
Runtime Info
View Source- Pallet Index
- 7
- Event Index
- 77
- First Version
- v195
- Removed In
- v385