Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GUI] New Deterministic Masternodes Graphical User Interface #2751

Open
wants to merge 41 commits into
base: master
Choose a base branch
from

Conversation

furszy
Copy link

@furszy furszy commented Feb 19, 2022

Adding visual interface support for the new Deterministic Masternodes system.

Implementing the following points:

  1. Expanded Masternode creation wizard to support the new network roles of the Deterministic Masternodes system.

    1. Owner:
      1. Create new collateral or select an existent one.
      2. Customize owner address: the main address for the Masternode.
      3. Customize payout address: recipient for the MN block rewards.
    2. Service Operator:
      1. Customize operator key: the BLS key required to run the 24/7 node.
      2. Customize operator payout percentage and payout address: an optional mechanism to set an automatic payout percentage and recipient for the operator.
    3. Voter:
      1. Customize voting address: who will be able to vote for budget proposals .
  2. Masternodes screen:

    1. Distinction between Legacy and Deterministic Masternodes.
    2. New menu actions for each DMN (info, change/revoque service, change voting key, delete) .
  3. New tier two module to cache and update the DMN list.

  4. Generalized mnmodel to accept legacy and deterministic MNs.

  5. DMN functions decoupled from the RPC commands into a shared file.

This is still a work in progress but.. short demo of the flow:

part_0_720_DMN.mp4
part_2_720.mov
part3_720.mov

Notes for testers (mostly for non-devs):

  1. As this is only available on regtest for the time being, in order to create Deterministic Masternodes, v6.0 network upgrade needs to be enforced. The enforcement height is block 301.
    So, you will need to manually create blocks using the generate <number_of_blocks> command. Once your node surpasses the activation block, the GUI will automatically create Deterministic Masternodes.

  2. Deterministic Masternodes only work on IPv4 addresses for now (this is a backend restriction, not a GUI one).

  3. If you want to disable legacy Masternodes (and finish the compatibility phase), you need to broadcast the SPORK_21_LEGACY_MNS_MAX_HEIGHT spork.


Final important note:

This work is still in-progress, wording and visuals can change moving on :).

To do list:

  • 1. MN creation wizard: add auto-complete to owner payout address and operator payout addr.
  • 2. Continue testing..

@furszy furszy self-assigned this Feb 19, 2022
@furszy furszy added this to the 6.0.0 milestone Feb 19, 2022
@furszy furszy added the GUI label Feb 19, 2022
@furszy furszy force-pushed the 2022_GUI_dmn_features branch 5 times, most recently from 79eeb7d to fad8d1a Compare February 21, 2022 17:07
@furszy
Copy link
Author

furszy commented Feb 21, 2022

Added a section in the PR description to guide any non-dev who want to try this work and provide feedback.

@furszy furszy force-pushed the 2022_GUI_dmn_features branch 4 times, most recently from 9d03e3e to e123131 Compare February 23, 2022 13:03
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code ACK up to d274ee4.
Only minor nits so far. Really good job.

src/qt/pivx/masternodewizarddialog.cpp Outdated Show resolved Hide resolved
src/interfaces/tiertwo.cpp Outdated Show resolved Hide resolved
src/interfaces/tiertwo.cpp Show resolved Hide resolved
src/qt/pivx/mnmodel.h Outdated Show resolved Hide resolved
src/qt/pivx/masternodeswidget.cpp Outdated Show resolved Hide resolved
@furszy
Copy link
Author

furszy commented Feb 24, 2022

thanks zebra, most of the feedback tackled.

@furszy furszy force-pushed the 2022_GUI_dmn_features branch 2 times, most recently from a7db550 to eabd356 Compare February 24, 2022 22:25
Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still working through this, but some initial feedback:

  • Some new strings don't need to be passed to Transifex.
  • A copyright year update should use range of years
  • In the UI's MN creation wizard, there is some text being cut off (see screenshots below)
    Image 112
    Image 113

src/qt/pivx/forms/masternodewizarddialog.ui Outdated Show resolved Hide resolved
src/qt/pivx/forms/masternodewizarddialog.ui Outdated Show resolved Hide resolved
src/qt/pivx/forms/masternodewizarddialog.ui Outdated Show resolved Hide resolved
src/qt/pivx/forms/masternodewizarddialog.ui Outdated Show resolved Hide resolved
src/qt/pivx/forms/masternodewizarddialog.ui Outdated Show resolved Hide resolved
src/qt/pivx/forms/masternodewizarddialog.ui Outdated Show resolved Hide resolved
src/qt/pivx/tooltipmenu.cpp Outdated Show resolved Hide resolved
@furszy furszy force-pushed the 2022_GUI_dmn_features branch 2 times, most recently from 4e3516d to a36ff71 Compare February 28, 2022 16:24
@furszy
Copy link
Author

furszy commented Feb 28, 2022

tackled the "N/A" non-translatable strings and the cut off text (on linux).

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First round completed. Code ACK a36ff71.
Awesome stuff ☕ . Left only some minor comment. Will give it proper testing now.

src/qt/pivx/masternodewizarddialog.h Outdated Show resolved Hide resolved
src/qt/pivx/masternodewizarddialog.cpp Outdated Show resolved Hide resolved
src/qt/pivx/mnmodel.cpp Outdated Show resolved Hide resolved
src/qt/pivx/masternodewizarddialog.cpp Outdated Show resolved Hide resolved
src/qt/pivx/masternodewizarddialog.cpp Outdated Show resolved Hide resolved
src/qt/pivx/masternodewizarddialog.cpp Outdated Show resolved Hide resolved
src/qt/pivx/mnselectiondialog.cpp Outdated Show resolved Hide resolved
@furszy
Copy link
Author

furszy commented Mar 1, 2022

thx 🤘. great findings 👌👌, feedback tackled.

Decoupling the RPC server errors from the function.
And use the `PROTOCOL_VERSION` instead of the `CLIENT_VERSION`. Which should had never been used there as the serialization of inputs/spend_notes cannot be modified changing the `CLIENT_VERSION`, it's a hard-fork that needs a protocol bump.
Same validation is performed inside TryATMP.
…the network.

The transaction inputs are always from the wallet.
@furszy
Copy link
Author

furszy commented Mar 4, 2022

rebased on master, so any tester can use the new spork to verify a different LLMQ scenario.

@furszy furszy changed the title [WIP][GUI] New Deterministic Masternodes Graphical User Interface [GUI] New Deterministic Masternodes Graphical User Interface Mar 7, 2022
@furszy
Copy link
Author

furszy commented Mar 9, 2022

Small update while we continue moving forward here:
Testing the complete v6.0 upgrade on an isolated network, zebra found the following potential deadlock:

POTENTIAL DEADLOCK DETECTED
Previous lock order was:
m_cs_chainstate validation.cpp:2265 (in thread pivx-msghand)
cs_main validation.cpp:2280 (in thread pivx-msghand)
(1) mempool.cs validation.cpp:2281 (in thread pivx-msghand)
cs_cache interfaces/tiertwo.cpp:142 (in thread pivx-msghand)
(2) pwallet->cs_wallet interfaces/tiertwo.cpp:76 (in thread pivx-msghand)
Current lock order is:
cs_main wallet/wallet.cpp:1981 (in thread )
(2) cs_wallet wallet/wallet.cpp:1981 (in thread )
(1) cs ./txmempool.h:642 (in thread )

Which is fixed by 9e4b653.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants