-
Notifications
You must be signed in to change notification settings - Fork 372
test(mainnet-nns): reintroduction of the mainnet NNS testnet #8170
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pierugo-dfinity
commented
Dec 22, 2025
basvandijk
approved these changes
Dec 22, 2025
Collaborator
basvandijk
left a comment
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.
Nice job!
eichhorl
approved these changes
Dec 23, 2025
Contributor
eichhorl
left a comment
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.
Very cool!
mraszyk
pushed a commit
that referenced
this pull request
Jan 5, 2026
This PR introduces a new testnet `mainnet_nns`: A single-node NNS subnet holding mainnet state, along with 1 API BN and 1 HTTP Gateway, for general use-case. In a separate PR, the current `nns_recovery` testnet will be adapted to also be able to spawn it with mainnet state. Finally, that second PR will also introduce an NNS recovery system test that will use mainnet state. Most of the changes are the revert of e38941a, but some changes were required in `ic-replay`: - Bumping the ingress messages' expiry, otherwise some messages would expire if delivered in multiple batches. This was already done for certain `SubCommand`s, so we generalize it to all of them. - The list of trusted neurons was outdated. - Now neurons need to be made public to be followed. - Trusted neurons will follow the new neuron on all topics and not just `Unspecified` to be more robust. The code lives in its own crate in `//rs/tests/testnets/mainnet_nns/` as a library such that one can turn any testnet or system test into a variant that holds mainnet state, with as few modifications as possible to their original code. For example, the setup of the IC can be done by running the provided `setup` and making proposals to change the topology to achieve the intended initial topology. Such proposals can be made as easily as calling `ProposalWithMainnetState::[name_of_the_proposal]`. Finally, it is intended to use the mainnet's version of `ic-replay` and `ic-recovery` like [previously](https://github.com/dfinity/ic/blob/6cd54499b0ec4f4190043f66769e54e78ffa0ccf/rs/tests/nns/ic_mainnet_nns_recovery/src/lib.rs#L206-L212), but since I needed to modify those to create this testnet, we need to wait for this change to reach mainnet NNS before downloading those. This is tracked in ticket CON-1624. --------- Co-authored-by: IDX GitHub Automation <infra+github-automation@dfinity.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new testnet
mainnet_nns: A single-node NNS subnet holding mainnet state, along with 1 API BN and 1 HTTP Gateway, for general use-case. In a separate PR, the currentnns_recoverytestnet will be adapted to also be able to spawn it with mainnet state. Finally, that second PR will also introduce an NNS recovery system test that will use mainnet state.Most of the changes are the revert of e38941a, but some changes were required in
ic-replay:SubCommands, so we generalize it to all of them.Unspecifiedto be more robust.The code lives in its own crate in
//rs/tests/testnets/mainnet_nns/as a library such that one can turn any testnet or system test into a variant that holds mainnet state, with as few modifications as possible to their original code. For example, the setup of the IC can be done by running the providedsetupand making proposals to change the topology to achieve the intended initial topology. Such proposals can be made as easily as callingProposalWithMainnetState::[name_of_the_proposal].Finally, it is intended to use the mainnet's version of
ic-replayandic-recoverylike previously, but since I needed to modify those to create this testnet, we need to wait for this change to reach mainnet NNS before downloading those. This is tracked in ticket CON-1624.