rsmt2d
rsmt2d copied to clipboard
Discussion: should codecs explain the type of data they support while decoding
Context
It looks like infectious supports decoding data where some shards have been corrupted. On the other hand, klauspost/reedsolomon leopard does not support decoding shards that have been corrupted ref1, ref2.
Questions:
- Should the codecs document this behavior?
- How can Celestia use Leopard if shares are corrupted? Is there a mechanism to ignore corrupted shares?
what does corrupted mean in this scenario?
From Infectious README
...
// Let's reconstitute with two pieces missing and one piece corrupted.
shares = shares[2:] // drop the first two pieces
shares[2].Data[1] = '!' // mutate some data
result, err := f.Decode(nil, shares)
if err != nil {
panic(err)
}
For example a corrupted share may have one bit flipped from the original share that came from the Encode process.