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

Add contraints section for eth_getLogs. #1869

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions services/reference/linea/json-rpc-methods/eth_getlogs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,44 @@ import { NETWORK_NAMES } from "@site/src/plugins/plugin-json-rpc"
network={NETWORK_NAMES.linea}
method="eth_getLogs"
/>

## Constraints

The following constraints apply:

To prevent queries from consuming too many resources, `eth_getLogs` requests are currently limited by three constraints:

- A maximum of 5,000 parameters can be included in a single request.
- A maximum of 10,000 results can be returned by a single query.
- Query duration must not exceed 10 seconds.

If a query returns too many results or exceeds the max query duration, one of the following errors is returned:

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

or

```json
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32005,
"message": "query timeout exceeded"
}
}
```

If this happens:

- Limit your query to a smaller number of blocks using `fromBlock` and `toBlock`.
- If querying for commonly used `topics`, consider limiting to a single smart contract `address`.
Loading