Skip to content

Commit

Permalink
Merge pull request #961 from guydavis/integration
Browse files Browse the repository at this point in the history
Machinaris 2.1.4
  • Loading branch information
guydavis authored Jan 11, 2024
2 parents 3e8e3ba df04b27 commit 328b771
Show file tree
Hide file tree
Showing 20 changed files with 69 additions and 25 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.1.1.giga25"
"GIGAHORSE_BRANCH=v2.1.3.giga26"
"CHIA_BRANCH=main"
"PLOTMAN_BRANCH=compress"
tags: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main-chia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 83,13 @@ jobs:
with:
file: docker/dockerfile
context: .
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
provenance: false
push: true
build-args: |
"UBUNTU_VER=jammy"
"MACHINARIS_STREAM=latest"
"GIGAHORSE_BRANCH=v2.1.1.giga25"
"GIGAHORSE_BRANCH=v2.1.3.giga26"
"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.1.1.giga25"
"GIGAHORSE_BRANCH=v2.1.3.giga26"
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:latest
${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:v${{ github.event.inputs.version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-chia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 82,14 @@ jobs:
with:
file: docker/dockerfile
context: .
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
provenance: false
push: true
build-args: |
"UBUNTU_VER=jammy"
"MACHINARIS_STREAM=test"
"CHIADOG_BRANCH=dev"
"GIGAHORSE_BRANCH=v2.1.1.giga25"
"GIGAHORSE_BRANCH=v2.1.3.giga26"
"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.1.1.giga25"
"GIGAHORSE_BRANCH=v2.1.3.giga26"
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:test
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:test
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 2,18 @@

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.1.4] - 2024-01-11
### Added
- Optionally launch `chia-exporter` [metrics endpoint](https://github.com/Chia-Network/chia-exporter) for Prometheus reporting if env var `chia_exporter=true` is set.
- Support for running Gigahorse containers on arm64 architectures such as Raspberry Pi.
- Main dashboard page can now be pinned (Pin Icon) to display only a blockchain of interest, rather than rotating through each in turn.
### Changed
- Optionally launch of Gigahorse recompute server when in harvester mode if env var `gigahorse_recompute_server=true` is set.
- Fix for Bladebit GPU plotting jobs taking a minute to display on Plotting page on job start. Should now be seconds only.
### Updated
- [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.1.4) to v2.1.4 - misc improvements, see their release notes.
- [Gigahorse](https://github.com/madMAx43v3r/chia-gigahorse/releases/tag/v2.1.3.giga26) to v2.1.3.giga26.

## [2.1.3] - 2023-12-19
### Updated
- [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.1.3) to v2.1.3 - fix for unforunate bug CNI released in 2.1.2
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 1 @@
2.1.3
2.1.4
7 changes: 5 additions & 2 deletions api/models/plotman.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 19,11 @@ def __init__(self, cli_stdout, plotman_pid):
self.columns[8] = 'size'
else: # Check for a plotting job row
values = line.split()
if len(values) > 1 and values[1] in ['chia', 'madmax', 'bladebit']:
if len(values) == len(self.columns):
if len(values) > 1:
if len(values) == (len(self.columns) - 1) and values[0] in ['chia', 'madmax', 'bladebit']:
# Sometimes plotman can't find the plot_id on newly started plotting jobs, use a placeholder
values.insert(0, 'xxxxxx')
if len(values) == len(self.columns) and values[1] in ['chia', 'madmax', 'bladebit']:
row = {}
i = 0
for i in range(len(self.columns)):
Expand Down
1 change: 1 addition & 0 deletions docker/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 101,7 @@ ENV keys="/root/.chia/mnemonic.txt"
ENV plots_dir="/plots"
# One of fullnode, farmer, harvester, plotter, farmer plotter, harvester plotter. Default is fullnode
ENV mode="fullnode"
ENV chia_exporter="false"
ENV chives_masternode="false"
ENV gigahorse_recompute_server="false"
# The single blockchain to run: chia, flax, nchain, hddcoin, chives, etc
Expand Down
2 changes: 1 addition & 1 deletion scripts/bladebit_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 15,7 @@ if [[ (${mode} =~ ^fullnode.* || ${mode} =~ "plotter") && (${blockchains} == 'c
# Now install CNI's separate binary for actual GPU plotting...
cd /opt/chia/bladebit
rm -f ./bladebit # Remove stale version bundled in the DEB package.
if [[ "${arch_name}" = "x86_64" ]]; then
if [[ "${arch_name}" == "x86_64" ]]; then
curl -sLJO https://github.com/Chia-Network/bladebit/releases/download/v3.1.0/bladebit-v3.1.0-ubuntu-x86-64.tar.gz
curl -sLJO https://github.com/Chia-Network/bladebit/releases/download/v3.1.0/bladebit-cuda-v3.1.0-ubuntu-x86-64.tar.gz
else
Expand Down
14 changes: 10 additions & 4 deletions scripts/forks/chia_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 10,7 @@ if [ -z ${CHIA_BRANCH} ]; then
else
cd /tmp
rm -rf /root/.cache
apt-get update && apt-get install -y dialog apt-utils
apt-get update && apt-get install -y dialog apt-utils ca-certificates curl gnupg
/usr/bin/bash /machinaris/scripts/gpu_drivers_install.sh

git clone --branch ${CHIA_BRANCH} --recurse-submodules=mozilla-ca https://github.com/Chia-Network/chia-blockchain.git /chia-blockchain
Expand All @@ -26,11 26,17 @@ else
ubuntu_ver=`lsb_release -r -s`
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.1.3/chia-blockchain-cli_2.1.3-1_amd64.deb
if [[ "${arch_name}" == "x86_64" ]]; then
curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.1.4/chia-blockchain-cli_2.1.4-1_amd64.deb
apt-get install ./chia-blockchain-cli*.deb
else
curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.1.3/chia-blockchain-cli_2.1.3-1_arm64.deb
curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.1.4/chia-blockchain-cli_2.1.4-1_arm64.deb
apt-get install ./chia-blockchain-cli*.deb
fi

# Also include "chia-exporter" for Prometheus reporting endpoints.
curl -sL https://repo.chia.net/FD39E6D3.pubkey.asc | sudo gpg --dearmor -o /usr/share/keyrings/chia.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/chia.gpg] https://repo.chia.net/chia-exporter/debian/ stable main" | tee /etc/apt/sources.list.d/chia-exporter.list > /dev/null
apt-get update
apt-get install -y chia-exporter
fi
4 changes: 4 additions & 0 deletions scripts/forks/chia_launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 95,10 @@ if [[ ${mode} =~ ^fullnode.* ]]; then
else
chia start farmer
fi
if [[ ${chia_exporter} == "true" ]]; then
echo "Starting Chia Exporter service for Prometheus reporting..."
sleep 20 && /usr/local/bin/chia-exporter serve 2>&1 > /root/.chia/mainnet/log/chia-exporter.log &
fi
if [[ ${mode} =~ .*timelord$ ]]; then
if [ ! -f vdf_bench ]; then
echo "Building timelord binaries..."
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 @@ -15,7 15,11 @@ else
/usr/bin/bash /machinaris/scripts/gpu_drivers_install.sh

arch_name="$(uname -m)"
url="https://github.com/madMAx43v3r/chia-gigahorse/releases/download/${GIGAHORSE_BRANCH}/chia-gigahorse-farmer-${GIGAHORSE_VERSION}-${arch_name}.tar.gz"
if [[ "${arch_name}" == "x86_64" ]]; then
url="https://github.com/madMAx43v3r/chia-gigahorse/releases/download/${GIGAHORSE_BRANCH}/chia-gigahorse-farmer-${GIGAHORSE_VERSION}-x86_64.tar.gz"
else
url="https://github.com/madMAx43v3r/chia-gigahorse/releases/download/${GIGAHORSE_BRANCH}/chia-gigahorse-farmer-${GIGAHORSE_VERSION}-aarch64.tar.gz"
fi
echo "Pulling Madmax closed-source Chia farming binary from..."
echo ${url}
cd / && curl --retry 5 --retry-max-time 120 -skJLO ${url}
Expand Down
4 changes: 4 additions & 0 deletions scripts/forks/gigahorse_launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 129,10 @@ elif [[ ${mode} =~ ^harvester.* ]]; then
/chia-gigahorse-farmer/chia.bin configure --set-farmer-peer ${farmer_address}:${farmer_port} 2>&1 >> /root/.chia/mainnet/log/init.log
/chia-gigahorse-farmer/chia.bin configure --enable-upnp false 2>&1 >> /root/.chia/mainnet/log/init.log
/chia-gigahorse-farmer/chia.bin start harvester -r
if [[ ${gigahorse_recompute_server} == "true" ]]; then
echo "Starting Gigahorse recompute_server shortly..."
sleep 20 && /chia-gigahorse-farmer/chia_recompute_server 2>&1 > /root/.chia/mainnet/log/recompute.log &
fi
fi
elif [[ ${mode} == 'plotter' ]]; then
echo "Starting in Plotter-only mode. Run Plotman from either CLI or WebUI."
Expand Down
2 changes: 1 addition & 1 deletion scripts/forks/staicoin_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 28,7 @@ else
/usr/bin/sh ./install.sh

arch_name="$(uname -m)"
if [[ "${arch_name}" = "x86_64" ]]; then
if [[ "${arch_name}" == "x86_64" ]]; then
sh /machinaris/scripts/timelord_setup.sh
fi

Expand Down
2 changes: 1 addition & 1 deletion scripts/madmax_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 37,7 @@ fi
if [[ (${mode} =~ ^fullnode.* || ${mode} =~ "plotter") && (${blockchains} == 'mmx' || ${blockchains} == 'gigahorse') ]]; then
if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then
arch_name="$(uname -m)"
if [[ "${arch_name}" = "x86_64" ]]; then
if [[ "${arch_name}" == "x86_64" ]]; then
pushd /usr/bin
curl -sLJO https://github.com/madMAx43v3r/chia-gigahorse/raw/${GIGAHORSE_BRANCH}/cpu-plotter/linux/x86_64/chia_plot
curl -sLJO https://github.com/madMAx43v3r/chia-gigahorse/raw/${GIGAHORSE_BRANCH}/cpu-plotter/linux/x86_64/chia_plot_k34
Expand Down
2 changes: 1 addition & 1 deletion scripts/megacmd_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 9,7 @@ if [[ ${mode} =~ ^fullnode.* ]] && [[ "${blockchain_db_download}" == 'true' ]] &
arch_name="$(uname -m)"
ubuntu_ver=`lsb_release -r -s`
echo "Installing megacmd on ${arch_name}..."
if [[ "${arch_name}" = "x86_64" ]]; then
if [[ "${arch_name}" == "x86_64" ]]; then
apt update
apt install -y libc-ares2 libavcodec58 libavformat58 libavutil56 libswscale5 libmediainfo0v5 libzen0v5 libcrypto 8 libfreeimage3 libpcrecpp0v5
cd /tmp && curl -O https://mega.nz/linux/repo/xUbuntu_${ubuntu_ver}/amd64/megacmd_1.6.0-6.1_amd64.deb
Expand Down
11 changes: 9 additions & 2 deletions web/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 75,21 @@ def index():
workers = worker.load_worker_summary()
farm_summary = chia.load_farm_summary()
plotting = plotman.load_plotting_summary_by_blockchains(farm_summary.farms.keys())
selected_blockchain = farm_summary.selected_blockchain()
if request.args.get('selected_blockchain'):
# Check if user has pinned the view to a particular blockchain view on refresh, no rotate
selected_blockchain = request.args.get('selected_blockchain')
carousel_ride_enabled = False # Disable automatic carousel rotation on load
else: # Default is to rotate every 10 seconds
selected_blockchain = farm_summary.selected_blockchain()
carousel_ride_enabled = True # Enable automatic carousel rotation on load
chia.challenges_chart_data(farm_summary)
p.partials_chart_data(farm_summary)
stats.load_daily_diff(farm_summary)
stats.wallet_chart_data(farm_summary)
warnings.check_warnings(request.args)
return render_template('index.html', reload_seconds=120, farms=farm_summary.farms, \
plotting=plotting, workers=workers, global_config=gc, selected_blockchain=selected_blockchain)
plotting=plotting, workers=workers, global_config=gc, \
carousel_ride_enabled=carousel_ride_enabled, selected_blockchain=selected_blockchain)

@app.route('/chart')
def chart():
Expand Down
9 changes: 6 additions & 3 deletions web/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 18,7 @@
{% endwith %}
</div>

<div id="carouselExampleFade" class="carousel slide carousel-fade" data-bs-ride="carousel">
<div id="carouselExampleFade" class="carousel slide carousel-fade" {% if carousel_ride_enabled %} data-bs-ride="carousel" {% endif %}>
<div class="carousel-inner">
{% for blockchain in farms.keys()|sort(case_sensitive=False) %}
<div class="carousel-item {% if blockchain == selected_blockchain %} active {% endif %}" data-bs-interval="10000">
Expand All @@ -27,9 27,12 @@
<div class="row align-items-md-stretch" style="margin-top:0px; margin-bottom:5px;">
<div class="col-md-12">
<div class="h-30 p-2 text-white bg-dark rounded-3">
<h4 class="text-center">{{ blockchain|capitalize }} - {{_('Expected Time to Win')}}:
<h2 class="text-center" style="margin-bottom: 0px">{{ blockchain|capitalize }} - {{_('Expected Time to Win')}}:
<span class="text-success">{{ farms[blockchain].expected_time_to_win }}</span>
</h4>
<a href="{{ url_for('index') }}?selected_blockchain={{blockchain}}" title="{{_('Pin Current Blockchain')}}">
<i class="fs-4 bi-pin"></i>
</a>
</h2>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/templates/settings/pools.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 37,7 @@ <h5 class="modal-title" id="confirmModalLabel">{{_('Confirm Pool Change')}}</h5>
<div class="row mb-3 pt-3">
<label class="col-sm-3 col-form-label col-form-label-sm" for="fee_mojos">{{_('Fee in Mojos: ')}}</label>
<div class="col-sm-9">
<input type="text" class="form-control" value="10" aria-label="fee_mojos" name="fee_mojos" id="fee_mojos"/>
<input type="text" class="form-control" value="1000" aria-label="fee_mojos" name="fee_mojos" id="fee_mojos"/>
</div>
</div>
</div>
Expand Down

0 comments on commit 328b771

Please sign in to comment.