Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nns): Add neuron_minimum_dissolve_delay_to_vote_seconds to VotingPowerEconomics #4180

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

aterga
Copy link
Member

@aterga aterga commented Feb 28, 2025

This PR moves the inner code constant neuron_minimum_dissolve_delay_to_vote_seconds to VotingPowerEconomics, exposing it as an API parameter. This helps the NNS clients to prepare for a potential change of this parameter.

@aterga aterga added the CI_ALL_BAZEL_TARGETS Runs all bazel targets and uploads them to S3 label Feb 28, 2025
@github-actions github-actions bot added the feat label Feb 28, 2025
@aterga aterga requested a review from max-dfinity February 28, 2025 17:05
@aterga aterga marked this pull request as ready for review February 28, 2025 17:05
@aterga aterga requested a review from a team as a code owner February 28, 2025 17:05
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

If this pull request affects the behavior of any canister owned by
the Governance team, remember to update the corresponding
unreleased_changes.md file(s).

To acknowldge this reminder (and unblock the PR), dismiss this
code review by going to the bottom of the pull request page, and
supply one of the following reasons:

  1. Done.

  2. No canister behavior changes.

pub const MIN_DISSOLVE_DELAY_FOR_VOTE_ELIGIBILITY_SECONDS_BOUNDS: RangeInclusive<u64> =
(3 * ONE_MONTH_SECONDS)..=(6 * ONE_MONTH_SECONDS);

if !MIN_DISSOLVE_DELAY_FOR_VOTE_ELIGIBILITY_SECONDS_BOUNDS.contains(&delay) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm confused by this - why not just do >= and <= instead of constructing a range and seeing if the value is inside of it?

/// This value is an essential part of the staking mechanism, promoting
/// long-term alignment with the network's governance.
#[prost(uint64, optional, tag = "3")]
pub neuron_minimum_dissolve_delay_to_vote_seconds: ::core::option::Option<u64>,
Copy link
Contributor

Choose a reason for hiding this comment

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

So my main question is - if we're exposing this as an API parameter, does that mean that the value is actually being used to see if a neuron can vote? It looks like not yet. Is there a followup PR planned to actually use the value on VotingPowerEconomics to determine neuron voting eligibility?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI_ALL_BAZEL_TARGETS Runs all bazel targets and uploads them to S3 feat @nns-team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants