test: reduce nodes in quorum-independent functional tests#7441
test: reduce nodes in quorum-independent functional tests#7441thepastaclaw wants to merge 2 commits into
Conversation
|
✅ Review complete (commit 944e487) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (4)
WalkthroughFunctional test configurations are reduced for single-member quorum scenarios. The test framework adds helpers to wait for confirmed masternodes and mine a single-member quorum. Quorum, ChainLock, and single-node tests use the new flow, while the governance objects test updates its node/test parameters. Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant FunctionalTest
participant DashTestFramework
participant Node
FunctionalTest->>DashTestFramework: Configure single-member quorum
FunctionalTest->>DashTestFramework: mine_quorum_single_member()
DashTestFramework->>Node: Generate blocks across DKG cycle
Node-->>DashTestFramework: Report new quorum
DashTestFramework-->>FunctionalTest: Return quorum hash
FunctionalTest->>Node: Query quorum info or verify ChainLock
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PastaPastaPasta
left a comment
There was a problem hiding this comment.
utACK 18aa0e1; I think the comments are over verbose; and commit history could be cleaner, but change itself looks fine
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Test-only PR that speeds up rpc_quorum.py and rpc_verifychainlock.py by converting them to single-member LLMQs via a new mine_quorum_single_member helper, and removes a genuinely unused masternode from feature_governance_objects.py. Verified against the local diff: the helper faithfully mirrors mine_quorum's cycle/maturity constants and the proven single-node DKG flow in feature_llmq_singlenode.py, node topology roles and all assertions are preserved, and the governance test only ever used nodes[0] with gobject list-prepared. No in-scope findings.
Source: reviewers — opus (general, completed), gpt-5.6-sol (general, failed: revoked ACP credential), opus (dash-core-commit-history, completed), gpt-5.6-sol (dash-core-commit-history, failed: revoked ACP credential); verifier — opus.
Note: GitHub does not allow me to approve my own PR, so this clean result is posted as a COMMENT.
18aa0e1 to
ea6794e
Compare
|
Addressed in ea6794e: trimmed the helper and test comments to the non-obvious rationale, and squashed the four micro-commits into one atomic test commit. All three affected functional tests pass against a fresh exact-branch build; git diff --check and focused flake8 are clean. |
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
This PR reduces node and masternode counts in three quorum-independent functional tests by introducing a mine_quorum_single_member helper and single-member LLMQs. The latest code delta from 18aa0e1 to ea6794e only trims explanatory comments/docstrings, while the rewritten head also squashes the prior clean four-commit stack into one well-described test commit; cumulative behavior and every existing assertion remain unchanged. Prior-finding reconciliation is not applicable because the 18aa0e1 review had zero verified findings, so carried-forward prior findings are none; there are no new latest-delta or additional cumulative findings.
Source: reviewers — opus (general, completed), gpt-5.6-sol (general, failed: revoked ACP credential), opus (dash-core-commit-history, completed), gpt-5.6-sol (dash-core-commit-history, failed: revoked ACP credential); verifier — opus.
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
PR #7441 is a clean test-only refactor that reduces functional-test node/masternode counts via a shared single-member quorum helper. The code is correct: node-index mapping and assertions are preserved, and the batched full-cycle mining loop is sound. The only kept finding is a non-blocking commit-hygiene suggestion.
Prior finding reconciliation
The prior review at ea6794ed had no verified findings, so reconciliation is NOT APPLICABLE and carried-forward prior findings are none.
New findings in the latest delta
One suggestion: fold the helper corrections in 1821ceff into the introducing commit ea6794ed, while keeping the feature_llmq_singlenode.py reuse as its own clean commit. Additional cumulative current-head findings: none.
Source: reviewers — opus (general, completed), gpt-5.6-sol (general, failed: revoked ACP credential), opus (dash-core-commit-history, completed), gpt-5.6-sol (dash-core-commit-history, failed: revoked ACP credential); verifier — opus (completed).
🟡 1 suggestion(s)
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `test/functional/test_framework/test_framework.py`:
- [SUGGESTION] test/functional/test_framework/test_framework.py:2232: Squash helper corrections from 1821ceff into ea6794ed; keep only the reuse as its own commit
Commit 1821ceff96c is subject-lined "test: reuse single-member quorum helper in feature_llmq_singlenode", but its body opens with "Address review feedback on mine_quorum_single_member" and most of its changes rework the mine_quorum_single_member helper that commit ea6794ed48d added one commit earlier in this same, still-unmerged PR. Verified against the delta: it drops the skip_maturity parameter that ea6794ed introduced with no caller, rewrites ea6794ed's block-by-block `generate(node, 1)` loop into a full-cycle `generate(node, llmq_cycle_len)` batch, and trims the quorumIndex/is_mature log line ea6794ed added. Because Dash merges without squashing, permanent develop history would show ea6794ed adding a dead skip_maturity param and a block-by-block loop, then the very next commit removing/rewriting both — churn and git-blame noise on code that never shipped. Fold these three helper-only corrections into ea6794ed48d so the helper is introduced in its final form. The remaining change in 1821ceff — replacing feature_llmq_singlenode.py's local mine_single_node_quorum with the shared helper and dropping the now-unused time import — has durable standalone value and should stay as its own commit; once the helper fixups are squashed away, its current subject accurately describes it. Use git rebase to fixup the helper edits into ea6794ed and reword the residual commit body to drop the "Address review feedback" framing.
Add the proven single-member quorum flow to DashTestFramework and use it to shrink three functional tests to the minimum masternode count they need: - rpc_quorum.py: 4 nodes / 3 masternodes -> 2 / 1 - rpc_verifychainlock.py: 5 / 3 -> 3 / 1 - feature_governance_objects.py: 2 / 1 -> 1 / 0 The shared mining helper preserves feature_llmq_singlenode.py's established control flow: align to the next 24-block boundary, wait for DKG processing, mine 30 blocks, and assert that the quorum list changed. It additionally returns the new quorum hash for rpc_quorum.py. Framework-prepared masternodes can miss the first DKG cycle because its work block predates their confirmedHash. Add a readiness helper that advances by whole cycles until the next work block contains every expected confirmed masternode, avoiding block-by-block generation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace feature_llmq_singlenode.py's local mine_single_node_quorum method with the shared framework helper and drop the now-unused time import. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1821cef to
944e487
Compare
There was a problem hiding this comment.
Code Review
Source: reviewers codex/general=gpt-5.6-sol (completed; parseable output with nonzero wrapper exit), sonnet5/general=claude-sonnet-5 (completed), codex/dash-core-commit-history=gpt-5.6-sol (completed), sonnet5/dash-core-commit-history=claude-sonnet-5 (completed); verifier=claude-sonnet-5; orchestrator=openai/gpt-5.6-sol (high reasoning, orchestration-only, not a reviewer/verifier).
The current two-commit stack is clean and the test-only topology reduction preserves the relevant node roles and assertions. The new readiness helper's work-block depth and regtest confirmation assumptions match the current Dash parameters; no new correctness, coverage, or history-hygiene findings remain.
Prior Reconciliation
prior-1: FIXED —c55c54f3a5cnow introducesmine_quorum_single_memberin its final form (no unusedskip_maturity, corrected full-cycle mining, and no single-memberquorumIndexlogging).944e487c431now touches onlyfeature_llmq_singlenode.pyto reuse the helper, so the thread's resolved/outdated state is accepted based on the rewritten commits.
Carried-Forward Prior Findings
None.
New Findings In Latest Delta
None. The literal 1821ceff..944e487c range crosses a rebase and includes unrelated intervening develop changes; range-diff and the current cumulative PR diff isolate the rewritten five-file change.
Additional Cumulative Findings
None.
Source (experiment sonnet-primary-opus-quarter-sample-20260710, cohort sonnet_primary, bucket 1, trigger new_push, prior head 1821cef, specialists dash-core-commit-history): reviewers codex/general=gpt-5.6-sol(completed_parseable_output_with_nonzero_wrapper_exit); sonnet5/general=claude-sonnet-5(completed); codex/dash-core-commit-history=gpt-5.6-sol(completed); sonnet5/dash-core-commit-history=claude-sonnet-5(completed); verifier=verifier-sonnet5-7441-1783823471=claude-sonnet-5; orchestrator=openai/gpt-5.6-sol reasoning=high (orchestration-only, not a reviewer/verifier).
|
The This PR changes only quorum/governance functional tests and adds LLMQ-specific helpers. It does not touch |
Summary
rpc_quorum.pyandrpc_verifychainlock.pyfeature_governance_objects.pyCoverage
The reduced topology is limited to tests where multi-member aggregation is not part of the behavior under test:
rpc_quorum.pystill verifies the address reported for every quorum memberrpc_verifychainlock.pykeeps separate non-masternode nodes, including the isolated-node ChainLock checks, and preserves all assertionsfeature_governance_objects.pyonly exercises localgobjectRPC behavior on node 0The normal quorum-mining helper waits for inter-member connections and probes that cannot exist for a one-member quorum, so this adds a narrow helper that mines until the new quorum commitment appears and then matures it.
Benchmarks
Local macOS ARM64 runs against binaries built from exact base
2bbf4a4617a:rpc_quorum.py: 19.06s -> 11.34s median over 5 runs (40.5% faster)rpc_verifychainlock.py: 23.22s -> 19.71s median over 5 runs (15.1% faster)feature_governance_objects.py: 10.64s -> 7.03s median over 3 runs (33.9% faster)Validation
test/lint/lint-python.pytest/lint/lint-tests.pypython3 -m py_compileon all changed Python filesrpc_quorum.pyrpc_verifychainlock.pyfeature_governance_objects.pyship, zero actionable findings