Custom dust collection type in subtensor#2707
Conversation
| // The ubiquitous event type. | ||
| type RuntimeEvent = RuntimeEvent; | ||
| type DustRemoval = (); | ||
| type DustRemoval = pallet_subtensor::SubtensorDustRemoval<Runtime>; |
There was a problem hiding this comment.
[HIGH] Bump spec_version for this runtime behavior change
This changes runtime execution by installing a Balances DustRemoval hook that mutates Subtensor TotalIssuance, but the PR does not bump VERSION.spec_version in runtime/src/lib.rs (it remains 414). Runtime-affecting changes need a new spec_version; otherwise upgraded nodes can consider their native runtime compatible with the existing on-chain Wasm while executing different accounting logic, which is a consensus-safety hazard. Bump spec_version in the same PR.
🛡️ AI Review — Skeptic (security review)VERDICT: VULNERABLE LOW scrutiny: established repo writer, single self-authored commit, no Gittensor allowlist hit; branch feat/account-dust-collection -> devnet-ready. The diff is small and targeted, with no Findings
ConclusionThis appears to be a legitimate accounting fix, not a malicious PR. It is currently vulnerable because the runtime behavior change must ship with a # 🔍 AI Review — Auditor (domain review) has not yet run on this PR. |
|
🔄 AI review updated — Skeptic: VULNERABLE |
Description
This PR adds a subtensor pallet type implementation for dust collection that reflects dust collection in subtensor TotalIssuance. Also, it adds a migration that syncs total issuance of subtensor pallet to the source of truth in balances pallet.
Type of Change
Checklist
./scripts/fix_rust.shto ensure my code is formatted and linted correctly