-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
accurate staking and masternode ROI #2929
Conversation
Github-Pull: PIVX-Project#2904 Rebased-From: 1021b81
Github-Pull: PIVX-Project#2905 Rebased-From: 5445957
Github-Pull: PIVX-Project#2906 Rebased-From: b0bf2c2
Github-Pull: PIVX-Project#2908 Rebased-From: 6c01283
Github-Pull: PIVX-Project#2908 Rebased-From: d7d30dc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, before doing a real review there is one thing that I don't understand in your logic:
arith_uint256 workDiff = csra.pb->nChainWork - csra.pb0->nChainWork;
...
int64_t networkHashPS = (int64_t)(workDiff.getdouble() / timeDiff);
Why are you assuming that nChainWork
is a good measure of the number of hashes in the chain?
It should be true in a PoW chain, but It's not clear to me why the same happens in a PoS chain.
Also please rebase the PR on master (so that the first 11 commits are removed)
With respect to the chainwork question, when PIVX implemented fixed slots, the amount of work done is discreet to each slot and directly proportional the the hash rate expressed as blocks per day since there is one slot per block. This is easily extracted by formula. I will redo the PR, I have to look at what I submitted to PIVX as I recently made a slight revision and don't remember if that was included in my PIVX submission. I will redo the PR shortly as you request. have to finish a current project and then update my local PIVX repo. |
updated to PR #2933, built against current master branch |
Superseded by #2933 |
accurate CLI function for staking and masternode ROI
getroi
{
"3 hour avg ROI": "23.9%",
"30 min stk ROI": "29.5%",
"network stake": "8,564,072",
"--------------": "--------------",
"masternode ROI": "16.0%",
"tot collateral": "19,150,000",
"enabled nodes": "1915",
"blocks per day": "1401.1"
}