Skip to content

SCRATCH rehearsal 766-p1-node — do not review, internal CI probe - #4

Closed
michael-moffett wants to merge 4 commits into
mainfrom
rehearsal/766-p1-node
Closed

michael-moffett wants to merge 4 commits into
mainfrom
rehearsal/766-p1-node

Conversation

@michael-moffett

Copy link
Copy Markdown
Member

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.

michael-moffett and others added 4 commits August 18, 2026 08:43
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-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown

Greptile Summary

The PR makes remote datasource TLS verification secure by default while retaining an explicit opt-in for self-signed certificates.

  • Propagates the opt-in through CLI, MCP, Rust SDK, and Node SDK entry points.
  • Preserves TLS posture when remote clients are cloned.
  • Defaults new and deserialized legacy configurations to certificate verification.
  • Adds focused configuration, schema, binding, command-generation, and clone tests.

Confidence Score: 5/5

The 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.

Important Files Changed

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
Loading

Reviews (1): Last reviewed commit: "expose allow_insecure_remote_tls on the ..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant