Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Conversation

@sakridge
Copy link
Contributor

@sakridge sakridge commented Dec 7, 2020

Problem

Duplicate shred cases ignored.

Summary of Changes

Set in duplicate column and ignore on voting.

Fixes #

@sakridge sakridge force-pushed the shred-dupe branch 4 times, most recently from 754f356 to ffc90c7 Compare December 8, 2020 00:32
@codecov
Copy link

codecov bot commented Dec 8, 2020

Codecov Report

Merging #13992 (5b29abb) into master (28b014c) will increase coverage by 0.0%.
The diff coverage is 89.4%.

@@           Coverage Diff            @@
##           master   #13992    +/-   ##
========================================
  Coverage    82.1%    82.1%            
========================================
  Files         381      381            
  Lines       93793    93930   +137     
========================================
+ Hits        77020    77187   +167     
+ Misses      16773    16743    -30     

@sakridge sakridge marked this pull request as ready for review December 8, 2020 17:04
@sakridge sakridge requested a review from carllin December 8, 2020 17:19
@sakridge sakridge added the v1.4 label Dec 8, 2020
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);
Copy link
Contributor

@carllin carllin Dec 8, 2020

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

  1. a different num_data_shreds() or num_coding_shreds than the newly received shred
  2. The same fec_set_index

});

if erasure_config != erasure_meta.config {
let coding_start = erasure_meta.first_coding_index;
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, good catch

@sakridge sakridge force-pushed the shred-dupe branch 7 times, most recently from cb62622 to b7c974a Compare December 9, 2020 21:12
@sakridge sakridge merged commit c5fe076 into solana-labs:master Dec 10, 2020
@sakridge sakridge deleted the shred-dupe branch December 10, 2020 07:14
mergify bot pushed a commit that referenced this pull request Dec 10, 2020
(cherry picked from commit c5fe076)
mergify bot added a commit that referenced this pull request Dec 10, 2020
(cherry picked from commit c5fe076)

Co-authored-by: sakridge <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants