-
Notifications
You must be signed in to change notification settings - Fork 971
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
shares|ipld: Rework data retrieval #623
Conversation
0162aab
to
ffe9940
Compare
The test failure is #608 |
https://github.com/celestiaorg/rsmt2d/releases/tag/v0.4.0 is now released, which should be able to handle multiple repairs on the same square by representing missing shares as |
f802f6e
to
b4536c8
Compare
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.
Left some smaller comments. will try to properly review soon.
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.
Looks really good. Just a few questions and minor things. Hope we can merge this soon.
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.
Can we maybe add some debug
or trace
level logs in retriever.go?
Codecov Report
@@ Coverage Diff @@
## main #623 +/- ##
==========================================
- Coverage 61.70% 61.54% -0.16%
==========================================
Files 93 96 +3
Lines 4969 5024 +55
==========================================
+ Hits 3066 3092 +26
- Misses 1581 1606 +25
- Partials 322 326 +4
Continue to review full report at Codecov.
|
7845ba9
to
371efc2
Compare
I updated the branch with randomization and retries over columns. Better be done within this PR. Tests are still failing due to known issue. |
aada434
to
0401ab6
Compare
* Use ipld.Retriever for FullAvailability and GetShares in the Service * Increase AvailabilityTimeout * Defined global DefaultCodec and use it where possible
* Extract quadrant type and constructor into a separate file * Increase context timeout to fix ci * Rework share index calcularion and extract it into quadrant method
Co-authored-by: rene <[email protected]>
0401ab6
to
02d2dfa
Compare
Rebased on main |
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.
looks good - waiting for subsequent test PR
you can resolve my open comments.
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.
👏🏼
What and Why
This PR comes from the requirement to make tests in #598 pass deterministically by reimplementing the original goal of #517. At first, I implemented the goal by simply updating the current code without reworking it. Unfortunately, that didn't work well, and there was a bug that made me stuck for a few days. After extensive multiday debugging, I cleaned up and reworked the existing implementation of RetrieveData in studying the code for the bug. The rework landed into a new
ipld.Retriever
component, which now not just requests the data via sampling quadrants but also retries for other quadrants.Eventually, the bug was about rsmt2d not being suitable for recovering over the same data square multiple times, as it sets nil shares to zeroed shares to the given flattened square slice(it actually updates the given slice in place after all!).
I will report and link here the issue soon with the suggested fix.The issue celestiaorg/rsmt2d#72. Unless it is fixed, this PR has a workaround with the TODO on it.TODO
Closes #509
Closes #508
Closes #516 ,
Partially closes #604
Note: @vgonkivs was informed about the new implementation of RetrieveData