Hotfix/propagate hotkey swap conviction#2736
Conversation
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE BASELINE scrutiny: author has write permission, substantial prior subtensor history, no trusted Gittensor allowlist match, and 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. The prior Auditor concern is addressed: the changed The migration changes are consistent with the reverse I attempted the two targeted tests touched by the PR, but this sandbox cannot write rustup temp files under FindingsNo findings. Prior-comment reconciliation
ConclusionThe migration and test updates look aligned with the intended hotfix, and the previously reported behavior/test mismatch has been corrected. No blocking domain issues found. 📜 Previous run (superseded)
|
|
🔄 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: 👍 |
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.