omni / bridge-ui

UI for TokenBridge, an interoperability solution between Ethereum networks for native and ERC tokens
https://bridge.poa.net/
41 stars 51 forks source link

No stats could be obtained in case of Infura #214

Open akolotov opened 5 years ago

akolotov commented 5 years ago

The recent modification in INFURA API could produce the error like the following:

{"jsonrpc":"2.0","id":1,"error":{"code":-32005,"message":"query returned more than 1000 results"}}

if eth_getLogs requests deal with a wide block frame. It could cause an issue when no events could be received in order to display information on the Statistics page.

Similar issue appeared in the token bridge monitor recently: https://github.com/poanetwork/bridge-monitor/issues/24.

As possible solution it was suggested to use the binary search algorithm to narrow the block range for every request as so several requests will be performed.