teamswipp / swippcore

The Swipp core includes the QT wallet and the console daemon for the currency.
Other
9 stars 7 forks source link

Masternode being disabled. Possibly due to staking #2

Open fusionfoto opened 6 years ago

fusionfoto commented 6 years ago

So I was directed here from the bitcointalk user teamswipp.

I had a masternode running with 30K of collateral for a few days. Received a few days of payments. Suddenly the MN stopped complaining about collateral. Same thing happened to my PhantomX MNs at the same time. I think you guys are using very similar code.

The hash exists correctly in the block chain explorer. However, the wallet shows no masternode outputs.

When I look at coin control, instead of a 30K block, I see a representation that the 30K block has been broken into two 15K blocks (roughly, not exactly).

It was suggested that this could be a staking problem. (It indeed looks like the last block to that masternode was a staking block; The transaction hash is this: 08eb2bdb58451cf55c87a3d650ef5f8eb79bc30bfce660c8197d0588b779f733-000 http://explorer.swippcoin.com/address/SStcn28GSU5BvhxnCX45fTTWzndG9VNBEf)

I was told to try reservebalance=99999. But the wallet software ignores this option in the conf file, as well as the staking=0 option. When I manually set reservebalance true 99999 in the console, that works...

but doesn't fix my problem. My wallet represents my transactions in my wallet differently than the explorer, and when I try to start my MN... it says it cannot find the collateral.

Please help me get the MN working or tell me how to get it working another way. Thanks.

teamswipp commented 6 years ago

Hello @fusionfoto! Yep. Swipp, PhantomX (and many other currencies) fork from the PeerCoin code. Foking from DASH is also fairly common, but then requires external nonsense such as Sentinel for proper masternode operation.

Looking at your mastenode collateral, it is 30009.00143370 Swipp at the time of writing. This is a problem and will not allow the masternode to fire up. It needs to be exactly 30 000 Swipp, no more no less. Most of the time, it's just easier to move 30 000 to a new address and use that for the masternode.

What you are seeing are indeed staking blocks.

Start you masternode node with reservebalance=99999 directly on the command line (setting it in the conf file should also work - if you are sure it doesn't we seem to have found yet another bug). Something similar to the following should work;

./swippd -reservebalance=99999

teamswipp commented 6 years ago

Just adding a note here... We should probably reserve the masternode collateral by default so this does not happen. It should not require intervention / configuration of the wallet.

We are planning to implement masternodes with seperate collateral and payout addresses. This would allow us to lock/reserve the collateral and allow easy staking on the paid out amount. It would also be a lot more clear to the user.

fusionfoto commented 6 years ago

The issue is I lose my place in the blockchain. Since the chain is now over 120,000 ... I think I need 35,000 swipp AND I get lower rewards. :(

fusionfoto commented 6 years ago

I can tell you the QT wallet does not respect either reservebalance or staking=0 in the confg file in my experience

teamswipp commented 6 years ago

@fusionfoto Why would you need 35 000 ? The collateral is 30 000 - nothing else. Once you are part of the masternode network you have the same chance as everybody else to get a payout.

I did some tests on the testnet with this. With -reservebalance=99999 -staking=0, it works as expected and the node does not stake. There should not be any difference with the QT wallet - it uses the same source base. However, while there is a masternode UI, I would recommend running masternodes via the CLI interface and in a separate wallet from everything else.

fusionfoto commented 6 years ago

@teamswipp Are both commands needed? Shouldn't only one (either) be needed?

Thanks

fusionfoto commented 6 years ago

@teamswipp So I had been running the MN with -reservebalance=99999 on the MN (not my hot wallet) without the staking=0. It did the same thing. I'll recreate the collateral and MN and try again with both options. Hopefully that works and is stable.

Unless you're telling me I should also be running these commands on my hot wallet.... and give up staking there.

teamswipp commented 6 years ago

@fusionfoto Regardless of how you have it set up, you just need to disable staking on the wallet where the collateral is placed so it doesn't compound and throws off the master node.

teamswipp commented 6 years ago

Have been doing some test and I am unable to reproduce this. Controlling staking seems to work fine with both "staking" and "reservebalance".

fusionfoto commented 6 years ago

So I have a locked wallet, still happens.

reservebalance and staking at the command line do nothing.

I literally have to log in to the wallet, go to the debug console and type "reservebalance true 999999" to keep it from staking.

This is annoying at least, but needs a more reliable method to solve it if the coin is going to scale. You're putting a ton of development time in, grabbing wallet/mn locking from another branch (like pure) seems pretty straightforward.

thanks.

canonic-zz commented 6 years ago

This is likely a stupid response but I'll ask anyway; just seeing if I can help.

Have you encrypted your wallet? For all coins, if you've encrypted your wallet, staking will not be enabled until you specifically unlock your wallet with your passphrase. If your wallet is not encrypted, then staking can happen by default.

Have you encrypted your wallet with a passphrase?

I'm just asking as I've never encountered your problem before for any coin.

fusionfoto commented 6 years ago

Yes, all of my peercoin derived wallets are locked with a password and they will all stake (usually after a send transaction) even though they shouldn't. What I used to do was (after unlocking it for a payment, which should automatically re-lock)... I manually unlock and then relock the wallet.

Reservebalance works, but i have not found a reliable way to automatically invoke it at start up.

lw2019 commented 6 years ago

hi im i used reservebalance true 9999999 for masternode so it wouldnt stake, i now want to use this wallet for staking , so i set it reservebalance false and it resets it and starts staking but when i close wallet and open it again it stops staking i checked reservebalance on console and it goes back to true 9999999

how can i cancel this for good so not doing reservebalance false every time i start wallet up

teamswipp commented 6 years ago

@lw2019 Sounds to me like you have set reservebalance inside your swipp.conf. There's no other way it would "remember" the setting.