Skip to content

Remove unsupported archive formats when archiving#6321

Merged
brooksprumo merged 1 commit intoanza-xyz:masterfrom
brooksprumo:snap/remove-archive-formats/create
May 27, 2025
Merged

Remove unsupported archive formats when archiving#6321
brooksprumo merged 1 commit intoanza-xyz:masterfrom
brooksprumo:snap/remove-archive-formats/create

Conversation

@brooksprumo
Copy link
Copy Markdown

Problem

As of v1.18 (solana-labs#33484), TarZstd and TarLz4 are the only valid snapshot archive formats when creating new snapshots (we still allow loading any format though). It is now safe to remove the code that creates archives in the unsupported formats.

Summary of Changes

Only allow TarZstd and TarLz4 when creating a snapshot archive.

@brooksprumo brooksprumo self-assigned this May 27, 2025
@brooksprumo brooksprumo marked this pull request as ready for review May 27, 2025 16:02
@brooksprumo brooksprumo requested review from HaoranYi and roryharr May 27, 2025 16:02
Copy link
Copy Markdown

@HaoranYi HaoranYi left a comment

Choose a reason for hiding this comment

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

lgtm.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.7%. Comparing base (1bfc6ec) to head (e9fb4c2).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6321   +/-   ##
=======================================
  Coverage    82.7%    82.7%           
=======================================
  Files         845      845           
  Lines      377747   377739    -8     
=======================================
+ Hits       312722   312733   +11     
+ Misses      65025    65006   -19     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@brooksprumo brooksprumo merged commit 2b9dbfe into anza-xyz:master May 27, 2025
47 checks passed
@brooksprumo brooksprumo deleted the snap/remove-archive-formats/create branch May 27, 2025 16:46
@roryharr
Copy link
Copy Markdown

roryharr commented May 28, 2025

Can a snapshot from pre 1.18 still be loaded? Isn't that beyond what we support in general with regards to compatibility?

What I'm getting at, is maybe it's time to cleanup the load path as well and remove some crate dependencies

@brooksprumo
Copy link
Copy Markdown
Author

Can a snapshot from pre 1.18 still be loaded? Isn't that beyond what we support in general with regards to compatibility?

A snapshot from before v1.18 can be loaded, yes, but would it be usable to process transactions with a ledger from back then? Probably not. You'd end up with different block hashes due to feature gate code, which likely breaks any historical replay goals. However, if someone just wants to open a snapshot and inspect the contents, that would still work. In these cases, we do recommend opening snapshots with the version that created them.

What I'm getting at, is maybe it's time to cleanup the load path as well and remove some crate dependencies

Yes, that's the plan! I think in v3.0 it is fair game to only have zstd and lz4 and rip out all the rest. This PR was an iterative approach to say/show we can only create snapshot archives with zstd/lz4 (beyond just preventing other archive formats on the cli).

mircea-c pushed a commit to mircea-c/agave that referenced this pull request Jun 12, 2025
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.

4 participants