SIMD-0366: Enforce DATA_COMPLETE_SHRED Placement only on Last Data Shreds in FEC Sets#366
Closed
ksn6 wants to merge 5 commits into
Closed
Conversation
DATA_COMPLETE_SHRED Placement only on Last Data Shreds in FEC SetsDATA_COMPLETE_SHRED Placement only on Last Data Shreds in FEC Sets
AshwinSekar
reviewed
Sep 22, 2025
| 3. **Invalid Placement Handling**: If a validator detects | ||
| `DATA_COMPLETE_SHRED` as `true` on any data shred other than the last | ||
| one in an FEC set: | ||
| - The validator MUST mark the entire slot as dead |
Contributor
There was a problem hiding this comment.
I think it's easier to just drop the shred, we don't need to explicitly mark the block as dead - it will fail to replay anyway.
Contributor
Author
There was a problem hiding this comment.
True, although - wouldn't enforcing this condition allow us to skip a block with this specific type of bad shred faster?
Contributor
There was a problem hiding this comment.
Yeah that's fair, just harder to wire up in the implementation
Contributor
Author
|
Closing this PR, whose contents are largely moving to #337. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
This SIMD enforces that the
DATA_COMPLETE_SHREDflag can only be set on the final data shred within an FEC (Forward Error Correction) set. One key use-case for this SIMD: this restriction enables efficient detection of soon-to-be-introducedBlockComponents at shred ingestion time, providing performance improvements for critical consensus operations. The alternative to this SIMD would be to detectBlockComponents during replay, which would be substantially slower. One key example isUpdateParentdetection in Alpenglow's fast leader handover; detection during replay would not be ideal, as malicious leaders could intentionally misplaceDATA_COMPLETE_SHREDflags to force validators into expensive search operations, creating DoS attack vectors and delaying block repairs.Motivation
Currently, the
DATA_COMPLETE_SHREDflag can theoretically be set on any data shred within an FEC set, though in practice it marks FEC set boundaries. This ambiguity creates significant performance challenges:Expensive BlockComponent Detection: Without guaranteed placement, detecting
BlockComponents requires expensive searches across multiple shreds and FEC sets.Performance Impact: alternative
BlockComponentmethods require either complex inference algorithms or expensive replay operations.Security Vulnerabilities: Malicious leaders could intentionally misplace
DATA_COMPLETE_SHREDflags to force validators into expensive search operations, creating DoS attack vectors; for certain proposedBlockComponents (specifically,UpdateParent), malicious leaders could delay block repairs for following leaders.By enforcing
DATA_COMPLETE_SHREDplacement only on the last data shred in each FEC set, validators can efficiently detectBlockComponentboundaries during online shred ingestion.