Skip to content

Commit

Permalink
Mention that making a proposal also refreshes voting power (because d…
Browse files Browse the repository at this point in the history
…irect voting is involved).
  • Loading branch information
daniel-wong-dfinity-org committed Oct 30, 2024
1 parent 9a9d41f commit ef7e9e5
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 34 deletions.
30 changes: 19 additions & 11 deletions rs/nns/governance/api/src/ic_nns_governance.pb.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,14 @@ pub struct NeuronInfo {
#[prost(enumeration = "Visibility", optional, tag = "12")]
pub visibility: Option<i32>,
/// The last time that voting power was "refreshed". There are two ways to
/// refresh the voting power of a neuron: set following, or vote directly. When
/// this becomes > 6 months ago, the amount of voting power that this neuron
/// can exercise decreases linearly down to 0 over the course of 1 month. After
/// that, following is cleared, except for ManageNeuron proposals.
/// refresh the voting power of a neuron: set following, or vote directly. In
/// the future, there will be a dedicated API for refreshing. Note that direct
/// voting implies that refresh also occurs when a proposal is created, because
/// direct voting is part of proposal creation.
///
/// Effect: When this becomes > 6 months ago, the amount of voting power that
/// this neuron can exercise decreases linearly down to 0 over the course of 1
/// month. After that, following is cleared, except for ManageNeuron proposals.
///
/// This will always be populated. If the underlying neuron was never
/// refreshed, this will be set to 2024-11-05T00:00:01 UTC (1730764801 seconds
Expand Down Expand Up @@ -268,14 +272,18 @@ pub struct Neuron {
#[prost(enumeration = "Visibility", optional, tag = "23")]
pub visibility: Option<i32>,
/// The last time that voting power was "refreshed". There are two ways to
/// refresh the voting power of a neuron: set following, or vote directly. When
/// this becomes > 6 months ago, the amount of voting power that this neuron
/// can exercise decreases linearly down to 0 over the course of 1 month. After
/// that, following is cleared, except for ManageNeuron proposals.
/// refresh the voting power of a neuron: set following, or vote directly. In
/// the future, there will be a dedicated API for refreshing. Note that direct
/// voting implies that refresh also occurs when a proposal is created, because
/// direct voting is part of proposal creation.
///
/// Effect: When this becomes > 6 months ago, the amount of voting power that
/// this neuron can exercise decreases linearly down to 0 over the course of 1
/// month. After that, following is cleared, except for ManageNeuron proposals.
///
/// When this is not populated (the Rust field is set to None), the Neuron is
/// treated as though this is set to 2024-11-05T00:00:01 UTC (1730764801
/// seconds after the UNIX epoch).
/// This will always be populated. If the underlying neuron was never
/// refreshed, this will be set to 2024-11-05T00:00:01 UTC (1730764801 seconds
/// after the UNIX epoch).
#[prost(uint64, optional, tag = "24")]
pub voting_power_refreshed_timestamp_seconds: ::core::option::Option<u64>,
/// At any time, at most one of `when_dissolved` and
Expand Down
32 changes: 20 additions & 12 deletions rs/nns/governance/proto/ic_nns_governance/pb/v1/governance.proto
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,14 @@ message NeuronInfo {
// See the Visibility enum.
optional Visibility visibility = 12;
// The last time that voting power was "refreshed". There are two ways to
// refresh the voting power of a neuron: set following, or vote directly. When
// this becomes > 6 months ago, the amount of voting power that this neuron
// can exercise decreases linearly down to 0 over the course of 1 month. After
// that, following is cleared, except for ManageNeuron proposals.
// refresh the voting power of a neuron: set following, or vote directly. In
// the future, there will be a dedicated API for refreshing. Note that direct
// voting implies that refresh also occurs when a proposal is created, because
// direct voting is part of proposal creation.
//
// Effect: When this becomes > 6 months ago, the amount of voting power that
// this neuron can exercise decreases linearly down to 0 over the course of 1
// month. After that, following is cleared, except for ManageNeuron proposals.
//
// This will always be populated. If the underlying neuron was never
// refreshed, this will be set to 2024-11-05T00:00:01 UTC (1730764801 seconds
Expand Down Expand Up @@ -441,14 +445,18 @@ message Neuron {
optional Visibility visibility = 23;

// The last time that voting power was "refreshed". There are two ways to
// refresh the voting power of a neuron: set following, or vote directly. When
// this becomes > 6 months ago, the amount of voting power that this neuron
// can exercise decreases linearly down to 0 over the course of 1 month. After
// that, following is cleared, except for ManageNeuron proposals.
//
// When this is not populated (the Rust field is set to None), the Neuron is
// treated as though this is set to 2024-11-05T00:00:01 UTC (1730764801
// seconds after the UNIX epoch).
// refresh the voting power of a neuron: set following, or vote directly. In
// the future, there will be a dedicated API for refreshing. Note that direct
// voting implies that refresh also occurs when a proposal is created, because
// direct voting is part of proposal creation.
//
// Effect: When this becomes > 6 months ago, the amount of voting power that
// this neuron can exercise decreases linearly down to 0 over the course of 1
// month. After that, following is cleared, except for ManageNeuron proposals.
//
// This will always be populated. If the underlying neuron was never
// refreshed, this will be set to 2024-11-05T00:00:01 UTC (1730764801 seconds
// after the UNIX epoch).
optional uint64 voting_power_refreshed_timestamp_seconds = 24;
}

Expand Down
30 changes: 19 additions & 11 deletions rs/nns/governance/src/gen/ic_nns_governance.pb.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,14 @@ pub struct NeuronInfo {
#[prost(enumeration = "Visibility", optional, tag = "12")]
pub visibility: ::core::option::Option<i32>,
/// The last time that voting power was "refreshed". There are two ways to
/// refresh the voting power of a neuron: set following, or vote directly. When
/// this becomes > 6 months ago, the amount of voting power that this neuron
/// can exercise decreases linearly down to 0 over the course of 1 month. After
/// that, following is cleared, except for ManageNeuron proposals.
/// refresh the voting power of a neuron: set following, or vote directly. In
/// the future, there will be a dedicated API for refreshing. Note that direct
/// voting implies that refresh also occurs when a proposal is created, because
/// direct voting is part of proposal creation.
///
/// Effect: When this becomes > 6 months ago, the amount of voting power that
/// this neuron can exercise decreases linearly down to 0 over the course of 1
/// month. After that, following is cleared, except for ManageNeuron proposals.
///
/// This will always be populated. If the underlying neuron was never
/// refreshed, this will be set to 2024-11-05T00:00:01 UTC (1730764801 seconds
Expand Down Expand Up @@ -288,14 +292,18 @@ pub struct Neuron {
#[prost(enumeration = "Visibility", optional, tag = "23")]
pub visibility: ::core::option::Option<i32>,
/// The last time that voting power was "refreshed". There are two ways to
/// refresh the voting power of a neuron: set following, or vote directly. When
/// this becomes > 6 months ago, the amount of voting power that this neuron
/// can exercise decreases linearly down to 0 over the course of 1 month. After
/// that, following is cleared, except for ManageNeuron proposals.
/// refresh the voting power of a neuron: set following, or vote directly. In
/// the future, there will be a dedicated API for refreshing. Note that direct
/// voting implies that refresh also occurs when a proposal is created, because
/// direct voting is part of proposal creation.
///
/// Effect: When this becomes > 6 months ago, the amount of voting power that
/// this neuron can exercise decreases linearly down to 0 over the course of 1
/// month. After that, following is cleared, except for ManageNeuron proposals.
///
/// When this is not populated (the Rust field is set to None), the Neuron is
/// treated as though this is set to 2024-11-05T00:00:01 UTC (1730764801
/// seconds after the UNIX epoch).
/// This will always be populated. If the underlying neuron was never
/// refreshed, this will be set to 2024-11-05T00:00:01 UTC (1730764801 seconds
/// after the UNIX epoch).
#[prost(uint64, optional, tag = "24")]
pub voting_power_refreshed_timestamp_seconds: ::core::option::Option<u64>,
/// At any time, at most one of `when_dissolved` and
Expand Down

0 comments on commit ef7e9e5

Please sign in to comment.