Repository navigation
Conversation
The corrector finds errors by checking the residue at the generator polynomial roots listed in `ROOT_EXPONENTS`. A nonzero residue means the string has an error. Some checksums have generator roots that fall outside `ROOT_EXPONENTS` range, which means that these nonzero residues (errors) are undetected by the corrector alone. The `bch_errors()` evaluator degree check is where that gets rejected. But if the check is done with `<=`, the input gets labled accepted carrying an error, so it will panic meanwhile our tests entirely missed it. To test that, we add a test with such a residue. It expects `None` from `bch_errors()` and panics if the check is `<=`.
Member
|
This is a neat test but I don't think it makes any sense. The |
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.
Close #333
Since #331, the test
regression_vector_7no longer catches a mutant<to<=on the evaluator degree check, because the full residue check rejects that vector either way.So the corrector finds errors by checking the residue at the generator polynomial roots listed in
ROOT_EXPONENTS. A nonzero residue means the string has an error. Some checksums have generator roots that fall outsideROOT_EXPONENTSrange, which means that these nonzero residues (errors) are undetected by the corrector alone because the corrector only check some of the roots.The
bch_errors()evaluator degree check is where that gets rejected. But if the check is done with<=, the input gets labled accepted carrying an error, soidx_err[0]panics meanwhile our tests entirely missed it.To test that, we add a test with such a residue. It expects
Nonefrombch_errors()and panics if the check is<=.NOTE: relied heavily on claude opus to understand the problem and the solution required. At least I learned a lot more about bech32, but please inspect it.