Crypto-Expert / stratum-mining

AIO Stratum mining server for various coins
Other
365 stars 348 forks source link

VDIFF going absolutely crazy #78

Closed ocminer closed 10 years ago

ocminer commented 10 years ago

I've noticed lots of problems in the logs with newest version concerning VDIFF:

2013-12-30 18:41:02,565 DEBUG BasicShareLimiter # Checking Retarget for DoRob.hetzner (20) avg. 23 target 30+-9

2013-12-30 18:41:02,579 DEBUG mining # phithor.4 (1, 0, False, False, 1388425195) 0.00% work_id(6d80) job_id(3) diff(20.000000) 2013-12-30 18:41:02,579 DEBUG BasicShareLimiter # Checking Retarget for phithor.4 (20) avg. 56 target 30+-9 2013-12-30 18:41:02,580 DEBUG BasicShareLimiter # Retarget for phithor.4 0 old: 20 new: 0

and lastly then:

2013-12-30 18:41:08,575 ERROR protocol # [Failure instance: Traceback: <type 'exceptions.ZeroDivisionError'>: long division or modulo by zero /usr/local/lib/python2.7/dist-packages/stratum-0.2.13-py2.7.egg/stratum/protocol.py:192:dataReceived /usr/local/lib/python2.7/dist-packages/stratum-0.2.13-py2.7.egg/stratum/protocol.py:238:lineReceived /usr/local/lib/python2.7/dist-packages/stratum-0.2.13-py2.7.egg/stratum/services.py:13:_handle_event /usr/local/lib/python2.7/dist-packages/stratum-0.2.13-py2.7.egg/stratum/services.py:81:call --- --- /usr/lib/python2.7/dist-packages/twisted/internet/defer.py:137:maybeDeferred /usr/local/lib/python2.7/dist-packages/stratum-0.2.13-py2.7.egg/stratum/services.py:78:_run /home/marcel/stratum-mining/mining/service.py:168:submit /home/marcel/stratum-mining/lib/template_registry.py:253:submit_share /home/marcel/stratum-mining/lib/template_registry.py:156:diff_to_target ] None

it brakes mostly everything, rendering the server completely useless.

i'm back to the old version

obigal commented 10 years ago

Most likely a setup issue. please give some details.

ocminer commented 10 years ago

Which settings do you need ?

Here are the VDIFF related ones:

**** Pool Difficulty Settings *****

VDIFF_X2_TYPE = True # powers of 2 e.g. 2,4,8,16,32,64,128,256,512,1024 VDIFF_FLOAT = False # Use float difficulty

Pool Target (Base Difficulty)

POOL_TARGET = 20 # Pool-wide difficulty target int >= 1

Variable Difficulty Enable

VARIABLE_DIFF = True # Master variable difficulty enable

Variable diff tuning variables

VARDIFF will start at the POOL_TARGET. It can go as low as the VDIFF_MIN and as high as min(VDIFF_MAX or Liteconin's difficulty)

USE_LITECOIN_DIFF = False # Set the maximum difficulty to the litecoin difficulty. DIFF_UPDATE_FREQUENCY = 86400 # Update the litecoin difficulty once a day for the VARDIFF maximum VDIFF_MIN_TARGET = 16 # Minimum Target difficulty VDIFF_MAX_TARGET = 2048 # Maximum Target difficulty VDIFF_TARGET_TIME = 10 # Target time per share (i.e. try to get 1 share per this many seconds) VDIFF_RETARGET_TIME = 60 # Check to see if we should retarget this often VDIFF_VARIANCE_PERCENT = 30 # Allow average time to very this % from target without retarget

Allow external setting of worker difficulty, checks pool_worker table datarow[6] position for target difficulty

if present or else defaults to pool target, over rides all other difficulty settings, no checks are made

for min or max limits this sould be done by your front end software

ALLOW_EXTERNAL_DIFFICULTY = False

obigal commented 10 years ago

When using X2 type, it's rather generic and your min and max MUST be a multiple or division of 2 of the pool target.

POOL_TARGET = 20
VDIFF_MIN_TARGET = 16 this is wrong try 20 VDIFF_MAX_TARGET = 2048 wrong try 1280 or 2560

ahmedbodi commented 10 years ago

closing, fix vardiff settings