Skip to content

restore: full snapshot resolve#9088

Merged
jvarela-jump merged 1 commit intojvarela/snapshot-incr-resolvefrom
jvarela/snapshot-full-resolve
Apr 6, 2026
Merged

restore: full snapshot resolve#9088
jvarela-jump merged 1 commit intojvarela/snapshot-incr-resolvefrom
jvarela/snapshot-full-resolve

Conversation

@jvarela-jump
Copy link
Copy Markdown
Contributor

@jvarela-jump jvarela-jump commented Mar 30, 2026

Extends #9050 's http head resolve to the full snapshot.

Partially addresses #9091.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the HTTP HEAD pre-resolve functionality to full snapshots, building upon PR #9050 which introduced the same mechanism for incremental snapshots. The goal is to validate the availability and freshness of snapshot data via HEAD requests before downloading, making the snapshot acquisition process more robust against stale gossip data.

Changes:

  • Added full_resolve and full_resolve_peer fields to the fd_snapct_tile context structure for managing full snapshot HEAD pre-resolves
  • Extended memory allocation in scratch_footprint and unprivileged_init to accommodate the new full snapshot resolver
  • Updated rlimit_file_cnt to account for the additional socket needed by the full snapshot HEAD resolver
  • Modified the FD_SNAPCT_STATE_COLLECTING_PEERS state in the snapshot acquisition state machine to perform HEAD pre-resolution for non-HTTPS peers before downloading full snapshots
  • Added comprehensive validation logic for full snapshots (checking for proper snapshot type and staleness) and error handling for timeouts and failures
  • Added HEAD resolver cancellation in reset states for both full and incremental snapshots
  • Initialized the new full_resolve and full_resolve_peer fields in both privileged and unprivileged initialization functions

Comment thread src/discof/restore/fd_snapct_tile.c Outdated
@jvarela-jump jvarela-jump force-pushed the jvarela/snapshot-full-resolve branch from 81d1e77 to 814efdf Compare March 30, 2026 23:05
@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-406545575-perf per slot 0.137454 s 0.137142 s -0.227%
backtest mainnet-406545575-perf snapshot load 3.603 s 3.112 s -13.628%
backtest mainnet-406545575-perf total elapsed 137.453843 s 137.141694 s -0.227%
firedancer mem usage with mainnet.toml 1090.43 GiB 1090.43 GiB 0.000%

@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-406545575-perf per slot 0.122205 s 0.122079 s -0.103%
backtest mainnet-406545575-perf snapshot load 3.362 s 2.772 s -17.549%
backtest mainnet-406545575-perf total elapsed 122.205089 s 122.079024 s -0.103%
firedancer mem usage with mainnet.toml 1090.43 GiB 1090.43 GiB 0.000%

@jvarela-jump jvarela-jump force-pushed the jvarela/snapshot-full-resolve branch from f2b362d to d10888b Compare March 31, 2026 18:49
@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-406545575-perf per slot 0.143963 s 0.143993 s 0.021%
backtest mainnet-406545575-perf snapshot load 5.287 s 3.593 s -32.041%
backtest mainnet-406545575-perf total elapsed 143.962727 s 143.992931 s 0.021%
firedancer mem usage with mainnet.toml 1106.43 GiB 1090.43 GiB -1.446%

@jvarela-jump jvarela-jump merged commit d288db7 into jvarela/snapshot-incr-resolve Apr 6, 2026
17 checks passed
@jvarela-jump jvarela-jump deleted the jvarela/snapshot-full-resolve branch April 6, 2026 13:31
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.

2 participants