@@ -26,11 +26,7 @@ pub struct OpRbuilderArgs {
2626    pub  builder_signer :  Option < Signer > , 
2727
2828    /// chain block time in milliseconds 
29- #[ arg(  
30-         long = "rollup.chain-block-time" ,  
31-         default_value = "1000" ,  
32-         env = "CHAIN_BLOCK_TIME"  
33-     ) ]  
29+ #[ arg( long = "rollup.chain-block-time" ,  default_value = "1000" ,  env = "CHAIN_BLOCK_TIME" ) ]  
3430    pub  chain_block_time :  u64 , 
3531
3632    /// max gas a transaction can use 
@@ -41,14 +37,16 @@ pub struct OpRbuilderArgs {
4137#[ arg( long = "builder.log-pool-transactions" ,  default_value = "false" ) ]  
4238    pub  log_pool_transactions :  bool , 
4339
44-     /// How much time extra to wait for the block building job to complete and not get garbage collected 
40+     /// How much time extra to wait for the block building job to complete and 
41+ /// not get garbage collected 
4542#[ arg( long = "builder.extra-block-deadline-secs" ,  default_value = "20" ) ]  
4643    pub  extra_block_deadline_secs :  u64 , 
4744    /// Whether to enable revert protection by default 
4845#[ arg( long = "builder.enable-revert-protection" ,  default_value = "false" ) ]  
4946    pub  enable_revert_protection :  bool , 
5047
51-     /// Path to builder playgorund to automatically start up the node connected to it 
48+     /// Path to builder playground to automatically start up the node connected 
49+ /// to it 
5250#[ arg(  
5351        long = "builder.playground" ,  
5452        num_args = 0 ..=1 ,  
@@ -70,9 +68,7 @@ pub struct OpRbuilderArgs {
7068impl  Default  for  OpRbuilderArgs  { 
7169    fn  default ( )  -> Self  { 
7270        let  args = crate :: args:: Cli :: parse_from ( [ "dummy" ,  "node" ] ) ; 
73-         let  Commands :: Node ( node_command)  = args. command  else  { 
74-             unreachable ! ( ) 
75-         } ; 
71+         let  Commands :: Node ( node_command)  = args. command  else  {  unreachable ! ( )  } ; 
7672        node_command. ext 
7773    } 
7874} 
@@ -87,65 +83,44 @@ fn expand_path(s: &str) -> Result<PathBuf> {
8783
8884/// Parameters for Flashblocks configuration 
8985/// The names in the struct are prefixed with `flashblocks` to avoid conflicts 
90- /// with the standard block building configuration since these args are flattened 
91- /// into the main `OpRbuilderArgs` struct with the other rollup/node args. 
86+ /// with the standard block building configuration since these args are 
87+ /// flattened into the main `OpRbuilderArgs` struct with the other rollup/node 
88+ /// args. 
9289#[ derive( Debug ,  Clone ,  PartialEq ,  Eq ,  clap:: Args ) ]  
9390pub  struct  FlashblocksArgs  { 
9491    /// When set to true, the builder will build flashblocks 
9592/// and will build standard blocks at the chain block time. 
9693/// 
9794/// The default value will change in the future once the flashblocks 
9895/// feature is stable. 
99- #[ arg(  
100-         long = "flashblocks.enabled" ,  
101-         default_value = "false" ,  
102-         env = "ENABLE_FLASHBLOCKS"  
103-     ) ]  
96+ #[ arg( long = "flashblocks.enabled" ,  default_value = "false" ,  env = "ENABLE_FLASHBLOCKS" ) ]  
10497    pub  enabled :  bool , 
10598
106-     /// The port that we bind to for the websocket server that provides flashblocks 
107- #[ arg(  
108-         long = "flashblocks.port" ,  
109-         env = "FLASHBLOCKS_WS_PORT" ,  
110-         default_value = "1111"  
111-     ) ]  
99+     /// The port that we bind to for the websocket server that provides 
100+ /// flashblocks 
101+ #[ arg( long = "flashblocks.port" ,  env = "FLASHBLOCKS_WS_PORT" ,  default_value = "1111" ) ]  
112102    pub  flashblocks_port :  u16 , 
113103
114-     /// The address that we bind to for the websocket server that provides flashblocks 
115- #[ arg(  
116-         long = "flashblocks.addr" ,  
117-         env = "FLASHBLOCKS_WS_ADDR" ,  
118-         default_value = "127.0.0.1"  
119-     ) ]  
104+     /// The address that we bind to for the websocket server that provides 
105+ /// flashblocks 
106+ #[ arg( long = "flashblocks.addr" ,  env = "FLASHBLOCKS_WS_ADDR" ,  default_value = "127.0.0.1" ) ]  
120107    pub  flashblocks_addr :  String , 
121108
122109    /// flashblock block time in milliseconds 
123- #[ arg(  
124-         long = "flashblocks.block-time" ,  
125-         default_value = "250" ,  
126-         env = "FLASHBLOCK_BLOCK_TIME"  
127-     ) ]  
110+ #[ arg( long = "flashblocks.block-time" ,  default_value = "250" ,  env = "FLASHBLOCK_BLOCK_TIME" ) ]  
128111    pub  flashblocks_block_time :  u64 , 
129112
130-     /// Builder would always thry to produce fixed number of flashblocks without regard to time of  
131- /// FCU arrival. 
113+     /// Builder would always thry to produce fixed number of flashblocks without 
114+ /// regard to time of  FCU arrival. 
132115/// In cases of late FCU it could lead to partially filled blocks. 
133- #[ arg(  
134-         long = "flashblocks.fixed" ,  
135-         default_value = "false" ,  
136-         env = "FLASHBLOCK_FIXED"  
137-     ) ]  
116+ #[ arg( long = "flashblocks.fixed" ,  default_value = "false" ,  env = "FLASHBLOCK_FIXED" ) ]  
138117    pub  flashblocks_fixed :  bool , 
139118
140119    /// Time by which blocks would be completed earlier in milliseconds. 
141120/// 
142- /// This time used to account for latencies, this time would be deducted from total block 
143- /// building time before calculating number of fbs. 
144- #[ arg(  
145-         long = "flashblocks.leeway-time" ,  
146-         default_value = "75" ,  
147-         env = "FLASHBLOCK_LEEWAY_TIME"  
148-     ) ]  
121+ /// This time used to account for latencies, this time would be deducted 
122+ /// from total block building time before calculating number of fbs. 
123+ #[ arg( long = "flashblocks.leeway-time" ,  default_value = "75" ,  env = "FLASHBLOCK_LEEWAY_TIME" ) ]  
149124    pub  flashblocks_leeway_time :  u64 , 
150125
151126    /// Should we calculate state root for each flashblock 
@@ -160,9 +135,7 @@ pub struct FlashblocksArgs {
160135impl  Default  for  FlashblocksArgs  { 
161136    fn  default ( )  -> Self  { 
162137        let  args = crate :: args:: Cli :: parse_from ( [ "dummy" ,  "node" ] ) ; 
163-         let  Commands :: Node ( node_command)  = args. command  else  { 
164-             unreachable ! ( ) 
165-         } ; 
138+         let  Commands :: Node ( node_command)  = args. command  else  {  unreachable ! ( )  } ; 
166139        node_command. ext . flashblocks 
167140    } 
168141} 
@@ -178,11 +151,10 @@ pub struct TelemetryArgs {
178151#[ arg( long = "telemetry.otlp-headers" ,  env = "OTEL_EXPORTER_OTLP_HEADERS" ) ]  
179152    pub  otlp_headers :  Option < String > , 
180153
181-     /// Inverted sampling frequency in blocks. 1 - each block, 100 - every 100th block. 
182- #[ arg(  
183-         long = "telemetry.sampling-ratio" ,  
184-         env = "SAMPLING_RATIO" ,  
185-         default_value = "100"  
186-     ) ]  
154+     /// Inverted sampling frequency in blocks. 
155+ /// 
156+ /// 1 - each block 
157+ /// 100 - every 100th block. 
158+ #[ arg( long = "telemetry.sampling-ratio" ,  env = "SAMPLING_RATIO" ,  default_value = "100" ) ]  
187159    pub  sampling_ratio :  u64 , 
188160} 
0 commit comments