Skip to content
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

Event-scanner doesn't take care about Infura limitations #17

Open
roleengineer opened this issue Apr 6, 2020 · 1 comment
Open

Event-scanner doesn't take care about Infura limitations #17

roleengineer opened this issue Apr 6, 2020 · 1 comment

Comments

@roleengineer
Copy link
Contributor

Infura has limit 10000 result for requests.
Event-scanner uses web3.js method for contract instances getPastEvents("allEvents") to fetch events and when even-scanner is running first time it starts {fromBlock: 0}. If event-scanner uses Infura as endpoint and contract already has a lot of logs and the amount of the results is more than 10000, event-scanner stops, because of the unhandled Promise.rejection.
Example that was reproduced with Infura and Testnet Operator contract:

event_scanner    | Contract 0xb3356900d56F39c79Bfdc2b625d15B1b5b9262a9 is at local height 0 (diff: 6266859)
event_scanner    | (node:7) UnhandledPromiseRejectionWarning: Error: Returned error: query returned more than 10000 results
@troggy
Copy link
Member

troggy commented Apr 6, 2020

usually we read events in chunks — maybe a quick and dirty solution here as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants