Compare commits

...

2 Commits

Author SHA1 Message Date
Brett Rowan
7ca7fe3e7e version: bump version number 2025-01-01 22:40:20 -07:00
JP Compagnone
748279c25d fix: change sticker hashrate to GH for Hammer and VolcMiner (#264)
* change sticker hashrate to GH

* clean up hashrate for Hammer/Volcminer

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-01 22:38:57 -07:00
4 changed files with 11 additions and 7 deletions

View File

@@ -173,8 +173,8 @@ class BlackMiner(StockFirmware):
if rpc_summary is not None:
try:
return self.algo.hashrate(
rate=float(rpc_summary["SUMMARY"][0]["GHS 5s"]),
unit=self.algo.unit.GH,
rate=float(rpc_summary["SUMMARY"][0]["MHS 5s"]),
unit=self.algo.unit.MH,
).into(self.algo.unit.default)
except (LookupError, ValueError, TypeError):
pass
@@ -229,7 +229,7 @@ class BlackMiner(StockFirmware):
hashrate = boards[1].get(f"chain_rate{i}")
if hashrate:
hashboard.hashrate = self.algo.hashrate(
rate=float(hashrate), unit=self.algo.unit.GH
rate=float(hashrate), unit=self.algo.unit.MH
).into(self.algo.unit.default)
chips = boards[1].get(f"chain_acn{i}")
@@ -358,7 +358,7 @@ class BlackMiner(StockFirmware):
try:
expected_rate = rpc_stats["STATS"][1].get("total_rateideal")
if expected_rate is None:
expected_rate = self.sticker_hashrate
return self.sticker_hashrate
try:
rate_unit = rpc_stats["STATS"][1]["rate_unit"]
except KeyError:

View File

@@ -1,6 +1,8 @@
from pyasic.device.algorithm.hashrate.unit.scrypt import ScryptUnit
from pyasic.device.algorithm.scrypt import ScryptHashRate
from pyasic.miners.backends import BlackMiner
from pyasic.miners.device.models import D10
class HammerD10(BlackMiner, D10):
sticker_hashrate = 5000
sticker_hashrate = ScryptHashRate(rate=5.0, unit=ScryptUnit.GH)

View File

@@ -1,6 +1,8 @@
from pyasic.device.algorithm.hashrate.unit.scrypt import ScryptUnit
from pyasic.device.algorithm.scrypt import ScryptHashRate
from pyasic.miners.backends import BlackMiner
from pyasic.miners.device.models import D1
class VolcMinerD1(BlackMiner, D1):
sticker_hashrate = 15150
sticker_hashrate = ScryptHashRate(rate=15.15, unit=ScryptUnit.GH)

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyasic"
version = "0.68.0"
version = "0.68.1"
description = "A simplified and standardized interface for Bitcoin ASICs."
authors = ["UpstreamData <brett@upstreamdata.ca>"]
repository = "https://github.com/UpstreamData/pyasic"