DuplicateChild
Error Re-added v195 → v202, v205 → v212, v216 → v216, v217 → v219, v233 → v315, v320 → v326, v334 → v377, v385 → current 7.60The same child hotkey appears multiple times in the list.
Why This Error Exists
Each child key can only appear once in a parent's child list. This prevents ambiguous weight allocations - if the same child appeared twice with different percentages, the system wouldn't know which to use. The chain enforces uniqueness to maintain clear, deterministic stake/weight distribution.
Deep Dive
The children array in set_children contains (child_hotkey, proportion) tuples. The chain deduplicates by hotkey - if the same hotkey appears twice, you get this error regardless of whether the proportions match. The total of all proportions should equal 100% (or u16::MAX in basis points).
Debugging Example
You call set_children(netuid=1, hotkey=5Parent..., children=[(5Child1..., 25%), (5Child2..., 25%), (5Child1..., 50%)]). Error: DuplicateChild. 5Child1... appears twice (positions 0 and 2). Solution: Remove the duplicate. Use [(5Child1..., 75%), (5Child2..., 25%)] to give Child1 combined 75%.
Prevention Tips
- Deduplicate your children array before calling set_children
- Use a Set or dictionary to build the children list, keyed by hotkey
- If you need to change a child's proportion, update the single entry instead of adding another
From Chain Metadata
Duplicate child when setting children.
What This Means
The same child hotkey appears multiple times in the list.
Common Causes
- Accidentally included same child twice
- Copy-paste error in child array
How to Fix
- Remove duplicate entries from children array
- Each child should appear only once
Storage to Check
Thrown By
Version History
Runtime Info
- Pallet Index
- 7
- Error Index
- 60
- Error Code
- 7.60
- Runtime Version
- v393