Add override-only emission suppression for testnet#2462
Open
Add override-only emission suppression for testnet#2462
Conversation
Port emission suppression from emission_suppression branch with only root-level override functionality (no EmissionSuppression vote map, no EmissionSuppressionVote, no vote_emission_suppression extrinsic). Includes: - EmissionSuppressionOverride storage (root sets per-subnet) - KeepRootSellPressureOnSuppressedSubnets (Disable/Enable/Recycle modes) - sudo_set_emission_suppression_override extrinsic (call_index 133) - sudo_set_root_sell_pressure_on_suppressed_subnets_mode (call_index 135) - Suppressed subnets get zero emission share with renormalization - Root alpha handling: Disable recycles to validators, Recycle swaps+burns - Subnet dissolution cleanup - 18 override-only tests
Clarify that Recycle mode swaps root alpha to TAO via AMM, then recycles the TAO (removes from TotalIssuance). Add assertions that the TotalIssuance drop equals the TAO that left the subnet pool, proving all swap proceeds were recycled. Fix comments to use "recycled" instead of "burned" throughout.
Tests 14 and 16 were incorrectly asserting that TotalIssuance decreases in Recycle mode. In reality, emission increases TotalIssuance first (via inject_and_maybe_swap), then the recycle partially offsets it. The net effect is a smaller increase, not a decrease. Rewrite both tests to run Enable mode as baseline, then Recycle mode from the same starting state, and assert Recycle issuance < Enable issuance — proving TAO was recycled without depending on test-setup artifacts.
…behavior Remove the mode enum, storage value, sudo extrinsic (call_index 135), and event. Root always accumulates alpha on suppressed subnets. Remove all mode-related tests.
- Add test verifying suppressed subnets still receive alpha emissions (TAO-only suppression is intentional) - Rename CannotVoteOnRootSubnet to CannotSuppressRootSubnet - Clarify doc comments: Some(false) is currently identical to None - Add benchmark for sudo_set_emission_suppression_override - Add extrinsic authorization failure tests - Add end-to-end run_coinbase integration test
open-junius
reviewed
Feb 26, 2026
| // Get subnet TAO emissions. | ||
| let shares = Self::get_shares(subnets_to_emit_to); | ||
| let mut shares = Self::get_shares(subnets_to_emit_to); | ||
| Self::apply_emission_suppression(&mut shares); |
Contributor
There was a problem hiding this comment.
Can we filter out the suppressed subnet in get_subnets_to_emit_to, instead of compute the emission again.
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.
Summary
emission_suppressionbranch with only root-level override functionality (no vote map, no vote extrinsic, no vote collection)EmissionSuppressionOverridestorage: root can force-suppress/unsuppress subnets viasudo_set_emission_suppression_override(call_index 133)Changes from
emission_suppressionbranchEmissionSuppression(vote-derived map),EmissionSuppressionVote(per-coldkey votes), vote extrinsic, vote collection logicRootSellPressureOnSuppressedSubnetsModeenum,KeepRootSellPressureOnSuppressedSubnetsstorage,sudo_set_root_sell_pressure_on_suppressed_subnets_mode(call_index 135)CannotVoteOnRootSubneterror →CannotSuppressRootSubnetKey design decisions
Some(false)override: accepted and stored but currently identical toNonefor emission calculations. Reserved for future use (e.g. explicit override of a future automatic suppression mechanism).Test plan
cargo test emission_suppression)run_coinbaseintegration test🤖 Generated with Claude Code