feat(delegations): [CON-1664] make cloud engine nodes use API BNs to fetch delegations#9595
Merged
pierugo-dfinity merged 72 commits intomasterfrom Apr 1, 2026
Merged
Conversation
mraszyk
approved these changes
Mar 31, 2026
Contributor
mraszyk
left a comment
There was a problem hiding this comment.
Approving the change in rs/canonical_state/src/lazy_tree_conversion.rs.
kpop-dfinity
approved these changes
Apr 1, 2026
rs/http_endpoints/nns_delegation_manager/src/nns_delegation_manager.rs
Outdated
Show resolved
Hide resolved
This reverts commit 6a7e2e0.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 1, 2026
There is a registry [invariant](https://sourcegraph.com/r/github.com/dfinity/ic@be84ed74ce86fbc7db95edaeba782f4106313dc5/-/blob/rs/registry/canister/src/invariants/subnet.rs#L118-L129) that enforces that cloud engines must have a free cycles cost schedule. A separate [PR](#9621) will add a second invariant enforcing that cloud engines must contain only `type4` node reward types, as this is already how nodes deny incoming connections from cloud engine nodes in the [firewall](#9315). This PR ensures those two invariants are satisfied when creating cloud engines in system tests by default (though can still be broken if needed by calling `with_cost_schedule`/`with_node_reward_type`). Moreover, note that this means that it becomes a requirement for any system test running a cloud engine to also have an API BN. As of `HEAD`, cloud engines already use API BNs to [replicate the registry](#9222) (because NNS nodes' firewall blocks them). Existing system tests using cloud engines work because the nodes' reward types are not set in the registry, thus default to contacting NNS nodes. Soon ([draft PR](#9595)), fetching delegations will also go through API BNs. This PR thus also adds an API BN to existing tests that use cloud engines.
daniel-wong-dfinity-org
pushed a commit
that referenced
this pull request
Apr 1, 2026
…fetch delegations (#9595) Since non-cloud engine nodes (including nodes of the NNS subnet) deny incoming connections from cloud engine nodes in the firewall, a few adjustments are required. Cloud engines' registry replicators already use API BNs instead of NNS nodes directly. Similarly, this PR makes cloud engine nodes use API BNs instead of NNS nodes to fetch delegations. This PR also extends the current system test on NNS delegations to test all endpoints on all subnet types (including the NNS, which should effectively not return a delegation). Note: we need to wait that #9613 reaches mainnet NNS before re-enabling the mainnet variant of the system test for cloud engines. This is tracked in CON-1696. Another note concerning the introduced dependency `webpki-roots`: this dependency was already used transitively but not directly. We have the choice between using native certs (provided by the OS) or the `webpki-roots` crate which contains a list of CAs maintained by Mozilla. The decision is not new and was already [extensively discussed](4f05450). After discussing with Franz-Stefan, we decided that `webpki-roots` made more sense for the sake of consistency. --------- Co-authored-by: Andrew Battat <andrew.battat@dfinity.org> Co-authored-by: IDX GitHub Automation <infra+github-automation@dfinity.org>
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.
Since non-cloud engine nodes (including nodes of the NNS subnet) deny incoming connections from cloud engine nodes in the firewall, a few adjustments are required.
Cloud engines' registry replicators already use API BNs instead of NNS nodes directly. Similarly, this PR makes cloud engine nodes use API BNs instead of NNS nodes to fetch delegations.
This PR also extends the current system test on NNS delegations to test all endpoints on all subnet types (including the NNS, which should effectively not return a delegation).
Note: we need to wait that #9613 reaches mainnet NNS before re-enabling the mainnet variant of the system test for cloud engines. This is tracked in CON-1696.
Another note concerning the introduced dependency
webpki-roots: this dependency was already used transitively but not directly. We have the choice between using native certs (provided by the OS) or thewebpki-rootscrate which contains a list of CAs maintained by Mozilla. The decision is not new and was already extensively discussed. After discussing with Franz-Stefan, we decided thatwebpki-rootsmade more sense for the sake of consistency.