Skip to content

Commit

Permalink
Limit the Tx size to 5MB
Browse files Browse the repository at this point in the history
  • Loading branch information
steelgeek091 authored and stevenlaw123 committed Sep 3, 2024
1 parent 030f5f8 commit 727fa65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions crates/rooch-rpc-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl ClientBuilder {
let http_client = Arc::new(
HttpClientBuilder::default()
.max_request_size(2 << 30)
.max_response_size(2 << 30)
.request_timeout(self.request_timeout)
.build(http)?,
);
Expand Down
2 changes: 2 additions & 0 deletions crates/rooch-rpc-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@ pub async fn run_start_server(opt: RoochOpt, server_opt: ServerOpt) -> Result<Se

// Build server
let server = ServerBuilder::default()
.max_request_body_size(12 * 1024 * 1024)
.max_response_body_size(12 * 1024 * 1024)
.set_http_middleware(middleware)
.set_rpc_middleware(rpc_middleware)
.build(&addr)
Expand Down
2 changes: 1 addition & 1 deletion moveos/moveos/src/gas/parameters/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ crate::gas::native::define_gas_parameters_for_natives!(StorageGasParameter, "sto
[.storage_fee_per_op_new_byte, "storage_fee_per_op_new_byte", (5 + 1) * MUL],
[.storage_fee_per_op_modify_byte, "storage_fee_per_op_modify_byte", (5 + 1) * MUL],
[.storage_fee_per_op_delete, "storage_fee_per_op_delete", (5 + 1) * MUL],
[.storage_fee_per_transaction_byte, "storage_fee_per_transaction_byte", 20],
[.storage_fee_per_transaction_byte, "storage_fee_per_transaction_byte", 176],
]);

0 comments on commit 727fa65

Please sign in to comment.