refactor: extract CActiveMasternodeManager from LLMQContext (2/n, CQuorumManager handler separation) - #7063
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Additional Information
Depends on refactor(rpc): add watch-only/masternode mode restrictions for
quorum dkg{info,status}, moveCDKGDebugManagerto{Active,Observer}Context#7062Dependency for refactor: extract
CActiveMasternodeManagerfromLLMQContext(3/n, DKG session isolation,ActiveContextconsolidation) #7065To 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()andStartVvecSyncThread(), they both call the same underlyingDataRecoveryThread()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.
TryStartVvecSyncThread()as it will not start threads if no data is actually needed, callingStartVvecSyncThread()directly bypasses this check.CQuorumManagerexposes bothIsWatching()andIsMasternode()to allow P2P code and interfaces to query the node's state (this is most relevant inPeerManagerwhich can trivially detect masternode mode but not watch-only status).The
CQuorumManagercache 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