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

Discussion: should codecs explain the type of data they support while decoding #150

Open
rootulp opened this issue Mar 9, 2023 · 2 comments
Labels
question Further information is requested

Comments

@rootulp
Copy link
Collaborator

rootulp commented Mar 9, 2023

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:

  1. Should the codecs document this behavior?
  2. How can Celestia use Leopard if shares are corrupted? Is there a mechanism to ignore corrupted shares?
@rootulp rootulp added the question Further information is requested label Mar 9, 2023
@evan-forbes
Copy link
Member

what does corrupted mean in this scenario?

@rootulp
Copy link
Collaborator Author

rootulp commented Mar 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants