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

Handle limited number of entries returned from eth_getLogs RPC call #1042

Open
marcinczenko opened this issue Dec 16, 2024 · 0 comments
Open
Labels
Marketplace See https://miro.com/app/board/uXjVNZ03E-c=/ for details

Comments

@marcinczenko
Copy link
Contributor

This is to capture the remark from @AuHau in the context of #922 (direct link to the comment: #922 (review)). Here is a summary of the discussion we had with respect to that comment.

With some RPC providers the number of entries returned by the eth_getLogs RPC call is limited. For example, Infura has a limit of 10 000 results coming back from eth_getLogs call. As a raw estimate, for an average of 4 slots per request, we would hit this limit if our network has an average of 10000 / 4 / 30 = 83 storage requests per day. Also in the Logs in the Linea Scan API documentation we read that:

For performance & security considerations, only the first 1000 results are return. So please narrow down the filter parameters.

On their Network information page, Linea recommends using Infura for the RPC URL, which means that the Infura restriction above may quickly become relevant to us.

Our current resolution is to record the issue (this issue), observe the number of storage requests on the network and when approaching the limit, amend the operations accordingly by experimentally finding a safe number of blocks to look back so that the number of log entries does not exceed the above limit and then using multiple getLogs calls to retrieve the required history.

@marcinczenko marcinczenko added the Marketplace See https://miro.com/app/board/uXjVNZ03E-c=/ for details label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Marketplace See https://miro.com/app/board/uXjVNZ03E-c=/ for details
Projects
None yet
Development

No branches or pull requests

1 participant