Skip to content

feat(delegations): [CON-1664] make cloud engine nodes use API BNs to fetch delegations#9595

Merged
pierugo-dfinity merged 72 commits intomasterfrom
pierugo/delegations/type4-adjustments
Apr 1, 2026
Merged

feat(delegations): [CON-1664] make cloud engine nodes use API BNs to fetch delegations#9595
pierugo-dfinity merged 72 commits intomasterfrom
pierugo/delegations/type4-adjustments

Conversation

@pierugo-dfinity
Copy link
Copy Markdown
Contributor

@pierugo-dfinity pierugo-dfinity commented Mar 26, 2026

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. After discussing with Franz-Stefan, we decided that webpki-roots made more sense for the sake of consistency.

@pierugo-dfinity pierugo-dfinity added the CI_ALL_BAZEL_TARGETS Runs all bazel targets label Mar 26, 2026
@github-actions github-actions bot added the feat label Mar 26, 2026
@pierugo-dfinity pierugo-dfinity requested a review from a team as a code owner March 31, 2026 09:40
Copy link
Copy Markdown
Contributor

@mraszyk mraszyk left a comment

Choose a reason for hiding this comment

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

Approving the change in rs/canonical_state/src/lazy_tree_conversion.rs.

Copy link
Copy Markdown
Contributor

@kpop-dfinity kpop-dfinity left a comment

Choose a reason for hiding this comment

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

LGTM with some nits, assuming that the tests pass when #9613 and #9609 are merged :D

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.
@pierugo-dfinity pierugo-dfinity added this pull request to the merge queue Apr 1, 2026
Merged via the queue into master with commit fd2b851 Apr 1, 2026
38 checks passed
@pierugo-dfinity pierugo-dfinity deleted the pierugo/delegations/type4-adjustments branch April 1, 2026 12:28
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>
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.

6 participants