File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -1449,6 +1449,8 @@ mod test {
1449
1449
use super :: { StacksMessageCodecExtensions , * } ;
1450
1450
1451
1451
#[ test]
1452
+ #[ should_panic]
1453
+ // V1 signer slots do not have enough slots in Epoch 2.5. Something will need to be updated!
1452
1454
fn signer_slots_count_is_sane ( ) {
1453
1455
let slot_identifiers_len = MessageSlotID :: ALL . len ( ) ;
1454
1456
assert ! (
Original file line number Diff line number Diff line change @@ -63,5 +63,20 @@ pub mod consts {
63
63
64
64
/// The number of StackerDB slots each signing key needs
65
65
/// to use to participate in DKG and block validation signing.
66
- pub const SIGNER_SLOTS_PER_USER : u32 = 14 ;
66
+ pub const SIGNER_SLOTS_PER_USER : u32 = 13 ;
67
+ }
68
+
69
+ /// This test asserts that the constant above doesn't change.
70
+ /// This exists because the constant above is used by Epoch 2.5 instantiation code.
71
+ ///
72
+ /// Adding more slots will require instantiating more .signers contracts through either
73
+ /// consensus changes (i.e., a new epoch) or through non-consensus-critical contract
74
+ /// deployments.
75
+ #[ test]
76
+ fn signer_slots_count_2_5 ( ) {
77
+ assert_eq ! (
78
+ consts:: SIGNER_SLOTS_PER_USER ,
79
+ 13 ,
80
+ "The .signers-x-y contracts in Epoch 2.5 were instantiated with 13 slots"
81
+ ) ;
67
82
}
Original file line number Diff line number Diff line change @@ -1090,7 +1090,7 @@ mod tests {
1090
1090
let principal_data = StacksAddress :: from_string ( signer) . unwrap ( ) . into ( ) ;
1091
1091
1092
1092
let data_map = [
1093
- ( "num-slots" . into ( ) , ClarityValue :: UInt ( 14 ) ) ,
1093
+ ( "num-slots" . into ( ) , ClarityValue :: UInt ( 13 ) ) ,
1094
1094
(
1095
1095
"signer" . into ( ) ,
1096
1096
ClarityValue :: Principal ( PrincipalData :: Standard ( principal_data) ) ,
You can’t perform that action at this time.
0 commit comments