Skip to content

feat: Do not route canister messages from a cooling down subnet - #11193

Open
mraszyk wants to merge 1 commit into
masterfrom
mraszyk/no-routing-from-cooling-down-subnet
Open

feat: Do not route canister messages from a cooling down subnet#11193
mraszyk wants to merge 1 commit into
masterfrom
mraszyk/no-routing-from-cooling-down-subnet

Conversation

@mraszyk

@mraszyk mraszyk commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Messages (requests and responses) in canister output queues are no longer routed into streams while the source subnet is cooling down. They are retained in their output queues until the subnet stops cooling down, rather than being rejected or dropped. This includes the loopback stream, i.e. a cooling down subnet does not route its canisters' messages to its loopback stream either.

The check is merged into the existing destination side check, so a queue is skipped (and counted in mr_cooling_down_skipped_queues) exactly once per round, whether it is the source subnet, the destination subnet, or both that are cooling down. As before, messages from the subnet's own output queues are exempt.

Messages (requests and responses) in canister output queues are no longer
routed into streams while the source subnet is cooling down. They are retained
in their output queues until the subnet stops cooling down, rather than being
rejected or dropped. This includes the loopback stream, i.e. a cooling down
subnet does not route its canisters' messages to its loopback stream either.

The check is merged into the existing destination side check, so a queue is
skipped (and counted in `mr_cooling_down_skipped_queues`) exactly once per
round, whether it is the source subnet, the destination subnet, or both that
are cooling down. As before, messages from the subnet's own output queues are
exempt.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the feat label Aug 18, 2026
@mraszyk
mraszyk marked this pull request as ready for review August 18, 2026 16:15
@mraszyk
mraszyk requested a review from a team as a code owner August 18, 2026 16:15
@zeropath-ai

zeropath-ai Bot commented Aug 18, 2026

Copy link
Copy Markdown

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

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► rs/messaging/src/routing/stream_builder.rs
    Change metric description for cooling_down_skipped_queues to reflect either subnet cooling down, not just destination subnet; add own_subnet_is_cooling_down flag.
► rs/messaging/src/routing/stream_builder.rs
    Use new condition to skip routing when either source or destination subnet is cooling down.
Bug Fix ► rs/messaging/src/routing/stream_builder.rs
    Adjust logic to retain messages in output queues when either the source or destination subnet is cooling down, and only route once cooling is cleared.
Enhancement ► rs/messaging/src/routing/stream_builder/tests.rs
    Update test fixtures and messages to reflect LOCAL_SUBNET cooling down behavior and new fixture naming.
► rs/messaging/src/routing/stream_builder/tests.rs
    Add/adjust tests for retaining messages from cooling down subnets and subsequent routing when cooling down ends.
Refactor ► rs/replicated_state/src/metadata_state.rs
    Improve documentation of cooling_down behavior, clarifying that cooling down retains messages in output queues and affects routing into streams.

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.

1 participant