While the nodes deployed with Chainstack are not rate-limited or throttled down as per our documentation in Node and connection limitations page, there is still a limit for certain blocks when you query logs or events with methods like
eth_getFilterLogs. This limit applies to all EVM-based chains across all the plans.
If you try to query a larger range, it might result in an error:
502 Bad Gateway
429 Too Many Requests'
To ensure maximum reliability for your calls, we have put a limit in place for querying logs and events. This is because these calls consume intense resources. However, it's important to note that we do not cap the response size or the number of logs, nor do we set any timeout limit on your calls.
If you need to query a large range of blocks, we recommend breaking them down into smaller chunks of 2,000 or less. This approach will increase the likelihood of receiving your response faster without experiencing timeouts. Additionally, you can improve the performance of your calls by adding concurrency, which means making multiple calls simultaneously.
eth_getLogs / getPastEvents block range limitation
Block range limitations apply for the eth_getLogs method on the Harmony and Fantom nodes since their clients have the hard caps natively. The limitations are as follows:
Fantom — 100 blocks.
Harmony — 1,024 blocks.
There are no specific limitations to other EVM-compatible protocols, but we recommend to stay in the following block ranges per request when using the eth_getLogs method on elastic nodes:
Ethereum — 2,000 blocks.
Polygon — 2,000 blocks.
BNB Smart Chain — 2,000 blocks.
Avalanche — 100,000 blocks.
Under the hood, the web3.js getPastEvents method calls eth_getLogs.
We also offer Node and Connection customizations. Such as increasing timeouts, max connections, adding more namespaces, etc. See also Node customizations.
Article is closed for comments.