@@ -26,11 +26,7 @@ pub struct OpRbuilderArgs {
26
26
pub builder_signer : Option < Signer > ,
27
27
28
28
/// 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" ) ]
34
30
pub chain_block_time : u64 ,
35
31
36
32
/// max gas a transaction can use
@@ -41,14 +37,16 @@ pub struct OpRbuilderArgs {
41
37
#[ arg( long = "builder.log-pool-transactions" , default_value = "false" ) ]
42
38
pub log_pool_transactions : bool ,
43
39
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
45
42
#[ arg( long = "builder.extra-block-deadline-secs" , default_value = "20" ) ]
46
43
pub extra_block_deadline_secs : u64 ,
47
44
/// Whether to enable revert protection by default
48
45
#[ arg( long = "builder.enable-revert-protection" , default_value = "false" ) ]
49
46
pub enable_revert_protection : bool ,
50
47
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
52
50
#[ arg(
53
51
long = "builder.playground" ,
54
52
num_args = 0 ..=1 ,
@@ -70,9 +68,7 @@ pub struct OpRbuilderArgs {
70
68
impl Default for OpRbuilderArgs {
71
69
fn default ( ) -> Self {
72
70
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 ! ( ) } ;
76
72
node_command. ext
77
73
}
78
74
}
@@ -87,65 +83,44 @@ fn expand_path(s: &str) -> Result<PathBuf> {
87
83
88
84
/// Parameters for Flashblocks configuration
89
85
/// 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.
92
89
#[ derive( Debug , Clone , PartialEq , Eq , clap:: Args ) ]
93
90
pub struct FlashblocksArgs {
94
91
/// When set to true, the builder will build flashblocks
95
92
/// and will build standard blocks at the chain block time.
96
93
///
97
94
/// The default value will change in the future once the flashblocks
98
95
/// 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" ) ]
104
97
pub enabled : bool ,
105
98
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" ) ]
112
102
pub flashblocks_port : u16 ,
113
103
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" ) ]
120
107
pub flashblocks_addr : String ,
121
108
122
109
/// 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" ) ]
128
111
pub flashblocks_block_time : u64 ,
129
112
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.
132
115
/// 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" ) ]
138
117
pub flashblocks_fixed : bool ,
139
118
140
119
/// Time by which blocks would be completed earlier in milliseconds.
141
120
///
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" ) ]
149
124
pub flashblocks_leeway_time : u64 ,
150
125
151
126
/// Should we calculate state root for each flashblock
@@ -160,9 +135,7 @@ pub struct FlashblocksArgs {
160
135
impl Default for FlashblocksArgs {
161
136
fn default ( ) -> Self {
162
137
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 ! ( ) } ;
166
139
node_command. ext . flashblocks
167
140
}
168
141
}
@@ -178,11 +151,10 @@ pub struct TelemetryArgs {
178
151
#[ arg( long = "telemetry.otlp-headers" , env = "OTEL_EXPORTER_OTLP_HEADERS" ) ]
179
152
pub otlp_headers : Option < String > ,
180
153
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" ) ]
187
159
pub sampling_ratio : u64 ,
188
160
}
0 commit comments