From cff1b8b13e1a4fa94a1c345565c5b97331c1c275 Mon Sep 17 00:00:00 2001 From: Roee-87 Date: Thu, 14 May 2026 10:42:36 -0700 Subject: [PATCH 1/2] increased request body size --- src/rest/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rest/mod.rs b/src/rest/mod.rs index f3dac26..716ec0a 100644 --- a/src/rest/mod.rs +++ b/src/rest/mod.rs @@ -199,8 +199,9 @@ impl> Rest { .layer(middleware::map_request(log_middleware)) // Enable CORS. .layer(cors) - // Cap the request body size at 512KiB. - .layer(DefaultBodyLimit::max(512 * 1024)) + // Cap the request body size at 2MiB to match snarkVM V14's 768 KiB binary transaction limit + // (JSON encoding of verifying-key arrays is typically 2-3x the binary size). + .layer(DefaultBodyLimit::max(2 * 1024 * 1024)) .layer(governor_layer) } From 7ee7e83628e8482b95cd518f11aff5999e2b2937 Mon Sep 17 00:00:00 2001 From: Roee-87 Date: Thu, 14 May 2026 11:39:20 -0700 Subject: [PATCH 2/2] modified limit to reflect snarkVM --- src/rest/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rest/mod.rs b/src/rest/mod.rs index 716ec0a..9d84ebc 100644 --- a/src/rest/mod.rs +++ b/src/rest/mod.rs @@ -199,9 +199,8 @@ impl> Rest { .layer(middleware::map_request(log_middleware)) // Enable CORS. .layer(cors) - // Cap the request body size at 2MiB to match snarkVM V14's 768 KiB binary transaction limit - // (JSON encoding of verifying-key arrays is typically 2-3x the binary size). - .layer(DefaultBodyLimit::max(2 * 1024 * 1024)) + // Cap the request body size at 2MiB to match snarkVM V14's 768 KiB binary transaction limit. + .layer(DefaultBodyLimit::max(2 * 768 * 1024)) .layer(governor_layer) }