Skip to content

refactor: extract CActiveMasternodeManager from LLMQContext (2/n, CQuorumManager handler separation) - #7063

Merged
PastaPastaPasta merged 16 commits into
dashpay:developfrom
kwvg:active_p3
Jan 3, 2026
Merged

refactor: extract CActiveMasternodeManager from LLMQContext (2/n, CQuorumManager handler separation)#7063
PastaPastaPasta merged 16 commits into
dashpay:developfrom
kwvg:active_p3

Conversation

@kwvg

@kwvg kwvg commented Dec 13, 2025

Copy link
Copy Markdown
Collaborator

Additional Information

  • Depends on refactor(rpc): add watch-only/masternode mode restrictions for quorum dkg{info,status}, move CDKGDebugManager to {Active,Observer}Context #7062

  • Dependency for refactor: extract CActiveMasternodeManager from LLMQContext (3/n, DKG session isolation, ActiveContext consolidation) #7065

  • To enforce the split between masternode mode (which can participate in quorums and seek quorum data) and watch-only mode (which can only seek quorum data), threading logic is split between StartDataRecoveryThread() and StartVvecSyncThread(), they both call the same underlying DataRecoveryThread() but one has access to masternode-specific parameters and the other does not.

    This becomes relevant as the entities are split out and the access to specific parameters are enforced by the relevant class members outright not existing.

    • It is recommended to use TryStartVvecSyncThread() as it will not start threads if no data is actually needed, calling StartVvecSyncThread() directly bypasses this check.
  • CQuorumManager exposes both IsWatching() and IsMasternode() to allow P2P code and interfaces to query the node's state (this is most relevant in PeerManager which can trivially detect masternode mode but not watch-only status).

    • Watch-only nodes cannot be masternodes but masternodes can also be watch-only (the term "observer" has been used in the codebase where possible as watch-only becomes a bit of a misnomer in this case but is the established term) nodes.
  • The CQuorumManager cache warmer was one of the tasks allocated to the common worker pool, as the rest of the activities are managed by the observer context, rather than keeping the worker pool in the quorum manager and then exposing it through the interface for the sake of one task, the worker pool has been moved to the observer context and we have a regular thread for the quorum manager instead.

Breaking Changes

None expected.

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

Loading
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.

4 participants