-
Notifications
You must be signed in to change notification settings - Fork 629
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
adjust state sync timeouts #12425
adjust state sync timeouts #12425
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12425 +/- ##
==========================================
+ Coverage 71.40% 71.42% +0.01%
==========================================
Files 837 837
Lines 169023 169049 +26
Branches 169023 169049 +26
==========================================
+ Hits 120699 120739 +40
+ Misses 42980 42961 -19
- Partials 5344 5349 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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.
Other than that name refactoring this looks good.
This PR improves configurability of state sync by separating the config parameters for different kinds of timeouts:
state_sync_timeout
is used as it always has been when downloading from external storage.state_sync_p2p_timeout
is used when downloading from peers in the network.state_sync_retry_timeout
controls time between download attempts.We also lower the number of retry attempts for p2p state sync from 5 to 3. Why? In testnet we see that requests are generally handled reliably and if a request fails it is usually because the target node is throttling incoming requests. In the case that peers are overwhelmed by traffic we would rather fall back to cloud storage sooner than send more requests (which will be throttled anyway).