@@ -35,6 +35,7 @@ use crate::client::SignerSlotID;
35
35
36
36
const EVENT_TIMEOUT_MS : u64 = 5000 ;
37
37
const BLOCK_PROPOSAL_TIMEOUT_MS : u64 = 600_000 ;
38
+ const BLOCK_PROPOSAL_VALIDATION_TIMEOUT_MS : u64 = 120_000 ;
38
39
const DEFAULT_FIRST_PROPOSAL_BURN_BLOCK_TIMING_SECS : u64 = 60 ;
39
40
40
41
#[ derive( thiserror:: Error , Debug ) ]
@@ -158,6 +159,9 @@ pub struct GlobalConfig {
158
159
pub block_proposal_timeout : Duration ,
159
160
/// An optional custom Chain ID
160
161
pub chain_id : Option < u32 > ,
162
+ /// How long to wait for a response from a block proposal validation response from the node
163
+ /// before marking that block as invalid and rejecting it
164
+ pub block_proposal_validation_timeout : Duration ,
161
165
}
162
166
163
167
/// Internal struct for loading up the config file
@@ -187,6 +191,9 @@ struct RawConfigFile {
187
191
pub block_proposal_timeout_ms : Option < u64 > ,
188
192
/// An optional custom Chain ID
189
193
pub chain_id : Option < u32 > ,
194
+ /// How long to wait for a response from a block proposal validation response from the node
195
+ /// before marking that block as invalid and rejecting it in milliseconds.
196
+ pub block_proposal_validation_timeout_ms : Option < u64 > ,
190
197
}
191
198
192
199
impl RawConfigFile {
@@ -266,6 +273,11 @@ impl TryFrom<RawConfigFile> for GlobalConfig {
266
273
. unwrap_or ( BLOCK_PROPOSAL_TIMEOUT_MS ) ,
267
274
) ;
268
275
276
+ let block_proposal_validation_timeout = Duration :: from_millis (
277
+ raw_data
278
+ . block_proposal_validation_timeout_ms
279
+ . unwrap_or ( BLOCK_PROPOSAL_VALIDATION_TIMEOUT_MS ) ,
280
+ ) ;
269
281
Ok ( Self {
270
282
node_host : raw_data. node_host ,
271
283
endpoint,
@@ -279,6 +291,7 @@ impl TryFrom<RawConfigFile> for GlobalConfig {
279
291
first_proposal_burn_block_timing,
280
292
block_proposal_timeout,
281
293
chain_id : raw_data. chain_id ,
294
+ block_proposal_validation_timeout,
282
295
} )
283
296
}
284
297
}
0 commit comments