Skip to content

Commit 93d21da

Browse files
Merge #7008: refactor: separate network and consensus logic 3/N [governance]
a67300c fix: multiple CI failures (Konstantin Akimov) be62366 refactor: pass connman in constructor of NetHandler's child which need it (Konstantin Akimov) dc08ef4 refactor: break circular dependency of CMasternodeManager over net.h (Konstantin Akimov) 9ac269c refactor: move ProcessMessage from CMasternodeSync to SyncManager (Konstantin Akimov) b9aec50 refactor: split NetGovernance to SyncManager and NetGovernance (Konstantin Akimov) 106827c fmt: clang-format (Konstantin Akimov) fc21e51 refactor: move ProcessMessage from CGovernanceManager to NetGovernance (Konstantin Akimov) fa0e173 refactor: add CConnman to NetHandler's ProcessMessage (Konstantin Akimov) 7f3d16d chore: apply clang-format and adjust logs (Konstantin Akimov) 461392e refactor: move RequestGovernanceObjectVotes to NetGovernance to drop dependency governance on net_processing (Konstantin Akimov) 8425ca1 fix: reduce scope of ::cs_main during PeerGetRequestedObjectCount (Konstantin Akimov) 77faacc refactor: split FetchGovernanceObjectVotes to own member of CGovernanceManager (Konstantin Akimov) e7f9218 refactor: drop a wrapper RequestGovernanceObjectVotes for a single node (Konstantin Akimov) eb9607e refactor: move DEFAULT_SYNC_MEMPOOL form validation.h to masternode/sync.h (Konstantin Akimov) be0be6b chore: fix clang-format and adjust log messages (Konstantin Akimov) e878592 refactor: drop dependency of masternode/sync on governance by moving relevant code to NetGovernance (Konstantin Akimov) 7e4849a refactor: inline method CleanOrphanObjects to CGovernanceManager::RequestOrphanObjects (Konstantin Akimov) 285def6 refactor: use NetHandler to move scheduler & partially network related code from governance (Konstantin Akimov) 78c6062 refactor: drop unused includes and forward declarations from masternode/sync and governance/governance (Konstantin Akimov) 91129d4 refactor: drop dead code with ERROR_TXINDEX_DISABLED_WHEN_GOV_ENABLED (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented Separation of consensus & chain code and network & node in Dash Core is blocked by tight connection of network and consensus code; in components such as `llmq::CSigningManager`, `llmq::CSigSharesManager`, `coinjoin::client`, `coinjoin::server`, `governance/`, `llmq::CInstantSendManager`, etc. It blocks backport's of bitcoin related to 'kernel' project. ## What was done? This PR addresses a dependency of `CGovernanceManager` on `PeerManager`. `CMasternodeSync` is refactored to pure state-machine without dependencies on net.h. It is a split from proof-of-concept PR #6934 Prior work: #6959 #6992 ## How Has This Been Tested? Run unit & functional tests. Run a linter `test/lint/lint-circular-dependencies.py` Overall conception is tested in #6934 as potentially successful to finish separation of network & consensus code. ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [x] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone ACKs for top commit: UdjinM6: light ACK a67300c Tree-SHA512: dc8548268cd3156848e50fd338776be676c63d966fd6b576fb1f0f3b5416afd6d9b4a4d17f6df7cd1cf3b0c4f8908b4848e196dad808f430207d75e2adf6bbe0
2 parents bac6bfa + a67300c commit 93d21da

File tree

17 files changed

+726
-594
lines changed

17 files changed

+726
-594
lines changed

src/Makefile.am

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,9 @@ BITCOIN_CORE_H = \
220220
dsnotificationinterface.h \
221221
governance/classes.h \
222222
governance/common.h \
223-
governance/governance.h \
224223
governance/exceptions.h \
224+
governance/governance.h \
225+
governance/net_governance.h \
225226
governance/object.h \
226227
governance/signing.h \
227228
governance/validators.h \
@@ -311,6 +312,7 @@ BITCOIN_CORE_H = \
311312
node/miner.h \
312313
node/minisketchwrapper.h \
313314
node/psbt.h \
315+
node/sync_manager.h \
314316
node/transaction.h \
315317
node/txreconciliation.h \
316318
node/interface_ui.h \
@@ -508,6 +510,7 @@ libbitcoin_node_a_SOURCES = \
508510
governance/classes.cpp \
509511
governance/exceptions.cpp \
510512
governance/governance.cpp \
513+
governance/net_governance.cpp \
511514
governance/object.cpp \
512515
governance/signing.cpp \
513516
governance/validators.cpp \
@@ -567,6 +570,7 @@ libbitcoin_node_a_SOURCES = \
567570
node/miner.cpp \
568571
node/minisketchwrapper.cpp \
569572
node/psbt.cpp \
573+
node/sync_manager.cpp \
570574
node/transaction.cpp \
571575
node/txreconciliation.cpp \
572576
node/interface_ui.cpp \

0 commit comments

Comments
 (0)