Skip to content

Commit

Permalink
feat(en): better EN default req entities limit, improved documentatio…
Browse files Browse the repository at this point in the history
…n for API limits (#3546)
  • Loading branch information
tomg10 authored Jan 29, 2025
1 parent e3759a2 commit e7eb716
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/bin/external_node/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ impl OptionalENConfig {
}

const fn default_req_entities_limit() -> usize {
1_024
10_000
}

const fn default_max_tx_size_bytes() -> usize {
Expand Down
9 changes: 9 additions & 0 deletions docs/src/guides/external-node/02_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ There are variables that allow you to fine-tune the limits of the RPC servers, s
entries or the limit for the accepted transaction size. Provided files contain sane defaults that are recommended for
use, but these can be edited, e.g. to make the Node more/less restrictive.

**Some common api limits config:**\
`EN_MAX_RESPONSE_BODY_SIZE_MB` (default 10 i.e. 10MB) controls max size of a single response. Hitting the limit will
result in errors similar to:\
`Response is too big (...)`

`EN_REQ_ENTITIES_LIMIT` (default 10000) controls max possible limit of entities to be requested at once. Hitting the
limit will result in errors similar to:\
`Query returned more than 10000 results (...)`

## JSON-RPC API namespaces

There are 7 total supported API namespaces: `eth`, `net`, `web3`, `debug` - standard ones; `zks` - rollup-specific one;
Expand Down

0 comments on commit e7eb716

Please sign in to comment.