Skip to content

Commit c07343b

Browse files
authored
Merge branch 'develop' into feat/recover-events
2 parents 326bcf3 + a2dcd4c commit c07343b

File tree

5 files changed

+20
-17
lines changed

5 files changed

+20
-17
lines changed

stackslib/src/net/download/nakamoto/tenure.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,12 @@ impl TenureStartEnd {
325325
wt_start.winning_block_id.clone(),
326326
wt_end.winning_block_id.clone(),
327327
rc,
328-
downloader_block_height_to_reward_cycle(
329-
pox_constants,
330-
first_burn_height,
331-
wt_start.burn_height,
332-
)
333-
.expect(&format!(
334-
"FATAL: tenure from before system start ({} <= {})",
335-
wt_start.burn_height, first_burn_height
336-
)),
328+
pox_constants
329+
.block_height_to_reward_cycle(first_burn_height, wt_start.burn_height)
330+
.expect(&format!(
331+
"FATAL: tenure from before system start ({} <= {})",
332+
wt_start.burn_height, first_burn_height
333+
)),
337334
wt.processed,
338335
);
339336
tenure_start_end.fetch_end_block = true;

stackslib/src/net/download/nakamoto/tenure_downloader_set.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,12 @@ impl NakamotoTenureDownloaderSet {
407407
continue;
408408
};
409409

410+
info!("Download tenure {}", &ch;
411+
"tenure_start_block" => %tenure_info.start_block_id,
412+
"tenure_end_block" => %tenure_info.end_block_id,
413+
"tenure_start_reward_cycle" => tenure_info.start_reward_cycle,
414+
"tenure_end_reward_cycle" => tenure_info.end_reward_cycle);
415+
410416
debug!(
411417
"Download tenure {} (start={}, end={}) (rc {},{})",
412418
&ch,

stackslib/src/net/inv/nakamoto.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@ impl NakamotoTenureInv {
679679
}
680680
StacksMessageType::Nack(nack_data) => {
681681
info!("{:?}: remote peer NACKed our GetNakamotoInv", network.get_local_peer();
682+
"remote_peer" => %self.neighbor_address,
682683
"error_code" => nack_data.error_code);
683684

684685
if nack_data.error_code != NackErrorCodes::NoSuchBurnchainBlock {

testnet/stacks-node/src/tests/nakamoto_integrations.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,7 @@ fn multiple_miners() {
21082108
let node_2_p2p = 51025;
21092109
let http_origin = format!("http://{}", &naka_conf.node.rpc_bind);
21102110
naka_conf.miner.wait_on_interim_blocks = Duration::from_secs(1);
2111-
naka_conf.node.pox_sync_sample_secs = 5;
2111+
naka_conf.node.pox_sync_sample_secs = 30;
21122112
let sender_sk = Secp256k1PrivateKey::new();
21132113
let sender_signer_sk = Secp256k1PrivateKey::new();
21142114
let sender_signer_addr = tests::to_addr(&sender_signer_sk);
@@ -3728,7 +3728,7 @@ fn follower_bootup_across_multiple_cycles() {
37283728

37293729
let (mut naka_conf, _miner_account) = naka_neon_integration_conf(None);
37303730
naka_conf.miner.wait_on_interim_blocks = Duration::from_secs(1);
3731-
naka_conf.node.pox_sync_sample_secs = 5;
3731+
naka_conf.node.pox_sync_sample_secs = 30;
37323732
naka_conf.burnchain.max_rbf = 10_000_000;
37333733

37343734
let sender_sk = Secp256k1PrivateKey::new();
@@ -3852,7 +3852,6 @@ fn follower_bootup_across_multiple_cycles() {
38523852
follower_conf.node.p2p_bind = format!("{localhost}:{p2p_port}");
38533853
follower_conf.node.data_url = format!("http://{localhost}:{rpc_port}");
38543854
follower_conf.node.p2p_address = format!("{localhost}:{p2p_port}");
3855-
follower_conf.node.pox_sync_sample_secs = 30;
38563855

38573856
let node_info = get_chain_info(&naka_conf);
38583857
follower_conf.node.add_bootstrap_node(
@@ -8120,7 +8119,7 @@ fn mock_mining() {
81208119

81218120
let (mut naka_conf, _miner_account) = naka_neon_integration_conf(None);
81228121
naka_conf.miner.wait_on_interim_blocks = Duration::from_secs(1);
8123-
naka_conf.node.pox_sync_sample_secs = 5;
8122+
naka_conf.node.pox_sync_sample_secs = 30;
81248123
let sender_sk = Secp256k1PrivateKey::new();
81258124
let sender_signer_sk = Secp256k1PrivateKey::new();
81268125
let sender_signer_addr = tests::to_addr(&sender_signer_sk);

testnet/stacks-node/src/tests/signer/v0.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,7 +1472,7 @@ fn multiple_miners() {
14721472
config.node.data_url = format!("http://{localhost}:{node_1_rpc}");
14731473
config.node.p2p_address = format!("{localhost}:{node_1_p2p}");
14741474
config.miner.wait_on_interim_blocks = Duration::from_secs(5);
1475-
config.node.pox_sync_sample_secs = 5;
1475+
config.node.pox_sync_sample_secs = 30;
14761476

14771477
config.node.seed = btc_miner_1_seed.clone();
14781478
config.node.local_peer_seed = btc_miner_1_seed.clone();
@@ -1767,7 +1767,7 @@ fn miner_forking() {
17671767
config.node.local_peer_seed = btc_miner_1_seed.clone();
17681768
config.burnchain.local_mining_public_key = Some(btc_miner_1_pk.to_hex());
17691769
config.miner.mining_key = Some(Secp256k1PrivateKey::from_seed(&[1]));
1770-
config.node.pox_sync_sample_secs = 5;
1770+
config.node.pox_sync_sample_secs = 30;
17711771

17721772
config.events_observers.retain(|listener| {
17731773
let Ok(addr) = std::net::SocketAddr::from_str(&listener.endpoint) else {
@@ -3444,7 +3444,7 @@ fn multiple_miners_with_nakamoto_blocks() {
34443444
config.node.data_url = format!("http://{localhost}:{node_1_rpc}");
34453445
config.node.p2p_address = format!("{localhost}:{node_1_p2p}");
34463446
config.miner.wait_on_interim_blocks = Duration::from_secs(5);
3447-
config.node.pox_sync_sample_secs = 5;
3447+
config.node.pox_sync_sample_secs = 30;
34483448

34493449
config.node.seed = btc_miner_1_seed.clone();
34503450
config.node.local_peer_seed = btc_miner_1_seed.clone();
@@ -3707,7 +3707,7 @@ fn partial_tenure_fork() {
37073707
config.node.data_url = format!("http://{localhost}:{node_1_rpc}");
37083708
config.node.p2p_address = format!("{localhost}:{node_1_p2p}");
37093709
config.miner.wait_on_interim_blocks = Duration::from_secs(5);
3710-
config.node.pox_sync_sample_secs = 5;
3710+
config.node.pox_sync_sample_secs = 30;
37113711

37123712
config.node.seed = btc_miner_1_seed.clone();
37133713
config.node.local_peer_seed = btc_miner_1_seed.clone();

0 commit comments

Comments
 (0)