@@ -392,6 +392,8 @@ impl ScrollRollupNodeConfig {
392392 l1_block_startup_info,
393393 node_config,
394394 self . l1_provider_args . logs_query_block_range ,
395+ self . l1_provider_args . liveness_threshold ,
396+ self . l1_provider_args . liveness_check_interval ,
395397 )
396398 . await ,
397399 ) ,
@@ -668,7 +670,7 @@ impl RollupNodeNetworkArgs {
668670}
669671
670672/// The arguments for the L1 provider.
671- #[ derive( Debug , Default , Clone , clap:: Args ) ]
673+ #[ derive( Debug , Clone , clap:: Args ) ]
672674pub struct L1ProviderArgs {
673675 /// The URL for the L1 RPC.
674676 #[ arg( long = "l1.url" , id = "l1_url" , value_name = "L1_URL" ) ]
@@ -688,6 +690,28 @@ pub struct L1ProviderArgs {
688690 /// The maximum number of items to be stored in the cache layer.
689691 #[ arg( long = "l1.cache-max-items" , id = "l1_cache_max_items" , value_name = "L1_CACHE_MAX_ITEMS" , default_value_t = constants:: L1_PROVIDER_CACHE_MAX_ITEMS ) ]
690692 pub cache_max_items : u32 ,
693+ /// The L1 liveness threshold in seconds. If no new L1 block is received within this duration,
694+ /// an error is logged.
695+ #[ arg( long = "l1.liveness-threshold" , id = "l1_liveness_threshold" , value_name = "L1_LIVENESS_THRESHOLD" , default_value_t = constants:: L1_LIVENESS_THRESHOLD ) ]
696+ pub liveness_threshold : u64 ,
697+ /// The interval in seconds at which to check L1 liveness.
698+ #[ arg( long = "l1.liveness-check-interval" , id = "l1_liveness_check_interval" , value_name = "L1_LIVENESS_CHECK_INTERVAL" , default_value_t = constants:: L1_LIVENESS_CHECK_INTERVAL ) ]
699+ pub liveness_check_interval : u64 ,
700+ }
701+
702+ impl Default for L1ProviderArgs {
703+ fn default ( ) -> Self {
704+ Self {
705+ url : None ,
706+ compute_units_per_second : constants:: PROVIDER_COMPUTE_UNITS_PER_SECOND ,
707+ max_retries : constants:: L1_PROVIDER_MAX_RETRIES ,
708+ initial_backoff : constants:: L1_PROVIDER_INITIAL_BACKOFF ,
709+ logs_query_block_range : constants:: LOGS_QUERY_BLOCK_RANGE ,
710+ cache_max_items : constants:: L1_PROVIDER_CACHE_MAX_ITEMS ,
711+ liveness_threshold : constants:: L1_LIVENESS_THRESHOLD ,
712+ liveness_check_interval : constants:: L1_LIVENESS_CHECK_INTERVAL ,
713+ }
714+ }
691715}
692716
693717/// The arguments for the Beacon provider.
0 commit comments