Enforce ensure_subtoken_enabled validation for remove_stake#2823
Enforce ensure_subtoken_enabled validation for remove_stake#2823evgeny-s wants to merge 2 commits into
Conversation
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE BASELINE scrutiny: established 2012 account with write permission, substantial prior subtensor PR history, no Gittensor allowlist hit, and matching PR author/commit authors; branch bug/subtoken-disabled-should-forbid-remove-stake -> devnet-ready. Static security review only. The diff is limited to staking remove-path validation and focused tests; it does not modify FindingsNo findings. ConclusionNo malicious pattern or security vulnerability found. The change moves disabled-subtoken enforcement into the shared 🔍 AI Review — Auditor (domain review)VERDICT: 👍 LIKELY gittensor-associated by recent subtensor PR history; author has write permission and substantial prior OSS activity. The Auditor proposed a replacement PR description, but the current body is non-trivial; not overwriting. Maintainers: ask the Auditor to regenerate if you want it. The implementation is scoped to moving disabled-subtoken enforcement into the shared remove-stake validation path, with regression coverage for No auto-fixes were made. I attempted FindingsNo findings. Prior-comment reconciliation
ConclusionApproving: the change is minimal, aligns the remove-stake variants behind the shared validation path, and adds focused regression coverage for the disabled-subtoken behavior. CI should still confirm the targeted Rust test and any devnet spec-version requirement. |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
9948169 to
81e001f
Compare
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
81e001f to
42c3986
Compare
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
Description
Removed the explicit check for ensure_subtoken_enabled and put it in validate_remove_stake to make it consistent with all the remove stake calls.
Related Issue(s)
Type of Change
Breaking Change
If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.
Checklist
./scripts/fix_rust.shto ensure my code is formatted and linted correctlyScreenshots (if applicable)
Please include any relevant screenshots or GIFs that demonstrate the changes made.
Additional Notes
Please provide any additional information or context that may be helpful for reviewers.