-
Notifications
You must be signed in to change notification settings - Fork 1
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
Provide partial test suite for header validation #3
Provide partial test suite for header validation #3
Conversation
Consensus code PR: IntersectMBO/ouroboros-consensus#1285 |
Rebase on top of |
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.
Should be good to merge after rebasing. This is a good base to add additional tests for opcert mutations, etc on top of.
c3991fe
to
c219853
Compare
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.
Ensure we are using conventional commit messages.
* add JSON-formatted test vectors file, to be expanded to cover more edge cases as needed * add integration tests to check validation logic against those test cases * fix some minor issues in validation code following introduction of those tests
c219853
to
3f39398
Compare
@AndrewWestberg Can we merge this? It's been a while... |
This PR builds upon @AndrewWestberg's work on Praos headers validation, adding more tests in the form of JSON-formatted pairs of a context and a header, which may or may not be valid. A single test function loads the test vectors and iterates through the various headers, calling validation code and verifying the result. These tests increase code coverage from ~75% to ~95%.
In the course of writing these tests, I found a few minor issues I fixed in the validation code:
c
value (ran the benchmarks locally and did not notice any significant impact), because of first point abovepanic
from underflowThere's more work that needs to be done to cover more of the validation process, which I plan to add in another PR: