-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Better dupe detection #13992
Better dupe detection #13992
Conversation
754f356 to
ffc90c7
Compare
Codecov Report
@@ Coverage Diff @@
## master #13992 +/- ##
========================================
Coverage 82.1% 82.1%
========================================
Files 381 381
Lines 93793 93930 +137
========================================
+ Hits 77020 77187 +167
+ Misses 16773 16743 -30 |
ledger/src/blockstore.rs
Outdated
| let mut conflicting_shred = None; | ||
| for coding_index in coding_start..coding_end { | ||
| if let Ok(Some(shred)) = self.get_coding_shred(slot, coding_index) { | ||
| conflicting_shred = Some(shred); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before we store the duplicate proof, should we add a sanity check here that this conflicting_shred has
- a different
num_data_shreds()ornum_coding_shredsthan the newly receivedshred - The same fec_set_index
ledger/src/blockstore.rs
Outdated
| }); | ||
|
|
||
| if erasure_config != erasure_meta.config { | ||
| let coding_start = erasure_meta.first_coding_index; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized that the erasure_config != erasure_meta.config check doesn't account for first_coding_index in ErasureMeta, maybe this: https://github.com/solana-labs/solana/pull/13992/files#diff-01b72272fd1033dcbb8fed13821a6232d35913119af6be20a7c2d1e9c772feb9R1037 should be an ErasureMeta so we can do a full equality check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, good catch
cb62622 to
b7c974a
Compare
(cherry picked from commit c5fe076)
(cherry picked from commit c5fe076) Co-authored-by: sakridge <[email protected]>
Problem
Duplicate shred cases ignored.
Summary of Changes
Set in duplicate column and ignore on voting.
Fixes #