graphprotocol / graph-node

Graph Node indexes data from blockchains such as Ethereum and serves it over GraphQL
https://thegraph.com
Apache License 2.0
2.91k stars 968 forks source link

[Feature] Set `GRAPH_ETH_GET_LOGS_MAX_CONTRACTS` Per Provider #4974

Open itsjerryokolo opened 11 months ago

itsjerryokolo commented 11 months ago

Description

Currently, there is a limitation in configuring a Graph node to restrict the number of eth_getLogs requests per Provider. This limitation can lead to the occurrence of the following error:

Trying again after eth_getLogs RPC call for block range: [52590344..52590344] failed (attempt #10) with result Err(Rpc(Error { code: InvalidParams, message: "2149 address and topic selectors specified in query, but only 1000 are allowed", data: None })), component: BlockStream

This error is generated when an RPC provider has a predefined limit on the number of contracts that can be requested in a single call.

cc @leoyvens

Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.

No response

Some information to help us out

azf20 commented 11 months ago

Thanks @itsjerryokolo, @leoyvens do you think this should be set at the provider level?

leoyvens commented 11 months ago

Yes I think so, the env var would be a default if the provider hasn't set anything

github-actions[bot] commented 5 months ago

Looks like this issue has been open for 6 months with no activity. Is it still relevant? If not, please remember to close it.