Open Gingeropolous opened 8 years ago
Unfortunately this code came from a pull request and I'm not sure about it. Feel free to revise.
Were you able to find a solution? @Gingeropolous ?
Sure it does not, just by looking on code I see that score will overflow redis storage on very long round and even in nodejs (600K sec round) Math.pow(Math.E, 600000 / 120) = Infinity
.
Slush's scoring just does not fit into redis, I am sure he has a kind of normalization after some time, only possible with SQL or really weird manipulation with redis sets. PROP is what actually best you can do with this pool + redis, the rest of reward schemes is a big PITA.
If somebody has different view please share, at least it will eventually take it's place in my golang impl.
In pool.api, the code that is used for slush's scoring seems to not function.
job.score = job.difficulty * Math.pow(Math.E, ((scoreTime - dateNowSeconds) / config.poolServer.slushMining.weight)); //Score Calculation
This seems to return 0. If I watch my logs, a miner always gets a score of 0. Also, shouldn't the score of a share be evaluated when the new block is mined by the pool, so that the share is weighted based on the timespan between the old and new block?