feat: Allow changing subnet_admins via UpdateSubnetPayload#10113
Draft
feat: Allow changing subnet_admins via UpdateSubnetPayload#10113
Conversation
Adds an optional `subnet_admins` field to `UpdateSubnetPayload` so NNS proposals can replace a subnet's admin list. Coexists with the Subnet Rental Canister's existing `update_subnet_admins` path, which is unchanged. Promotes the max-10 cap on `subnet_admins` from a local constant in `do_update_subnet_admins` to a registry invariant in `invariants::subnet`, so the cap is enforced uniformly on every mutation.
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
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.
subnet_admins: Option<Vec<PrincipalId>>toUpdateSubnetPayloadso NNS proposals can replace a subnet's admin list (None= leave unchanged,Some(vec![])= clear,Some(vec![...])= replace). Wired throughmerge_subnet_recordand exposed in ic-admin as--subnet-admins.subnet_adminsfrom a local constant indo_update_subnet_adminsto a registry invariant ininvariants::subnet, so it's enforced uniformly on every mutation. The existing rented/cloud-engine constraint on having admins at all stays in the same invariant.update_subnet_adminsingress (unchanged); that path keeps itsAdd/Remove/Clearsemantics, rate limiting, and stricter "Application + Free" check.No new proposal type, and no new validation in
do_update_subnet— relies on the registry invariant for both the type/cost-schedule rule and the count cap, mirroringdo_create_subnet.