@@ -81,7 +81,6 @@ def run_test(self):
8181 llmq_type_name = "llmq_test_dip0024"
8282
8383 self .test_node = self .nodes [0 ].add_p2p_connection (TestP2PConn ())
84- self .test_unknown_active_membership ()
8584
8685 # Connect all nodes to node1 so that we always have the whole network connected
8786 # Otherwise only masternode connections will be established between nodes, which won't propagate TXs/blocks
@@ -119,13 +118,10 @@ def run_test(self):
119118 tip = self .nodes [0 ].getblockcount ()
120119 next_dkg = 24 - (tip % 24 )
121120 assert next_dkg < 24
122- stale_sessions = 0
123121 for mn in self .mninfo :
124122 dkg_info = mn .get_node (self ).quorum ("dkginfo" )
125123 assert_equal (dkg_info ['active_dkgs' ], 0 )
126- stale_sessions += len (mn .get_node (self ).quorum ("dkgstatus" )["session" ])
127124 assert_equal (dkg_info ['next_dkg' ], next_dkg )
128- assert stale_sessions > 0 # Expired debug sessions do not contribute to the count.
129125
130126 expectedDeleted = []
131127 expectedNew = [h_100_0 , h_100_1 ]
@@ -281,52 +277,6 @@ def run_test(self):
281277 assert_equal (rpc_qr_info ["mnListDiffAtHMinus3C" ]["baseBlockHash" ], genesis_blockhash )
282278
283279 self .test_getqrinfo_base_block_hashes_limit (int (best_block_hash , 16 ), int (hmc_base_blockhash , 16 ))
284- self .test_active_rotated_membership ()
285-
286- def test_unknown_active_membership (self ):
287- self .log .info ("Unknown active membership is counted conservatively before v20" )
288- self .nodes [0 ].sporkupdate ("SPORK_17_QUORUM_DKG_ENABLED" , 4070908800 )
289- self .wait_for_sporks_same ()
290- tip = self .nodes [0 ].getblockcount ()
291- start_height = tip + 24 - tip % 24
292- assert start_height < self .v20_height
293- self .generate (self .nodes [0 ], start_height - tip - 1 )
294- node = self .mninfo [0 ].get_node (self )
295- upcoming = node .quorum ("dkginfo" )["upcoming_dkgs" ]
296- assert upcoming
297- assert all (d ["reason" ] == "pre-v20 quorum selection needs future quorum base block hash" for d in upcoming )
298- self .generate (self .nodes [0 ], 1 )
299- info = node .quorum ("dkginfo" )
300- assert info ["active_dkgs" ] > 0
301- assert_equal (info ["active_dkgs" ], self .expected_active_dkgs (upcoming , start_height ))
302- assert_equal (node .quorum ("dkgstatus" )["session" ], [])
303- self .generate (self .nodes [0 ], 13 )
304- assert_equal (node .quorum ("dkginfo" )["active_dkgs" ], 0 )
305-
306- def test_active_rotated_membership (self ):
307- self .log .info ("Active rotated membership is counted without DKG initialization" )
308- self .nodes [0 ].sporkupdate ("SPORK_17_QUORUM_DKG_ENABLED" , 4070908800 )
309- self .wait_for_sporks_same ()
310- node = self .mninfo [0 ].get_node (self )
311- tip = self .nodes [0 ].getblockcount ()
312- start_height = tip + 24 - tip % 24
313- self .generate (self .nodes [0 ], start_height - tip - 1 )
314- upcoming = {mn .proTxHash : node .quorum ("dkginfo" , mn .proTxHash )["upcoming_dkgs" ] for mn in self .mninfo }
315-
316- # Each index's Commit phase ends after 10 blocks, independently of the
317- # shared mining window starting 12 blocks after the cycle base.
318- for offset in (0 , 1 , 9 , 10 , 11 , 12 , 13 ):
319- height = start_height + offset
320- self .generate (self .nodes [0 ], height - self .nodes [0 ].getblockcount ())
321- counts = [node .quorum ("dkginfo" , mn .proTxHash )["active_dkgs" ] for mn in self .mninfo ]
322- assert_equal (counts , [self .expected_active_dkgs (upcoming [mn .proTxHash ], height ) for mn in self .mninfo ])
323- # All other enabled regtest types share the cycle base, so only index 1 remains at offset 10.
324- if offset == 10 :
325- assert sum (counts ) > 0
326- elif offset > 10 :
327- assert_equal (sum (counts ), 0 )
328- sessions = node .quorum ("dkgstatus" )["session" ]
329- assert all (d ["status" ]["quorumHeight" ] < start_height for d in sessions )
330280
331281 def test_duplicate_rotated_commitment (self , quorum_info , llmq_type ):
332282 self .log .info ("A block mining one rotated commitment twice instead of its sibling is rejected" )
0 commit comments