diff --git a/offchain/inspect-server/src/server.rs b/offchain/inspect-server/src/server.rs index b2572f188..121b531aa 100644 --- a/offchain/inspect-server/src/server.rs +++ b/offchain/inspect-server/src/server.rs @@ -14,6 +14,9 @@ use crate::inspect::{ CompletionStatus, InspectClient, InspectStateResponse, Report, }; +// (2^20 - 64) bytes, which is the length of the RX buffer minus metadata +const CARTESI_MACHINE_RX_BUFFER_LIMIT: usize = 1_048_512; + pub fn create( config: &InspectServerConfig, inspect_client: InspectClient, @@ -24,6 +27,7 @@ pub fn create( let cors = Cors::permissive(); App::new() .app_data(web::Data::new(inspect_client.clone())) + .app_data(web::PayloadConfig::new(CARTESI_MACHINE_RX_BUFFER_LIMIT)) .wrap(middleware::Logger::default()) .wrap(cors) .service(