feat: [DSM-96] Isolate XNet on engines#9449
Merged
schneiderstefan merged 21 commits intomasterfrom Mar 25, 2026
Merged
Conversation
This commit isolates cloud engines for the purpose of XNet. Specifically: 1. In NetworkTopology, where the deterministic state machine makes routing decisions: a. If the own subnet type is not CloudEngine, then any calls to another subnet with type CloudEngine are filtered out. The topology however still contains the engines, as they are mapped to the state tree. b. If the own subnet type is CloudEngine, only calls to the own subnet are permitted. Furthermore, any other subnets are already filtered out of the topology when it is constructed. 2. In the XNetPayloadBuilder, where messages from other subnets are pulled: a. If the own subnet type is not CloudEngine, then no slices from engines are produced in the payload builder or accepted in the validator. b. If the own subnet type is CloudEngine, the payload builder produces an empty payload and the validator only accepts an empty payload.
Contributor
derlerd-dfinity
left a comment
There was a problem hiding this comment.
Nice! I did a first quick skim and left some preliminary comments/questions. I will do another iteration later.
eichhorl
reviewed
Mar 18, 2026
…e map for state tree
… subnet type from context state instead of startup
Contributor
derlerd-dfinity
left a comment
There was a problem hiding this comment.
Did another pass and left some comments.
eichhorl
reviewed
Mar 23, 2026
Contributor
derlerd-dfinity
left a comment
There was a problem hiding this comment.
Thanks a lot for all the changes. The PR looks good to me now modulo the minor points that are still open.
alin-at-dfinity
approved these changes
Mar 24, 2026
derlerd-dfinity
approved these changes
Mar 24, 2026
Contributor
derlerd-dfinity
left a comment
There was a problem hiding this comment.
Thanks a lot for addressing all my comments. LGTM.
eichhorl
approved these changes
Mar 24, 2026
alin-at-dfinity
pushed a commit
that referenced
this pull request
Mar 26, 2026
This commit isolates cloud engines for the purpose of XNet. Specifically: 1. In NetworkTopology, where the deterministic state machine makes routing decisions: - If the own subnet type is not CloudEngine, then any subnet with type CloudEngine is filtered out from the list of subnets and the routing table. On the NNS, we also maintain a full copy of the subnet list and routing table in order to map it into the state tree. - If the own subnet type is CloudEngine, only calls to the own subnet are permitted. 2. In the XNetPayloadBuilder, where messages from other subnets are pulled: - If the own subnet type is not CloudEngine, then no slices from engines are produced in the payload builder or accepted in the validator. - If the own subnet type is CloudEngine, the payload builder produces an empty payload and the validator only accepts an empty payload. --------- Co-authored-by: IDX GitHub Automation <infra+github-automation@dfinity.org>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 16, 2026
…routing table in registry (#9891) Fix flaky `icrc_ledger_suite_integration_golden_state_upgrade_downgrade_test` by registering all subnets referenced in the routing table in the registry. Extract `add_cup_contents_and_key_record` helper to eliminate code duplication. The golden state tests use `create_routing_table` (introduced in [PR #1530](#1530)) to route canister IDs outside the local subnet to a non-existent subnet. This ensures that leftover cross-subnet responses in the golden state backup are routed into a remote stream (where they sit harmlessly) rather than triggering a critical error in the stream builder. This worked until [PR #9449](#9449) introduced routing table filtering in `try_to_populate_network_topology`: non-CloudEngine subnets now filter the routing table to only include entries for subnets that have registry records. Since `StateMachineBuilder::build()` only registered the local subnet, the non-existent subnet's routing entries were silently dropped, leaving cross-subnet responses unroutable and causing `mr_stream_builder_response_destination_not_found` critical errors in the golden state test. The test is flaky (rather than always failing) because, depending on the timing of the snapshot, it may or may not contain messages destined for other subnets. `StateMachineBuilder::build()` now derives the subnet list from the routing table and registers minimal registry records (DKG transcript, subnet record, key record) for each non-local subnet via `register_non_local_subnet`. This ensures their routing table entries survive the filtering.
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.
This commit isolates cloud engines for the purpose of XNet. Specifically: