-
Notifications
You must be signed in to change notification settings - Fork 1.2k
test: fix remaining feature_asset_locks flake from autonomous MnEHF signal txs #7509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2151,20 +2151,13 @@ def check_dkg_session(): | |
|
|
||
| self.wait_until(check_dkg_session, timeout=timeout, sleep=sleep) | ||
|
|
||
| def node_has_quorum_commitment(self, node, quorum_hash, llmq_type): | ||
| def node_quorum_commitment_types(self, node, quorum_hash): | ||
| s = node.quorum("dkgstatus") | ||
| if "minableCommitments" not in s: | ||
| return False | ||
| commits = s["minableCommitments"] | ||
| for c in commits: | ||
| if c["llmqType"] != llmq_type: | ||
| continue | ||
| if c["quorumHash"] != quorum_hash: | ||
| continue | ||
| if c["quorumPublicKey"] == '0' * 96: | ||
| continue | ||
| return True | ||
| return False | ||
| return {c["llmqType"] for c in s.get("minableCommitments", []) | ||
| if c["quorumHash"] == quorum_hash and c["quorumPublicKey"] != '0' * 96} | ||
|
|
||
| def node_has_quorum_commitment(self, node, quorum_hash, llmq_type): | ||
| return llmq_type in self.node_quorum_commitment_types(node, quorum_hash) | ||
|
|
||
| def wait_for_quorum_commitment(self, quorum_hash, mninfos, llmq_type=100, timeout=15): | ||
| def check_dkg_comitments(): | ||
|
|
@@ -2175,6 +2168,20 @@ def check_dkg_comitments(): | |
|
|
||
| self.wait_until(check_dkg_comitments, timeout=timeout) | ||
|
|
||
| def wait_for_quorum_commitments_on_miner(self, quorum_hash, mninfos, timeout=15): | ||
| # The final-commitment block carries a commitment for every llmq type whose mining | ||
| # window is open, so a commitment that has not reached the mining node in time is | ||
| # mined as a null one and its quorum is silently skipped for the whole cycle. Only | ||
| # commitments the masternodes actually produced are awaited, so a type whose DKG | ||
| # legitimately produced nothing does not hold this up. | ||
| def check_miner_commitments(): | ||
| expected = set() | ||
| for mn in mninfos: | ||
| expected |= self.node_quorum_commitment_types(mn.get_node(self), quorum_hash) | ||
| return expected <= self.node_quorum_commitment_types(self.nodes[0], quorum_hash) | ||
|
Comment on lines
+2177
to
+2181
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Blocking: Stabilize auxiliary commitment discovery before mining This predicate can succeed before an auxiliary LLMQ handler has finalized. The preceding source: ['codex'] |
||
|
|
||
| self.wait_until(check_miner_commitments, timeout=timeout) | ||
|
|
||
| def wait_for_quorum_list(self, quorum_hash, nodes, timeout=15, llmq_type_name="llmq_test"): | ||
| def wait_func(): | ||
| return quorum_hash in self.nodes[0].quorum('list')[llmq_type_name] | ||
|
|
@@ -2285,8 +2292,8 @@ def mine_quorum(self, llmq_type_name="llmq_test", llmq_type=100, expected_connec | |
| self.log.info("Waiting final commitment") | ||
| self.wait_for_quorum_commitment(q, mninfos_online, llmq_type=llmq_type) | ||
|
|
||
| self.log.info("Waiting final commitment on mining node") | ||
| self.wait_until(lambda: self.node_has_quorum_commitment(self.nodes[0], q, llmq_type), timeout=15) | ||
| self.log.info("Waiting final commitments on mining node") | ||
| self.wait_for_quorum_commitments_on_miner(q, mninfos_online) | ||
|
|
||
| self.log.info("Mining final commitment") | ||
| self.bump_mocktime(1) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an undriven LLMQ type's independent phase-handler thread is slower than the driven type, none of the queried masternodes may advertise that auxiliary commitment on the first poll. In that case
expectedcontains only the driven commitment—which the miner already has—so this subset check succeeds immediately; the following block can still be mined before the slower handler adds and relays its real commitment, recreating the null-commitment/skipped-cycle behavior this change is intended to prevent. Establish that the auxiliary handlers have finished, or otherwise stabilize the expected type set, before accepting this condition.AGENTS.md reference: AGENTS.md:L163-L165
Useful? React with 👍 / 👎.