diff --git a/libsigner/src/v1/messages.rs b/libsigner/src/v1/messages.rs index a84ba98c6..d67edd1ce 100644 --- a/libsigner/src/v1/messages.rs +++ b/libsigner/src/v1/messages.rs @@ -1448,7 +1448,8 @@ mod test { use super::{StacksMessageCodecExtensions, *}; - #[test] + // This test is disabled because the last signer slot can't be introduced until after Nakamoto + // #[test] fn signer_slots_count_is_sane() { let slot_identifiers_len = MessageSlotID::ALL.len(); assert!( diff --git a/stacks-common/src/libcommon.rs b/stacks-common/src/libcommon.rs index fef8f0bba..a8e4036ae 100644 --- a/stacks-common/src/libcommon.rs +++ b/stacks-common/src/libcommon.rs @@ -63,5 +63,5 @@ pub mod consts { /// The number of StackerDB slots each signing key needs /// to use to participate in DKG and block validation signing. - pub const SIGNER_SLOTS_PER_USER: u32 = 14; + pub const SIGNER_SLOTS_PER_USER: u32 = 13; } diff --git a/stacks-signer/src/client/stacks_client.rs b/stacks-signer/src/client/stacks_client.rs index 6f07bb362..5859f2e43 100644 --- a/stacks-signer/src/client/stacks_client.rs +++ b/stacks-signer/src/client/stacks_client.rs @@ -738,7 +738,7 @@ mod tests { }; use rand::thread_rng; use rand_core::RngCore; - use stacks_common::consts::{CHAIN_ID_TESTNET, SIGNER_SLOTS_PER_USER}; + use stacks_common::consts::CHAIN_ID_TESTNET; use wsts::curve::scalar::Scalar; use super::*; @@ -1121,9 +1121,13 @@ mod tests { let signer_slots = mock.client.parse_signer_slots(value).unwrap(); assert_eq!(signer_slots.len(), 5); + + /* + * This is disabled until the number of slots is again 14 signer_slots .into_iter() .for_each(|(_address, slots)| assert_eq!(slots, SIGNER_SLOTS_PER_USER as u128)); + */ } #[test] diff --git a/stackslib/src/main.rs b/stackslib/src/main.rs index 1f10492b9..27819b036 100644 --- a/stackslib/src/main.rs +++ b/stackslib/src/main.rs @@ -906,9 +906,7 @@ simulating a miner. .parse::() .expect(" not a valid u64"); let arg5 = argv[5].parse::().expect(" not a valid u64"); - let start = arg4.saturating_sub(1); - let blocks = arg5.saturating_sub(arg4); - format!("SELECT index_block_hash FROM staging_blocks ORDER BY height ASC LIMIT {start}, {blocks}") + format!("SELECT index_block_hash FROM staging_blocks WHERE height >= {arg4} AND height < {arg5} ORDER BY height ASC, index_block_hash ASC") } Some("last") => format!( "SELECT index_block_hash FROM staging_blocks ORDER BY height DESC LIMIT {}",