moopless / stratum-mining-litecoin

This fork is no longer maintained. Please use https://github.com/ahmedbodi/stratum-mining
Other
38 stars 35 forks source link

low diffs being given to fast workers #55

Open hashfaster opened 11 years ago

hashfaster commented 11 years ago

I have workers with 2.5mhash being given 32 diff.

What would happen if someone pointed MANY little hashers at one worker? Can vardiff accommodate such?

hashfaster commented 11 years ago

Perhaps some mechanism that retargets new connections immediately (or after maybe 5-10 shares) instead of waiting VDIFF_RETARGET_TIME (120). This way if a FAST hasher joins they will get retargeted quicker and avoiding flooring the database with POOL_TARGET diff shares.

TheSerapher commented 10 years ago

Maybe DIFF is done on a per-connection basis and not per-worker. That might result in low diff shares being sent out and potentially accepted as higher diff shares?

TheSerapher commented 10 years ago

I think we have another issue here too. Once stratum retargets, it will accept low diff shares (16 in this case) but insert them with the re-targeted value of 480. Resulting in a LOT of 480 diff shares which are not possible in a matter of 5 seconds. At least it's what I'd think not possible at the hashrates we are looking at. After those burst shares, a long time no shares were inserted. Then suddenly another Diff 16, followed by various Diff 48.

Since I don't know how vardiff works, I would assume that a share carries it's diff with it when using gettemplate, same for submitting shares back into stratum? That might explain the 480 share, followed by 16 (Unlucky!) and another 48 (late retarget?). EDIT: Even weirder, at this strange 16 to 48 switch the worker was restarted. But checking the worker itself, it showed diff 16 shares while they were seemingly reported diff 48 in the DB.

I know @moopless has been AWOL for a while, but I am hoping he will come back. His work has been great so far, and if we'd focus on more core functionality and worry about alt-coins later, I am sure this would be the go-to stratum!

So. @moopless, please come back :D