gridcoin-community / Gridcoin-Research

Gridcoin-Research
MIT License
585 stars 172 forks source link

User stuck signing same block (block age greater than 6 months) #357

Closed grctest closed 7 years ago

grctest commented 7 years ago
06/06/17 22:15:33  GNP: Setting bpk to 9d77a407a1e418686bde8cd899875a1a
06/06/17 22:15:33 Last staked block found at height 469561.000000, but cannot verify magnitude older than 6 months! 
06/06/17 22:15:33 Signing Block for cpid 816d4736b6196a357863cc458d98f7ee and blockhash 2756a86e025f690c4b27f52394cb6a3ecfb687d2c6d9d99333acd186d3d221f2 with sig MEQCIAah7SvJeEEns8SC3gca1Oc0pOnCALNvd5z+ndOja07HAiAlVzOs+NtrjyfUdW4kIypRBKZzjItxHf6ct5xHjvDdVQ==
06/06/17 22:15:33 GNP: Setting bpk to 9d77a407a1e418686bde8cd899875a1a
06/06/17 22:15:33 Last staked block found at height 469561.000000, but cannot verify magnitude older than 6 months! 

The above message was repeating in the user's debug log.

The message states that the last stake block found is greater than 6 months ago (not allowed), the client signs a block for the same cpid/blockhash/sig then GNP sets a new bpk value. This appears to be the loop.

The user states that the stake value is always at 0.

https://cryptocurrencytalk.com/topic/1331-new-coin-launch-announcement-grc-gridcoin/?do=findComment&comment=391274

iFoggz commented 7 years ago

This is weird I see the function in main.cpp CBlockIndex* GetHistoricalMagnitude(std::string cpid)

The look back limit is set to 6 months 630BLOCKS_PER_DAY

For some reason its going into the if statement on it that i think was there to intend to prevent an issue for a last stake block being used if found and over 6 months old. hrm i do see a change made by @denravonska recently from if ((double)pblockindex->nHeight < nMinIndex) to if (pblockindex->nHeight < nMinIndex)

The GNP part is normal. i think the above is the problem and ravon will look at it later :)

denravonska commented 7 years ago

Is it still signing the same block? As in right now? I'm not sore sure it's a bug. It should be signing the same block until someone stakes it, no? If you check that block on gridcoinstats it has now been created. Check if the wallet is trying to stake a different block now, if so this is just standard behavior.

The 6 month warning should be because the user hasn't received any rewards within the 6 month limit.

grctest commented 7 years ago

I've messaged the user on cryptocointalk for an update.

Mokona2 commented 7 years ago

Actually my wallet PoR but not PoS. https://gridcoinstats.eu/cpid/816d4736b6196a357863cc458d98f7ee

13:39:57  getstakinginfo

13:39:57  { "enabled" : true, "staking" : true, "errors" : "", "currentblocksize" : 1000, "currentblocktx" : 0, "pooledtx" : 0, "difficulty" : 10.51408001, "search-interval" : 16, "weight" : 65039182516193, "netstakeweight" : 67748567, "expectedtime" : 0 }

tomasbrod commented 7 years ago

The miner has been greatly reworked. It no longer signs blocks that are not staked. I suggest closing this issue as it is now irrelevant.