aliascash / alias-wallet-archive

The content of this repository was reunited with the history of it's ancestors. It's archived now to keep all former release artifacts. The new repository is available at https://github.com/aliascash/alias-wallet
https://alias.cash/
59 stars 22 forks source link

Consider minimum coin age of 8 hours for staked coins in UI. #79

Closed teknex closed 5 years ago

teknex commented 6 years ago

There is an inconsistency between the algo selecting and verifying the coins for staking, and the code showing the staked balance. The code showing the balances in the UI, does not consider mature time of 8 hours.

teknex commented 6 years ago

Staked coins (coinstake) maturing situation:

for a staked coin to be able to stake again, the coinstake TRX must be

  1. 288 blocks deep in chain
  2. 8 hours old

but the 8 hours rule does NOT apply for spending and is NOT considered in the UI (PUBLIC/STAKED) but in the staking weight

According the PoSv3 algo reference we have, the TRX time maturing check was removed in PoSv3. Superflous code in the Spectrecoin codebase indicates that considering of the TRX time for staking is probably an obmission when PoSv3 was implemented.

LeoBitman commented 6 years ago

Good observation, it is verified exactly in the operation of the wallet, and solve a frequent question: Why is my weight in the network less than my amount of public coins? Now well answered with this that you observed: 288 blocks AND 8 hours. (the 288 blocks only need ~ 5 hours)