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

removes position field in coding-shred-header #17004

Merged
merged 1 commit into from
May 10, 2021

Conversation

behzadnouri
Copy link
Contributor

Problem

CodingShredHeader.position is equal to

ShredCommonHeader.index - ShredCommonHeader.fec_set_index

and is so redundant. The extra position field can add bugs if not
consistent with index and fec_set_index.

Summary of Changes

Removed position field in coding-shred-header.

CodingShredHeader.position is equal to
  ShredCommonHeader.index - ShredCommonHeader.fec_set_index
and is so redundant. The extra position field can add bugs if not
consistent with index and fec_set_index.
@codecov
Copy link

codecov bot commented May 3, 2021

Codecov Report

Merging #17004 (f1fd1fc) into master (40c31f8) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##           master   #17004   +/-   ##
=======================================
  Coverage    82.8%    82.8%           
=======================================
  Files         416      416           
  Lines      116948   116946    -2     
=======================================
+ Hits        96836    96838    +2     
+ Misses      20112    20108    -4     

@behzadnouri behzadnouri requested review from sakridge and carllin May 3, 2021 17:55
Copy link
Contributor

@carllin carllin left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@sakridge sakridge left a comment

Choose a reason for hiding this comment

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

lgtm, nice

@behzadnouri behzadnouri merged commit 81ad795 into solana-labs:master May 10, 2021
@behzadnouri behzadnouri deleted the rm-shred-position branch May 10, 2021 13:20
@carllin
Copy link
Contributor

carllin commented May 10, 2021

@mvines and @sakridge, fyi saw this nice reminder on compatibility for upgrade/downgrade for mainnet release + master: #17136 (comment) (which I did not account for in @steviez's review, sorry!), and double checked this PR would not break that assumption, specifically the downgrade path.

@behzadnouri and I discussed this critical change: https://solanalabs.slack.com/archives/D019TRTQMA7/p1620673230006800 and decided this change should be safe even for downgrade because the 3 places this change would be detected: #17004 (review), should become no-ops with position == 0

behzadnouri added a commit to behzadnouri/solana that referenced this pull request Dec 3, 2021
solana-labs#17004
removed position field from coding-shred-header because as it stands the
field is redundant and unused.
However, for upcoming changes to erasure coding schema we need this
field to be populated.
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Dec 3, 2021
solana-labs#17004
removed position field from coding-shred-header because as it stands the
field is redundant and unused.
However, for upcoming changes to erasure coding schema we need this
field to be populated.
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Dec 3, 2021
solana-labs#17004
removed position field from coding-shred-header because as it stands the
field is redundant and unused.
However, with upcoming changes to erasure coding schema this field will
no longer be redundant and needs to be populated.
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Dec 3, 2021
solana-labs#17004
removed position field from coding-shred-header because as it stands the
field is redundant and unused.
However, with the upcoming changes to erasure coding schema this field
will no longer be redundant and needs to be populated.
behzadnouri added a commit that referenced this pull request Dec 5, 2021
#17004
removed position field from coding-shred-header because as it stands the
field is redundant and unused.
However, with the upcoming changes to erasure coding schema this field
will no longer be redundant and needs to be populated.
mergify bot pushed a commit that referenced this pull request Dec 5, 2021
#17004
removed position field from coding-shred-header because as it stands the
field is redundant and unused.
However, with the upcoming changes to erasure coding schema this field
will no longer be redundant and needs to be populated.

(cherry picked from commit cd17f63)

# Conflicts:
#	core/src/window_service.rs
#	ledger/src/blockstore.rs
#	ledger/src/shred.rs
mergify bot pushed a commit that referenced this pull request Dec 5, 2021
#17004
removed position field from coding-shred-header because as it stands the
field is redundant and unused.
However, with the upcoming changes to erasure coding schema this field
will no longer be redundant and needs to be populated.

(cherry picked from commit cd17f63)
mergify bot added a commit that referenced this pull request Dec 5, 2021
#17004
removed position field from coding-shred-header because as it stands the
field is redundant and unused.
However, with the upcoming changes to erasure coding schema this field
will no longer be redundant and needs to be populated.

(cherry picked from commit cd17f63)

Co-authored-by: behzad nouri <[email protected]>
mergify bot added a commit that referenced this pull request Dec 5, 2021
…1619)

* adds back position field to coding-shred-header (#21600)

#17004
removed position field from coding-shred-header because as it stands the
field is redundant and unused.
However, with the upcoming changes to erasure coding schema this field
will no longer be redundant and needs to be populated.

(cherry picked from commit cd17f63)

# Conflicts:
#	core/src/window_service.rs
#	ledger/src/blockstore.rs
#	ledger/src/shred.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <[email protected]>
jbiseda pushed a commit to jbiseda/solana that referenced this pull request Dec 6, 2021
solana-labs#17004
removed position field from coding-shred-header because as it stands the
field is redundant and unused.
However, with the upcoming changes to erasure coding schema this field
will no longer be redundant and needs to be populated.
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.

3 participants