SetChildren

Event Re-added v195 → v212, v216 → v219, v233 → v247, v252 → v265, v273 → v277, v290 → v315, v320 → v326, v334 → v367, v372 → v377, v385 → current #74

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
AccountId Event field #0 (AccountId) (hex -> SS58)
1
arg1
u16 Event field #1 (u16)
2
arg2
Vec<(u64, AccountId)> VecEvent field #2 (Vec<(u64, AccountId)>)

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 });

// Subscribe to SetChildren events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SubtensorModule") &&
      event.method === "SetChildren"
    )
    .forEach(({ event }) => {
      console.log("SetChildren:", event.data.toHuman());
    });
});

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 Current

Runtime Info

View Source
Pallet Index
7
Event Index
74
First Version
v195
Current Version
v393