Skip to content
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

Improve modpow test generation #438

Merged
merged 3 commits into from
Jul 29, 2024
Merged

Improve modpow test generation #438

merged 3 commits into from
Jul 29, 2024

Conversation

Rigidity
Copy link
Contributor

Moves the modpow and % test generation into a Rust script rather than Python. I intend to move the other tests to Rust later as well.

This also improves the test coverage by including negative bases and moduli. Exponents remain positive (since it fails otherwise) and moduli must be non-zero to prevent division by zero.

Also varies the length of the bytes, as well as including more tests than previously.

Copy link

coveralls-official bot commented Jul 12, 2024

Pull Request Test Coverage Report for Build 9929366249

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.152%

Totals Coverage Status
Change from base Build 9895604796: 0.0%
Covered Lines: 5828
Relevant Lines: 6190

💛 - Coveralls

Copy link
Contributor

@arvidn arvidn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, just a few minor comments

tools/src/bin/generate-modpow-tests.rs Show resolved Hide resolved
tools/src/bin/generate-modpow-tests.rs Outdated Show resolved Hide resolved
tools/src/bin/generate-modpow-tests.rs Outdated Show resolved Hide resolved
@Rigidity Rigidity requested a review from arvidn July 14, 2024 16:49
Copy link
Contributor

@arvidn arvidn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you verify that the output is deterministic?

@Rigidity
Copy link
Contributor Author

It is

@Rigidity Rigidity merged commit 0f7a7a2 into main Jul 29, 2024
28 checks passed
@Rigidity Rigidity deleted the test-modpow-rust branch July 29, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants