set_pending_childkey_cooldown
Call v277 → current #109Sets the cooldown period for pending child key changes.
View calls on chainCall Workflow
Click items to navigate. Pan and zoom to explore.
The Big Picture
Childkey changes (setting/removing children) have cooldowns to prevent rapid manipulation. This admin call adjusts that cooldown network-wide. Shorter cooldowns allow faster reallocation but enable gaming. Longer cooldowns provide stability but reduce flexibility. It's a governance parameter balancing these concerns.
Why This Matters
The cooldown determines how quickly stake delegation can shift between children. Too short, and parents can game emission cycles. Too long, and legitimate reallocation is painfully slow. This parameter tunes that tradeoff.
Example Scenario
Current cooldown is 1000 blocks (~3 hours). Network governance decides this allows too much gaming. Admin calls set_pending_childkey_cooldown(cooldown=7200). Now childkey changes take ~24 hours to take effect, reducing manipulation opportunities.
Common Questions
- Who can call this?
- Only sudo/admin - typically the Triumvirate or through governance proposals. Regular users cannot change network parameters.
- Does this affect existing pending changes?
- Implementation-dependent. Usually applies to new requests. Check the specific runtime behavior for details.
Use Cases
- Network governance adjusting childkey change timing
- Balancing flexibility with manipulation prevention
- Emergency parameter adjustment during exploits
From Chain Metadata
Sets the pending childkey cooldown (in blocks). Root only.
Input Parameters
| # | Name | Type | Description |
|---|---|---|---|
| 0 | cooldown | u64 | cooldown (u64) |
Permissions
Permission data inferred from metadata. May be incomplete.
Requirements
- Caller has sudo/admin privileges
- Valid cooldown duration specified
Effects
Storage Modified
Postconditions
- Cooldown period updated
- Affects all future childkey change requests
Side Effects
- Affects timing of child key changes network-wide
- Longer cooldown = more stability, less flexibility
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 });
// Build set_pending_childkey_cooldown call
const cooldown = 0;
const call = api.tx[stringCamelCase("SubtensorModule")][stringCamelCase("set_pending_childkey_cooldown")](
cooldown
);Runtime Info
View Source- Pallet Index
- 7
- Call Index
- 109
- First Version
- v277
- Current Version
- v393