set_children
Call v195 â current #67Sets child hotkeys for stake distribution.
View calls on chainCall Workflow
Click items to navigate. Pan and zoom to explore.
The Big Picture
Child keys extend your stake's influence without transferring ownership. As a parent, you allocate portions of your stake to children, who gain that stake's voting power. Children earn based on their performance, paying you a take. It's like franchising your stake to multiple operators.
Why This Matters
Large stakeholders may want exposure to multiple validators without managing each position. By setting children, you delegate your stake's power while maintaining ownership. Children compete to perform well since their earnings depend on it.
Example Scenario
You have 10,000 TAO staked and want to diversify across 3 mining teams. Call set_children(children=[(miner1, 0.4), (miner2, 0.35), (miner3, 0.25)]). Each miner gets proportional stake power. They mine with your backing, you receive parent share of their emissions.
Common Questions
- Do children need to accept being my child?
- No - you unilaterally designate children. However, children set their own childkey_take which determines how much they keep vs send to you.
- Can I change children later?
- Yes, but there's a cooldown period. You can update proportions or swap children, but not instantly. This prevents rapid manipulation.
Use Cases
- Distribute stake power to multiple mining operations
- Create validator pools that share rewards
- Set up hierarchical mining organizations
- Allow investors to back multiple operators
From Chain Metadata
Set a single child for a given hotkey on a specified network. This function allows a coldkey to set a single child for a given hotkey on a specified network. The proportion of the hotkey's stake to be allocated to the child is also specified.
Input Parameters
| # | Name | Type | Description |
|---|---|---|---|
| 0 | hotkey | AccountId | Hot wallet address (active operations) (hex -> SS58) |
| 1 | netuid | u16 | Subnet/network identifier (0-65535) |
| 2 | children | Vec<(u64, AccountId)> Vec | children (Vec<(u64, AccountId)>) |
Permissions
Permission data inferred from metadata. May be incomplete.
Requirements
- Caller owns parent hotkey
- Child hotkeys are valid
- Proportions are valid
Effects
Events Emitted
Storage Modified
Postconditions
- ChildKeys updated
- ParentKeys updated for children
Side Effects
- Children receive portion of parent's rewards
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_children call
const hotkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const netuid = 1;
const children = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const call = api.tx[stringCamelCase("SubtensorModule")][stringCamelCase("set_children")](
hotkey,
netuid,
children
);On-Chain Activity
Occasional use
#38 most used call
80â95% of submissions succeed
As of block 7,429,232
Runtime Info
View Source- Pallet Index
- 7
- Call Index
- 67
- First Version
- v195
- Current Version
- v393