forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removes trailing bytes before de-duplicating shreds (#4769)
For backward compatibility we need to allow trailing bytes in the packet after the shred payload. The extra bytes are truncated in Shred{Code,Data}::from_payload: https://github.com/anza-xyz/agave/blob/744482070/ledger/src/shred/merkle.rs#L513 https://github.com/anza-xyz/agave/blob/744482070/ledger/src/shred/merkle.rs#L574 but that happens late after shred deduper which might allow duplicate shreds to pass through. The commit updates shred::wire::get_shred{,_mut} to remove trailing bytes and excludes them from the deduper.
- Loading branch information
1 parent
3b213aa
commit a3be625
Showing
3 changed files
with
73 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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