This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 284
refactor the web3 ProviderProxy retry logic #4971
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
to ease the load off the geth nodes + additional logging to ethereum.web3.providers
jiivan
approved these changes
Dec 5, 2019
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.
LGTM
…o the cycling iterator
Codecov Report
@@ Coverage Diff @@
## b0.22 #4971 +/- ##
========================================
+ Coverage 90.1% 90.1% +<.01%
========================================
Files 233 233
Lines 21819 21833 +14
========================================
+ Hits 19660 19673 +13
- Misses 2159 2160 +1 |
maaktweluit
approved these changes
Dec 5, 2019
88a2b10
to
f376112
Compare
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
to ease the load off the geth nodes
rationale:
the allegedly "simple" logic of ProviderProxy causes erroneous queries (e.g. ones that are bound to time-out on all geth nodes) to spam a node indefinitely since - if other queries succeed in the meantime, the retry counter is reset and ProviderProxy doesn't even know how many times such query has been run ...
this pull request makes the retries of a single query separate from general "health" of the geth node Golem is connected to and the retry logic clearer and more explicit...
moreover, it doesn't make reaching the last node on the list critical on its own, as the node list is explicitly cycled