Repository navigation
refactor: extract SOCKS proxy resolution into a cache - #11619
Merged
Merged
Conversation
`CanisterHttpPoolManagerImpl::get_socks_proxy_addrs` resolved the API boundary nodes that outcalls may be proxied through. That is registry policy rather than consensus logic, and an upcoming second caller (HTTP outcalls from composite queries) needs the same answer. Move it into a new `ic-https-outcalls-socks-proxy` crate as a `SocksProxyCache`. In addition to the refactor, this commit also introduces caching for repeated lookups under the same registry version. The pool manager builds its own provider from the `registry_client` and `subnet_type` it already receives, so its constructor is unchanged, and it resolves the same addresses as before. Only the logging thins out: the per-node warnings now appear once per registry version rather than on every `on_state_change`. The failure metrics still tick on every call, which is why the resolution hands its failures back to the caller instead of recording them itself.
|
✅ No security or compliance issues detected. Reviewed everything up to fe7b991. Security Overview
Detected Code Changes
|
mraszyk
reviewed
Sep 18, 2026
mraszyk
approved these changes
Sep 23, 2026
mraszyk
approved these changes
Sep 25, 2026
mraszyk
approved these changes
Sep 25, 2026
basvandijk
added a commit
that referenced
this pull request
Sep 28, 2026
Conflicts in `rs/https_outcalls/consensus/BUILD.bazel` and `Cargo.lock`: this branch dropped `slog` from the crate's test deps while master (#11619) dropped `strum`. Neither is used by the crate anymore, so both are removed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
basvandijk
added a commit
that referenced
this pull request
Sep 28, 2026
The crate added on master in #11619 only logs through ic_logger's macros, which this branch changed to expand to `$crate::slog`, so the direct slog dependency is no longer needed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.
CanisterHttpPoolManagerImpl::get_socks_proxy_addrsresolved the API boundary nodes that outcalls may be proxied through. That is registry policy rather than consensus logic, and an upcoming second caller (HTTP outcalls from composite queries) needs the same answer.Move it into a new
ic-https-outcalls-socks-proxycrate as aSocksProxyCache. In addition to the refactor, this commit also introduces caching for repeated lookups under the same registry version.The pool manager builds its own provider from the
registry_clientandsubnet_typeit already receives, so its constructor is unchanged, and it resolves the same addresses as before. Only the logging thins out: the per-node warnings now appear once per registry version rather than on everyon_state_change. The failure metrics still tick on every call, which is why the resolution hands its failures back to the caller instead of recording them itself.