Skip to content

Commit

Permalink
Add contraints.
Browse files Browse the repository at this point in the history
Signed-off-by: bgravenorst <[email protected]>
  • Loading branch information
bgravenorst committed Feb 7, 2025
1 parent 05faf12 commit fdd356d
Showing 1 changed file with 41 additions and 0 deletions.
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 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`.

0 comments on commit fdd356d

Please sign in to comment.