You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds integration tests for the JSON-RPC server's max_request_body_size enforcement — previously untested at the prover-server level:
test_default_limit_accepts_5000_felt_calldata — a starknet_proveTransaction request carrying 5,000 full-width (Felt::MAX) calldata felts (~350 KiB body, the largest JSON encoding such calldata can produce) is accepted under the production-default 5 MiB limit. DEFAULT_MAX_REQUEST_BODY_SIZE is made pub(crate) so the test tracks the real default.
test_body_size_limit_boundary — the limit is inclusive: a body of exactly the configured size is served; one byte over is rejected with HTTP 413.
Low Risk
Test-only change plus making a default constant visible to the crate; no production server logic changes.
Overview
Adds HTTP integration tests for jsonrpsee’s max_request_body_size on the transaction prover server, without changing runtime behavior.
DEFAULT_MAX_REQUEST_BODY_SIZE (5 MiB) is now pub(crate) so tests can assert against the same default the service uses. A new request_body_size_test module spins up a mock HTTP server via start_server and posts JSON-RPC bodies.
One test checks that a large starknet_proveTransaction payload (5,000 max-width calldata felts, ~350 KiB) succeeds under the default limit. Another uses rstest to confirm the limit is inclusive: a body padded to exactly the configured size returns 200, and one extra byte returns 413 Payload Too Large.
Reviewed by Cursor Bugbot for commit e3b5e6c. Bugbot is set up for automated code reviews on this repo. Configure here.
The reason will be displayed to describe this comment to others. Learn more.
@Yoni-Starkware reviewed 3 files and all commit messages, and made 1 comment. Reviewable status: complete! all files reviewed, all discussions resolved (waiting on avi-starkware).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds integration tests for the JSON-RPC server's
max_request_body_sizeenforcement — previously untested at the prover-server level:test_default_limit_accepts_5000_felt_calldata— astarknet_proveTransactionrequest carrying 5,000 full-width (Felt::MAX) calldata felts (~350 KiB body, the largest JSON encoding such calldata can produce) is accepted under the production-default 5 MiB limit.DEFAULT_MAX_REQUEST_BODY_SIZEis madepub(crate)so the test tracks the real default.test_body_size_limit_boundary— the limit is inclusive: a body of exactly the configured size is served; one byte over is rejected with HTTP 413.🤖 Generated with Claude Code