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

feat(en): better EN default req entities limit, improved documentation for API limits #3546

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
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
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
Loading