DeFiCh / ain

DeFi Blockchain - enabling decentralized finance on Bitcoin
https://defichain.com
MIT License
401 stars 119 forks source link

Warning when activating masternode without operator privkey #856

Closed IraGraves closed 2 years ago

IraGraves commented 3 years ago

Which feature is your request related to?

Masternodes

Is your request related to a problem? Please describe.

I suggest to add a warning to spare others from some trouble I encountered. The warning would avoid seriously messing up the app/wallet in the following scenario: I set up a masternode on a VPS (creating the operator address on the VPS), and managing the owner address from the desktop wallet (following this: https://defichain-wiki.com/wiki/Masternode_installation_extended). This works fine. However, the desktop app shows the masternode as "local" and in a grey/inactive state, offering a button to "activate" it. This button is so tempting that, although I had a bad feeling, I clicked on it... The desktop app then tried to activate the masternode locally, which failed due to lack of the key for the operator address. This rendered the app/GUI unusable as after starting it every time it immediately lost connection to the node (debug showed that it was because of the missing privkey for the operator node). I fixed this by switching off the internet connection and feeding in the missing privkey which I exported from the VPS via the CLI.

Describe the solution you'd like:

When using the "activate" button on a masternode for which the wallet does not hold the private key for the operator address, a warning should be displayed before continuing.

Describe alternatives you've considered:

An alternative would be not providing the "activate" button in this scenario at all (for masternodes which cannot be activated). Even better would be that the node is not shown as "locally" in the first place as it is in fact up and running in the VPS (maybe this can be done but I am not sure how; I simply followed the installation tutorial linked above).

Additional context:

defichain-bot commented 3 years ago

@IraGraves: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

In the meantime, you can:

  1. Checkout DeFiChain’s Github issue page to see if your issue has already been reported
  2. Submit any logs if you have them, this will greatly expedite the process for us.
  3. You can also join our Telegram or Reddit community channels.
Details I am a bot created to help the [DeFiCh](https://github.com/DeFiCh) developers manage community feedback and contributions. You can check out my [manifest file](https://github.com/DeFiCh/app/blob/master/.github/governance.yml) to understand my behavior and what I can do. If you want to use this for your project, you can check out the [DeFiCh/oss-governance-bot](https://github.com/DeFiCh/oss-governance-bot) repository.
Stonygan commented 3 years ago

Hey, better solution is instead of to import the private key: edit defi.conf and delete the line:

gen=1

Or set it to gen=0.

Maybe for the next time. But you are right, it happens often that users try to activate a MN with a external operator.

izzycsy commented 3 years ago

Hi @IraGraves , thanks for your feedback, the team will add this into consideration when improving the feature.

izzycsy commented 3 years ago

Hi @IraGraves , update v2.6.3 is out. 
Please read through the release notes before updating. This comment is to notify you about the update.

defichain-bot commented 2 years ago

@IraGraves: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

Details I am a bot created to help the [DeFiCh](https://github.com/DeFiCh) developers manage community feedback and contributions. You can check out my [manifest file](https://github.com/DeFiCh/ain/blob/master/.github/governance.yml) to understand my behavior and what I can do. If you want to use this for your project, you can check out the [DeFiCh/oss-governance-bot](https://github.com/DeFiCh/oss-governance-bot) repository.
izzycsy commented 2 years ago

Transferring issue here for reference on improving ux.