Skip to content

test: wait for all quorum member connections - #7468

Draft
thepastaclaw wants to merge 2 commits into
dashpay:developfrom
thepastaclaw:tracker-2090
Draft

test: wait for all quorum member connections#7468
thepastaclaw wants to merge 2 commits into
dashpay:developfrom
thepastaclaw:tracker-2090

Conversation

@thepastaclaw

Copy link
Copy Markdown

Issue being fixed or feature implemented

The first mine_quorum() in feature_llmq_connections.py could advance into DKG phase 2 before every selected member had established its required authenticated quorum connections. The failed CI logs in #7466 show two members announcing their contributions before their relay links were ready; those contributions never left their originators, so the test remained below five received contributions until its existing 120-second sanitizer-adjusted wait expired.

The race came from wait_for_quorum_connections() returning from inside its masternode loop after the first matching member was ready. This PR fixes #7466.

Tracker: thepastaclaw/tracker#2090

What was done?

  • Check every visible matching DKG session instead of returning after the first ready member.
  • Require the expected number of matching quorum-member sessions, while continuing to ignore supplied nonmembers that correctly have no session.
  • Keep advancing mocktime through the existing retry callback until the complete connection predicate is satisfied.
  • Add framework unit coverage for an incomplete member, all members ready, and a missing expected member session.

How Has This Been Tested?

  • PYTHONPATH=test/functional python3 -m unittest test_framework.test_framework.TestFrameworkQuorumConnections
  • python3 test/functional/feature_llmq_connections.py --randomseed=3108379943187254370 --portseed=62090 ... (the retained failing CI seed)
  • Three additional consecutive feature_llmq_connections.py runs with distinct seeds and port seeds
  • test/lint/lint-python.py
  • test/lint/lint-whitespace.py
  • python3 -m py_compile test/functional/test_framework/test_framework.py test/functional/test_runner.py
  • git diff --check upstream/develop...HEAD

The focused functional validation used a local macOS debug build. The original failure was observed in Linux UBSan CI; this PR remains draft for the repository's sanitizer and full functional-test coverage.

Breaking Changes

None.

Checklist

  • 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
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

thepastaclaw and others added 2 commits July 15, 2026 15:57
Fix wait_for_quorum_connections returning after the first ready member. Keep polling until every matching DKG session has the expected authenticated connections, and cover the multi-member readiness predicate with a framework unit test.

Co-Authored-By: Claude <noreply@anthropic.com>
Thread the expected member count into quorum connection waits so missing member sessions cannot be mistaken for nonmembers. Simplify the readiness predicate and cover incomplete, complete, and missing-session cases independently.

Co-Authored-By: Claude <noreply@anthropic.com>
@thepastaclaw

thepastaclaw commented Jul 21, 2026

Copy link
Copy Markdown
Author

✅ Final review complete — no blockers (commit 1666123)

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Codex + Sonnet

The final implementation correctly checks every visible matching DKG session and requires the expected number of member sessions before reporting readiness. All production callers pass the corresponding expected member count, and the focused tests cover incomplete connections, complete readiness, and a missing session; no in-scope defect remains.

Review provenance

  • Codex reviewers: gpt-5.6-sol — general (completed), gpt-5.6-sol — dash-core-commit-history (completed)
  • Verifier: gpt-5.6-sol — final-verifier (fallback)
  • Sonnet reviewers: claude-sonnet-5 — general (failed), claude-sonnet-5 — dash-core-commit-history (completed), claude-sonnet-5 — general (completed)

Note: GitHub does not allow PastaClaw to submit an approval or request changes on their own PR, so the canonical verifier result is transported as a COMMENT review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: feature_llmq_connections.py intermittently times out waiting for DKG phase 2 under UBSan

1 participant