Skip to content

Increase request body size#11

Merged
Roee-87 merged 2 commits into
mainfrom
fix/increase-request-body-size
May 14, 2026
Merged

Increase request body size#11
Roee-87 merged 2 commits into
mainfrom
fix/increase-request-body-size

Conversation

@Roee-87
Copy link
Copy Markdown
Collaborator

@Roee-87 Roee-87 commented May 14, 2026

Motivation

The Request body size is increased to reflect the new upper limits for program deployments.

@Roee-87 Roee-87 self-assigned this May 14, 2026
@Roee-87 Roee-87 added the bug Something isn't working label May 14, 2026
@Roee-87 Roee-87 requested a review from raychu86 May 14, 2026 17:44
Comment thread src/rest/mod.rs Outdated
.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))
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raychu86 What value do you suggest we use here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The snarkVM constant for MAX_PROGRAM_SIZE references the consensus version, therefore we need to initialize the Devnode using a hardcoded value for DefaultBodyLimit.

Copy link
Copy Markdown
Collaborator

@raychu86 raychu86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Roee-87 Roee-87 merged commit a00ddbc into main May 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants