Skip to content

Commit d68bc28

Browse files
Merge #6785: test: fix intermittent error in wait_for_quorum_commitment
928cf34 test: use '0'x96 instead 00000..0 (Konstantin Akimov) ab9fc70 test: apply default 0.05 delay for wait_for_quorum_commitment (Konstantin Akimov) 848433c fix: intermittent error in functional tests while waiting final quorum commitment (Konstantin Akimov) 3509e55 feat: a bit of extra logs when no DB_VVEC in database (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented Fixes #6748 RPC `dkgstatus` return mineable commitment even if node does not have any information about quorum commitment. See `CQuorumBlockProcessor::GetMineableCommitments` for details of implementation. It happens if `wait_for_quorum_commitment` is called before node received QC by p2p. commitment: {'version': 3, 'llmqType': 104, 'quorumHash': '70bd80a3e00da0c13ba11a12e5e3665baf1c5574f5b3003bb5b31500cab5cec9', 'quorumIndex': 0, 'signersCount': 0, 'signers': '00', 'validMembersCount': 0, 'validMembers': '00', 'quorumPublicKey': '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 'quorumVvecHash': '0000000000000000000000000000000000000000000000000000000000000000', 'quorumSig': '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 'membersSig': '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' } This failure can happen not only for feature_asset_locks.py but for each functional tests that uses quorums, but it happened most often for feature_asset_locks.py because there is only 2 nodes instead 3 and it happens more often. Issue indeed has been observed by me in other functional tests, but that had happens rarely compare to feature_asset_locks.py ## What was done? Helper `wait_for_quorum_commitment` validates that not just commitment is provided (which can be mock), but a public key is not 00...00. ## How Has This Been Tested? Run multiple feature_asset_locks.py and wait for a failure like that to happen, which happens no more with this PR: 2025-07-08T16:39:57.003000Z TestFramework (INFO): Mining final commitment 2025-07-08T16:39:58.019000Z TestFramework (INFO): Waiting for quorum to appear in the list 2025-07-08T16:39:58.019000Z TestFramework (INFO): quorums: {'llmq_test': ['165c35bff42cae1499590010f323bba4e19922639ea220220017aae028df0281', '6bb33b6cd447df28f8adb171b93001e6b223bb42662466795f7fd482ddfc7fbf'], 'llmq_test_instantsend': ['165c35bff42cae1499590010f323bba4e19922639ea220220017aae028df0281', '6bb33b6cd447df28f8adb171b93001e6b223bb42662466795f7fd482ddfc7fbf'], 'llmq_test_dip0024': [], 'llmq_test_platform': ['165c35bff42cae1499590010f323bba4e19922639ea220220017aae028df0281', '6bb33b6cd447df28f8adb171b93001e6b223bb42662466795f7fd482ddfc7fbf']} 2025-07-08T16:40:58.050000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: '''' 2025-07-08T16:40:58.9769454Z def wait_func(): 2025-07-08T16:40:58.9769845Z return quorum_hash in self.nodes[0].quorum('list')[llmq_type_name] ## 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 - [x] 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 ACKs for top commit: UdjinM6: utACK 928cf34 kwvg: utACK 928cf34 Tree-SHA512: 2d96ac633bd7178fc9457fb5cc7dd8eac971689071fc951cd77d6ab847a4f451ac5a17707ede6c58af3631d3be1abb4c22aa059fdde2599275303c15d09b61eb
2 parents b137979 + 928cf34 commit d68bc28

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/llmq/dkgsessionmgr.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,9 @@ bool CDKGSessionManager::GetVerifiedContributions(Consensus::LLMQType llmqType,
317317
if (it == contributionsCache.end()) {
318318
CDataStream s(SER_DISK, CLIENT_VERSION);
319319
if (!db->ReadDataStream(std::make_tuple(DB_VVEC, llmqType, pQuorumBaseBlockIndex->GetBlockHash(), proTxHash), s)) {
320+
LogPrint(BCLog::LLMQ, "%s -- this node does not have vvec for llmq=%d block=%s protx=%s\n",
321+
__func__, ToUnderlying(llmqType), pQuorumBaseBlockIndex->GetBlockHash().ToString(),
322+
proTxHash.ToString());
320323
return false;
321324
}
322325
size_t vvec_size = ReadCompactSize(s);

test/functional/test_framework/test_framework.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2072,13 +2072,15 @@ def check_dkg_comitments():
20722072
continue
20732073
if c["quorumHash"] != quorum_hash:
20742074
continue
2075+
if c["quorumPublicKey"] == '0' * 96:
2076+
continue
20752077
c_ok = True
20762078
break
20772079
if not c_ok:
20782080
return False
20792081
return True
20802082

2081-
self.wait_until(check_dkg_comitments, timeout=timeout, sleep=1)
2083+
self.wait_until(check_dkg_comitments, timeout=timeout)
20822084

20832085
def wait_for_quorum_list(self, quorum_hash, nodes, timeout=15, llmq_type_name="llmq_test"):
20842086
def wait_func():

0 commit comments

Comments
 (0)