Skip to content

test: wait for MN disconnect after in-place ProUpServ migration - #7610

Open
PastaPastaPasta wants to merge 1 commit into
dashpay:developfrom
PastaPastaPasta:test/protx-version-sync-after-upserv
Open

test: wait for MN disconnect after in-place ProUpServ migration#7610
PastaPastaPasta wants to merge 1 commit into
dashpay:developfrom
PastaPastaPasta:test/protx-version-sync-after-upserv

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

  • feature_protx_version.py flakes on the ASAN job because a post-v24 in-place update_service migration re-encodes pubKeyOperator. CMNAuth then drops verified connections, and the default generate()sync_all() path asserts that every node still has at least one peer.
  • Same race this test already handles for revoke and registrar key rotation; this path was missing sync_fun=self.no_op.

What was done?

  • Mine the ProUpServTx with sync_fun=self.no_op.
  • Wait for the migrated masternode's old peers to disconnect, reconnect it to node 0, then sync_all().
  • Keep the protx / getrawtransaction checks on the mining node, which already has the block.

How Has This Been Tested?

  • Compared against the existing revoke and update_registrar disconnect handling in the same file.
  • Root-caused from https://github.com/PastaPastaPasta/dash/actions/runs/31740186678/job/94598843934 (feature_protx_version.py failed 3/3 on sync_blocks peer-count assert; no AddressSanitizer report).
  • Did not re-run the full functional test locally; it is a long masternode test and the failure is a timing race that shows up under ASAN slowdown.

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)

This pull request was created by Codex.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@thepastaclaw

thepastaclaw commented Aug 13, 2026

Copy link
Copy Markdown

✅ Final review complete — no blockers (commit 107171b)

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c7ec4930-62dd-4085-a28f-036a1362d678

📥 Commits

Reviewing files that changed from the base of the PR and between 06501c3 and 5363852.

📒 Files selected for processing (1)
  • test/functional/feature_protx_version.py

Walkthrough

The migration test now generates the update transaction without automatic synchronization. It records peer IDs before block generation and waits for those peers to disconnect after CMNAuth changes. The test then performs the existing reconnect and synchronization steps.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 53638

This localized test synchronization change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Possibly related PRs

  • dashpay/dash#7302: Both changes cover legacy-to-v3 ProTx migration scenarios in feature_protx_version.py.
  • dashpay/dash#7473: This change refines the migration test flow for peer disconnection and reconnection.
  • dashpay/dash#7506: Both changes track peers and wait for disconnections during ProTx migration.

Suggested reviewers: knst

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the ASAN timing race, the test changes, testing status, and absence of breaking changes.
Title check ✅ Passed The title clearly and concisely describes the test change that waits for masternode disconnection after in-place ProUpServ migration.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Final validation — Codex/Sol only (Phase 2 disabled)

The exact-head diff correctly suppresses the premature implicit synchronization, waits for all pre-migration peer connections to be replaced, reconnects the migrated masternode, and then synchronizes the network. This matches the established registrar-key-rotation and revocation handling in the same test, and no actionable correctness issues were found.
Source: reviewer backend gpt-5.6-sol; final verifier backend gpt-5.6-sol. openclaw-agent/cliproxy/gpt-5.6-sol was orchestration-only and is not reviewer evidence.

Validated zero-blocker Codex/Sol precheck evidence was promoted to final because Phase 2 (Sonnet/Opus) is temporarily disabled. This is Codex/Sol-only final validation, not Codex + Sonnet/Opus coverage.

Review provenance

  • Codex reviewers: gpt-5.6-sol — general (completed)
  • Verifier: gpt-5.6-sol — verifier
  • Sonnet/Opus: not run (Phase 2 disabled — temporary Codex/Sol-only final)
  • Secondary pass: disabled (temporary_phase2_sonnet_disable)

@PastaPastaPasta PastaPastaPasta left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

LGTM

A v3 update_service re-encodes the operator key, so CMNAuth drops
verified connections the same way a key rotation does. Syncing during
that window can leave a node with zero peers.
@PastaPastaPasta
PastaPastaPasta force-pushed the test/protx-version-sync-after-upserv branch from 5363852 to 107171b Compare August 15, 2026 19:51

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Final validation — Codex/Sol only (Phase 2 disabled)

At exact head 107171b, the change correctly suppresses implicit synchronization during CMNAuth teardown, waits for the pre-migration peer connections to disappear, reconnects the migrated masternode, and then synchronizes the network. This matches the established handling for operator-key rotation and revocation in the same functional test, and no actionable issues were found.
Source: reviewer backend model gpt-5.6-sol; final verifier backend model gpt-5.6-sol. openclaw-agent/cliproxy/gpt-5.6-sol is orchestration-only and not reviewer evidence.

Validated zero-blocker Codex/Sol precheck evidence was promoted to final because Phase 2 (Sonnet/Opus) is temporarily disabled. This is Codex/Sol-only final validation, not Codex + Sonnet/Opus coverage.

Review provenance

  • Codex reviewers: gpt-5.6-sol — general (completed)
  • Verifier: gpt-5.6-sol — verifier
  • Sonnet/Opus: not run (Phase 2 disabled — temporary Codex/Sol-only final)
  • Secondary pass: disabled (temporary_phase2_sonnet_disable)

@knst knst left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ACK 107171b

Failure rate dropped from 50% to 0% on my environment

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.

3 participants