SetChildren

Event v195 → v212, v216 → v219, v233 → v247, v252 → v265, v273 → v277, v290 → v315, v320 → v326, v334 → v367, v372 → v377, v385 → v402, v411 → current Changed in v411 #75

Emitted when child hotkeys are set for a parent hotkey .

View events on chain
Useful for: validatorssubnet ownersdevelopersanalytics

The Big Picture

Child keys let a parent hotkey share its rewards with other hotkeys. This enables validator organizations where multiple people run infrastructure but earnings are automatically split. It's like having partners in your validator business - the chain handles the profit sharing automatically.

Why This Matters

Running a validator is resource-intensive. Child keys let you share rewards with infrastructure partners, referrers, or team members automatically. The parent sets proportions, and the chain distributes rewards accordingly. No manual splitting needed.

Example Scenario

You run a validator with a partner who provides servers. You set your partner's hotkey as a child at 30%. SetChildren fires with your hotkey as parent, their hotkey as child, and 30% proportion. Now when you earn 10 TAO, 3 TAO automatically goes to your partner.

Common Questions

Can children have their own children?
Yes, child keys can also set their own children, creating hierarchies. This enables complex organizational structures.
How do children get their rewards?
Automatically at emission time. No claiming needed. The proportion is applied before rewards are distributed, so children receive their share directly.
Can I remove a child key?
Yes, set new children without that key (or empty list). Changes go through a schedule delay to protect delegators from sudden changes.

Use Cases

  • Set up validator organizations with reward sharing
  • Create referral or affiliate structures
  • Build validator pools with multiple operators
  • Track parent-child relationships across the network

How to Use This Event

  • Monitor when validators add or change children
  • Track reward distribution structures
  • Build validator organization analysis tools

From Chain Metadata

The children of a hotkey have been set

Part of: Child Hotkeys

Triggers

Emitted by

Preconditions

  • Caller owns the parent hotkey
  • Child hotkeys are valid accounts
  • Proportions sum to valid total

Effects

Postconditions

  • ChildKeys storage updated for parent
  • ParentKeys storage updated for children
  • Stake distribution includes children

Side Effects

  • Children receive portion of parent's rewards
  • Parent's direct rewards reduced proportionally

Event Data

#NameTypeDescription
0
arg0
→ account
AccountId Account address (32 bytes, SS58-encoded) (hex -> SS58)
1
arg1
→ netuid
u16 NetUidSubnet ID (u16, 0-65535)
2
arg2
Vec<(u64, AccountId)> Vec Vec<(u64, T::AccountId)>Event field #2 (Vec<(u64, AccountId)>)

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 SetChildren events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.SubtensorModule.SetChildren.get(block.hash);
  for (const evt of events) {
    console.log("SetChildren:", evt.payload);
  }
});

On-Chain Activity

Emission Frequency
●●●○○○ Active 100K–1M emissions

Regular feature-level activity

#38 most emitted event

As of block 7,429,232

Version History

v195 block 3,791,350 3 args
v216 block 4,510,996 3 args
v233 block 4,920,350 3 args
v252 block 5,163,656 3 args
v273 block 5,659,032 3 args
v290 block 5,947,548 3 args
v320 block 6,523,566 3 args
v334 block 6,811,690 3 args
v372 block 7,430,358 3 args
v385 block 7,782,670 3 args
v411 block 8,283,784 3 args Current

Runtime Info

View Source
Pallet Index
7
Event Index
75
First Version
v195
Current Version
v411