Skip to content

Commit

Permalink
feature: add support for S21 Hydro (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptographicturk authored Jan 28, 2025
1 parent a24fc07 commit 7964336
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 3 deletions.
13 changes: 13 additions & 0 deletions docs/miners/antminer/X21.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@
show_root_heading: false
heading_level: 0

## S21 Hydro (Stock)

- [x] Shutdowns
- [x] Power Modes
- [ ] Setpoints
- [ ] Presets

::: pyasic.miners.antminer.bmminer.X21.S21.BMMinerS21Hydro
handler: python
options:
show_root_heading: false
heading_level: 0

## S21 Pro (Stock)

- [x] Shutdowns
Expand Down
1 change: 1 addition & 0 deletions docs/miners/supported_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ details {
<li><a href="../antminer/X21#s21-stock">S21 (Stock)</a></li>
<li><a href="../antminer/X21#s21-pro-stock">S21 Pro (Stock)</a></li>
<li><a href="../antminer/X21#t21-stock">T21 (Stock)</a></li>
<li><a href="../antminer/X21#s21-hydro-stock">S21 Hydro (Stock)</a></li>
</ul>
</details>
</ul>
Expand Down
1 change: 1 addition & 0 deletions pyasic/device/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class AntminerModels(MinerModelType):
T19 = "T19"
S21 = "S21"
S21Pro = "S21 Pro"
S21Hydro = "S21 Hydro"
T21 = "T21"

def __str__(self):
Expand Down
6 changes: 5 additions & 1 deletion pyasic/miners/antminer/bmminer/X21/S21.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# ------------------------------------------------------------------------------

from pyasic.miners.backends import AntminerModern
from pyasic.miners.device.models import S21, S21Pro
from pyasic.miners.device.models import S21, S21Hydro, S21Pro


class BMMinerS21(AntminerModern, S21):
Expand All @@ -24,3 +24,7 @@ class BMMinerS21(AntminerModern, S21):

class BMMinerS21Pro(AntminerModern, S21Pro):
pass


class BMMinerS21Hydro(AntminerModern, S21Hydro):
pass
2 changes: 1 addition & 1 deletion pyasic/miners/antminer/bmminer/X21/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# See the License for the specific language governing permissions and -
# limitations under the License. -
# ------------------------------------------------------------------------------
from .S21 import BMMinerS21, BMMinerS21Pro
from .S21 import BMMinerS21, BMMinerS21Hydro, BMMinerS21Pro
from .T21 import BMMinerT21
7 changes: 7 additions & 0 deletions pyasic/miners/device/models/antminer/X21/S21.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ class S21Pro(AntMinerMake):
expected_fans = 4
expected_hashboards = 3
algo = MinerAlgo.SHA256


class S21Hydro(AntMinerMake):
raw_model = MinerModel.ANTMINER.S21Hydro
expected_chips = 216
expected_hashboards = 2
expected_fans = 0
2 changes: 1 addition & 1 deletion pyasic/miners/device/models/antminer/X21/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# limitations under the License. -
# ------------------------------------------------------------------------------

from .S21 import S21, S21Pro
from .S21 import S21, S21Hydro, S21Pro
from .T21 import T21
1 change: 1 addition & 0 deletions pyasic/miners/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class MinerTypes(enum.Enum):
"ANTMINER BHB68606": BMMinerS21, # ???
"ANTMINER S21 PRO": BMMinerS21Pro,
"ANTMINER T21": BMMinerT21,
"ANTMINER S21 HYD.": BMMinerS21Hydro,
},
MinerTypes.WHATSMINER: {
None: type("WhatsminerUnknown", (BTMiner, WhatsMinerMake), {}),
Expand Down

0 comments on commit 7964336

Please sign in to comment.