From 79c4b7ddc31358c4120cfa46e1ba667b5e1da59d Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 21 Aug 2023 16:23:24 -0600 Subject: [PATCH 1/4] Support for AUTO_ARCHIVE on startup. --- docker/dockerfile | 1 + scripts/plotman_autoplot.sh | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docker/dockerfile b/docker/dockerfile index e605eb03..1f60915b 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -138,6 +138,7 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 ENV XDG_CONFIG_HOME=/root/.chia ENV AUTO_PLOT=false +ENV AUTO_ARCHIVE=false ENV PLOTMAN_BRANCH=${PLOTMAN_BRANCH} ENV CHIADOG_BRANCH=${CHIADOG_BRANCH} ENV FDCLI_BRANCH=${FDCLI_BRANCH} diff --git a/scripts/plotman_autoplot.sh b/scripts/plotman_autoplot.sh index f1bf85e4..b8a0bafa 100644 --- a/scripts/plotman_autoplot.sh +++ b/scripts/plotman_autoplot.sh @@ -1,6 +1,6 @@ #!/bin/env bash # -# Starts Plotman, when AUTO_PLOT enabled, on a Chia/Chives fullnode or a plotter instance +# Starts Plotman, when AUTO_PLOT/AUTO_ARCHIVE are enabled, on a Chia/Chives/MMX/Gigahorse fullnode or a plotter instance # if [[ (${mode} =~ ^fullnode.* || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives' || ${blockchains} == 'mmx' || ${blockchains} == 'gigahorse') ]]; then @@ -8,4 +8,8 @@ if [[ (${mode} =~ ^fullnode.* || ${mode} =~ "plotter") && (${blockchains} == 'c if [ ${AUTO_PLOT,,} = "true" ]; then nohup plotman plot >> /root/.chia/plotman/logs/plotman.log 2>&1 & fi + # Start archiving automatically if requested (not the default) + if [ ${AUTO_ARCHIVE,,} = "true" ]; then + nohup plotman archive >> /root/.chia/plotman/logs/archiver.log 2>&1 & + fi fi \ No newline at end of file From 585da3287326b3d37fa5d642322c986391b00717 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 22 Aug 2023 14:32:45 -0600 Subject: [PATCH 2/4] Fix for torrent link. --- scripts/forks/chia_launch.sh | 4 +--- scripts/forks/gigahorse_launch.sh | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/forks/chia_launch.sh b/scripts/forks/chia_launch.sh index 3a7f52cf..04aa261b 100644 --- a/scripts/forks/chia_launch.sh +++ b/scripts/forks/chia_launch.sh @@ -36,13 +36,11 @@ if [[ "${blockchain_db_download}" == 'true' ]] \ echo "Please be patient as this takes hours now, but saves days of syncing time later." mkdir -p /root/.chia/mainnet/db/chia && cd /root/.chia/mainnet/db/chia # Latest Blockchain DB, first try direct download, then fallback to slower torrent - torrent=$(curl -s https://www.chia.net/downloads/ | grep -Po "https:.*/blockchain_v2_mainnet.\d{4}-\d{2}-\d{2}.sqlite.gz.torrent") + torrent=$(curl -s https://www.chia.net/downloads/ | grep -Po "https://torrents.chia.net/databases/mainnet/mainnet.\d{4}-\d{2}-\d{2}.tar.gz.torrent") echo "Please be patient! Downloading blockchain database indirectly (via libtorrent) from: " echo " ${torrent}" curl -skLJ -O ${torrent} - #deactivate # Use the system python /usr/bin/python /machinaris/scripts/chiadb_download.py $PWD/*.torrent >> /tmp/chiadb_download.log 2>&1 - #cd /chia-blockchain && . ./activate # Re-activate echo "Now decompressing the blockchain database..." cd /root/.chia/mainnet/db/chia && gunzip *.gz cd /root/.chia/mainnet/db diff --git a/scripts/forks/gigahorse_launch.sh b/scripts/forks/gigahorse_launch.sh index 3808b68d..c6d65d32 100644 --- a/scripts/forks/gigahorse_launch.sh +++ b/scripts/forks/gigahorse_launch.sh @@ -32,14 +32,12 @@ if [[ "${blockchain_db_download}" == 'true' ]] \ echo "Downloading Chia blockchain DB (many GBs in size) on first launch..." echo "Please be patient as this takes hours now, but saves days of syncing time later." mkdir -p /root/.chia/mainnet/db/chia && cd /root/.chia/mainnet/db/chia - # Latest Blockchain DB, first try direct download, then fallback to slower torrent - torrent=$(curl -s https://www.chia.net/downloads/ | grep -Po "https:.*/blockchain_v2_mainnet.\d{4}-\d{2}-\d{2}.sqlite.gz.torrent") + # Latest Blockchain DB, first try direct download, then fallback to slower torrent + torrent=$(curl -s https://www.chia.net/downloads/ | grep -Po "https://torrents.chia.net/databases/mainnet/mainnet.\d{4}-\d{2}-\d{2}.tar.gz.torrent") echo "Please be patient! Downloading blockchain database indirectly (via libtorrent) from: " echo " ${torrent}" curl -skLJ -O ${torrent} - deactivate 2>&1 >/dev/null # Use the system python /usr/bin/python /machinaris/scripts/chiadb_download.py $PWD/*.torrent >> /tmp/chiadb_download.log 2>&1 - cd /chia-blockchain && . ./activate # Re-activate echo "Now decompressing the blockchain database..." cd /root/.chia/mainnet/db/chia && gunzip *.gz cd /root/.chia/mainnet/db From 01811b2538d64516c221f8dce4a9deccb126c426 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 22 Aug 2023 15:34:44 -0600 Subject: [PATCH 3/4] More changes for CNI torrent download. --- scripts/forks/chia_launch.sh | 2 +- scripts/forks/gigahorse_launch.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/forks/chia_launch.sh b/scripts/forks/chia_launch.sh index 04aa261b..2717bfa5 100644 --- a/scripts/forks/chia_launch.sh +++ b/scripts/forks/chia_launch.sh @@ -42,7 +42,7 @@ if [[ "${blockchain_db_download}" == 'true' ]] \ curl -skLJ -O ${torrent} /usr/bin/python /machinaris/scripts/chiadb_download.py $PWD/*.torrent >> /tmp/chiadb_download.log 2>&1 echo "Now decompressing the blockchain database..." - cd /root/.chia/mainnet/db/chia && gunzip *.gz + cd /root/.chia/mainnet/db/chia && tar -xf *.gz cd /root/.chia/mainnet/db mv /root/.chia/mainnet/db/chia/blockchain_v2_mainnet.*.sqlite blockchain_v2_mainnet.sqlite rm -rf /root/.chia/mainnet/db/chia diff --git a/scripts/forks/gigahorse_launch.sh b/scripts/forks/gigahorse_launch.sh index c6d65d32..6e330e50 100644 --- a/scripts/forks/gigahorse_launch.sh +++ b/scripts/forks/gigahorse_launch.sh @@ -39,7 +39,7 @@ if [[ "${blockchain_db_download}" == 'true' ]] \ curl -skLJ -O ${torrent} /usr/bin/python /machinaris/scripts/chiadb_download.py $PWD/*.torrent >> /tmp/chiadb_download.log 2>&1 echo "Now decompressing the blockchain database..." - cd /root/.chia/mainnet/db/chia && gunzip *.gz + cd /root/.chia/mainnet/db/chia && tar -xf *.gz cd /root/.chia/mainnet/db mv /root/.chia/mainnet/db/chia/blockchain_v2_mainnet.*.sqlite blockchain_v2_mainnet.sqlite rm -rf /root/.chia/mainnet/db/chia From 9eee5250851cadf446ff38f718e11223c81699fe Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Thu, 24 Aug 2023 10:52:49 -0600 Subject: [PATCH 4/4] Eight months after Gigahorse, finally Chia 2.0.0 drops. --- CHANGELOG.md | 2 +- scripts/forks/chia_install.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1b85be1..30ec9e21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ 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.0.0] - 2023-08-? +## [2.0.0] - 2023-08-24 ### Added - Request a new plot check, via 'Recheck' button added to Check results dialog on Farming page. - Optionally exclude certain plot directories from replotting check to free disk space. Useful for drives only partially dedicated to holding plots. diff --git a/scripts/forks/chia_install.sh b/scripts/forks/chia_install.sh index a4b68e05..fcf74671 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.0.0-rc6/chia-blockchain-cli_2.0.0rc6-1_amd64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.0.0/chia-blockchain-cli_2.0.0-1_amd64.deb apt-get install ./chia-blockchain-cli*.deb elif [[ "${arch_name}" = "arm64" ]]; then - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.0.0-rc6/chia-blockchain-cli_2.0.0rc6-1_arm64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.0.0/chia-blockchain-cli_2.0.0-1_arm64.deb apt-get install ./chia-blockchain-cli*.deb else echo "Installing Chia CUDA binaries skipped -> unsupported architecture: ${arch_name}"