Earnings problem under investigation

Steve Sokolowski avatar
Steve Sokolowski
Archived posts: 4559
Joined: Aug 27, 2014

Earnings problem under investigation

by Steve Sokolowski · · Post #24651

Some customers have reported an earnings problem, which Chris was able to confirm yesterday. For some miners, mostly SHA-256 miners, earnings are recorded as about 0.7x the expected value in the database. Despite spending 10 hours investigating the problem, Chris has only been able to find that the values are lower for SHA-256 miners, but he has not been able to determine the cause of the problem.

We will continue investigating this issue today, but unfortunately there is no ETA on when we might determine the cause. If it turns out that the problem resulted in money being earned but not paid, then SHA-256 miners who were mining between August 1 and whenever the cause of the problem is able to be determined will be credited missing earnings plus 15%, as our policy in the documentation indicates.
Steve Sokolowski avatar
Steve Sokolowski
Archived posts: 4559
Joined: Aug 27, 2014

Re: Earnings problem under investigation

by Steve Sokolowski · · Post #24652

This issue has been resolved.

It turns out that when you declare a variable inside the scope of a "for" loop in Python, the variable still holds its value even after the loop is finished. In any other language, attempting to access the variable after the loop was finished would result in a "variable not declared" error.

In this case, the same variable name was used in two different places, but it was assumed that the value would become unassigned outside the scope of the loop. That wasn't the case, allowing the "network_difficulty" variable to persist. A failsafe later in the code, which checks to see whether the user's target difficulty is greater than the network difficulty and adjusts it to be equal if it is (in order to prevent people from mining very easy coins and being overcredited) was being applied to the last random share being processed in the earlier "for" loop. About 30% of SHA-256 miners mine very easy coins in static or solo or PPLNS modes, so when one of those shares happened to be the last, by random chance all miners would periodically be adjusted downward for their shares.

The fix has already been deployed and current earnings are now correct. The share corrections will likely be the most complex that Chris has ever accomplished, but he hopes to have them finished within 48 hours. As usual, miners will receive the money they should have earned plus 15%, as the documentation states.

The issue primarily affected SHA-256 miners, with lesser impacts for a few miners on some other algorithms. Scrypt was not affected at all and will not see any corrections; however, scrypt miners have seen the largest declines due to the effects of the litecoin block halving.
ryguy
Archived posts: 76
Joined: Apr 01, 2018

Re: Earnings problem under investigation

by ryguy · · Post #24665

Steve Sokolowski wrote: This issue has been resolved.

It turns out that when you declare a variable inside the scope of a "for" loop in Python, the variable still holds its value even after the loop is finished. In any other language, attempting to access the variable after the loop was finished would result in a "variable not declared" error.
This is also true in a few other languages, Javascript being one I can think of off the top of my head.