-
Notifications
You must be signed in to change notification settings - Fork 138
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
Integration test for slash packet throttling #509
Comments
I'm looking into this. Have in mind that adding a new test run will probably make the integration tests run for about 20 mins. Double signing was done in a separate test run, it took forever to finish so I merged it into the happy path. |
Can you please specify how the slash meter would come into play? We could cause downtime for 3/4 of the validators pretty easily using existing actions. Would that work? |
Appreciate you looking into this! The new steps could probably be a part of the existing happy path steps, that's fine with me. The slash throttling would come into play when more than one consumer-initiated slash occurs (two downtime actions on the consumer). The current set of steps only invokes one consumer initiated slash, which is always allowed by the slash throttling. The second consumer initiated slash will only be handled on the provider once the You can tweak the mentioned provider params to properly test throttling, and that the second slash packet is eventually handled once enough time elapses. Lmk if I can make any of that more clear over a call! The description of #462 could help out with general understanding of the feature as well. |
I would suggest that we try to use integration tests as much as possible to test things which cannot be tested any other way. I feel that the throttle can be tested very well with unit/e2e/diff tests so we should focus on those and not try to write integration tests for it. What do you guys think? |
I think that a very simple integration test (and nothing more) for slash packet throttling would be useful as a sanity check. The test would look like this:
|
integration tests are useful for things which cannot be tested any other way as Dan has mentioned. But imo they're also useful just as a sanity check that the real system works. Any in-mem test will always be limited to some extent |
Integration tests are the only way that you know that things actually work and you're not just testing some part of your test framework. |
Problem
#462 passes the currently written integration tests, since only one validator is ever slashed from a consumer in existing steps (ie. no throttling happens). In order to get 462 out quickly, I'm gonna skip writing a specialized set of steps for validating the throttling logic. This test can be added in a separate PR.
Closing criteria
Implement a specialized set of integration test steps that validate slash packet throttling logic.
Problem details
I tried quickly implementing the integration test myself, but ran into this error. I can come back to this issue later to debug
Note: the two useful genesis changes you'll need to make to implement a slash packet throttling integration test is:
TODOs
The text was updated successfully, but these errors were encountered: