-
Notifications
You must be signed in to change notification settings - Fork 487
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
network: fix outgoing HTTP rate limiting #6118
network: fix outgoing HTTP rate limiting #6118
Conversation
4bffd2e
to
8cec779
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6118 +/- ##
=======================================
Coverage 56.20% 56.21%
=======================================
Files 492 494 +2
Lines 69829 69899 +70
=======================================
+ Hits 39248 39291 +43
- Misses 27915 27941 +26
- Partials 2666 2667 +1 ☔ View full report in Codecov by Sentry. |
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.
Asked a few questions, mostly looks good.
Summary
While working on rate limiting functionality for libp2p HTTP clients in #5939 the existing WS net functionality was broken and never caught. This PR restores the functionality by making the
RateLimitingTransport
RateLimitingBoundTransport
- i.e. requiring and enforcing the target peer address (either host:port or peerID). This makes sense since HTTP clients constructed as part ofwsPeerCore
are intended to be used against only this peer. This also means there is no sharedwn.transport
andRateLimitingBoundTransport
objectare constructed on demand for http clients.Fixes #6117
Test Plan
RoundTrip
andGetHTTPClient
unit tests