feature: add partial support for braiins mini miners

This commit is contained in:
Upstream Data
2024-12-23 09:25:19 -07:00
parent d018724aa4
commit 1a4491ca56
13 changed files with 257 additions and 144 deletions

View File

@@ -28,6 +28,7 @@ class MinerMake(str, Enum):
BITAXE = "BitAxe"
ICERIVER = "IceRiver"
HAMMER = "Hammer"
BRAIINS = "Braiins"
def __str__(self):
return self.value

View File

@@ -379,6 +379,11 @@ class HammerModels(MinerModelType):
return self.value
class BraiinsModels(MinerModelType):
BMM100 = "BMM100"
BMM101 = "BMM101"
class MinerModel:
ANTMINER = AntminerModels
WHATSMINER = WhatsminerModels
@@ -390,3 +395,4 @@ class MinerModel:
BITAXE = BitAxeModels
ICERIVER = IceRiverModels
HAMMER = HammerModels
BRAIINS = BraiinsModels

View File

@@ -0,0 +1,17 @@
# ------------------------------------------------------------------------------
# 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 .braiins import *

View File

@@ -0,0 +1,26 @@
# ------------------------------------------------------------------------------
# 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 BOSer
from pyasic.miners.device.models import BMM100, BMM101
class BraiinsBMM100(BOSer, BMM100):
pass
class BraiinsBMM101(BOSer, BMM101):
pass

View File

@@ -0,0 +1,17 @@
# ------------------------------------------------------------------------------
# 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 .BMM import BraiinsBMM100, BraiinsBMM101

View File

@@ -0,0 +1,17 @@
# ------------------------------------------------------------------------------
# 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 .BMM import *

View File

@@ -56,3 +56,7 @@ class IceRiverMake(BaseMiner):
class HammerMake(BaseMiner):
make = MinerMake.HAMMER
class BraiinsMake(BaseMiner):
make = MinerMake.BRAIINS

View File

@@ -17,6 +17,7 @@
from .antminer import *
from .auradine import *
from .avalonminer import *
from .braiins import *
from .epic import *
from .goldshell import *
from .hammer import *

View File

@@ -0,0 +1,19 @@
from pyasic.device.algorithm import MinerAlgo
from pyasic.device.models import MinerModel
from pyasic.miners.device.makes import BraiinsMake
class BMM100(BraiinsMake):
raw_model = MinerModel.BRAIINS.BMM100
expected_hashboards = 1
expected_fans = 1
algo = MinerAlgo.SHA256
class BMM101(BraiinsMake):
raw_model = MinerModel.BRAIINS.BMM101
expected_hashboards = 1
expected_fans = 1
algo = MinerAlgo.SHA256

View File

@@ -0,0 +1 @@
from .BMM1 import *

View File

@@ -0,0 +1 @@
from .BMM import *

View File

@@ -35,6 +35,7 @@ from pyasic.miners.backends import *
from pyasic.miners.base import AnyMiner
from pyasic.miners.bitaxe import *
from pyasic.miners.blockminer import *
from pyasic.miners.braiins import *
from pyasic.miners.device.makes import *
from pyasic.miners.goldshell import *
from pyasic.miners.hammer import *
@@ -390,6 +391,8 @@ MINER_CLASSES = {
"ANTMINER T19": BOSMinerT19,
"ANTMINER S21": BOSMinerS21,
"ANTMINER T21": BOSMinerT21,
"BRAIINS MINI MINER BMM 100": BraiinsBMM100,
"BRAIINS MINI MINER BMM 101": BraiinsBMM101,
},
MinerTypes.VNISH: {
None: VNish,