Skip to content

refactor(nns): Remove legacy options using protobuf for NNS Governance init #4816

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

Merged
merged 1 commit into from
Apr 16, 2025

Conversation

jasonz-dfinity
Copy link
Contributor

Remove 2 legacy options in ic_nns_init:

  • governance_pb_file: using a pb file to instantiate NNS Governance. There doesn't seem to be anyone using it. There are also better options: initial_neurons allow arbitrary neurons and the default initializes 3 neurons.
  • output_initial_state_candid_only: this supposedly creates "candid files" (although 2 out of 4 are protobuf). However, the functionalities to use those files seem incomplete.

Overall, the removals don't affect production code. We can easily revert if it turns out they are used.

@jasonz-dfinity jasonz-dfinity requested review from a team as code owners April 15, 2025 04:23
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.

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.

@jasonz-dfinity jasonz-dfinity dismissed github-actions[bot]’s stale review April 15, 2025 17:14

No canister behavior changes

@max-dfinity
Copy link
Contributor

Will there be a later PR to add a candid file? Or is this utility without much use? Would it be used in recovery?

@jasonz-dfinity
Copy link
Contributor Author

Will there be a later PR to add a candid file? Or is this utility without much use? Would it be used in recovery?

I'm not planning to do so. I doubt there is a good way to do "recovery" based on the output files, since there doesn't seem to be a way to store them. There also doesn't seem to be a way to use the CMC file. My guess is that it was added for testing in static testnets for faster iterations.

@jasonz-dfinity jasonz-dfinity added this pull request to the merge queue Apr 16, 2025
Merged via the queue into master with commit ab3f07e Apr 16, 2025
26 checks passed
@jasonz-dfinity jasonz-dfinity deleted the jason/misc-nns-init-remove-protobuf branch April 16, 2025 16:38
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.

3 participants