Hotfix/propagate hotkey swap conviction#2736
Conversation
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE BASELINE scrutiny: author has write permission, substantial subtensor history, no trusted Gittensor allowlist match; branch hotfix/propagate-hotkey-swap-conviction -> devnet-ready. The PR does not modify FindingsNo findings. Prior-comment reconciliation
ConclusionNo malicious pattern or security vulnerability was found in the current diff. The prior migration weight-accounting concern remains addressed. 🔍 AI Review — Auditor (domain review)VERDICT: 👍 Gittensor UNKNOWN by trusted allowlists; author has write permission and substantial prior subtensor history, so calibrated as an established contributor. Description discrepancies
The migration now runs after
FindingsNo findings. ConclusionThe lock repair migration preserves the forward and reverse lock indexes across the affected hotkey-swap repair paths, with focused regression coverage. No blocking domain issues found. |
|
🔄 AI review updated — Skeptic: VULNERABLE |
|
🔄 AI review updated — Skeptic: VULNERABLE |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
Description
Propagates the hotkey-swap conviction lock hotfix from #2731 onto
devnet-readyafter the reverse lock index work landed.The migration in
pallets/subtensor/src/migrations/migrate_fix_subnet_hotkey_lock_swaps.rsnow usesLockingColdkeyswhen repairing subnet-scoped hotkey swap lock state. It removes old reverse-index entries when taking source locks and inserts the new reverse-index entry when a lock is moved to the destination hotkey, keepingLockandLockingColdkeysconsistent after the migration.The migration test in
pallets/subtensor/src/tests/migration.rswas extended to seed and assertLockingColdkeysstate for moved locks, discarded conflict locks, and chained hotkey-swap fixes. The runtimespec_versionis bumped from417to418for the runtime migration.Behavioral impact: affected stale subnet hotkey-swap lock records are repaired without falling back to a full
Lockscan, and the reverse index remains usable for subsequent lock operations. Existing destination lock conflicts continue to preserve the destination lock and discard the old source lock as before.Testing: targeted migration coverage was updated to validate the new reverse-index behavior.