Skip to content

Commit 981c2f8

Browse files
Merge #6671: test: intermittent error due to missing _other_ quorums
b0dea8c test: extra logs for wait-for-CL and wait-for-IS (Konstantin Akimov) 49ae952 fix: intermittent error in feature_notification.py due to missing quorum for CL (Konstantin Akimov) 538687b fix: intermittent error in p2p_instantsend.py due to missing quorum for CL (Konstantin Akimov) 834d2f6 test: fix intermittert error in feature_asset_locks.py due to missing IS quorum (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented In functional test `feature_asset_locks.py` a quorum for InstantSend is not generated intentionally but usually it is enough time to be formed while other quorums are generated. Similar situation for `p2p_instantsend.py` and `feature_notifications.py`. This fix is one of the blockers for #6631 because with smaller delays extra quorums (beyond expected) almost never formed. Example of logs: 2025-05-15T19:50:51.884000Z TestFramework (INFO): Test no IS for asset unlock... 2025-05-15T19:50:52.892000Z TestFramework (INFO): Send tx with expected_error:'None'... 2025-05-15T19:51:54.214000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: '''' def check_instantlock(): self.bump_mocktime(1) try: return node.getrawtransaction(txid, True)["instantlock"] except: return False .... not true after 60.0 seconds Meanwhile, there's just no quorum for signing InstantSend, logs from nodes: node3 2025-05-15T19:50:54.054321Z (mocktime: 2014-12-04T18:19:47Z) [ scheduler] [llmq/signing.cpp:712] [AsyncSignIfMember] [llmq] CSigningManager::AsyncSignIfMember -- failed to select quorum. id=ce79d1f19020ec65caa8a81306362ddad6ffd0e6fc45e18c83630f401b38d54c, msgHash=83b6e8b1549ad9f2750e13e61aabdf08fd31eb1e80cbbd3729920c4c840318ae ## What was done? ## How Has This Been Tested? Run functional tests ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK b0dea8c PastaPastaPasta: utACK b0dea8c Tree-SHA512: e4455f859d83a7933e7dd48b0214199d98e6242f03817c64ac351bef39422a713f332540ea0fffed92785b346541a6cafdece5488b9665805384c9033a5a9cb9
2 parents 5410f36 + b0dea8c commit 981c2f8

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

test/functional/feature_asset_locks.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,17 @@ def test_asset_locks(self, node_wallet, node, pubkey):
320320
extra_lock_tx = self.create_assetlock(coin, COIN, pubkey)
321321
self.create_and_check_block([extra_lock_tx], expected_error = 'bad-cbtx-assetlocked-amount')
322322

323-
self.log.info("Mine a quorum...")
324-
self.mine_quorum_2_nodes()
323+
self.log.info("Mine IS quorum")
324+
if len(self.nodes[0].quorum('list')['llmq_test_instantsend']) == 0:
325+
self.mine_quorum(llmq_type_name='llmq_test_instantsend', expected_members=2, expected_connections=1, expected_contributions=2, expected_commitments=2, llmq_type=104)
326+
else:
327+
self.log.info("IS quorum exist")
328+
329+
self.log.info("Mine a platform quorum")
330+
if len(self.nodes[0].quorum('list')['llmq_test_platform']) == 0:
331+
self.mine_quorum_2_nodes()
332+
else:
333+
self.log.info("Platform quorum exist")
325334

326335
self.validate_credit_pool_balance(locked_1)
327336

test/functional/feature_notifications.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,13 @@ def run_test(self):
103103
self.nodes[0].sporkupdate("SPORK_17_QUORUM_DKG_ENABLED", 0)
104104
self.nodes[0].sporkupdate("SPORK_19_CHAINLOCKS_ENABLED", 4070908800)
105105
self.wait_for_sporks_same()
106+
self.log.info("Mine quorum for InstantSend")
106107
(quorum_info_i_0, quorum_info_i_1) = self.mine_cycle_quorum()
108+
self.log.info("Mine quorum for ChainLocks")
109+
if len(self.nodes[0].quorum('list')['llmq_test']) == 0:
110+
self.mine_quorum(llmq_type_name='llmq_test', llmq_type=104)
111+
else:
112+
self.log.info("Quorum `llmq_test` already exist")
107113
self.nodes[0].sporkupdate("SPORK_19_CHAINLOCKS_ENABLED", 0)
108114
self.wait_for_sporks_same()
109115

test/functional/p2p_instantsend.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ def set_test_params(self):
2323
def run_test(self):
2424
self.nodes[0].sporkupdate("SPORK_17_QUORUM_DKG_ENABLED", 0)
2525
self.wait_for_sporks_same()
26+
self.log.info("Mine quorum for InstantSend")
2627
(quorum_info_i_0, quorum_info_i_1) = self.mine_cycle_quorum()
28+
self.log.info("Mine quorum for ChainLocks")
29+
if len(self.nodes[0].quorum('list')['llmq_test']) == 0:
30+
self.mine_quorum(llmq_type_name='llmq_test', llmq_type=104)
31+
else:
32+
self.log.info("Quorum `llmq_test` already exist")
2733

2834
self.test_mempool_doublespend()
2935
self.test_block_doublespend()

test/functional/test_framework/test_framework.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,6 +1652,7 @@ def check_instantlock():
16521652
return node.getrawtransaction(txid, True)["instantlock"]
16531653
except:
16541654
return False
1655+
self.log.info(f"Expecting InstantLock for {txid}")
16551656
if self.wait_until(check_instantlock, timeout=timeout, sleep=1, do_assert=expected) and not expected:
16561657
raise AssertionError("waiting unexpectedly succeeded")
16571658

@@ -1662,6 +1663,7 @@ def check_chainlocked_block():
16621663
return block["confirmations"] > 0 and block["chainlock"]
16631664
except:
16641665
return False
1666+
self.log.info(f"Expecting ChainLock for {block_hash}")
16651667
if self.wait_until(check_chainlocked_block, timeout=timeout, sleep=0.1, do_assert=expected) and not expected:
16661668
raise AssertionError("waiting unexpectedly succeeded")
16671669

0 commit comments

Comments
 (0)