-
Notifications
You must be signed in to change notification settings - Fork 6
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
Conversation
None | ||
} | ||
}) { | ||
return Err(Error::InconsistentShardLengths { first: shard_len, other: length }); |
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 just realized this is being checked 3 times: here, in erasure-coding crate and in availability-recovery..
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.
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?
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'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.
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.
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.
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 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
It worth noting somewhere that both this and the full decoding can return data with some extra zeros, but that they behave the same. |
cc @drahnr |
I added that bit to the doc comments of the functions |
No description provided.