gridcoin-community / Gridcoin-Research

Gridcoin-Research
MIT License
588 stars 173 forks source link

Staking with 0 mag is not possible #313

Closed denravonska closed 7 years ago

denravonska commented 7 years ago

Since the testnet whitelist got outdated I noticed that I had 0 mag my wallet was no longer staking even though I have 999 coins. As a test I removed the keys from the config to enter investor mode and immediately staked a block. This is compared to running it for days as a 0-mag researcher without staking anything.

tomasbrod commented 7 years ago

https://github.com/gridcoin/Gridcoin-Research/blob/master/src/kernel.cpp#L676

By removing the beacon keys you became INVESTOR and thus the check does not apply.

denravonska commented 7 years ago

You mentioned this before, right @tomasbrod?

denravonska commented 7 years ago

I just tried to alter that check so it wouldn't run if the mag was <=1. Failed obviously which means that we would need a mandatory to fix it, right?

tomasbrod commented 7 years ago

Yes here: eb5cef8251e23c5d4db00c110236cf9fd10da66a. Edit: nope, never mentioned this exact one. If you disable that check, your blocks will pass but locally but get rejected by other nodes. Then someone stakes another block and your wallet will reorganize. New mandatory release will be needed (mandatory). But we must make sure all the consensus issues are fixed before releasing a hard-forking update.

denravonska commented 7 years ago

@tomasbrod I'm 100% sure you mentioned it to me at some point or I would never have thought to look for it :D

Anyway, I guess we will do this if we have another mandatory scheduled since it's not that important.

tomasbrod commented 7 years ago

Fixed in #364.

Quezacoatl1 commented 7 years ago

Can we close the issue then @denravonska ? :)

denravonska commented 7 years ago

@Quezacoatl1 Yup, when v8 is released :)

denravonska commented 7 years ago

Fixed with #364.