This repository was archived by the owner on Jan 22, 2025. It is now read-only.
patches bug where the 1st coding shred is not inserted into blockstore#25916
Merged
behzadnouri merged 1 commit intosolana-labs:masterfrom Jun 16, 2022
Merged
patches bug where the 1st coding shred is not inserted into blockstore#25916behzadnouri merged 1 commit intosolana-labs:masterfrom
behzadnouri merged 1 commit intosolana-labs:masterfrom
Conversation
StandardBroadcastRun::insert skips 1st shred with index zero because the 1st *data* shred is inserted synchronously: https://github.com/solana-labs/solana/blob/53695ecd2/core/src/broadcast_stage/standard_broadcast_run.rs#L239-L246 https://github.com/solana-labs/solana/blob/53695ecd2/core/src/broadcast_stage/standard_broadcast_run.rs#L334-L339 solana-labs#7481 which added this code was not inserting coding shreds into blockstore. Starting with solana-labs#8899 coding shreds are inserted into blockstore as well as data shreds, but the insert logic erroneously skips first coding shred because it does not check if shred is code or data.
carllin
reviewed
Jun 16, 2022
| } else { | ||
| shreds.to_vec() | ||
| }; | ||
| let mut shreds = Arc::try_unwrap(shreds).unwrap_or_else(|shreds| (*shreds).clone()); |
Contributor
There was a problem hiding this comment.
sneaky little try_unwrap() optimization here 😃 . Should only work if the broadcast finishes with its version of these shreds before we insert here.
carllin
approved these changes
Jun 16, 2022
mergify Bot
pushed a commit
that referenced
this pull request
Jun 16, 2022
#25916) StandardBroadcastRun::insert skips 1st shred with index zero because the 1st *data* shred is inserted synchronously: https://github.com/solana-labs/solana/blob/53695ecd2/core/src/broadcast_stage/standard_broadcast_run.rs#L239-L246 https://github.com/solana-labs/solana/blob/53695ecd2/core/src/broadcast_stage/standard_broadcast_run.rs#L334-L339 #7481 which added this code was not inserting coding shreds into blockstore. Starting with #8899 coding shreds are inserted into blockstore as well as data shreds, but the insert logic erroneously skips first coding shred because it does not check if shred is code or data. (cherry picked from commit eacb918)
mergify Bot
pushed a commit
that referenced
this pull request
Jun 16, 2022
#25916) StandardBroadcastRun::insert skips 1st shred with index zero because the 1st *data* shred is inserted synchronously: https://github.com/solana-labs/solana/blob/53695ecd2/core/src/broadcast_stage/standard_broadcast_run.rs#L239-L246 https://github.com/solana-labs/solana/blob/53695ecd2/core/src/broadcast_stage/standard_broadcast_run.rs#L334-L339 #7481 which added this code was not inserting coding shreds into blockstore. Starting with #8899 coding shreds are inserted into blockstore as well as data shreds, but the insert logic erroneously skips first coding shred because it does not check if shred is code or data. (cherry picked from commit eacb918)
mergify Bot
added a commit
that referenced
this pull request
Jun 16, 2022
#25916) (#26005) StandardBroadcastRun::insert skips 1st shred with index zero because the 1st *data* shred is inserted synchronously: https://github.com/solana-labs/solana/blob/53695ecd2/core/src/broadcast_stage/standard_broadcast_run.rs#L239-L246 https://github.com/solana-labs/solana/blob/53695ecd2/core/src/broadcast_stage/standard_broadcast_run.rs#L334-L339 #7481 which added this code was not inserting coding shreds into blockstore. Starting with #8899 coding shreds are inserted into blockstore as well as data shreds, but the insert logic erroneously skips first coding shred because it does not check if shred is code or data. (cherry picked from commit eacb918) Co-authored-by: behzad nouri <behzadnouri@gmail.com>
mergify Bot
added a commit
that referenced
this pull request
Jun 16, 2022
#25916) (#26006) StandardBroadcastRun::insert skips 1st shred with index zero because the 1st *data* shred is inserted synchronously: https://github.com/solana-labs/solana/blob/53695ecd2/core/src/broadcast_stage/standard_broadcast_run.rs#L239-L246 https://github.com/solana-labs/solana/blob/53695ecd2/core/src/broadcast_stage/standard_broadcast_run.rs#L334-L339 #7481 which added this code was not inserting coding shreds into blockstore. Starting with #8899 coding shreds are inserted into blockstore as well as data shreds, but the insert logic erroneously skips first coding shred because it does not check if shred is code or data. (cherry picked from commit eacb918) Co-authored-by: behzad nouri <behzadnouri@gmail.com>
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.
Problem
StandardBroadcastRun::insertskips 1st shred with index zero becausethe 1st data shred is inserted synchronously:
https://github.com/solana-labs/solana/blob/53695ecd2/core/src/broadcast_stage/standard_broadcast_run.rs#L239-L246
https://github.com/solana-labs/solana/blob/53695ecd2/core/src/broadcast_stage/standard_broadcast_run.rs#L334-L339
#7481
which added this code was not inserting coding shreds into blockstore.
Starting with
#8899
coding shreds are inserted into blockstore as well as data shreds, but
the insert logic erroneously skips first coding shred because it does
not check if shred is code or data.
Summary of Changes