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

Masternode start/start-many privkey not checked #443

Closed
scratchy opened this issue Jul 19, 2015 · 7 comments
Closed

Masternode start/start-many privkey not checked #443

scratchy opened this issue Jul 19, 2015 · 7 comments
Milestone

Comments

@scratchy
Copy link

Hey,

Currently its possible to start a masternode even if the masternodeprivkey is not matching on both sides (the wallet and the daemon). Is there any possibility that theres only a successful register/start if they both match?

@UdjinM6
Copy link

UdjinM6 commented Jul 19, 2015

its possible to start a masternode even if the masternodeprivkey is not matching on both sides (the wallet and the daemon)

That is simply not true, masternode will not activate itself if keys in broadcasted message don't match. It will have no idea which vin is its own (if MN is new or it was really dropped out of the list on whole network).

Please rephrase your question and/or give more info.

@schinzelh
Copy link

@UdjinM6 fully agree, the question/assumption is not correct.

@scratchy running a "masternode start" or "masternode start-many" command on the wallet does NOT mean that the deamon IS started - these commands only send out a "dsee" message to the network, which the daemon will pick up (if matching the privkey) and change to ENABLED state and start pinging ("dseep").

The message "masternode started sucessfully" on wallet console may be misleading here, we should think about to rephrase it.

@scratchy
Copy link
Author

okay i checked it again:

What is did:

  • Setup the 1000 dash stuff like it should..

Daemon side:

  • Started a daemon with a valid masternode key

Wallet side:

  • Created dash.conf with a valid masternodekey (another one) and the daemons ip
  • Run start-many on the wallet

Network-Side:

  • on a 3rd node i was running "masternode list full"

Now the the node appears instantly with "ENABLED", even if the both use two different privkeys. Also i guess in this case the node is payed only for appearing in the list #442. (I didnt verified it, only refering to 3rd party information)

Yes i know its not the normal case how its used and surely the node will disappear after a given timeout (currently 1 hour ?). But shouldnt be there an additional stage like PRE_ENABLED or something?

@UdjinM6
Copy link

UdjinM6 commented Jul 19, 2015

Ah, I see now. Well, that's exactly how it works. However to get payed MN have to be activated and periodically send pings. It will have to wait next 4+ days to get payed but will be delisted after 1 hour if it wasn't activated. So, yeah, that smth like PRE_ENABLED. I agree, that can be confusing. I'll have a look what we can do to (at least visually) fix it.

@scratchy
Copy link
Author

If i get the code right, it should be easy to implement.

https://github.com/dashpay/dash/blob/v0.12.0.x/src/rpcmasternode.cpp#L577

As long as this is 0 the node was never online and ENABLED should be PRE_ENABLED ?

@UdjinM6
Copy link

UdjinM6 commented Aug 10, 2015

postponed till v12.1, see #484

@schinzelh
Copy link

As this is addressed in #561 i consider this fixed and will close it

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

No branches or pull requests

3 participants