cazala/coin-hive-stratum

hash_accepted, but why?

winterhood opened this issue · 1 comments

This has confused me for a while, would be grateful if someone here can shed some light:

I am testing the miner on a slow machine with heavy throttle, the average hash rate is around 4H/S. My proxy connects to a pool that has a difficulty of 2000. So it takes about 8 mins to complete a job.

From my understanding, the Monero blockchain creates a new block every 2 mins, every job is a challenge unique to the block, the result acts as a lottery ticket to claim the block. So at the time my miner completes the job, the block has been created/claimed long time ago, the result I submit to the pool should be invalid.

However, on the contrary, my submission consistently got accepted by the pool.

Here is the screenshot.
screenshot

My miner received 3 jobs, it took ~8 mins to complete 2000 hashes, it submitted the job use the last job_id, and got accepted.

What was going on? or it is just me misunderstand the problem?

Total hashes are different then the Total accepted hashes.
Try this
setInterval(function(){console.log("Mining @" + miner.getHashesPerSecond().toFixed(2) + "/s || Total :" + miner.getTotalHashes() + " || Accepted :" +miner.getAcceptedHashes() )},1000);

Mining @11.54/s || Total :71 || Accepted :0
Mining @12.63/s || Total :87 || Accepted :0
Mining @13.60/s || Total :103 || Accepted :0
Mining @13.81/s || Total :115 || Accepted :0
Mining @13.87/s || Total :131 || Accepted :0
Mining @13.77/s || Total :147 || Accepted :0
Mining @13.50/s || Total :155 || Accepted :0
Mining @13.66/s || Total :171 || Accepted :0
Mining @13.94/s || Total :183 || Accepted :0