Skip to content

restore: fix https snapshot peers not selectable - #11379

Open
ripatel-fd wants to merge 1 commit into
mainfrom
ripatel/ssresolve
Open

restore: fix https snapshot peers not selectable#11379
ripatel-fd wants to merge 1 commit into
mainfrom
ripatel/ssresolve

Conversation

@ripatel-fd

Copy link
Copy Markdown
Contributor

after parsing a redirect with https peer, ssresolve goes to
SHUTTING_DOWN to exchange a TLS close_notify. servers can hang up
right after serving the redirect, and ssresolve considers that a
failure mistakenly.

after parsing a redirect with https peer, ssresolve goes to
SHUTTING_DOWN to exchange a TLS close_notify.  servers can hang up
right after serving the redirect, and ssresolve considers that a
failure mistakenly.
Copilot AI balanced review requested due to automatic review settings September 9, 2026 21:36
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
 ┌─ ⚡ PERF · 30bc628 vs main@2aa0641 ─────────────────────────────────
 │ SUITE                               BASELINE          NEW         Δ
 │ replay tps, mainnet               29,863 tps   29,842 tps  ·  -0.07%
 │ bench tps, localnet              128,638 tps  128,642 tps  ·   0.00%
 │ snapshot load, testnet                9.19 s       9.17 s  ·  -0.25%
 │ mem total, mainnet                171.43 GiB   171.43 GiB  ·   0.00%
 │ mem total, testnet                102.31 GiB   102.31 GiB  ·   0.00%
 │ clean compile, firedancer        215.4 cpu·s  217.9 cpu·s  ·  +1.12%
 │ binary size, firedancer             85.86 MB     85.86 MB  ·   0.00%
 ├─────────────────────────────────────────────────────────────────────
@@ 0 REGRESSIONS · 0 WARNINGS · 0 IMPROVED · 7 NOISE @@
 └─────────────────────────────────────────────────────────────────────

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Combined POLLIN|POLLHUP events can discard a redirect whose response requires multiple reads.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Separates snapshot resolution from TLS shutdown completion so HTTPS peers remain selectable after abrupt server hangups.

Changes:

  • Adds resolved-state and forced-finish APIs.
  • Preserves parsed results across TLS shutdown failures.
  • Adds HTTP/HTTPS redirect regression tests.
File summaries
File Description
fd_ssresolve.c Tracks parsed results and supports forced completion.
fd_ssresolve.h Exposes resolution-state APIs.
fd_http_resolver.c Handles post-resolution hangups.
test_ssresolve.c Adds redirect and TLS hangup tests.
Local.mk Registers the new unit test.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

return -1;
} else if( FD_UNLIKELY( res==FD_SSRESOLVE_ADVANCE_AGAIN ) ) {
return -1;
return 0; /* let the caller handle POLLERR/POLLHUP below */
Comment on lines +240 to +241
static void
test_https_redirect_then_hangup( void ) {
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.

3 participants