Propagate price-based emissions and locked transfer flags - devnet-ready#2785
Open
gztensor wants to merge 16 commits into
Open
Propagate price-based emissions and locked transfer flags - devnet-ready#2785gztensor wants to merge 16 commits into
gztensor wants to merge 16 commits into
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>
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>
Price-based emissions with miner-burn scaling (+ locked transfer flags)
- 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>
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>
# Conflicts: # pallets/subtensor/src/macros/dispatches.rs # pallets/subtensor/src/macros/errors.rs # pallets/subtensor/src/staking/lock.rs # pallets/subtensor/src/tests/coinbase.rs
Contributor
🛡️ AI Review — Skeptic (security review)VERDICT: VULNERABLE BASELINE scrutiny: author has write permission, an account older than two years, and substantial subtensor PR history; branch feat/propagate-pr-2780-devnet-ready -> devnet-ready. Findings
Other findings
Prior-comment reconciliation
ConclusionThe diff looks legitimate and I found no evidence of a malicious backdoor, dependency attack, 📜 Previous run (superseded)
# 🔍 AI Review — Auditor (domain review) has not yet run on this PR. |
Contributor
|
🔄 AI review updated — Skeptic: VULNERABLE |
sam0x17
previously approved these changes
Jun 23, 2026
# Conflicts: # pallets/admin-utils/src/weights.rs # pallets/proxy/src/weights.rs # pallets/subtensor/src/weights.rs # pallets/utility/src/weights.rs
Contributor
|
🔄 AI review updated — Skeptic: VULNERABLE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Back-propagates the locked-alpha transfer flag and price-based emission updates to
devnet-ready.What changed
AccountFlagsstorage and theset_reject_locked_alphaextrinsic so coldkeys can opt in or out of receiving locked alpha.MinerBurnedaccounting for the proportion of miner incentive emission withheld from miners because it was directed to subnet owner or immune hotkeys.root_proportion * price * (1 - miner_burned)and falls back to price shares if all combined weights are zero.MinerBurnedon subnet dissolution and updates weights/tests for the new storage reads.Behavioral impact
Coldkeys reject incoming locked alpha by default. A coldkey can call
set_reject_locked_alpha(false)to accept locked alpha from stake transfers or coldkey swaps, andset_reject_locked_alpha(true)to return to the default rejection behavior.Subnets that withhold miner incentive emission through owner or immune hotkeys receive proportionally less future chain emission, with that emission reallocated among eligible subnets.
Spec version / migration
This changes runtime behavior and requires a testnet runtime
spec_versionbump. The Auditor auto-fix bumpedruntime/src/lib.rsfrom421to422. The new storage maps use defaults and do not require an explicit storage migration.Testing
The PR adds coverage for account flag defaults and setter behavior, locked-alpha rejection/allowance on stake transfer and coldkey swap paths, subnet dissolve cleanup, and emission-share reweighting for no burn, partial burn, full burn, all-full-burn fallback, and root-proportion weighting.