@@ -75,6 +75,7 @@ struct ServerContext {
7575 chain_info_max_received_log_entries : usize ,
7676 regular_request_batch_size : usize ,
7777 cross_chain_update_batch_size : usize ,
78+ cross_chain_confirmation_batch_size : usize ,
7879}
7980
8081impl ServerContext {
@@ -106,7 +107,8 @@ impl ServerContext {
106107 . with_chain_worker_ttl ( self . chain_worker_ttl )
107108 . with_chain_info_max_received_log_entries ( self . chain_info_max_received_log_entries )
108109 . with_regular_request_batch_size ( self . regular_request_batch_size )
109- . with_cross_chain_update_batch_size ( self . cross_chain_update_batch_size ) ;
110+ . with_cross_chain_update_batch_size ( self . cross_chain_update_batch_size )
111+ . with_cross_chain_confirmation_batch_size ( self . cross_chain_confirmation_batch_size ) ;
110112 ( state, shard_id, shard. clone ( ) )
111113 }
112114
@@ -415,24 +417,29 @@ enum ServerCommand {
415417 chain_info_max_received_log_entries : usize ,
416418
417419 /// Maximum number of regular requests to handle per round in the rotation.
418- /// The worker rotates between regular requests, cross-chain updates, and confirmations,
419- /// processing up to this many regular requests per turn.
420420 #[ arg(
421421 long,
422- default_value = "1 " ,
422+ default_value = "10 " ,
423423 env = "LINERA_SERVER_REGULAR_REQUEST_BATCH_SIZE"
424424 ) ]
425425 regular_request_batch_size : usize ,
426426
427427 /// Maximum number of cross-chain updates to batch together in a single processing round.
428- /// Higher values improve throughput but increase latency for individual updates.
429428 #[ arg(
430429 long,
431430 default_value = "1000" ,
432431 env = "LINERA_SERVER_CROSS_CHAIN_UPDATE_BATCH_SIZE"
433432 ) ]
434433 cross_chain_update_batch_size : usize ,
435434
435+ /// Maximum number of cross-chain confirmations to batch together in a single processing round.
436+ #[ arg(
437+ long,
438+ default_value = "500" ,
439+ env = "LINERA_SERVER_CROSS_CHAIN_CONFIRMATION_BATCH_SIZE"
440+ ) ]
441+ cross_chain_confirmation_batch_size : usize ,
442+
436443 /// OpenTelemetry OTLP exporter endpoint (requires opentelemetry feature).
437444 #[ arg( long, env = "LINERA_OTLP_EXPORTER_ENDPOINT" ) ]
438445 otlp_exporter_endpoint : Option < String > ,
@@ -564,6 +571,7 @@ async fn run(options: ServerOptions) {
564571 chain_info_max_received_log_entries,
565572 regular_request_batch_size,
566573 cross_chain_update_batch_size,
574+ cross_chain_confirmation_batch_size,
567575 otlp_exporter_endpoint : _,
568576 } => {
569577 linera_version:: VERSION_INFO . log ( ) ;
@@ -583,6 +591,7 @@ async fn run(options: ServerOptions) {
583591 chain_info_max_received_log_entries,
584592 regular_request_batch_size,
585593 cross_chain_update_batch_size,
594+ cross_chain_confirmation_batch_size,
586595 } ;
587596 let wasm_runtime = wasm_runtime. with_wasm_default ( ) ;
588597 let store_config = storage_config
0 commit comments