-
Notifications
You must be signed in to change notification settings - Fork 108
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
feat: outbound cctx scheduling with rate limiter #2045
Conversation
!!!WARNING!!! Be very careful about using Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203 Pay extra attention to the way |
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.
Just wondering, do we stop listing to pending cctxs outside of the window boundaries? What happen if a cctx is left behind the left boundary?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2045 +/- ##
===========================================
- Coverage 71.32% 70.70% -0.62%
===========================================
Files 251 252 +1
Lines 13868 14052 +184
===========================================
+ Hits 9891 9936 +45
- Misses 3517 3656 +139
Partials 460 460
|
…t-withdraw-rate-limit
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.
Went over the main logic of the new RPC call that lists pending cctx with rate limiter, the logic looks good to me. Have not checked the arithmetic in the conversion and accumulation.
Would be nice to be able to test against mainnet state in some way. Since this is read only RPC, maybe try a slightly mocked RPC and connect to mainnet node and do the query as sanity check. |
When looping backwards, the query picks up pending cctx in the range |
Description
CctxListPendingWithinRateLimit
new gRPC query for zetaclient to use for rate limiting purpose.Closes: 2040
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Include instructions and any relevant details so others can reproduce.
Checklist: