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

Threshold check #229

Merged
merged 5 commits into from
May 6, 2024
Merged

Threshold check #229

merged 5 commits into from
May 6, 2024

Conversation

0x2me
Copy link
Contributor

@0x2me 0x2me commented May 4, 2024

Fixes #200

I've implemented the changes requested in this PR. However, I'm encountering a failure during the build due to fuzz tests on unchanged code. The issue is only occurring within the GitHub Actions workflow but test runs fine locally. So possibly due to foundry versions.

Error Details:

Reason: The vm.assume cheatcode rejected too many inputs (65536 allowed)] testFuzz_Rshift(uint256, uint256) (runs: 7354, μ: 4038, ~: 4038)

It seems that the fuzz test is reaching the maximum input rejection threshold.

To get the tests to pass I increased max_test_rejects to 100_000 Foundry documentation. The default is 65_536

Do you have any other suggestions?

0x2me and others added 4 commits May 2, 2024 15:13
docs: improve writing
refactor: change order of checks
style: fix formatting issues
test: order by value
test: use MIN_SD59x18
@PaulRBerg PaulRBerg marked this pull request as ready for review May 6, 2024 14:36
@PaulRBerg
Copy link
Owner

Looks great now! Thanks very much for your contribution.

Happy to increase the input rejection threshold to 100k.

I will include this fix in the next release (v4.0.3)

@PaulRBerg PaulRBerg merged commit cceb7f6 into PaulRBerg:main May 6, 2024
3 checks passed
@0x2me
Copy link
Contributor Author

0x2me commented May 6, 2024

Happy to contribute and thanks for the help

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.

SD59x18.exp reverts on hugely negative numbers
2 participants