Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

refactor the web3 ProviderProxy retry logic #4971

Merged
merged 12 commits into from
Dec 10, 2019
Merged

Conversation

shadeofblue
Copy link
Contributor

@shadeofblue shadeofblue commented Dec 5, 2019

to ease the load off the geth nodes

  • additional logging to ethereum.web3.providers

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

to ease the load off the geth nodes

+ additional logging to ethereum.web3.providers
Copy link
Contributor

@jiivan jiivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov
Copy link

codecov bot commented Dec 5, 2019

Codecov Report

Merging #4971 into b0.22 will increase coverage by <.01%.
The diff coverage is 100%.

@@           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

@shadeofblue shadeofblue changed the title [lacks tests] refactor the web3 ProviderProxy retry logic refactor the web3 ProviderProxy retry logic Dec 6, 2019
@shadeofblue shadeofblue merged commit f647110 into b0.22 Dec 10, 2019
@shadeofblue shadeofblue deleted the 0.22-geth-errors branch December 10, 2019 10:02
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants