File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,9 @@ pub struct ProposalEvalConfig {
86
86
pub reorg_attempts_activity_timeout : Duration ,
87
87
/// Time to wait before submitting a block proposal to the stacks-node
88
88
pub proposal_wait_for_parent_time : Duration ,
89
+ /// How many blocks after a fork should we reset the replay set,
90
+ /// as a failsafe mechanism
91
+ pub reset_replay_set_after_fork_blocks : u64 ,
89
92
}
90
93
91
94
impl From < & SignerConfig > for ProposalEvalConfig {
@@ -98,6 +101,7 @@ impl From<&SignerConfig> for ProposalEvalConfig {
98
101
reorg_attempts_activity_timeout : value. reorg_attempts_activity_timeout ,
99
102
tenure_idle_timeout_buffer : value. tenure_idle_timeout_buffer ,
100
103
proposal_wait_for_parent_time : value. proposal_wait_for_parent_time ,
104
+ reset_replay_set_after_fork_blocks : value. reset_replay_set_after_fork_blocks ,
101
105
}
102
106
}
103
107
}
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ use crate::chainstate::v2::{GlobalStateView, SortitionState};
47
47
use crate :: chainstate:: { ProposalEvalConfig , SignerChainstateError , SortitionData } ;
48
48
use crate :: client:: tests:: MockServerClient ;
49
49
use crate :: client:: StacksClient ;
50
+ use crate :: config:: DEFAULT_RESET_REPLAY_SET_AFTER_FORK_BLOCKS ;
50
51
use crate :: signerdb:: tests:: tmp_db_path;
51
52
use crate :: signerdb:: { BlockInfo , SignerDb } ;
52
53
@@ -94,6 +95,7 @@ fn setup_test_environment(
94
95
tenure_idle_timeout_buffer : Duration :: from_secs ( 2 ) ,
95
96
reorg_attempts_activity_timeout : Duration :: from_secs ( 3 ) ,
96
97
proposal_wait_for_parent_time : Duration :: from_secs ( 0 ) ,
98
+ reset_replay_set_after_fork_blocks : DEFAULT_RESET_REPLAY_SET_AFTER_FORK_BLOCKS ,
97
99
} ;
98
100
99
101
let stacks_client = StacksClient :: new (
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ use stacks_common::function_name;
40
40
use crate :: chainstate:: { ProposalEvalConfig , SortitionData } ;
41
41
use crate :: client:: tests:: { build_get_tenure_tip_response, MockServerClient } ;
42
42
use crate :: client:: StacksClient ;
43
- use crate :: config:: GlobalConfig ;
43
+ use crate :: config:: { GlobalConfig , DEFAULT_RESET_REPLAY_SET_AFTER_FORK_BLOCKS } ;
44
44
use crate :: signerdb:: tests:: { create_block_override, tmp_db_path} ;
45
45
use crate :: signerdb:: SignerDb ;
46
46
use crate :: v0:: signer_state:: { LocalStateMachine , NewBurnBlock , StateMachineUpdate } ;
@@ -284,6 +284,7 @@ fn check_miner_inactivity_timeout() {
284
284
tenure_idle_timeout_buffer : Duration :: from_secs ( 2 ) ,
285
285
reorg_attempts_activity_timeout : Duration :: from_secs ( 3 ) ,
286
286
proposal_wait_for_parent_time : Duration :: from_secs ( 0 ) ,
287
+ reset_replay_set_after_fork_blocks : DEFAULT_RESET_REPLAY_SET_AFTER_FORK_BLOCKS ,
287
288
} ;
288
289
289
290
let block_sk = StacksPrivateKey :: from_seed ( & [ 0 , 1 ] ) ;
You can’t perform that action at this time.
0 commit comments