preserve dissolution stake settlement cursor#2894
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE VERY HIGH raw scrutiny (12-day-old account, 13 lifetime contributions, no public repos), mitigated by repository write permission and no known Gittensor association; branch correctly targets main. Static analysis confirms the cursor remains a FindingsNo findings. ConclusionThe patch fixes the weight-boundary payout skip without introducing a security vulnerability or suspicious behavior. 🔍 AI Review — Auditor (domain review)VERDICT: 👍 Gittensor association UNKNOWN; the account is new with sparse public history but has repository write access. No overlapping PR was identified. Static inspection confirms the cursor advances only after a hotkey is fully queued for payout. If weight is exhausted mid-hotkey, the previous completed cursor is retained, retrying the unpaid hotkey without repaying completed ones. The focused regression tests cover both cursor boundary cases, and the PR description matches the implementation. No spec-version or other auto-fix is required. FindingsNo findings. ConclusionThe change correctly fixes the exclusive |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
372e89c to
dfb3f3f
Compare
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: VULNERABLE |
ac12c47 to
dfb3f3f
Compare
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
unarbos
left a comment
There was a problem hiding this comment.
Cursor semantics fix is correct: only advance past fully paid hotkeys, and preserve the incoming cursor when no hotkey completes in a pass. Tests cover both regressions. Clone-upgrade failure was stale codegen drift fixed on main; branch updated.
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
Superseded by #2898 (v431 release): these changes were reviewed and integrated there. |
Motivation
Stake settlement during subnet dissolution is resumable across blocks. When the weight budget was exhausted after reading a hotkey but before queuing its payout, the settlement cursor advanced past that unpaid hotkey because
iter_fromresumes exclusively after the supplied key.Changes
TotalHotkeyAlphastorage key during stake settlement.Behavioral impact
An unpaid hotkey is retried during the next dissolution settlement pass, while already completed hotkeys remain excluded. This prevents stake payouts from being skipped at weight-budget boundaries.
Migration and runtime version
No storage migration is required. The PR targets
main, where the configured live-network spec-version checks do not require an automatic bump.Testing
Added targeted unit tests in
pallets/subtensor/src/tests/destroy_alpha_tests.rscovering both cursor boundary cases.