Supports deserializing block id in snapshots#9644
Merged
brooksprumo merged 1 commit intoanza-xyz:masterfrom Jan 15, 2026
Merged
Supports deserializing block id in snapshots#9644brooksprumo merged 1 commit intoanza-xyz:masterfrom
brooksprumo merged 1 commit intoanza-xyz:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9644 +/- ##
=========================================
- Coverage 82.5% 82.5% -0.1%
=========================================
Files 901 901
Lines 323411 323411
=========================================
- Hits 267096 267075 -21
- Misses 56315 56336 +21 🚀 New features to boost your workflow:
|
AshwinSekar
approved these changes
Jan 15, 2026
roryharr
reviewed
Jan 15, 2026
| /// This code is not truly dead though, as it enables newer versions to | ||
| /// populate this field and have older versions still load the snapshot. | ||
| #[allow(dead_code)] | ||
| #[serde(deserialize_with = "default_on_eof")] |
There was a problem hiding this comment.
I assume this default_on_eof makes things compatible if the block_id is not present?
Author
There was a problem hiding this comment.
Yep, exactly! I'll add some more info to the PR description with additional testing I've done.
roryharr
approved these changes
Jan 15, 2026
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.
Problem
For SIMD 3331, the block id will be serialized to/deserialized from snapshots. In order to maintain snapshot compatibility between adjacent versions (edge <-> beta, and beta <-> stable), we must be able to deserialize (and ignore) the new field in adjacent versions before we serialize the new field into the snapshot.
Summary of Changes
Add support for deserializing the block id in snapshots.
Note, if the implementation of SIMD 333 is intended for v4.0, then this PR will need to be backported to v3.1.
Additional Testing
Footnotes
https://github.com/solana-foundation/solana-improvement-documents/blob/main/proposals/0333-snapshot-include-block-id.md ↩