-
Notifications
You must be signed in to change notification settings - Fork 2
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
test: bound rps to realistic ranges #263
Conversation
Although I understand your rationale, I don’t agree with this change, as keeping the lower range for |
On the contrary, changing the rps to realistic range is leading us to new problems that we could not find otherwise. See the failing tests in the CI of this PR. The problem is that, 100,000 runs are insufficient given the wide range of RPS. If we want to keep lower range for RPS, then based on the above argument, we should have 1M runs. Wider the range, higher the runs. The only good argument in keeping low ranged rps is to check that no value of rps should lead to over streaming. Other than that, I dont see any value in using ranges of rps that can only stream $0.1 a year in terms of USDC. Thus I propose the following:
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Great idea @smol-ninja, I'm in favor as long as we're still testing the wide range in at least one or a few places. |
the idea of so, i would do it the other way around - withdrawMultiple test, small range, other fuzz/invariant tests, wide range |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Meanwhile, @andreivladbrg can you please respond to my comment? You haven't said why you refuse to agree with them. You mentioned that "keeping the lower range for rps might help us find other problems", to which I replied "The only good argument in keeping low ranged rps is to check that no value of rps should lead to over streaming". What other problems you think you can find with keeping lower range of rps? The reason tests were failing is the following:
So, as a fix, I adjusted bounds for deposit amount based on 2 years depletion period. Also, changed This is another good argument why realistic ranges are useful. Previously, in wide ranges, even though foundry could choose ultra low RPS and extremely high deposit, it could not because the range is so large that even millions of runs that we had run through CI could not detect it. Your concern that low RPS might be useful to find issues is valid. But I am saying the only issue we need to care about is over streaming and for that, I agree to include wide range RPS in such tests but for all other tests, I haven't seen an argument to why we should not choose realistic ranges. A perfect solution would be to run all the tests for various ranges of RPS similar to web2 software testing practices. However, I am not sure if foundry accept inputs from a separate file. That will also take a long time to run. In the long term, we should try to achieve that though. |
Given how tight the timeline is, I'd appreciate if we can take decision on this before the weekend. @PaulRBerg is in favour so @andreivladbrg I am just waiting for your comment / agreement / disagreement. |
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.
I believe it’s becoming one of those things that cause decision fatigue, so feel free to merge it
Let's merge and do this afterward: #272 |
Thank you. I believe its the right approach :)). And as I mentioned in my comment:
We can run the same tests suite for wide range of RPS in a much better way through the use of |
Continuing from this argument, I suggest we use the realistic ranges for RPS so that our fuzz and invariant tests can test the contract for tight realistic ranges rather than a wide ranges for RPS.
PS: the test fails that means our tests have some issues.