shred: reject the block when slot entries fail to deserialize#545
Merged
mjain-jump merged 1 commit intoJun 10, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates shred parsing to treat blockstore entry retrieval errors as a rejection instead of silently defaulting to empty entries.
Changes:
- Replaces
unwrap_orfallback with explicitmatchonget_slot_entries_with_shred_info - Sets
effects.block_parse_resulttoRejectedInvalidHeaderwhen an error occurs and continues processing remaining slots
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+255
to
+262
| let (entries, _num_shreds, is_full) = | ||
| match blockstore.get_slot_entries_with_shred_info(slot, 0, false) { | ||
| Ok(slot_entries) => slot_entries, | ||
| Err(_) => { | ||
| effects.block_parse_result = BlockParseResult::RejectedInvalidHeader as i32; | ||
| continue; | ||
| } | ||
| }; |
Comment on lines
+258
to
+261
| Err(_) => { | ||
| effects.block_parse_result = BlockParseResult::RejectedInvalidHeader as i32; | ||
| continue; | ||
| } |
mjain-jump
approved these changes
Jun 10, 2026
89e0646
into
firedancer-io:agave-v4.1.0-beta.3
4 checks passed
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.
No description provided.