From e7eb716c241c8bf224361fee150f9d1fe3023ebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Grze=C5=9Bkiewicz?= Date: Wed, 29 Jan 2025 15:52:49 +0100 Subject: [PATCH] feat(en): better EN default req entities limit, improved documentation for API limits (#3546) --- core/bin/external_node/src/config/mod.rs | 2 +- docs/src/guides/external-node/02_configuration.md | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/core/bin/external_node/src/config/mod.rs b/core/bin/external_node/src/config/mod.rs index 3f1727c619b4..9274edf9d1ab 100644 --- a/core/bin/external_node/src/config/mod.rs +++ b/core/bin/external_node/src/config/mod.rs @@ -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 { diff --git a/docs/src/guides/external-node/02_configuration.md b/docs/src/guides/external-node/02_configuration.md index 90da7c1eea79..e570b1e9a1a3 100644 --- a/docs/src/guides/external-node/02_configuration.md +++ b/docs/src/guides/external-node/02_configuration.md @@ -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;