@@ -399,6 +399,8 @@ impl ScrollRollupNodeConfig {
399399 l1_block_startup_info,
400400 node_config,
401401 self . l1_provider_args . logs_query_block_range ,
402+ self . l1_provider_args . liveness_threshold ,
403+ self . l1_provider_args . liveness_check_interval ,
402404 )
403405 . await ,
404406 ) ,
@@ -675,7 +677,7 @@ impl RollupNodeNetworkArgs {
675677}
676678
677679/// The arguments for the L1 provider.
678- #[ derive( Debug , Default , Clone , clap:: Args ) ]
680+ #[ derive( Debug , Clone , clap:: Args ) ]
679681pub struct L1ProviderArgs {
680682 /// The URL for the L1 RPC.
681683 #[ arg( long = "l1.url" , id = "l1_url" , value_name = "L1_URL" ) ]
@@ -695,6 +697,28 @@ pub struct L1ProviderArgs {
695697 /// The maximum number of items to be stored in the cache layer.
696698 #[ 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 ) ]
697699 pub cache_max_items : u32 ,
700+ /// The L1 liveness threshold in seconds. If no new L1 block is received within this duration,
701+ /// an error is logged.
702+ #[ arg( long = "l1.liveness-threshold" , id = "l1_liveness_threshold" , value_name = "L1_LIVENESS_THRESHOLD" , default_value_t = constants:: L1_LIVENESS_THRESHOLD ) ]
703+ pub liveness_threshold : u64 ,
704+ /// The interval in seconds at which to check L1 liveness.
705+ #[ 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 ) ]
706+ pub liveness_check_interval : u64 ,
707+ }
708+
709+ impl Default for L1ProviderArgs {
710+ fn default ( ) -> Self {
711+ Self {
712+ url : None ,
713+ compute_units_per_second : constants:: PROVIDER_COMPUTE_UNITS_PER_SECOND ,
714+ max_retries : constants:: L1_PROVIDER_MAX_RETRIES ,
715+ initial_backoff : constants:: L1_PROVIDER_INITIAL_BACKOFF ,
716+ logs_query_block_range : constants:: LOGS_QUERY_BLOCK_RANGE ,
717+ cache_max_items : constants:: L1_PROVIDER_CACHE_MAX_ITEMS ,
718+ liveness_threshold : constants:: L1_LIVENESS_THRESHOLD ,
719+ liveness_check_interval : constants:: L1_LIVENESS_CHECK_INTERVAL ,
720+ }
721+ }
698722}
699723
700724/// The arguments for the Beacon provider.
0 commit comments