You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #6841: refactor: move CSigSharesManager to ActiveContext, drop CActiveMasternodeManager from CSigSharesManager
af9a15f lint: apply review suggestions (Kittywhiskers Van Gogh)
6c89f0e refactor: move `RelayRecoveredSig()` call out of `CSigSharesManager` (Kittywhiskers Van Gogh)
0052fca refactor: move `AsyncSignIfMember()` to `CSigSharesManager` (Kittywhiskers Van Gogh)
489cf6e refactor: adjust `CSigSharesManager` ctor arguments (Kittywhiskers Van Gogh)
f6b02b7 refactor: move `CDKGSessionManager` thread management to `ActiveContext` (Kittywhiskers Van Gogh)
74afa28 refactor: move `CSigSharesManager` to `ActiveContext` (Kittywhiskers Van Gogh)
6563ade refactor: remove unused `CSigningManager` from `CChainLocksHandler` ctor (Kittywhiskers Van Gogh)
Pull request description:
## Additional Information
* Depends on #6828
* Depends on #6839
* This pull request does _not_ address `CQuorumManager` or `CDKGSessionManager` as both complicate signer separation as they accommodate watch-only mode ([source](https://github.com/dashpay/dash/blob/e5ce1f0bef825d63e81a77dfbe65804da5ae04de/src/llmq/dkgsessionmgr.cpp#L46-L49), [source](https://github.com/dashpay/dash/blob/e5ce1f0bef825d63e81a77dfbe65804da5ae04de/src/llmq/quorums.cpp#L804-L806)) and allow for LLMQ data recovery enablement ([source](https://github.com/dashpay/dash/blob/e5ce1f0bef825d63e81a77dfbe65804da5ae04de/src/llmq/quorums.cpp#L251-L253)), which makes them better suited for a separate PR.
In contrast, `CSigSharesManager` can be more-or-less wholesale moved to `ActiveContext`, the objective of this PR.
* As part of isolating masternode-mode logic `CSigningManager::AsyncSignIfMember()`, which accepts `CSigSharesManager` as an argument, was moved to `CSigSharesManager` accepting `CSigningManager` as argument. This required exposing the recovered signatures DB to `CSigningManager`, which has been done with `GetDb()`.
* As a result of this change and the move to `ActiveContext`, the `quorum sign` RPC will only work if masternode-mode is enabled
* To allow dropping `CActiveMasternodeManager` from `CSigningManager`, we needed to drop a `RelayRecoveredSig()` call that is only done in masternode-mode ([source](https://github.com/dashpay/dash/blob/e5ce1f0bef825d63e81a77dfbe65804da5ae04de/src/llmq/signing.cpp#L619)). To do that, we rely on the `NotifyRecoveredSig()` signal that is invoked at the tail of `CSigningManager::ProcessRecoveredSig()` ([source](https://github.com/dashpay/dash/blob/e5ce1f0bef825d63e81a77dfbe65804da5ae04de/src/llmq/signing.cpp#L619)) by having `ActiveNotificationInterface` slot in, acting in _response_ to the notification rather than before (i.e. existing behavior).
## Breaking Changes
The `quorum sign` RPC will only work if masternode-mode is enabled.
## Checklist
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e tests
- [x] I have made corresponding changes to the documentation (note: N/A)
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
UdjinM6:
utACK af9a15f
Tree-SHA512: c769a88b5d311f7562d2fcb9f2953746de6edcb13227034ed2db50c059d31838b925b13de00d4d91bd4fa3ea5d98c13ac3ddfba4cf0c4b17187d7004f7446b1b
if (m_mn_activeman->GetProTxHash().IsNull()) returnfalse;
675
-
676
-
constauto quorum = [&]() {
677
-
if (quorumHash.IsNull()) {
678
-
// This might end up giving different results on different members
679
-
// This might happen when we are on the brink of confirming a new quorum
680
-
// This gives a slight risk of not getting enough shares to recover a signature
681
-
// But at least it shouldn't be possible to get conflicting recovered signatures
682
-
// TODO fix this by re-signing when the next block arrives, but only when that block results in a change of the quorum list and no recovered signature has been created in the mean time
0 commit comments