Skip to content

Commit 0ece14b

Browse files
authored
Merge branch 'release/2.5.0.0.4' into fix/signer-slot-count
2 parents 0f8b661 + c848473 commit 0ece14b

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

libsigner/src/v1/messages.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,8 +1448,7 @@ mod test {
14481448

14491449
use super::{StacksMessageCodecExtensions, *};
14501450

1451-
// This test is disabled because the last signer slot can't be introduced until after Nakamoto
1452-
// #[test]
1451+
#[test]
14531452
fn signer_slots_count_is_sane() {
14541453
let slot_identifiers_len = MessageSlotID::ALL.len();
14551454
assert!(

stacks-common/src/libcommon.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ pub mod consts {
6363

6464
/// The number of StackerDB slots each signing key needs
6565
/// to use to participate in DKG and block validation signing.
66-
pub const SIGNER_SLOTS_PER_USER: u32 = 13;
66+
pub const SIGNER_SLOTS_PER_USER: u32 = 14;
6767
}

stacks-signer/src/client/stacks_client.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ mod tests {
738738
};
739739
use rand::thread_rng;
740740
use rand_core::RngCore;
741-
use stacks_common::consts::CHAIN_ID_TESTNET;
741+
use stacks_common::consts::{CHAIN_ID_TESTNET, SIGNER_SLOTS_PER_USER};
742742
use wsts::curve::scalar::Scalar;
743743

744744
use super::*;
@@ -1121,13 +1121,9 @@ mod tests {
11211121

11221122
let signer_slots = mock.client.parse_signer_slots(value).unwrap();
11231123
assert_eq!(signer_slots.len(), 5);
1124-
1125-
/*
1126-
* This is disabled until the number of slots is again 14
11271124
signer_slots
11281125
.into_iter()
11291126
.for_each(|(_address, slots)| assert_eq!(slots, SIGNER_SLOTS_PER_USER as u128));
1130-
*/
11311127
}
11321128

11331129
#[test]

stackslib/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,9 @@ simulating a miner.
906906
.parse::<u64>()
907907
.expect("<start_block> not a valid u64");
908908
let arg5 = argv[5].parse::<u64>().expect("<end_block> not a valid u64");
909-
format!("SELECT index_block_hash FROM staging_blocks WHERE height >= {arg4} AND height < {arg5} ORDER BY height ASC, index_block_hash ASC")
909+
let start = arg4.saturating_sub(1);
910+
let blocks = arg5.saturating_sub(arg4);
911+
format!("SELECT index_block_hash FROM staging_blocks ORDER BY height ASC LIMIT {start}, {blocks}")
910912
}
911913
Some("last") => format!(
912914
"SELECT index_block_hash FROM staging_blocks ORDER BY height DESC LIMIT {}",

0 commit comments

Comments
 (0)