Queried by: validatorsdelegatorsanalyticsdevelopers
The Big Picture
The reverse of ChildKeys. A child hotkey can have multiple parents delegating stake proportions. ParentKeys lets you see who's backing a child and with what proportions.
Why This Matters
Who is delegating stake to this child? ParentKeys shows all parents and their proportions. Essential for understanding a child's total backing.
Example Scenario
Query ParentKeys(netuid=1, child_hotkey=Y) returns [(5000, parent_A), (10000, parent_B)]. Parent A gives 50% of their stake to Y; Parent B gives 100% to Y.
Common Questions
- Can a child have multiple parents?
- Yes, multiple validators can designate the same hotkey as a child. Each contributes their proportion independently.
- How do I calculate total effective stake?
- Sum (parent_stake × proportion) for all parents. This is the child's total delegated stake.
Use Cases
- Check which validators are backing a child hotkey
- Calculate total effective stake from all parents
- Build reverse delegation graphs
- Verify child key configurations
- Research stake flow patterns
From Chain Metadata
DMAP ( child, netuid ) --> Vec<(proportion,parent)>
Purpose & Usage
Purpose
Reverse lookup for child-parent relationships - find who's delegating stake to this child.
Common Query Patterns
- Query parents for a child on a subnet
- Verify parent-child relationships
- Calculate total stake from all parents
Notes
- Returns Vec<(proportion, parent)>
Query Keys
Stored Value
Value in RAO (÷10⁹ for TAO)
Relationships
Modified By
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 });
// Query ParentKeys storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const key2 = 0;
const result = await api.query
[stringCamelCase("SubtensorModule")]
[stringCamelCase("ParentKeys")](
key1,
key2
);
console.log("ParentKeys:", result.toHuman());On-Chain Activity
Write Frequency
●●●○○○ Low 10K–100K est. writes
10K–100K estimated writes
#46 most written storage item
Write Source User Extrinsics
Modified via user-submitted extrinsics
As of block 7,429,232
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v195
- Current Version
- v393