celestiaorg / rsmt2d

Go implementation of two dimensional Reed-Solomon merkle tree data availability scheme.
Apache License 2.0
161 stars 79 forks source link

test: add randomized tests for errByzantine #312

Closed walldiss closed 5 months ago

walldiss commented 5 months ago

ErrByzantine encompasses numerous edge cases. To address this, I implemented randomized fuzzing tests, which identified instances where shares encoding was not properly verified.

While I am neutral about maintaining the pretty printing code (as it looks kinda off), I retained it because it proved extremely useful for understanding the reasons behind test failures during extensive debugging. Should these tests fail in the future for any reason, having a visual representation of the issues will expedite debugging for future developers.

Allowed to discover https://github.com/celestiaorg/rsmt2d/pull/313

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.03%. Comparing base (d6c118c) to head (893acb1). Report is 14 commits behind head on main.

:exclamation: Current head 893acb1 differs from pull request most recent head 61f82d1. Consider uploading reports for the commit 61f82d1 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #312 +/- ## ========================================== + Coverage 80.89% 84.03% +3.14% ========================================== Files 8 7 -1 Lines 869 614 -255 ========================================== - Hits 703 516 -187 + Misses 119 59 -60 + Partials 47 39 -8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.