Skip to content

Commit

Permalink
jsonrpc: disable batches and unlimit response sizes
Browse files Browse the repository at this point in the history
When we updated the `jsonrpsee` dependency a few configuration changes
were made unintentially. Specifically batches were re-enabled and
response bodies were limited to 10MB. This patch reverts both these
semantic changes to the service by disabling batches and removing the
cap on response sizes.
  • Loading branch information
bmwill committed Jan 30, 2025
1 parent 051267c commit ed97134
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/sui-json-rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ impl JsonRpcServerBuilder {
// number of connections. As such, for now we can just set this to a very high value to
// disable it artificially limiting us to ~100 conncurrent requests.
.max_connections(u32::MAX)
// Before we updated jsonrpsee, batches were disabled so lets keep them disabled.
.set_batch_request_config(jsonrpsee::server::BatchRequestConfig::Disabled)
// We don't limit response body sizes.
.max_response_body_size(u32::MAX)
.set_rpc_middleware(rpc_middleware);

let mut router = axum::Router::new();
Expand Down

0 comments on commit ed97134

Please sign in to comment.