Skip to content

feat: Add a cooling_down field to SubnetRecord - #11236

Open
mraszyk wants to merge 1 commit into
masterfrom
mraszyk/cooling-down-subnet-record
Open

feat: Add a cooling_down field to SubnetRecord#11236
mraszyk wants to merge 1 commit into
masterfrom
mraszyk/cooling-down-subnet-record

Conversation

@mraszyk

@mraszyk mraszyk commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

The field can be set via UpdateSubnetRecord governance proposals (the engine controller is deliberately kept out of scope: it may only set subnet_admins and is_halted) and is now read into SubnetTopology::cooling_down, which used to be hardcoded to false because no registry field was backing it.

The field must not be set in prod until #11117, which introduced the new error code for ingress messages rejected on cooling down subnets (ErrorCode::SubnetCoolingDown), is rolled out to all subnets on mainnet.

@github-actions github-actions Bot added the feat label Aug 20, 2026
@mraszyk
mraszyk force-pushed the mraszyk/cooling-down-subnet-record branch 2 times, most recently from 548e78f to d226387 Compare August 20, 2026 13:35
See the doc comment of `ic_replicated_state::SubnetTopology::cooling_down`
for the semantics of a subnet "cooling down". The new registry field backs
that flag, which used to be hardcoded to `false` because no registry field
was backing it.

The field can be set via `UpdateSubnetRecord` governance proposals; the
engine controller is deliberately kept out of scope (it may only set
`subnet_admins` and `is_halted`).

The field must not be set in prod until #11117, which introduced the new
error code for ingress messages rejected on cooling down subnets
(`ErrorCode::SubnetCoolingDown`), is rolled out to all subnets on mainnet.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mraszyk
mraszyk force-pushed the mraszyk/cooling-down-subnet-record branch from d226387 to d00beed Compare August 20, 2026 14:10
@mraszyk
mraszyk marked this pull request as ready for review August 20, 2026 14:58
@mraszyk
mraszyk requested review from a team as code owners August 20, 2026 14:58

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request changes code owned by the Governance team. Therefore, make sure that
you have considered the following (for Governance-owned code):

  1. Update unreleased_changelog.md (if there are behavior changes, even if they are
    non-breaking).

  2. Are there BREAKING changes?

  3. Is a data migration needed?

  4. Security review?

How to Satisfy This Automatic Review

  1. Go to the bottom of the pull request page.

  2. Look for where it says this bot is requesting changes.

  3. Click the three dots to the right.

  4. Select "Dismiss review".

  5. In the text entry box, respond to each of the numbered items in the previous
    section, declare one of the following:

  • Done.

  • $REASON_WHY_NO_NEED. E.g. for unreleased_changelog.md, "No
    canister behavior changes.", or for item 2, "Existing APIs
    behave as before.".

Brief Guide to "Externally Visible" Changes

"Externally visible behavior change" is very often due to some NEW canister API.

Changes to EXISTING APIs are more likely to be "breaking".

If these changes are breaking, make sure that clients know how to migrate, how to
maintain their continuity of operations.

If your changes are behind a feature flag, then, do NOT add entrie(s) to
unreleased_changelog.md in this PR! But rather, add entrie(s) later, in the PR
that enables these changes in production.

Reference(s)

For a more comprehensive checklist, see here.

GOVERNANCE_CHECKLIST_REMINDER_DEDUP

@zeropath-ai

zeropath-ai Bot commented Aug 20, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to d00beed.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► rs/boundary_node/ic_boundary/src/test_utils.rs
    Add cooling_down field to SubnetRecord construction
► rs/crypto/temp_crypto/src/lib.rs
    Add cooling_down to EcdsaSubnetConfig initialization
► rs/engine_controller/canister/canister.rs
    Include cooling_down in ensure_only_allowed_fields_set payload checks
Enhancement ► rs/engine_controller/canister/tests.rs
    Include cooling_down in test payloads
Enhancement ► rs/engine_controller/engine_controller.did
    Add cooling_down field to UpdateSubnetPayload type
Enhancement ► rs/engine_controller/unreleased_changelog.md
    Document cooling_down field in update_subnet behavior
Enhancement ► rs/messaging/src/message_routing.rs
    Propagate cooling_down from subnet_record when available
Enhancement ► rs/nns/integration_tests/src/subnet_handler.rs
    Initialize cooling_down in test payloads and updates
Enhancement ► rs/orchestrator/registry_replicator/src/internal_state.rs
    Set default cooling_down in test state
Enhancement ► rs/prep/src/subnet_configuration.rs
    Initialize cooling_down in subnet config
Enhancement ► rs/protobuf/def/registry/subnet/v1/subnet.proto
    Add cooling_down field to SubnetRecord (bool, tag 35)
Enhancement ► rs/protobuf/src/gen/registry/registry.subnet.v1.rs
    Add cooling_down field to SubnetRecord (bool, tag 35)
Enhancement ► rs/protobuf/src/gen/state/registry.subnet.v1.rs
    Add cooling_down field to SubnetRecord (bool, tag 35)
Enhancement ► rs/protobuf/src/gen/types/registry.subnet.v1.rs
    Add cooling_down field to SubnetRecord (bool, tag 35)
Enhancement ► rs/registry/admin/bin/types.rs
    Add cooling_down field to SubnetRecord struct and From conversion
► rs/registry/admin/bin/update_subnet.rs
    Add cooling_down to command and payload and propagate in update
Enhancement ► rs/registry/canister/canister/registry.did
    Add cooling_down to SubnetRecord and UpdateSubnetPayload definitions
Enhancement ► rs/registry/canister/canister/registry_test.did
    Add cooling_down to SubnetRecord and UpdateSubnetPayload
Enhancement ► rs/registry/canister/src/get_subnet.rs
    Include cooling_down in SubnetRecord retrieval
Enhancement ► rs/registry/canister/src/mutations/do_create_subnet.rs
    Initialize cooling_down in new SubnetRecord
Enhancement ► rs/registry/canister/src/mutations/do_split_subnet.rs
    Initialize cooling_down in new SubnetRecord during split
Enhancement ► rs/registry/canister/src/mutations/do_update_subnet.rs
    Handle cooling_down in payload scope, merge, and tests
Enhancement ► rs/registry/canister/tests/update_subnet.rs
    Add cooling_down to test payloads and assertions
Enhancement ► rs/registry/canister/tests/update_subnet_admins.rs
    Add cooling_down to test payloads in various scenarios
Enhancement ► rs/registry/canister/unreleased_changelog.md
    Document cooling_down behavior and rollout considerations
Enhancement ► rs/test_utilities/registry/src/lib.rs
    Add cooling_down to test SubnetRecord construction
Enhancement ► rs/tests/consensus/cup_explorer_test.rs
    Set cooling_down: None in UpdateSubnetPayload for test
Enhancement ► rs/tests/consensus/tecdsa/utils/src/lib.rs
    Add cooling_down: None to empty subnet update
Enhancement ► rs/tests/consensus/utils/src/ssh_access.rs
    Add cooling_down: None to update subnet payload helper
Enhancement ► rs/tests/message_routing/xnet/subnet_delete_test.rs
    Add cooling_down: None in test payloads
Enhancement ► rs/tests/testnets/mainnet_nns/src/lib.rs
    Add cooling_down: None in test setup payloads

@zeropath-ai

zeropath-ai Bot commented Aug 20, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to d00beed.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► rs/boundary_node/ic_boundary/src/test_utils.rs
    Add cooling_down field to SubnetRecord construction
► rs/crypto/temp_crypto/src/lib.rs
    Add cooling_down to EcdsaSubnetConfig initialization
► rs/engine_controller/canister/canister.rs
    Include cooling_down in ensure_only_allowed_fields_set payload checks
Enhancement ► rs/engine_controller/canister/tests.rs
    Include cooling_down in test payloads
Enhancement ► rs/engine_controller/engine_controller.did
    Add cooling_down field to UpdateSubnetPayload type
Enhancement ► rs/engine_controller/unreleased_changelog.md
    Document cooling_down field in update_subnet behavior
Enhancement ► rs/messaging/src/message_routing.rs
    Propagate cooling_down from subnet_record when available
Enhancement ► rs/nns/integration_tests/src/subnet_handler.rs
    Initialize cooling_down in test payloads and updates
Enhancement ► rs/orchestrator/registry_replicator/src/internal_state.rs
    Set default cooling_down in test state
Enhancement ► rs/prep/src/subnet_configuration.rs
    Initialize cooling_down in subnet config
Enhancement ► rs/protobuf/def/registry/subnet/v1/subnet.proto
    Add cooling_down field to SubnetRecord (bool, tag 35)
Enhancement ► rs/protobuf/src/gen/registry/registry.subnet.v1.rs
    Add cooling_down field to SubnetRecord (bool, tag 35)
Enhancement ► rs/protobuf/src/gen/state/registry.subnet.v1.rs
    Add cooling_down field to SubnetRecord (bool, tag 35)
Enhancement ► rs/protobuf/src/gen/types/registry.subnet.v1.rs
    Add cooling_down field to SubnetRecord (bool, tag 35)
Enhancement ► rs/registry/admin/bin/types.rs
    Add cooling_down field to SubnetRecord struct and From conversion
► rs/registry/admin/bin/update_subnet.rs
    Add cooling_down to command and payload and propagate in update
Enhancement ► rs/registry/canister/canister/registry.did
    Add cooling_down to SubnetRecord and UpdateSubnetPayload definitions
Enhancement ► rs/registry/canister/canister/registry_test.did
    Add cooling_down to SubnetRecord and UpdateSubnetPayload
Enhancement ► rs/registry/canister/src/get_subnet.rs
    Include cooling_down in SubnetRecord retrieval
Enhancement ► rs/registry/canister/src/mutations/do_create_subnet.rs
    Initialize cooling_down in new SubnetRecord
Enhancement ► rs/registry/canister/src/mutations/do_split_subnet.rs
    Initialize cooling_down in new SubnetRecord during split
Enhancement ► rs/registry/canister/src/mutations/do_update_subnet.rs
    Handle cooling_down in payload scope, merge, and tests
Enhancement ► rs/registry/canister/tests/update_subnet.rs
    Add cooling_down to test payloads and assertions
Enhancement ► rs/registry/canister/tests/update_subnet_admins.rs
    Add cooling_down to test payloads in various scenarios
Enhancement ► rs/registry/canister/unreleased_changelog.md
    Document cooling_down behavior and rollout considerations
Enhancement ► rs/test_utilities/registry/src/lib.rs
    Add cooling_down to test SubnetRecord construction
Enhancement ► rs/tests/consensus/cup_explorer_test.rs
    Set cooling_down: None in UpdateSubnetPayload for test
Enhancement ► rs/tests/consensus/tecdsa/utils/src/lib.rs
    Add cooling_down: None to empty subnet update
Enhancement ► rs/tests/consensus/utils/src/ssh_access.rs
    Add cooling_down: None to update subnet payload helper
Enhancement ► rs/tests/message_routing/xnet/subnet_delete_test.rs
    Add cooling_down: None in test payloads
Enhancement ► rs/tests/testnets/mainnet_nns/src/lib.rs
    Add cooling_down: None in test setup payloads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants