zone117x / node-cryptonote-pool

Mining pool for CryptoNote based coins such as Bytecoin and Monero
GNU General Public License v2.0
828 stars 1.14k forks source link

Slush's scoring code might not be working #124

Open Gingeropolous opened 8 years ago

Gingeropolous commented 8 years ago

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?

zone117x commented 8 years ago

Unfortunately this code came from a pull request and I'm not sure about it. Feel free to revise.

loopyman commented 8 years ago

Were you able to find a solution? @Gingeropolous ?

sammy007 commented 7 years ago

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.