Preserve hotkey successor mappings until netuid dissolution - #3128
Preserve hotkey successor mappings until netuid dissolution#3128UnArbosFour wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE VERY HIGH scrutiny (young account and one public repo), mitigated by repository write permission and substantive contributions; no Gittensor association found; fix/hotkey-successor → release-v451. Static review found only a helper rename/documentation refinement in runtime code plus revised lineage tests. Bounded traversal and netuid-dissolution cleanup remain intact. No dependency, CI, or AI-review trust-boundary files changed. FindingsNo findings. ConclusionNo malicious behavior or security vulnerability found in the current diff. 🔍 AI Review — Auditor (domain review)VERDICT: 👎 Gittensor association UNKNOWN; the author is a recent but established repository contributor with write permission. Description discrepancyThe PR claims to stop clearing successor mappings during neuron replacement/re-registration, but the production change only renames The overlapping PRs touch only individual shared files and address unrelated features. Quick checks: Findings
ConclusionThe proposed regression test does not exercise the stated swap-then-deregistration scenario and would pass before this PR. The PR should demonstrate the actual failing behavior and include the production change that fixes it, or correct its stated purpose. |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
| false, | ||
| )); | ||
| assert_eq!(SubtensorModule::hotkey_lineage_tip(netuid, &h0), h1); | ||
| SubtensorModule::record_hotkey_swap_lineage(netuid, &h0, &h1); |
There was a problem hiding this comment.
[MEDIUM] Test does not reproduce the claimed regression
This directly creates h0 → h1 while h0 remains registered, then replaces h0 with an unrelated key. That is not the stated swap-then-deregistration flow: after a real h0 → h1 swap, h1 is registered and h0 is not. Moreover, the pre-PR replace_neuron already cleared the successor of new_hotkey (replacement here), so this test passes without the PR. Exercise do_swap_hotkey followed by deregistration/replacement of the resulting live hotkey and first demonstrate that the test fails against the base branch.
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
Summary
Stops clearing
HotkeySuccessorwhen a neuron is replaced or re-registered, ensuring smart contracts can continue locating funds after a hotkey swap followed closely by neuron deregistration—even within the same batch.Netuid dissolution already clears
HotkeySuccessorandHotkeyRootby prefix, so this PR retains that existing cleanup and documents why lineage must survive individual neuron deregistration.Testing