Skip to content
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(blob/service): fix getByCommitment #2828

Merged
merged 7 commits into from
Oct 13, 2023

Conversation

vgonkivs
Copy link
Member

@vgonkivs vgonkivs commented Oct 9, 2023

Overview

Fixes #2808

Root cause: I did not check the entire row once the first blob was identified(and moved to the next row). So, in the end, we had a lot of unchecked blobs. Reworked logic now goes through the whole rawShares, until it is possible, constructing blobs and verifying them.

Checklist

  • 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

@vgonkivs vgonkivs added kind:fix Attached to bug-fixing PRs area:blob labels Oct 9, 2023
@vgonkivs vgonkivs self-assigned this Oct 9, 2023
@vgonkivs vgonkivs marked this pull request as ready for review October 10, 2023 11:10
@codecov-commenter
Copy link

codecov-commenter commented Oct 10, 2023

Codecov Report

Merging #2828 (192d0eb) into main (00b32a8) will decrease coverage by 0.19%.
Report is 7 commits behind head on main.
The diff coverage is 74.02%.

@@            Coverage Diff             @@
##             main    #2828      +/-   ##
==========================================
- Coverage   51.50%   51.32%   -0.19%     
==========================================
  Files         168      168              
  Lines       10764    10750      -14     
==========================================
- Hits         5544     5517      -27     
- Misses       4743     4752       +9     
- Partials      477      481       +4     
Files Coverage Δ
blob/helper.go 52.72% <66.66%> (-1.25%) ⬇️
blob/blob.go 65.93% <75.00%> (+3.24%) ⬆️
blob/service.go 71.25% <74.46%> (+3.01%) ⬆️

... and 14 files with indirect coverage changes

Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

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

I'm a bit confused around some naming in this PR

blob/blob.go Show resolved Hide resolved
blob/service.go Outdated Show resolved Hide resolved
blob/service.go Outdated Show resolved Hide resolved
blob/service.go Outdated Show resolved Hide resolved
blob/helper.go Show resolved Hide resolved
Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

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

The logic looked correct to me and I don't have any simplification in mind.
We should add a regression test for the fixed case.

blob/service.go Outdated Show resolved Hide resolved
blob/service.go Show resolved Hide resolved
blob/blob.go Show resolved Hide resolved
Wondertan
Wondertan previously approved these changes Oct 13, 2023
Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

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

Much much simpler and more readable then the initial solution. Well done

blob/service_test.go Show resolved Hide resolved
blob/service.go Outdated Show resolved Hide resolved
renaynay
renaynay previously approved these changes Oct 13, 2023
blob/service.go Outdated Show resolved Hide resolved
blob/service.go Outdated Show resolved Hide resolved
blob/service.go Outdated Show resolved Hide resolved
blob/service.go Outdated Show resolved Hide resolved
Co-authored-by: Hlib Kanunnikov <hlibwondertan@gmail.com>
@vgonkivs vgonkivs enabled auto-merge (squash) October 13, 2023 14:29
@vgonkivs vgonkivs merged commit 4f2a44b into celestiaorg:main Oct 13, 2023
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:blob kind:fix Attached to bug-fixing PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

blob not found by blob.Get, however it is listed in blob.GetAll
5 participants