-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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_shreds
than the newly receivedshred
- The same fec_set_index
ledger/src/blockstore.rs
Outdated
@@ -1051,6 +1051,26 @@ impl Blockstore { | |||
}); | |||
|
|||
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 #