chore(nervous-system): Remove is_mission_70_voting_rewards_enabled flag#10126
Draft
jasonz-dfinity wants to merge 1 commit intomasterfrom
Draft
chore(nervous-system): Remove is_mission_70_voting_rewards_enabled flag#10126jasonz-dfinity wants to merge 1 commit intomasterfrom
jasonz-dfinity wants to merge 1 commit intomasterfrom
Conversation
Phase 1 (voting rewards / dissolve-delay bounds / 8YG bonus) landed on mainnet via #9923, so the gating flag has served its purpose. Inline the enabled branch at every call site, drop the flag definition and the Temporary helpers, and simplify the tests that previously exercised both branches. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the is_mission_70_voting_rewards_enabled feature flag and permanently inlines the Mission 70 (“enabled”) behavior across NNS Governance. This simplifies the codebase now that Mission 70 Phase 1 has already been deployed to mainnet and the flag no longer serves as a rollout/rollback mechanism.
Changes:
- Removed the Mission 70 voting rewards flag and its temporary enable/disable test helpers.
- Inlined post–Mission 70 logic for reward pool scaling, dissolve-delay bonus, minimum dissolve delay to vote, and 8-year-gang bonus application.
- Simplified/updated tests by dropping pre-M70 branches and renaming the voting rewards adjustment constant.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| rs/nns/governance/tests/governance.rs | Removes flag-dependent assertions and hardcodes post-M70 expected values in integration tests. |
| rs/nns/governance/src/voting.rs | Deletes dual-branch tests and collapses reward-distribution expectations to the post-M70 behavior. |
| rs/nns/governance/src/reward/calculation.rs | Removes flag-gated reward scaling; renames and directly applies the adjustment factor; simplifies tests accordingly. |
| rs/nns/governance/src/neuron/voting_power.rs | Removes flag-gated dissolve-delay bonus formula; keeps the post-M70 quadratic multiplier unconditionally. |
| rs/nns/governance/src/neuron/voting_power_tests.rs | Drops pre-M70 test cases and keeps a single post-M70 dissolve-delay bonus test. |
| rs/nns/governance/src/neuron/types/tests.rs | Removes tests and setup that depended on toggling the Mission 70 flag. |
| rs/nns/governance/src/neuron/types.rs | Applies 8-year-gang bonus unconditionally (post-M70 behavior) and removes the flag check. |
| rs/nns/governance/src/neuron_store/voting_power.rs | Uses the Mission 70 minimum dissolve delay to vote as the default fallback unconditionally. |
| rs/nns/governance/src/neuron_store/metrics/tests.rs | Updates bucket expectations to fixed post-M70 values; removes flag-conditional logic. |
| rs/nns/governance/src/lib.rs | Removes the thread-local flag definition and exported flag accessor / temporary toggles. |
| rs/nns/governance/src/governance/tests/mod.rs | Removes now-unnecessary Mission 70 flag setup in upgrade/migration tests. |
| rs/nns/governance/src/governance.rs | Inlines post-M70 max dissolve delay and removes flag-guarding around related migrations/defaults. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
is_mission_70_voting_rewards_enabledflag has served its purpose.ENABLE_MISSION_70_VOTING_REWARDS,is_mission_70_voting_rewards_enabled,temporarily_enable_*,temporarily_disable_*).pre_mission_70/_disabledcases; collapse_with_mission_70wrappers into the underlying tests; renameMISSION_70_VOTING_REWARDS_ADJUSTMENT_FACTOR→VOTING_REWARDS_ADJUSTMENT_FACTOR(now a plain constant).Out of scope (deliberately kept)
MAX_DISSOLVE_DELAY_SECONDS_PRE_MISSION_70is still referenced for legacy/migration code that operates on neurons whose stored dissolve delay reflects the pre-M70 max.VotingPowerEconomics::DEFAULT_NEURON_MINIMUM_DISSOLVE_DELAY_TO_VOTE_SECONDS(6 months) remains as a default / fallback used in many places; only the M70 branch was inlined.max_dissolve_delay_seconds()is now a function that just returns the post-M70 constant; further inlining can happen later.🤖 Generated with Claude Code