Compare commits

...

7 Commits

Author SHA1 Message Date
Upstream Data
cc97ceee61 version: bump version number 2024-11-18 09:01:59 -07:00
Upstream Data
3fa1cb18d9 feature: add support for antminer D7 2024-11-18 08:22:30 -07:00
Upstream Data
cb3c50d007 version: bump version number 2024-11-14 11:16:25 -07:00
Upstream Data
2523ef8484 bug: fix some issues with hammer miners 2024-11-14 11:16:09 -07:00
Upstream Data
01342738b0 version: bump version number 2024-11-14 10:26:50 -07:00
Upstream Data
a9dee4a911 feature: add support for bitaxe gamma 2024-11-14 10:26:00 -07:00
Upstream Data
883ffe20b4 bug: fix bmminer subclass pools data location 2024-11-14 10:25:38 -07:00
15 changed files with 82 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ class AntminerModels(str, Enum):
KS5 = "KS5"
L7 = "L7"
K7 = "K7"
D7 = "D7"
E9Pro = "E9Pro"
S9 = "S9"
S9i = "S9i"
@@ -344,6 +345,7 @@ class BitAxeModels(str, Enum):
BM1366 = "Ultra"
BM1368 = "Supra"
BM1397 = "Max"
BM1370 = "Gamma"
def __str__(self):
return self.value

View File

@@ -0,0 +1,21 @@
# ------------------------------------------------------------------------------
# Copyright 2022 Upstream Data Inc -
# -
# Licensed under the Apache License, Version 2.0 (the "License"); -
# you may not use this file except in compliance with the License. -
# You may obtain a copy of the License at -
# -
# http://www.apache.org/licenses/LICENSE-2.0 -
# -
# Unless required by applicable law or agreed to in writing, software -
# distributed under the License is distributed on an "AS IS" BASIS, -
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -
# See the License for the specific language governing permissions and -
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.backends import AntminerModern
from pyasic.miners.device.models import D7
class BMMinerD7(AntminerModern, D7):
pass

View File

@@ -13,5 +13,6 @@
# See the License for the specific language governing permissions and -
# limitations under the License. -
# ------------------------------------------------------------------------------
from .D7 import BMMinerD7
from .K7 import BMMinerK7
from .L7 import BMMinerL7

View File

@@ -62,6 +62,10 @@ HIVEON_T9_DATA_LOC = DataLocations(
"_get_uptime",
[RPCAPICommand("rpc_stats", "stats")],
),
str(DataOptions.POOLS): DataFunction(
"_get_pools",
[RPCAPICommand("rpc_pools", "pools")],
),
}
)

View File

@@ -231,7 +231,7 @@ class BlackMiner(StockFirmware):
hashrate = boards[1].get(f"chain_rate{i}")
if hashrate:
hashboard.hashrate = AlgoHashRate.SHA256(
hashrate, HashUnit.SHA256.GH
float(hashrate), HashUnit.SHA256.GH
).into(self.algo.unit.default)
chips = boards[1].get(f"chain_acn{i}")

View File

@@ -80,6 +80,10 @@ VNISH_DATA_LOC = DataLocations(
"_is_mining",
[WebAPICommand("web_summary", "summary")],
),
str(DataOptions.POOLS): DataFunction(
"_get_pools",
[RPCAPICommand("rpc_pools", "pools")],
),
}
)

View File

@@ -0,0 +1,6 @@
from pyasic.miners.backends.bitaxe import BitAxe
from pyasic.miners.device.models.bitaxe import Gamma
class BitAxeGamma(BitAxe, Gamma):
pass

View File

@@ -1,3 +1,4 @@
from .BM1366 import BitAxeUltra
from .BM1368 import BitAxeSupra
from .BM1370 import BitAxeGamma
from .BM1397 import BitAxeMax

View File

@@ -0,0 +1,24 @@
# ------------------------------------------------------------------------------
# Copyright 2022 Upstream Data Inc -
# -
# Licensed under the Apache License, Version 2.0 (the "License"); -
# you may not use this file except in compliance with the License. -
# You may obtain a copy of the License at -
# -
# http://www.apache.org/licenses/LICENSE-2.0 -
# -
# Unless required by applicable law or agreed to in writing, software -
# distributed under the License is distributed on an "AS IS" BASIS, -
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -
# See the License for the specific language governing permissions and -
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.device.models import MinerModel
from pyasic.miners.device.makes import AntMinerMake
class D7(AntMinerMake):
raw_model = MinerModel.ANTMINER.D7
expected_fans = 4
expected_chips = 70

View File

@@ -13,5 +13,6 @@
# See the License for the specific language governing permissions and -
# limitations under the License. -
# ------------------------------------------------------------------------------
from .D7 import D7
from .K7 import K7
from .L7 import L7

View File

@@ -0,0 +1,10 @@
from pyasic.device.models import MinerModel
from pyasic.miners.device.makes import BitAxeMake
class Gamma(BitAxeMake):
raw_model = MinerModel.BITAXE.BM1370
expected_hashboards = 1
expected_chips = 1
expected_fans = 1

View File

@@ -1,3 +1,4 @@
from .BM1366 import Ultra
from .BM1368 import Supra
from .BM1370 import Gamma
from .BM1397 import Max

View File

@@ -19,3 +19,5 @@ from pyasic.miners.device.makes import HammerMake
class D10(HammerMake):
raw_model = MinerModel.HAMMER.D10
expected_chips = 108

View File

@@ -73,6 +73,7 @@ MINER_CLASSES = {
"ANTMINER KS5": BMMinerKS5,
"ANTMINER L7": BMMinerL7,
"ANTMINER K7": BMMinerK7,
"ANTMINER D7": BMMinerD7,
"ANTMINER E9 PRO": BMMinerE9Pro,
"ANTMINER D9": BMMinerD9,
"ANTMINER S9": BMMinerS9,
@@ -465,6 +466,7 @@ MINER_CLASSES = {
"BM1368": BitAxeSupra,
"BM1366": BitAxeUltra,
"BM1397": BitAxeMax,
"BM1370": BitAxeGamma,
},
MinerTypes.ICERIVER: {
None: type("IceRiverUnknown", (IceRiver, IceRiverMake), {}),
@@ -560,6 +562,7 @@ class MinerFactory:
MinerTypes.MARATHON: self.get_miner_model_marathon,
MinerTypes.BITAXE: self.get_miner_model_bitaxe,
MinerTypes.ICERIVER: self.get_miner_model_iceriver,
MinerTypes.HAMMER: self.get_miner_model_hammer,
}
fn = miner_model_fns.get(miner_type)

View File

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