-
Notifications
You must be signed in to change notification settings - Fork 330
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
refactor(nns-governance): Delete *_voting_power fields from governance.proto. #3643
refactor(nns-governance): Delete *_voting_power fields from governance.proto. #3643
Conversation
8fe714c
to
be7b682
Compare
There was a problem hiding this 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:
-
Done.
-
No canister behavior changes.
No canister behavior change. Just a refactor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff reading guide.
rs/nns/governance/proto/ic_nns_governance/pb/v1/governance.proto
Outdated
Show resolved
Hide resolved
…overnance.proto. These are derived, and therefore, do not need to be stored in stable memory. They are part of the API though, so we do not remove them from governance.did.
…information is needed to perform this conversion. Specifically, in order to populate the deciding_voting_power field, VotingPowerEconomics is needed. Also deleted transcribing from *_voting_power fields in the other direction.
…ecause we deleted that in a recent commit. Resurrected `impl From<Neuron> for NeuronProto`, which replaces `into_proto`, which is no longer needed, because converting to NeuronProto no longer requires auxiliary data (used to calculate *_voting_power fields that have been deleted). Still need to implement convertion to API Neuron. That will be done in next commit. //rs/nns/governance builds 🤘
…fix affected tests, it was simply a matter of instead using pb::Neuron::from.
…ing *_voting_power fields from NNS governance.proto).
…ng, which (again, IMHO) is per usual.
620d9fe
to
b3649d5
Compare
Rationale/Motivation
These values are derived. Hence, they do not need to be and should not be stored.
Overview
Got rid of
into_proto
.Reintroduced
pb::Neuron::from
.Added
into_api
.Depending on the situation,
into_proto
calls were replaced with eitherpb::Neuron::from
orinto_api
. The difference is that the former is easier (requires less inputs), but the latter provides (deciding|potential)_voting_power.References
Closes NNS1-3500.