Skip to content

Conversation

kwvg
Copy link
Collaborator

@kwvg kwvg commented Sep 15, 2025

Additional Information

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

@kwvg kwvg added this to the 23 milestone Sep 15, 2025
Copy link

github-actions bot commented Sep 15, 2025

✅ No Merge Conflicts Detected

This PR currently has no conflicts with other open PRs.

Copy link

This pull request has conflicts, please rebase.

Copy link

This pull request has conflicts, please rebase.

Copy link

This pull request has conflicts, please rebase.

PastaPastaPasta added a commit that referenced this pull request Oct 20, 2025
…`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
@kwvg kwvg changed the title refactor: update lock annotations for GovernanceStore, CGovernanceManager and CGovernanceStore, move away from RecursiveMutexes refactor: update lock annotations for GovernanceStore and CGovernanceManager, move away from RecursiveMutexes Oct 20, 2025
@kwvg kwvg changed the title refactor: update lock annotations for GovernanceStore and CGovernanceManager, move away from RecursiveMutexes refactor: update lock annotations for GovernanceStore and CGovernanceObject, move away from RecursiveMutexes Oct 20, 2025
@kwvg kwvg changed the title refactor: update lock annotations for GovernanceStore and CGovernanceObject, move away from RecursiveMutexes refactor: update lock annotations for CGovernanceObject and GovernanceStore, move away from RecursiveMutexes Oct 20, 2025
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.

1 participant