Skip to content

Commit

Permalink
Merge pull request #1010 from guydavis/integration
Browse files Browse the repository at this point in the history
V2.5.0
  • Loading branch information
guydavis authored Jan 6, 2025
2 parents ee0204e + 62a8db6 commit 110dbf7
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/develop-chia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-chia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-mmx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-chia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-mmx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.4
2.5.0
27 changes: 25 additions & 2 deletions api/schedules/restart_stuck_farmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,25 @@
#
# 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
import os
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
Expand Down Expand Up @@ -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()
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)))
4 changes: 2 additions & 2 deletions scripts/forks/chia_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 5 additions & 1 deletion scripts/forks/gigahorse_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 110dbf7

Please sign in to comment.