Skip to content

Commit

Permalink
chore(ipld): remove outdated todo after rsmt2d update
Browse files Browse the repository at this point in the history
  • Loading branch information
Wondertan committed Apr 26, 2022
1 parent 5de6b48 commit bd8cb4e
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions ipld/retriever.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package ipld

import (
"bytes"
"context"
"math/rand"
"time"
Expand Down Expand Up @@ -122,16 +121,6 @@ func (rs *retrieverSession) retrieve(ctx context.Context, q *quadrant) (*rsmt2d.
// try repair
err := rsmt2d.RepairExtendedDataSquare(rs.dah.RowsRoots, rs.dah.ColumnRoots, rs.square, rs.codec, rs.treeFn)
if err != nil {

// TODO(@Wondertan): This is a hack around limitation of rsmt2d. It sets empty zeroed shares back to nil
// reversing operation done inside rsmt2d
fillerChunk := bytes.Repeat([]byte{0}, 264)
for i, share := range rs.square {
if bytes.Equal(share, fillerChunk) {
rs.square[i] = nil
}
}

log.Errorw("not enough shares sampled to recover, retrying...", "err", err)
return nil, format.ErrNotFound
}
Expand Down

0 comments on commit bd8cb4e

Please sign in to comment.