InvalidChild
Error Re-added v195 → v202, v205 → v212, v216 → v216, v217 → v219, v233 → v315, v320 → v326, v334 → v377, v385 → current 7.59The child hotkey specified is not valid for this relationship.
Why This Error Exists
The child key system prevents circular references and self-referencing to maintain a clear authority hierarchy. A hotkey cannot be its own child, and chains like A->B->C->A are forbidden. This ensures weight-setting authority flows in one direction without loops.
Deep Dive
When you add a child key, the chain validates: 1) child != parent (no self-reference), 2) child doesn't already have parent as a descendant (no cycles), 3) child address is a valid hotkey format. ParentKeys storage lets you trace the authority chain upward from any hotkey.
Debugging Example
You call set_children(netuid=1, hotkey=5Parent..., children=[(5Parent..., 50%)]). Error: InvalidChild. You're trying to make a hotkey its own child. Solution: Use a different hotkey as the child. Generate a new hotkey if needed.
Prevention Tips
- Never use the same address for parent and child
- Before adding a child, query ParentKeys(child) to check its existing parent chain
- Draw out your authority hierarchy to visualize and avoid cycles
From Chain Metadata
Attempting to set an invalid child for a hotkey on a network.
What This Means
The child hotkey specified is not valid for this relationship.
Common Causes
- Child hotkey doesn't exist
- Child would create circular relationship
- Child is the same as parent
How to Fix
- Verify the child hotkey address is correct
- Ensure no circular parent-child relationships
- Use a different hotkey as child
Storage to Check
Thrown By
Version History
Runtime Info
- Pallet Index
- 7
- Error Index
- 59
- Error Code
- 7.59
- Runtime Version
- v393