cazala / coin-hive-stratum

use CoinHive's JavaScript miner on any stratum pool
http://npmjs.com/package/coin-hive-stratum
416 stars 465 forks source link

How to gamify- reward miners #144

Open Baaleos opened 6 years ago

Baaleos commented 6 years ago

I get that most people prob want to do their mining incognito, eg: not let the people browsing the site know they are mining. But what about the more legit scenarios. With coinhives own implementation, their API allows for retrieval of hash contributions by user/token. Is it possible to capture this info from the coin-hive-stratum? Not all stratum servers offer the same api features- it might make sense to try and log this info from the Coin-hive-stratum side so the one solution suits everyone.

I’m thinking that optional config could be added to add metrics / accepted hash counts to a database etc or give us the ability to call an external endpoint of our own that will capture and record the metrics.

I would like to be able to give people in-game currency based on their mining contribution. Possible to do via Coinhive but not currently doable via Coinhive-Stratum.

adamdupuis commented 6 years ago

One of the issues with coin-hive-stratum right now is that it isn't stable for extended periods of time. I have mine set to restart every four hours because it seemed that after 5-6 hours of having no more than 50 concurrent users that it would fail to submit hashes to the pool. Restarting the proxy loses all count of hashes per guest as far as I can tell.

hitmanex commented 6 years ago

@adamdupuis i have 600-2000 miners all the time and it loses stability after 3-5 days. Fails to clear old connections and starts to memory leak. its pretty stable