internal CI rehearsal — datasource TLS verification (do not merge) - #1
Closed
michael-moffett wants to merge 1 commit into
Closed
internal CI rehearsal — datasource TLS verification (do not merge)#1michael-moffett wants to merge 1 commit into
michael-moffett wants to merge 1 commit 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 TLS handling from unconditional certificate acceptance to verification by default, with an explicit opt-in for self-signed certificates.
Confidence Score: 5/5The PR appears safe to merge because no concrete changed-code failure remains after reviewing TLS selection, configuration propagation, and clone behavior. Certificate verification is now the default, the insecure path requires an explicit operator opt-in, both datasource construction paths consume that setting, clones preserve the selected posture, and older serialized configurations default safely.
|
| Filename | Overview |
|---|---|
| crates/cli/src/cli/mod.rs | Adds the explicit insecure-TLS CLI opt-in and copies it into the generated simulation configuration. |
| crates/core/src/runloops/mod.rs | Applies the configured TLS posture consistently when constructing startup and remote-account datasource clients. |
| crates/core/src/surfnet/remote.rs | Introduces centralized verified/insecure construction, preserves TLS posture across clones, and adds focused regression tests. |
| crates/types/src/types.rs | Adds a backward-compatible, secure-by-default TLS configuration field and verifies legacy deserialization behavior. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[CLI or serialized SimnetConfig] --> B{offline_mode?}
B -- Yes --> C[No startup datasource client]
B -- No --> D{allow_insecure_remote_tls?}
D -- False --> E[Verified SurfnetRemoteClient]
D -- True --> F[Insecure SurfnetRemoteClient]
E --> G[Clone preserves verified posture]
F --> H[Clone preserves insecure posture]
A --> I[FetchRemoteAccounts]
I --> D
Reviews (1): Last reviewed commit: "fix(cli,core,types): verify datasource T..." | Re-trigger Greptile
Member
Author
|
internal rehearsal complete; closing |
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.
Internal dress rehearsal of the target's PR checks on our own fork. Not for merge, not for review by anyone outside this org.
Will be closed when the run completes.