test(grey-erasure): add multi-corruption and bit-flip proptests#821
Open
wangzishuai1987 wants to merge 2 commits into
Open
test(grey-erasure): add multi-corruption and bit-flip proptests#821wangzishuai1987 wants to merge 2 commits into
wangzishuai1987 wants to merge 2 commits into
Conversation
Add two new proptest cases for erasure coding: 1. recovery_after_multi_corruption: corrupt up to recovery_shards chunks and verify recovery still works from the remaining data_shards. For TINY (2:6), this means losing up to 3 chunks out of 6. 2. corrupted_chunk_produces_wrong_recovery: flip bits in a data shard and verify the recovered data differs from the original, proving that corrupted data shards are not silently accepted. Ref: jarchain#229
Contributor
Genesis ReviewComparison targets:
How to reviewPost a comment with the following format (rank from best to worst): Use the short commit hashes above and To meta-review another reviewer's comment, react with 👍 or 👎. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
recovery_after_multi_corruptionproptest: corrupt up torecovery_shards - 1chunks and verify recovery still works from the remainingdata_shardschunkscorrupted_chunk_produces_wrong_recoveryproptest: flip bits in a data shard and verify the recovered data differs from the original, proving corrupted data shards are not silently acceptedContext
Addresses two items from #229 (Property-based testing and fuzzing infrastructure):
The existing
recovery_after_single_corruptiontest only drops one chunk. These new tests cover the multi-chunk corruption case and verify that the RS decoder doesn't silently accept corrupted input.Test plan
cargo test -p grey-erasure— all existing + new tests pass