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

add reconstruction from systematic chunks #36

Merged
merged 4 commits into from
Dec 20, 2023

Conversation

alindima
Copy link
Contributor

@alindima alindima commented Dec 19, 2023

No description provided.

@alindima alindima changed the title add recovery from systematic chunks add reconstruction from systematic chunks Dec 19, 2023
None
}
}) {
return Err(Error::InconsistentShardLengths { first: shard_len, other: length });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized this is being checked 3 times: here, in erasure-coding crate and in availability-recovery..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right, I'll move all checks here. I only see it being checked here and in erasure-coding crate. Where is it being checked in availability-recovery?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove checks from polkadot once this is merged and released. The only check that needs to remain in polkadot is for the even length of shards. This is needed because WrappedShard will panic if the length is not even and this function expects a WrappedShard.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is it being checked in availability-recovery?

I meant in your systematic recovery PR, but it will probably use this function instead, so nevermind.

The only check that needs to remain in polkadot is for the even length of shards. This is needed because WrappedShard will panic if the length is not even and this function expects a WrappedShard.

I see, thanks for the clarification.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant in your systematic recovery PR, but it will probably use this function instead, so nevermind.

Ah, yes, I'll switch my PR to use this function

reed-solomon-novelpoly/src/novel_poly_basis/mod.rs Outdated Show resolved Hide resolved
@ordian ordian merged commit be37510 into master Dec 20, 2023
9 checks passed
@ordian ordian deleted the alindima/systematic-recovery branch December 20, 2023 10:19
@burdges
Copy link
Contributor

burdges commented Dec 21, 2023

It worth noting somewhere that both this and the full decoding can return data with some extra zeros, but that they behave the same.

@burdges
Copy link
Contributor

burdges commented Dec 21, 2023

cc @drahnr

@alindima
Copy link
Contributor Author

It worth noting somewhere that both this and the full decoding can return data with some extra zeros, but that they behave the same.

I added that bit to the doc comments of the functions

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

Successfully merging this pull request may close these issues.

3 participants