Skip to content

Conversation

@PastaPastaPasta
Copy link
Member

Please remove the italicized help prompts before submitting or merging

Provide a general summary of your changes in the Title above

Pull requests without a rationale and clear improvement may be closed
immediately.

Please provide clear motivation for your patch and explain how it improves
Dash Core user experience or Dash Core developer experience
significantly:

  • Any test improvements or new tests that improve coverage are always welcome.
  • All other changes should have accompanying unit tests (see src/test/) or
    functional tests (see test/). Contributors should note which tests cover
    modified code. If no tests exist for a region of modified code, new tests
    should accompany the change.
  • Bug fixes are most welcome when they come with steps to reproduce or an
    explanation of the potential issue as well as reasoning for the way the bug
    was fixed.
  • Features are welcome, but might be rejected due to design or scope issues.
    If a feature is based on a lot of dependencies, contributors should first
    consider building the system outside of Dash Core, if possible.

Issue being fixed or feature implemented

  • Why is this change required? What problem does it solve?
  • If it fixes an open issue, please link to the issue here.

What was done?

Describe your changes in detail

How Has This Been Tested?

Please describe in detail how you tested your changes.

Include details of your testing environment, and the tests you ran
to see how your change affects other areas of the code, etc.

Breaking Changes

Please describe any breaking changes your code introduces

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

  • 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)

@github-actions
Copy link

github-actions bot commented Nov 13, 2025

⚠️ Potential Merge Conflicts Detected

This PR has potential conflicts with the following open PRs:

Please coordinate with the authors of these PRs to avoid merge conflicts.

@DashCoreAutoGuix
Copy link

Guix Automation has began to build this PR tagged as v23.0.0-devpr6967.f172589d. A new comment will be made when the image is pushed.

@github-actions
Copy link

This pull request has conflicts, please rebase.

@DashCoreAutoGuix
Copy link

Guix Automation has completed; a release should be present here: https://github.com/dashpay/dash-dev-branches/releases/tag/v23.0.0-devpr6967.f172589d. The image should be on dockerhub soon.

@DashCoreAutoGuix
Copy link

Guix Automation has began to build this PR tagged as v23.0.0-devpr6967.10b47ca5. A new comment will be made when the image is pushed.

@DashCoreAutoGuix
Copy link

Guix Automation has completed; a release should be present here: https://github.com/dashpay/dash-dev-branches/releases/tag/v23.0.0-devpr6967.10b47ca5. The image should be on dockerhub soon.

@PastaPastaPasta PastaPastaPasta changed the title Feat/proactively push recsig feat: proactively push recovered signatures; fully connect instantsend quorums for recovered sigs Nov 13, 2025
@PastaPastaPasta PastaPastaPasta force-pushed the feat/proactively-push-recsig branch from 10b47ca to 3c67936 Compare November 14, 2025 15:10
@DashCoreAutoGuix
Copy link

Guix Automation has began to build this PR tagged as v23.0.0-devpr6967.3c679369. A new comment will be made when the image is pushed.

@DashCoreAutoGuix
Copy link

Guix Automation has completed; a release should be present here: https://github.com/dashpay/dash-dev-branches/releases/tag/v23.0.0-devpr6967.3c679369. The image should be on dockerhub soon.

@PastaPastaPasta PastaPastaPasta force-pushed the feat/proactively-push-recsig branch from 3c67936 to 2e8ac6a Compare November 17, 2025 15:37
@DashCoreAutoGuix
Copy link

Guix Automation has began to build this PR tagged as v23.0.0-devpr6967.2e8ac6a7. A new comment will be made when the image is pushed.

@DashCoreAutoGuix
Copy link

Guix Automation has completed; a release should be present here: https://github.com/dashpay/dash-dev-branches/releases/tag/v23.0.0-devpr6967.2e8ac6a7. The image should be on dockerhub soon.

@PastaPastaPasta PastaPastaPasta marked this pull request as ready for review November 18, 2025 14:40
@coderabbitai
Copy link

coderabbitai bot commented Nov 18, 2025

Walkthrough

This pull request threads a new proactive relay flag through recovered-signature handling. CSigningManager::ProcessRecoveredSig gains a NodeId from parameter to determine proactive_relay. Notification and relay APIs are updated to accept the flag: validation signals, sigshares, active/zmq notifiers, and PeerManager::RelayRecoveredSig now accept/provide proactive_relay; RelayRecoveredSig also now takes a full CRecoveredSig. Quorum relay selection logic in llmq utils was simplified to use connection sets directly. Multiple call sites were updated accordingly across signing, networking, validation, and ZMQ code.

Sequence Diagram(s)

sequenceDiagram
    participant SM as CSigningManager
    participant VS as CMainSignals / ValidationInterface
    participant SSM as CSigSharesManager
    participant PM as PeerManager
    participant ZMQ as ZMQNotifiers

    rect rgb(230,240,255)
    Note over SM: Recovered sig arrives
    SM->>SM: ProcessRecoveredSig(sig, peerman, from)
    SM->>SM: compute proactive_relay (from, llmqType)
    SM->>VS: NotifyRecoveredSig(sig, id, proactive_relay)
    end

    rect rgb(240,230,255)
    VS->>SSM: NotifyRecoveredSig(sig, proactive_relay)
    SSM->>PM: RelayRecoveredSig(sig, proactive_relay)
    end

    rect rgb(255,240,230)
    alt proactive_relay == true
        PM->>PM: Proactively broadcast QSIGREC to peers wanting rec sigs
    else
        PM->>PM: Relay via inventory (MSG_QUORUM_RECOVERED_SIG)
    end
    end

    rect rgb(230,255,240)
    PM->>ZMQ: NotifyRecoveredSig(sig, proactive_relay)
    ZMQ->>ZMQ: Publish to subscribers (hash/raw as configured)
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Areas requiring extra attention during review:

  • src/llmq/signing.cpp / src/llmq/signing.h: correctness of from threading and proactive_relay computation (which llmq types are excluded).
  • src/net_processing.cpp / src/net_processing.h: new proactive broadcast path (QSIGREC) vs. inventory relay; peer filtering and early-return behavior.
  • src/llmq/signing_shares.* and src/masternode/active/notificationinterface.*: consistent signature changes and locking annotations for NotifyRecoveredSig.
  • src/llmq/utils.cpp: changes to quorum relay member selection and removal of separate relayMembers logic.
  • src/validationinterface.* and src/zmq/*: ensure all notifier interfaces and implementations correctly accept and forward the new boolean parameter.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description consists entirely of template placeholders and help text instructing the author to remove them before submission, providing no actual context about the changes, rationale, testing, or breaking changes. Replace template text with a concrete description explaining the rationale for proactive signature pushing, the specific problem it solves, how it was tested, and any breaking changes introduced.
Docstring Coverage ⚠️ Warning Docstring coverage is 5.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main changes: proactively pushing recovered signatures and fully connecting instantsend quorums, which aligns with the extensive signature propagation and relay logic changes shown throughout the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2e8ac6a and e404e67.

📒 Files selected for processing (1)
  • src/llmq/utils.cpp (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-02T18:29:54.756Z
Learnt from: kwvg
Repo: dashpay/dash PR: 6840
File: src/net_processing.cpp:2882-2886
Timestamp: 2025-10-02T18:29:54.756Z
Learning: Across net_processing.cpp, once LLMQContext (m_llmq_ctx) is asserted non-null, its subcomponents (e.g., isman, qdkgsman, quorum_block_processor) are treated as initialized and used without extra null checks.

Applied to files:

  • src/llmq/utils.cpp
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: mac-build / Build source
  • GitHub Check: linux64_tsan-build / Build source
  • GitHub Check: linux64_sqlite-build / Build source
  • GitHub Check: linux64_ubsan-build / Build source
  • GitHub Check: linux64_fuzz-build / Build source
  • GitHub Check: linux64-build / Build source
  • GitHub Check: win64-build / Build source
  • GitHub Check: linux64_nowallet-build / Build source
  • GitHub Check: arm-linux-build / Build source
  • GitHub Check: Lint / Run linters
🔇 Additional comments (1)
src/llmq/utils.cpp (1)

886-886: Implementation correctly simplifies relay member topology by using the same connections set for both quorum nodes and relay members.

This change implements the past reviewer feedback to unify relay member logic. The implementation is consistent: both SetMasternodeQuorumNodes and SetMasternodeQuorumRelayMembers use the same connections set, which is computed based on quorum member status and the IsAllMembersConnectedEnabled spork state:

  • For members with IsAllMembersConnectedEnabled: both sets contain all quorum members (full mesh)
  • For members without: both sets contain relay members (ring topology)
  • For non-members watching: both sets contain the single deterministic watch connection

This approach maintains consistency across the connection topology and aligns with the established pattern used elsewhere in the codebase (e.g., src/llmq/quorums.cpp:384-385).

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
src/llmq/utils.cpp (1)

865-877: LGTM! All-members-connected relay path correctly implements full-mesh propagation.

The logic correctly populates relayMembers with all other quorum members when AMC is enabled, enabling low-latency recovered signature propagation across the full mesh. The fallback to GetQuorumRelayMembers preserves ring-based relay for non-AMC mode.

Note the intentional semantic difference: in AMC mode, all members are included in relayMembers (bidirectional), whereas non-AMC mode uses onlyOutbound = true (directional ring). This is correct per the comment's goal to "set m_wants_recsigs widely."

Optional future refactoring: The AMC iteration pattern (lines 870-874) duplicates similar logic in GetQuorumConnections (lines 741-744). Consider extracting a shared helper if this pattern grows, though the semantics differ slightly (relay members vs connections), so the current separation is reasonable.

src/llmq/signing.h (1)

221-224: ProcessRecoveredSig signature extension is correct

Adding NodeId pFrom here cleanly matches the implementation in signing.cpp and preserves the existing lock annotations. From a correctness and API perspective this looks good; if you touch this again, you might optionally rename pFrom to from for consistency with the implementation.

src/llmq/signing.cpp (1)

520-521: End-to-end propagation of origin NodeId and proactive_relay looks correct

  • ProcessPendingReconstructedRecoveredSigs now calls ProcessRecoveredSig(..., -1), marking reconstructed/locally-produced recovered sigs as having no originating peer.
  • ProcessPendingRecoveredSigs passes the actual nodeId per peer, so only locally originated or reconstructed sigs see from == -1.
  • CSigningManager::ProcessRecoveredSig uses from == -1 together with the explicit LLMQ-type exclusion list to compute proactive_relay, and then calls GetMainSignals().NotifyRecoveredSig(recoveredSig, recoveredSig->GetHash().ToString(), proactive_relay);.

Given how NodeId == -1 is already used as a sentinel elsewhere, this is a reasonable and consistent way to distinguish local vs. remote sigs for proactive relaying. The TODO about replacing the hard-coded type list with an IsAllMembersConnectedEnabled-style helper is also appropriate but not blocking.

If you’d like, I can sketch a small helper (e.g., bool ShouldProactivelyRelay(Consensus::LLMQType, NodeId) in llmq/options) to centralize this policy and remove the explicit type list from here.

Also applies to: 582-583, 590-639

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between caf5010 and 2e8ac6a.

📒 Files selected for processing (17)
  • src/llmq/signing.cpp (4 hunks)
  • src/llmq/signing.h (1 hunks)
  • src/llmq/signing_shares.cpp (3 hunks)
  • src/llmq/signing_shares.h (1 hunks)
  • src/llmq/utils.cpp (1 hunks)
  • src/masternode/active/notificationinterface.cpp (1 hunks)
  • src/masternode/active/notificationinterface.h (1 hunks)
  • src/net_processing.cpp (2 hunks)
  • src/net_processing.h (1 hunks)
  • src/validationinterface.cpp (1 hunks)
  • src/validationinterface.h (2 hunks)
  • src/zmq/zmqabstractnotifier.cpp (1 hunks)
  • src/zmq/zmqabstractnotifier.h (1 hunks)
  • src/zmq/zmqnotificationinterface.cpp (1 hunks)
  • src/zmq/zmqnotificationinterface.h (1 hunks)
  • src/zmq/zmqpublishnotifier.cpp (2 hunks)
  • src/zmq/zmqpublishnotifier.h (2 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: kwvg
Repo: dashpay/dash PR: 6761
File: src/chainlock/signing.cpp:247-250
Timestamp: 2025-07-29T14:32:48.369Z
Learning: In PR #6761, kwvg acknowledged a null pointer check issue in ChainLockSigner::Cleanup() method but deferred it to follow-up, consistent with the pattern of avoiding scope creep in refactoring PRs.
📚 Learning: 2025-07-15T14:53:04.819Z
Learnt from: knst
Repo: dashpay/dash PR: 6691
File: src/test/llmq_params_tests.cpp:148-151
Timestamp: 2025-07-15T14:53:04.819Z
Learning: In the Dash Core LLMQ implementation, signingActiveQuorumCount is never 0 in the actual parameters defined in params.h, making division by zero scenarios unrealistic in the max_cycles() function.

Applied to files:

  • src/llmq/signing.cpp
📚 Learning: 2025-10-02T18:29:54.756Z
Learnt from: kwvg
Repo: dashpay/dash PR: 6840
File: src/net_processing.cpp:2882-2886
Timestamp: 2025-10-02T18:29:54.756Z
Learning: Across net_processing.cpp, once LLMQContext (m_llmq_ctx) is asserted non-null, its subcomponents (e.g., isman, qdkgsman, quorum_block_processor) are treated as initialized and used without extra null checks.

Applied to files:

  • src/llmq/utils.cpp
📚 Learning: 2025-08-19T15:08:00.835Z
Learnt from: knst
Repo: dashpay/dash PR: 6692
File: src/llmq/commitment.cpp:54-60
Timestamp: 2025-08-19T15:08:00.835Z
Learning: In Dash Core, llmq_params.size == 1 is used only for regtest environments, not on public networks, which significantly reduces the risk profile of code paths specific to single-member quorums.

Applied to files:

  • src/llmq/utils.cpp
🧬 Code graph analysis (15)
src/net_processing.h (3)
src/validationinterface.h (16)
  • void (94-94)
  • void (109-109)
  • void (113-113)
  • void (119-119)
  • void (152-152)
  • void (159-159)
  • void (165-165)
  • void (166-166)
  • void (167-167)
  • void (168-168)
  • void (169-169)
  • void (170-170)
  • void (171-171)
  • void (172-172)
  • void (189-189)
  • void (196-196)
src/net_processing.cpp (3)
  • RelayRecoveredSig (2470-2490)
  • RelayRecoveredSig (2470-2470)
  • sig (630-630)
test/functional/test_framework/messages.py (1)
  • CRecoveredSig (1520-1544)
src/masternode/active/notificationinterface.h (6)
src/llmq/signing_shares.cpp (2)
  • NotifyRecoveredSig (968-971)
  • NotifyRecoveredSig (968-968)
src/masternode/active/notificationinterface.cpp (2)
  • NotifyRecoveredSig (32-35)
  • NotifyRecoveredSig (32-32)
src/validationinterface.cpp (2)
  • NotifyRecoveredSig (315-321)
  • NotifyRecoveredSig (315-315)
src/zmq/zmqabstractnotifier.cpp (2)
  • NotifyRecoveredSig (71-74)
  • NotifyRecoveredSig (71-71)
src/zmq/zmqnotificationinterface.cpp (2)
  • NotifyRecoveredSig (244-249)
  • NotifyRecoveredSig (244-244)
src/zmq/zmqpublishnotifier.cpp (4)
  • NotifyRecoveredSig (299-306)
  • NotifyRecoveredSig (299-299)
  • NotifyRecoveredSig (465-473)
  • NotifyRecoveredSig (465-465)
src/llmq/signing.h (1)
src/llmq/signing.cpp (2)
  • ProcessRecoveredSig (590-639)
  • ProcessRecoveredSig (590-590)
src/zmq/zmqpublishnotifier.h (7)
src/llmq/signing_shares.cpp (2)
  • NotifyRecoveredSig (968-971)
  • NotifyRecoveredSig (968-968)
src/masternode/active/notificationinterface.cpp (2)
  • NotifyRecoveredSig (32-35)
  • NotifyRecoveredSig (32-32)
src/validationinterface.cpp (2)
  • NotifyRecoveredSig (315-321)
  • NotifyRecoveredSig (315-315)
src/zmq/zmqabstractnotifier.cpp (2)
  • NotifyRecoveredSig (71-74)
  • NotifyRecoveredSig (71-71)
src/zmq/zmqnotificationinterface.cpp (2)
  • NotifyRecoveredSig (244-249)
  • NotifyRecoveredSig (244-244)
src/zmq/zmqpublishnotifier.cpp (4)
  • NotifyRecoveredSig (299-306)
  • NotifyRecoveredSig (299-299)
  • NotifyRecoveredSig (465-473)
  • NotifyRecoveredSig (465-465)
src/net_processing.cpp (1)
  • sig (630-630)
src/zmq/zmqabstractnotifier.cpp (5)
src/llmq/signing_shares.cpp (2)
  • NotifyRecoveredSig (968-971)
  • NotifyRecoveredSig (968-968)
src/masternode/active/notificationinterface.cpp (2)
  • NotifyRecoveredSig (32-35)
  • NotifyRecoveredSig (32-32)
src/validationinterface.cpp (2)
  • NotifyRecoveredSig (315-321)
  • NotifyRecoveredSig (315-315)
src/zmq/zmqnotificationinterface.cpp (2)
  • NotifyRecoveredSig (244-249)
  • NotifyRecoveredSig (244-244)
src/zmq/zmqpublishnotifier.cpp (4)
  • NotifyRecoveredSig (299-306)
  • NotifyRecoveredSig (299-299)
  • NotifyRecoveredSig (465-473)
  • NotifyRecoveredSig (465-465)
src/validationinterface.h (7)
src/llmq/signing_shares.cpp (2)
  • NotifyRecoveredSig (968-971)
  • NotifyRecoveredSig (968-968)
src/masternode/active/notificationinterface.cpp (2)
  • NotifyRecoveredSig (32-35)
  • NotifyRecoveredSig (32-32)
src/validationinterface.cpp (2)
  • NotifyRecoveredSig (315-321)
  • NotifyRecoveredSig (315-315)
src/zmq/zmqabstractnotifier.cpp (2)
  • NotifyRecoveredSig (71-74)
  • NotifyRecoveredSig (71-71)
src/zmq/zmqnotificationinterface.cpp (2)
  • NotifyRecoveredSig (244-249)
  • NotifyRecoveredSig (244-244)
src/zmq/zmqpublishnotifier.cpp (4)
  • NotifyRecoveredSig (299-306)
  • NotifyRecoveredSig (299-299)
  • NotifyRecoveredSig (465-473)
  • NotifyRecoveredSig (465-465)
src/net_processing.cpp (3)
  • sig (630-630)
  • id (679-679)
  • id (683-683)
src/zmq/zmqnotificationinterface.cpp (6)
src/llmq/signing_shares.cpp (2)
  • NotifyRecoveredSig (968-971)
  • NotifyRecoveredSig (968-968)
src/masternode/active/notificationinterface.cpp (2)
  • NotifyRecoveredSig (32-35)
  • NotifyRecoveredSig (32-32)
src/validationinterface.cpp (2)
  • NotifyRecoveredSig (315-321)
  • NotifyRecoveredSig (315-315)
src/zmq/zmqabstractnotifier.cpp (2)
  • NotifyRecoveredSig (71-74)
  • NotifyRecoveredSig (71-71)
src/zmq/zmqpublishnotifier.cpp (4)
  • NotifyRecoveredSig (299-306)
  • NotifyRecoveredSig (299-299)
  • NotifyRecoveredSig (465-473)
  • NotifyRecoveredSig (465-465)
src/net_processing.cpp (1)
  • sig (630-630)
src/zmq/zmqabstractnotifier.h (7)
src/llmq/signing_shares.cpp (2)
  • NotifyRecoveredSig (968-971)
  • NotifyRecoveredSig (968-968)
src/masternode/active/notificationinterface.cpp (2)
  • NotifyRecoveredSig (32-35)
  • NotifyRecoveredSig (32-32)
src/validationinterface.cpp (2)
  • NotifyRecoveredSig (315-321)
  • NotifyRecoveredSig (315-315)
src/zmq/zmqabstractnotifier.cpp (2)
  • NotifyRecoveredSig (71-74)
  • NotifyRecoveredSig (71-71)
src/zmq/zmqnotificationinterface.cpp (2)
  • NotifyRecoveredSig (244-249)
  • NotifyRecoveredSig (244-244)
src/zmq/zmqpublishnotifier.cpp (4)
  • NotifyRecoveredSig (299-306)
  • NotifyRecoveredSig (299-299)
  • NotifyRecoveredSig (465-473)
  • NotifyRecoveredSig (465-465)
src/net_processing.cpp (1)
  • sig (630-630)
src/llmq/signing_shares.h (7)
src/llmq/signing_shares.cpp (2)
  • NotifyRecoveredSig (968-971)
  • NotifyRecoveredSig (968-968)
src/masternode/active/notificationinterface.cpp (2)
  • NotifyRecoveredSig (32-35)
  • NotifyRecoveredSig (32-32)
src/validationinterface.cpp (2)
  • NotifyRecoveredSig (315-321)
  • NotifyRecoveredSig (315-315)
src/zmq/zmqabstractnotifier.cpp (2)
  • NotifyRecoveredSig (71-74)
  • NotifyRecoveredSig (71-71)
src/zmq/zmqnotificationinterface.cpp (2)
  • NotifyRecoveredSig (244-249)
  • NotifyRecoveredSig (244-244)
src/zmq/zmqpublishnotifier.cpp (4)
  • NotifyRecoveredSig (299-306)
  • NotifyRecoveredSig (299-299)
  • NotifyRecoveredSig (465-473)
  • NotifyRecoveredSig (465-465)
src/net_processing.cpp (1)
  • sig (630-630)
src/zmq/zmqpublishnotifier.cpp (6)
src/llmq/signing_shares.cpp (2)
  • NotifyRecoveredSig (968-971)
  • NotifyRecoveredSig (968-968)
src/masternode/active/notificationinterface.cpp (2)
  • NotifyRecoveredSig (32-35)
  • NotifyRecoveredSig (32-32)
src/validationinterface.cpp (2)
  • NotifyRecoveredSig (315-321)
  • NotifyRecoveredSig (315-315)
src/zmq/zmqabstractnotifier.cpp (2)
  • NotifyRecoveredSig (71-74)
  • NotifyRecoveredSig (71-71)
src/zmq/zmqnotificationinterface.cpp (2)
  • NotifyRecoveredSig (244-249)
  • NotifyRecoveredSig (244-244)
src/net_processing.cpp (1)
  • sig (630-630)
src/zmq/zmqnotificationinterface.h (7)
src/llmq/signing_shares.cpp (2)
  • NotifyRecoveredSig (968-971)
  • NotifyRecoveredSig (968-968)
src/masternode/active/notificationinterface.cpp (2)
  • NotifyRecoveredSig (32-35)
  • NotifyRecoveredSig (32-32)
src/validationinterface.cpp (2)
  • NotifyRecoveredSig (315-321)
  • NotifyRecoveredSig (315-315)
src/zmq/zmqabstractnotifier.cpp (2)
  • NotifyRecoveredSig (71-74)
  • NotifyRecoveredSig (71-71)
src/zmq/zmqnotificationinterface.cpp (2)
  • NotifyRecoveredSig (244-249)
  • NotifyRecoveredSig (244-244)
src/zmq/zmqpublishnotifier.cpp (4)
  • NotifyRecoveredSig (299-306)
  • NotifyRecoveredSig (299-299)
  • NotifyRecoveredSig (465-473)
  • NotifyRecoveredSig (465-465)
src/validationinterface.h (1)
  • llmq (35-37)
src/masternode/active/notificationinterface.cpp (6)
src/llmq/signing_shares.cpp (2)
  • NotifyRecoveredSig (968-971)
  • NotifyRecoveredSig (968-968)
src/validationinterface.cpp (2)
  • NotifyRecoveredSig (315-321)
  • NotifyRecoveredSig (315-315)
src/zmq/zmqabstractnotifier.cpp (2)
  • NotifyRecoveredSig (71-74)
  • NotifyRecoveredSig (71-71)
src/zmq/zmqnotificationinterface.cpp (2)
  • NotifyRecoveredSig (244-249)
  • NotifyRecoveredSig (244-244)
src/zmq/zmqpublishnotifier.cpp (4)
  • NotifyRecoveredSig (299-306)
  • NotifyRecoveredSig (299-299)
  • NotifyRecoveredSig (465-473)
  • NotifyRecoveredSig (465-465)
src/net_processing.cpp (1)
  • sig (630-630)
src/validationinterface.cpp (6)
src/llmq/signing_shares.cpp (2)
  • NotifyRecoveredSig (968-971)
  • NotifyRecoveredSig (968-968)
src/masternode/active/notificationinterface.cpp (2)
  • NotifyRecoveredSig (32-35)
  • NotifyRecoveredSig (32-32)
src/zmq/zmqabstractnotifier.cpp (2)
  • NotifyRecoveredSig (71-74)
  • NotifyRecoveredSig (71-71)
src/zmq/zmqnotificationinterface.cpp (2)
  • NotifyRecoveredSig (244-249)
  • NotifyRecoveredSig (244-244)
src/zmq/zmqpublishnotifier.cpp (4)
  • NotifyRecoveredSig (299-306)
  • NotifyRecoveredSig (299-299)
  • NotifyRecoveredSig (465-473)
  • NotifyRecoveredSig (465-465)
src/net_processing.cpp (3)
  • sig (630-630)
  • id (679-679)
  • id (683-683)
src/llmq/signing.cpp (1)
src/validationinterface.cpp (2)
  • GetMainSignals (121-124)
  • GetMainSignals (121-121)
src/llmq/signing_shares.cpp (6)
src/masternode/active/notificationinterface.cpp (2)
  • NotifyRecoveredSig (32-35)
  • NotifyRecoveredSig (32-32)
src/validationinterface.cpp (2)
  • NotifyRecoveredSig (315-321)
  • NotifyRecoveredSig (315-315)
src/zmq/zmqabstractnotifier.cpp (2)
  • NotifyRecoveredSig (71-74)
  • NotifyRecoveredSig (71-71)
src/zmq/zmqnotificationinterface.cpp (2)
  • NotifyRecoveredSig (244-249)
  • NotifyRecoveredSig (244-244)
src/zmq/zmqpublishnotifier.cpp (4)
  • NotifyRecoveredSig (299-306)
  • NotifyRecoveredSig (299-299)
  • NotifyRecoveredSig (465-473)
  • NotifyRecoveredSig (465-465)
src/net_processing.cpp (1)
  • sig (630-630)
🪛 GitHub Actions: Clang Diff Format Check
src/llmq/signing_shares.h

[error] 1-1: Clang format differences found in src/llmq/signing_shares.h. Run the clang-format-diff tool or clang-format to fix formatting changes.

src/masternode/active/notificationinterface.cpp

[error] 1-1: Clang format differences found in src/masternode/active/notificationinterface.cpp. Run the clang-format-diff tool or clang-format to fix formatting changes.

src/llmq/signing.cpp

[error] 1-1: Clang format differences found in src/llmq/signing.cpp. Run the clang-format-diff tool or clang-format to fix formatting changes.

🔇 Additional comments (16)
src/zmq/zmqnotificationinterface.h (1)

39-39: NotifyRecoveredSig override signature looks consistent

The new NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig>& sig, bool proactive_relay) override matches the updated CValidationInterface API and the implementation in zmqnotificationinterface.cpp. No issues from an interface or correctness perspective.

src/masternode/active/notificationinterface.h (1)

29-29: ActiveNotificationInterface override correctly forwards proactive_relay

The updated NotifyRecoveredSig override matches the new validation interface signature and simply forwards proactive_relay to shareman, which is exactly what we want at this layer.

src/zmq/zmqabstractnotifier.h (1)

78-78: ZMQ notifier API extension is consistent

Extending NotifyRecoveredSig with bool proactive_relay here matches the implementation and all known overrides. It keeps the API coherent with the rest of the recovered‑sig pipeline; subclasses can start using the flag when needed.

src/zmq/zmqabstractnotifier.cpp (1)

71-73: Base NotifyRecoveredSig implementation correctly updated

The base CZMQAbstractNotifier::NotifyRecoveredSig now matches the new signature and keeps the previous no‑op behavior. This is a clean, compatible update.

src/zmq/zmqnotificationinterface.cpp (1)

244-248: Recovered‑sig ZMQ notifications correctly propagate proactive_relay

The updated NotifyRecoveredSig implementation cleanly threads proactive_relay through to each ZMQ notifier using TryForEachAndRemoveFailed. The captures and call pattern are correct and maintain previous behavior for existing notifiers.

src/net_processing.h (1)

107-107: RelayRecoveredSig interface change is coherent with implementation

Switching RelayRecoveredSig to take const llmq::CRecoveredSig& sig, bool proactive_relay lines up with the implementation in net_processing.cpp and with how the flag is computed upstream. The forward declaration via validationinterface.h is sufficient for this header; just ensure the cpp includes the full llmq::CRecoveredSig definition (e.g., via llmq/signing.h), which appears to be the case from the provided snippet.

src/masternode/active/notificationinterface.cpp (1)

32-34: LGTM: Parameter threading is correct.

The proactive_relay parameter is correctly threaded through to the share manager's notification interface. The implementation properly delegates the call with both parameters.

src/zmq/zmqpublishnotifier.cpp (1)

299-306: LGTM: Unused parameter is intentional.

Both ZMQ notifier implementations correctly add the proactive_relay parameter to match the updated interface signature. The parameter is intentionally unused because ZMQ notifiers publish recovered signatures unconditionally regardless of relay type. This is consistent with the base class pattern in CZMQAbstractNotifier::NotifyRecoveredSig, which marks both parameters as unused.

Also applies to: 465-473

src/net_processing.cpp (1)

630-631: Recovered-sig relay change is sound; proactive_relay correctly limited to local recovery

The new RelayRecoveredSig(const llmq::CRecoveredSig& sig, bool proactive_relay) API and the proactive/non-proactive split are correct:

  • Proactive path directly sends QSIGREC only to peers that have explicitly set m_wants_recsigs, avoiding the invgetdata round-trip.
  • Non-proactive path preserves the existing behavior by constructing MSG_QUORUM_RECOVERED_SIG from sig.GetHash() and using PushInv guarded by m_wants_recsigs.

Locking and lifetimes are sound (no m_peer_mutex held at call-sites, GetPeerRef guarded internally, sig captured by reference only within the synchronous ForEachNode call).

Verification confirms that proactive_relay is only set true when from == -1 (local recovery), not on reprocessing of already-known signatures, so the deduplication concern does not materialize in practice.

Two optional consistency improvements remain valid if desired:

  1. Consistent peer iteration — Using ForEachNode for proactive but m_peer_map for non-proactive is not incorrect but creates conceptual asymmetry. Aligning both to a single iteration pattern would improve maintainability.

  2. Deduplication semantics — Proactive path bypasses m_tx_inventory_known_filter, so direct sends may repeat if the same sig is ever encountered twice. Given the from == -1 guard limits proactive sends to first-time local recovery, this is low-risk and acceptable as-is.

src/validationinterface.cpp (1)

315-321: NotifyRecoveredSig correctly threads proactive_relay through validation callbacks

The lambda capture and call into CValidationInterface::NotifyRecoveredSig(sig, proactive_relay) look correct and maintain existing enqueue/log semantics while adding the new flag. No further changes needed here.

src/zmq/zmqpublishnotifier.h (2)

81-85: Recovered-sig ZMQ hash notifier signature matches updated base interface

The added bool proactive_relay parameter aligns this override with CZMQAbstractNotifier::NotifyRecoveredSig. It’s fine that the flag is unused in the implementation for now.


150-154: Recovered-sig ZMQ raw notifier signature updated consistently

The raw recovered-sig notifier now correctly overrides the (sig, bool proactive_relay) variant, matching the base class and other call sites.

src/llmq/signing_shares.cpp (2)

836-841: Passing from = -1 cleanly distinguishes locally recovered signatures

Updating both single-member and regular recovery paths to call ProcessRecoveredSig(..., -1) is consistent with the existing use of NodeId == -1 as a “no peer / local” sentinel and allows CSigningManager to enable proactive relay only for locally reconstructed sigs. This looks correct.

Also applies to: 870-871


968-971: NotifyRecoveredSig now correctly forwards proactive relay intent to PeerManager

The new CSigSharesManager::NotifyRecoveredSig(sig, proactive_relay) simply asserts the pointer and calls m_peerman.RelayRecoveredSig(*sig, proactive_relay), which is exactly what we want for propagating the flag through to networking. No issues seen.

src/validationinterface.h (1)

171-172: All NotifyRecoveredSig overrides have been properly updated to the new signature

Verification confirms all derived classes that override NotifyRecoveredSig have been updated to match the new 2-parameter signature (const std::shared_ptr<const llmq::CRecoveredSig>&, bool proactive_relay).

Found and verified:

  • CZMQNotificationInterface::NotifyRecoveredSig
  • ActiveNotificationInterface::NotifyRecoveredSig
  • CZMQAbstractNotifier::NotifyRecoveredSig
  • CZMQPublishHashRecoveredSigNotifier::NotifyRecoveredSig
  • CZMQPublishRawRecoveredSigNotifier::NotifyRecoveredSig
  • CSigSharesManager::NotifyRecoveredSig

Classes that don't override this method (e.g., CDSNotificationInterface, PeerManager, test utilities) correctly use the base class no-op default. No old 1-parameter signatures found anywhere in the codebase.

src/llmq/signing.cpp (1)

11-11: Verify clang-format CI failure in src/llmq/signing.cpp

The review comment references CI formatting differences, but visual inspection of the code at line 11 (the new include) and lines 633-638 (the multi-line proactive_relay expression) shows standard, properly aligned formatting. No clang-format directives are present that would exempt these sections.

Since the sandbox environment cannot execute clang-format or access CI logs, please verify:

  • Does the CI pipeline actually report formatting violations for this file?
  • If yes, run clang-format -i src/llmq/signing.cpp locally and commit the changes.
  • If no, this review comment may be outdated and can be dismissed.

bool allowDiffMsgHashSigning = false) EXCLUSIVE_LOCKS_REQUIRED(!cs_pendingSigns, !cs);

void NotifyRecoveredSig(const std::shared_ptr<const CRecoveredSig>& sig) const EXCLUSIVE_LOCKS_REQUIRED(!cs);
void NotifyRecoveredSig(const std::shared_ptr<const CRecoveredSig>& sig, bool proactive_relay) const EXCLUSIVE_LOCKS_REQUIRED(!cs);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Recovered‑sig notification wiring is correct; fix clang‑format to unbreak CI

The new NotifyRecoveredSig(const std::shared_ptr<const CRecoveredSig>& sig, bool proactive_relay) const EXCLUSIVE_LOCKS_REQUIRED(!cs) overload is consistent with its implementation in signing_shares.cpp and with the locking strategy (no cs held while calling PeerManager::RelayRecoveredSig). Semantics look good.

CI is currently failing on src/llmq/signing_shares.h due to a clang‑format diff, though. Please run the project’s clang‑format tooling on this file (or at least around this declaration) and commit the resulting formatting changes so the pipeline passes.

🤖 Prompt for AI Agents
In src/llmq/signing_shares.h around line 452, the new overload declaration is
correctly implemented but its formatting doesn't match the project's
clang-format rules and is causing CI failures; run the project's clang-format
tool (or apply the repo's clang-format style) to reformat this file or at least
the vicinity of this declaration, update the header with the formatted result,
and commit that change so the CI clang-format check passes.

Comment on lines +32 to +34
void ActiveNotificationInterface::NotifyRecoveredSig(const std::shared_ptr<const llmq::CRecoveredSig>& sig, bool proactive_relay)
{
m_active_ctx.shareman->NotifyRecoveredSig(sig);
m_active_ctx.shareman->NotifyRecoveredSig(sig, proactive_relay);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix clang-format issues.

The CI pipeline reports formatting differences in this file. Please run clang-format to resolve the formatting issues before merging.

Run the following command to fix formatting:

#!/bin/bash
# Format the file according to project style
clang-format -i src/masternode/active/notificationinterface.cpp
🤖 Prompt for AI Agents
In src/masternode/active/notificationinterface.cpp around lines 32 to 34, the
file fails CI due to clang-format style differences; run clang-format -i on that
file to reformat it (or apply your project's clang-format settings) so the
NotifyRecoveredSig function and surrounding whitespace/indentation match project
style, then re-run clang-format or the CI linter and commit the updated file.

@DashCoreAutoGuix
Copy link

Guix Automation has began to build this PR tagged as v23.0.0-devpr6967.e404e679. A new comment will be made when the image is pushed.

@DashCoreAutoGuix
Copy link

Guix Automation has completed; a release should be present here: https://github.com/dashpay/dash-dev-branches/releases/tag/v23.0.0-devpr6967.e404e679. The image should be on dockerhub soon.

@PastaPastaPasta PastaPastaPasta force-pushed the feat/proactively-push-recsig branch from e404e67 to 7e782ff Compare November 21, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants