diff --git a/.github/workflows/develop-chia.yaml b/.github/workflows/develop-chia.yaml index 4988747d..baa4b0b0 100644 --- a/.github/workflows/develop-chia.yaml +++ b/.github/workflows/develop-chia.yaml @@ -89,7 +89,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "GIGAHORSE_BRANCH=v2.4.1.giga36" + "GIGAHORSE_BRANCH=v2.5.0.giga36" "CHIA_BRANCH=main" "PLOTMAN_BRANCH=compress" tags: | diff --git a/.github/workflows/main-chia.yaml b/.github/workflows/main-chia.yaml index a104af29..23ab9383 100644 --- a/.github/workflows/main-chia.yaml +++ b/.github/workflows/main-chia.yaml @@ -89,7 +89,7 @@ jobs: build-args: | "UBUNTU_VER=jammy" "MACHINARIS_STREAM=latest" - "GIGAHORSE_BRANCH=v2.4.1.giga36" + "GIGAHORSE_BRANCH=v2.5.0.giga36" "CHIA_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-gigahorse:latest diff --git a/.github/workflows/main-mmx.yaml b/.github/workflows/main-mmx.yaml index e6931e86..c843f3ac 100644 --- a/.github/workflows/main-mmx.yaml +++ b/.github/workflows/main-mmx.yaml @@ -46,7 +46,7 @@ jobs: "MACHINARIS_STREAM=latest" "CHIA_BRANCH=latest" "MMX_BRANCH=v0.10.6" - "GIGAHORSE_BRANCH=v2.4.1.giga36" + "GIGAHORSE_BRANCH=v2.5.0.giga36" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:latest ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:v${{ github.event.inputs.version }} diff --git a/.github/workflows/test-chia.yaml b/.github/workflows/test-chia.yaml index f34e8736..a84951be 100644 --- a/.github/workflows/test-chia.yaml +++ b/.github/workflows/test-chia.yaml @@ -89,7 +89,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=test" "CHIADOG_BRANCH=dev" - "GIGAHORSE_BRANCH=v2.4.1.giga36" + "GIGAHORSE_BRANCH=v2.5.0.giga36" "CHIA_BRANCH=main" "PLOTMAN_BRANCH=development" tags: | diff --git a/.github/workflows/test-mmx.yaml b/.github/workflows/test-mmx.yaml index 6bfa53bb..95e18d15 100644 --- a/.github/workflows/test-mmx.yaml +++ b/.github/workflows/test-mmx.yaml @@ -46,7 +46,7 @@ jobs: "CHIA_BRANCH=latest" "PLOTMAN_BRANCH=development" "MMX_BRANCH=v0.10.6" - "GIGAHORSE_BRANCH=v2.4.1.giga36" + "GIGAHORSE_BRANCH=v2.5.0.giga36" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:test ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:test diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c8d0b1a..5b40f416 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.5.0] - 2025-01-04 +### Added + - New check to restart a farmer if pooling and no partials have been observed in the last hour. Thanks @aweigold! +### Changed +### Updated + - [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.5.0) to v2.5.0 - misc improvements, see their release notes. + - [Gigahorse](https://github.com/madMAx43v3r/chia-gigahorse/releases/tag/v2.5.0.giga36) to v2.5.0.giga36. NOTE: Only for AMD64, so ARM64 uses an old version. +### Notes + - Chia X.Y.0 releases have become quite buggy, so I am delaying a matching Machinaris release by weeks for additional testing. + ## [2.4.4] - 2024-10-17 ### Added ### Changed diff --git a/CREDITS.md b/CREDITS.md index 5614e916..a04c4ae3 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -96,6 +96,7 @@ A big thanks to all that contributed with dev and test including: * @Finball * @chris-merritt * @priyankub +* @aweigold ## Trademark Notice CHIA NETWORK INC, CHIA™, the CHIA BLOCKCHAIN™, the CHIA PROTOCOL™, CHIALISP™ and the “leaf Logo” (including the leaf logo alone when it refers to or indicates Chia), are trademarks or registered trademarks of Chia Network, Inc., a Delaware corporation. *There is no affliation between this Machinaris project and the main Chia Network project.* \ No newline at end of file diff --git a/VERSION b/VERSION index ab6d2789..fad066f8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.4.4 \ No newline at end of file +2.5.0 \ No newline at end of file diff --git a/api/schedules/restart_stuck_farmer.py b/api/schedules/restart_stuck_farmer.py index f14c93e0..c4338772 100644 --- a/api/schedules/restart_stuck_farmer.py +++ b/api/schedules/restart_stuck_farmer.py @@ -5,7 +5,9 @@ # # Also, if a limit is optionally set, will trigger a blockchain restart if exceeds # X GB over a period of time. Useful for old forks which are memory leakers per day. -# +# +# Also, if no partial proofs for pools for a while, restart farmer. +# import datetime as dt import math @@ -13,11 +15,15 @@ import subprocess import traceback +from web import db from api import app from common.config import globals from api.commands import chia_cli, plotman_cli +from common.models import partials as pr +from common.models import plotnfts as pn RESTART_IF_STUCK_MINUTES = 15 +RESTART_IF_STUCK_NO_PARTIALS_MINUTES = 60 last_peak = None last_peak_time = None @@ -90,4 +96,21 @@ def execute(): memory_exceeded_since = None # Not over the limit anymore except Exception as ex: app.logger.info("Skipping bloated farmer check due to exception: {0}".format(str(ex))) - traceback.print_exc() \ No newline at end of file + traceback.print_exc() + # If no partial proofs for pools for a while, restart farmer + try: + if not globals.wallet_running(): # Only if wallet is not currently being synced + plotnfts = db.session.query(pn.Plotnft).filter(pn.Plotnft.blockchain == blockchain).all() + is_pooling = False + for plotnft in plotnfts: + if not "SELF_POOLING" in plotnft.details: + is_pooling = True + if not is_pooling: + return # No plotnft currently pooling (not self-pooling), so don't expect any partials + partials = db.session.query(pr.Partial).filter(pr.Partial.blockchain == blockchain, pr.Partial.created_at >= (dt.datetime.now() - dt.timedelta(minutes=RESTART_IF_STUCK_NO_PARTIALS_MINUTES))).all() + if len(partials) == 0: + app.logger.info("***************** RESTARTING FARMER DUE TO NO PARTIALS FOR {} MINUTES!!! ******************".format(RESTART_IF_STUCK_MINUTES)) + chia_cli.restart_farmer(blockchain) + return + except Exception as ex: + app.logger.info("Skipping stuck farmer check due to exception: {0}".format(str(ex))) diff --git a/scripts/forks/chia_install.sh b/scripts/forks/chia_install.sh index 730b6c8d..4943ad63 100644 --- a/scripts/forks/chia_install.sh +++ b/scripts/forks/chia_install.sh @@ -27,10 +27,10 @@ else echo "Installing Chia CUDA binaries on ${arch_name}..." cd /tmp if [[ "${arch_name}" == "x86_64" ]]; then - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.4.4/chia-blockchain-cli_2.4.4-1_amd64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.5.0/chia-blockchain-cli_2.5.0-1_amd64.deb apt-get install ./chia-blockchain-cli*.deb else - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.4.4/chia-blockchain-cli_2.4.4-1_arm64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.5.0/chia-blockchain-cli_2.5.0-1_arm64.deb apt-get install ./chia-blockchain-cli*.deb fi diff --git a/scripts/forks/gigahorse_install.sh b/scripts/forks/gigahorse_install.sh index 5f5fd789..b46669ff 100644 --- a/scripts/forks/gigahorse_install.sh +++ b/scripts/forks/gigahorse_install.sh @@ -23,12 +23,16 @@ else du -hsc chia-gigahorse-farmer* tar -xzf chia-gigahorse-farmer* else + # Max broke ARM64 support in v2.4.4.giga36, have to downgrade to 2.4.1 + if [[ "${GIGAHORSE_BRANCH}" == "v2.5.0.giga36" ]]; then + GIGAHORSE_BRANCH="v2.4.1.giga36" # old version + GIGAHORSE_VERSION=${GIGAHORSE_BRANCH#?} + fi url="https://github.com/madMAx43v3r/chia-gigahorse/releases/download/${GIGAHORSE_BRANCH}/chia-gigahorse-farmer-${GIGAHORSE_VERSION}-aarch64.tar.gz" echo "Pulling Madmax closed-source Chia farming binary from..." echo ${url} cd / && curl --retry 5 --retry-max-time 120 -skJLO ${url} du -hsc chia-gigahorse-farmer* - cksum chia-gigahorse-farmer* tar -xzf chia-gigahorse-farmer* fi fi