sudo_set_tx_childkey_take_rate_limit
Call v195 → current #69Sets rate limit for child key take changes (admin).
View calls on chainCall Workflow
Click items to navigate. Pan and zoom to explore.
The Big Picture
Without rate limits, children could change take every block, gaming emission cycles. This limit enforces a cooldown between changes, providing stability. Parents can plan knowing take won't suddenly spike. It's anti-manipulation infrastructure.
Why This Matters
Imagine a child setting 1% take to attract parents, then spiking to 90% right before emissions. Rate limiting prevents this bait-and-switch. Parents have time to react to take changes before they become harmful.
Example Scenario
Reports emerge of children changing take multiple times per day to game parents. Governance decides weekly changes are enough. Admin calls sudo_set_tx_childkey_take_rate_limit(limit=50400). Now children can only change take once per week (50400 blocks ≈ 7 days).
Common Questions
- What's a reasonable rate limit?
- Depends on desired stability. Daily (7200 blocks) allows adjustment while preventing rapid gaming. Weekly is more stable. Monthly is very conservative.
- Does this affect first-time take setting?
- Usually no - first set is allowed immediately. Rate limit applies to changes after initial configuration.
Use Cases
- Prevent rapid take manipulation by children
- Give parents predictability in childkey relationships
- Reduce gaming of emission cycles via take changes
- Balance flexibility with stability in childkey economics
From Chain Metadata
Sets the transaction rate limit for changing childkey take. This function can only be called by the root origin.
Input Parameters
| # | Name | Type | Description |
|---|---|---|---|
| 0 | tx_rate_limit | u64 | tx_rate_limit (u64) |
Permissions
Permission data inferred from metadata. May be incomplete.
Requirements
- Caller has sudo privileges
- Valid rate limit specified (blocks)
Effects
Events Emitted
Storage Modified
Postconditions
- Rate limit updated
- Affects all future take change requests
Side Effects
- Limits frequency of take changes
- Provides stability for parents planning around take rates
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 sudo_set_tx_childkey_take_rate_limit call
const tx_rate_limit = 0;
const call = api.tx[stringCamelCase("SubtensorModule")][stringCamelCase("sudo_set_tx_childkey_take_rate_limit")](
tx_rate_limit
);Runtime Info
View Source- Pallet Index
- 7
- Call Index
- 69
- First Version
- v195
- Current Version
- v393