gridcoin-community / Gridcoin-Research

Gridcoin-Research
MIT License
585 stars 172 forks source link

New CPID able to vote in poll but CPID weight not counted. #1188

Closed NeuralMiner closed 6 years ago

NeuralMiner commented 6 years ago

I recently received a new CPID (planned). The beacon was advertised 1 week, 4 days, 5 hours, 22 minutes, 30 seconds ago. When voting in the latest poll, I was able to vote (instead of the expected CPID age does not exceed age of poll error), but only my balance counted towards my vote; CPID weight was zero.

Beacon tx: 541685c7503b445e4ccec64a7834c1006cf0bbc8b5835b5f8b88c0e35f5e97f3 Vote tx: e899cacde9d054e72121a38b9f862b0804e2c7c4cfec247022b75fae30a256f8

<MAGNITUDE>0</MAGNITUDE> <INNERMAGNITUDE>1480.00</INNERMAGNITUDE>

iFoggz commented 6 years ago

what did debug.log say around that time.

NeuralMiner commented 6 years ago

06/23/18 19:32:16 Loaded staketime from index in 393.000000CPIDTime 1528844736.000000, GRCTime 1457197997.000000, WalletTime 1457197997.000000

06/23/18 19:32:16 CPIDAge 937600.000000,StakeAge 72584339.000000,Poll Duration 3628800.000000

06/23/18 19:32:16 Response [{"Command":"vote"},{"Success":"Your CPID weight is 0 and your Balance weight is 63122. Your vote has been cast for topic funding_a_proposed_gridcoin_core_client_ui_redesign: With an Answer of Yes: e899cacde9d054e72121a38b9f862b0804e2c7c4cfec247022b75fae30a256f8"}]

iFoggz commented 6 years ago

if (cpid_age < poll_duration) dmag = 0;

the CPID's age is less then the poll duration so magnitude does not take part in the vote (a rule in the code)

EDIT: personally its a rule that should be changed to something maybe in the lines of if the CPIDAge is less then the start of the poll time then mag is 0. or just allow all to vote regardless. Duration kinda puts a kink in that.

also there is a stage age < poll duration as well. I'm not too familiar on why those rules are there FYI

NeuralMiner commented 6 years ago

Shouldn't that have triggered the "CPID age does not exceed age of poll" message?

iFoggz commented 6 years ago

well it is a balance + magnitude poll so balance is still vote-able weight in theory. the wallet could have transactions well before the poll creation so that would qualify for voting

NeuralMiner commented 6 years ago

Ah ok, makes sense then; it was my same old wallet, so the balance was definitely old enough. Thanks. Closing issue.