@@ -935,6 +935,12 @@ details {
|
|||||||
<li><a href="../iceriver/KSX#ks5m-stock">KS5M (Stock)</a></li>
|
<li><a href="../iceriver/KSX#ks5m-stock">KS5M (Stock)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</details>
|
</details>
|
||||||
|
<details>
|
||||||
|
<summary>ALX Series:</summary>
|
||||||
|
<ul>
|
||||||
|
<li><a href="../iceriver/ALX#al3-stock">AL3 (Stock)</a></li>
|
||||||
|
</ul>
|
||||||
|
</details>
|
||||||
</ul>
|
</ul>
|
||||||
</details>
|
</details>
|
||||||
<details>
|
<details>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from .base import MinerAlgoType
|
from .base import MinerAlgoType
|
||||||
from .blake256 import Blake256Algo
|
from .blake256 import Blake256Algo
|
||||||
|
from .blockflow import BlockFlowAlgo
|
||||||
from .eaglesong import EaglesongAlgo
|
from .eaglesong import EaglesongAlgo
|
||||||
from .equihash import EquihashAlgo
|
from .equihash import EquihashAlgo
|
||||||
from .ethash import EtHashAlgo
|
from .ethash import EtHashAlgo
|
||||||
@@ -24,3 +25,4 @@ class MinerAlgo:
|
|||||||
EAGLESONG = EaglesongAlgo
|
EAGLESONG = EaglesongAlgo
|
||||||
ETHASH = EtHashAlgo
|
ETHASH = EtHashAlgo
|
||||||
EQUIHASH = EquihashAlgo
|
EQUIHASH = EquihashAlgo
|
||||||
|
BLOCKFLOW = BlockFlowAlgo
|
||||||
|
|||||||
12
pyasic/device/algorithm/blockflow.py
Normal file
12
pyasic/device/algorithm/blockflow.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from .base import MinerAlgoType
|
||||||
|
from .hashrate import BlockFlowHashRate
|
||||||
|
from .hashrate.unit import BlockFlowUnit
|
||||||
|
|
||||||
|
|
||||||
|
class BlockFlowAlgo(MinerAlgoType):
|
||||||
|
hashrate: type[BlockFlowHashRate] = BlockFlowHashRate
|
||||||
|
unit: type[BlockFlowUnit] = BlockFlowUnit
|
||||||
|
|
||||||
|
name = "BlockFlow"
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
from .base import AlgoHashRateType
|
from .base import AlgoHashRateType
|
||||||
from .blake256 import Blake256HashRate
|
from .blake256 import Blake256HashRate
|
||||||
|
from .blockflow import BlockFlowHashRate
|
||||||
from .eaglesong import EaglesongHashRate
|
from .eaglesong import EaglesongHashRate
|
||||||
from .equihash import EquihashHashRate
|
from .equihash import EquihashHashRate
|
||||||
from .ethash import EtHashHashRate
|
from .ethash import EtHashHashRate
|
||||||
@@ -22,3 +23,4 @@ class AlgoHashRate:
|
|||||||
EAGLESONG = EaglesongHashRate
|
EAGLESONG = EaglesongHashRate
|
||||||
ETHASH = EtHashHashRate
|
ETHASH = EtHashHashRate
|
||||||
EQUIHASH = EquihashHashRate
|
EQUIHASH = EquihashHashRate
|
||||||
|
BLOCKFLOW = BlockFlowHashRate
|
||||||
|
|||||||
18
pyasic/device/algorithm/hashrate/blockflow.py
Normal file
18
pyasic/device/algorithm/hashrate/blockflow.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing_extensions import Self
|
||||||
|
|
||||||
|
from pyasic.device.algorithm.hashrate.base import AlgoHashRateType
|
||||||
|
from pyasic.device.algorithm.hashrate.unit.blockflow import BlockFlowUnit
|
||||||
|
|
||||||
|
from .unit import HashUnit
|
||||||
|
|
||||||
|
|
||||||
|
class BlockFlowHashRate(AlgoHashRateType):
|
||||||
|
rate: float
|
||||||
|
unit: BlockFlowUnit = HashUnit.BLOCKFLOW.default
|
||||||
|
|
||||||
|
def into(self, other: BlockFlowUnit) -> Self:
|
||||||
|
return self.__class__(
|
||||||
|
rate=self.rate / (other.value / self.unit.value), unit=other
|
||||||
|
)
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
from .blake256 import Blake256Unit
|
from .blake256 import Blake256Unit
|
||||||
|
from .blockflow import BlockFlowUnit
|
||||||
from .eaglesong import EaglesongUnit
|
from .eaglesong import EaglesongUnit
|
||||||
from .equihash import EquihashUnit
|
from .equihash import EquihashUnit
|
||||||
from .ethash import EtHashUnit
|
from .ethash import EtHashUnit
|
||||||
@@ -21,3 +22,4 @@ class HashUnit:
|
|||||||
EAGLESONG = EaglesongUnit
|
EAGLESONG = EaglesongUnit
|
||||||
ETHASH = EtHashUnit
|
ETHASH = EtHashUnit
|
||||||
EQUIHASH = EquihashUnit
|
EQUIHASH = EquihashUnit
|
||||||
|
BLOCKFLOW = BlockFlowUnit
|
||||||
|
|||||||
16
pyasic/device/algorithm/hashrate/unit/blockflow.py
Normal file
16
pyasic/device/algorithm/hashrate/unit/blockflow.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from .base import AlgoHashRateUnitType
|
||||||
|
|
||||||
|
|
||||||
|
class BlockFlowUnit(AlgoHashRateUnitType):
|
||||||
|
H = 1
|
||||||
|
KH = int(H) * 1000
|
||||||
|
MH = int(KH) * 1000
|
||||||
|
GH = int(MH) * 1000
|
||||||
|
TH = int(GH) * 1000
|
||||||
|
PH = int(TH) * 1000
|
||||||
|
EH = int(PH) * 1000
|
||||||
|
ZH = int(EH) * 1000
|
||||||
|
|
||||||
|
default = MH
|
||||||
@@ -535,6 +535,7 @@ class IceRiverModels(MinerModelType):
|
|||||||
KS5 = "KS5"
|
KS5 = "KS5"
|
||||||
KS5L = "KS5L"
|
KS5L = "KS5L"
|
||||||
KS5M = "KS5M"
|
KS5M = "KS5M"
|
||||||
|
AL3 = "AL3"
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.value
|
return self.value
|
||||||
|
|||||||
27
pyasic/miners/device/models/iceriver/ALX/AL3.py
Normal file
27
pyasic/miners/device/models/iceriver/ALX/AL3.py
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Copyright 2024 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.algorithm import MinerAlgo
|
||||||
|
from pyasic.device.models import MinerModel
|
||||||
|
from pyasic.miners.device.makes import IceRiverMake
|
||||||
|
|
||||||
|
|
||||||
|
class AL3(IceRiverMake):
|
||||||
|
raw_model = MinerModel.ICERIVER.AL3
|
||||||
|
|
||||||
|
expected_chips = 156
|
||||||
|
expected_fans = 4
|
||||||
|
expected_hashboards = 3
|
||||||
|
algo = MinerAlgo.BLOCKFLOW
|
||||||
1
pyasic/miners/device/models/iceriver/ALX/__init__.py
Normal file
1
pyasic/miners/device/models/iceriver/ALX/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from .AL3 import AL3
|
||||||
@@ -1 +1,2 @@
|
|||||||
|
from .ALX import *
|
||||||
from .KSX import *
|
from .KSX import *
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ from pyasic.miners.elphapex import *
|
|||||||
from pyasic.miners.goldshell import *
|
from pyasic.miners.goldshell import *
|
||||||
from pyasic.miners.hammer import *
|
from pyasic.miners.hammer import *
|
||||||
from pyasic.miners.iceriver import *
|
from pyasic.miners.iceriver import *
|
||||||
|
from pyasic.miners.iceriver.iceminer.ALX import IceRiverAL3
|
||||||
from pyasic.miners.innosilicon import *
|
from pyasic.miners.innosilicon import *
|
||||||
from pyasic.miners.luckyminer import *
|
from pyasic.miners.luckyminer import *
|
||||||
from pyasic.miners.volcminer import *
|
from pyasic.miners.volcminer import *
|
||||||
@@ -685,6 +686,7 @@ MINER_CLASSES = {
|
|||||||
"KS5": IceRiverKS5,
|
"KS5": IceRiverKS5,
|
||||||
"KS5L": IceRiverKS5L,
|
"KS5L": IceRiverKS5L,
|
||||||
"KS5M": IceRiverKS5M,
|
"KS5M": IceRiverKS5M,
|
||||||
|
"10306": IceRiverAL3,
|
||||||
},
|
},
|
||||||
MinerTypes.HAMMER: {
|
MinerTypes.HAMMER: {
|
||||||
None: type("HammerUnknown", (BlackMiner, HammerMake), {}),
|
None: type("HammerUnknown", (BlackMiner, HammerMake), {}),
|
||||||
|
|||||||
6
pyasic/miners/iceriver/iceminer/ALX/AL3.py
Normal file
6
pyasic/miners/iceriver/iceminer/ALX/AL3.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
from pyasic.miners.backends.iceriver import IceRiver
|
||||||
|
from pyasic.miners.device.models.iceriver import AL3
|
||||||
|
|
||||||
|
|
||||||
|
class IceRiverAL3(IceRiver, AL3):
|
||||||
|
pass
|
||||||
1
pyasic/miners/iceriver/iceminer/ALX/__init__.py
Normal file
1
pyasic/miners/iceriver/iceminer/ALX/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from .AL3 import IceRiverAL3
|
||||||
Reference in New Issue
Block a user