-
Notifications
You must be signed in to change notification settings - Fork 286
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
fix: end exclusive parse namespace end share range #2208
fix: end exclusive parse namespace end share range #2208
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2208 +/- ##
=======================================
Coverage 24.86% 24.86%
=======================================
Files 127 127
Lines 14326 14326
=======================================
Hits 3562 3562
Misses 10397 10397
Partials 367 367
|
@@ -133,7 +133,7 @@ func ParseNamespace(rawShares []shares.Share, startShare, endShare int) (appns.N | |||
return appns.Namespace{}, fmt.Errorf("end share %d cannot be lower than starting share %d", endShare, startShare) | |||
} | |||
|
|||
if endShare >= len(rawShares) { | |||
if endShare > len(rawShares) { |
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.
[note to reviewers]
Since the share ranges are range exclusive, then they can be == len(shares)
. If not, then the last share will never be proved
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.
One blocking question
Co-authored-by: Rootul P <[email protected]>
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. --> ## Overview Fixes the range to support end exclusive share ranges ## Checklist <!-- Please complete the checklist to ensure that the PR is ready to be reviewed. IMPORTANT: PRs should be left in Draft until the below checklist is completed. --> - [ ] New and updated code has appropriate documentation - [ ] New and updated code has new and/or updated testing - [ ] Required CI checks are passing - [ ] Visual proof for any user facing features like CLI or documentation updates - [ ] Linked issues closed with keywords --------- Co-authored-by: Rootul P <[email protected]> (cherry picked from commit 0c55a6e) # Conflicts: # pkg/proof/proof_test.go
…3491) This is an automatic backport of pull request #2208 done by [Mergify](https://mergify.com). Motivated by this [Slack thread](https://celestia-team.slack.com/archives/C03MP6DPLAD/p1715891011859219). It seems like we forgot to backport this fix. cc: @rach-id --------- Co-authored-by: CHAMI Rachid <[email protected]> Co-authored-by: Rootul Patel <[email protected]>
Fixes the range to support end exclusive share ranges