SCRATCH rehearsal 766-p1-node — do not review, internal CI probe - #4
Closed
michael-moffett wants to merge 4 commits into
Closed
michael-moffett wants to merge 4 commits into
michael-moffett wants to merge 4 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
A JavaScript caller selecting a self-signed HTTPS datasource could not reach the opt-in: SurfnetConfig had no field for it, so the runloop received the default false and rejected a datasource that worked before TLS verification was turned on. Left unset the builder default (false) still applies, so verification stays on by default.
Greptile SummaryThe PR makes remote datasource TLS verification secure by default while retaining an explicit opt-in for self-signed certificates.
Confidence Score: 5/5The PR appears safe to merge because certificate verification remains the default and the explicit insecure opt-in is consistently propagated. The reviewed changes preserve existing configuration behavior, correct verified-client cloning so it no longer disables certificate checks, and introduce no concrete blocking or non-blocking defect.
|
| Filename | Overview |
|---|---|
| crates/core/src/surfnet/remote.rs | Introduces explicit verified and insecure TLS postures, centralizes datasource construction, and preserves the selected posture during cloning. |
| crates/core/src/runloops/mod.rs | Applies the configured TLS posture consistently to startup and later remote-account fetches. |
| crates/sdk/src/surfnet.rs | Adds the SDK builder option and refactors configuration assembly without changing existing payer, airdrop, or runtime settings. |
| crates/mcp/src/surfpool/mod.rs | Exposes an optional, default-false MCP parameter and forwards it through command and headless startup paths. |
| crates/mcp/src/surfpool/start_surfnet.rs | Carries the TLS opt-in into generated CLI commands and headless SimnetConfig instances. |
| crates/sdk-node/src/lib.rs | Adds the optional Node configuration field and forwards it to the Rust SDK builder. |
| crates/types/src/types.rs | Adds a backward-compatible, serde-defaulted TLS configuration field that remains false by default. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
CLI[CLI flag] --> Config[SimnetConfig]
MCP[MCP parameter] --> Config
RustSDK[Rust SDK builder] --> Config
NodeSDK[Node SDK config] --> RustSDK
Config --> Decision{allow insecure TLS?}
Decision -->|false| Verified[Verified datasource client]
Decision -->|true| Insecure[Explicit insecure client]
Verified --> CloneV[Clone preserves verified posture]
Insecure --> CloneI[Clone preserves insecure posture]
CloneV --> RPC[Remote datasource requests]
CloneI --> RPC
Reviews (1): Last reviewed commit: "expose allow_insecure_remote_tls on the ..." | 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-NODE-CI-RERUN-2026-08-18.
Not a submission. Not upstream. Will be closed at end of run. Ignore.