Only Root Toggles Subnet Emissions#2694
Conversation
| &[Hyperparameter::SubnetEmissionEnabled.into()], | ||
| )?; | ||
| pallet_subtensor::Pallet::<T>::ensure_admin_window_open(netuid)?; | ||
| ensure_root(origin)?; |
There was a problem hiding this comment.
[MEDIUM] Root-only path bypasses the admin freeze window
Switching this call to root-only is fine, but the replacement also drops ensure_admin_window_open(netuid). That guard is still applied to other root subnet-admin calls and is documented in pallets/subtensor/src/utils/misc.rs as preventing admin operations during the terminal freeze window to avoid interference with validator weight submissions. SubnetEmissionEnabled feeds block emission redistribution, so root can now toggle this economic control inside the protected window.
| ensure_root(origin)?; | |
| ensure_root(origin)?; | |
| pallet_subtensor::Pallet::<T>::ensure_admin_window_open(netuid)?; |
🛡️ AI Review — Skeptic (security review)VERDICT: VULNERABLE LOW scrutiny: established opentensor contributor with write permission; branch root-only-disable-emissions -> devnet-ready. Static review only. The PR is a single runtime pallet change and does not touch Findings
ConclusionThe change appears legitimate, but it removes the admin freeze-window guard from an emission-control extrinsic. That allows root-origin emission toggles during the period the runtime explicitly uses to prevent admin interference with validator weight submissions. # 🔍 AI Review — Auditor (domain review) has not yet run on this PR. |
|
🔄 AI review updated — Skeptic: VULNERABLE |
Description
This PR modifies
sudo_set_subnet_emission_enabledso that only root can toggle it rather than root or owner.