Skip to content

Commit 6b3c4bd

Browse files
Merge branch 'develop' of https://github.com/dashpay/dash into develop
2 parents d94137f + 297c9cc commit 6b3c4bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+994
-870
lines changed

doc/release-notes-7062.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# RPC changes
2+
3+
- `quorum dkginfo` will now require that nodes run either in watch-only mode (`-watchquorums`) or as an
4+
active masternode (i.e. masternode mode) as regular nodes do not have insight into network DKG activity.
5+
6+
- `quorum dkgstatus` will no longer emit the return values `time`, `timeStr` and `session` on nodes that
7+
do not run in either watch-only or masternode mode as regular nodes do not have insight into network
8+
DKG activity.

src/Makefile.qt.include

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ BITCOIN_QT_H = \
139139
qt/proposalwizard.h \
140140
qt/guiconstants.h \
141141
qt/guiutil.h \
142+
qt/guiutil_font.h \
142143
qt/initexecutor.h \
143144
qt/intro.h \
144145
qt/macdockiconhandler.h \
@@ -230,6 +231,7 @@ BITCOIN_QT_BASE_CPP = \
230231
qt/clientmodel.cpp \
231232
qt/csvmodelwriter.cpp \
232233
qt/guiutil.cpp \
234+
qt/guiutil_font.cpp \
233235
qt/initexecutor.cpp \
234236
qt/intro.cpp \
235237
qt/modaloverlay.cpp \

src/init.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2225,9 +2225,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
22252225
g_active_notification_interface = std::make_unique<ActiveNotificationInterface>(*node.active_ctx, *node.mn_activeman);
22262226
RegisterValidationInterface(g_active_notification_interface.get());
22272227
} else if (quorums_watch) {
2228-
node.observer_ctx = std::make_unique<llmq::ObserverContext>(*node.llmq_ctx->bls_worker, *node.dmnman, *node.mn_metaman, *node.llmq_ctx->dkg_debugman,
2229-
*node.llmq_ctx->quorum_block_processor, *node.llmq_ctx->qman, *node.llmq_ctx->qsnapman, chainman,
2230-
*node.sporkman, dash_db_params);
2228+
node.observer_ctx = std::make_unique<llmq::ObserverContext>(*node.llmq_ctx->bls_worker, *node.dmnman, *node.mn_metaman, *node.llmq_ctx->quorum_block_processor,
2229+
*node.llmq_ctx->qman, *node.llmq_ctx->qsnapman, chainman, *node.sporkman, dash_db_params);
22312230
RegisterValidationInterface(node.observer_ctx.get());
22322231
}
22332232

src/llmq/context.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <chainlock/chainlock.h>
99
#include <instantsend/instantsend.h>
1010
#include <llmq/blockprocessor.h>
11-
#include <llmq/debug.h>
1211
#include <llmq/quorums.h>
1312
#include <llmq/signing.h>
1413
#include <llmq/snapshot.h>
@@ -20,7 +19,6 @@ LLMQContext::LLMQContext(ChainstateManager& chainman, CDeterministicMNManager& d
2019
const llmq::QvvecSyncModeMap& sync_map, const util::DbWrapperParams& db_params,
2120
bool quorums_recovery, bool quorums_watch, int8_t bls_threads, int64_t max_recsigs_age) :
2221
bls_worker{std::make_shared<CBLSWorker>()},
23-
dkg_debugman{std::make_unique<llmq::CDKGDebugManager>()},
2422
qsnapman{std::make_unique<llmq::CQuorumSnapshotManager>(evo_db)},
2523
quorum_block_processor{std::make_unique<llmq::CQuorumBlockProcessor>(chainman.ActiveChainstate(), dmnman, evo_db,
2624
*qsnapman, bls_threads)},

src/llmq/context.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class PeerManager;
2121

2222
namespace llmq {
2323
class CChainLocksHandler;
24-
class CDKGDebugManager;
2524
class CInstantSendManager;
2625
class CQuorumBlockProcessor;
2726
class CQuorumManager;
@@ -58,7 +57,6 @@ struct LLMQContext {
5857
* but it still guarantees that objects are created and valid
5958
*/
6059
const std::shared_ptr<CBLSWorker> bls_worker;
61-
const std::unique_ptr<llmq::CDKGDebugManager> dkg_debugman;
6260
const std::unique_ptr<llmq::CQuorumSnapshotManager> qsnapman;
6361
const std::unique_ptr<llmq::CQuorumBlockProcessor> quorum_block_processor;
6462
const std::unique_ptr<llmq::CQuorumManager> qman;

src/llmq/core_write.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ RPCResult CDKGDebugSessionStatus::GetJsonHelp(const std::string& key, bool optio
7878
}
7979

8080
// CDKGDebugStatus::ToJson() defined in llmq/debug.cpp
81-
RPCResult CDKGDebugStatus::GetJsonHelp(const std::string& key, bool optional)
81+
RPCResult CDKGDebugStatus::GetJsonHelp(const std::string& key, bool optional, bool inner_optional)
8282
{
8383
return {RPCResult::Type::OBJ, key, optional, key.empty() ? "" : "The state of the node's DKG sessions",
8484
{
85-
{RPCResult::Type::NUM, "time", "Adjusted time for the last update, timestamp"},
86-
{RPCResult::Type::STR, "timeStr", "Adjusted time for the last update, human friendly"},
87-
{RPCResult::Type::ARR, "session", "", {
85+
{RPCResult::Type::NUM, "time", inner_optional, "Adjusted time for the last update, timestamp"},
86+
{RPCResult::Type::STR, "timeStr", inner_optional, "Adjusted time for the last update, human friendly"},
87+
{RPCResult::Type::ARR, "session", inner_optional, "", {
8888
{RPCResult::Type::OBJ, "", "", {
8989
{RPCResult::Type::NUM, "llmqType", "Name of quorum"},
9090
GetRpcResult("quorumIndex"),

src/llmq/debug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class CDKGDebugStatus
9292
//std::map<Consensus::LLMQType, CDKGDebugSessionStatus> sessions;
9393

9494
public:
95-
[[nodiscard]] static RPCResult GetJsonHelp(const std::string& key, bool optional);
95+
[[nodiscard]] static RPCResult GetJsonHelp(const std::string& key, bool optional, bool inner_optional = false);
9696
[[nodiscard]] UniValue ToJson(CDeterministicMNManager& dmnman, CQuorumSnapshotManager& qsnapman,
9797
const ChainstateManager& chainman, int detailLevel) const;
9898
};

src/llmq/observer/context.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44

55
#include <llmq/observer/context.h>
66

7+
#include <llmq/debug.h>
78
#include <llmq/dkgsessionmgr.h>
89
#include <llmq/quorums.h>
910

1011
namespace llmq {
11-
ObserverContext::ObserverContext(CBLSWorker& bls_worker, CDeterministicMNManager& dmnman,
12-
CMasternodeMetaMan& mn_metaman, llmq::CDKGDebugManager& dkg_debugman,
12+
ObserverContext::ObserverContext(CBLSWorker& bls_worker, CDeterministicMNManager& dmnman, CMasternodeMetaMan& mn_metaman,
1313
llmq::CQuorumBlockProcessor& qblockman, llmq::CQuorumManager& qman,
1414
llmq::CQuorumSnapshotManager& qsnapman, const ChainstateManager& chainman,
1515
const CSporkManager& sporkman, const util::DbWrapperParams& db_params) :
1616
m_qman{qman},
17-
qdkgsman{std::make_unique<llmq::CDKGSessionManager>(bls_worker, dmnman, dkg_debugman, mn_metaman, qblockman,
18-
qsnapman, /*mn_activeman=*/nullptr, chainman, sporkman,
19-
db_params, /*quorums_watch=*/true)}
17+
dkgdbgman{std::make_unique<llmq::CDKGDebugManager>()},
18+
qdkgsman{std::make_unique<llmq::CDKGSessionManager>(bls_worker, dmnman, *dkgdbgman, mn_metaman, qblockman, qsnapman,
19+
/*mn_activeman=*/nullptr, chainman, sporkman, db_params,
20+
/*quorums_watch=*/true)}
2021
{
2122
m_qman.ConnectManager(qdkgsman.get());
2223
}

src/llmq/observer/context.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ struct ObserverContext final : public CValidationInterface {
3636
ObserverContext(const ObserverContext&) = delete;
3737
ObserverContext& operator=(const ObserverContext&) = delete;
3838
ObserverContext(CBLSWorker& bls_worker, CDeterministicMNManager& dmnman, CMasternodeMetaMan& mn_metaman,
39-
llmq::CDKGDebugManager& dkg_debugman, llmq::CQuorumBlockProcessor& qblockman,
40-
llmq::CQuorumManager& qman, llmq::CQuorumSnapshotManager& qsnapman, const ChainstateManager& chainman,
39+
llmq::CQuorumBlockProcessor& qblockman, llmq::CQuorumManager& qman,
40+
llmq::CQuorumSnapshotManager& qsnapman, const ChainstateManager& chainman,
4141
const CSporkManager& sporkman, const util::DbWrapperParams& db_params);
4242
~ObserverContext();
4343

@@ -46,6 +46,7 @@ struct ObserverContext final : public CValidationInterface {
4646
void UpdatedBlockTip(const CBlockIndex* pindexNew, const CBlockIndex* pindexFork, bool fInitialDownload) override;
4747

4848
public:
49+
const std::unique_ptr<llmq::CDKGDebugManager> dkgdbgman;
4950
const std::unique_ptr<llmq::CDKGSessionManager> qdkgsman;
5051
};
5152
} // namespace llmq

src/masternode/active/context.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <instantsend/instantsend.h>
1212
#include <instantsend/signing.h>
1313
#include <llmq/context.h>
14+
#include <llmq/debug.h>
1415
#include <llmq/dkgsessionmgr.h>
1516
#include <llmq/ehf_signals.h>
1617
#include <llmq/quorums.h>
@@ -25,8 +26,9 @@ ActiveContext::ActiveContext(CCoinJoinServer& cj_server, CConnman& connman, CDet
2526
m_llmq_ctx{llmq_ctx},
2627
m_cj_server(cj_server),
2728
gov_signer{std::make_unique<GovernanceSigner>(connman, dmnman, govman, mn_activeman, chainman, mn_sync)},
28-
qdkgsman{std::make_unique<llmq::CDKGSessionManager>(*llmq_ctx.bls_worker, dmnman, *llmq_ctx.dkg_debugman,
29-
mn_metaman, *llmq_ctx.quorum_block_processor, *llmq_ctx.qsnapman,
29+
dkgdbgman{std::make_unique<llmq::CDKGDebugManager>()},
30+
qdkgsman{std::make_unique<llmq::CDKGSessionManager>(*llmq_ctx.bls_worker, dmnman, *dkgdbgman, mn_metaman,
31+
*llmq_ctx.quorum_block_processor, *llmq_ctx.qsnapman,
3032
&mn_activeman, chainman, sporkman, db_params, quorums_watch)},
3133
shareman{std::make_unique<llmq::CSigSharesManager>(connman, chainman.ActiveChainstate(), *llmq_ctx.sigman, peerman,
3234
mn_activeman, *llmq_ctx.qman, sporkman)},

0 commit comments

Comments
 (0)