DHT bootnodes: rate limit the discovery attempts instead of limiting max retry count#8792
DHT bootnodes: rate limit the discovery attempts instead of limiting max retry count#8792dmitry-markin merged 6 commits intomasterfrom
Conversation
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
lexnv
left a comment
There was a problem hiding this comment.
Looks good to me! Left a few minor thoughts on the process itself. Wondering if we could simplify a bit the state machine needed for retrying. However, that could be a followup 🙏
Im wondering if it would make sense to have an exponential timer similar to what we have in the substrate/discovery? Where we might go from 8s to 16s to 32s and cap it there? 🤔
I don't think we can simplify it, because currently the state machine boils down to:
On real networks the discovery takes 2-3 minutes, so 8s or 32s won't make a big difference, while introducing the complexity of an exponential timer. |
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
…max retry count (#8792) Instead of giving up after 5 discovery attempts, keep retrying with a delay of 30 seconds until the discovery succeeds. This fixes a DHT bootnodes zombinet test execution on CI where individual nodes may start with a significant delay. This will also help should there be temporary connectivity issues leading to 5 failures in a row. --------- Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
Instead of giving up after 5 discovery attempts, keep retrying with a delay of 30 seconds until the discovery succeeds.
This fixes a DHT bootnodes zombinet test execution on CI where individual nodes may start with a significant delay. This will also help should there be temporary connectivity issues leading to 5 failures in a row.