Skip to content

Commit

Permalink
[jsonrpc] - set max_request_body_size to 2GB (MystenLabs#8146)
Browse files Browse the repository at this point in the history
we patched this in testnet but forgot to cherrypick back to the main and
devnet
  • Loading branch information
patrickkuo authored Feb 7, 2023
1 parent fcc73e5 commit 10710a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions crates/sui-json-rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ impl JsonRpcServerBuilder {
.layer(metrics_layer);

let server = ServerBuilder::default()
.max_response_body_size(2 << 30)
.max_connections(max_connection)
.set_host_filtering(AllowHosts::Any)
.set_middleware(middleware)
Expand Down
5 changes: 4 additions & 1 deletion crates/sui-sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ impl SuiClientBuilder {
let ws = if let Some(url) = self.ws_url {
Some(
WsClientBuilder::default()
.max_request_body_size(2 << 30)
.max_concurrent_requests(self.max_concurrent_requests)
.set_headers(headers.clone())
.request_timeout(self.request_timeout)
.build(url)
Expand All @@ -94,9 +96,10 @@ impl SuiClientBuilder {
};

let http = HttpClientBuilder::default()
.max_request_body_size(2 << 30)
.max_concurrent_requests(self.max_concurrent_requests)
.set_headers(headers.clone())
.request_timeout(self.request_timeout)
.max_concurrent_requests(self.max_concurrent_requests)
.build(http)?;

let info = Self::get_server_info(&http, &ws).await?;
Expand Down

0 comments on commit 10710a5

Please sign in to comment.