@@ -13077,8 +13077,13 @@ fn tenure_extend_cost_threshold() {
13077
13077
/// The stacks node is then advanced to Epoch 3.0 boundary to allow block signing.
13078
13078
///
13079
13079
/// Test Execution:
13080
- /// The node mines 1 stacks block N (all signers sign it). The subsequent block N+1 is proposed, but <30% accept it. The remaining signers
13081
- /// do not make a decision on the block. A new tenure begins and the miner proposes a new block N+1' which all signers accept.
13080
+ /// Miner 1 mines a tenure change block, then mines a second block, block N,
13081
+ /// but the signers will not broadcast it, and the miner will stall before
13082
+ /// broadcasting. Miner 2 wins the next sortition and proposes a block N',
13083
+ /// since it has not seen N, but signers are ignoring proposals so that it is
13084
+ /// not rejected. Miner 1 then announces N. Miner 2 sees N, stops waiting
13085
+ /// for signatures on N' and submits a new proposal, N+1, which is accepted.
13086
+ /// Finally a new tenure arrives and N+2 is mined.
13082
13087
///
13083
13088
/// Test Assertion:
13084
13089
/// Stacks tip advances to N+1'
@@ -13141,6 +13146,7 @@ fn interrupt_miner_on_new_stacks_tip() {
13141
13146
config.node.pox_sync_sample_secs = 30;
13142
13147
config.miner.block_commit_delay = Duration::from_secs(0);
13143
13148
config.miner.tenure_cost_limit_per_block_percentage = None;
13149
+ config.miner.block_rejection_timeout_steps = [(0, Duration::from_secs(1200))].into();
13144
13150
13145
13151
config.events_observers.retain(|listener| {
13146
13152
match std::net::SocketAddr::from_str(&listener.endpoint) {
@@ -13330,7 +13336,6 @@ fn interrupt_miner_on_new_stacks_tip() {
13330
13336
13331
13337
// Make the miner stall before broadcasting the block once it has been approved
13332
13338
TEST_P2P_BROADCAST_STALL.set(true);
13333
- // TEST_BLOCK_ANNOUNCE_STALL.set(true);
13334
13339
// Make the signers not broadcast the block once it has been approved
13335
13340
TEST_SKIP_BLOCK_BROADCAST.set(true);
13336
13341
@@ -13482,7 +13487,15 @@ fn interrupt_miner_on_new_stacks_tip() {
13482
13487
)
13483
13488
.expect("Timed out waiting for the next block to be mined");
13484
13489
13485
- wait_for_chains().expect("Timed out waiting for Rl1 and Rl2 chains to advance");
13490
+ wait_for(30, || {
13491
+ let Some(chain_info) = get_chain_info_opt(&conf) else {
13492
+ return Ok(false);
13493
+ };
13494
+ Ok(chain_info.stacks_tip_height == block_n.stacks_height + 2)
13495
+ })
13496
+ .expect("Timed out waiting for height to advance to block N+2");
13497
+
13498
+ wait_for_chains().expect("Timed out waiting for Rl2 to reach N+2");
13486
13499
13487
13500
info!("------------------------- Shutdown -------------------------");
13488
13501
signer_test.shutdown();
0 commit comments