Skip to content

Commit 84985a6

Browse files
Add contraints section for eth_getLogs. (#1869)
* Add contraints. Signed-off-by: bgravenorst <[email protected]> * Update services/reference/linea/json-rpc-methods/eth_getlogs.mdx --------- Signed-off-by: bgravenorst <[email protected]> Co-authored-by: Alexandra Carrillo <[email protected]>
1 parent 5cfa0f8 commit 84985a6

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

services/reference/linea/json-rpc-methods/eth_getlogs.mdx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,44 @@ import { NETWORK_NAMES } from "@site/src/plugins/plugin-json-rpc"
1111
network={NETWORK_NAMES.linea}
1212
method="eth_getLogs"
1313
/>
14+
15+
## Constraints
16+
17+
The following constraints apply:
18+
19+
To prevent queries from consuming too many resources, `eth_getLogs` requests are currently limited by three constraints:
20+
21+
- A maximum of 5,000 parameters can be included in a single request.
22+
- A maximum of 10,000 results can be returned by a single query.
23+
- Query duration must not exceed 10 seconds.
24+
25+
If a query returns too many results or exceeds the max query duration, one of the following errors is returned:
26+
27+
```json
28+
{
29+
"jsonrpc": "2.0",
30+
"id": 1,
31+
"error": {
32+
"code": -32005,
33+
"message": "query returned more than 10000 results"
34+
}
35+
}
36+
```
37+
38+
or
39+
40+
```json
41+
{
42+
"jsonrpc": "2.0",
43+
"id": 1,
44+
"error": {
45+
"code": -32005,
46+
"message": "query timeout exceeded"
47+
}
48+
}
49+
```
50+
51+
If this happens:
52+
53+
- Limit your query to a smaller number of blocks using `fromBlock` and `toBlock`.
54+
- If querying for commonly used `topics`, consider limiting to a single smart contract `address`.

0 commit comments

Comments
 (0)