diff --git a/doc/release-notes-decentralized-mn-ui.md b/doc/release-notes-decentralized-mn-ui.md new file mode 100644 index 000000000000..7a845c97c22a --- /dev/null +++ b/doc/release-notes-decentralized-mn-ui.md @@ -0,0 +1,68 @@ +# Masternode management in the GUI + +The Masternodes tab in dash-qt gains a full set of management flows, so a +masternode, evonode or shared masternode can be created and maintained from the +wallet without hand-assembling `protx` commands in the debug console. + +## Recognition + +- Shared masternodes appear in the list with the type "Shared", have their own + entry in the type filter (the "Regular" filter now shows only single-owner + masternodes), and match the text filter by their share owner, refund and + reward addresses. A masternode is recognized as owned when the wallet holds + any of its share owner keys. +- The details dialog shows the collateral share table with per-share amounts and + addresses, the shares belonging to this wallet, the early-exit penalty terms + and the remaining early period. + +## Registration + +- A wizard registers a masternode (1,000 DASH) or evonode (4,000 DASH) using one + of three collateral paths: funding the collateral from the wallet, using an + existing collateral output already held by the wallet, or external collateral + held in another wallet or on a hardware device (prepare, sign the message + out-of-band, then submit). +- Owner and voting addresses are generated from the wallet, so its backup covers + them. The operator BLS key is **derived from the wallet's recovery phrase** at + `m/9'/coin'/3'/3'/index` — the same derivation the Dash mobile wallets use, so + the recovery phrase alone restores it. Each masternode gets its own index, and + keys already registered on-chain are skipped, so a wallet restored from its + phrase never reuses another masternode's key. Wallets with no recovery phrase + (imported descriptors, raw seeds, pre-HD wallets) generate a key that is shown + once for the owner to save, and a hosting provider's public key can be supplied + instead. In every case the matching `masternodeblsprivkey` line for the + masternode server's `dash.conf` is shown. +- **Show Operator Key** in the masternode list's context menu shows the operator + secret again for any masternode whose key this wallet holds, whether derived or + stored. + +## Transaction history + +- Dash special transactions now have their own types in the transaction list: + Masternode Registration, Masternode Update and Masternode Dissolution, with a + matching entry in the type filter. A registration previously appeared as a + "Payment to yourself" whose amount was only the network fee. + +## Maintenance + +- Update Service, Update Registrar and Revoke are available from the list's + context menu, with the evonode platform fields where applicable. Update + Registrar is not offered for shared masternodes, which rotate their keys + unanimously instead. + +## Shared masternodes (requires v24) + +- Creating a shared masternode is a resumable session: participants pass a + session file between their wallets to agree the share table and terms, each + contributes one funding output equal to their share, and each signs. Every + signature and every imported copy is verified against the transaction actually + being registered before it is accepted, so the terms shown always match the + terms signed. +- Shared masternodes can change a share's reward address, rotate their operator + and voting keys unanimously, and dissolve either unilaterally (with a live + payout and penalty preview) or unanimously (penalty-free). Each participant can + also generate standby dissolution transactions that never expire, to recover + their principal without cooperation if a key is lost. + +Shared-masternode features are shown only once the v24 hard fork is active on the +connected network. diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index 16296207eca1..fb2465561879 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -71,8 +71,11 @@ QT_MOC_CPP = \ qt/moc_intro.cpp \ qt/moc_macdockiconhandler.cpp \ qt/moc_macnotificationhandler.cpp \ + qt/moc_masternodedialogs.cpp \ qt/moc_masternodelist.cpp \ qt/moc_masternodemodel.cpp \ + qt/moc_masternodewidgets.cpp \ + qt/moc_masternodewizard.cpp \ qt/moc_mnemonicverificationdialog.cpp \ qt/moc_modaloverlay.cpp \ qt/moc_networkwidget.cpp \ @@ -89,6 +92,7 @@ QT_MOC_CPP = \ qt/moc_proposallist.cpp \ qt/moc_proposalmodel.cpp \ qt/moc_proposalresume.cpp \ + qt/moc_protxsender.cpp \ qt/moc_psbtoperationsdialog.cpp \ qt/moc_qrdialog.cpp \ qt/moc_qrimagewidget.cpp \ @@ -99,6 +103,8 @@ QT_MOC_CPP = \ qt/moc_recentrequeststablemodel.cpp \ qt/moc_rpcconsole.cpp \ qt/moc_sendcoinsdialog.cpp \ + qt/moc_sharedmncreatedialog.cpp \ + qt/moc_sharedmndialogs.cpp \ qt/moc_sendcoinsentry.cpp \ qt/moc_signverifymessagedialog.cpp \ qt/moc_splashscreen.cpp \ @@ -123,6 +129,7 @@ QT_MOC = \ qt/bitcoinamountfield.moc \ qt/intro.moc \ qt/overviewpage.moc \ + qt/protxsender.moc \ qt/rpcconsole.moc QT_QRC_CPP = qt/qrc_bitcoin.cpp @@ -158,9 +165,13 @@ BITCOIN_QT_H = \ qt/macdockiconhandler.h \ qt/macnotificationhandler.h \ qt/macos_appnap.h \ + qt/masternodedialogs.h \ qt/masternodelist.h \ qt/masternodemodel.h \ + qt/masternodewidgets.h \ + qt/masternodewizard.h \ qt/mnemonicverificationdialog.h \ + qt/mnsharesession.h \ qt/modaloverlay.h \ qt/networkstyle.h \ qt/networkwidget.h \ @@ -177,6 +188,7 @@ BITCOIN_QT_H = \ qt/proposallist.h \ qt/proposalmodel.h \ qt/proposalresume.h \ + qt/protxsender.h \ qt/psbtoperationsdialog.h \ qt/qrdialog.h \ qt/qrimagewidget.h \ @@ -189,6 +201,8 @@ BITCOIN_QT_H = \ qt/sendcoinsdialog.h \ qt/sendcoinsentry.h \ qt/sendcoinsrecipient.h \ + qt/sharedmncreatedialog.h \ + qt/sharedmndialogs.h \ qt/signverifymessagedialog.h \ qt/splashscreen.h \ qt/trafficgraphdata.h \ @@ -302,14 +316,19 @@ BITCOIN_QT_WALLET_CPP = \ qt/createwalletdialog.cpp \ qt/descriptiondialog.cpp \ qt/editaddressdialog.cpp \ + qt/masternodedialogs.cpp \ qt/masternodelist.cpp \ + qt/masternodewidgets.cpp \ + qt/masternodewizard.cpp \ qt/mnemonicverificationdialog.cpp \ + qt/mnsharesession.cpp \ qt/openuridialog.cpp \ qt/overviewpage.cpp \ qt/paymentserver.cpp \ qt/proposalcreate.cpp \ qt/proposallist.cpp \ qt/proposalresume.cpp \ + qt/protxsender.cpp \ qt/psbtoperationsdialog.cpp \ qt/qrdialog.cpp \ qt/qrimagewidget.cpp \ @@ -318,6 +337,8 @@ BITCOIN_QT_WALLET_CPP = \ qt/recentrequeststablemodel.cpp \ qt/sendcoinsdialog.cpp \ qt/sendcoinsentry.cpp \ + qt/sharedmncreatedialog.cpp \ + qt/sharedmndialogs.cpp \ qt/signverifymessagedialog.cpp \ qt/transactiondesc.cpp \ qt/transactionfilterproxy.cpp \ diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include index 62071d40e5a5..d83478bf6134 100644 --- a/src/Makefile.qttest.include +++ b/src/Makefile.qttest.include @@ -16,12 +16,14 @@ TEST_QT_MOC_CPP = \ if ENABLE_WALLET TEST_QT_MOC_CPP += \ qt/test/moc_addressbooktests.cpp \ + qt/test/moc_mnsharesessiontests.cpp \ qt/test/moc_wallettests.cpp endif # ENABLE_WALLET TEST_QT_H = \ qt/test/addressbooktests.h \ qt/test/apptests.h \ + qt/test/mnsharesessiontests.h \ qt/test/optiontests.h \ qt/test/rpcnestedtests.h \ qt/test/uritests.h \ @@ -45,6 +47,7 @@ qt_test_test_dash_qt_SOURCES = \ if ENABLE_WALLET qt_test_test_dash_qt_SOURCES += \ qt/test/addressbooktests.cpp \ + qt/test/mnsharesessiontests.cpp \ qt/test/wallettests.cpp \ wallet/test/wallet_test_fixture.cpp endif # ENABLE_WALLET diff --git a/src/interfaces/node.h b/src/interfaces/node.h index 9058ed3cae8e..20134f514e11 100644 --- a/src/interfaces/node.h +++ b/src/interfaces/node.h @@ -10,7 +10,9 @@ #include // For banmap_t #include // For Network #include // For ConnectionDirection +#include // For CKeyID #include // For StaticSaltedHasher +#include