Conversation
- Add a per-subnet MinerBurned storage holding the proportion (0..1) of each tempo's miner (incentive) emission that was burned during emission distribution because the recipient hotkey is owned by the subnet owner. - Weight price-based emission shares by (1 - miner_burned) and renormalize, so subnets that burn more of their miner emission receive proportionally less chain emission (reallocated toward non-burning subnets). Co-authored-by: Cursor <cursoragent@cursor.com>
- Count miner emission withheld via an owner/immune hotkey toward the burned proportion whether it is recycled or burned, so the emission penalty is independent of a subnet's RecycleOrBurn config (no Recycle bypass, no unique penalty for the unset default). - Clear MinerBurned on subnet removal so a deregistered subnet leaves no stale proportion; extend dissolve cleanup test to cover it. - Add active tests for the price-share reweight by (1 - miner_burned): no-burn, partial burn, full burn, and all-full-burn fallback to price shares. Co-authored-by: Cursor <cursoragent@cursor.com>
🚨🚨🚨 HOTFIX DETECTED 🚨🚨🚨It looks like you are trying to merge a hotfix PR into If you are trying to merge a hotfix PR, please complete the following essential steps:
If you do not complete these steps, your hotfix may be inadvertently removed in the future when branches are promoted to |
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE BASELINE scrutiny: established 2017 account with repo write permission and substantial prior subtensor history; Static review found no changes to FindingsNo findings. ConclusionNo malicious intent or security vulnerability was found in the reviewed diff. The direct-to- 🔍 AI Review — Auditor (domain review)VERDICT: 👍 Gittensor: LIKELY; no allowlist hit for PR body is substantive and matches the implementation at static-review depth. No auto-fixes were needed; the worktree is clean. Duplicate-work check: PR #2780 overlaps materially with the hotfix scope, and this PR is the better candidate because it consolidates the price-emission, miner-burn scaling, and locked-alpha flag changes with targeted tests. Recommend closing #2780. PR #2746 overlaps the locked-transfer flag area but appears broader and is not a better substitute for this hotfix. FindingsNo findings. ConclusionThe runtime changes use saturating/checked arithmetic, preserve explicit origins and weights for the new dispatch, bump |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
Emission share is now proportional to root_proportion * price * (1 - miner_burned), renormalized. Multiplying by root_proportion (which shrinks as a subnet's alpha issuance grows) reallocates chain emission away from older subnets toward newer ones, easing entrance for new subnets. Falls back to unweighted price shares when the combined weight is zero (e.g. no root stake). Adds get_shares tests: no-burn, partial/full burn, all-full-burn fallback, and root_proportion favoring newer subnets. Co-authored-by: Cursor <cursoragent@cursor.com>
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👎 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
Summary
This branch moves subnet emission allocation to a price-based model, scales it by root proportion and a miner-burn penalty, and also carries the locked transfer flags changes.
Emission changes
Each subnet's share of the TAO block emission is proportional to:
normalized over emit-enabled subnets, where:
SubnetMovingPrice). Replaces the TAO-flow share method; base shares arep_i / Σ p_j.tao_weight / (tao_weight + alpha_issuance). It shrinks as a subnet's alpha issuance grows, so emission is reallocated away from older subnets toward newer ones (easier entrance for new subnets).MinerBurnedis a new per-subnet proportion (0..1) of each tempo's miner (incentive) emission that is withheld from miners because the recipient hotkey is owned by the subnet owner (immune key). It counts emission whether it is recycled or burned, so the value is independent of the subnet'sRecycleOrBurnconfig.get_sharesfalls back to unweighted price shares so the block's emission is not stranded.MinerBurnedis cleared on subnet removal (no stale proportion after deregistration).Alpha injection cap (root-proportion based)
In
get_subnet_termsthe alpha-injection cap isroot_proportion_i * alpha_emission_i(instead ofmin(alpha_emission, tao_block_emission)), so older subnets transition from liquidity injection toward chain buys (excess TAO).Locked transfer flags
Adds controls/dispatches/events for gating locked alpha transfers (see
staking/lock.rs,macros/dispatches.rs,tests/locks.rs).Test plan
cargo fmt --allcleancargo clippy -p pallet-subtensorcleancargo test -p pallet-subtensor --libgreen (1168 passed)get_sharestests: no-burn == price shares, partial burn reallocates away, full burn => zero, all-full-burn => price-share fallback, and root_proportion favoring newer subnetsdissolve_clears_all_per_subnet_storagesextended to assertMinerBurnedcleared on removal