-
Notifications
You must be signed in to change notification settings - Fork 1k
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
kademlia: Records republication exceeds inbound stream limit #3236
Comments
Thanks for the detailed write-up. The above is correct and worth fixing. As a first step I suggest limiting the Long term, I would like for the |
Also referencing #3078 here for the "long term" solution. |
Expanding on the above two steps:
Long term this would lead to a third step:
|
This can still lead to inbound streams being dropped on receiver unless we implement stream reuse as well IIRC. |
Yes, receivers might still drop inbound streams due to reaching the magic number 32, given that operations across streams are not ordered. E.g. the following could happen:
In my eyes we should test whether this happens often in the wild and whether it thus needs a fix (like stream reuse). |
Okay, I'll start with outbound buffering and we'll go from there. |
Second attempt from #3287 seems to work fine from my limited testing with our testnet so far. |
Limit number of active outbound streams to not exceed configured number of streams. Resolves #3236.
Summary
We have a feature in Kademlia for provider records republication which is controlled by
provider_publication_interval
configuration parameter.However, if we have multiple provider records (several hundred) that should be republished we could experience "inbound stream issues" because Kademlia has a hard-coded limit (
MAX_NUM_INBOUND_SUBSTREAMS = 32)
.Some of the messages relate to "reusing of the inbound streams" and seem OK. Other relate to dropped streams.
Currently, we don't have means to limit rates of the "republication" requests because it's a built-in protocol feature. Am I wrong here?
Expected behaviour
I expect an internal Kademlia process to work within Kademlia's limits or have a setting to control its rate.
Actual behaviour
Peers exceed other peers` inbound stream limits and produce warnings and actually drop republication messages.
Debug Output
Possible Solution
Version
v0.50.0
Would you like to work on fixing this bug?
No
The text was updated successfully, but these errors were encountered: