-
Notifications
You must be signed in to change notification settings - Fork 919
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!(share/byzantine): use any available axis for befp nmt proofs construction #3306
fix!(share/byzantine): use any available axis for befp nmt proofs construction #3306
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3306 +/- ##
==========================================
+ Coverage 44.83% 45.01% +0.17%
==========================================
Files 265 272 +7
Lines 14620 15162 +542
==========================================
+ Hits 6555 6825 +270
- Misses 7313 7569 +256
- Partials 752 768 +16 ☔ View full report in Codecov by Sentry. |
Needs review from the author - @vgonkivs |
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.
Great find, seriously. It should have become obvious to us after we realized that the server is responsible for selecting the proof when we sample and it did become👍🏻
|
I had to remove concurrent fetching of ShareWithProof code to resolve flakiness of unit tests. Also looks much simpler now. Performance downside is not important, as we collect shares from disk and it is still fast enough being sequential instead of concurrent. |
switch axisType { | ||
case rsmt2d.Row: | ||
rootHash = rootHashForCoordinates(dah, s.Axis, shrIdx, axisIdx) | ||
case rsmt2d.Col: | ||
rootHash = rootHashForCoordinates(dah, s.Axis, axisIdx, shrIdx) |
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.
I'm evaluating your changes to port them into Rust's celestia-types
.
Correct me if I'm wrong but isn't this the same as the following?
switch s.Axis {
case rsmt2d.Row:
rootHash = dah.RowRoots[axisIdx]
case rsmt2d.Col:
rootHash = dah.ColumnRoots[axisIdx]
We should not restrict the BEFP constructor to collect proof only for orthogonal axes to ErrByzantine. This PR enables the constructor to attempt building both Row and Col proofs, irrespective of the ErrByzantine axis type. Additionally, it prevents the BEFP constructor from requesting proofs pr shars from the network by granting access exclusively to the local blockstore. There should be sufficient proofs and shares in the local blockstore at the time BEFP is detected.
Breaks befp message, by introducing proofAxis field, which is not supported by older befp subscribers.
Depends on