@@ -10,8 +10,8 @@ use reth_network_peers::{PeerId, TrustedPeer};
1010use reth_node_builder:: NodeConfig ;
1111use reth_optimism_chainspec:: OpChainSpec ;
1212use reth_optimism_node:: args:: RollupArgs ;
13- use std:: str:: FromStr ;
14- use tracing:: { debug , info, warn} ;
13+ use std:: { net :: SocketAddr , path :: PathBuf , str:: FromStr } ;
14+ use tracing:: { info, warn} ;
1515
1616pub const DEFAULT_FLASHBLOCKS_BOOTNODES : & str = "enode://78ca7daeb63956cbc3985853d5699a6404d976a2612575563f46876968fdca2383a195ee7db40de348757b2256195996933708f351169ca3f3fe93ab2a774608@16.62.98.53:30303,enode://c96dcadf4cdea4c39ec3fd775637d9e67d455b856b1514cfcf55b72f873a34b96d69e47ccea9fc797a446d4e6948aa80f6b9d479a1727ca166758a900b08f422@16.63.14.166:30303,enode://15688a7b281c32a4da633252dcc5019d60f037ee9eb46d05093dd3023bdd688b9b207d10a39e054a5ed87db666b2cb75696f6537de74d1e1f8dcabc53dc8d2ab@16.63.123.160:30303" ;
1717
@@ -38,6 +38,24 @@ pub struct WorldChainArgs {
3838 /// Comma-separated list of peer IDs to which transactions should be propagated
3939 #[ arg( long = "tx-peers" , value_delimiter = ',' , value_name = "PEER_ID" ) ]
4040 pub tx_peers : Option < Vec < PeerId > > ,
41+
42+ /// Health check args
43+ #[ command( flatten) ]
44+ pub health : HealthArgs ,
45+ }
46+
47+ #[ derive( Debug , Clone , Default , clap:: Args ) ]
48+ #[ command( next_help_heading = "Health" ) ]
49+ pub struct HealthArgs {
50+ /// Enable the health HTTP server on this address (startup/ready/live endpoints).
51+ /// If omitted, no health server is started.
52+ #[ arg( long = "health.addr" ) ]
53+ pub addr : Option < SocketAddr > ,
54+
55+ /// Path to health check configuration file (JSON).
56+ /// If omitted, all probes return 200 OK unconditionally.
57+ #[ arg( long = "health.config" ) ]
58+ pub config : Option < PathBuf > ,
4159}
4260
4361impl WorldChainArgs {
@@ -76,10 +94,11 @@ impl WorldChainArgs {
7694 ) ?) ;
7795 }
7896
79- if config. network . bootnodes . is_none ( ) && self . flashblocks . is_some ( ) {
80- let bootnodes = parse_trusted_peer ( DEFAULT_FLASHBLOCKS_BOOTNODES ) ?;
81- debug ! ( target: "world_chain::network" , ?bootnodes, "Setting default flashblocks bootnodes" ) ;
82- config. network . bootnodes = Some ( bootnodes) ;
97+ if let Some ( bootnodes) = & mut config. network . bootnodes
98+ && bootnodes. is_empty ( )
99+ && self . flashblocks . is_some ( )
100+ {
101+ * bootnodes = parse_trusted_peer ( DEFAULT_FLASHBLOCKS_BOOTNODES ) ?;
83102 }
84103
85104 if self . pbh . entrypoint == Address :: default ( ) {
@@ -336,6 +355,7 @@ mod tests {
336355 } ,
337356 flashblocks : None ,
338357 tx_peers : Some ( vec ! [ peer_id. parse( ) . unwrap( ) ] ) ,
358+ health : HealthArgs :: default ( ) ,
339359 } ;
340360
341361 let spec = reth_optimism_chainspec:: OpChainSpec :: from_genesis ( Genesis :: default ( ) ) ;
0 commit comments