SCRATCH rehearsal 766-p1 — do not review, internal CI probe - #3
Closed
michael-moffett wants to merge 3 commits into
Closed
SCRATCH rehearsal 766-p1 — do not review, internal CI probe#3michael-moffett wants to merge 3 commits into
michael-moffett wants to merge 3 commits into
Conversation
The client used to fetch fork/datasource data disabled certificate verification on every connection, including the default public mainnet endpoint, and `impl Clone` rebuilt it through that same path on each request. Both runloop call sites now go through a single constructor that verifies by default. The self-signed case is preserved as an explicit opt-in, `--allow-insecure-remote-tls`, carried on `SimnetConfig` with `#[serde(default)]` so existing configs mean verified. The client records its TLS posture so a clone reproduces it rather than re-deriving the insecure one. Refs solana-foundation#757
Greptile SummaryThe PR changes remote datasource connections to verify TLS certificates by default while retaining invalid-certificate support behind an explicit opt-in.
Confidence Score: 5/5The PR appears safe to merge, with certificate verification enabled by default and insecure TLS retained only through an explicit, consistently propagated opt-in. The changed entry points, configuration types, runloops, and remote-client cloning preserve a single TLS posture end to end, and no concrete build, runtime, compatibility, or security failure remains reachable in the reviewed paths.
|
| Filename | Overview |
|---|---|
| crates/core/src/surfnet/remote.rs | Centralizes datasource TLS posture, defaults to certificate verification, and preserves that posture across client clones. |
| crates/core/src/runloops/mod.rs | Applies the configured TLS posture consistently to initial datasource access and startup account hydration. |
| crates/cli/src/cli/mod.rs | Adds a false-by-default, explicitly documented CLI opt-in and propagates it into SimnetConfig. |
| crates/sdk/src/surfnet.rs | Exposes the TLS opt-in through SurfnetBuilder while preserving existing builder configuration semantics. |
| crates/mcp/src/surfpool/mod.rs | Adds a backward-compatible optional MCP parameter and forwards it through command and headless startup paths. |
| crates/mcp/src/surfpool/start_surfnet.rs | Carries the TLS choice into generated CLI commands and embedded SimnetConfig instances. |
| crates/types/src/types.rs | Adds the serialized TLS setting with a secure default for both new and legacy configurations. |
Sequence Diagram
sequenceDiagram
actor Operator
participant Entry as CLI / SDK / MCP
participant Config as SimnetConfig
participant Runloop
participant Client as SurfnetRemoteClient
participant Remote as Datasource RPC
Operator->>Entry: Configure datasource and TLS opt-in
Entry->>Config: allow_insecure_remote_tls
Config->>Runloop: Start surfnet
Runloop->>Client: for_datasource(url, opt-in)
alt opt-in is false
Client->>Remote: TLS connection with certificate verification
else opt-in is true
Client->>Remote: TLS connection accepting invalid certificates
end
Reviews (1): Last reviewed commit: "test: the start_surfnet tool advertises ..." | Re-trigger Greptile
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.
Scratch internal CI rehearsal branch for ticket T-DIR-P035-766-P1-CI-RERUN-2026-08-18. Not a submission. Not upstream. Will be closed at end of run. Ignore.