The USE_COINDAEMON_DIFF setting fails to convert the "network difficulty" into "share difficulty". It should take into consideration the algorithm's diff1 value.
For example, if a network using the scrypt algorithm has a difficulty of 1.00, then the corresponding share difficulty that solves the block is 65536. (i.e. network_diff = share_diff / 65536)
However, basic_share_limiter.py uses the coin daemon's difficulty as-is without adjustment. That means if the network difficulty is 1.00, then diff_max becomes 1, which is very wrong.
I would submit a pull request for this but I'm uncertain how to programmatically convert network difficulty to share difficulty. I suspect it will involve the diff1 values from the template_registry class, but I'm unsure on how to integrate the values as hex.
The USE_COINDAEMON_DIFF setting fails to convert the "network difficulty" into "share difficulty". It should take into consideration the algorithm's
diff1
value.For example, if a network using the scrypt algorithm has a difficulty of 1.00, then the corresponding share difficulty that solves the block is 65536. (i.e. network_diff = share_diff / 65536)
However,
basic_share_limiter.py
uses the coin daemon's difficulty as-is without adjustment. That means if the network difficulty is 1.00, thendiff_max
becomes1
, which is very wrong.I would submit a pull request for this but I'm uncertain how to programmatically convert network difficulty to share difficulty. I suspect it will involve the
diff1
values from thetemplate_registry
class, but I'm unsure on how to integrate the values as hex.