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

test(fuzz): test delay and deviations bounds #258

Merged
merged 4 commits into from
Sep 25, 2024

Conversation

smol-ninja
Copy link
Member

@smol-ninja smol-ninja commented Sep 22, 2024

A fuzz test on USDC to check that tolerance and delay are within bounds. Refer: Google sheet

To make sure that the deviation and delay are within acceptable bounds for realistic fuzzed values of rps, the following assertions have been added:

  1. $\text{actual total amount withdrawn} \le \text{desired total amount withdrawn}$, this guarantees no over streaming in any situation.
  2. $deviation <= 10^6$, this guarantees that over a sufficient period, the total deviation must never exceed $1.
  3. $delay <= 10\text{ seconds}$, this guarantees that over a sufficient period, the total delay must never exceed 10 seconds.

Realistic limits for RPS are used for the test. For values of RPS further lower than those specified in the test, the bounds may not be valid.

The test name has been chosen to be WithdrawMultiple_Delay_Fuzz_Test as it seems more appropriate i.e. testing delay in case of multiple withdrawals.

@smol-ninja smol-ninja force-pushed the test/fuzz-test-delay-tolerance branch 2 times, most recently from 0b1b035 to d4e206f Compare September 24, 2024 14:35
@smol-ninja
Copy link
Member Author

@andreivladbrg I have updated the OP. Can you please review this now? I'd recommend to go through the OP first to understand the motivation behind this test.

@smol-ninja smol-ninja changed the title test: fuzz test to check tolerance and delay test(fuzz): test delay and deviations bounds Sep 24, 2024
@smol-ninja smol-ninja force-pushed the test/fuzz-test-delay-tolerance branch from d4e206f to 341f59c Compare September 24, 2024 14:41
@smol-ninja smol-ninja force-pushed the test/fuzz-test-delay-tolerance branch from 341f59c to 5fa6731 Compare September 24, 2024 15:54
Copy link
Member

@andreivladbrg andreivladbrg left a comment

Choose a reason for hiding this comment

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

Generally looks good, I addressed my feedback on #262, lmk if you accept the changes.

Also, the file name has capital "W" letter, but it should be lower cases "w".

@smol-ninja
Copy link
Member Author

Thanks. Fixed the file name.

@smol-ninja smol-ninja merged commit 3d2602a into main Sep 25, 2024
8 checks passed
@smol-ninja smol-ninja deleted the test/fuzz-test-delay-tolerance branch September 25, 2024 07:34
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.

2 participants