-
Notifications
You must be signed in to change notification settings - Fork 29
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: Set neuron visibility. #239
feat: Set neuron visibility. #239
Conversation
…s is not the latest, but is more recent. Trying to use the latest one gave me problems. Anyway, a couple areas in our code then needed to be updated in response: 1. The way we explain proposals. This is implemented in src/lib/format/nns_governance.rs. (Having to hand craft humanization code does not seem very scalable. I think a better approach would be to instead just do format!("(:?}", proposal). This is maybe not as human-friendly, but it would never require us to hand craft humanization code.) 2. This resulted in some minor changes to the way the tool previews what the user is about to do (due to new optional fields), which then caused some tests to fail. Reworking those tests was fairly straight forward, compared to the hand-crafted code needed to support proposal humanization. This is (probably) a well-known weakness in our testing strategy here. Also, I added a script that updates Cargo.toml (and Cargo.lock), and the candid directory. I then used this to update the candid directory. (I had already updated Cargo.toml by hand, but this could have been used to update Cargo.toml as well.)
…lags section. Seems like someone may have mistakenly started a separate section (either Flags already existed, and Options was later added, or the other way around). The two should really just be one, because when you do `quill neuron-manage --help, it lists the flags described in the erstewhile two sections.
…alled "bats"), but GitHub knows, so I will push this to find out if my changes are correct.
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.
Some remarks that mighthopefully be helpful to reviewers.
/// arbitrary principal can view all fields of the neuron (Public), or just | ||
/// a limited subset (Private). | ||
#[arg(long)] | ||
set_visibility: Option<NativeVisibility>, |
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.
Since this is not supported in the Ledger app, it should be added to the incompatibility list.
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.
How do I do that?
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.
See the top line of the function. Add it to the &&
list.
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.
Done.
I guess you mean in the exec function, since this line is not in a function.
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.
Thank you for the review. PTAL.
This reply might contain some duplicates. Hard to tell. GitHub seems to be handling my replies buggily. Please, bear with me.
/// arbitrary principal can view all fields of the neuron (Public), or just | ||
/// a limited subset (Private). | ||
#[arg(long)] | ||
set_visibility: Option<NativeVisibility>, |
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.
How do I do that?
Description
Added
--set-visibility
flag toquill neuron-manage
. Takes one of two possible values:public
orprivate
.In a separate commit, updated this repo to point to a more recent commit in the ic repo.
Added a script to make the aforementioned chore easier.
Closes NNS1-3275.
How Has This Been Tested?
Added set_visibility test.
Checklist