Open darricksee opened 3 months ago
thanks for reporting this @darricksee
ideally we should be able to reproduce this issue deterministically
I created a little test with a simulator which produces low difficulty shares pointing at the tproxy
would you be willing to share this?
@plebhash didn't you just added a MG test fixing this issue recently?
@plebhash didn't you just added a MG test fixing this issue recently?
https://github.com/stratum-mining/stratum/issues/791 that was for old shares, not low difficulty
I do suspect the fix will be relatively similar though
@darricksee always related to this point, I was wondering what's the best approach with regards to stale
shares.
Right now Translator refuses shares related to an old job_id
(even if it's still valid, meaning based on the correct prev_hash
). In https://github.com/stratum-mining/stratum/issues/791 we established that Translator answers with result:false
in that case.
But is this approach correct? Shouldn't we refuse shares only when they are based on an old prev_hash
? I'm just thinking about the edge case in which Translator could refuse a valid block just because that share is related to an old job.
How pools typically manage it?
@GitGab19 - yeah that's correct. Miners are strongly encouraged to work on the latest jobs as these have the most favorable transactions. Ideally jobs have a long timeout so it shouldn't ever happen.
I created a little test with a simulator which produces low difficulty shares pointing at the tproxy -> pool -> TP. The tproxy handles the shares properly but responds with:
2024-06-26T17:22:16.565280Z DEBUG translator_sv2::lib::downstream_sv1::downstream: Sending to Mining Device: 3.141.43.42:47752 - "{\"id\":4,\"error\":null,\"result\":true}\n"
erroneously. It should respond with a "low difficulty" error.Full logs: