Skip to content

chore(nervous-system): Remove is_mission_70_voting_rewards_enabled flag#10126

Draft
jasonz-dfinity wants to merge 1 commit intomasterfrom
clean-up-mission-70-flag
Draft

chore(nervous-system): Remove is_mission_70_voting_rewards_enabled flag#10126
jasonz-dfinity wants to merge 1 commit intomasterfrom
clean-up-mission-70-flag

Conversation

@jasonz-dfinity
Copy link
Copy Markdown
Contributor

Summary

  • Phase 1 (voting rewards / dissolve-delay bounds / 8YG bonus) landed on mainnet via feat(governance): Enable Mission 70 voting rewards changes. #9923 on 2026-04-23, so the is_mission_70_voting_rewards_enabled flag has served its purpose.
  • Inline the enabled branch at every call site; drop the flag definition (ENABLE_MISSION_70_VOTING_REWARDS, is_mission_70_voting_rewards_enabled, temporarily_enable_*, temporarily_disable_*).
  • Simplify tests that previously exercised both branches: drop the pre_mission_70 / _disabled cases; collapse _with_mission_70 wrappers into the underlying tests; rename MISSION_70_VOTING_REWARDS_ADJUSTMENT_FACTORVOTING_REWARDS_ADJUSTMENT_FACTOR (now a plain constant).

Out of scope (deliberately kept)

  • MAX_DISSOLVE_DELAY_SECONDS_PRE_MISSION_70 is 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

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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants