Skip to content

test: adds QSENDRECSIGS functional tests for watchquorum nodes#7301

Open
knst wants to merge 1 commit intodashpay:developfrom
knst:tests-for-7293
Open

test: adds QSENDRECSIGS functional tests for watchquorum nodes#7301
knst wants to merge 1 commit intodashpay:developfrom
knst:tests-for-7293

Conversation

@knst
Copy link
Copy Markdown
Collaborator

@knst knst commented Apr 30, 2026

Issue being fixed or feature implemented

Addresses #7293 (comment)

What was done?

Adds functional tests for QSENDRECSIGS for watch-quorum nodes.

How Has This Been Tested?

Run on the top of #7293 and on develop with #7293 reverted.

Breaking Changes

N/A

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

@knst knst added this to the 24 milestone Apr 30, 2026
@github-actions
Copy link
Copy Markdown

✅ No Merge Conflicts Detected

This PR currently has no conflicts with other open PRs.

@thepastaclaw
Copy link
Copy Markdown

thepastaclaw commented Apr 30, 2026

🕓 Ready for review — 15 ahead in queue (commit 3a4fea7)
Queue position: 16/20

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a4fea7360

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

b"qpcommit": None,
b"qrinfo": None,
b"qsendrecsigs": None,
b"qsendrecsigs": msg_qsendrecsigs,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep qsendrecsigs ignored until callback exists

Changing MESSAGEMAP to decode qsendrecsigs makes P2PInterface.on_message() dispatch to on_qsendrecsigs, but P2PInterface has no such callback method, so receiving this message raises AttributeError and tears down the test peer. This is reachable when nodes send QSENDRECSIGS to authenticated quorum-relay peers (see the send paths in CMNAuth::ProcessMessage / CConnman::SetMasternodeQuorumRelayMembers), so this mapping change can break functional tests that use default P2PInterface on those connections.

Useful? React with 👍 / 👎.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 140315e6-2d3e-4d50-8796-25527dcab93d

📥 Commits

Reviewing files that changed from the base of the PR and between 7e524b1 and 3a4fea7.

📒 Files selected for processing (3)
  • test/functional/p2p_instantsend.py
  • test/functional/test_framework/messages.py
  • test/functional/test_framework/p2p.py

Walkthrough

These changes add test infrastructure for verifying InstantSend lock propagation to configured masternodes. A new wire-message type qsendrecsigs is defined in the test framework to enable observers. A new RecSigsObserver class extends P2PInterface to watch for incoming MSG_ISDLOCK inventory messages, and a corresponding functional test attaches observers to masternode connections, triggers an InstantSend transaction, and asserts that at least one observer received the lock announcement.

Sequence Diagram

sequenceDiagram
    participant Test as Test Case
    participant MN as Masternode
    participant Obs as RecSigsObserver
    participant Net as P2P Network

    Test->>Test: Create RecSigsObserver instances
    Test->>Obs: send_qsendrecsigs(on=True)
    Obs->>MN: Enable qsendrecsigs message
    Test->>Test: Trigger InstantSend transaction
    MN->>Net: Broadcast MSG_ISDLOCK inv
    Net->>Obs: on_inv(MSG_ISDLOCK message)
    Obs->>Obs: Record MSG_ISDLOCK received
    Test->>Test: Sync P2P observers
    Test->>Obs: Assert lock observed
    Obs-->>Test: Confirmation received
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 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
Title check ✅ Passed The title accurately summarizes the main change: adding functional tests for QSENDRECSIGS message handling in watch-quorum nodes, which is directly reflected in the changeset.
Description check ✅ Passed The description clearly relates to the changeset by explaining that functional tests for QSENDRECSIGS were added for watch-quorum nodes, and references the related issue.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

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

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.

2 participants