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 #6838: refactor: split off governance masternode-only logic to GovernanceSigner, drop Relay()s and use periodic relay instead, minor cleanup
b51cd1d lint: apply most `clang-format` suggestions, update circular allowlist (Kittywhiskers Van Gogh)
700e069 refactor: cleanup headers and forward decls (Kittywhiskers Van Gogh)
c516fd3 refactor: apply review suggestions (Kittywhiskers Van Gogh)
d19e1f3 fix: add `nullptr` check before using `FindGovernanceObject()` retval (Kittywhiskers Van Gogh)
1777919 refactor: use `std::chrono` for governance time constants (Kittywhiskers Van Gogh)
4d96f5f refactor: move `DoMaintenance()` inside `Schedule()` (Kittywhiskers Van Gogh)
e224991 governance: add lock annotations for `cs_relay` (Kittywhiskers Van Gogh)
df589c7 governance: introduce task for relaying governance objects (Kittywhiskers Van Gogh)
3811924 governance: drop `Relay()` from `CGovernance{Object,Vote}` (Kittywhiskers Van Gogh)
63448ff refactor: abstract away parent implementation from signer (Kittywhiskers Van Gogh)
757ded3 refactor: remove need for access to private members (Kittywhiskers Van Gogh)
bd6af83 refactor: separate masternode mode logic into dedicated signer class (Kittywhiskers Van Gogh)
2b74e15 refactor: move masternode mode logic to `governance/signing.cpp` (Kittywhiskers Van Gogh)
fefbe27 refactor: replace `Sign` functions with direct activeman call (Kittywhiskers Van Gogh)
Pull request description:
## Additional Information
* Depends on #6828
* Depends on #6842
* Depends on #6877
* Dependency for #6849
* To reduce the proliferation of `PeerManager` in governance logic, relaying has been centralized to `CGovernanceManager` and now done through a scheduled task that processes a queue of requests. This reduces the amount of code that needs to fetch a reference to `PeerManager` in order to queue a message for relay and brings us closer to dropping it as a member in other objects.
* On test chains, the queue of requests is processed every second but on mainnet, it is processed every 5 seconds. This is because functional tests assume instantaneous relay and fail if it takes too long to relay messages (as cascading delays cause test timeout).
* Likewise, to reduce the references to `CActiveMasternodeManager`, signing logic is consolidated to `SignBasic()` with the objects using simple getter/setters (or direct assignment) where applicable.
## Breaking Changes
None expected.
## 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 b51cd1d
knst:
utACK b51cd1d
Tree-SHA512: cd4bba1e7314695a215a8a83e2d5319be8d2eb2e88eb42f641f6c88ca6d74ee68ced9e95475c6b1d93f5b061993efa6a195d23f61a8775f920867d9836a0dcf8
0 commit comments