From 826717529431e941768b97776d146a243ac2d034 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Thu, 5 Jan 2023 11:15:06 -0700 Subject: [PATCH 001/104] Start on v0.8.7 for next release. --- CHANGELOG.md | 11 +++++++++++ VERSION | 2 +- api/commands/chia_cli.py | 2 +- scripts/forks/chinilla_install.sh | 4 ++-- web/models/chia.py | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91a6d17d9..61589a67c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ 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). +## [Unreleased] +### Added + - + - +## Changed + - +## Updated + - Fix missing Connections listing for Flax and MMX blockchains +## Notes + - + ## [0.8.6] - 2023-01-03 ### Added - Re-plotting: **Optional** background deletion of a few old plots to free space for new plotting. See Farming page, Settings icon, top-right. diff --git a/VERSION b/VERSION index 120f53215..35864a97f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.6 \ No newline at end of file +0.8.7 \ No newline at end of file diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index 4e1cadc72..0ee30df04 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -37,7 +37,7 @@ WALLET_SETTINGS_FILE = '/root/.chia/machinaris/config/wallet_settings.json' # Blockchains which dropped compatibility with `show -c` commands around v1.6 -BLOCKCHAINS_USING_PEER_CMD = ['cactus', 'chia', 'chinilla', 'littlelambocoin', 'maize', 'one', 'tad'] +BLOCKCHAINS_USING_PEER_CMD = ['cactus', 'chia', 'chinilla', 'flax', 'littlelambocoin', 'maize', 'one', 'tad'] def load_farm_summary(blockchain): chia_binary = globals.get_blockchain_binary(blockchain) diff --git a/scripts/forks/chinilla_install.sh b/scripts/forks/chinilla_install.sh index 7632f1276..3c830d99e 100644 --- a/scripts/forks/chinilla_install.sh +++ b/scripts/forks/chinilla_install.sh @@ -4,8 +4,8 @@ # CHINILLA_BRANCH=$1 -# On 2022-12-19 -HASH=f664e8279f45f5a76a6d67c281c5a1a2740a1931 +# On 2023-01-05 +HASH=de8119eb8e1cc13418e7df30eb7d73aae900c40a if [ -z ${CHINILLA_BRANCH} ]; then echo 'Skipping Chinilla install as not requested.' diff --git a/web/models/chia.py b/web/models/chia.py index 02e5f8e81..db5600067 100644 --- a/web/models/chia.py +++ b/web/models/chia.py @@ -789,7 +789,7 @@ def parse_mmx(self, connection, blockchain, geoip_cache, lang): for line in connection.details.split('\n'): try: #app.logger.info(line) - m = re.match("\[(.+)\]\s+height\s+=\s+(\!?\d+), (\w+) \(\d+\.\d+\), (\d+\.?\d*) (\w)B/s recv, (\d*\.?\d*) (\w)B/s send,.* since (\d+) min, .* (\d+\.?\d?) sec timeout", line.strip(), re.IGNORECASE) + m = re.match("\[(.+)\]\s+height\s+=\s+(\!?\d+), (\w+) \(\d+\.\d+\), (\d+\.?\d*) (\w)B recv, (\d*\.?\d*) (\w)B sent,.* since (\d+) min, .* (\d+\.?\d?) sec timeout", line.strip(), re.IGNORECASE) if m: connection = { 'type': m.group(3), From e7b144660a3e323110e368a3f1ad7cf35a07a750 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sat, 7 Jan 2023 08:11:29 -0700 Subject: [PATCH 002/104] Try Chia main, fix One blockchain reward amount. Fix for sorting on Drives page. --- .github/workflows/develop-chia.yaml | 2 +- common/config/blockchains.json | 2 +- web/templates/drives.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/develop-chia.yaml b/.github/workflows/develop-chia.yaml index c9ba01d59..3d41f1237 100644 --- a/.github/workflows/develop-chia.yaml +++ b/.github/workflows/develop-chia.yaml @@ -43,7 +43,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "CHIA_BRANCH=release/1.6.2" + "CHIA_BRANCH=main" "BLADEBIT_BRANCH=master" "PLOTMAN_BRANCH=development" tags: | diff --git a/common/config/blockchains.json b/common/config/blockchains.json index 4201aceb3..078eb814a 100644 --- a/common/config/blockchains.json +++ b/common/config/blockchains.json @@ -364,7 +364,7 @@ "farmer_port": 11113, "fullnode_rpc_port": 11114, "worker_port": 8956, - "reward": 2.0, + "reward": 10000.0, "mojos_per_coin": 1000000000000, "blocks_per_day": 4608, "git_url": "https://github.com/xone-network/one-blockchain", diff --git a/web/templates/drives.html b/web/templates/drives.html index 6c81316fb..888623c64 100644 --- a/web/templates/drives.html +++ b/web/templates/drives.html @@ -342,7 +342,7 @@
{{_('For more, see the Machinaris %(wiki_link_open)swiki%(wiki_link_close)s. "order": [[2, "asc"]], "columnDefs": [ { - targets: [0,9], "orderable": false, + targets: [0,10], "orderable": false, }, { targets: [5], "orderable": true, "render": function ( data, type, row, meta ) { if (data && data.includes('|')) { From c14091378f0da1f59cbbcd5e9f23280e4f46d860 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 8 Jan 2023 11:09:04 -0700 Subject: [PATCH 003/104] Staicoin to 1.3.0. --- CHANGELOG.md | 1 + scripts/forks/staicoin_install.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61589a67c..13456d0f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file. The format - ## Updated - Fix missing Connections listing for Flax and MMX blockchains + - [Staicoin](https://github.com/STATION-I/stai-blockchain/releases/tag/1.3.0) to v1.3.0. Note, they require a fresh `config.yaml`. ## Notes - diff --git a/scripts/forks/staicoin_install.sh b/scripts/forks/staicoin_install.sh index 6df619ce4..7ae7f81a5 100644 --- a/scripts/forks/staicoin_install.sh +++ b/scripts/forks/staicoin_install.sh @@ -4,8 +4,8 @@ # STAICOIN_BRANCH=$1 -# On 2022-10-24 -HASH=2fad4e4f12e374eff6e83b2830876902139156f9 +# On 2023-01-08 +HASH=60b6a001795af56ed1b2fc6e464cdc10884193a1 if [ -z ${STAICOIN_BRANCH} ]; then echo 'Skipping Staicoin install as not requested.' From 80006db09c5c3e31f420b06f0b014be2c555a372 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 8 Jan 2023 14:38:55 -0700 Subject: [PATCH 004/104] Fix for latest Staicoin status line parse. --- web/models/chia.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/models/chia.py b/web/models/chia.py index db5600067..46cd7cb42 100644 --- a/web/models/chia.py +++ b/web/models/chia.py @@ -612,6 +612,8 @@ def extract_status(self, blockchain, details, worker_status): return None if blockchain == 'mmx': pattern = '^Synced: (.*)$' + elif blockchain == 'staicoin': # Staicoin being different for no good reason... + pattern = '^Current Status: (.*)$' else: pattern = '^Current Blockchain Status: (.*)$' for line in details.split('\n'): From 7e0c514da5f646a187e1da812a2f3b6ee910cc0d Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 10 Jan 2023 14:16:39 -0700 Subject: [PATCH 005/104] Fix CLI parsing from changes in latest Chia version. #836 --- api/commands/chia_cli.py | 2 +- api/commands/pools_cli.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index 0ee30df04..2c278f579 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -92,7 +92,7 @@ def load_wallet_show(blockchain): app.logger.debug("Default SELECTED_WALLET_NUM is {0}".format(wallet_id_num)) while True: i = child.expect(["Wallet height:.*\r\n", "Wallet keys:.*\r\n", "Choose wallet key:.*\r\n", - "Choose a wallet key:.*\r\n", "No online backup file found.*\r\n", "Connection error.*\r\n"], timeout=90) + "Choose a wallet key .*\r\n", "No online backup file found.*\r\n", "Connection error.*\r\n"], timeout=90) if i == 0: app.logger.debug("wallet show returned 'Wallet height...' so collecting details.") wallet_show += child.after.decode("utf-8") + child.before.decode("utf-8") + child.read().decode("utf-8") diff --git a/api/commands/pools_cli.py b/api/commands/pools_cli.py index 3806e77ec..df828d9ae 100644 --- a/api/commands/pools_cli.py +++ b/api/commands/pools_cli.py @@ -100,7 +100,7 @@ def load_plotnft_show(blockchain): pool_wallet_id = 1 while True: i = child.expect(["Wallet height:.*\r\n", "Wallet keys:.*\r\n", "Choose wallet key:.*\r\n", - "Choose a wallet key:.*\r\n", "No online backup file found.*\r\n"], timeout=30) + "Choose a wallet key .*\r\n", "No online backup file found.*\r\n"], timeout=30) if i == 0: app.logger.debug("wallet show returned 'Wallet height...' so collecting details.") wallet_show += child.after.decode("utf-8") + child.before.decode("utf-8") + child.read().decode("utf-8") From 23436f8390c96154e23c7c5f01fc9c1cbf14a327 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 11 Jan 2023 08:28:27 -0700 Subject: [PATCH 006/104] Latest Chives version now at 1.5.3. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13456d0f8..359da9767 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,9 @@ All notable changes to this project will be documented in this file. The format - ## Updated - Fix missing Connections listing for Flax and MMX blockchains + - [Chives](https://github.com/HiveProject2021/chives-blockchain/releases/tag/1.5.3) to v1.5.3, including staking. - [Staicoin](https://github.com/STATION-I/stai-blockchain/releases/tag/1.3.0) to v1.3.0. Note, they require a fresh `config.yaml`. + ## Notes - From 40e1d7710cddeb63f0dd31e6c0194ad7c718a38d Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 11 Jan 2023 08:54:29 -0700 Subject: [PATCH 007/104] Test MMX master branch in develop stream. --- .github/workflows/develop-chives.yaml | 2 +- .github/workflows/develop-mmx.yaml | 2 +- .github/workflows/main-chives.yaml | 2 +- .github/workflows/test-chives.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/develop-chives.yaml b/.github/workflows/develop-chives.yaml index 6989dd7b4..7342d5ee1 100644 --- a/.github/workflows/develop-chives.yaml +++ b/.github/workflows/develop-chives.yaml @@ -43,7 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "CHIVES_BRANCH=1.5.1" + "CHIVES_BRANCH=1.5.3" "PLOTMAN_BRANCH=development" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:develop diff --git a/.github/workflows/develop-mmx.yaml b/.github/workflows/develop-mmx.yaml index 489bae37f..4e522c362 100644 --- a/.github/workflows/develop-mmx.yaml +++ b/.github/workflows/develop-mmx.yaml @@ -42,7 +42,7 @@ jobs: build-args: | "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" - "MMX_BRANCH=v0.9.3" + "MMX_BRANCH=master" "CHIA_BRANCH=latest" "PLOTMAN_BRANCH=development" tags: | diff --git a/.github/workflows/main-chives.yaml b/.github/workflows/main-chives.yaml index 81bd249f4..95ff811f8 100644 --- a/.github/workflows/main-chives.yaml +++ b/.github/workflows/main-chives.yaml @@ -43,7 +43,7 @@ jobs: build-args: | "UBUNTU_VER=focal" "MACHINARIS_STREAM=latest" - "CHIVES_BRANCH=1.5.1" + "CHIVES_BRANCH=1.5.3" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:latest ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:v${{ github.event.inputs.version }} diff --git a/.github/workflows/test-chives.yaml b/.github/workflows/test-chives.yaml index cad8f20f6..e34b5a6b6 100644 --- a/.github/workflows/test-chives.yaml +++ b/.github/workflows/test-chives.yaml @@ -43,7 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=test" "CHIADOG_BRANCH=dev" - "CHIVES_BRANCH=1.5.1" + "CHIVES_BRANCH=1.5.3" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:test ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:test From dd57cf632c9b89ead7bbfaa1656ffbcdf18880ca Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 13 Jan 2023 12:17:52 -0700 Subject: [PATCH 008/104] Testing Plotman library fixes. --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 359da9767..cea10f132 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,6 @@ All notable changes to this project will be documented in this file. The format ## [Unreleased] ### Added - - - ## Changed - ## Updated From 7245f94add43be0b78ad2138580a714139df8736 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 13 Jan 2023 14:24:42 -0700 Subject: [PATCH 009/104] Testing MMX cuda_plot. --- CHANGELOG.md | 3 +-- scripts/madmax_setup.sh | 27 +++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cea10f132..1f64ec2f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,13 @@ All notable changes to this project will be documented in this file. The format ## [Unreleased] ### Added - - + - [MMX Cuda Plotter](https://github.com/madMAx43v3r/mmx-binaries/tree/master/mmx-cuda-plotter) - currently only at commandline: `cuda_plot_kXX` ## Changed - ## Updated - Fix missing Connections listing for Flax and MMX blockchains - [Chives](https://github.com/HiveProject2021/chives-blockchain/releases/tag/1.5.3) to v1.5.3, including staking. - [Staicoin](https://github.com/STATION-I/stai-blockchain/releases/tag/1.3.0) to v1.3.0. Note, they require a fresh `config.yaml`. - ## Notes - diff --git a/scripts/madmax_setup.sh b/scripts/madmax_setup.sh index 9ac406bae..2a9a248ac 100644 --- a/scripts/madmax_setup.sh +++ b/scripts/madmax_setup.sh @@ -8,7 +8,7 @@ HASH=d1a9e88b44ba37f61bfabcb68e80e83f8b939648 MADMAX_BRANCH=master -if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives' || ${blockchains} == 'mmx') ]]; then +if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives') ]]; then if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then arch_name="$(uname -m)" if [[ "${arch_name}" = "x86_64" ]] || [[ "${arch_name}" = "arm64" ]]; then @@ -29,7 +29,30 @@ if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chi cd / rm -rf chia-plotter else - echo "Building madmax skipped -> unsupported architecture: ${arch_name}" + echo "Building madmax plotter skipped -> unsupported architecture: ${arch_name}" + fi + fi +fi + +# The MMX blockchain uses plotters from: https://github.com/madMAx43v3r/mmx-binaries +if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && ${blockchains} == 'mmx' ]]; then + if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then + arch_name="$(uname -m)" + if [[ "${arch_name}" = "x86_64" ]]; then + pushd /usr/bin + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cpu-plotter/linux/x86_64/chia_plot + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cpu-plotter/linux/x86_64/chia_plot_k34 + chmod 755 chia_plot* + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cuda-plotter/linux/x86_64/cuda_plot_k26 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cuda-plotter/linux/x86_64/cuda_plot_k29 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cuda-plotter/linux/x86_64/cuda_plot_k30 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cuda-plotter/linux/x86_64/cuda_plot_k31 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cuda-plotter/linux/x86_64/cuda_plot_k32 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cuda-plotter/linux/x86_64/cuda_plot_k33 + chmod 755 cuda_plot* + popd + else + echo "Downloading MMX chia_plot and cuda_plot skipped -> unsupported architecture: ${arch_name}" fi fi fi From 247dea90b31bf18b291744ae3bb21bc09ca9dfef Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 13 Jan 2023 16:59:58 -0700 Subject: [PATCH 010/104] Start using Max's MMX binaries. --- scripts/forks/mmx_install.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/scripts/forks/mmx_install.sh b/scripts/forks/mmx_install.sh index 813e351c0..c5e7bb903 100644 --- a/scripts/forks/mmx_install.sh +++ b/scripts/forks/mmx_install.sh @@ -1,6 +1,7 @@ #!/bin/env bash # # Installs MMX as per https://github.com/madMAx43v3r/mmx-node +# using his binaries from https://github.com/madMAx43v3r/mmx-binaries.git # MMX_BRANCH=$1 @@ -16,9 +17,16 @@ else # For AMDGPU, install the amdgpu-install stub, optionally invoked later if OPENCL_GPU=amd at launch time curl -O http://repo.radeon.com/amdgpu-install/22.20.5/ubuntu/jammy/amdgpu-install_22.20.50205-1_all.deb apt-get install -y ./amdgpu-install_22.20.50205-1_all.deb - # Clone and install MMX - git clone --branch ${MMX_BRANCH} --single-branch https://github.com/madMAx43v3r/mmx-node.git /mmx-node - cd /mmx-node - git submodule update --init --recursive - ./make_release.sh + # Clone and install MMX from the author's own binaries, not linked to his code branches unfortunately + pushd /tmp + git clone --depth 1 --filter=blob:none --sparse https://github.com/madMAx43v3r/mmx-binaries.git + pushd mmx-binaries/ + git sparse-checkout set mmx-node/linux/x86_64/ + pushd mmx-node/linux + mv x86_64 /mmx-node + popd + rm -f mmx-binaries + popd + ls -1 / + ls -1 /mmx-node/ fi From 57e56e5e330e4bb775c8a93df25ae68bb16aea5f Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 13 Jan 2023 17:04:49 -0700 Subject: [PATCH 011/104] Remove debug after testing. --- scripts/forks/mmx_install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/forks/mmx_install.sh b/scripts/forks/mmx_install.sh index c5e7bb903..609ed499f 100644 --- a/scripts/forks/mmx_install.sh +++ b/scripts/forks/mmx_install.sh @@ -27,6 +27,4 @@ else popd rm -f mmx-binaries popd - ls -1 / - ls -1 /mmx-node/ fi From af33e16ae63386c0b1ec81d724c1fabf10c465eb Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 13 Jan 2023 17:19:09 -0700 Subject: [PATCH 012/104] Testing unpinned Python libs. --- docker/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/requirements.txt b/docker/requirements.txt index b090303fe..9c54bba17 100644 --- a/docker/requirements.txt +++ b/docker/requirements.txt @@ -1,6 +1,6 @@ -apscheduler==3.8.0 -click==7.1.2 -jinja2==3.0.3 +apscheduler +click +jinja2 flask flask-smorest python-dotenv From ec2f594190597c1f558fe3663987307caed69774 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 13 Jan 2023 17:47:03 -0700 Subject: [PATCH 013/104] New libraries for MMX binaries. --- scripts/forks/mmx_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/forks/mmx_install.sh b/scripts/forks/mmx_install.sh index 609ed499f..a1ecca3b7 100644 --- a/scripts/forks/mmx_install.sh +++ b/scripts/forks/mmx_install.sh @@ -12,7 +12,7 @@ else rm -rf /root/.cache apt-get update # Install dependencies for MMX and GPU support - apt-get install -y git cmake build-essential libsecp256k1-dev libsodium-dev zlib1g-dev ocl-icd-opencl-dev clinfo screen + apt-get install -y git cmake build-essential libsecp256k1-dev libsodium-dev libminiupnpc-dev libjemalloc-dev zlib1g-dev ocl-icd-opencl-dev clinfo screen apt-get install -y initramfs-tools ocl-icd-libopencl1 opencl-headers apt-utils libnuma1 # For AMDGPU, install the amdgpu-install stub, optionally invoked later if OPENCL_GPU=amd at launch time curl -O http://repo.radeon.com/amdgpu-install/22.20.5/ubuntu/jammy/amdgpu-install_22.20.50205-1_all.deb From fd4bb2b8ad09f1e646443dba95b974c6def46d4f Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sat, 14 Jan 2023 11:50:58 -0700 Subject: [PATCH 014/104] MMX binaries and lib paths. --- docker/dockerfile | 2 +- scripts/forks/mmx_install.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/dockerfile b/docker/dockerfile index 20857515d..d38672f5f 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -121,7 +121,7 @@ ENV FORKTOOLSDIR=/forktools ENV FORKTOOLSBLOCKCHAINDIRS=/ ENV FORKTOOLSHIDDENDIRS=/root -ENV PATH="${PATH}:/chia-blockchain/venv/bin:/forktools:/mmx-node/build" +ENV PATH="${PATH}:/chia-blockchain/venv/bin:/forktools:/mmx-node/bin" ENV TZ=Etc/UTC ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 diff --git a/scripts/forks/mmx_install.sh b/scripts/forks/mmx_install.sh index a1ecca3b7..0b51f6549 100644 --- a/scripts/forks/mmx_install.sh +++ b/scripts/forks/mmx_install.sh @@ -27,4 +27,8 @@ else popd rm -f mmx-binaries popd + tee /etc/ld.so.conf.d/30-mmx.conf >/dev/null < Date: Sun, 15 Jan 2023 17:17:20 -0700 Subject: [PATCH 015/104] Improve handling of missing plots checks. --- api/commands/chia_cli.py | 2 +- api/default_settings.py | 2 +- api/schedules/plots_check.py | 52 +++++++++++++++++++++----------- docker/dockerfile | 1 - scripts/dev/start-api.sh | 2 +- scripts/dev/start-web.sh | 2 +- scripts/start_machinaris.sh | 2 +- web/actions/chia.py | 24 +++++++++++++-- web/default_settings.py | 2 +- web/routes.py | 2 +- web/templates/farming/plots.html | 11 +++++-- 11 files changed, 70 insertions(+), 32 deletions(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index 2c278f579..0555aa7f9 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -253,7 +253,7 @@ def plot_check(blockchain, plot_path): proc = Popen("{0} plots check -g {1}".format(chia_binary, plot_path), universal_newlines=True, stdout=PIPE, stderr=STDOUT, shell=True) try: - outs, errs = proc.communicate(timeout=30) + outs, errs = proc.communicate(timeout=180) except TimeoutExpired: proc.kill() proc.communicate() diff --git a/api/default_settings.py b/api/default_settings.py index b303327ee..4066cb46a 100644 --- a/api/default_settings.py +++ b/api/default_settings.py @@ -48,7 +48,7 @@ class DefaultConfig: 'stat_container_mem_gib': 'sqlite:////root/.chia/machinaris/dbs/stat_container_mem_gib.db', 'stat_host_mem_pct': 'sqlite:////root/.chia/machinaris/dbs/stat_host_mem_pct.db', } - SQLALCHEMY_ECHO = True if 'FLASK_ENV' in os.environ and os.environ['FLASK_ENV'] == "development" else False + SQLALCHEMY_ECHO = True if 'FLASK_DEBUG' in os.environ and os.environ['FLASK_DEBUG'] == "development" else False ETAG_DISABLED = True # https://flask-smorest.readthedocs.io/en/latest/etag.html CONTROLLER_SCHEME = 'http' CONTROLLER_HOST = os.environ['controller_host'] if 'controller_host' in os.environ else 'localhost' diff --git a/api/schedules/plots_check.py b/api/schedules/plots_check.py index 7c0d074d5..1fbff2f79 100644 --- a/api/schedules/plots_check.py +++ b/api/schedules/plots_check.py @@ -19,6 +19,9 @@ from common.config import globals from api import app, utils +# If found no valid plots check for a plot, don't ask again for at least a day +REFRESH_INTERVAL_MINS = 60 * 24 + STATUS_FILE = '/root/.chia/plotman/status.json' ANALYZE_LOGS = '/root/.chia/plotman/analyze' CHECK_LOGS = '/root/.chia/plotman/checks' @@ -99,27 +102,27 @@ def request_analyze(plot_file, workers): plotter.hostname, plotter.latest_ping_result)) continue try: - app.logger.debug("Trying {0}:{1} for analyze....".format(plotter.hostname, plotter.port)) + app.logger.info("Trying {0}:{1} for analyze....".format(plotter.hostname, plotter.port)) payload = {"service":"plotting", "action":"analyze", "plot_file": plot_file } response = utils.send_worker_post(plotter, "/analysis/", payload, debug=False) if response.status_code == 200: return [plotter.hostname, plotter.displayname, response.content.decode('utf-8')] elif response.status_code == 404: - app.logger.debug("Plotter on {0}:{1} did not have plot log for {2}".format( + app.logger.info("Plotter on {0}:{1} did not have plot log for {2}".format( plotter.hostname, plotter.port, plot_file)) else: - app.logger.debug("Plotter on {0}:{1} returned an unexpected error: {2}".format( + app.logger.info("Plotter on {0}:{1} returned an unexpected error: {2}".format( plotter.hostname, plotter.port, response.status_code)) except Exception as ex: app.logger.error(str(ex)) return [None, None, None] -def set_check_status(workers, status, plot): - app.logger.debug("Checking for plot check of {0}".format(plot.plot_id)) +def set_check_status(workers, status, plot, refresh): check_log = CHECK_LOGS + '/' + plot.plot_id[:8] + '.log' check_status = None requested_status = False - if not os.path.exists(check_log): + if refresh or not os.path.exists(check_log): + app.logger.info("Requesting plot check of {0}".format(plot.plot_id)) requested_status = True [hostname, displayname, result] = request_check(plot, workers) if result: @@ -158,24 +161,24 @@ def set_check_status(workers, status, plot): def request_check(plot, workers): # Don't know which harvester might have the plot result so try them in-turn for harvester in workers: - app.logger.debug("{0}:{1} - {2} - {3}".format(harvester.hostname, harvester.port, harvester.blockchain, harvester.mode)) + #app.logger.info("{0}:{1} - {2} - {3}".format(harvester.hostname, harvester.port, harvester.blockchain, harvester.mode)) if harvester.mode == 'fullnode' or 'harvester' in harvester.mode: if harvester.latest_ping_result != "Responding": - app.logger.debug("Skipping check call to {0} as last ping was: {1}".format( \ + app.logger.info("Skipping check call to {0} as last ping was: {1}".format( \ harvester.hostname, harvester.latest_ping_result)) continue if harvester.hostname != plot.hostname or harvester.blockchain != plot.blockchain: - app.logger.debug("Skipping check call to {0} ({1}) for plot on {2} ({3})".format( \ + app.logger.info("Skipping check call to {0} ({1}) for plot on {2} ({3})".format( \ harvester.hostname, harvester.blockchain, plot.hostname, plot.blockchain)) continue try: - app.logger.debug("Trying {0}:{1} for plot check....".format(harvester.hostname, harvester.port)) + app.logger.info("Trying {0}:{1} for plot check....".format(harvester.hostname, harvester.port)) payload = {"service":"farming", "action":"check", "plot_file": plot.dir + '/' + plot.file } response = utils.send_worker_post(harvester, "/analysis/", payload, debug=True) if response.status_code == 200: return [harvester.hostname, harvester.displayname, response.content.decode('utf-8')] elif response.status_code == 404: - app.logger.debug("Harvester on {0}:{1} did not have plot check for {2}".format( + app.logger.info("Harvester on {0}:{1} did not have plot check for {2}".format( harvester.hostname, harvester.port, plot.file)) else: app.logger.info("Harvester on {0}:{1} returned an unexpected error: {2}".format( @@ -184,7 +187,15 @@ def request_check(plot, workers): app.logger.info(str(ex)) return [None, None, None] -def execute(): +last_refresh_time = None +def execute(plot_id=None): + global last_refresh_time + refresh = plot_id != None # Refresh if single plot is asked for from WebUI manual check + if not refresh: # Otherwise only perform refresh of missing/stale checks if interval has elapsed. + if not last_refresh_time or last_refresh_time <= \ + (datetime.datetime.now() - datetime.timedelta(minutes=REFRESH_INTERVAL_MINS)): + last_refresh_time = datetime.datetime.now() + refresh = True if 'plots_check_analyze_skip' in os.environ and os.environ['plots_check_analyze_skip'].lower() == 'true': app.logger.info("Skipping plots check and analyze as environment variable 'plots_check_analyze_skip' is present.") return @@ -194,13 +205,18 @@ def execute(): if not gc['is_controller']: return # Only controller should initiate check/analyze against other fullnodes/harvesters try: - os.makedirs(ANALYZE_LOGS) - os.makedirs(CHECK_LOGS) + if not os.path.isdir(ANALYZE_LOGS): + os.makedirs(ANALYZE_LOGS) + if not os.path.isdir(CHECK_LOGS): + os.makedirs(CHECK_LOGS) except Exception as ex: - app.logger.debug("Unable to create analyze and check folders in plotman. {0}".format(str(ex))) + app.logger.info("Unable to create analyze and check folders in plotman. {0}".format(str(ex))) workers = db.session.query(w.Worker) - plots = db.session.query(p.Plot).filter(or_(p.Plot.plot_check.is_(None), - p.Plot.plot_analyze.is_(None))).order_by(p.Plot.created_at.desc()).all() + if plot_id: + plots = db.session.query(p.Plot).filter(p.Plot.plot_id == plot_id).all() + else: + plots = db.session.query(p.Plot).filter(or_(p.Plot.plot_check.is_(None), + p.Plot.plot_analyze.is_(None))).order_by(p.Plot.created_at.desc()).all() status = open_status_json() requested_status_count = 0 #app.logger.info("Querying for plots...") @@ -209,7 +225,7 @@ def execute(): set_analyze_status(workers, status, plot) if os.environ['blockchains'][0] == 'mmx': continue # Skip over MMX plots as they can't be checked - if set_check_status(workers, status, plot): + if set_check_status(workers, status, plot, refresh): requested_status_count += 1 if requested_status_count > 5: # Only remote request `check plots` on at most 5 plots per cycle break diff --git a/docker/dockerfile b/docker/dockerfile index d38672f5f..0ebbe55b5 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -126,7 +126,6 @@ ENV TZ=Etc/UTC ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -ENV FLASK_ENV=production ENV XDG_CONFIG_HOME=/root/.chia ENV AUTO_PLOT=false ENV PLOTMAN_BRANCH=${PLOTMAN_BRANCH} diff --git a/scripts/dev/start-api.sh b/scripts/dev/start-api.sh index 4f1aa0391..ada057fb4 100644 --- a/scripts/dev/start-api.sh +++ b/scripts/dev/start-api.sh @@ -8,7 +8,7 @@ echo 'Starting Machinaris...' mkdir -p /root/.chia/machinaris/logs cd /code/machinaris -if [ $FLASK_ENV == "development" ]; +if [ -n $FLASK_DEBUG ]; then LOG_LEVEL='debug' RELOAD='--reload' diff --git a/scripts/dev/start-web.sh b/scripts/dev/start-web.sh index d9bdc7a21..dd1b4b0a3 100644 --- a/scripts/dev/start-web.sh +++ b/scripts/dev/start-web.sh @@ -13,7 +13,7 @@ if [ ! -d /code/machinaris/web/static/3rd_party ]; then JS_LIBS_BASEPATH=/code/machinaris/web/static/3rd_party . ./scripts/pull_3rd_party_libs.sh fi -if [ $FLASK_ENV == "development" ]; +if [ -n $FLASK_DEBUG ]; then LOG_LEVEL='debug' RELOAD='--reload' diff --git a/scripts/start_machinaris.sh b/scripts/start_machinaris.sh index 068c4c4b8..507c72805 100644 --- a/scripts/start_machinaris.sh +++ b/scripts/start_machinaris.sh @@ -43,7 +43,7 @@ fi mkdir -p /root/.chia/machinaris/config mkdir -p /root/.chia/machinaris/logs cd /machinaris -if [ $FLASK_ENV == "development" ]; +if [ -n $FLASK_DEBUG ]; then LOG_LEVEL='debug' RELOAD='--reload' diff --git a/web/actions/chia.py b/web/actions/chia.py index 99a8adc3f..61c037309 100644 --- a/web/actions/chia.py +++ b/web/actions/chia.py @@ -14,6 +14,7 @@ import socket import sys import time +import threading import traceback import urllib import yaml @@ -34,6 +35,7 @@ Blockchains, Connections, Keys, ChallengesChartData, Summaries from . import worker as wk from . import stats +from api.schedules import plots_check COLD_WALLET_ADDRESSES_FILE = '/root/.chia/machinaris/config/cold_wallet_addresses.json' WALLET_SETTINGS_FILE = '/root/.chia/machinaris/config/wallet_settings.json' @@ -75,6 +77,7 @@ def order_plots_query(args, query): def search_plots_query(search, query): app.logger.info("Searching all plots for: {0}".format(search)) + search = '%{0}%'.format(search) query = query.filter(or_( p.Plot.displayname.like(search), p.Plot.blockchain.like(search), @@ -382,11 +385,26 @@ def save_cold_wallet_addresses(blockchain, cold_wallet_addresses): return def check(plot_id): - check_file = '/root/.chia/plotman/checks/{0}.log'.format(plot_id) - if os.path.exists(check_file): + check_file = '/root/.chia/plotman/checks/{0}.log'.format(plot_id[:8]) + if os.path.exists(check_file) and os.path.getsize(check_file): with open(check_file, 'r+') as fp: return fp.read() - return make_response(_("Sorry, no plot check log found. Please wait for scheduled plot check to run."), 200) + try: + thread = threading.Thread(target=plots_check.execute, + kwargs={ + 'plot_id': plot_id + } + ) + thread.start() + except Exception as ex: + app.logger.info(traceback.format_exc()) + try: # Clear any stale status + plot = db.session.query(p.Plot).filter(p.Plot.plot_id == plot_id).first() + plot.plot_check = None + db.session.commit() + except Exception as ex: + app.logger.info(traceback.format_exc()) + return _("Plot check initiated for ID: %(plot_id)s. Please refresh in a few minutes.\nPlease note that all plots will be checked slowly in the background so you\ndon't need to check each one individually. Please be patient.", plot_id=plot_id) def get_transactions(lang, worker, blockchain, wallet_id): try: diff --git a/web/default_settings.py b/web/default_settings.py index 1338f1867..641698fa5 100644 --- a/web/default_settings.py +++ b/web/default_settings.py @@ -40,7 +40,7 @@ class DefaultConfig: 'stat_container_mem_gib': 'sqlite:////root/.chia/machinaris/dbs/stat_container_mem_gib.db', 'stat_host_mem_pct': 'sqlite:////root/.chia/machinaris/dbs/stat_host_mem_pct.db', } - SQLALCHEMY_ECHO = True if 'FLASK_ENV' in os.environ and os.environ['FLASK_ENV'] == "development" else False + SQLALCHEMY_ECHO = True if 'FLASK_DEBUG' in os.environ and os.environ['FLASK_DEBUG'] == "development" else False CONTROLLER_SCHEME = 'http' CONTROLLER_HOST = os.environ['controller_host'] if 'controller_host' in os.environ else 'localhost' CONTROLLER_PORT = os.environ['controller_api_port'] if 'controller_api_port' in os.environ else '8926' diff --git a/web/routes.py b/web/routes.py index be02ca370..f3e1d0538 100644 --- a/web/routes.py +++ b/web/routes.py @@ -224,7 +224,7 @@ def farming_plots(): return plotman.analyze(plot_id[:8]) elif request.args.get('check'): # Xhr with a plot_id plot_id = request.args.get('check') - return chia.check(plot_id[:8]) + return chia.check(plot_id) gc = globals.load() farmers = chia.load_farmers() plots = chia.load_plots_farming() diff --git a/web/templates/farming/plots.html b/web/templates/farming/plots.html index b74b25fb7..dac9e5631 100644 --- a/web/templates/farming/plots.html +++ b/web/templates/farming/plots.html @@ -348,11 +348,16 @@ plot_id = arr[1].trim(); if (status == 'GOOD') { return ''; - } else { + } else if (status == 'BAD') { return ''; + } else { + return ''; } - } - return ""; + } + if (row[1] == 'mmx') { + return ""; + } + return ''; } }, ], From 5aee7309d4b631b227515040c4b8935e13b26908 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 15 Jan 2023 20:29:08 -0700 Subject: [PATCH 016/104] Retry of failed plot checks daily. --- api/schedules/plots_check.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/api/schedules/plots_check.py b/api/schedules/plots_check.py index 1fbff2f79..4da041cd5 100644 --- a/api/schedules/plots_check.py +++ b/api/schedules/plots_check.py @@ -20,7 +20,7 @@ from api import app, utils # If found no valid plots check for a plot, don't ask again for at least a day -REFRESH_INTERVAL_MINS = 60 * 24 +RETRY_INTERVAL_MINS = 60 * 24 STATUS_FILE = '/root/.chia/plotman/status.json' ANALYZE_LOGS = '/root/.chia/plotman/analyze' @@ -187,15 +187,15 @@ def request_check(plot, workers): app.logger.info(str(ex)) return [None, None, None] -last_refresh_time = None +last_retry_time = None def execute(plot_id=None): - global last_refresh_time - refresh = plot_id != None # Refresh if single plot is asked for from WebUI manual check + global last_retry_time + refresh = # Refresh if single plot is asked for from WebUI manual check if not refresh: # Otherwise only perform refresh of missing/stale checks if interval has elapsed. - if not last_refresh_time or last_refresh_time <= \ - (datetime.datetime.now() - datetime.timedelta(minutes=REFRESH_INTERVAL_MINS)): - last_refresh_time = datetime.datetime.now() - refresh = True + if not last_retry_time or last_retry_time <= \ + (datetime.datetime.now() - datetime.timedelta(minutes=RETRY_INTERVAL_MINS)): + last_retry_time = datetime.datetime.now() # Delete any empty markers allowing a retry once a day. + os.system("/usr/bin/find /root/.chia/plotman/checks/ -type f -empty -print -delete") if 'plots_check_analyze_skip' in os.environ and os.environ['plots_check_analyze_skip'].lower() == 'true': app.logger.info("Skipping plots check and analyze as environment variable 'plots_check_analyze_skip' is present.") return @@ -225,7 +225,7 @@ def execute(plot_id=None): set_analyze_status(workers, status, plot) if os.environ['blockchains'][0] == 'mmx': continue # Skip over MMX plots as they can't be checked - if set_check_status(workers, status, plot, refresh): + if set_check_status(workers, status, plot, plot_id != None): requested_status_count += 1 if requested_status_count > 5: # Only remote request `check plots` on at most 5 plots per cycle break From c3d8ec6d8704dd9950b22bdfd0aefa85cd76623a Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 15 Jan 2023 20:34:13 -0700 Subject: [PATCH 017/104] Retry failed plots checks daily. --- api/schedules/plots_check.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/api/schedules/plots_check.py b/api/schedules/plots_check.py index 4da041cd5..c61488d3b 100644 --- a/api/schedules/plots_check.py +++ b/api/schedules/plots_check.py @@ -190,12 +190,10 @@ def request_check(plot, workers): last_retry_time = None def execute(plot_id=None): global last_retry_time - refresh = # Refresh if single plot is asked for from WebUI manual check - if not refresh: # Otherwise only perform refresh of missing/stale checks if interval has elapsed. - if not last_retry_time or last_retry_time <= \ - (datetime.datetime.now() - datetime.timedelta(minutes=RETRY_INTERVAL_MINS)): - last_retry_time = datetime.datetime.now() # Delete any empty markers allowing a retry once a day. - os.system("/usr/bin/find /root/.chia/plotman/checks/ -type f -empty -print -delete") + if not last_retry_time or last_retry_time <= \ + (datetime.datetime.now() - datetime.timedelta(minutes=RETRY_INTERVAL_MINS)): + last_retry_time = datetime.datetime.now() # Delete any empty markers allowing a retry once a day. + os.system("/usr/bin/find /root/.chia/plotman/checks/ -type f -empty -print -delete") if 'plots_check_analyze_skip' in os.environ and os.environ['plots_check_analyze_skip'].lower() == 'true': app.logger.info("Skipping plots check and analyze as environment variable 'plots_check_analyze_skip' is present.") return From b3d3dd946e8d0664edc8c17507d0d2aac0d900b2 Mon Sep 17 00:00:00 2001 From: Eric Kersey Date: Mon, 16 Jan 2023 03:09:34 -0500 Subject: [PATCH 018/104] add flax to blockchains using peer command --- api/commands/chia_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index 4e1cadc72..0ee30df04 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -37,7 +37,7 @@ WALLET_SETTINGS_FILE = '/root/.chia/machinaris/config/wallet_settings.json' # Blockchains which dropped compatibility with `show -c` commands around v1.6 -BLOCKCHAINS_USING_PEER_CMD = ['cactus', 'chia', 'chinilla', 'littlelambocoin', 'maize', 'one', 'tad'] +BLOCKCHAINS_USING_PEER_CMD = ['cactus', 'chia', 'chinilla', 'flax', 'littlelambocoin', 'maize', 'one', 'tad'] def load_farm_summary(blockchain): chia_binary = globals.get_blockchain_binary(blockchain) From c36538be7856a2718e54ee863aaff1dd9ed2ceee Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 16 Jan 2023 10:51:12 -0700 Subject: [PATCH 019/104] Latest BTCGreen and SHIBGreen. --- CHANGELOG.md | 3 +++ api/commands/chia_cli.py | 2 +- api/commands/websvcs.py | 12 ++++++------ api/schedules/plots_check.py | 25 ++++++++++++++++++++----- scripts/forks/btcgreen_install.sh | 4 ++-- scripts/forks/btcgreen_launch.sh | 6 ++++-- scripts/forks/shibgreen_install.sh | 4 ++-- scripts/forks/shibgreen_launch.sh | 6 ++++-- web/actions/chia.py | 2 +- 9 files changed, 43 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f64ec2f8..920ae3aa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,11 @@ All notable changes to this project will be documented in this file. The format - ## Updated - Fix missing Connections listing for Flax and MMX blockchains + - [BTCGreen](https://github.com/BTCgreen-Network/btcgreen-blockchain/releases/tag/1.7.0b) to v1.7.0b - [Chives](https://github.com/HiveProject2021/chives-blockchain/releases/tag/1.5.3) to v1.5.3, including staking. + - [SHIBGreen](https://github.com/BTCgreen-Network/shibgreen-blockchain/releases/tag/1.7.0b) to v1.7.0b - [Staicoin](https://github.com/STATION-I/stai-blockchain/releases/tag/1.3.0) to v1.3.0. Note, they require a fresh `config.yaml`. + ## Notes - diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index 0555aa7f9..0f4415c66 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -37,7 +37,7 @@ WALLET_SETTINGS_FILE = '/root/.chia/machinaris/config/wallet_settings.json' # Blockchains which dropped compatibility with `show -c` commands around v1.6 -BLOCKCHAINS_USING_PEER_CMD = ['cactus', 'chia', 'chinilla', 'flax', 'littlelambocoin', 'maize', 'one', 'tad'] +BLOCKCHAINS_USING_PEER_CMD = ['btcgreen', 'cactus', 'chia', 'chinilla', 'flax', 'littlelambocoin', 'maize', 'one', 'shibgreen', 'tad'] def load_farm_summary(blockchain): chia_binary = globals.get_blockchain_binary(blockchain) diff --git a/api/commands/websvcs.py b/api/commands/websvcs.py index aa3f8a4cf..d23225f4a 100644 --- a/api/commands/websvcs.py +++ b/api/commands/websvcs.py @@ -311,9 +311,9 @@ def request_posat_prices(debug=False): app.logger.error("Failed to request recent blockchain pricing from {0} due to {1}".format(url, str(ex))) return prices -def request_vayamos_prices(debug=False): +def request_infinex_prices(debug=False): prices = {} - url = "https://api.vayamos.cc/spot/markets" + url = "https://api.infinex.cc/spot/markets" try: app.logger.info("Requesting recent pricing for blockchains from {0}".format(url)) if debug: @@ -327,15 +327,15 @@ def request_vayamos_prices(debug=False): if not market['pair'].endswith('USDT'): continue # Skip other market pairs than USDT for blockchain in SUPPORTED_BLOCKCHAINS: - vayamos_symbol = globals.get_blockchain_symbol(blockchain).upper() - if market['base'] == vayamos_symbol: + infinex_symbol = globals.get_blockchain_symbol(blockchain).upper() + if market['base'] == infinex_symbol: #app.logger.info("VAYAMOS: {0} @ {1}".format(blockchain, market['price'])) try: prices[blockchain] = float(market['price']) except Exception as ex: traceback.print_exc() else: - app.logger.info("vayamos response was not success=True.") + app.logger.info("infinex response was not success=True.") except Exception as ex: app.logger.error("Failed to request recent blockchain pricing from {0} due to {1}".format(url, str(ex))) return prices @@ -373,7 +373,7 @@ def get_prices(): last_price_request_time = datetime.datetime.now() store_exchange_prices(prices, 'alltheblocks', request_atb_prices(), last_price_request_time) #store_exchange_prices(prices, 'posat', request_posat_prices(), last_price_request_time) # Dead as of Sept 2022 - store_exchange_prices(prices, 'vayamos', request_vayamos_prices(), last_price_request_time) + store_exchange_prices(prices, 'infinex', request_infinex_prices(), last_price_request_time) save_prices_cache(prices) except Exception as ex: app.logger.info("Failed to save current blockchain prices because {0}".format(str(ex))) diff --git a/api/schedules/plots_check.py b/api/schedules/plots_check.py index c61488d3b..8a3a27003 100644 --- a/api/schedules/plots_check.py +++ b/api/schedules/plots_check.py @@ -19,8 +19,8 @@ from common.config import globals from api import app, utils -# If found no valid plots check for a plot, don't ask again for at least a day -RETRY_INTERVAL_MINS = 60 * 24 +# If found no valid check for a plot, don't attempt again for at least a week +RETRY_INTERVAL_MINS = 60 * 24 * 7 STATUS_FILE = '/root/.chia/plotman/status.json' ANALYZE_LOGS = '/root/.chia/plotman/analyze' @@ -187,16 +187,31 @@ def request_check(plot, workers): app.logger.info(str(ex)) return [None, None, None] +def refresh_status_file_from_logs(): + status = open_status_json() + for key in list(status.keys()): + if (status[key]['check'] is None) and (status[key]['analyze'] is None): + app.logger.info("Deleting {0} both".format(key)) + del status[key] + elif status[key]['check'] is None: + app.logger.info("Deleting {0} check".format(key)) + del status[key]['check'] + elif status[key]['analyze'] is None: + app.logger.info("Deleting {0} analyze".format(key)) + del status[key]['analyze'] + write_status_json(status) + last_retry_time = None def execute(plot_id=None): global last_retry_time + if 'plots_check_analyze_skip' in os.environ and os.environ['plots_check_analyze_skip'].lower() == 'true': + app.logger.info("Skipping plots check and analyze as environment variable 'plots_check_analyze_skip' is present.") + return if not last_retry_time or last_retry_time <= \ (datetime.datetime.now() - datetime.timedelta(minutes=RETRY_INTERVAL_MINS)): last_retry_time = datetime.datetime.now() # Delete any empty markers allowing a retry once a day. os.system("/usr/bin/find /root/.chia/plotman/checks/ -type f -empty -print -delete") - if 'plots_check_analyze_skip' in os.environ and os.environ['plots_check_analyze_skip'].lower() == 'true': - app.logger.info("Skipping plots check and analyze as environment variable 'plots_check_analyze_skip' is present.") - return + refresh_status_file_from_logs() with app.app_context(): from api import db gc = globals.load() diff --git a/scripts/forks/btcgreen_install.sh b/scripts/forks/btcgreen_install.sh index 9918fb44d..f7528c48e 100644 --- a/scripts/forks/btcgreen_install.sh +++ b/scripts/forks/btcgreen_install.sh @@ -4,8 +4,8 @@ # BTCGREEN_BRANCH=$1 -# On 2022-08-20 -HASH=6599c84c1e91b90e91389caa37643b9586af589e +# On 2023-01-16 +HASH=5a719f85694c01cc3b56dfaba3f8f8b1c99aa681 if [ -z ${BTCGREEN_BRANCH} ]; then echo 'Skipping BTCGreen install as not requested.' diff --git a/scripts/forks/btcgreen_launch.sh b/scripts/forks/btcgreen_launch.sh index 7bfc0623f..c237878b4 100644 --- a/scripts/forks/btcgreen_launch.sh +++ b/scripts/forks/btcgreen_launch.sh @@ -34,12 +34,14 @@ if [ -f /root/.btcgreen/mainnet/config/config.yaml ]; then fi # Loop over provided list of key paths +label_num=0 for k in ${keys//:/ }; do if [[ "${k}" == "persistent" ]]; then echo "Not touching key directories." elif [ -s ${k} ]; then - echo "Adding key at path: ${k}" - btcgreen keys add -f ${k} > /dev/null + echo "Adding key #${label_num} at path: ${k}" + btcgreen keys add -l "key_${label_num}" -f ${k} > /dev/null + ((label_num=label_num+1)) fi done diff --git a/scripts/forks/shibgreen_install.sh b/scripts/forks/shibgreen_install.sh index 7999832e2..e7ff30a6f 100644 --- a/scripts/forks/shibgreen_install.sh +++ b/scripts/forks/shibgreen_install.sh @@ -4,8 +4,8 @@ # SHIBGREEN_BRANCH=$1 -# On 2022-08-20 -HASH=89a081f0163e52adcfe8a71ed384f90a9301d2f5 +# On 2023-01-16 +HASH=21ad1e45aa722bb3382d824d872ebbad26487cf3 if [ -z ${SHIBGREEN_BRANCH} ]; then echo 'Skipping SHIBGreen install as not requested.' diff --git a/scripts/forks/shibgreen_launch.sh b/scripts/forks/shibgreen_launch.sh index 73c3e9bce..0b1855031 100644 --- a/scripts/forks/shibgreen_launch.sh +++ b/scripts/forks/shibgreen_launch.sh @@ -34,12 +34,14 @@ if [ -f /root/.shibgreen/mainnet/config/config.yaml ]; then fi # Loop over provided list of key paths +label_num=0 for k in ${keys//:/ }; do if [[ "${k}" == "persistent" ]]; then echo "Not touching key directories." elif [ -s ${k} ]; then - echo "Adding key at path: ${k}" - shibgreen keys add -f ${k} > /dev/null + echo "Adding key #${label_num} at path: ${k}" + shibgreen keys add -l "key_${label_num}" -f ${k} > /dev/null + ((label_num=label_num+1)) fi done diff --git a/web/actions/chia.py b/web/actions/chia.py index 61c037309..f214ed6eb 100644 --- a/web/actions/chia.py +++ b/web/actions/chia.py @@ -404,7 +404,7 @@ def check(plot_id): db.session.commit() except Exception as ex: app.logger.info(traceback.format_exc()) - return _("Plot check initiated for ID: %(plot_id)s. Please refresh in a few minutes.\nPlease note that all plots will be checked slowly in the background so you\ndon't need to check each one individually. Please be patient.", plot_id=plot_id) + return _("Plot check initiated for ID: %(plot_id)s. Please refresh in a few minutes.\n\Note that all plots will be checked slowly in the background so you\ndon't need to check each one individually. Please be patient.", plot_id=plot_id) def get_transactions(lang, worker, blockchain, wallet_id): try: From e9474e2072074f246ee9331022dc594ce7e17d92 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 16 Jan 2023 11:01:55 -0700 Subject: [PATCH 020/104] Fix typo in message. --- web/actions/chia.py | 2 +- web/static/landings/en.txt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/actions/chia.py b/web/actions/chia.py index f214ed6eb..97c594545 100644 --- a/web/actions/chia.py +++ b/web/actions/chia.py @@ -404,7 +404,7 @@ def check(plot_id): db.session.commit() except Exception as ex: app.logger.info(traceback.format_exc()) - return _("Plot check initiated for ID: %(plot_id)s. Please refresh in a few minutes.\n\Note that all plots will be checked slowly in the background so you\ndon't need to check each one individually. Please be patient.", plot_id=plot_id) + return _("Plot check initiated for ID: %(plot_id)s. Please refresh in a few minutes.\n\nNote that all plots will be checked slowly in the background so you\ndon't need to check each one individually. Please be patient.", plot_id=plot_id) def get_transactions(lang, worker, blockchain, wallet_id): try: diff --git a/web/static/landings/en.txt b/web/static/landings/en.txt index ac536a417..72e7a193d 100644 --- a/web/static/landings/en.txt +++ b/web/static/landings/en.txt @@ -64,4 +64,5 @@ Lights out! Do your hard drives have bad sectors now? Lights out! Does the system still boot? Lights out! Lets replot again! 1337.png -You said 'Buy Crypto'! No... I said 'Bye Crypto' \ No newline at end of file +You said 'Buy Crypto'! No... I said 'Bye Crypto' +2023: Dust off your GPU, Chia is going PoW! :) \ No newline at end of file From 3d79f0731fd4a2e21547d9fa0f660ebdac27a88e Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 16 Jan 2023 11:27:26 -0700 Subject: [PATCH 021/104] Temporary fix for latest Babel version. --- api/__init__.py | 1 - web/__init__.py | 1 - 2 files changed, 2 deletions(-) diff --git a/api/__init__.py b/api/__init__.py index 17a9ecc7e..6c955d399 100644 --- a/api/__init__.py +++ b/api/__init__.py @@ -32,7 +32,6 @@ def set_sqlite_pragma(dbapi_connection, connection_record): app.config.from_envvar('API_SETTINGS_FILE', silent=True) babel = Babel(app) -@babel.localeselector def get_locale(): #for d in babel.translation_directories: # app.logger.info(d) diff --git a/web/__init__.py b/web/__init__.py index 282b16f44..ab1d763db 100644 --- a/web/__init__.py +++ b/web/__init__.py @@ -20,7 +20,6 @@ app.config.from_envvar('WEB_SETTINGS_FILE', silent=True) babel = Babel(app) -@babel.localeselector def get_locale(): try: accept = request.headers['Accept-Language'] From 89f9952321dbc575396bdd68e8aa8b80c70033f0 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 16 Jan 2023 13:30:14 -0700 Subject: [PATCH 022/104] Adding Ballcoin support. --- .github/workflows/develop-ballcoin.yaml | 50 +++++++++++ .github/workflows/main-ballcoin.yaml | 51 +++++++++++ .github/workflows/test-ballcoin.yaml | 49 +++++++++++ api/commands/chia_cli.py | 2 +- api/commands/websvcs.py | 2 +- common/config/blockchains.json | 17 ++++ config/chiadog/ballcoin.sample.yaml | 91 +++++++++++++++++++ docker/dockerfile | 2 + scripts/forks/ballcoin_install.sh | 28 ++++++ scripts/forks/ballcoin_launch.sh | 111 ++++++++++++++++++++++++ web/models/chia.py | 2 +- web/templates/worker_launch.html | 34 +++++--- 12 files changed, 425 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/develop-ballcoin.yaml create mode 100644 .github/workflows/main-ballcoin.yaml create mode 100644 .github/workflows/test-ballcoin.yaml create mode 100644 config/chiadog/ballcoin.sample.yaml create mode 100644 scripts/forks/ballcoin_install.sh create mode 100644 scripts/forks/ballcoin_launch.sh diff --git a/.github/workflows/develop-ballcoin.yaml b/.github/workflows/develop-ballcoin.yaml new file mode 100644 index 000000000..d91473a93 --- /dev/null +++ b/.github/workflows/develop-ballcoin.yaml @@ -0,0 +1,50 @@ +name: develop-ballcoin + +on: + push: + branches: + - 'develop' + +jobs: + docker: + runs-on: ubuntu-20.04 + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64 + push: true + build-args: | + "UBUNTU_VER=focal" + "MACHINARIS_STREAM=develop" + "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" + "BALLCOIN_BRANCH=main" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ballcoin:develop + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ballcoin:develop diff --git a/.github/workflows/main-ballcoin.yaml b/.github/workflows/main-ballcoin.yaml new file mode 100644 index 000000000..2672c7f76 --- /dev/null +++ b/.github/workflows/main-ballcoin.yaml @@ -0,0 +1,51 @@ +name: release-ballcoin + +on: + workflow_dispatch: + inputs: + version: + description: 'Release Version' + +jobs: + docker: + runs-on: ubuntu-20.04 + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64,linux/arm64 + push: true + build-args: | + "UBUNTU_VER=focal" + "MACHINARIS_STREAM=latest" + "BALLCOIN_BRANCH=main" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ballcoin:latest + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ballcoin:v${{ github.event.inputs.version }} + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ballcoin:latest + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ballcoin:v${{ github.event.inputs.version }} diff --git a/.github/workflows/test-ballcoin.yaml b/.github/workflows/test-ballcoin.yaml new file mode 100644 index 000000000..908b7df88 --- /dev/null +++ b/.github/workflows/test-ballcoin.yaml @@ -0,0 +1,49 @@ +name: test-ballcoin + +on: + push: + branches: + - 'integration' + +jobs: + docker: + runs-on: ubuntu-20.04 + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64,linux/arm64 + push: true + build-args: | + "UBUNTU_VER=focal" + "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" + "BALLCOIN_BRANCH=main" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ballcoin:test + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ballcoin:test diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index 0f4415c66..5ee80a86a 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -37,7 +37,7 @@ WALLET_SETTINGS_FILE = '/root/.chia/machinaris/config/wallet_settings.json' # Blockchains which dropped compatibility with `show -c` commands around v1.6 -BLOCKCHAINS_USING_PEER_CMD = ['btcgreen', 'cactus', 'chia', 'chinilla', 'flax', 'littlelambocoin', 'maize', 'one', 'shibgreen', 'tad'] +BLOCKCHAINS_USING_PEER_CMD = ['ballcoin', 'btcgreen', 'cactus', 'chia', 'chinilla', 'flax', 'littlelambocoin', 'maize', 'one', 'shibgreen', 'tad'] def load_farm_summary(blockchain): chia_binary = globals.get_blockchain_binary(blockchain) diff --git a/api/commands/websvcs.py b/api/commands/websvcs.py index d23225f4a..3b19d055e 100644 --- a/api/commands/websvcs.py +++ b/api/commands/websvcs.py @@ -451,7 +451,7 @@ def request_chain_statuses(statuses, debug=False): if resp.status_code == 200: result = json.loads(resp.text) for fork in result['forks']: - fork_name = fork['pathName'].replace('stai', 'staicoin') + fork_name = fork['pathName'].replace('stai', 'staicoin').replace('ballcoin', 'ball') peak_time = datetime.datetime.fromtimestamp(int(fork['peakTimestamp'])).strftime("%Y-%m-%d %H:%M:%S") statuses[fork_name] = { 'peak_height': fork['peakHeight'], 'peak_time': peak_time, } else: diff --git a/common/config/blockchains.json b/common/config/blockchains.json index 078eb814a..e875108b5 100644 --- a/common/config/blockchains.json +++ b/common/config/blockchains.json @@ -16,6 +16,23 @@ "discord_url": null, "website_url": "https://applecoin.in/" }, + "ballcoin": { + "name": "Ballcoin", + "symbol": "BALL", + "binary": "/ballcoin-blockchain/venv/bin/ball", + "network_path": "/root/.ball/mainnet", + "network_name": "mainnet", + "network_port": 38888, + "farmer_port": 38891, + "fullnode_rpc_port": 38885, + "worker_port": 8957, + "reward": 2.0, + "mojos_per_coin": 1000000000000, + "blocks_per_day": 4608, + "git_url": "https://github.com/ball-network/ballcoin-blockchain", + "discord_url": null, + "website_url": "https://ballcoin.top/" + }, "bpx": { "name": "BPX", "symbol": "BPX", diff --git a/config/chiadog/ballcoin.sample.yaml b/config/chiadog/ballcoin.sample.yaml new file mode 100644 index 000000000..048dd7557 --- /dev/null +++ b/config/chiadog/ballcoin.sample.yaml @@ -0,0 +1,91 @@ +# This is useful to differentiate multiple +# instances monitoring multiple harvesters +notification_title_prefix: '$HOSTNAME-ballcoin' +log_level: INFO +coin_name: 'ballcoin' +coin_symbol: 'ball' + +# Only one consumer can be enabled at a time, you can +# delete the section for the consumer which you aren't using +# DON'T CHANGE file_path IT'S ALREADY SET IN-CONTAINER FOR MACHINARIS! +chia_logs: + file_log_consumer: + enable: true + prefix: 'ball' + file_path: '~/.chia/ballcoin/mainnet/log/debug.log' + +# Enable this and chiadog will ping a remote server every 5 minutes +# That way you can know that the monitoring is running as expected +#keep_alive_monitor: +# enable_remote_ping: false +# ping_url: '' + +# Enable this and you'll receive a daily summary notification +# on your farm performance at the specified time of the day. +daily_stats: + enable: true + time_of_day: 21 + +# We support a lot of notifiers, please check the README for more +# information. You can delete the sections which you aren't using. +# You can also enable more than one notifier and send different +# notifications to each of them. E.g. enable daily_stats only to E-mail. +# If you enable wallet_events you'll get notifications anytime your +# wallet receives some XCH (e.g. farming reward). +notifier: + pushover: + enable: false + daily_stats: true + wallet_events: true + credentials: + api_token: 'dummy_token' + user_key: 'dummy_key' + telegram: + enable: false + daily_stats: true + wallet_events: true + credentials: + bot_token: 'dummy_bot_token' + chat_id: 'dummy_chat_id' + smtp: + enable: false + daily_stats: true + wallet_events: true + credentials: + sender: 'ballcoin@example.com' + sender_name: 'Machinaris' + recipient: 'you@example.com' + username_smtp: 'username' + password_smtp: 'password' + host: 'smtp.example.com' + port: 587 + script: + # DON'T CHANGE THIS SCRIPT NOTIFIER, IT'S USED BY MACHINARIS! + enable: true + daily_stats: true + wallet_events: true + script_path: '/root/.chia/chiadog/notifier.sh' + discord: + enable: false + daily_stats: true + wallet_events: true + credentials: + webhook_url: 'https://discord.com/api/webhooks/...' + slack: + enable: false + daily_stats: true + wallet_events: true + credentials: + webhook_url: 'https://hooks.slack.com/services/...' + mqtt: + enable: false + daily_stats: true + wallet_events: true + topic: ballcoin/ballcoindog/alert + qos: 1 + retain: false + credentials: + host: '192.168.0.10' + port: 8883 + username: '' + password: '' diff --git a/docker/dockerfile b/docker/dockerfile index 0ebbe55b5..cf302dabb 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -11,6 +11,7 @@ ARG FORKTOOLS_BRANCH=main ARG BLADEBIT_BRANCH=master ARG APPLE_BRANCH +ARG BALLCOIN_BRANCH ARG BPX_BRANCH ARG BTCGREEN_BRANCH ARG CACTUS_BRANCH @@ -50,6 +51,7 @@ WORKDIR /chia-blockchain # Install specific blockchain fork (based on branch enabled) + tools that depend on the fork RUN \ /usr/bin/bash /machinaris/scripts/forks/apple_install.sh ${APPLE_BRANCH} \ + && /usr/bin/bash /machinaris/scripts/forks/ballcoin_install.sh ${BALLCOIN_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/bpx_install.sh ${BPX_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/btcgreen_install.sh ${BTCGREEN_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/cactus_install.sh ${CACTUS_BRANCH} \ diff --git a/scripts/forks/ballcoin_install.sh b/scripts/forks/ballcoin_install.sh new file mode 100644 index 000000000..2a30295ec --- /dev/null +++ b/scripts/forks/ballcoin_install.sh @@ -0,0 +1,28 @@ +#!/bin/env bash +# +# Installs Ballcoin as per https://github.com/ball-network/ballcoin-blockchain +# + +BALLCOIN_BRANCH=$1 +# On 2023-01-16 +HASH=1c60346a5f75e9a489a5904db521336fd9d2d769 + +if [ -z ${BALLCOIN_BRANCH} ]; then + echo 'Skipping Ballcoin install as not requested.' +else + rm -rf /root/.cache + git clone --branch ${BALLCOIN_BRANCH} --single-branch https://github.com/ball-network/ballcoin-blockchain.git /ballcoin-blockchain + cd /ballcoin-blockchain + git submodule update --init mozilla-ca + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh + + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /ballcoin-blockchain /chia-blockchain + ln -s /ballcoin-blockchain/venv/bin/ballcoin /chia-blockchain/venv/bin/chia + fi +fi diff --git a/scripts/forks/ballcoin_launch.sh b/scripts/forks/ballcoin_launch.sh new file mode 100644 index 000000000..8ff06f600 --- /dev/null +++ b/scripts/forks/ballcoin_launch.sh @@ -0,0 +1,111 @@ +#!/bin/env bash +# +# Initialize Ballcoin service, depending on mode of system requested +# + +cd /ballcoin-blockchain + +. ./activate + +# Only the /root/.chia folder is volume-mounted so store ballcoin within +mkdir -p /root/.chia/ballcoin +rm -f /root/.ballcoin +ln -s /root/.chia/ballcoin /root/.ballcoin +rm -f /root/.ball +ln -s /root/.chia/ballcoin /root/.ball + +if [[ "${blockchain_db_download}" == 'true' ]] \ + && [[ "${mode}" == 'fullnode' ]] \ + && [[ ! -f /root/.ball/mainnet/db/blockchain_v1_mainnet.sqlite ]] \ + && [[ ! -f /root/.ball/mainnet/db/blockchain_v2_mainnet.sqlite ]]; then + echo "Sorry, Ballcoin does not offer a recent blockchain DB for download. Standard sync will happen over a few days." + echo "It is recommended to add some peer node connections on the Connections page of Machinaris." +fi + +mkdir -p /root/.ball/mainnet/log +ball init >> /root/.ball/mainnet/log/init.log 2>&1 + +echo 'Configuring Ballcoin...' +if [ -f /root/.ball/mainnet/config/config.yaml ]; then + sed -i 's/log_stdout: true/log_stdout: false/g' /root/.ball/mainnet/config/config.yaml + sed -i 's/log_level: WARNING/log_level: INFO/g' /root/.ball/mainnet/config/config.yaml + sed -i 's/localhost/127.0.0.1/g' /root/.ball/mainnet/config/config.yaml +fi + +# Loop over provided list of key paths +label_num=0 +for k in ${keys//:/ }; do + if [[ "${k}" == "persistent" ]]; then + echo "Not touching key directories." + elif [ -s ${k} ]; then + echo "Adding key #${label_num} at path: ${k}" + ball keys add -l "key_${label_num}" -f ${k} > /dev/null + ((label_num=label_num+1)) + fi +done + +# Loop over provided list of completed plot directories +IFS=':' read -r -a array <<< "$plots_dir" +joined=$(printf ", %s" "${array[@]}") +echo "Adding plot directories at: ${joined:1}" +for p in ${plots_dir//:/ }; do + ball plots add -d ${p} +done + +chmod 755 -R /root/.ball/mainnet/config/ssl/ &> /dev/null +ball init --fix-ssl-permissions > /dev/null + +# Start services based on mode selected. Default is 'fullnode' +if [[ ${mode} == 'fullnode' ]]; then + for k in ${keys//:/ }; do + while [[ "${k}" != "persistent" ]] && [[ ! -s ${k} ]]; do + echo 'Waiting for key to be created/imported into mnemonic.txt. See: http://localhost:8926' + sleep 10 # Wait 10 seconds before checking for mnemonic.txt presence + if [ -s ${k} ]; then + ball keys add -f ${k} + sleep 10 + fi + done + done + if [ -f /root/.chia/machinaris/config/wallet_settings.json ]; then + ball start farmer-no-wallet + else + ball start farmer + fi +elif [[ ${mode} =~ ^farmer.* ]]; then + if [ ! -f ~/.ball/mainnet/config/ssl/wallet/public_wallet.key ]; then + echo "No wallet key found, so not starting farming services. Please add your Chia mnemonic.txt to the ~/.machinaris/ folder and restart." + else + ball start farmer-only + fi +elif [[ ${mode} =~ ^harvester.* ]]; then + if [[ -z ${farmer_address} || -z ${farmer_port} ]]; then + echo "A farmer peer address and port are required." + exit + else + if [ ! -f /root/.ball/farmer_ca/private_ca.crt ]; then + mkdir -p /root/.ball/farmer_ca + response=$(curl --write-out '%{http_code}' --silent http://${farmer_address}:8957/certificates/?type=ballcoin --output /tmp/certs.zip) + if [ $response == '200' ]; then + unzip /tmp/certs.zip -d /root/.ball/farmer_ca + else + echo "Certificates response of ${response} from http://${farmer_address}:8957/certificates/?type=ballcoin. Is the fork's fullnode container running?" + fi + rm -f /tmp/certs.zip + fi + if [[ -f /root/.ball/farmer_ca/private_ca.crt ]] && [[ ! ${keys} == "persistent" ]]; then + ball init -c /root/.ball/farmer_ca 2>&1 > /root/.ball/mainnet/log/init.log + chmod 755 -R /root/.ball/mainnet/config/ssl/ &> /dev/null + ball init --fix-ssl-permissions > /dev/null + else + echo "Did not find your farmer's certificates within /root/.ball/farmer_ca." + echo "See: https://github.com/guydavis/machinaris/wiki/Workers#harvester" + fi + echo "Configuring farmer peer at ${farmer_address}:${farmer_port}" + ball configure --set-farmer-peer ${farmer_address}:${farmer_port} + ball configure --enable-upnp false + ball start harvester -r + fi +elif [[ ${mode} == 'plotter' ]]; then + echo "Starting in Plotter-only mode. Run Plotman from either CLI or WebUI." +fi diff --git a/web/models/chia.py b/web/models/chia.py index 46cd7cb42..a1134b724 100644 --- a/web/models/chia.py +++ b/web/models/chia.py @@ -432,7 +432,7 @@ def extract_wallet_id(self, lines): def link_to_wallet_transactions(self, blockchain, details): lines = [] - if globals.legacy_blockchain(blockchain) or blockchain in ['btcgreen', 'cryptodoge', 'flax', 'shibgreen', 'staicoin']: + if globals.legacy_blockchain(blockchain) or blockchain in ['cryptodoge']: for line in details.split('\n'): if 'wallet id' in line.lower(): lines.append("" + line.strip() + ":") diff --git a/web/templates/worker_launch.html b/web/templates/worker_launch.html index 4be358e4a..9c55f520e 100644 --- a/web/templates/worker_launch.html +++ b/web/templates/worker_launch.html @@ -158,6 +158,9 @@ if (blockchain == 'apple') { return 8947; } + if (blockchain == 'ballcoin') { + return 8957; + } if (blockchain == 'bpx') { return 8945; } @@ -252,6 +255,9 @@ if (blockchain == 'apple') { return 26667; } + if (blockchain == 'ballcoin') { + return 38891; + } if (blockchain == 'bpx') { return 27914; } @@ -621,6 +627,13 @@

{{_('Machinaris Worker - Launch Config')}}

Apple +
+ + +
@@ -642,6 +655,8 @@

{{_('Machinaris Worker - Launch Config')}}

Cactus
+ +
@@ -649,8 +664,6 @@

{{_('Machinaris Worker - Launch Config')}}

Chia
-
-
@@ -679,6 +692,8 @@

{{_('Machinaris Worker - Launch Config')}}

Cryptodoge
+
+
@@ -686,8 +701,6 @@

{{_('Machinaris Worker - Launch Config')}}

Ecostake
-
-
@@ -716,6 +729,8 @@

{{_('Machinaris Worker - Launch Config')}}

Gold
+
+
@@ -723,8 +738,6 @@

{{_('Machinaris Worker - Launch Config')}}

HDDCoin
-
-
@@ -753,6 +766,8 @@

{{_('Machinaris Worker - Launch Config')}}

MMX
+
+
@@ -760,8 +775,6 @@

{{_('Machinaris Worker - Launch Config')}}

Moon
-
-
@@ -790,6 +803,8 @@

{{_('Machinaris Worker - Launch Config')}}

Profit
+
+
@@ -797,8 +812,6 @@

{{_('Machinaris Worker - Launch Config')}}

SHIBGreen
-
-
@@ -827,7 +840,6 @@

{{_('Machinaris Worker - Launch Config')}}

Wheat
-
 
From c1686addae078b2fe11e2e571fd5d8854ddd9ce8 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 16 Jan 2023 13:44:01 -0700 Subject: [PATCH 023/104] Ballcoin is another Silicoin clone. --- api/commands/chia_cli.py | 2 +- scripts/forks/ballcoin_launch.sh | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index 5ee80a86a..0f4415c66 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -37,7 +37,7 @@ WALLET_SETTINGS_FILE = '/root/.chia/machinaris/config/wallet_settings.json' # Blockchains which dropped compatibility with `show -c` commands around v1.6 -BLOCKCHAINS_USING_PEER_CMD = ['ballcoin', 'btcgreen', 'cactus', 'chia', 'chinilla', 'flax', 'littlelambocoin', 'maize', 'one', 'shibgreen', 'tad'] +BLOCKCHAINS_USING_PEER_CMD = ['btcgreen', 'cactus', 'chia', 'chinilla', 'flax', 'littlelambocoin', 'maize', 'one', 'shibgreen', 'tad'] def load_farm_summary(blockchain): chia_binary = globals.get_blockchain_binary(blockchain) diff --git a/scripts/forks/ballcoin_launch.sh b/scripts/forks/ballcoin_launch.sh index 8ff06f600..a9b139612 100644 --- a/scripts/forks/ballcoin_launch.sh +++ b/scripts/forks/ballcoin_launch.sh @@ -18,7 +18,7 @@ if [[ "${blockchain_db_download}" == 'true' ]] \ && [[ "${mode}" == 'fullnode' ]] \ && [[ ! -f /root/.ball/mainnet/db/blockchain_v1_mainnet.sqlite ]] \ && [[ ! -f /root/.ball/mainnet/db/blockchain_v2_mainnet.sqlite ]]; then - echo "Sorry, Ballcoin does not offer a recent blockchain DB for download. Standard sync will happen over a few days." + echo "Sorry, Ballcoin does not offer a recent blockchain DB for download. Standard sync will happen over a few weeks." echo "It is recommended to add some peer node connections on the Connections page of Machinaris." fi @@ -33,14 +33,12 @@ if [ -f /root/.ball/mainnet/config/config.yaml ]; then fi # Loop over provided list of key paths -label_num=0 for k in ${keys//:/ }; do if [[ "${k}" == "persistent" ]]; then echo "Not touching key directories." elif [ -s ${k} ]; then - echo "Adding key #${label_num} at path: ${k}" - ball keys add -l "key_${label_num}" -f ${k} > /dev/null - ((label_num=label_num+1)) + echo "Adding key at path: ${k}" + ball keys add -f ${k} > /dev/null fi done From 33de05202e01a1887e6d8f6600e745121f19ce55 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 16 Jan 2023 14:24:52 -0700 Subject: [PATCH 024/104] Fix for Ballcoin. --- CHANGELOG.md | 1 + common/config/globals.py | 2 +- web/__init__.py | 4 ++-- web/routes.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 920ae3aa9..2b925fa4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. The format ## [Unreleased] ### Added - [MMX Cuda Plotter](https://github.com/madMAx43v3r/mmx-binaries/tree/master/mmx-cuda-plotter) - currently only at commandline: `cuda_plot_kXX` + - [Ballcoin](https://github.com/ball-network/ballcoin-blockchain) blockchain at version 1.6.0, another slow Silicoin fork. ## Changed - ## Updated diff --git a/common/config/globals.py b/common/config/globals.py index b8d2fb820..2312a7762 100644 --- a/common/config/globals.py +++ b/common/config/globals.py @@ -462,7 +462,7 @@ def get_alltheblocks_name(blockchain): return blockchain def legacy_blockchain(blockchain): - return blockchain in ['ecostake', 'flora', 'gold', 'hddcoin', 'mint', 'nchain', 'petroleum', 'profit', 'silicoin', 'stor'] + return blockchain in ['ballcoin', 'coffee', 'ecostake', 'flora', 'greenbtc', 'gold', 'hddcoin', 'mint', 'nchain', 'petroleum', 'profit', 'silicoin', 'stor'] last_mmx_reward = None last_mmx_reward_load_time = None diff --git a/web/__init__.py b/web/__init__.py index ab1d763db..e494f8259 100644 --- a/web/__init__.py +++ b/web/__init__.py @@ -30,9 +30,9 @@ def get_locale(): alternative = "{0}_{1}".format(first_accept, first_accept.upper()) if alternative in app.config['LANGUAGES']: return alternative - app.logger.debug("INIT: Accept-Language: {0} ----> matched locale: {1}".format(accept, match)) + app.logger.info("INIT: Accept-Language: {0} ----> matched locale: {1}".format(accept, match)) except: - app.logger.debug("INIT: Request had no Accept-Language, returning default locale of en.") + app.logger.info("INIT: Request had no Accept-Language, returning default locale of en.") return request.accept_languages.best_match(app.config['LANGUAGES']) @event.listens_for(Engine, "connect") diff --git a/web/routes.py b/web/routes.py index f3e1d0538..f3a674ef8 100644 --- a/web/routes.py +++ b/web/routes.py @@ -28,7 +28,7 @@ def get_lang(request): first_accept = accept.split(',')[0] # Like 'nl' alternative = "{0}_{1}".format(first_accept, first_accept.upper()) if alternative in app.config['LANGUAGES']: - app.logger.info("LOCALE: Accept-Language: {0} ----> using locale: {1}".format(accept, match)) + app.logger.info("LOCALE: Accept-Language: {0} ----> using locale: {1}".format(accept, alternative)) return alternative if match: app.logger.info("LOCALE: Accept-Language: {0} ----> matched locale: {1}".format(accept, match)) From 9bc7b561589f02eb202fc3c8e85c673652ede873 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 16 Jan 2023 14:40:15 -0700 Subject: [PATCH 025/104] Fix for Flask-Babel upgrade. --- api/__init__.py | 3 ++- web/__init__.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/__init__.py b/api/__init__.py index 6c955d399..fe7528634 100644 --- a/api/__init__.py +++ b/api/__init__.py @@ -30,7 +30,6 @@ def set_sqlite_pragma(dbapi_connection, connection_record): app.config.from_object(DefaultConfig) # Override config with optional settings file app.config.from_envvar('API_SETTINGS_FILE', silent=True) -babel = Babel(app) def get_locale(): #for d in babel.translation_directories: @@ -38,6 +37,8 @@ def get_locale(): #app.logger.info("API=> Returning locale: {0}".format(request.accept_languages.best_match(app.config['LANGUAGES']))) return request.accept_languages.best_match(app.config['LANGUAGES']) +babel = Babel(app, locale_selector=get_locale,) + from common.extensions.database import db migrate = Migrate(app, db) diff --git a/web/__init__.py b/web/__init__.py index e494f8259..a8f45655d 100644 --- a/web/__init__.py +++ b/web/__init__.py @@ -18,7 +18,6 @@ app.config.from_object(DefaultConfig) # Override config with optional settings file app.config.from_envvar('WEB_SETTINGS_FILE', silent=True) -babel = Babel(app) def get_locale(): try: @@ -35,6 +34,8 @@ def get_locale(): app.logger.info("INIT: Request had no Accept-Language, returning default locale of en.") return request.accept_languages.best_match(app.config['LANGUAGES']) +babel = Babel(app, locale_selector=get_locale,) + @event.listens_for(Engine, "connect") def set_sqlite_pragma(dbapi_connection, connection_record): cursor = dbapi_connection.cursor() From 3dfa3f09d63009825946d3c4bd38dc6abea43816 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 16 Jan 2023 19:52:38 -0700 Subject: [PATCH 026/104] Optionally run a Chives masternode. --- CHANGELOG.md | 4 +--- docker/dockerfile | 1 + scripts/forks/chives_launch.sh | 3 +++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b925fa4c..2c57f384b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,14 +7,12 @@ All notable changes to this project will be documented in this file. The format - [MMX Cuda Plotter](https://github.com/madMAx43v3r/mmx-binaries/tree/master/mmx-cuda-plotter) - currently only at commandline: `cuda_plot_kXX` - [Ballcoin](https://github.com/ball-network/ballcoin-blockchain) blockchain at version 1.6.0, another slow Silicoin fork. ## Changed - - -## Updated - Fix missing Connections listing for Flax and MMX blockchains +## Updated - [BTCGreen](https://github.com/BTCgreen-Network/btcgreen-blockchain/releases/tag/1.7.0b) to v1.7.0b - [Chives](https://github.com/HiveProject2021/chives-blockchain/releases/tag/1.5.3) to v1.5.3, including staking. - [SHIBGreen](https://github.com/BTCgreen-Network/shibgreen-blockchain/releases/tag/1.7.0b) to v1.7.0b - [Staicoin](https://github.com/STATION-I/stai-blockchain/releases/tag/1.3.0) to v1.3.0. Note, they require a fresh `config.yaml`. - ## Notes - diff --git a/docker/dockerfile b/docker/dockerfile index cf302dabb..960647fa3 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -96,6 +96,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 chives_masternode="false" # The single blockchain to run: chia, flax, nchain, hddcoin, chives, etc ENV blockchains="chia" # If provided then these optional 3 public keys will be set in your plotman.yaml diff --git a/scripts/forks/chives_launch.sh b/scripts/forks/chives_launch.sh index 01b702d2a..86ce658c6 100644 --- a/scripts/forks/chives_launch.sh +++ b/scripts/forks/chives_launch.sh @@ -64,6 +64,9 @@ if [[ ${mode} == 'fullnode' ]]; then else chives start farmer fi + if [[ ${chives_masternode} == "true" ]]; then + chives start masternode + fi elif [[ ${mode} =~ ^farmer.* ]]; then if [ ! -f ~/.chives/mainnet/config/ssl/wallet/public_wallet.key ]; then echo "No wallet key found, so not starting farming services. Please add your Chia mnemonic.txt to the ~/.machinaris/ folder and restart." From dedb33452ae595a2ad3bb8813c445fc2a5484dc9 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 16 Jan 2023 20:16:11 -0700 Subject: [PATCH 027/104] Masternode seems to crash if not delay launched. --- scripts/forks/chives_launch.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/forks/chives_launch.sh b/scripts/forks/chives_launch.sh index 86ce658c6..139a58d27 100644 --- a/scripts/forks/chives_launch.sh +++ b/scripts/forks/chives_launch.sh @@ -63,9 +63,10 @@ if [[ ${mode} == 'fullnode' ]]; then chives start farmer-no-wallet else chives start farmer - fi - if [[ ${chives_masternode} == "true" ]]; then - chives start masternode + if [[ ${chives_masternode} == "true" ]]; then + echo "Starting Chives masternode in a minute..." + sleep 60 && chives start masternode + fi fi elif [[ ${mode} =~ ^farmer.* ]]; then if [ ! -f ~/.chives/mainnet/config/ssl/wallet/public_wallet.key ]; then From 5c357f97c7d05f19c7a8a84a1826cdef786140df Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 17 Jan 2023 19:57:29 -0700 Subject: [PATCH 028/104] Adding pipscoin. --- .github/workflows/develop-pipscoin.yaml | 50 +++++++++++ .github/workflows/main-pipscoin.yaml | 51 +++++++++++ .github/workflows/test-pipscoin.yaml | 49 +++++++++++ CHANGELOG.md | 5 +- api/commands/chia_cli.py | 2 +- api/commands/rpc.py | 35 ++++++++ common/config/blockchains.json | 17 ++++ config/chiadog/pipscoin.sample.yaml | 91 ++++++++++++++++++++ docker/dockerfile | 2 + scripts/forks/pipscoin_install.sh | 30 +++++++ scripts/forks/pipscoin_launch.sh | 108 ++++++++++++++++++++++++ scripts/worker_port_warning.sh | 18 ++++ web/actions/warnings.py | 5 ++ web/routes.py | 5 +- web/templates/alerts.html | 2 +- web/templates/farming/warnings.html | 15 +++- web/templates/worker_launch.html | 23 ++++- 17 files changed, 500 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/develop-pipscoin.yaml create mode 100644 .github/workflows/main-pipscoin.yaml create mode 100644 .github/workflows/test-pipscoin.yaml create mode 100644 config/chiadog/pipscoin.sample.yaml create mode 100644 scripts/forks/pipscoin_install.sh create mode 100644 scripts/forks/pipscoin_launch.sh diff --git a/.github/workflows/develop-pipscoin.yaml b/.github/workflows/develop-pipscoin.yaml new file mode 100644 index 000000000..25262a20f --- /dev/null +++ b/.github/workflows/develop-pipscoin.yaml @@ -0,0 +1,50 @@ +name: develop-pipscoin + +on: + push: + branches: + - 'develop' + +jobs: + docker: + runs-on: ubuntu-22.04 + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64 + push: true + build-args: | + "UBUNTU_VER=jammy" + "MACHINARIS_STREAM=develop" + "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" + "PIPSCOIN_BRANCH=main" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-pipscoin:develop + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-pipscoin:develop diff --git a/.github/workflows/main-pipscoin.yaml b/.github/workflows/main-pipscoin.yaml new file mode 100644 index 000000000..999d9a963 --- /dev/null +++ b/.github/workflows/main-pipscoin.yaml @@ -0,0 +1,51 @@ +name: release-pipscoin + +on: + workflow_dispatch: + inputs: + version: + description: 'Release Version' + +jobs: + docker: + runs-on: ubuntu-22.04 + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64,linux/arm64 + push: true + build-args: | + "UBUNTU_VER=jammy" + "MACHINARIS_STREAM=latest" + "PIPSCOIN_BRANCH=main" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-pipscoin:latest + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-pipscoin:v${{ github.event.inputs.version }} + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-pipscoin:latest + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-pipscoin:v${{ github.event.inputs.version }} diff --git a/.github/workflows/test-pipscoin.yaml b/.github/workflows/test-pipscoin.yaml new file mode 100644 index 000000000..7b9896d95 --- /dev/null +++ b/.github/workflows/test-pipscoin.yaml @@ -0,0 +1,49 @@ +name: test-pipscoin + +on: + push: + branches: + - 'integration' + +jobs: + docker: + runs-on: ubuntu-22.04 + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64,linux/arm64 + push: true + build-args: | + "UBUNTU_VER=jammy" + "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" + "PIPSCOIN_BRANCH=main" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-pipscoin:test + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-pipscoin:test diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c57f384b..c83f523ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,9 @@ All notable changes to this project will be documented in this file. The format ## [Unreleased] ### Added - - [MMX Cuda Plotter](https://github.com/madMAx43v3r/mmx-binaries/tree/master/mmx-cuda-plotter) - currently only at commandline: `cuda_plot_kXX` + - [MMX Cuda Plotter](https://github.com/madMAx43v3r/mmx-binaries/tree/master/mmx-cuda-plotter) - currently only at commandline: `cuda_plot_kXX`. - [Ballcoin](https://github.com/ball-network/ballcoin-blockchain) blockchain at version 1.6.0, another slow Silicoin fork. + - [Pipscoin](https://github.com/Pipscoin-Network/pipscoin-blockchain") blockchain at version 1.7.0. ## Changed - Fix missing Connections listing for Flax and MMX blockchains ## Updated @@ -14,7 +15,7 @@ All notable changes to this project will be documented in this file. The format - [SHIBGreen](https://github.com/BTCgreen-Network/shibgreen-blockchain/releases/tag/1.7.0b) to v1.7.0b - [Staicoin](https://github.com/STATION-I/stai-blockchain/releases/tag/1.3.0) to v1.3.0. Note, they require a fresh `config.yaml`. ## Notes - - + - Support for new Chia forks DOES NOT imply my endorsement for them. Only run those you are comfortable with. ## [0.8.6] - 2023-01-03 ### Added diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index 0f4415c66..7b59c062a 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -37,7 +37,7 @@ WALLET_SETTINGS_FILE = '/root/.chia/machinaris/config/wallet_settings.json' # Blockchains which dropped compatibility with `show -c` commands around v1.6 -BLOCKCHAINS_USING_PEER_CMD = ['btcgreen', 'cactus', 'chia', 'chinilla', 'flax', 'littlelambocoin', 'maize', 'one', 'shibgreen', 'tad'] +BLOCKCHAINS_USING_PEER_CMD = ['btcgreen', 'cactus', 'chia', 'chinilla', 'flax', 'littlelambocoin', 'maize', 'one', 'pipscoin', 'shibgreen', 'tad'] def load_farm_summary(blockchain): chia_binary = globals.get_blockchain_binary(blockchain) diff --git a/api/commands/rpc.py b/api/commands/rpc.py index 70dc80623..562421e8b 100644 --- a/api/commands/rpc.py +++ b/api/commands/rpc.py @@ -22,6 +22,13 @@ from apple.util.default_root import DEFAULT_ROOT_PATH from apple.util.ints import uint16 from apple.util.config import load_config as load_fork_config +elif blockchain == "ballcoin": + from ballcoin.rpc.full_node_rpc_client import FullNodeRpcClient + from ballcoin.rpc.farmer_rpc_client import FarmerRpcClient + from ballcoin.rpc.wallet_rpc_client import WalletRpcClient + from ballcoin.util.default_root import DEFAULT_ROOT_PATH + from ballcoin.util.ints import uint16 + from ballcoin.util.config import load_config as load_fork_config elif blockchain == "bpx": from chia.rpc.full_node_rpc_client import FullNodeRpcClient from chia.rpc.farmer_rpc_client import FarmerRpcClient @@ -64,6 +71,13 @@ from chives.util.default_root import DEFAULT_ROOT_PATH from chives.util.ints import uint16 from chives.util.config import load_config as load_fork_config +elif blockchain == "coffee": + from coffee.rpc.full_node_rpc_client import FullNodeRpcClient + from coffee.rpc.farmer_rpc_client import FarmerRpcClient + from coffee.rpc.wallet_rpc_client import WalletRpcClient + from coffee.util.default_root import DEFAULT_ROOT_PATH + from coffee.util.ints import uint16 + from coffee.util.config import load_config as load_fork_config elif blockchain == "cryptodoge": from cryptodoge.rpc.full_node_rpc_client import FullNodeRpcClient from cryptodoge.rpc.farmer_rpc_client import FarmerRpcClient @@ -92,6 +106,13 @@ from chia.util.default_root import DEFAULT_ROOT_PATH from chia.util.ints import uint16 from chia.util.config import load_config as load_fork_config +elif blockchain == "greenbtc": + from greenbtc.rpc.full_node_rpc_client import FullNodeRpcClient + from greenbtc.rpc.farmer_rpc_client import FarmerRpcClient + from greenbtc.rpc.wallet_rpc_client import WalletRpcClient + from greenbtc.util.default_root import DEFAULT_ROOT_PATH + from greenbtc.util.ints import uint16 + from greenbtc.util.config import load_config as load_fork_config elif blockchain == "gold": from chia.rpc.full_node_rpc_client import FullNodeRpcClient from chia.rpc.farmer_rpc_client import FarmerRpcClient @@ -143,6 +164,13 @@ from chia.util.default_root import DEFAULT_ROOT_PATH from chia.util.ints import uint16 from chia.util.config import load_config as load_fork_config +elif blockchain == "one": + from one.rpc.full_node_rpc_client import FullNodeRpcClient + from one.rpc.farmer_rpc_client import FarmerRpcClient + from one.rpc.wallet_rpc_client import WalletRpcClient + from one.util.default_root import DEFAULT_ROOT_PATH + from one.util.ints import uint16 + from one.util.config import load_config as load_fork_config elif blockchain == "petroleum": from chia.rpc.full_node_rpc_client import FullNodeRpcClient from chia.rpc.farmer_rpc_client import FarmerRpcClient @@ -150,6 +178,13 @@ from chia.util.default_root import DEFAULT_ROOT_PATH from chia.util.ints import uint16 from chia.util.config import load_config as load_fork_config +elif blockchain == "pipscoin": + from pipscoin.rpc.full_node_rpc_client import FullNodeRpcClient + from pipscoin.rpc.farmer_rpc_client import FarmerRpcClient + from pipscoin.rpc.wallet_rpc_client import WalletRpcClient + from pipscoin.util.default_root import DEFAULT_ROOT_PATH + from pipscoin.util.ints import uint16 + from pipscoin.util.config import load_config as load_fork_config elif blockchain == "profit": from profit.rpc.full_node_rpc_client import FullNodeRpcClient from profit.rpc.farmer_rpc_client import FarmerRpcClient diff --git a/common/config/blockchains.json b/common/config/blockchains.json index e875108b5..97f719dc1 100644 --- a/common/config/blockchains.json +++ b/common/config/blockchains.json @@ -405,6 +405,23 @@ "discord_url": "https://discord.gg/7bFQxmtjHx", "website_url": "https://petroleum.farm/" }, + "pipscoin": { + "name": "Pipscoin", + "symbol": "PIPS" , + "binary": "/pipscoin-blockchain/venv/bin/pipscoin", + "network_path": "/root/.pipscoin/mainnet", + "network_name": "mainnet", + "network_port": 7477, + "farmer_port": 16339, + "fullnode_rpc_port": 18868, + "worker_port": 8958, + "reward": 1.0, + "mojos_per_coin": 1000000000000, + "blocks_per_day": 4608, + "git_url": "https://github.com/Pipscoin-Network/pipscoin-blockchain", + "discord_url": "https://discord.gg/T8taazt7Pf", + "website_url": "https://www.pipscoin.net/" + }, "profit": { "name": "Profit", "symbol": "PROFIT" , diff --git a/config/chiadog/pipscoin.sample.yaml b/config/chiadog/pipscoin.sample.yaml new file mode 100644 index 000000000..9bfcb5bd7 --- /dev/null +++ b/config/chiadog/pipscoin.sample.yaml @@ -0,0 +1,91 @@ +# This is useful to differentiate multiple +# instances monitoring multiple harvesters +notification_title_prefix: '$HOSTNAME-pipscoin' +log_level: INFO +coin_name: 'pipscoin' +coin_symbol: 'pips' + +# Only one consumer can be enabled at a time, you can +# delete the section for the consumer which you aren't using +# DON'T CHANGE file_path IT'S ALREADY SET IN-CONTAINER FOR MACHINARIS! +chia_logs: + file_log_consumer: + enable: true + prefix: 'chia' + file_path: '~/.chia/pipscoin/mainnet/log/debug.log' + +# Enable this and chiadog will ping a remote server every 5 minutes +# That way you can know that the monitoring is running as expected +#keep_alive_monitor: +# enable_remote_ping: false +# ping_url: '' + +# Enable this and you'll receive a daily summary notification +# on your farm performance at the specified time of the day. +daily_stats: + enable: true + time_of_day: 21 + +# We support a lot of notifiers, please check the README for more +# information. You can delete the sections which you aren't using. +# You can also enable more than one notifier and send different +# notifications to each of them. E.g. enable daily_stats only to E-mail. +# If you enable wallet_events you'll get notifications anytime your +# wallet receives some XCH (e.g. farming reward). +notifier: + pushover: + enable: false + daily_stats: true + wallet_events: true + credentials: + api_token: 'dummy_token' + user_key: 'dummy_key' + telegram: + enable: false + daily_stats: true + wallet_events: true + credentials: + bot_token: 'dummy_bot_token' + chat_id: 'dummy_chat_id' + smtp: + enable: false + daily_stats: true + wallet_events: true + credentials: + sender: 'pipscoin@example.com' + sender_name: 'Machinaris' + recipient: 'you@example.com' + username_smtp: 'username' + password_smtp: 'password' + host: 'smtp.example.com' + port: 587 + script: + # DON'T CHANGE THIS SCRIPT NOTIFIER, IT'S USED BY MACHINARIS! + enable: true + daily_stats: true + wallet_events: true + script_path: '/root/.chia/chiadog/notifier.sh' + discord: + enable: false + daily_stats: true + wallet_events: true + credentials: + webhook_url: 'https://discord.com/api/webhooks/...' + slack: + enable: false + daily_stats: true + wallet_events: true + credentials: + webhook_url: 'https://hooks.slack.com/services/...' + mqtt: + enable: false + daily_stats: true + wallet_events: true + topic: pipscoin/pipscoindog/alert + qos: 1 + retain: false + credentials: + host: '192.168.0.10' + port: 8883 + username: '' + password: '' diff --git a/docker/dockerfile b/docker/dockerfile index 960647fa3..9bcea5a16 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -34,6 +34,7 @@ ARG MOON_BRANCH ARG NCHAIN_BRANCH ARG ONE_BRANCH ARG PETROLEUM_BRANCH +ARG PIPSCOIN_BRANCH ARG PROFIT_BRANCH ARG SHIBGREEN_BRANCH ARG SILICOIN_BRANCH @@ -74,6 +75,7 @@ RUN \ && /usr/bin/bash /machinaris/scripts/forks/nchain_install.sh ${NCHAIN_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/one_install.sh ${ONE_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/petroleum_install.sh ${PETROLEUM_BRANCH} \ + && /usr/bin/bash /machinaris/scripts/forks/pipscoin_install.sh ${PIPSCOIN_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/profit_install.sh ${PROFIT_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/shibgreen_install.sh ${SHIBGREEN_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/silicoin_install.sh ${SILICOIN_BRANCH} \ diff --git a/scripts/forks/pipscoin_install.sh b/scripts/forks/pipscoin_install.sh new file mode 100644 index 000000000..7972039f1 --- /dev/null +++ b/scripts/forks/pipscoin_install.sh @@ -0,0 +1,30 @@ +#!/bin/env bash +# +# Installs Pipscoin as per https://github.com/Pipscoin-Network/pipscoin-blockchain" +# + +PIPSCOIN_BRANCH=$1 +# On 2023-01-02 +HASH=29854541a4a6b2b9bc4d423302642e10ddf8fc77 + +if [ -z ${PIPSCOIN_BRANCH} ]; then + echo 'Skipping Pipscoin install as not requested.' +else + git clpipscoin --branch ${PIPSCOIN_BRANCH} --recurse-submodules https://github.com/Pipscoin-Network/pipscoin-blockchain.git /pipscoin-blockchain + cd /pipscoin-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + sed -e 's/^ self.log.debug($/ self.log.info(/g' pipscoin/wallet/wallet_state_manager.py + /usr/bin/sh ./install.sh + + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /pipscoin-blockchain /chia-blockchain + ln -s /pipscoin-blockchain/venv/bin/pipscoin /chia-blockchain/venv/bin/chia + fi +fi diff --git a/scripts/forks/pipscoin_launch.sh b/scripts/forks/pipscoin_launch.sh new file mode 100644 index 000000000..83dae8595 --- /dev/null +++ b/scripts/forks/pipscoin_launch.sh @@ -0,0 +1,108 @@ +#!/bin/env bash +# +# Initialize Pipscoin service, depending on mode of system requested +# + +cd /pipscoin-blockchain + +. ./activate + +# Only the /root/.chia folder is volume-mounted so store pipscoin within +mkdir -p /root/.chia/pipscoin +rm -f /root/.pipscoin +ln -s /root/.chia/pipscoin /root/.pipscoin + +if [[ "${blockchain_db_download}" == 'true' ]] \ + && [[ "${mode}" == 'fullnode' ]] \ + && [[ ! -f /root/.pipscoin/mainnet/db/blockchain_v1_mainnet.sqlite ]] \ + && [[ ! -f /root/.pipscoin/mainnet/db/blockchain_v2_mainnet.sqlite ]]; then + echo "Sorry, Pipscoin does not offer a recent blockchain DB for download via script. Standard sync will happen over a few days." + echo "It is recommended to add some peer node connections on the Connections page of Machinaris." +fi + +mkdir -p /root/.pipscoin/mainnet/log +pipscoin init >> /root/.pipscoin/mainnet/log/init.log 2>&1 + +echo 'Configuring Pipscoin...' +if [ -f /root/.pipscoin/mainnet/config/config.yaml ]; then + sed -i 's/log_stdout: true/log_stdout: false/g' /root/.pipscoin/mainnet/config/config.yaml + sed -i 's/log_level: WARNING/log_level: INFO/g' /root/.pipscoin/mainnet/config/config.yaml + sed -i 's/localhost/127.0.0.1/g' /root/.pipscoin/mainnet/config/config.yaml +fi + +# Loop over provided list of key paths +label_num=0 +for k in ${keys//:/ }; do + if [[ "${k}" == "persistent" ]]; then + echo "Not touching key directories." + elif [ -s ${k} ]; then + echo "Adding key #${label_num} at path: ${k}" + pipscoin keys add -l "key_${label_num}" -f ${k} > /dev/null + ((label_num=label_num+1)) + fi +dpipscoin + +# Loop over provided list of completed plot directories +IFS=':' read -r -a array <<< "$plots_dir" +joined=$(printf ", %s" "${array[@]}") +echo "Adding plot directories at: ${joined:1}" +for p in ${plots_dir//:/ }; do + pipscoin plots add -d ${p} +dpipscoin + +chmod 755 -R /root/.pipscoin/mainnet/config/ssl/ &> /dev/null +pipscoin init --fix-ssl-permissions > /dev/null + +# Start services based on mode selected. Default is 'fullnode' +if [[ ${mode} == 'fullnode' ]]; then + for k in ${keys//:/ }; do + while [[ "${k}" != "persistent" ]] && [[ ! -s ${k} ]]; do + echo 'Waiting for key to be created/imported into mnemonic.txt. See: http://localhost:8926' + sleep 10 # Wait 10 seconds before checking for mnemonic.txt presence + if [ -s ${k} ]; then + pipscoin keys add -f ${k} + sleep 10 + fi + dpipscoin + dpipscoin + if [ -f /root/.chia/machinaris/config/wallet_settings.json ]; then + pipscoin start farmer-no-wallet + else + pipscoin start farmer + fi +elif [[ ${mode} =~ ^farmer.* ]]; then + if [ ! -f ~/.pipscoin/mainnet/config/ssl/wallet/public_wallet.key ]; then + echo "No wallet key found, so not starting farming services. Please add your Chia mnemonic.txt to the ~/.machinaris/ folder and restart." + else + pipscoin start farmer-only + fi +elif [[ ${mode} =~ ^harvester.* ]]; then + if [[ -z ${farmer_address} || -z ${farmer_port} ]]; then + echo "A farmer peer address and port are required." + exit + else + if [ ! -f /root/.pipscoin/farmer_ca/private_ca.crt ]; then + mkdir -p /root/.pipscoin/farmer_ca + response=$(curl --write-out '%{http_code}' --silent http://${farmer_address}:8958/certificates/?type=pipscoin --output /tmp/certs.zip) + if [ $response == '200' ]; then + unzip /tmp/certs.zip -d /root/.pipscoin/farmer_ca + else + echo "Certificates response of ${response} from http://${farmer_address}:8958/certificates/?type=pipscoin. Is the fork's fullnode container running?" + fi + rm -f /tmp/certs.zip + fi + if [[ -f /root/.pipscoin/farmer_ca/private_ca.crt ]] && [[ ! ${keys} == "persistent" ]]; then + pipscoin init -c /root/.pipscoin/farmer_ca 2>&1 > /root/.pipscoin/mainnet/log/init.log + chmod 755 -R /root/.pipscoin/mainnet/config/ssl/ &> /dev/null + pipscoin init --fix-ssl-permissions > /dev/null + else + echo "Did not find your farmer's certificates within /root/.pipscoin/farmer_ca." + echo "See: https://github.com/guydavis/machinaris/wiki/Workers#harvester" + fi + pipscoin configure --set-farmer-peer ${farmer_address}:${farmer_port} + pipscoin configure --enable-upnp false + pipscoin start harvester -r + fi +elif [[ ${mode} == 'plotter' ]]; then + echo "Starting in Plotter-only mode. Run Plotman from either CLI or WebUI." +fi diff --git a/scripts/worker_port_warning.sh b/scripts/worker_port_warning.sh index 7e7a48374..da45b5936 100644 --- a/scripts/worker_port_warning.sh +++ b/scripts/worker_port_warning.sh @@ -2,6 +2,9 @@ if [[ "${blockchains}" == "apple" && "${worker_api_port}" != '8947' ]]; then echo "Apple worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8947?" fi +if [[ "${blockchains}" == "ballcoin" && "${worker_api_port}" != '8597' ]]; then + echo "Ballcoin worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8957?" +fi if [[ "${blockchains}" == "bpx" && "${worker_api_port}" != '8945' ]]; then echo "BPX worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8945?" fi @@ -20,6 +23,9 @@ fi if [[ "${blockchains}" == "chives" && "${worker_api_port}" != '8931' ]]; then echo "Chives worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8931?" fi +if [[ "${blockchains}" == "coffee" && "${worker_api_port}" != '8954' ]]; then + echo "Coffee worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8954?" +fi if [[ "${blockchains}" == "cryptodoge" && "${worker_api_port}" != '8937' ]]; then echo "Cryptodoge worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8937?" fi @@ -32,6 +38,9 @@ fi if [[ "${blockchains}" == "flora" && "${worker_api_port}" != '8932' ]]; then echo "Flora worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8932?" fi +if [[ "${blockchains}" == "greenbtc" && "${worker_api_port}" != '8955' ]]; then + echo "GreenBTC worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8955?" +fi if [[ "${blockchains}" == "gold" && "${worker_api_port}" != '8949' ]]; then echo "Gold worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8949?" fi @@ -50,12 +59,21 @@ fi if [[ "${blockchains}" == "mmx" && "${worker_api_port}" != '8940' ]]; then echo "MMX worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8940?" fi +if [[ "${blockchains}" == "moon" && "${worker_api_port}" != '8953' ]]; then + echo "Moon worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8953?" +fi if [[ "${blockchains}" == "nchain" && "${worker_api_port}" != '8929' ]]; then echo "N-Chain worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8936?" fi +if [[ "${blockchains}" == "one" && "${worker_api_port}" != '8956' ]]; then + echo "One blockchain worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8956?" +fi if [[ "${blockchains}" == "petroleum" && "${worker_api_port}" != '8943' ]]; then echo "Petroleum worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8943?" fi +if [[ "${blockchains}" == "pipscoin" && "${worker_api_port}" != '8958' ]]; then + echo "Pipscoin worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8958?" +fi if [[ "${blockchains}" == "profit" && "${worker_api_port}" != '8944' ]]; then echo "Profit worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8944?" fi diff --git a/web/actions/warnings.py b/web/actions/warnings.py index 8a03c65ce..84940924e 100644 --- a/web/actions/warnings.py +++ b/web/actions/warnings.py @@ -135,3 +135,8 @@ def load_plot_warnings(): result['invalids'] = sorted(invalids, key = lambda x: (x['plot_id'], x['worker'], x['path'])) result['missingkeys'] = sorted(missingkeys, key = lambda x: (x['plot_id'], x['worker'], x['path'])) return result + +def clear_plot_warnings(): + db.session.query(w.Warning).delete() + db.session.commit() + flash(_('Plot warnings have been cleared. If they re-appear shortly, then please recheck the underlying cause has been addressed.'), 'success') diff --git a/web/routes.py b/web/routes.py index f3a674ef8..6c711803c 100644 --- a/web/routes.py +++ b/web/routes.py @@ -253,9 +253,12 @@ def farming_workers(): MAX_COLUMNS_ON_CHART=stats.MAX_ALLOWED_PATHS_ON_BAR_CHART, global_config=gc) -@app.route('/farming/warnings') +@app.route('/farming/warnings', methods=['GET', 'POST']) def farming_warnings(): gc = globals.load() + if request.method == 'POST': + if request.form.get('action') == 'clear': + warnings.clear_plot_warnings() farmers = chia.load_farmers() plot_warnings = warnings.load_plot_warnings() return render_template('farming/warnings.html', farmers=farmers, diff --git a/web/templates/alerts.html b/web/templates/alerts.html index 1a1d4ac1e..7582506a7 100644 --- a/web/templates/alerts.html +++ b/web/templates/alerts.html @@ -93,13 +93,13 @@ -
+ {% else %}
{{_('No notifications from Chiadog yet... so check back soon.')}}
diff --git a/web/templates/farming/warnings.html b/web/templates/farming/warnings.html index 0ab141892..caa077fdd 100644 --- a/web/templates/farming/warnings.html +++ b/web/templates/farming/warnings.html @@ -163,7 +163,12 @@
{{_('Great! No plots with missing keys were reported amongst the workers on {% endif %}
- +
+
+ +
+
{% endblock %} {% block scripts %} @@ -196,6 +201,14 @@
{{_('Great! No plots with missing keys were reported amongst the workers on }, {% endif %} }); + $("#btnClear").click(function () { + $('#btnClear').prop("disabled", true); + $('#btnClear').html( + ` {{_('Clearing...')}}` + ); + $('#warnings-form').append(''); + $("#warnings-form").submit(); + }); }) {% endblock %} \ No newline at end of file diff --git a/web/templates/worker_launch.html b/web/templates/worker_launch.html index 9c55f520e..0c3f6086d 100644 --- a/web/templates/worker_launch.html +++ b/web/templates/worker_launch.html @@ -227,6 +227,9 @@ if (blockchain == 'petroleum') { return 8943; } + if (blockchain == 'pipscoin') { + return 8958; + } if (blockchain == 'profit') { return 8944; } @@ -324,6 +327,9 @@ if (blockchain == 'petroleum') { return 33347; } + if (blockchain == 'pipscoin') { + return 16339; + } if (blockchain == 'profit') { return 48447; } @@ -796,6 +802,15 @@

{{_('Machinaris Worker - Launch Config')}}

Petroleum +
+ + +
+ +
@@ -803,8 +818,6 @@

{{_('Machinaris Worker - Launch Config')}}

Profit
-
-
@@ -833,6 +846,8 @@

{{_('Machinaris Worker - Launch Config')}}

Tad
+
+
@@ -840,6 +855,10 @@

{{_('Machinaris Worker - Launch Config')}}

Wheat
+
 
+
 
+
 
+
 
From 372384bafc23e147e249205362404b86cb38ee3c Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 17 Jan 2023 20:03:13 -0700 Subject: [PATCH 029/104] Pipscoin fix install and launch scripts. --- scripts/forks/pipscoin_install.sh | 6 +++--- scripts/forks/pipscoin_launch.sh | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/forks/pipscoin_install.sh b/scripts/forks/pipscoin_install.sh index 7972039f1..7821dcf5a 100644 --- a/scripts/forks/pipscoin_install.sh +++ b/scripts/forks/pipscoin_install.sh @@ -4,13 +4,13 @@ # PIPSCOIN_BRANCH=$1 -# On 2023-01-02 -HASH=29854541a4a6b2b9bc4d423302642e10ddf8fc77 +# On 2023-01-17 +HASH=3017cde5f8c463f5e494c5c1e258dd2bf8281fee if [ -z ${PIPSCOIN_BRANCH} ]; then echo 'Skipping Pipscoin install as not requested.' else - git clpipscoin --branch ${PIPSCOIN_BRANCH} --recurse-submodules https://github.com/Pipscoin-Network/pipscoin-blockchain.git /pipscoin-blockchain + git clone --branch ${PIPSCOIN_BRANCH} --recurse-submodules https://github.com/Pipscoin-Network/pipscoin-blockchain.git /pipscoin-blockchain cd /pipscoin-blockchain git submodule update --init mozilla-ca git checkout $HASH diff --git a/scripts/forks/pipscoin_launch.sh b/scripts/forks/pipscoin_launch.sh index 83dae8595..64917b44c 100644 --- a/scripts/forks/pipscoin_launch.sh +++ b/scripts/forks/pipscoin_launch.sh @@ -40,7 +40,7 @@ for k in ${keys//:/ }; do pipscoin keys add -l "key_${label_num}" -f ${k} > /dev/null ((label_num=label_num+1)) fi -dpipscoin +done # Loop over provided list of completed plot directories IFS=':' read -r -a array <<< "$plots_dir" @@ -48,7 +48,7 @@ joined=$(printf ", %s" "${array[@]}") echo "Adding plot directories at: ${joined:1}" for p in ${plots_dir//:/ }; do pipscoin plots add -d ${p} -dpipscoin +done chmod 755 -R /root/.pipscoin/mainnet/config/ssl/ &> /dev/null pipscoin init --fix-ssl-permissions > /dev/null @@ -63,8 +63,8 @@ if [[ ${mode} == 'fullnode' ]]; then pipscoin keys add -f ${k} sleep 10 fi - dpipscoin - dpipscoin + done + done if [ -f /root/.chia/machinaris/config/wallet_settings.json ]; then pipscoin start farmer-no-wallet else From 53c65b99fe83e61041d920e7bc0db943c098516a Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 17 Jan 2023 21:40:59 -0700 Subject: [PATCH 030/104] Fix for ballcoin module name. --- api/commands/rpc.py | 12 ++++++------ common/config/blockchains.json | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/commands/rpc.py b/api/commands/rpc.py index 562421e8b..39c1975d4 100644 --- a/api/commands/rpc.py +++ b/api/commands/rpc.py @@ -23,12 +23,12 @@ from apple.util.ints import uint16 from apple.util.config import load_config as load_fork_config elif blockchain == "ballcoin": - from ballcoin.rpc.full_node_rpc_client import FullNodeRpcClient - from ballcoin.rpc.farmer_rpc_client import FarmerRpcClient - from ballcoin.rpc.wallet_rpc_client import WalletRpcClient - from ballcoin.util.default_root import DEFAULT_ROOT_PATH - from ballcoin.util.ints import uint16 - from ballcoin.util.config import load_config as load_fork_config + from ball.rpc.full_node_rpc_client import FullNodeRpcClient + from ball.rpc.farmer_rpc_client import FarmerRpcClient + from ball.rpc.wallet_rpc_client import WalletRpcClient + from ball.util.default_root import DEFAULT_ROOT_PATH + from ball.util.ints import uint16 + from ball.util.config import load_config as load_fork_config elif blockchain == "bpx": from chia.rpc.full_node_rpc_client import FullNodeRpcClient from chia.rpc.farmer_rpc_client import FarmerRpcClient diff --git a/common/config/blockchains.json b/common/config/blockchains.json index 97f719dc1..9cc4479e5 100644 --- a/common/config/blockchains.json +++ b/common/config/blockchains.json @@ -26,7 +26,7 @@ "farmer_port": 38891, "fullnode_rpc_port": 38885, "worker_port": 8957, - "reward": 2.0, + "reward": 200, "mojos_per_coin": 1000000000000, "blocks_per_day": 4608, "git_url": "https://github.com/ball-network/ballcoin-blockchain", @@ -415,7 +415,7 @@ "farmer_port": 16339, "fullnode_rpc_port": 18868, "worker_port": 8958, - "reward": 1.0, + "reward": 5.0, "mojos_per_coin": 1000000000000, "blocks_per_day": 4608, "git_url": "https://github.com/Pipscoin-Network/pipscoin-blockchain", From f3e8a60e27b7d23fed8d299a928667928765c1a0 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Thu, 19 Jan 2023 09:58:29 -0700 Subject: [PATCH 031/104] Try building latest Staicoin on Ubuntu 22.04 --- .github/workflows/develop-staicoin.yaml | 4 ++-- .github/workflows/main-staicoin.yaml | 4 ++-- .github/workflows/test-staicoin.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/develop-staicoin.yaml b/.github/workflows/develop-staicoin.yaml index f8a20ea9a..d009c6c09 100644 --- a/.github/workflows/develop-staicoin.yaml +++ b/.github/workflows/develop-staicoin.yaml @@ -7,7 +7,7 @@ on: jobs: docker: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout @@ -40,7 +40,7 @@ jobs: platforms: linux/amd64 push: true build-args: | - "UBUNTU_VER=focal" + "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" "FDCLI_BRANCH=dev" diff --git a/.github/workflows/main-staicoin.yaml b/.github/workflows/main-staicoin.yaml index 7df7e485a..f0ba0c079 100644 --- a/.github/workflows/main-staicoin.yaml +++ b/.github/workflows/main-staicoin.yaml @@ -8,7 +8,7 @@ on: jobs: docker: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout @@ -41,7 +41,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: true build-args: | - "UBUNTU_VER=focal" + "UBUNTU_VER=jammy" "MACHINARIS_STREAM=latest" "STAICOIN_BRANCH=main" tags: | diff --git a/.github/workflows/test-staicoin.yaml b/.github/workflows/test-staicoin.yaml index 7111e5552..797522093 100644 --- a/.github/workflows/test-staicoin.yaml +++ b/.github/workflows/test-staicoin.yaml @@ -7,7 +7,7 @@ on: jobs: docker: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout @@ -40,7 +40,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: true build-args: | - "UBUNTU_VER=focal" + "UBUNTU_VER=jammy" "MACHINARIS_STREAM=test" "CHIADOG_BRANCH=dev" "STAICOIN_BRANCH=main" From 36842e2acd8e09ebd7706fc06bde80a612f2e667 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 20 Jan 2023 09:06:51 -0700 Subject: [PATCH 032/104] Fix for Bladebit ramplot plotting issues. --- CHANGELOG.md | 1 + CREDITS.md | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c83f523ae..a5abecbe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. The format - [Pipscoin](https://github.com/Pipscoin-Network/pipscoin-blockchain") blockchain at version 1.7.0. ## Changed - Fix missing Connections listing for Flax and MMX blockchains + - Fix for Bladebit ramplot relaunching. Thanks @JoeZotacExperience! ## Updated - [BTCGreen](https://github.com/BTCgreen-Network/btcgreen-blockchain/releases/tag/1.7.0b) to v1.7.0b - [Chives](https://github.com/HiveProject2021/chives-blockchain/releases/tag/1.5.3) to v1.5.3, including staking. diff --git a/CREDITS.md b/CREDITS.md index 5fc6b7bef..6ea4898d1 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -102,6 +102,7 @@ A big thanks to all that contributed with dev and test including: * Gnomuz * borifrmr (aka Inabon) * DeathandDestruction +* Joe Zotac Experience ## 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 From 604e289dff32c0fa2c1877e7ea3d6c87649e9e13 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 20 Jan 2023 11:18:29 -0700 Subject: [PATCH 033/104] More efficient log parse from @qoole. Thanks! #838 --- api/commands/chia_cli.py | 4 ++-- api/commands/log_parser.py | 7 ++++--- api/gunicorn.conf.py | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index 7b59c062a..25febee05 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -157,7 +157,7 @@ def load_keys_show(blockchain): def restart_farmer(blockchain): chia_binary = globals.get_blockchain_binary(blockchain) if os.path.exists(WALLET_SETTINGS_FILE): - cmd = "{0} stop farmer && {0} start farmer-no-wallet".format(chia_binary) + cmd = "{0} stop -d farmer && {0} start farmer-no-wallet".format(chia_binary) else: cmd = "{0} start farmer && {0} start farmer -r".format(chia_binary) app.logger.info("Executing farmer restart: {0}".format(cmd)) @@ -194,7 +194,7 @@ def start_wallet(blockchain): def pause_wallet(blockchain): chia_binary = globals.get_blockchain_binary(blockchain) if globals.legacy_blockchain(blockchain): # Old chains will stop fullnode(!) if ask to stop just the wallet... - cmd = "{0} stop farmer && {0} start farmer-no-wallet".format(chia_binary) + cmd = "{0} stop -d farmer && {0} start farmer-no-wallet".format(chia_binary) else: # Updated blockchains can simply stop the wallet cmd = "{0} stop wallet".format(chia_binary) app.logger.info("Executing wallet pause: {0}".format(cmd)) diff --git a/api/commands/log_parser.py b/api/commands/log_parser.py index 625fd15e2..ffef5a80f 100644 --- a/api/commands/log_parser.py +++ b/api/commands/log_parser.py @@ -97,8 +97,9 @@ def recent_farmed_blocks(blockchain): #app.logger.info("MMX executing: grep 'Created block' {0}".format(log_file)) proc = Popen("grep 'Created block' {0}".format(log_file), stdout=PIPE, stderr=PIPE, shell=True) else: - # Chia 1.4+ sprays lots of useless "Cumulative cost" log lines right in middle of important lines, so ignore them - proc = Popen("grep -v 'Cumulative cost' {0} {1} | grep -v 'CompressorArg' | grep -B 15 'Farmed unfinished_block'".format(rotated_log_file, log_file), + # Chia 1.4+ sprays lots of useless "Cumulative cost" and "CompressorArg" log lines right in middle of important lines, so ignore them + # Hopefully, there are not more than about 80 of such useless log lines else the selection of 100 before lines might exclude some blocks + proc = Popen("grep -B 100 'Farmed unfinished_block' {0} {1} | grep -ve 'Cumulative cost' -ve 'CompressorArg'".format(rotated_log_file, log_file), stdout=PIPE, stderr=PIPE, shell=True) try: outs, errs = proc.communicate(timeout=90) @@ -112,7 +113,7 @@ def recent_farmed_blocks(blockchain): cli_stdout = outs.decode('utf-8') #app.logger.info("Blocks grep: {0}".format(cli_stdout)) blocks = log.Blocks(blockchain, cli_stdout.splitlines()) - #app.logger.info(blocks.rows) + app.logger.info(blocks.rows) return blocks def get_farming_log_file(blockchain): diff --git a/api/gunicorn.conf.py b/api/gunicorn.conf.py index 810c8f7e5..617d127f8 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -72,7 +72,7 @@ def on_starting(server): scheduler.add_job(func=status_connections.update, name="status_connections", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) scheduler.add_job(func=status_keys.update, name="status_keys", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) scheduler.add_job(func=status_farm.update, name="status_farm", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) - scheduler.add_job(func=stats_blocks.collect, name="status_blocks", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) + scheduler.add_job(func=stats_blocks.collect, name="status_blocks", trigger='interval', minutes=10, jitter=0) scheduler.add_job(func=restart_stuck_farmer.execute, name="status_blockchain_sync", trigger='interval', minutes=5, jitter=0) scheduler.add_job(func=periodically_sync_wallet.execute, name="status_wallet_sync", trigger='interval', minutes=15, jitter=0) scheduler.add_job(func=nft_recover.execute, name="status_nft_recover", trigger='interval', hours=1) # Once an hour @@ -96,7 +96,7 @@ def on_starting(server): # Testing only #scheduler.add_job(func=plots_check.execute, name="plots_check", trigger='interval', seconds=60) # Test immediately - #scheduler.add_job(func=stats_effort.collect, name="stats_effort", trigger='interval', seconds=10) # Test immediately + #scheduler.add_job(func=stats_blocks.collect, name="stats_effort", trigger='interval', seconds=10) # Test immediately #scheduler.add_job(func=stats_balances.collect, name="stats_balances", trigger='interval', seconds=10) # Test immediately #scheduler.add_job(func=websvcs.get_chain_statuses, name="get_chain_statuses", trigger='interval', seconds=10) # Test immediately #scheduler.add_job(func=status_farm.update, name="farms", trigger='interval', seconds=10) # Test immediately From c603041c5e9c3c0978530919ac4651067bb7cae3 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 20 Jan 2023 12:46:05 -0700 Subject: [PATCH 034/104] Handle multiple key prompt from Cactus. --- CHANGELOG.md | 4 ++-- CREDITS.md | 1 + api/commands/chia_cli.py | 8 ++++---- api/commands/pools_cli.py | 6 +++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5abecbe0..c15f825f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,9 @@ All notable changes to this project will be documented in this file. The format ### Added - [MMX Cuda Plotter](https://github.com/madMAx43v3r/mmx-binaries/tree/master/mmx-cuda-plotter) - currently only at commandline: `cuda_plot_kXX`. - [Ballcoin](https://github.com/ball-network/ballcoin-blockchain) blockchain at version 1.6.0, another slow Silicoin fork. - - [Pipscoin](https://github.com/Pipscoin-Network/pipscoin-blockchain") blockchain at version 1.7.0. + - [Pipscoin](https://github.com/Pipscoin-Network/pipscoin-blockchain) blockchain at version 1.7.0. ## Changed - - Fix missing Connections listing for Flax and MMX blockchains + - Fix missing Connections listing for Flax and MMX blockchains. Thanks @ekersey! - Fix for Bladebit ramplot relaunching. Thanks @JoeZotacExperience! ## Updated - [BTCGreen](https://github.com/BTCgreen-Network/btcgreen-blockchain/releases/tag/1.7.0b) to v1.7.0b diff --git a/CREDITS.md b/CREDITS.md index 6ea4898d1..f879ca3ac 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -102,6 +102,7 @@ A big thanks to all that contributed with dev and test including: * Gnomuz * borifrmr (aka Inabon) * DeathandDestruction +* @ekersey * Joe Zotac Experience ## Trademark Notice diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index 25febee05..fa1ca9774 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -92,17 +92,17 @@ def load_wallet_show(blockchain): app.logger.debug("Default SELECTED_WALLET_NUM is {0}".format(wallet_id_num)) while True: i = child.expect(["Wallet height:.*\r\n", "Wallet keys:.*\r\n", "Choose wallet key:.*\r\n", - "Choose a wallet key .*\r\n", "No online backup file found.*\r\n", "Connection error.*\r\n"], timeout=90) + "Choose a wallet key .*\r\n", "Active Wallet Key.*\r\n", "No online backup file found.*\r\n", "Connection error.*\r\n"], timeout=90) if i == 0: app.logger.debug("wallet show returned 'Wallet height...' so collecting details.") wallet_show += child.after.decode("utf-8") + child.before.decode("utf-8") + child.read().decode("utf-8") break - elif i == 1 or i == 2 or i == 3: + elif i == 1 or i == 2 or i == 3 or i == 4: app.logger.info("Wallet show got num prompt so selecting wallet #{0}".format(wallet_id_num)) child.sendline("{0}".format(wallet_id_num)) - elif i == 4: - child.sendline("S") elif i == 5: + child.sendline("S") + elif i == 6: raise Exception("Skipping wallet status gathering as it returned 'Connection Error', so possibly still starting up. If this error persists more than 30 minutes after startup, try restarting the Machinaris Docker container.") else: raise Exception("ERROR:\n" + child.after.decode("utf-8") + child.before.decode("utf-8") + child.read().decode("utf-8")) diff --git a/api/commands/pools_cli.py b/api/commands/pools_cli.py index df828d9ae..eacdc2b34 100644 --- a/api/commands/pools_cli.py +++ b/api/commands/pools_cli.py @@ -100,16 +100,16 @@ def load_plotnft_show(blockchain): pool_wallet_id = 1 while True: i = child.expect(["Wallet height:.*\r\n", "Wallet keys:.*\r\n", "Choose wallet key:.*\r\n", - "Choose a wallet key .*\r\n", "No online backup file found.*\r\n"], timeout=30) + "Choose a wallet key .*\r\n", "Active Wallet Key.*\r\n", "No online backup file found.*\r\n"], timeout=30) if i == 0: app.logger.debug("wallet show returned 'Wallet height...' so collecting details.") wallet_show += child.after.decode("utf-8") + child.before.decode("utf-8") + child.read().decode("utf-8") break - elif i == 1 or i == 2 or i == 3: + elif i == 1 or i == 2 or i == 3 or i == 4: app.logger.debug("wallet show got index prompt so selecting #{0}".format(pool_wallet_id)) child.sendline("{0}".format(pool_wallet_id)) pool_wallet_id += 1 - elif i == 4: + elif i == 5: child.sendline("S") else: app.logger.debug("pexpect returned {0}".format(i)) From f38c8c710c773f0f1c02d0a16cb18c47541105b1 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 22 Jan 2023 08:06:00 -0700 Subject: [PATCH 035/104] Fix for flask-migrate env.py being out-of-date. Cache control header. Thanks @qoole! --- CREDITS.md | 2 ++ api/migrations/env.py | 34 ++++++++++++++++++++++------------ web/default_settings.py | 3 +++ 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/CREDITS.md b/CREDITS.md index f879ca3ac..c96c3e1b4 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -104,6 +104,8 @@ A big thanks to all that contributed with dev and test including: * DeathandDestruction * @ekersey * Joe Zotac Experience +* @qoole +* @miguell ## 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/api/migrations/env.py b/api/migrations/env.py index 04b1ff749..7f48c373c 100644 --- a/api/migrations/env.py +++ b/api/migrations/env.py @@ -19,14 +19,23 @@ fileConfig(config.config_file_name) logger = logging.getLogger('alembic.env') + +def get_engine(bind_key=None): + try: + # this works with Flask-SQLAlchemy<3 and Alchemical + return current_app.extensions['migrate'].db.get_engine(bind=bind_key) + except TypeError: + # this works with Flask-SQLAlchemy>=3 + return current_app.extensions['migrate'].db.engines.get(bind_key) + + # add your model's MetaData object here # for 'autogenerate' support # from myapp import mymodel # target_metadata = mymodel.Base.metadata config.set_main_option( - 'sqlalchemy.url', - str(current_app.extensions['migrate'].db.get_engine().url).replace( - '%', '%%')) + 'sqlalchemy.url', str(get_engine().url).replace('%', '%%')) +bind_names = [] if current_app.config.get('SQLALCHEMY_BINDS') is not None: bind_names = list(current_app.config['SQLALCHEMY_BINDS'].keys()) else: @@ -37,10 +46,8 @@ for bind in bind_names: context.config.set_section_option( bind, "sqlalchemy.url", - str(current_app.extensions['migrate'].db.get_engine( - bind=bind).url).replace('%', '%%')) -target_metadata = current_app.extensions['migrate'].db.metadata - + str(get_engine(bind_key=bind).url).replace('%', '%%')) +target_db = current_app.extensions['migrate'].db # other values from the config, defined by the needs of env.py, # can be acquired: @@ -52,8 +59,12 @@ def get_metadata(bind): """Return the metadata for a bind.""" if bind == '': bind = None + if hasattr(target_db, 'metadatas'): + return target_db.metadatas[bind] + + # legacy, less flexible implementation m = MetaData() - for t in target_metadata.tables.values(): + for t in target_db.metadata.tables.values(): if t.info.get('bind_key') == bind: t.tometadata(m) return m @@ -124,12 +135,11 @@ def process_revision_directives(context, revision, directives): # for the direct-to-DB use case, start a transaction on all # engines, then run all migrations, then commit all transactions. engines = { - '': {'engine': current_app.extensions['migrate'].db.get_engine()} + '': {'engine': get_engine()} } for name in bind_names: engines[name] = rec = {} - rec['engine'] = current_app.extensions['migrate'].db.get_engine( - bind=name) + rec['engine'] = get_engine(bind_key=name) for name, rec in engines.items(): engine = rec['engine'] @@ -171,4 +181,4 @@ def process_revision_directives(context, revision, directives): if context.is_offline_mode(): run_migrations_offline() else: - run_migrations_online() + run_migrations_online() \ No newline at end of file diff --git a/web/default_settings.py b/web/default_settings.py index 641698fa5..ee36bd77d 100644 --- a/web/default_settings.py +++ b/web/default_settings.py @@ -50,3 +50,6 @@ class DefaultConfig: # Note, babel looks in /machinaris/web/translations with this path. BABEL_TRANSLATION_DIRECTORIES = "translations" LANGUAGES = ['en', 'de_DE', 'fr_FR', 'it_IT', 'nl_NL', 'pt_PT', 'zh'] + + # Enable client-side caching of static files; Thanks @qoole! + SEND_FILE_MAX_AGE_DEFAULT = 86400 From 12f8b9984e39902169d9b3e3add8dcc7b6f5c247 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 22 Jan 2023 08:22:44 -0700 Subject: [PATCH 036/104] Latest Javascript libs. --- api/default_settings.py | 8 ++++++++ scripts/pull_3rd_party_libs.sh | 13 ++++++++----- web/__init__.py | 4 ++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/api/default_settings.py b/api/default_settings.py index 4066cb46a..097715d86 100644 --- a/api/default_settings.py +++ b/api/default_settings.py @@ -1,4 +1,5 @@ import os +import traceback class DefaultConfig: API_TITLE = "Machinaris API" @@ -62,3 +63,10 @@ class DefaultConfig: BABEL_TRANSLATION_DIRECTORIES = "api/translations" LANGUAGES = ['en', 'de_DE', 'fr_FR', 'it_IT', 'nl_NL', 'pt_PT', 'zh'] + + # For latest APScheduler library, pass the TZ through + try: + SCHEDULER_TIMEZONE = os.environ['TZ'] + except: + print("Found no TZ environment variable containing timezone. Generate a working Machinaris launch at https://www.machinaris.app") + traceback.print_exc() diff --git a/scripts/pull_3rd_party_libs.sh b/scripts/pull_3rd_party_libs.sh index 88b6e9e71..c26f4f8c8 100755 --- a/scripts/pull_3rd_party_libs.sh +++ b/scripts/pull_3rd_party_libs.sh @@ -3,20 +3,23 @@ # Due to complaints about JS CDNs, this pulls all JS libs into web/static/3rd_party folder # -# Bootstrap Icons -BSI_VERSION=1.10.2 +# Bootstrap and Icons +BSI_VERSION=1.10.3 BOOTSTRAP_VERSION=5.2.3 BASEPATH=${JS_LIBS_BASEPATH:-/machinaris/web/static/3rd_party} +# Mapping library +LEAFLET_VERSION=1.9.3 + # List of other css/js links LIST=" https://cdn.datatables.net/1.13.1/css/dataTables.bootstrap5.css https://cdn.datatables.net/1.13.1/js/dataTables.bootstrap5.js https://cdn.datatables.net/1.13.1/js/jquery.dataTables.js -https://cdn.jsdelivr.net/npm/chart.js@4.0.1/dist/chart.umd.min.js +https://cdn.jsdelivr.net/npm/chart.js@4.2.0/dist/chart.umd.min.js https://cdn.jsdelivr.net/npm/chartjs-adapter-luxon@1.3.0/dist/chartjs-adapter-luxon.umd.min.js https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2.2.0/dist/chartjs-plugin-datalabels.min.js -https://cdn.jsdelivr.net/npm/jquery@3.6.1/dist/jquery.min.js +https://cdn.jsdelivr.net/npm/jquery@3.6.3/dist/jquery.min.js https://moment.github.io/luxon/global/luxon.min.js" mkdir -p $BASEPATH @@ -36,7 +39,7 @@ unzip -q -o -j ${BASEPATH}/bs.zip -d $BASEPATH/ bootstrap-${BOOTSTRAP_VERSION}*/ rm -f ${BASEPATH}/bs.zip # Leaflet and plugins -wget -O ${BASEPATH}/leaflet.zip -nv "https://leafletjs-cdn.s3.amazonaws.com/content/leaflet/v1.9.3/leaflet.zip" && \ +wget -O ${BASEPATH}/leaflet.zip -nv "https://leafletjs-cdn.s3.amazonaws.com/content/leaflet/v{$LEAFLET_VERSION}/leaflet.zip" && \ unzip -q -o ${BASEPATH}/leaflet.zip -d $BASEPATH/ && \ rm -f ${BASEPATH}/leaflet.zip wget -O ${BASEPATH}/leaflet-layervisibility.js -nv "https://unpkg.com/leaflet-layervisibility/dist/leaflet-layervisibility.js" diff --git a/web/__init__.py b/web/__init__.py index a8f45655d..e5518432d 100644 --- a/web/__init__.py +++ b/web/__init__.py @@ -29,9 +29,9 @@ def get_locale(): alternative = "{0}_{1}".format(first_accept, first_accept.upper()) if alternative in app.config['LANGUAGES']: return alternative - app.logger.info("INIT: Accept-Language: {0} ----> matched locale: {1}".format(accept, match)) + app.logger.debug("INIT: Accept-Language: {0} ----> matched locale: {1}".format(accept, match)) except: - app.logger.info("INIT: Request had no Accept-Language, returning default locale of en.") + app.logger.debug("INIT: Request had no Accept-Language, returning default locale of en.") return request.accept_languages.best_match(app.config['LANGUAGES']) babel = Babel(app, locale_selector=get_locale,) From f04338fa2ee1e1380d410323bd42d80e6a072239 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 22 Jan 2023 08:37:11 -0700 Subject: [PATCH 037/104] Use ATB API for peer node list request. Thanks @qoole! #840 --- api/commands/websvcs.py | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/api/commands/websvcs.py b/api/commands/websvcs.py index 3b19d055e..713c9dac6 100644 --- a/api/commands/websvcs.py +++ b/api/commands/websvcs.py @@ -343,25 +343,17 @@ def request_infinex_prices(debug=False): def request_peers(blockchain, debug=False): peers = [] alltheblocks_blockchain = globals.get_alltheblocks_name(blockchain) - url = "https://alltheblocks.net/{0}/peers".format(alltheblocks_blockchain) + url = "https://api.alltheblocks.net/{0}/peer/recent?amount=10".format(alltheblocks_blockchain) app.logger.info("Requesting node peers for {0} from {1}".format(blockchain, url)) - if debug: - http.client.HTTPConnection.debuglevel = 1 - data = requests.get(url, timeout=30).text - http.client.HTTPConnection.debuglevel = 0 - soup = bs4.BeautifulSoup(data, 'html.parser') - div = soup.find('div', class_="p-2 text-monospace") - for row in div.find_all('div'): - if len(row.contents) == 1: - add_cmd = row.contents[0].string.strip() - if 'show -a' in add_cmd: - peer = add_cmd[(add_cmd.index('show -a ') + len('show -a ')):].strip() - peers.append(peer) - elif 'peer -a' in add_cmd: - peer = add_cmd[(add_cmd.index('peer -a ') + len('peer -a ')):].strip() - peers.append(peer.splitlines()[0]) - else: - app.logger.error("Unparseable peer connection: {0}".format(row.contents[0].string)) + try: + if debug: + http.client.HTTPConnection.debuglevel = 1 + data = json.loads(requests.get(url, timeout=30).content) + http.client.HTTPConnection.debuglevel = 0 + for peer in data: + peers.append("{0}:{1}".format(peer['host'], peer['port'])) + except Exception as ex: + app.logger.error("Failed to request network peers from {0} due to {1}".format(url, str(ex))) return peers last_price_request_time = None From 77abbde697c73105c8b9ac7f4133216934fa291e Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 22 Jan 2023 13:32:35 -0700 Subject: [PATCH 038/104] Initial GPU support in the Chia container. --- CHANGELOG.md | 2 ++ CREDITS.md | 21 +++------------------ api/commands/websvcs.py | 23 ----------------------- scripts/forks/chia_install.sh | 9 +++++++++ scripts/forks/chia_launch.sh | 13 +++++++++++++ web/routes.py | 8 ++++---- 6 files changed, 31 insertions(+), 45 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c15f825f5..5e1ab6014 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,14 @@ All notable changes to this project will be documented in this file. The format ## [Unreleased] ### Added + - [Bladebit](https://github.com/Chia-Network/bladebit) - support for plotting via GPU (NOT YET, PENDING!) - [MMX Cuda Plotter](https://github.com/madMAx43v3r/mmx-binaries/tree/master/mmx-cuda-plotter) - currently only at commandline: `cuda_plot_kXX`. - [Ballcoin](https://github.com/ball-network/ballcoin-blockchain) blockchain at version 1.6.0, another slow Silicoin fork. - [Pipscoin](https://github.com/Pipscoin-Network/pipscoin-blockchain) blockchain at version 1.7.0. ## Changed - Fix missing Connections listing for Flax and MMX blockchains. Thanks @ekersey! - Fix for Bladebit ramplot relaunching. Thanks @JoeZotacExperience! + - Multiple functionality & performance cleanups from excellent code review by @qoole. ## Updated - [BTCGreen](https://github.com/BTCgreen-Network/btcgreen-blockchain/releases/tag/1.7.0b) to v1.7.0b - [Chives](https://github.com/HiveProject2021/chives-blockchain/releases/tag/1.5.3) to v1.5.3, including staking. diff --git a/CREDITS.md b/CREDITS.md index c96c3e1b4..6400e0830 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -5,12 +5,13 @@ A huge thank-you to the great teams/devs behind these projects, being used by Ma ## Core Components * [Chia™](https://www.chia.net/): the distributed cryptocurrency project. +* [Forks](https://github.com/guydavis/machinaris/wiki/Forks): All the other blockchain clones. * [Plotman](https://github.com/ericaltendorf/plotman): a parallel plotting manager. * [Chiadog](https://github.com/martomi/chiadog): a log monitor with alerting. * [Madmax](https://github.com/madMAx43v3r/chia-plotter): a pipelined, multi-threaded plotter. * [Bladebit](https://github.com/harold-b/bladebit): an in-memory plotter. -* [Farmr](https://github.com/gilnobrega/farmr): provides advanced monitoring at [farmr.net](https://farmr.net). * [Forktools](https://github.com/Qwinn1/forktools): shell utilities for managing Chia forks. +* [FD-CLI](https://github.com/Flora-Network/flora-dev-cli) - script to regularly recover 7/8 rewards ## Web Application * [Flask](https://flask.palletsprojects.com/en/2.0.x/): Web UI application server. @@ -28,25 +29,9 @@ A huge thank-you to the great teams/devs behind these projects, being used by Ma * [Maxmind](https://maxmind.com/): Geolocation API for mapping IP addresses of peer connections. * [Mapbox](https://mapbox.com): Nice looking map tiles for use with Leaflet on the Connections page map. -## Blockchains -* [BTCgreen](https://github.com/BTCgreen-Network/btcgreen-blockchain) -* [Cactus](https://github.com/Cactus-Network/cactus-blockchain) -* [Chives](https://github.com/HiveProject2021/chives-blockchain) -* [Cryptodoge](https://github.com/CryptoDoge-Network/cryptodoge) -* [Flax](https://github.com/Flax-Network/flax-blockchain) -* [Flora](https://github.com/Flora-Network/flora-blockchain) -* [HDDCoin](https://github.com/HDDcoin-Network/hddcoin-blockchain) -* [Maize](https://github.com/Maize-Network/maize-blockchain) -* [MMX](https://github.com/madMAx43v3r/mmx-node) -* [NChain](https://gitee.com/ext9/ext9-blockchain) -* [SHIBgreen](https://github.com/BTCgreen-Network/shibgreen-blockchain) -* [Staicoin](https://github.com/STATION-I/staicoin-blockchain) -* [Stor](https://github.com/Stor-Network/stor-blockchain) - ## Other Resources -* [FD-CLI](https://github.com/Flora-Network/flora-dev-cli) - script to regularly recover 7/8 rewards -* [Chia DB Downloads](https://www.chia-database.com/) - for Chia blockchain database * [All the Blocks](https://alltheblocks.net/) - blockchain, wallet, and pricing info +* [Infinex](infinex.cc) - blockchain coin exchange, also for pricing info * [Coin Gecko](https://coingecko.com/) - fiat currency exchange info ## Testers and Developers diff --git a/api/commands/websvcs.py b/api/commands/websvcs.py index 713c9dac6..5d8898d25 100644 --- a/api/commands/websvcs.py +++ b/api/commands/websvcs.py @@ -289,28 +289,6 @@ def request_atb_prices(debug=False): app.logger.error("Failed to request recent blockchain pricing from {0} due to {1}".format(url, str(ex))) return prices -def request_posat_prices(debug=False): - prices = {} - url = "https://mrkt.posat.io/api/prices/v2" - try: - app.logger.info("Requesting recent pricing for blockchains from {0}".format(url)) - if debug: - http.client.HTTPConnection.debuglevel = 1 - data = json.loads(requests.get(url, timeout=30).content) - http.client.HTTPConnection.debuglevel = 0 - for blockchain in data.keys(): - machinaris_blockchain = blockchain.replace('stai', 'staicoin').lower() - if not machinaris_blockchain in SUPPORTED_BLOCKCHAINS: - continue - #app.logger.info("POSAT: {0} @ {1}".format(blockchain, data[blockchain]['price']['usd'])) - try: - prices[machinaris_blockchain] = float(data[blockchain]['price']['usd']) - except Exception as ex: - traceback.print_exc() - except Exception as ex: - app.logger.error("Failed to request recent blockchain pricing from {0} due to {1}".format(url, str(ex))) - return prices - def request_infinex_prices(debug=False): prices = {} url = "https://api.infinex.cc/spot/markets" @@ -364,7 +342,6 @@ def get_prices(): try: last_price_request_time = datetime.datetime.now() store_exchange_prices(prices, 'alltheblocks', request_atb_prices(), last_price_request_time) - #store_exchange_prices(prices, 'posat', request_posat_prices(), last_price_request_time) # Dead as of Sept 2022 store_exchange_prices(prices, 'infinex', request_infinex_prices(), last_price_request_time) save_prices_cache(prices) except Exception as ex: diff --git a/scripts/forks/chia_install.sh b/scripts/forks/chia_install.sh index 46b3eb278..c4fd1b294 100644 --- a/scripts/forks/chia_install.sh +++ b/scripts/forks/chia_install.sh @@ -8,6 +8,15 @@ CHIA_BRANCH=$1 if [ -z ${CHIA_BRANCH} ]; then echo 'Skipping Chia install as not requested.' else + rm -rf /root/.cache + apt-get update + # Install dependencies for MMX and GPU support + apt-get install -y git cmake build-essential libsecp256k1-dev libsodium-dev libminiupnpc-dev libjemalloc-dev zlib1g-dev ocl-icd-opencl-dev clinfo screen + apt-get install -y initramfs-tools ocl-icd-libopencl1 opencl-headers apt-utils libnuma1 + # For AMDGPU, install the amdgpu-install stub, optionally invoked later if OPENCL_GPU=amd at launch time + curl -O http://repo.radeon.com/amdgpu-install/22.20.5/ubuntu/jammy/amdgpu-install_22.20.50205-1_all.deb + apt-get install -y ./amdgpu-install_22.20.50205-1_all.deb + git clone --branch ${CHIA_BRANCH} --recurse-submodules=mozilla-ca https://github.com/Chia-Network/chia-blockchain.git /chia-blockchain cd /chia-blockchain diff --git a/scripts/forks/chia_launch.sh b/scripts/forks/chia_launch.sh index 0fbf45167..2bb59ca35 100644 --- a/scripts/forks/chia_launch.sh +++ b/scripts/forks/chia_launch.sh @@ -85,6 +85,19 @@ done chmod 755 -R /root/.chia/mainnet/config/ssl/ &> /dev/null chia init --fix-ssl-permissions > /dev/null +# Initial support for GPUs used when plotting/farming +if [[ ${OPENCL_GPU} == 'nvidia' ]]; then + mkdir -p /etc/OpenCL/vendors + echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd +elif [[ ${OPENCL_GPU} == 'amd' ]]; then + pushd /tmp + apt-get update 2>&1 > /tmp/amdgpu_setup.log + amdgpu-install -y --usecase=opencl --opencl=rocr --no-dkms --no-32 --accept-eula 2>&1 >> /tmp/amdgpu_setup.log + popd +elif [[ ${OPENCL_GPU} == 'intel' ]]; then + apt-get update 2>&1 > /tmp/intelgpu_setup.log + apt-get install -y intel-opencl-icd 2>&1 >> /tmp/intelgpu_setup.log +fi # Start services based on mode selected. Default is 'fullnode' if [[ ${mode} == 'fullnode' ]]; then diff --git a/web/routes.py b/web/routes.py index 6c711803c..4b4a0127e 100644 --- a/web/routes.py +++ b/web/routes.py @@ -28,15 +28,15 @@ def get_lang(request): first_accept = accept.split(',')[0] # Like 'nl' alternative = "{0}_{1}".format(first_accept, first_accept.upper()) if alternative in app.config['LANGUAGES']: - app.logger.info("LOCALE: Accept-Language: {0} ----> using locale: {1}".format(accept, alternative)) + app.logger.debug("LOCALE: Accept-Language: {0} ----> using locale: {1}".format(accept, alternative)) return alternative if match: - app.logger.info("LOCALE: Accept-Language: {0} ----> matched locale: {1}".format(accept, match)) + app.logger.debug("LOCALE: Accept-Language: {0} ----> matched locale: {1}".format(accept, match)) return match - app.logger.info("LOCALE: Accept-Language: {0} returned no match so defaulting to 'en'.".format(accept)) + app.logger.debug("LOCALE: Accept-Language: {0} returned no match so defaulting to 'en'.".format(accept)) return "en" except: - app.logger.info("LOCALE: Request had no Accept-Language header, returning default locale of 'en'") + app.logger.debug("LOCALE: Request had no Accept-Language header, returning default locale of 'en'") return "en" def find_selected_worker(hosts, hostname, blockchain= None): From 43d22d316e1b5fd3b8d268848a94f0de413c8785 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 22 Jan 2023 14:07:00 -0700 Subject: [PATCH 039/104] Another try for GPU support. --- scripts/forks/chia_install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/forks/chia_install.sh b/scripts/forks/chia_install.sh index c4fd1b294..1f548d23c 100644 --- a/scripts/forks/chia_install.sh +++ b/scripts/forks/chia_install.sh @@ -10,9 +10,8 @@ if [ -z ${CHIA_BRANCH} ]; then else rm -rf /root/.cache apt-get update - # Install dependencies for MMX and GPU support - apt-get install -y git cmake build-essential libsecp256k1-dev libsodium-dev libminiupnpc-dev libjemalloc-dev zlib1g-dev ocl-icd-opencl-dev clinfo screen - apt-get install -y initramfs-tools ocl-icd-libopencl1 opencl-headers apt-utils libnuma1 + # Install dependencies for GPU support + apt-get install -y git cmake build-essential ocl-icd-opencl-dev clinfo screen initramfs-tools ocl-icd-libopencl1 opencl-headers apt-utils # For AMDGPU, install the amdgpu-install stub, optionally invoked later if OPENCL_GPU=amd at launch time curl -O http://repo.radeon.com/amdgpu-install/22.20.5/ubuntu/jammy/amdgpu-install_22.20.50205-1_all.deb apt-get install -y ./amdgpu-install_22.20.50205-1_all.deb From f7fa9e6e1e1b739ba93572799a80806fd209573c Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 22 Jan 2023 14:14:28 -0700 Subject: [PATCH 040/104] Use tmp initially. --- scripts/forks/chia_install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/forks/chia_install.sh b/scripts/forks/chia_install.sh index 1f548d23c..c158b7e53 100644 --- a/scripts/forks/chia_install.sh +++ b/scripts/forks/chia_install.sh @@ -8,6 +8,7 @@ CHIA_BRANCH=$1 if [ -z ${CHIA_BRANCH} ]; then echo 'Skipping Chia install as not requested.' else + cd /tmp rm -rf /root/.cache apt-get update # Install dependencies for GPU support From 78f64628ba394996e84f3627d4faafc6f8a77920 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 22 Jan 2023 15:44:58 -0700 Subject: [PATCH 041/104] Fixes for GPU usage in Chia container? --- api/gunicorn.conf.py | 3 ++- scripts/forks/chia_install.sh | 4 ++-- scripts/forks/chia_launch.sh | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/api/gunicorn.conf.py b/api/gunicorn.conf.py index 617d127f8..43ff4755b 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -6,6 +6,7 @@ def on_starting(server): import atexit import os import time + import tzlocal from datetime import datetime, timedelta from apscheduler.schedulers.background import BackgroundScheduler @@ -23,7 +24,7 @@ def on_starting(server): from api.commands import websvcs - scheduler = BackgroundScheduler() + scheduler = BackgroundScheduler(timezone=str(tzlocal.get_localzone())) schedule_every_x_minutes = "?" try: diff --git a/scripts/forks/chia_install.sh b/scripts/forks/chia_install.sh index c158b7e53..236eb6f63 100644 --- a/scripts/forks/chia_install.sh +++ b/scripts/forks/chia_install.sh @@ -10,9 +10,9 @@ if [ -z ${CHIA_BRANCH} ]; then else cd /tmp rm -rf /root/.cache - apt-get update + apt-get update && apt-get install -y dialog apt-utils # Install dependencies for GPU support - apt-get install -y git cmake build-essential ocl-icd-opencl-dev clinfo screen initramfs-tools ocl-icd-libopencl1 opencl-headers apt-utils + apt-get install -y git cmake build-essential ocl-icd-opencl-dev clinfo screen initramfs-tools ocl-icd-libopencl1 opencl-headers # For AMDGPU, install the amdgpu-install stub, optionally invoked later if OPENCL_GPU=amd at launch time curl -O http://repo.radeon.com/amdgpu-install/22.20.5/ubuntu/jammy/amdgpu-install_22.20.50205-1_all.deb apt-get install -y ./amdgpu-install_22.20.50205-1_all.deb diff --git a/scripts/forks/chia_launch.sh b/scripts/forks/chia_launch.sh index 2bb59ca35..0ce893d25 100644 --- a/scripts/forks/chia_launch.sh +++ b/scripts/forks/chia_launch.sh @@ -90,10 +90,10 @@ if [[ ${OPENCL_GPU} == 'nvidia' ]]; then mkdir -p /etc/OpenCL/vendors echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd elif [[ ${OPENCL_GPU} == 'amd' ]]; then - pushd /tmp + pushd /tmp > /dev/null apt-get update 2>&1 > /tmp/amdgpu_setup.log amdgpu-install -y --usecase=opencl --opencl=rocr --no-dkms --no-32 --accept-eula 2>&1 >> /tmp/amdgpu_setup.log - popd + popd > /dev/null elif [[ ${OPENCL_GPU} == 'intel' ]]; then apt-get update 2>&1 > /tmp/intelgpu_setup.log apt-get install -y intel-opencl-icd 2>&1 >> /tmp/intelgpu_setup.log From e1ab3e758c1f4a75ce73e68f2c08af080928474d Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 22 Jan 2023 16:29:18 -0700 Subject: [PATCH 042/104] Quiet debconf headless complaint. --- scripts/forks/chia_launch.sh | 9 +++++++-- scripts/forks/mmx_launch.sh | 11 ++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/scripts/forks/chia_launch.sh b/scripts/forks/chia_launch.sh index 0ce893d25..ccfc17580 100644 --- a/scripts/forks/chia_launch.sh +++ b/scripts/forks/chia_launch.sh @@ -85,18 +85,23 @@ done chmod 755 -R /root/.chia/mainnet/config/ssl/ &> /dev/null chia init --fix-ssl-permissions > /dev/null -# Initial support for GPUs used when plotting/farming -if [[ ${OPENCL_GPU} == 'nvidia' ]]; then +# Support for GPUs used when plotting/farming +if [[ ${OPENCL_GPU} == 'nvidia' ]]; then mkdir -p /etc/OpenCL/vendors echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd + echo "Enabling Nvidia GPU support inside this container." elif [[ ${OPENCL_GPU} == 'amd' ]]; then pushd /tmp > /dev/null + echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections apt-get update 2>&1 > /tmp/amdgpu_setup.log amdgpu-install -y --usecase=opencl --opencl=rocr --no-dkms --no-32 --accept-eula 2>&1 >> /tmp/amdgpu_setup.log popd > /dev/null + echo "Enabling AMD GPU support inside this container." elif [[ ${OPENCL_GPU} == 'intel' ]]; then + echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections apt-get update 2>&1 > /tmp/intelgpu_setup.log apt-get install -y intel-opencl-icd 2>&1 >> /tmp/intelgpu_setup.log + echo "Enabling Intel GPU support inside this container." fi # Start services based on mode selected. Default is 'fullnode' diff --git a/scripts/forks/mmx_launch.sh b/scripts/forks/mmx_launch.sh index c18d6dc1a..8687ec80e 100644 --- a/scripts/forks/mmx_launch.sh +++ b/scripts/forks/mmx_launch.sh @@ -31,17 +31,22 @@ fi escaped_plot_dirs=$(printf '%s\n' "$plot_dirs" | sed -e 's/[\/&]/\\&/g') sed -i "s/\"plot_dirs\":.*$/\"plot_dirs\": [ $escaped_plot_dirs ]/g" /root/.chia/mmx/config/local/Harvester.json -if [[ ${OPENCL_GPU} == 'nvidia' ]]; then +# Support for GPUs used when plotting/farming +if [[ ${OPENCL_GPU} == 'nvidia' ]]; then mkdir -p /etc/OpenCL/vendors echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd + echo "Enabling Nvidia GPU support inside this container." elif [[ ${OPENCL_GPU} == 'amd' ]]; then - pushd /tmp + pushd /tmp > /dev/null + echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections apt-get update 2>&1 > /tmp/amdgpu_setup.log amdgpu-install -y --usecase=opencl --opencl=rocr --no-dkms --no-32 --accept-eula 2>&1 >> /tmp/amdgpu_setup.log - popd + popd > /dev/null + echo "Enabling AMD GPU support inside this container." elif [[ ${OPENCL_GPU} == 'intel' ]]; then apt-get update 2>&1 > /tmp/intelgpu_setup.log apt-get install -y intel-opencl-icd 2>&1 >> /tmp/intelgpu_setup.log + echo "Enabling Intel GPU support inside this container." else echo "No OPENCL_GPU provided. MMX blockchain will use use CPU instead." fi From 3ac446d9f5c73ff56edab3b3c7732211a0512e9e Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 22 Jan 2023 17:48:31 -0700 Subject: [PATCH 043/104] Needs libnuma1 --- scripts/forks/chia_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/forks/chia_install.sh b/scripts/forks/chia_install.sh index 236eb6f63..0e9085730 100644 --- a/scripts/forks/chia_install.sh +++ b/scripts/forks/chia_install.sh @@ -12,7 +12,7 @@ else rm -rf /root/.cache apt-get update && apt-get install -y dialog apt-utils # Install dependencies for GPU support - apt-get install -y git cmake build-essential ocl-icd-opencl-dev clinfo screen initramfs-tools ocl-icd-libopencl1 opencl-headers + apt-get install -y git cmake build-essential ocl-icd-opencl-dev clinfo screen initramfs-tools ocl-icd-libopencl1 opencl-headers libnuma1 # For AMDGPU, install the amdgpu-install stub, optionally invoked later if OPENCL_GPU=amd at launch time curl -O http://repo.radeon.com/amdgpu-install/22.20.5/ubuntu/jammy/amdgpu-install_22.20.50205-1_all.deb apt-get install -y ./amdgpu-install_22.20.50205-1_all.deb From e7b836b7713316fd9c4147961d1c5bc28b660bd7 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 23 Jan 2023 10:53:57 -0700 Subject: [PATCH 044/104] Fix for Leaft lib pull during image build. --- scripts/pull_3rd_party_libs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pull_3rd_party_libs.sh b/scripts/pull_3rd_party_libs.sh index c26f4f8c8..c49c120a8 100755 --- a/scripts/pull_3rd_party_libs.sh +++ b/scripts/pull_3rd_party_libs.sh @@ -39,7 +39,7 @@ unzip -q -o -j ${BASEPATH}/bs.zip -d $BASEPATH/ bootstrap-${BOOTSTRAP_VERSION}*/ rm -f ${BASEPATH}/bs.zip # Leaflet and plugins -wget -O ${BASEPATH}/leaflet.zip -nv "https://leafletjs-cdn.s3.amazonaws.com/content/leaflet/v{$LEAFLET_VERSION}/leaflet.zip" && \ +wget -O ${BASEPATH}/leaflet.zip -nv "https://leafletjs-cdn.s3.amazonaws.com/content/leaflet/v${LEAFLET_VERSION}/leaflet.zip" && \ unzip -q -o ${BASEPATH}/leaflet.zip -d $BASEPATH/ && \ rm -f ${BASEPATH}/leaflet.zip wget -O ${BASEPATH}/leaflet-layervisibility.js -nv "https://unpkg.com/leaflet-layervisibility/dist/leaflet-layervisibility.js" From b7890d50b52a58ef18400eb99b561465e3063346 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 23 Jan 2023 15:05:15 -0700 Subject: [PATCH 045/104] Job jitter all the things. --- api/gunicorn.conf.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/api/gunicorn.conf.py b/api/gunicorn.conf.py index 43ff4755b..e0b4ad114 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -30,20 +30,19 @@ def on_starting(server): try: schedule_every_x_minutes = app.config['STATUS_EVERY_X_MINUTES'] JOB_FREQUENCY = 60 * int(schedule_every_x_minutes) - JOB_JITTER = JOB_FREQUENCY / 2 except: app.logger.info("Failed to configure job schedule frequency in minutes as setting was: '{0}'".format(schedule_every_x_minutes)) - JOB_FREQUENCY = 60 # once a minute - JOB_JITTER = 30 # 30 seconds + JOB_FREQUENCY = 120 # once every two minutes app.logger.info("Scheduler frequency will be once every {0} seconds.".format(JOB_FREQUENCY)) + JOB_JITTER = JOB_FREQUENCY / 2 # Every single container should report as a worker scheduler.add_job(func=status_worker.update, name="status_workers", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) # Collect disk stats from all modes where blockchain is chia, avoiding duplicate disks from multiple forks on same host if 'chia' in globals.enabled_blockchains(): - scheduler.add_job(func=stats_disk.collect, name="stats_disk", trigger='cron', minute="*/10") # Every 10 minutes - scheduler.add_job(func=status_drives.update, name="status_drives", trigger='cron', minute="*/15") # Every 15 minutes + scheduler.add_job(func=stats_disk.collect, name="stats_disk", trigger='cron', minute="*/10", jitter=JOB_JITTER) # Every 10 minutes + scheduler.add_job(func=status_drives.update, name="status_drives", trigger='cron', minute="*/15", jitter=JOB_JITTER) # Every 15 minutes # MMX needs to report plots from harvesters directly as they are not listed via the fullnode like Chia does if not utils.is_fullnode() and globals.harvesting_enabled() and 'mmx' in globals.enabled_blockchains(): @@ -57,7 +56,7 @@ def on_starting(server): scheduler.add_job(func=log_rotate.execute, name="log_rotate", trigger='cron', minute=0) # Hourly if globals.farming_enabled() and 'chia' in globals.enabled_blockchains(): # For now, only Chia fullnodes - scheduler.add_job(func=status_warnings.collect, name="status_warnings", trigger='cron', minute="*/20") # Every 20 minutes + scheduler.add_job(func=status_warnings.collect, name="status_warnings", trigger='cron', minute="*/20", jitter=JOB_JITTER) # Every 20 minutes # Status for plotters if globals.plotting_enabled(): @@ -73,10 +72,10 @@ def on_starting(server): scheduler.add_job(func=status_connections.update, name="status_connections", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) scheduler.add_job(func=status_keys.update, name="status_keys", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) scheduler.add_job(func=status_farm.update, name="status_farm", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) - scheduler.add_job(func=stats_blocks.collect, name="status_blocks", trigger='interval', minutes=10, jitter=0) - scheduler.add_job(func=restart_stuck_farmer.execute, name="status_blockchain_sync", trigger='interval', minutes=5, jitter=0) - scheduler.add_job(func=periodically_sync_wallet.execute, name="status_wallet_sync", trigger='interval', minutes=15, jitter=0) - scheduler.add_job(func=nft_recover.execute, name="status_nft_recover", trigger='interval', hours=1) # Once an hour + scheduler.add_job(func=stats_blocks.collect, name="status_blocks", trigger='interval', minutes=10, jitter=JOB_JITTER) + scheduler.add_job(func=restart_stuck_farmer.execute, name="status_blockchain_sync", trigger='interval', minutes=5, jitter=JOB_JITTER) + scheduler.add_job(func=periodically_sync_wallet.execute, name="status_wallet_sync", trigger='interval', minutes=15, jitter=JOB_JITTER) + scheduler.add_job(func=nft_recover.execute, name="status_nft_recover", trigger='interval', hours=1, jitter=JOB_JITTER) # Once an hour if globals.enabled_blockchains()[0] in plottings.PLOTTABLE_BLOCKCHAINS: # Only get plot listing from these three blockchains scheduler.add_job(func=status_plots.update, name="status_plots", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) if globals.enabled_blockchains()[0] in pools.POOLABLE_BLOCKCHAINS: # Only get pool submissions from poolable blockchains @@ -92,7 +91,7 @@ def on_starting(server): scheduler.add_job(func=websvcs.get_prices, name="status_exchange_prices", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) scheduler.add_job(func=websvcs.get_chain_statuses, name="status_blockchain_networks", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) scheduler.add_job(func=geolocate_peers.execute, name="stats_geolocate_peers", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) - scheduler.add_job(func=stats_balances.collect, name="stats_balances", trigger='cron', minute=0) # Hourly + scheduler.add_job(func=stats_balances.collect, name="stats_balances", trigger='cron', minute=0, jitter=JOB_JITTER) # Hourly scheduler.add_job(func=plots_replot.execute, name="replot_check", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) # Testing only From 76380f8737d47752b68da098b2d6e0bc61fa9bc0 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 24 Jan 2023 20:07:22 -0700 Subject: [PATCH 046/104] Cactus 1.6.2 --- CHANGELOG.md | 2 +- scripts/forks/cactus_install.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e1ab6014..97fcd2856 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. The format - Multiple functionality & performance cleanups from excellent code review by @qoole. ## Updated - [BTCGreen](https://github.com/BTCgreen-Network/btcgreen-blockchain/releases/tag/1.7.0b) to v1.7.0b + - [Cactus](https://github.com/Cactus-Network/cactus-blockchain/releases/tag/1.6.2) to v1.6.2 - [Chives](https://github.com/HiveProject2021/chives-blockchain/releases/tag/1.5.3) to v1.5.3, including staking. - [SHIBGreen](https://github.com/BTCgreen-Network/shibgreen-blockchain/releases/tag/1.7.0b) to v1.7.0b - [Staicoin](https://github.com/STATION-I/stai-blockchain/releases/tag/1.3.0) to v1.3.0. Note, they require a fresh `config.yaml`. @@ -36,7 +37,6 @@ All notable changes to this project will be documented in this file. The format - Improved "Settings | Pools" page with fee amount and `delete_unconfirmed_transactions` action. ### Updated - [Bladebit](https://github.com/Chia-Network/bladebit/releases/tag/v2.0.1) to v2.0.1 - - [Cactus](https://github.com/Cactus-Network/cactus-blockchain/releases/tag/1.7.0) to v1.7.0 - [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/1.6.2) to v1.6.2 - [Chinilla](https://github.com/Chinilla/chinilla-blockchain/releases/tag/1.4.0) to v1.4.0 - [Chiadog](https://github.com/guydavis/chiadog/releases/tag/v0.7.5) to v0.7.5 diff --git a/scripts/forks/cactus_install.sh b/scripts/forks/cactus_install.sh index 0216d34a7..fb5e17872 100644 --- a/scripts/forks/cactus_install.sh +++ b/scripts/forks/cactus_install.sh @@ -4,8 +4,8 @@ # CACTUS_BRANCH=$1 -# On 2022-12-08 -HASH=5789962eba648c5532f1f54fc12057862b7be009 +# On 2023-01-24 +HASH=1999f8921050bd034b7af46f665e5d268cfb397d if [ -z ${CACTUS_BRANCH} ]; then echo 'Skipping Cactus install as not requested.' From 8e57a3ca1a5ebdc34538c0e5b3fa5b2415ad20f7 Mon Sep 17 00:00:00 2001 From: fufar Date: Wed, 25 Jan 2023 19:31:35 +0600 Subject: [PATCH 047/104] first try --- .github/workflows/develop-chives-foxy.yaml | 50 +++++++++++ .github/workflows/main-chives-foxy.yaml | 51 +++++++++++ .github/workflows/test-chives-foxy.yaml | 49 ++++++++++ common/config/blockchains.json | 19 +++- config/chiadog/chives-foxy.sample.yaml | 91 +++++++++++++++++++ docker/dockerfile | 6 +- scripts/forks/chives_foxy_install.sh | 24 +++++ scripts/forks/chives_foxy_launch.sh | 100 +++++++++++++++++++++ web/templates/worker_launch.html | 38 +++++--- 9 files changed, 414 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/develop-chives-foxy.yaml create mode 100644 .github/workflows/main-chives-foxy.yaml create mode 100644 .github/workflows/test-chives-foxy.yaml create mode 100644 config/chiadog/chives-foxy.sample.yaml create mode 100644 scripts/forks/chives_foxy_install.sh create mode 100644 scripts/forks/chives_foxy_launch.sh diff --git a/.github/workflows/develop-chives-foxy.yaml b/.github/workflows/develop-chives-foxy.yaml new file mode 100644 index 000000000..a3f98feb9 --- /dev/null +++ b/.github/workflows/develop-chives-foxy.yaml @@ -0,0 +1,50 @@ +name: develop-chives-foxy + +on: + push: + branches: + - 'develop' + +jobs: + docker: + runs-on: ubuntu-20.04 + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64 + push: true + build-args: | + "UBUNTU_VER=focal" + "MACHINARIS_STREAM=develop" + "CHIADOG_BRANCH=dev" + "CHIVES_FOXY_BRANCH=1.5.1" + "PLOTMAN_BRANCH=development" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:develop + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:develop diff --git a/.github/workflows/main-chives-foxy.yaml b/.github/workflows/main-chives-foxy.yaml new file mode 100644 index 000000000..7aeaa9d46 --- /dev/null +++ b/.github/workflows/main-chives-foxy.yaml @@ -0,0 +1,51 @@ +name: release-chives-foxy + +on: + workflow_dispatch: + inputs: + version: + description: 'Release Version' + +jobs: + docker: + runs-on: ubuntu-20.04 + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64,linux/arm64 + push: true + build-args: | + "UBUNTU_VER=focal" + "MACHINARIS_STREAM=latest" + "CHIVES_FOXY_BRANCH=1.5.1" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:latest + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:v${{ github.event.inputs.version }} + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:latest + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:v${{ github.event.inputs.version }} diff --git a/.github/workflows/test-chives-foxy.yaml b/.github/workflows/test-chives-foxy.yaml new file mode 100644 index 000000000..e6c228528 --- /dev/null +++ b/.github/workflows/test-chives-foxy.yaml @@ -0,0 +1,49 @@ +name: test-chives-foxy + +on: + push: + branches: + - 'integration' + +jobs: + docker: + runs-on: ubuntu-20.04 + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64,linux/arm64 + push: true + build-args: | + "UBUNTU_VER=focal" + "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" + "CHIVES_FOXY_BRANCH=1.5.1" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:test + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:test diff --git a/common/config/blockchains.json b/common/config/blockchains.json index 4201aceb3..f11a1c67a 100644 --- a/common/config/blockchains.json +++ b/common/config/blockchains.json @@ -118,6 +118,23 @@ "discord_url": "https://discord.gg/9aAbYNqjtA", "website_url": "https://www.chivescoin.org/" }, + "chives-foxy": { + "name": "Chives Foxy", + "symbol": "XCC" , + "binary": "/chives-foxy-blockchain/venv/bin/chives", + "network_path": "/root/.chives-foxy/mainnet", + "network_name": "mainnet", + "network_port": 9699, + "farmer_port": 9647, + "fullnode_rpc_port": 9755, + "worker_port": 8931, + "reward": 180.0, + "mojos_per_coin": 100000000, + "blocks_per_day": 4608, + "git_url": "https://github.com/foxypool/chives-blockchain", + "discord_url": "https://discord.gg/foxy-582180216747720723", + "website_url": "https://chives-og.foxypool.io/" + }, "coffee": { "name": "Coffee", "symbol": "XCF" , @@ -507,4 +524,4 @@ "discord_url": null, "website_url": "http://wheat.top/" } -} \ No newline at end of file +} diff --git a/config/chiadog/chives-foxy.sample.yaml b/config/chiadog/chives-foxy.sample.yaml new file mode 100644 index 000000000..307e2f368 --- /dev/null +++ b/config/chiadog/chives-foxy.sample.yaml @@ -0,0 +1,91 @@ +# This is useful to differentiate multiple +# instances monitoring multiple harvesters +notification_title_prefix: '$HOSTNAME-chives-foxy' +log_level: INFO +coin_name: 'chives' +coin_symbol: 'xcc' + +# Only one consumer can be enabled at a time, you can +# delete the section for the consumer which you aren't using +# DON'T CHANGE file_path IT'S ALREADY SET IN-CONTAINER FOR MACHINARIS! +chia_logs: + file_log_consumer: + enable: true + prefix: 'chives' + file_path: '~/.chives-foxy/mainnet/log/debug.log' + +# Enable this and chiadog will ping a remote server every 5 minutes +# That way you can know that the monitoring is running as expected +#keep_alive_monitor: +# enable_remote_ping: false +# ping_url: '' + +# Enable this and you'll receive a daily summary notification +# on your farm performance at the specified time of the day. +daily_stats: + enable: true + time_of_day: 21 + +# We support a lot of notifiers, please check the README for more +# information. You can delete the sections which you aren't using. +# You can also enable more than one notifier and send different +# notifications to each of them. E.g. enable daily_stats only to E-mail. +# If you enable wallet_events you'll get notifications anytime your +# wallet receives some XCH (e.g. farming reward). +notifier: + pushover: + enable: false + daily_stats: true + wallet_events: true + credentials: + api_token: 'dummy_token' + user_key: 'dummy_key' + telegram: + enable: false + daily_stats: true + wallet_events: true + credentials: + bot_token: 'dummy_bot_token' + chat_id: 'dummy_chat_id' + smtp: + enable: false + daily_stats: true + wallet_events: true + credentials: + sender: 'chives@example.com' + sender_name: 'Machinaris' + recipient: 'you@example.com' + username_smtp: 'username' + password_smtp: 'password' + host: 'smtp.example.com' + port: 587 + script: + # DON'T CHANGE THIS SCRIPT NOTIFIER, IT'S USED BY MACHINARIS! + enable: true + daily_stats: true + wallet_events: true + script_path: '/root/.chia/chiadog/notifier.sh' + discord: + enable: false + daily_stats: true + wallet_events: true + credentials: + webhook_url: 'https://discord.com/api/webhooks/...' + slack: + enable: false + daily_stats: true + wallet_events: true + credentials: + webhook_url: 'https://hooks.slack.com/services/...' + mqtt: + enable: false + daily_stats: true + wallet_events: true + topic: flax/chivesdog/alert + qos: 1 + retain: false + credentials: + host: '192.168.0.10' + port: 8883 + username: '' + password: '' diff --git a/docker/dockerfile b/docker/dockerfile index 20857515d..4185df338 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -17,6 +17,7 @@ ARG CACTUS_BRANCH ARG CHIA_BRANCH ARG CHINILLA_BRANCH ARG CHIVES_BRANCH +ARG CHIVES_FOXY_BRANCH ARG COFFEE_BRANCH ARG CRYPTODOGE_BRANCH ARG ECOSTAKE_BRANCH @@ -55,6 +56,7 @@ RUN \ && /usr/bin/bash /machinaris/scripts/forks/cactus_install.sh ${CACTUS_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/chia_install.sh ${CHIA_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/chives_install.sh ${CHIVES_BRANCH} \ + && /usr/bin/bash /machinaris/scripts/forks/chives_foxy_install.sh ${CHIVES_FOXY_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/chinilla_install.sh ${CHINILLA_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/coffee_install.sh ${COFFEE_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/cryptodoge_install.sh ${CRYPTODOGE_BRANCH} \ @@ -89,11 +91,11 @@ RUN \ /var/tmp/* # Provide a colon-separated list of in-container paths to your mnemonic keys -ENV keys="/root/.chia/mnemonic.txt" +ENV keys="/root/.chia/mnemonic.txt" # Provide a colon-separated list of in-container paths to your completed plots ENV plots_dir="/plots" # One of fullnode, farmer, harvester, plotter, farmer+plotter, harvester+plotter. Default is fullnode -ENV mode="fullnode" +ENV mode="fullnode" # The single blockchain to run: chia, flax, nchain, hddcoin, chives, etc ENV blockchains="chia" # If provided then these optional 3 public keys will be set in your plotman.yaml diff --git a/scripts/forks/chives_foxy_install.sh b/scripts/forks/chives_foxy_install.sh new file mode 100644 index 000000000..c53433fcc --- /dev/null +++ b/scripts/forks/chives_foxy_install.sh @@ -0,0 +1,24 @@ +#!/bin/env bash +# +# Installs Chives as per https://github.com/foxypool/chives-blockchain +# + +CHIVES_FOXY_BRANCH=$1 + +if [ -z ${CHIVES_FOXY_BRANCH} ]; then + echo 'Skipping Chives install as not requested.' +else + git clone --branch ${CHIVES_FOXY_BRANCH} --recurse-submodules https://github.com/foxypool/chives-blockchain.git /chives-foxy-blockchain + cd /chives-foxy-blockchain + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh + + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /chives-foxy-blockchain /chia-blockchain + ln -s /chives-foxy-blockchain/venv/bin/chives /chia-blockchain/venv/bin/chia + fi +fi diff --git a/scripts/forks/chives_foxy_launch.sh b/scripts/forks/chives_foxy_launch.sh new file mode 100644 index 000000000..e0fd0672e --- /dev/null +++ b/scripts/forks/chives_foxy_launch.sh @@ -0,0 +1,100 @@ +#!/bin/env bash +# +# Initialize Chives Foxy service, depending on mode of system requested +# + +cd /chives-foxy-blockchain + +. ./activate + +# Only the /root/.chia folder is volume-mounted so store chives within +mkdir -p /root/.chia/chives-foxy +rm -f /root/.chives-foxy +ln -s /root/.chia/chives-foxy /root/.chives-foxy + +if [[ "${blockchain_db_download}" == 'true' ]] \ + && [[ "${mode}" == 'fullnode' ]] \ + && [[ ! -f /root/.chives-foxy/mainnet/db/blockchain_v1_mainnet.sqlite ]] \ + && [[ ! -f /root/.chives-foxy/mainnet/db/blockchain_v2_mainnet.sqlite ]]; then + echo "Sorry, Chives does not offer a recent blockchain DB for download. Standard sync will happen over a few days." + echo "It is recommended to add some peer node connections on the Connections page of Machinaris." +fi + +mkdir -p /root/.chives-foxy/mainnet/log +chives init >> /root/.chives-foxy/mainnet/log/init.log 2>&1 + +echo 'Configuring Chives...' +if [ -f /root/.chives-foxy/mainnet/config/config.yaml ]; then + sed -i 's/log_stdout: true/log_stdout: false/g' /root/.chives-foxy/mainnet/config/config.yaml + sed -i 's/log_level: WARNING/log_level: INFO/g' /root/.chives-foxy/mainnet/config/config.yaml + sed -i 's/localhost/127.0.0.1/g' /root/.chives-foxy/mainnet/config/config.yaml +fi +# Loop over provided list of key paths +for k in ${keys//:/ }; do + if [[ "${k}" == "persistent" ]]; then + echo "Not touching key directories." + elif [ -s ${k} ]; then + echo "Adding key at path: ${k}" + chives keys add -f ${k} > /dev/null + fi +done + +# Loop over provided list of completed plot directories +IFS=':' read -r -a array <<< "$plots_dir" +joined=$(printf ", %s" "${array[@]}") +echo "Adding plot directories at: ${joined:1}" +for p in ${plots_dir//:/ }; do + chives plots add -d ${p} +done + +# Start services based on mode selected. Default is 'fullnode' +if [[ ${mode} == 'fullnode' ]]; then + for k in ${keys//:/ }; do + while [[ "${k}" != "persistent" ]] && [[ ! -s ${k} ]]; do + echo 'Waiting for key to be created/imported into mnemonic.txt. See: http://localhost:8926' + sleep 10 # Wait 10 seconds before checking for mnemonic.txt presence + if [ -s ${k} ]; then + chives keys add -f ${k} + sleep 10 + fi + done + done + if [ -f /root/.chia/machinaris/config/wallet_settings.json ]; then + chives start farmer-no-wallet + else + chives start farmer + fi +elif [[ ${mode} =~ ^farmer.* ]]; then + if [ ! -f ~/.chives-foxy/mainnet/config/ssl/wallet/public_wallet.key ]; then + echo "No wallet key found, so not starting farming services. Please add your Chia mnemonic.txt to the ~/.machinaris/ folder and restart." + else + chives start farmer-only + fi +elif [[ ${mode} =~ ^harvester.* ]]; then + if [[ -z ${farmer_address} || -z ${farmer_port} ]]; then + echo "A farmer peer address and port are required." + exit + else + if [ ! -f /root/.chives-foxy/farmer_ca/chives_ca.crt ]; then + mkdir -p /root/.chives-foxy/farmer_ca + response=$(curl --write-out '%{http_code}' --silent http://${farmer_address}:8931/certificates/?type=chives --output /tmp/certs.zip) + if [ $response == '200' ]; then + unzip /tmp/certs.zip -d /root/.chives/farmer_ca + else + echo "Certificates response of ${response} from http://${farmer_address}:8931/certificates/?type=chives. Is the fork's fullnode container running?" + fi + rm -f /tmp/certs.zip + fi + if [[ -f /root/.chives-foxy/farmer_ca/chives_ca.crt ]] && [[ ! ${keys} == "persistent" ]]; then + chives init -c /root/.chives-foxy/farmer_ca 2>&1 > /root/.chives-foxy/mainnet/log/init.log + else + echo "Did not find your farmer's certificates within /root/.chives-foxy/farmer_ca." + echo "See: https://github.com/guydavis/machinaris/wiki/Workers#harvester" + fi + chives configure --set-farmer-peer ${farmer_address}:${farmer_port} + chives configure --enable-upnp false + chives start harvester -r + fi +elif [[ ${mode} == 'plotter' ]]; then + echo "Starting in Plotter-only mode. Run Plotman from either CLI or WebUI." +fi diff --git a/web/templates/worker_launch.html b/web/templates/worker_launch.html index 4be358e4a..79a55a776 100644 --- a/web/templates/worker_launch.html +++ b/web/templates/worker_launch.html @@ -53,7 +53,7 @@
-
@@ -176,6 +176,9 @@ if (blockchain == 'chives') { return 8931; } + if (blockchain == 'chives-foxy') { + return 8931; + } if (blockchain == 'coffee') { return 8954; } @@ -270,6 +273,9 @@ if (blockchain == 'chives') { return 9647; } + if (blockchain == 'chives-foxy') { + return 9647; + } if (blockchain == 'coffee') { return 33847; } @@ -354,10 +360,10 @@ for(var i = 0; i < blockchains.length; ++i) { if (blockchains[i].checked) { var blockchain = blockchains[i].value - if (!document.getElementById('mode-harvester').checked && + if (!document.getElementById('mode-harvester').checked && document.getElementById('mode-plotter').checked && - blockchain != "chia" && blockchain != "chives") { - continue; // Don't add plotter-only containers for forks beyond Chia & Chives + blockchain != "chia" && blockchain != "chives" && blockchain != "chives-foxy") { + continue; // Don't add plotter-only containers for forks beyond Chia & Chives & Chives-foxy } if (blockchain == "chia") { cmd += " machinaris:" + line_end; @@ -393,7 +399,7 @@ if (is_first_loop_pass) { // Record error on first pass if (volume_host_path.endsWith(':')) { errors.push("{{_('Invalid host path ending with colon. Try adding a slash to the end like this')}} " + volume_host_path + '/'); - } + } if (!volume_host_path) { errors.push("{{_('Empty host path provided for volume at ')}}" + volume_container_path + "'. {{_('Please provide a host path.')}}"); } else if (!volume_container_path) { @@ -403,6 +409,9 @@ if ((blockchain == "chives") && ($('#volume_type' + index).val() == 'plots')) { volume_host_path += '/chives' } + if ((blockchain == "chives-foxy") && ($('#volume_type' + index).val() == 'plots')) { + volume_host_path += '/chives-foxy' + } if ((blockchain == "mmx") && ($('#volume_type' + index).val() == 'plots')) { volume_host_path += '/mmx' } @@ -421,7 +430,7 @@ var farmer_port = lookup_farmer_port(blockchain); cmd += ' - farmer_port=' + farmer_port + line_end; } - if ((blockchain == "chia" || blockchain == "chives") && (document.getElementById('mode-plotter').checked)) { + if ((blockchain == "chia" || blockchain == "chives" || blockchain == "foxy-chives") && (document.getElementById('mode-plotter').checked)) { if (mode) { mode += ',plotter'; } @@ -479,11 +488,11 @@ } return cmd; } - function valid_ip_addr(ipaddress) { - if (/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(ipaddress)) { - return (true) - } - return (false) + function valid_ip_addr(ipaddress) { + if (/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(ipaddress)) { + return (true) + } + return (false) } $(document).ready(function () { $('#plotting_keys_row').hide(); @@ -665,6 +674,13 @@

{{_('Machinaris Worker - Launch Config')}}

Chives
+
+ + +
From 15fd963b62c63d7776938c24926101a377935d79 Mon Sep 17 00:00:00 2001 From: fufar Date: Wed, 25 Jan 2023 19:35:16 +0600 Subject: [PATCH 048/104] Update CREDITS.md --- CREDITS.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CREDITS.md b/CREDITS.md index 5fc6b7bef..cd9c5a2e8 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -32,6 +32,7 @@ A huge thank-you to the great teams/devs behind these projects, being used by Ma * [BTCgreen](https://github.com/BTCgreen-Network/btcgreen-blockchain) * [Cactus](https://github.com/Cactus-Network/cactus-blockchain) * [Chives](https://github.com/HiveProject2021/chives-blockchain) +* [Chives-foxy](https://github.com/foxypool/chives-blockchain) * [Cryptodoge](https://github.com/CryptoDoge-Network/cryptodoge) * [Flax](https://github.com/Flax-Network/flax-blockchain) * [Flora](https://github.com/Flora-Network/flora-blockchain) @@ -44,7 +45,7 @@ A huge thank-you to the great teams/devs behind these projects, being used by Ma * [Stor](https://github.com/Stor-Network/stor-blockchain) ## Other Resources -* [FD-CLI](https://github.com/Flora-Network/flora-dev-cli) - script to regularly recover 7/8 rewards +* [FD-CLI](https://github.com/Flora-Network/flora-dev-cli) - script to regularly recover 7/8 rewards * [Chia DB Downloads](https://www.chia-database.com/) - for Chia blockchain database * [All the Blocks](https://alltheblocks.net/) - blockchain, wallet, and pricing info * [Coin Gecko](https://coingecko.com/) - fiat currency exchange info @@ -104,4 +105,4 @@ A big thanks to all that contributed with dev and test including: * DeathandDestruction ## 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 +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.* From 87eef9096eb358b8472031cbb9065ad25ef1ac17 Mon Sep 17 00:00:00 2001 From: fufar Date: Wed, 25 Jan 2023 22:06:00 +0600 Subject: [PATCH 049/104] Update main-chives-foxy.yaml --- .github/workflows/main-chives-foxy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main-chives-foxy.yaml b/.github/workflows/main-chives-foxy.yaml index 7aeaa9d46..933a9088f 100644 --- a/.github/workflows/main-chives-foxy.yaml +++ b/.github/workflows/main-chives-foxy.yaml @@ -43,7 +43,7 @@ jobs: build-args: | "UBUNTU_VER=focal" "MACHINARIS_STREAM=latest" - "CHIVES_FOXY_BRANCH=1.5.1" + "CHIVES_FOXY_BRANCH=1.5.3" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:latest ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:v${{ github.event.inputs.version }} From 41dc42853b1987d572da28e6318249722c38d8e4 Mon Sep 17 00:00:00 2001 From: fufar Date: Wed, 25 Jan 2023 22:06:21 +0600 Subject: [PATCH 050/104] Update develop-chives-foxy.yaml --- .github/workflows/develop-chives-foxy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop-chives-foxy.yaml b/.github/workflows/develop-chives-foxy.yaml index a3f98feb9..d7f8c38c8 100644 --- a/.github/workflows/develop-chives-foxy.yaml +++ b/.github/workflows/develop-chives-foxy.yaml @@ -43,7 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "CHIVES_FOXY_BRANCH=1.5.1" + "CHIVES_FOXY_BRANCH=1.5.3" "PLOTMAN_BRANCH=development" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:develop From 4faecb7da4b0a40964f5b11c3730725690e80089 Mon Sep 17 00:00:00 2001 From: fufar Date: Wed, 25 Jan 2023 22:06:34 +0600 Subject: [PATCH 051/104] Update test-chives-foxy.yaml --- .github/workflows/test-chives-foxy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-chives-foxy.yaml b/.github/workflows/test-chives-foxy.yaml index e6c228528..7cfb8b325 100644 --- a/.github/workflows/test-chives-foxy.yaml +++ b/.github/workflows/test-chives-foxy.yaml @@ -43,7 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=test" "CHIADOG_BRANCH=dev" - "CHIVES_FOXY_BRANCH=1.5.1" + "CHIVES_FOXY_BRANCH=1.5.3" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:test ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:test From c2381f610212982e4e2f55837e8ecf20c860dea3 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 25 Jan 2023 09:54:51 -0700 Subject: [PATCH 052/104] Convert tabs to spaces for indentation. --- scripts/forks/apple_install.sh | 34 +++++----- scripts/forks/ballcoin_install.sh | 30 ++++----- scripts/forks/bpx_install.sh | 36 +++++----- scripts/forks/cactus_install.sh | 32 ++++----- scripts/forks/chinilla_install.sh | 34 +++++----- scripts/forks/chives_install.sh | 26 ++++---- scripts/forks/coffee_install.sh | 36 +++++----- scripts/forks/cryptodoge_install.sh | 30 ++++----- scripts/forks/ecostake_install.sh | 36 +++++----- scripts/forks/flax_install.sh | 34 +++++----- scripts/forks/flora_install.sh | 36 +++++----- scripts/forks/gold_install.sh | 36 +++++----- scripts/forks/greenbtc_install.sh | 36 +++++----- scripts/forks/hddcoin_install.sh | 34 +++++----- scripts/forks/littlelambocoin_install.sh | 34 +++++----- scripts/forks/maize_install.sh | 38 +++++------ scripts/forks/mint_install.sh | 36 +++++----- scripts/forks/mmx_install.sh | 42 ++++++------ scripts/forks/mmx_launch.sh | 84 ++++++++++++------------ scripts/forks/moon_install.sh | 38 +++++------ scripts/forks/nchain_install.sh | 32 ++++----- scripts/forks/one_install.sh | 32 ++++----- scripts/forks/petroleum_install.sh | 36 +++++----- scripts/forks/pipscoin_install.sh | 32 ++++----- scripts/forks/profit_install.sh | 36 +++++----- scripts/forks/shibgreen_install.sh | 32 ++++----- scripts/forks/silicoin_install.sh | 36 +++++----- scripts/forks/staicoin_install.sh | 30 ++++----- scripts/forks/stor_install.sh | 34 +++++----- scripts/forks/tad_install.sh | 32 ++++----- scripts/forks/wheat_install.sh | 36 +++++----- 31 files changed, 555 insertions(+), 555 deletions(-) diff --git a/scripts/forks/apple_install.sh b/scripts/forks/apple_install.sh index 48eb6449d..1625bca84 100644 --- a/scripts/forks/apple_install.sh +++ b/scripts/forks/apple_install.sh @@ -8,24 +8,24 @@ APPLE_BRANCH=$1 HASH=c4884b2774d1cf4a9ff8816ecd7b4e6676335c2c if [ -z ${APPLE_BRANCH} ]; then - echo 'Skipping Apple install as not requested.' + echo 'Skipping Apple install as not requested.' else - rm -rf /root/.cache - git clone --branch ${APPLE_BRANCH} --single-branch https://github.com/Apple-Network/apple-blockchain.git /apple-blockchain - cd /apple-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + rm -rf /root/.cache + git clone --branch ${APPLE_BRANCH} --single-branch https://github.com/Apple-Network/apple-blockchain.git /apple-blockchain + cd /apple-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 sed -e 's/^ self.log.debug($/ self.log.info(/g' apple/wallet/wallet_state_manager.py - /usr/bin/sh ./install.sh + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /apple-blockchain /chia-blockchain - ln -s /apple-blockchain/venv/bin/apple /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /apple-blockchain /chia-blockchain + ln -s /apple-blockchain/venv/bin/apple /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/ballcoin_install.sh b/scripts/forks/ballcoin_install.sh index 2a30295ec..211ff4060 100644 --- a/scripts/forks/ballcoin_install.sh +++ b/scripts/forks/ballcoin_install.sh @@ -8,21 +8,21 @@ BALLCOIN_BRANCH=$1 HASH=1c60346a5f75e9a489a5904db521336fd9d2d769 if [ -z ${BALLCOIN_BRANCH} ]; then - echo 'Skipping Ballcoin install as not requested.' + echo 'Skipping Ballcoin install as not requested.' else - rm -rf /root/.cache - git clone --branch ${BALLCOIN_BRANCH} --single-branch https://github.com/ball-network/ballcoin-blockchain.git /ballcoin-blockchain - cd /ballcoin-blockchain - git submodule update --init mozilla-ca - chmod +x install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + rm -rf /root/.cache + git clone --branch ${BALLCOIN_BRANCH} --single-branch https://github.com/ball-network/ballcoin-blockchain.git /ballcoin-blockchain + cd /ballcoin-blockchain + git submodule update --init mozilla-ca + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /ballcoin-blockchain /chia-blockchain - ln -s /ballcoin-blockchain/venv/bin/ballcoin /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /ballcoin-blockchain /chia-blockchain + ln -s /ballcoin-blockchain/venv/bin/ballcoin /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/bpx_install.sh b/scripts/forks/bpx_install.sh index 460017ec1..d62b194c3 100644 --- a/scripts/forks/bpx_install.sh +++ b/scripts/forks/bpx_install.sh @@ -8,24 +8,24 @@ BPX_BRANCH=$1 HASH=9c96494c576e112e093d5c7fbab0db531b12bbf8 if [ -z ${BPX_BRANCH} ]; then - echo 'Skipping BPX install as not requested.' + echo 'Skipping BPX install as not requested.' else - rm -rf /root/.cache - git clone --branch ${BPX_BRANCH} --single-branch https://github.com/bpx-network/bpx-blockchain.git /bpx-blockchain - cd /bpx-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 - sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + rm -rf /root/.cache + git clone --branch ${BPX_BRANCH} --single-branch https://github.com/bpx-network/bpx-blockchain.git /bpx-blockchain + cd /bpx-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 + sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /bpx-blockchain /chia-blockchain - ln -s /bpx-blockchain/venv/bin/bpx /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /bpx-blockchain /chia-blockchain + ln -s /bpx-blockchain/venv/bin/bpx /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/cactus_install.sh b/scripts/forks/cactus_install.sh index fb5e17872..21b748f43 100644 --- a/scripts/forks/cactus_install.sh +++ b/scripts/forks/cactus_install.sh @@ -8,23 +8,23 @@ CACTUS_BRANCH=$1 HASH=1999f8921050bd034b7af46f665e5d268cfb397d if [ -z ${CACTUS_BRANCH} ]; then - echo 'Skipping Cactus install as not requested.' + echo 'Skipping Cactus install as not requested.' else - git clone --branch ${CACTUS_BRANCH} --recurse-submodules https://github.com/Cactus-Network/cactus-blockchain.git /cactus-blockchain - cd /cactus-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + git clone --branch ${CACTUS_BRANCH} --recurse-submodules https://github.com/Cactus-Network/cactus-blockchain.git /cactus-blockchain + cd /cactus-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 sed -e 's/^ self.log.debug($/ self.log.info(/g' cactus/wallet/wallet_state_manager.py - /usr/bin/sh ./install.sh + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /cactus-blockchain /chia-blockchain - ln -s /cactus-blockchain/venv/bin/cactus /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /cactus-blockchain /chia-blockchain + ln -s /cactus-blockchain/venv/bin/cactus /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/chinilla_install.sh b/scripts/forks/chinilla_install.sh index 3c830d99e..4297eed50 100644 --- a/scripts/forks/chinilla_install.sh +++ b/scripts/forks/chinilla_install.sh @@ -8,24 +8,24 @@ CHINILLA_BRANCH=$1 HASH=de8119eb8e1cc13418e7df30eb7d73aae900c40a if [ -z ${CHINILLA_BRANCH} ]; then - echo 'Skipping Chinilla install as not requested.' + echo 'Skipping Chinilla install as not requested.' else - rm -rf /root/.cache - git clone --branch ${CHINILLA_BRANCH} --single-branch https://github.com/Chinilla/chinilla-blockchain.git /chinilla-blockchain - cd /chinilla-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + rm -rf /root/.cache + git clone --branch ${CHINILLA_BRANCH} --single-branch https://github.com/Chinilla/chinilla-blockchain.git /chinilla-blockchain + cd /chinilla-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 sed -e 's/^ self.log.debug($/ self.log.info(/g' chinilla/wallet/wallet_state_manager.py - /usr/bin/sh ./install.sh + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /chinilla-blockchain /chia-blockchain - ln -s /chinilla-blockchain/venv/bin/chinilla /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /chinilla-blockchain /chia-blockchain + ln -s /chinilla-blockchain/venv/bin/chinilla /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/chives_install.sh b/scripts/forks/chives_install.sh index 78b1288b0..319823600 100644 --- a/scripts/forks/chives_install.sh +++ b/scripts/forks/chives_install.sh @@ -6,19 +6,19 @@ CHIVES_BRANCH=$1 if [ -z ${CHIVES_BRANCH} ]; then - echo 'Skipping Chives install as not requested.' + echo 'Skipping Chives install as not requested.' else - git clone --branch ${CHIVES_BRANCH} --recurse-submodules https://github.com/HiveProject2021/chives-blockchain.git /chives-blockchain - cd /chives-blockchain - chmod +x install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + git clone --branch ${CHIVES_BRANCH} --recurse-submodules https://github.com/HiveProject2021/chives-blockchain.git /chives-blockchain + cd /chives-blockchain + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /chives-blockchain /chia-blockchain - ln -s /chives-blockchain/venv/bin/chives /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /chives-blockchain /chia-blockchain + ln -s /chives-blockchain/venv/bin/chives /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/coffee_install.sh b/scripts/forks/coffee_install.sh index 86892bea6..15481a553 100644 --- a/scripts/forks/coffee_install.sh +++ b/scripts/forks/coffee_install.sh @@ -8,24 +8,24 @@ COFFEE_BRANCH=$1 HASH=0b2678d3d64722e787e6ee35a690ed6503a5d08c if [ -z ${COFFEE_BRANCH} ]; then - echo 'Skipping Coffee install as not requested.' + echo 'Skipping Coffee install as not requested.' else - rm -rf /root/.cache - git clone --branch ${COFFEE_BRANCH} --single-branch https://github.com/Coffee-Network/coffee-blockchain.git /coffee-blockchain - cd /coffee-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 - sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + rm -rf /root/.cache + git clone --branch ${COFFEE_BRANCH} --single-branch https://github.com/Coffee-Network/coffee-blockchain.git /coffee-blockchain + cd /coffee-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 + sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /coffee-blockchain /chia-blockchain - ln -s /coffee-blockchain/venv/bin/sit /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /coffee-blockchain /chia-blockchain + ln -s /coffee-blockchain/venv/bin/sit /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/cryptodoge_install.sh b/scripts/forks/cryptodoge_install.sh index c2ea961b0..623a83294 100644 --- a/scripts/forks/cryptodoge_install.sh +++ b/scripts/forks/cryptodoge_install.sh @@ -8,21 +8,21 @@ CRYPTODOGE_BRANCH=$1 HASH=02ce973fe88d62c0c0ee106d988e172ee3f5aecf if [ -z ${CRYPTODOGE_BRANCH} ]; then - echo 'Skipping Cryptodoge install as not requested.' + echo 'Skipping Cryptodoge install as not requested.' else - git clone --branch ${CRYPTODOGE_BRANCH} --recurse-submodules https://github.com/CryptoDoge-Network/cryptodoge.git /cryptodoge-blockchain - cd /cryptodoge-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + git clone --branch ${CRYPTODOGE_BRANCH} --recurse-submodules https://github.com/CryptoDoge-Network/cryptodoge.git /cryptodoge-blockchain + cd /cryptodoge-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /cryptodoge-blockchain /chia-blockchain - ln -s /cryptodoge-blockchain/venv/bin/cryptodoge /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /cryptodoge-blockchain /chia-blockchain + ln -s /cryptodoge-blockchain/venv/bin/cryptodoge /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/ecostake_install.sh b/scripts/forks/ecostake_install.sh index fafb9c454..4a090fa50 100644 --- a/scripts/forks/ecostake_install.sh +++ b/scripts/forks/ecostake_install.sh @@ -8,24 +8,24 @@ ECOSTAKE_BRANCH=$1 HASH=8ea8bb9743c7caccb2f8c670853d93ee12d00c86 if [ -z ${ECOSTAKE_BRANCH} ]; then - echo 'Skipping Ecostake install as not requested.' + echo 'Skipping Ecostake install as not requested.' else - rm -rf /root/.cache - git clone --branch ${ECOSTAKE_BRANCH} --single-branch https://github.com/ecostake-network/ecostake-blockchain /ecostake-blockchain - cd /ecostake-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 - sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + rm -rf /root/.cache + git clone --branch ${ECOSTAKE_BRANCH} --single-branch https://github.com/ecostake-network/ecostake-blockchain /ecostake-blockchain + cd /ecostake-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 + sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /ecostake-blockchain /chia-blockchain - ln -s /ecostake-blockchain/venv/bin/sit /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /ecostake-blockchain /chia-blockchain + ln -s /ecostake-blockchain/venv/bin/sit /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/flax_install.sh b/scripts/forks/flax_install.sh index b0900e944..1aff10de8 100644 --- a/scripts/forks/flax_install.sh +++ b/scripts/forks/flax_install.sh @@ -8,24 +8,24 @@ FLAX_BRANCH=$1 HASH=bb8715f3155bb8011a04cc8c05b3fa8133e4c64b if [ -z ${FLAX_BRANCH} ]; then - echo 'Skipping Flax install as not requested.' + echo 'Skipping Flax install as not requested.' else - rm -rf /root/.cache - git clone --branch ${FLAX_BRANCH} --single-branch https://github.com/Flax-Network/flax-blockchain.git /flax-blockchain - cd /flax-blockchain - git checkout $HASH - git submodule update --init mozilla-ca - chmod +x install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + rm -rf /root/.cache + git clone --branch ${FLAX_BRANCH} --single-branch https://github.com/Flax-Network/flax-blockchain.git /flax-blockchain + cd /flax-blockchain + git checkout $HASH + git submodule update --init mozilla-ca + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 sed -e 's/^ self.log.debug($/ self.log.info(/g' flax/wallet/wallet_state_manager.py - /usr/bin/sh ./install.sh + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /flax-blockchain /chia-blockchain - ln -s /flax-blockchain/venv/bin/flax /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /flax-blockchain /chia-blockchain + ln -s /flax-blockchain/venv/bin/flax /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/flora_install.sh b/scripts/forks/flora_install.sh index 560eba932..53a0bd09a 100644 --- a/scripts/forks/flora_install.sh +++ b/scripts/forks/flora_install.sh @@ -8,24 +8,24 @@ FLORA_BRANCH=$1 HASH=f4da13dd7160de772ea5daa333984bed3882e84c if [ -z ${FLORA_BRANCH} ]; then - echo 'Skipping Flora install as not requested.' + echo 'Skipping Flora install as not requested.' else - rm -rf /root/.cache - git clone --branch ${FLORA_BRANCH} --single-branch https://github.com/Flora-Network/flora-blockchain.git /flora-blockchain - cd /flora-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 - sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + rm -rf /root/.cache + git clone --branch ${FLORA_BRANCH} --single-branch https://github.com/Flora-Network/flora-blockchain.git /flora-blockchain + cd /flora-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 + sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /flora-blockchain /chia-blockchain - ln -s /flora-blockchain/venv/bin/flora /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /flora-blockchain /chia-blockchain + ln -s /flora-blockchain/venv/bin/flora /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/gold_install.sh b/scripts/forks/gold_install.sh index 381c91b75..def21e072 100644 --- a/scripts/forks/gold_install.sh +++ b/scripts/forks/gold_install.sh @@ -8,24 +8,24 @@ GOLD_BRANCH=$1 HASH=8f3bd229813a820e4b9d2e4cd69a28c00c27b7d2 if [ -z ${GOLD_BRANCH} ]; then - echo 'Skipping Gold install as not requested.' + echo 'Skipping Gold install as not requested.' else - rm -rf /root/.cache - git clone --branch ${GOLD_BRANCH} --single-branch https://github.com/goldcoin-gl/gold-blockchain.git /gold-blockchain - cd /gold-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 - sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + rm -rf /root/.cache + git clone --branch ${GOLD_BRANCH} --single-branch https://github.com/goldcoin-gl/gold-blockchain.git /gold-blockchain + cd /gold-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 + sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /gold-blockchain /chia-blockchain - ln -s /gold-blockchain/venv/bin/gold /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /gold-blockchain /chia-blockchain + ln -s /gold-blockchain/venv/bin/gold /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/greenbtc_install.sh b/scripts/forks/greenbtc_install.sh index ec56f2995..347bf1689 100644 --- a/scripts/forks/greenbtc_install.sh +++ b/scripts/forks/greenbtc_install.sh @@ -8,24 +8,24 @@ GREENBTC_BRANCH=$1 HASH=e14bc12696af1cbcdf89a3e7bea0cdb1dd0e89ad if [ -z ${GREENBTC_BRANCH} ]; then - echo 'Skipping GreenBTC install as not requested.' + echo 'Skipping GreenBTC install as not requested.' else - rm -rf /root/.cache - git clone --branch ${GREENBTC_BRANCH} --single-branch https://github.com/greenbtc/greenbtc-blockchain.git /greenbtc-blockchain - cd /greenbtc-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 - sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + rm -rf /root/.cache + git clone --branch ${GREENBTC_BRANCH} --single-branch https://github.com/greenbtc/greenbtc-blockchain.git /greenbtc-blockchain + cd /greenbtc-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 + sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /greenbtc-blockchain /chia-blockchain - ln -s /greenbtc-blockchain/venv/bin/sit /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /greenbtc-blockchain /chia-blockchain + ln -s /greenbtc-blockchain/venv/bin/sit /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/hddcoin_install.sh b/scripts/forks/hddcoin_install.sh index 8c8ac76a1..68a1d03e6 100644 --- a/scripts/forks/hddcoin_install.sh +++ b/scripts/forks/hddcoin_install.sh @@ -8,23 +8,23 @@ HDDCOIN_BRANCH=$1 HASH=42403754da1d819632b0442964eabc2962e30484 if [ -z ${HDDCOIN_BRANCH} ]; then - echo 'Skipping HDDCoin install as not requested.' + echo 'Skipping HDDCoin install as not requested.' else - git clone --branch ${HDDCOIN_BRANCH} --recurse-submodules https://github.com/HDDcoin-Network/hddcoin-blockchain.git /hddcoin-blockchain - cd /hddcoin-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 - sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + git clone --branch ${HDDCOIN_BRANCH} --recurse-submodules https://github.com/HDDcoin-Network/hddcoin-blockchain.git /hddcoin-blockchain + cd /hddcoin-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 + sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /hddcoin-blockchain /chia-blockchain - ln -s /hddcoin-blockchain/venv/bin/hddcoin /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /hddcoin-blockchain /chia-blockchain + ln -s /hddcoin-blockchain/venv/bin/hddcoin /chia-blockchain/venv/bin/chia + fi fi \ No newline at end of file diff --git a/scripts/forks/littlelambocoin_install.sh b/scripts/forks/littlelambocoin_install.sh index b55be8d6f..b73bbc822 100644 --- a/scripts/forks/littlelambocoin_install.sh +++ b/scripts/forks/littlelambocoin_install.sh @@ -8,24 +8,24 @@ LITTLELAMBOCOIN_BRANCH=$1 HASH=a656e0d3478773a38ac4959a611b5d064bb22cb5 if [ -z ${LITTLELAMBOCOIN_BRANCH} ]; then - echo 'Skipping LittleLamboCoin install as not requested.' + echo 'Skipping LittleLamboCoin install as not requested.' else - rm -rf /root/.cache - git clone --branch ${LITTLELAMBOCOIN_BRANCH} --single-branch https://github.com/BTCgreen-Network/littlelambocoin-blockchain /littlelambocoin-blockchain - cd /littlelambocoin-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + rm -rf /root/.cache + git clone --branch ${LITTLELAMBOCOIN_BRANCH} --single-branch https://github.com/BTCgreen-Network/littlelambocoin-blockchain /littlelambocoin-blockchain + cd /littlelambocoin-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 sed -e 's/^ self.log.debug($/ self.log.info(/g' littlelambocoin/wallet/wallet_state_manager.py - /usr/bin/sh ./install.sh + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /littlelambocoin-blockchain /chia-blockchain - ln -s /littlelambocoin-blockchain/venv/bin/littlelambocoin /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /littlelambocoin-blockchain /chia-blockchain + ln -s /littlelambocoin-blockchain/venv/bin/littlelambocoin /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/maize_install.sh b/scripts/forks/maize_install.sh index 31ea8b101..4af7a2edd 100644 --- a/scripts/forks/maize_install.sh +++ b/scripts/forks/maize_install.sh @@ -8,26 +8,26 @@ MAIZE_BRANCH=$1 HASH=1530e15a5fba769f9387508e842121daca5d44e2 if [ -z ${MAIZE_BRANCH} ]; then - echo 'Skipping Maize install as not requested.' + echo 'Skipping Maize install as not requested.' else - cd / - rm -rf /root/.cache - git clone --branch ${MAIZE_BRANCH} --single-branch https://github.com/Maize-Network/maize-blockchain.git /maize-blockchain - cd /maize-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - pwd - chmod +x install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + cd / + rm -rf /root/.cache + git clone --branch ${MAIZE_BRANCH} --single-branch https://github.com/Maize-Network/maize-blockchain.git /maize-blockchain + cd /maize-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + pwd + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 sed -e 's/^ self.log.debug($/ self.log.info(/g' maize/wallet/wallet_state_manager.py - /usr/bin/sh ./install.sh + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /maize-blockchain /chia-blockchain - ln -s /maize-blockchain/venv/bin/maize /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /maize-blockchain /chia-blockchain + ln -s /maize-blockchain/venv/bin/maize /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/mint_install.sh b/scripts/forks/mint_install.sh index 07e9456c0..c9a261aad 100644 --- a/scripts/forks/mint_install.sh +++ b/scripts/forks/mint_install.sh @@ -8,24 +8,24 @@ MINT_BRANCH=$1 HASH=65ec05a015a07664ed25f83efa736065a17f7d7a if [ -z ${MINT_BRANCH} ]; then - echo 'Skipping Mint install as not requested.' + echo 'Skipping Mint install as not requested.' else - rm -rf /root/.cache - git clone --branch ${MINT_BRANCH} --single-branch https://github.com/MintNetwork/mint-blockchain.git /mint-blockchain - cd /mint-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 - sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + rm -rf /root/.cache + git clone --branch ${MINT_BRANCH} --single-branch https://github.com/MintNetwork/mint-blockchain.git /mint-blockchain + cd /mint-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 + sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /mint-blockchain /chia-blockchain - ln -s /mint-blockchain/venv/bin/mint /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /mint-blockchain /chia-blockchain + ln -s /mint-blockchain/venv/bin/mint /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/mmx_install.sh b/scripts/forks/mmx_install.sh index 0b51f6549..10b99677b 100644 --- a/scripts/forks/mmx_install.sh +++ b/scripts/forks/mmx_install.sh @@ -7,28 +7,28 @@ MMX_BRANCH=$1 if [ -z ${MMX_BRANCH} ]; then - echo 'Skipping MMX install as not requested.' + echo 'Skipping MMX install as not requested.' else - rm -rf /root/.cache - apt-get update - # Install dependencies for MMX and GPU support - apt-get install -y git cmake build-essential libsecp256k1-dev libsodium-dev libminiupnpc-dev libjemalloc-dev zlib1g-dev ocl-icd-opencl-dev clinfo screen - apt-get install -y initramfs-tools ocl-icd-libopencl1 opencl-headers apt-utils libnuma1 - # For AMDGPU, install the amdgpu-install stub, optionally invoked later if OPENCL_GPU=amd at launch time - curl -O http://repo.radeon.com/amdgpu-install/22.20.5/ubuntu/jammy/amdgpu-install_22.20.50205-1_all.deb - apt-get install -y ./amdgpu-install_22.20.50205-1_all.deb - # Clone and install MMX from the author's own binaries, not linked to his code branches unfortunately - pushd /tmp - git clone --depth 1 --filter=blob:none --sparse https://github.com/madMAx43v3r/mmx-binaries.git - pushd mmx-binaries/ - git sparse-checkout set mmx-node/linux/x86_64/ - pushd mmx-node/linux - mv x86_64 /mmx-node - popd - rm -f mmx-binaries - popd - tee /etc/ld.so.conf.d/30-mmx.conf >/dev/null </dev/null </dev/null </dev/null < /root/.chia/mmx/config/local/timelord + # For a fresh install of Machinaris-MMX, disable timelord by default to save CPU usage + echo false > /root/.chia/mmx/config/local/timelord fi escaped_plot_dirs=$(printf '%s\n' "$plot_dirs" | sed -e 's/[\/&]/\\&/g') sed -i "s/\"plot_dirs\":.*$/\"plot_dirs\": [ $escaped_plot_dirs ]/g" /root/.chia/mmx/config/local/Harvester.json @@ -37,62 +37,62 @@ if [[ ${OPENCL_GPU} == 'nvidia' ]]; then echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd echo "Enabling Nvidia GPU support inside this container." elif [[ ${OPENCL_GPU} == 'amd' ]]; then - pushd /tmp > /dev/null + pushd /tmp > /dev/null echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections - apt-get update 2>&1 > /tmp/amdgpu_setup.log - amdgpu-install -y --usecase=opencl --opencl=rocr --no-dkms --no-32 --accept-eula 2>&1 >> /tmp/amdgpu_setup.log - popd > /dev/null + apt-get update 2>&1 > /tmp/amdgpu_setup.log + amdgpu-install -y --usecase=opencl --opencl=rocr --no-dkms --no-32 --accept-eula 2>&1 >> /tmp/amdgpu_setup.log + popd > /dev/null echo "Enabling AMD GPU support inside this container." elif [[ ${OPENCL_GPU} == 'intel' ]]; then - apt-get update 2>&1 > /tmp/intelgpu_setup.log - apt-get install -y intel-opencl-icd 2>&1 >> /tmp/intelgpu_setup.log + apt-get update 2>&1 > /tmp/intelgpu_setup.log + apt-get install -y intel-opencl-icd 2>&1 >> /tmp/intelgpu_setup.log echo "Enabling Intel GPU support inside this container." else - echo "No OPENCL_GPU provided. MMX blockchain will use use CPU instead." + echo "No OPENCL_GPU provided. MMX blockchain will use use CPU instead." fi echo 'testnet9' > /root/.chia/mmx/NETWORK # Symlink the testnet9 folder if [ ! -d /root/.chia/mmx/testnet9 ]; then - mkdir /root/.chia/mmx/testnet9 + mkdir /root/.chia/mmx/testnet9 fi # Create a key if none found from previous runs if [[ ${mode} == 'fullnode' ]]; then - if [ ! -f /root/.chia/mmx/wallet.dat ]; then - echo "Creating key at path: /root/.chia/mmx/wallet.dat" - mmx wallet create - else - echo "Adding key at path: /root/.chia/mmx/wallet.dat" - fi - # Setup log rotation - tee /etc/logrotate.d/mmx-node >/dev/null </dev/null </root/.chia/mmx/logs/mmx_node.log 2>&1 & + # Now start the MMX node + ./run_node.sh >/root/.chia/mmx/logs/mmx_node.log 2>&1 & elif [[ ${mode} =~ ^farmer.* ]]; then - # Setup log rotation - tee /etc/logrotate.d/mmx-farmer >/dev/null </dev/null </root/.chia/mmx/logs/mmx_farmer.log 2>&1 & + ./run_farmer.sh -n ${node_address}:11330 >/root/.chia/mmx/logs/mmx_farmer.log 2>&1 & elif [[ ${mode} =~ ^harvester.* ]]; then - # Setup log rotation - tee /etc/logrotate.d/mmx-harvester >/dev/null </dev/null </root/.chia/mmx/logs/mmx_harvester.log 2>&1 & + ./run_harvester.sh -n ${farmer_address}:11330 >/root/.chia/mmx/logs/mmx_harvester.log 2>&1 & elif [[ ${mode} == 'plotter' ]]; then echo "Starting in Plotter-only mode. Run Plotman from either CLI or WebUI." fi diff --git a/scripts/forks/moon_install.sh b/scripts/forks/moon_install.sh index 8dcc99e3c..4e7c1ed58 100644 --- a/scripts/forks/moon_install.sh +++ b/scripts/forks/moon_install.sh @@ -7,26 +7,26 @@ MOON_BRANCH=$1 HASH=dbb7e66d4cb1af20caa3d8f3dc883a345d7643e3 if [ -z ${MOON_BRANCH} ]; then - echo 'Skipping Moon install as not requested.' + echo 'Skipping Moon install as not requested.' else - cd / - rm -rf /root/.cache - git clone --branch ${MOON_BRANCH} --single-branch https://github.com/MOONCOINTEAM/moon-blockchain.git /moon-blockchain - cd /moon-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - pwd - chmod +x install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + cd / + rm -rf /root/.cache + git clone --branch ${MOON_BRANCH} --single-branch https://github.com/MOONCOINTEAM/moon-blockchain.git /moon-blockchain + cd /moon-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + pwd + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 sed -e 's/^ self.log.debug($/ self.log.info(/g' moon/wallet/wallet_state_manager.py - /usr/bin/sh ./install.sh + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /moon-blockchain /chia-blockchain - ln -s /moon-blockchain/venv/bin/moon /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /moon-blockchain /chia-blockchain + ln -s /moon-blockchain/venv/bin/moon /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/nchain_install.sh b/scripts/forks/nchain_install.sh index 7a7c6f65b..de42a5ee6 100644 --- a/scripts/forks/nchain_install.sh +++ b/scripts/forks/nchain_install.sh @@ -10,22 +10,22 @@ NCHAIN_BRANCH=$1 HASH=3c51a0bc6ee3930b40296a75dccf0ad8daab3a68 if [ -z ${NCHAIN_BRANCH} ]; then - echo 'Skipping NChain install as not requested.' + echo 'Skipping NChain install as not requested.' else - git clone --branch ${NCHAIN_BRANCH} --recurse-submodules https://gitee.com/ext9/ext9-blockchain.git /ext9-blockchain - cd /ext9-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 - sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + git clone --branch ${NCHAIN_BRANCH} --recurse-submodules https://gitee.com/ext9/ext9-blockchain.git /ext9-blockchain + cd /ext9-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 + sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /ext9-blockchain /chia-blockchain - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /ext9-blockchain /chia-blockchain + fi fi \ No newline at end of file diff --git a/scripts/forks/one_install.sh b/scripts/forks/one_install.sh index a479b93ba..295ba332d 100644 --- a/scripts/forks/one_install.sh +++ b/scripts/forks/one_install.sh @@ -8,23 +8,23 @@ ONE_BRANCH=$1 HASH=29854541a4a6b2b9bc4d423302642e10ddf8fc77 if [ -z ${ONE_BRANCH} ]; then - echo 'Skipping One install as not requested.' + echo 'Skipping One install as not requested.' else - git clone --branch ${ONE_BRANCH} --recurse-submodules https://github.com/xone-network/one-blockchain.git /one-blockchain - cd /one-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + git clone --branch ${ONE_BRANCH} --recurse-submodules https://github.com/xone-network/one-blockchain.git /one-blockchain + cd /one-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 sed -e 's/^ self.log.debug($/ self.log.info(/g' one/wallet/wallet_state_manager.py - /usr/bin/sh ./install.sh + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /one-blockchain /chia-blockchain - ln -s /one-blockchain/venv/bin/one /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /one-blockchain /chia-blockchain + ln -s /one-blockchain/venv/bin/one /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/petroleum_install.sh b/scripts/forks/petroleum_install.sh index b8e166bb3..4a24cb556 100644 --- a/scripts/forks/petroleum_install.sh +++ b/scripts/forks/petroleum_install.sh @@ -8,24 +8,24 @@ PETROLEUM_BRANCH=$1 HASH=8fae07695353b4e7fb7d861ab747b04aebab176c if [ -z ${PETROLEUM_BRANCH} ]; then - echo 'Skipping Petroleum install as not requested.' + echo 'Skipping Petroleum install as not requested.' else - rm -rf /root/.cache - git clone --branch ${PETROLEUM_BRANCH} --single-branch https://github.com/petroleum-network/petroleum-blockchain /petroleum-blockchain - cd /petroleum-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 - sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + rm -rf /root/.cache + git clone --branch ${PETROLEUM_BRANCH} --single-branch https://github.com/petroleum-network/petroleum-blockchain /petroleum-blockchain + cd /petroleum-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 + sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /petroleum-blockchain /chia-blockchain - ln -s /petroleum-blockchain/venv/bin/sit /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /petroleum-blockchain /chia-blockchain + ln -s /petroleum-blockchain/venv/bin/sit /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/pipscoin_install.sh b/scripts/forks/pipscoin_install.sh index 7821dcf5a..87bd034f4 100644 --- a/scripts/forks/pipscoin_install.sh +++ b/scripts/forks/pipscoin_install.sh @@ -8,23 +8,23 @@ PIPSCOIN_BRANCH=$1 HASH=3017cde5f8c463f5e494c5c1e258dd2bf8281fee if [ -z ${PIPSCOIN_BRANCH} ]; then - echo 'Skipping Pipscoin install as not requested.' + echo 'Skipping Pipscoin install as not requested.' else - git clone --branch ${PIPSCOIN_BRANCH} --recurse-submodules https://github.com/Pipscoin-Network/pipscoin-blockchain.git /pipscoin-blockchain - cd /pipscoin-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + git clone --branch ${PIPSCOIN_BRANCH} --recurse-submodules https://github.com/Pipscoin-Network/pipscoin-blockchain.git /pipscoin-blockchain + cd /pipscoin-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 sed -e 's/^ self.log.debug($/ self.log.info(/g' pipscoin/wallet/wallet_state_manager.py - /usr/bin/sh ./install.sh + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /pipscoin-blockchain /chia-blockchain - ln -s /pipscoin-blockchain/venv/bin/pipscoin /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /pipscoin-blockchain /chia-blockchain + ln -s /pipscoin-blockchain/venv/bin/pipscoin /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/profit_install.sh b/scripts/forks/profit_install.sh index 8b7d4af2d..0f417c120 100644 --- a/scripts/forks/profit_install.sh +++ b/scripts/forks/profit_install.sh @@ -8,24 +8,24 @@ PROFIT_BRANCH=$1 HASH=966811500810a0dcbf13a8e02f507b9449bb418c if [ -z ${PROFIT_BRANCH} ]; then - echo 'Skipping Profit install as not requested.' + echo 'Skipping Profit install as not requested.' else - rm -rf /root/.cache - git clone --branch ${PROFIT_BRANCH} --single-branch https://github.com/ProfitCrypto/profit-blockchain /profit-blockchain - cd /profit-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 - sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + rm -rf /root/.cache + git clone --branch ${PROFIT_BRANCH} --single-branch https://github.com/ProfitCrypto/profit-blockchain /profit-blockchain + cd /profit-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 + sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /profit-blockchain /chia-blockchain - ln -s /profit-blockchain/venv/bin/sit /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /profit-blockchain /chia-blockchain + ln -s /profit-blockchain/venv/bin/sit /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/shibgreen_install.sh b/scripts/forks/shibgreen_install.sh index e7ff30a6f..6b8c28070 100644 --- a/scripts/forks/shibgreen_install.sh +++ b/scripts/forks/shibgreen_install.sh @@ -8,27 +8,27 @@ SHIBGREEN_BRANCH=$1 HASH=21ad1e45aa722bb3382d824d872ebbad26487cf3 if [ -z ${SHIBGREEN_BRANCH} ]; then - echo 'Skipping SHIBGreen install as not requested.' + echo 'Skipping SHIBGreen install as not requested.' else - rm -rf /root/.cache - git clone --branch ${SHIBGREEN_BRANCH} --single-branch https://github.com/BTCgreen-Network/shibgreen-blockchain /shibgreen-blockchain - cd /shibgreen-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh + rm -rf /root/.cache + git clone --branch ${SHIBGREEN_BRANCH} --single-branch https://github.com/BTCgreen-Network/shibgreen-blockchain /shibgreen-blockchain + cd /shibgreen-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 sed -i -e 's/^ self.log.debug($/ self.log.info(/g' shibgreen/wallet/wallet_state_manager.py - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /shibgreen-blockchain /chia-blockchain - ln -s /shibgreen-blockchain/venv/bin/shibgreen /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /shibgreen-blockchain /chia-blockchain + ln -s /shibgreen-blockchain/venv/bin/shibgreen /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/silicoin_install.sh b/scripts/forks/silicoin_install.sh index 38ff0d8ef..94eed4945 100644 --- a/scripts/forks/silicoin_install.sh +++ b/scripts/forks/silicoin_install.sh @@ -8,24 +8,24 @@ SILICOIN_BRANCH=$1 HASH=ebe7880e24b22d8f3bf8d0c8b31ad5397b3e7af3 if [ -z ${SILICOIN_BRANCH} ]; then - echo 'Skipping Silicoin install as not requested.' + echo 'Skipping Silicoin install as not requested.' else - rm -rf /root/.cache - git clone --branch ${SILICOIN_BRANCH} --single-branch https://github.com/silicoin-network/silicoin-blockchain /silicoin-blockchain - cd /silicoin-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 - sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + rm -rf /root/.cache + git clone --branch ${SILICOIN_BRANCH} --single-branch https://github.com/silicoin-network/silicoin-blockchain /silicoin-blockchain + cd /silicoin-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 + sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /silicoin-blockchain /chia-blockchain - ln -s /silicoin-blockchain/venv/bin/sit /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /silicoin-blockchain /chia-blockchain + ln -s /silicoin-blockchain/venv/bin/sit /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/staicoin_install.sh b/scripts/forks/staicoin_install.sh index 7ae7f81a5..2100bc9c9 100644 --- a/scripts/forks/staicoin_install.sh +++ b/scripts/forks/staicoin_install.sh @@ -8,21 +8,21 @@ STAICOIN_BRANCH=$1 HASH=60b6a001795af56ed1b2fc6e464cdc10884193a1 if [ -z ${STAICOIN_BRANCH} ]; then - echo 'Skipping Staicoin install as not requested.' + echo 'Skipping Staicoin install as not requested.' else - rm -rf /root/.cache - git clone --branch ${STAICOIN_BRANCH} --single-branch https://github.com/STATION-I/staicoin-blockchain.git /staicoin-blockchain - cd /staicoin-blockchain - git submodule update --init mozilla-ca - chmod +x install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + rm -rf /root/.cache + git clone --branch ${STAICOIN_BRANCH} --single-branch https://github.com/STATION-I/staicoin-blockchain.git /staicoin-blockchain + cd /staicoin-blockchain + git submodule update --init mozilla-ca + chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /staicoin-blockchain /chia-blockchain - ln -s /staicoin-blockchain/venv/bin/staicoin /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /staicoin-blockchain /chia-blockchain + ln -s /staicoin-blockchain/venv/bin/staicoin /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/stor_install.sh b/scripts/forks/stor_install.sh index 6759ffbef..a40efd6de 100644 --- a/scripts/forks/stor_install.sh +++ b/scripts/forks/stor_install.sh @@ -8,23 +8,23 @@ STOR_BRANCH=$1 HASH=3c3cd1a3b99592e88160107ca5b81afc0937b992 if [ -z ${STOR_BRANCH} ]; then - echo 'Skipping Stor install as not requested.' + echo 'Skipping Stor install as not requested.' else - git clone --branch ${STOR_BRANCH} --recurse-submodules https://github.com/Stor-Network/stor-blockchain.git /stor-blockchain - cd /stor-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 - sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + git clone --branch ${STOR_BRANCH} --recurse-submodules https://github.com/Stor-Network/stor-blockchain.git /stor-blockchain + cd /stor-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 + sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /stor-blockchain /chia-blockchain - ln -s /stor-blockchain/venv/bin/stor /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /stor-blockchain /chia-blockchain + ln -s /stor-blockchain/venv/bin/stor /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/tad_install.sh b/scripts/forks/tad_install.sh index a3f10cbee..9c798a791 100644 --- a/scripts/forks/tad_install.sh +++ b/scripts/forks/tad_install.sh @@ -8,27 +8,27 @@ TAD_BRANCH=$1 HASH=177cf628f94a023549cbb955b49a1cf857c73851 if [ -z ${TAD_BRANCH} ]; then - echo 'Skipping Tad install as not requested.' + echo 'Skipping Tad install as not requested.' else - rm -rf /root/.cache - git clone --branch ${TAD_BRANCH} --single-branch https://github.com/BTCgreen-Network/tad-blockchain.git /tad-blockchain - cd /tad-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh + rm -rf /root/.cache + git clone --branch ${TAD_BRANCH} --single-branch https://github.com/BTCgreen-Network/tad-blockchain.git /tad-blockchain + cd /tad-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 sed -i -e 's/^ self.log.debug($/ self.log.info(/g' tad/wallet/wallet_state_manager.py - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /tad-blockchain /chia-blockchain - ln -s /tad-blockchain/venv/bin/tad /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /tad-blockchain /chia-blockchain + ln -s /tad-blockchain/venv/bin/tad /chia-blockchain/venv/bin/chia + fi fi diff --git a/scripts/forks/wheat_install.sh b/scripts/forks/wheat_install.sh index 9bf5fc46a..376681ec0 100644 --- a/scripts/forks/wheat_install.sh +++ b/scripts/forks/wheat_install.sh @@ -8,24 +8,24 @@ WHEAT_BRANCH=$1 HASH=07f451a4d124f714246391585c00c79332840759 if [ -z ${WHEAT_BRANCH} ]; then - echo 'Skipping Wheat install as not requested.' + echo 'Skipping Wheat install as not requested.' else - rm -rf /root/.cache - git clone --branch ${WHEAT_BRANCH} --single-branch https://github.com/wheatnetwork/wheat-blockchain.git /wheat-blockchain - cd /wheat-blockchain - git submodule update --init mozilla-ca - git checkout $HASH - chmod +x install.sh - # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 - sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh + rm -rf /root/.cache + git clone --branch ${WHEAT_BRANCH} --single-branch https://github.com/wheatnetwork/wheat-blockchain.git /wheat-blockchain + cd /wheat-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + # 2022-01-30: pip broke due to https://github.com/pypa/pip/issues/10825 + sed -i 's/upgrade\ pip$/upgrade\ "pip<22.0"/' install.sh + # 2022-07-20: Python needs 'packaging==21.3' + sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + /usr/bin/sh ./install.sh - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /wheat-blockchain /chia-blockchain - ln -s /wheat-blockchain/venv/bin/wheat /chia-blockchain/venv/bin/chia - fi + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /wheat-blockchain /chia-blockchain + ln -s /wheat-blockchain/venv/bin/wheat /chia-blockchain/venv/bin/chia + fi fi From a87a396465f7d43ebdc483adbaf143fdc22c3f1c Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 25 Jan 2023 14:25:07 -0700 Subject: [PATCH 053/104] Initial support for the FoxyPool fork of Chives. --- .github/workflows/develop-chives-foxy.yaml | 50 ----------- .github/workflows/develop-chives.yaml | 48 +++++++++- .github/workflows/main-chives-foxy.yaml | 51 ----------- .github/workflows/main-chives.yaml | 47 +++++++++- .github/workflows/test-chives-foxy.yaml | 49 ---------- .github/workflows/test-chives.yaml | 46 +++++++++- common/config/blockchains.json | 17 ---- config/chiadog/chives-foxy.sample.yaml | 91 ------------------- docker/dockerfile | 5 +- scripts/forks/chives_foxy_launch.sh | 100 --------------------- scripts/forks/chives_install.sh | 6 +- web/templates/worker_launch.html | 24 ++--- 12 files changed, 151 insertions(+), 383 deletions(-) delete mode 100644 .github/workflows/develop-chives-foxy.yaml delete mode 100644 .github/workflows/main-chives-foxy.yaml delete mode 100644 .github/workflows/test-chives-foxy.yaml delete mode 100644 config/chiadog/chives-foxy.sample.yaml delete mode 100644 scripts/forks/chives_foxy_launch.sh diff --git a/.github/workflows/develop-chives-foxy.yaml b/.github/workflows/develop-chives-foxy.yaml deleted file mode 100644 index d7f8c38c8..000000000 --- a/.github/workflows/develop-chives-foxy.yaml +++ /dev/null @@ -1,50 +0,0 @@ -name: develop-chives-foxy - -on: - push: - branches: - - 'develop' - -jobs: - docker: - runs-on: ubuntu-20.04 - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v3 - with: - file: docker/dockerfile - context: . - platforms: linux/amd64 - push: true - build-args: | - "UBUNTU_VER=focal" - "MACHINARIS_STREAM=develop" - "CHIADOG_BRANCH=dev" - "CHIVES_FOXY_BRANCH=1.5.3" - "PLOTMAN_BRANCH=development" - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:develop - ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:develop diff --git a/.github/workflows/develop-chives.yaml b/.github/workflows/develop-chives.yaml index 7342d5ee1..8a3e6fa2e 100644 --- a/.github/workflows/develop-chives.yaml +++ b/.github/workflows/develop-chives.yaml @@ -6,7 +6,8 @@ on: - 'develop' jobs: - docker: + + chives: runs-on: ubuntu-20.04 steps: - @@ -43,8 +44,53 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "CHIVES_REPO=https://github.com/HiveProject2021/chives-blockchain.git" "CHIVES_BRANCH=1.5.3" "PLOTMAN_BRANCH=development" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:develop ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:develop + + chivesfoxy: + runs-on: ubuntu-20.04 + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64 + push: true + build-args: | + "UBUNTU_VER=focal" + "MACHINARIS_STREAM=develop" + "CHIADOG_BRANCH=dev" + "CHIVES_REPO=https://github.com/foxypool/chives-blockchain.git" + "CHIVES_BRANCH=main" + "PLOTMAN_BRANCH=development" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chivesfoxy:develop + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chivesfoxy:develop diff --git a/.github/workflows/main-chives-foxy.yaml b/.github/workflows/main-chives-foxy.yaml deleted file mode 100644 index 933a9088f..000000000 --- a/.github/workflows/main-chives-foxy.yaml +++ /dev/null @@ -1,51 +0,0 @@ -name: release-chives-foxy - -on: - workflow_dispatch: - inputs: - version: - description: 'Release Version' - -jobs: - docker: - runs-on: ubuntu-20.04 - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v3 - with: - file: docker/dockerfile - context: . - platforms: linux/amd64,linux/arm64 - push: true - build-args: | - "UBUNTU_VER=focal" - "MACHINARIS_STREAM=latest" - "CHIVES_FOXY_BRANCH=1.5.3" - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:latest - ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:v${{ github.event.inputs.version }} - ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:latest - ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:v${{ github.event.inputs.version }} diff --git a/.github/workflows/main-chives.yaml b/.github/workflows/main-chives.yaml index 95ff811f8..55f9f5881 100644 --- a/.github/workflows/main-chives.yaml +++ b/.github/workflows/main-chives.yaml @@ -7,7 +7,7 @@ on: description: 'Release Version' jobs: - docker: + chives: runs-on: ubuntu-20.04 steps: - @@ -43,9 +43,54 @@ jobs: build-args: | "UBUNTU_VER=focal" "MACHINARIS_STREAM=latest" + "CHIVES_REPO=https://github.com/HiveProject2021/chives-blockchain.git" "CHIVES_BRANCH=1.5.3" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:latest ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:v${{ github.event.inputs.version }} ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:latest ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:v${{ github.event.inputs.version }} + + chivesfoxy: + runs-on: ubuntu-20.04 + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64,linux/arm64 + push: true + build-args: | + "UBUNTU_VER=focal" + "MACHINARIS_STREAM=latest" + "CHIVES_REPO=https://github.com/foxypool/chives-blockchain.git" + "CHIVES_BRANCH=main" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chivesfoxy:latest + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chivesfoxy:v${{ github.event.inputs.version }} + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chivesfoxy:latest + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chivesfoxy:v${{ github.event.inputs.version }} diff --git a/.github/workflows/test-chives-foxy.yaml b/.github/workflows/test-chives-foxy.yaml deleted file mode 100644 index 7cfb8b325..000000000 --- a/.github/workflows/test-chives-foxy.yaml +++ /dev/null @@ -1,49 +0,0 @@ -name: test-chives-foxy - -on: - push: - branches: - - 'integration' - -jobs: - docker: - runs-on: ubuntu-20.04 - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v3 - with: - file: docker/dockerfile - context: . - platforms: linux/amd64,linux/arm64 - push: true - build-args: | - "UBUNTU_VER=focal" - "MACHINARIS_STREAM=test" - "CHIADOG_BRANCH=dev" - "CHIVES_FOXY_BRANCH=1.5.3" - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:test - ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives-foxy:test diff --git a/.github/workflows/test-chives.yaml b/.github/workflows/test-chives.yaml index e34b5a6b6..ab2009f43 100644 --- a/.github/workflows/test-chives.yaml +++ b/.github/workflows/test-chives.yaml @@ -6,7 +6,7 @@ on: - 'integration' jobs: - docker: + chives: runs-on: ubuntu-20.04 steps: - @@ -43,7 +43,51 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=test" "CHIADOG_BRANCH=dev" + "CHIVES_REPO=https://github.com/HiveProject2021/chives-blockchain.git" "CHIVES_BRANCH=1.5.3" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:test ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:test + + chivesfoxy: + runs-on: ubuntu-20.04 + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64,linux/arm64 + push: true + build-args: | + "UBUNTU_VER=focal" + "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" + "CHIVES_REPO=https://github.com/foxypool/chives-blockchain.git" + "CHIVES_BRANCH=main" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chivesfoxy:test + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chivesfoxy:test diff --git a/common/config/blockchains.json b/common/config/blockchains.json index 4b76b09b3..26e40f01d 100644 --- a/common/config/blockchains.json +++ b/common/config/blockchains.json @@ -135,23 +135,6 @@ "discord_url": "https://discord.gg/9aAbYNqjtA", "website_url": "https://www.chivescoin.org/" }, - "chives-foxy": { - "name": "Chives Foxy", - "symbol": "XCC" , - "binary": "/chives-foxy-blockchain/venv/bin/chives", - "network_path": "/root/.chives-foxy/mainnet", - "network_name": "mainnet", - "network_port": 9699, - "farmer_port": 9647, - "fullnode_rpc_port": 9755, - "worker_port": 8931, - "reward": 180.0, - "mojos_per_coin": 100000000, - "blocks_per_day": 4608, - "git_url": "https://github.com/foxypool/chives-blockchain", - "discord_url": "https://discord.gg/foxy-582180216747720723", - "website_url": "https://chives-og.foxypool.io/" - }, "coffee": { "name": "Coffee", "symbol": "XCF" , diff --git a/config/chiadog/chives-foxy.sample.yaml b/config/chiadog/chives-foxy.sample.yaml deleted file mode 100644 index 307e2f368..000000000 --- a/config/chiadog/chives-foxy.sample.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# This is useful to differentiate multiple -# instances monitoring multiple harvesters -notification_title_prefix: '$HOSTNAME-chives-foxy' -log_level: INFO -coin_name: 'chives' -coin_symbol: 'xcc' - -# Only one consumer can be enabled at a time, you can -# delete the section for the consumer which you aren't using -# DON'T CHANGE file_path IT'S ALREADY SET IN-CONTAINER FOR MACHINARIS! -chia_logs: - file_log_consumer: - enable: true - prefix: 'chives' - file_path: '~/.chives-foxy/mainnet/log/debug.log' - -# Enable this and chiadog will ping a remote server every 5 minutes -# That way you can know that the monitoring is running as expected -#keep_alive_monitor: -# enable_remote_ping: false -# ping_url: '' - -# Enable this and you'll receive a daily summary notification -# on your farm performance at the specified time of the day. -daily_stats: - enable: true - time_of_day: 21 - -# We support a lot of notifiers, please check the README for more -# information. You can delete the sections which you aren't using. -# You can also enable more than one notifier and send different -# notifications to each of them. E.g. enable daily_stats only to E-mail. -# If you enable wallet_events you'll get notifications anytime your -# wallet receives some XCH (e.g. farming reward). -notifier: - pushover: - enable: false - daily_stats: true - wallet_events: true - credentials: - api_token: 'dummy_token' - user_key: 'dummy_key' - telegram: - enable: false - daily_stats: true - wallet_events: true - credentials: - bot_token: 'dummy_bot_token' - chat_id: 'dummy_chat_id' - smtp: - enable: false - daily_stats: true - wallet_events: true - credentials: - sender: 'chives@example.com' - sender_name: 'Machinaris' - recipient: 'you@example.com' - username_smtp: 'username' - password_smtp: 'password' - host: 'smtp.example.com' - port: 587 - script: - # DON'T CHANGE THIS SCRIPT NOTIFIER, IT'S USED BY MACHINARIS! - enable: true - daily_stats: true - wallet_events: true - script_path: '/root/.chia/chiadog/notifier.sh' - discord: - enable: false - daily_stats: true - wallet_events: true - credentials: - webhook_url: 'https://discord.com/api/webhooks/...' - slack: - enable: false - daily_stats: true - wallet_events: true - credentials: - webhook_url: 'https://hooks.slack.com/services/...' - mqtt: - enable: false - daily_stats: true - wallet_events: true - topic: flax/chivesdog/alert - qos: 1 - retain: false - credentials: - host: '192.168.0.10' - port: 8883 - username: '' - password: '' diff --git a/docker/dockerfile b/docker/dockerfile index f726e80c5..3e1f049e2 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -17,8 +17,8 @@ ARG BTCGREEN_BRANCH ARG CACTUS_BRANCH ARG CHIA_BRANCH ARG CHINILLA_BRANCH +ARG CHIVES_REPO ARG CHIVES_BRANCH -ARG CHIVES_FOXY_BRANCH ARG COFFEE_BRANCH ARG CRYPTODOGE_BRANCH ARG ECOSTAKE_BRANCH @@ -58,8 +58,7 @@ RUN \ && /usr/bin/bash /machinaris/scripts/forks/btcgreen_install.sh ${BTCGREEN_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/cactus_install.sh ${CACTUS_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/chia_install.sh ${CHIA_BRANCH} \ - && /usr/bin/bash /machinaris/scripts/forks/chives_install.sh ${CHIVES_BRANCH} \ - && /usr/bin/bash /machinaris/scripts/forks/chives_foxy_install.sh ${CHIVES_FOXY_BRANCH} \ + && /usr/bin/bash /machinaris/scripts/forks/chives_install.sh ${CHIVES_REPO} ${CHIVES_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/chinilla_install.sh ${CHINILLA_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/coffee_install.sh ${COFFEE_BRANCH} \ && /usr/bin/bash /machinaris/scripts/forks/cryptodoge_install.sh ${CRYPTODOGE_BRANCH} \ diff --git a/scripts/forks/chives_foxy_launch.sh b/scripts/forks/chives_foxy_launch.sh deleted file mode 100644 index e0fd0672e..000000000 --- a/scripts/forks/chives_foxy_launch.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/env bash -# -# Initialize Chives Foxy service, depending on mode of system requested -# - -cd /chives-foxy-blockchain - -. ./activate - -# Only the /root/.chia folder is volume-mounted so store chives within -mkdir -p /root/.chia/chives-foxy -rm -f /root/.chives-foxy -ln -s /root/.chia/chives-foxy /root/.chives-foxy - -if [[ "${blockchain_db_download}" == 'true' ]] \ - && [[ "${mode}" == 'fullnode' ]] \ - && [[ ! -f /root/.chives-foxy/mainnet/db/blockchain_v1_mainnet.sqlite ]] \ - && [[ ! -f /root/.chives-foxy/mainnet/db/blockchain_v2_mainnet.sqlite ]]; then - echo "Sorry, Chives does not offer a recent blockchain DB for download. Standard sync will happen over a few days." - echo "It is recommended to add some peer node connections on the Connections page of Machinaris." -fi - -mkdir -p /root/.chives-foxy/mainnet/log -chives init >> /root/.chives-foxy/mainnet/log/init.log 2>&1 - -echo 'Configuring Chives...' -if [ -f /root/.chives-foxy/mainnet/config/config.yaml ]; then - sed -i 's/log_stdout: true/log_stdout: false/g' /root/.chives-foxy/mainnet/config/config.yaml - sed -i 's/log_level: WARNING/log_level: INFO/g' /root/.chives-foxy/mainnet/config/config.yaml - sed -i 's/localhost/127.0.0.1/g' /root/.chives-foxy/mainnet/config/config.yaml -fi -# Loop over provided list of key paths -for k in ${keys//:/ }; do - if [[ "${k}" == "persistent" ]]; then - echo "Not touching key directories." - elif [ -s ${k} ]; then - echo "Adding key at path: ${k}" - chives keys add -f ${k} > /dev/null - fi -done - -# Loop over provided list of completed plot directories -IFS=':' read -r -a array <<< "$plots_dir" -joined=$(printf ", %s" "${array[@]}") -echo "Adding plot directories at: ${joined:1}" -for p in ${plots_dir//:/ }; do - chives plots add -d ${p} -done - -# Start services based on mode selected. Default is 'fullnode' -if [[ ${mode} == 'fullnode' ]]; then - for k in ${keys//:/ }; do - while [[ "${k}" != "persistent" ]] && [[ ! -s ${k} ]]; do - echo 'Waiting for key to be created/imported into mnemonic.txt. See: http://localhost:8926' - sleep 10 # Wait 10 seconds before checking for mnemonic.txt presence - if [ -s ${k} ]; then - chives keys add -f ${k} - sleep 10 - fi - done - done - if [ -f /root/.chia/machinaris/config/wallet_settings.json ]; then - chives start farmer-no-wallet - else - chives start farmer - fi -elif [[ ${mode} =~ ^farmer.* ]]; then - if [ ! -f ~/.chives-foxy/mainnet/config/ssl/wallet/public_wallet.key ]; then - echo "No wallet key found, so not starting farming services. Please add your Chia mnemonic.txt to the ~/.machinaris/ folder and restart." - else - chives start farmer-only - fi -elif [[ ${mode} =~ ^harvester.* ]]; then - if [[ -z ${farmer_address} || -z ${farmer_port} ]]; then - echo "A farmer peer address and port are required." - exit - else - if [ ! -f /root/.chives-foxy/farmer_ca/chives_ca.crt ]; then - mkdir -p /root/.chives-foxy/farmer_ca - response=$(curl --write-out '%{http_code}' --silent http://${farmer_address}:8931/certificates/?type=chives --output /tmp/certs.zip) - if [ $response == '200' ]; then - unzip /tmp/certs.zip -d /root/.chives/farmer_ca - else - echo "Certificates response of ${response} from http://${farmer_address}:8931/certificates/?type=chives. Is the fork's fullnode container running?" - fi - rm -f /tmp/certs.zip - fi - if [[ -f /root/.chives-foxy/farmer_ca/chives_ca.crt ]] && [[ ! ${keys} == "persistent" ]]; then - chives init -c /root/.chives-foxy/farmer_ca 2>&1 > /root/.chives-foxy/mainnet/log/init.log - else - echo "Did not find your farmer's certificates within /root/.chives-foxy/farmer_ca." - echo "See: https://github.com/guydavis/machinaris/wiki/Workers#harvester" - fi - chives configure --set-farmer-peer ${farmer_address}:${farmer_port} - chives configure --enable-upnp false - chives start harvester -r - fi -elif [[ ${mode} == 'plotter' ]]; then - echo "Starting in Plotter-only mode. Run Plotman from either CLI or WebUI." -fi diff --git a/scripts/forks/chives_install.sh b/scripts/forks/chives_install.sh index 319823600..76d36c9ed 100644 --- a/scripts/forks/chives_install.sh +++ b/scripts/forks/chives_install.sh @@ -1,14 +1,16 @@ #!/bin/env bash # # Installs Chives as per https://github.com/HiveProject2021/chives-blockchain +# Alternatively, also supports the Foxy port: https://github.com/foxypool/chives-blockchain # -CHIVES_BRANCH=$1 +CHIVES_REPO=$1 +CHIVES_BRANCH=$2 if [ -z ${CHIVES_BRANCH} ]; then echo 'Skipping Chives install as not requested.' else - git clone --branch ${CHIVES_BRANCH} --recurse-submodules https://github.com/HiveProject2021/chives-blockchain.git /chives-blockchain + git clone --branch ${CHIVES_BRANCH} --recurse-submodules ${CHIVES_REPO} /chives-blockchain cd /chives-blockchain chmod +x install.sh # 2022-07-20: Python needs 'packaging==21.3' diff --git a/web/templates/worker_launch.html b/web/templates/worker_launch.html index 3368616c2..9cc239bf0 100644 --- a/web/templates/worker_launch.html +++ b/web/templates/worker_launch.html @@ -179,9 +179,6 @@ if (blockchain == 'chives') { return 8931; } - if (blockchain == 'chives-foxy') { - return 8931; - } if (blockchain == 'coffee') { return 8954; } @@ -282,7 +279,7 @@ if (blockchain == 'chives') { return 9647; } - if (blockchain == 'chives-foxy') { + if (blockchain == 'chives') { return 9647; } if (blockchain == 'coffee') { @@ -374,8 +371,8 @@ var blockchain = blockchains[i].value if (!document.getElementById('mode-harvester').checked && document.getElementById('mode-plotter').checked && - blockchain != "chia" && blockchain != "chives" && blockchain != "chives-foxy") { - continue; // Don't add plotter-only containers for forks beyond Chia & Chives & Chives-foxy + blockchain != "chia" && blockchain != "chives") { + continue; // Don't add plotter-only containers for forks beyond Chia & Chives } if (blockchain == "chia") { cmd += " machinaris:" + line_end; @@ -386,6 +383,9 @@ cmd += " image: ghcr.io/guydavis/machinaris-" + blockchain + ":latest" + line_end; cmd += " container_name: machinaris-" + blockchain + line_end; } + if (blockchain == "chives") { + errors.push("{{_('NOTE: If you want to run the FoxyPool port of Chives, change the image from machinaris-chives to machinaris-chivesfoxy in generated config below.')}}") + } if (document.getElementById("worker_hostname").value) { cmd += ' hostname: ' + document.getElementById("worker_hostname").value + line_end; } @@ -421,9 +421,6 @@ if ((blockchain == "chives") && ($('#volume_type' + index).val() == 'plots')) { volume_host_path += '/chives' } - if ((blockchain == "chives-foxy") && ($('#volume_type' + index).val() == 'plots')) { - volume_host_path += '/chives-foxy' - } if ((blockchain == "mmx") && ($('#volume_type' + index).val() == 'plots')) { volume_host_path += '/mmx' } @@ -442,7 +439,7 @@ var farmer_port = lookup_farmer_port(blockchain); cmd += ' - farmer_port=' + farmer_port + line_end; } - if ((blockchain == "chia" || blockchain == "chives" || blockchain == "foxy-chives") && (document.getElementById('mode-plotter').checked)) { + if ((blockchain == "chia" || blockchain == "chives" || blockchain == "mmx") && (document.getElementById('mode-plotter').checked)) { if (mode) { mode += ',plotter'; } @@ -693,13 +690,6 @@

{{_('Machinaris Worker - Launch Config')}}

Chives
-
- - -
From cad95ed92769fb53600b0b7b37c3b698ffeaf673 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 25 Jan 2023 14:43:55 -0700 Subject: [PATCH 054/104] Fix for Cactus hard-coded path issue. --- scripts/forks/cactus_install.sh | 2 +- scripts/forks/chives_foxy_install.sh | 24 ------------------------ 2 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 scripts/forks/chives_foxy_install.sh diff --git a/scripts/forks/cactus_install.sh b/scripts/forks/cactus_install.sh index 21b748f43..70095e310 100644 --- a/scripts/forks/cactus_install.sh +++ b/scripts/forks/cactus_install.sh @@ -5,7 +5,7 @@ CACTUS_BRANCH=$1 # On 2023-01-24 -HASH=1999f8921050bd034b7af46f665e5d268cfb397d +HASH=96dcdf36a214fea2236e88bd5fb251c81da46897 if [ -z ${CACTUS_BRANCH} ]; then echo 'Skipping Cactus install as not requested.' diff --git a/scripts/forks/chives_foxy_install.sh b/scripts/forks/chives_foxy_install.sh deleted file mode 100644 index c53433fcc..000000000 --- a/scripts/forks/chives_foxy_install.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/env bash -# -# Installs Chives as per https://github.com/foxypool/chives-blockchain -# - -CHIVES_FOXY_BRANCH=$1 - -if [ -z ${CHIVES_FOXY_BRANCH} ]; then - echo 'Skipping Chives install as not requested.' -else - git clone --branch ${CHIVES_FOXY_BRANCH} --recurse-submodules https://github.com/foxypool/chives-blockchain.git /chives-foxy-blockchain - cd /chives-foxy-blockchain - chmod +x install.sh - # 2022-07-20: Python needs 'packaging==21.3' - sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - /usr/bin/sh ./install.sh - - if [ ! -d /chia-blockchain/venv ]; then - cd / - rmdir /chia-blockchain - ln -s /chives-foxy-blockchain /chia-blockchain - ln -s /chives-foxy-blockchain/venv/bin/chives /chia-blockchain/venv/bin/chia - fi -fi From f21f91cf45a48e408b273ba57ca73ad9587ed8ae Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 27 Jan 2023 10:17:52 -0700 Subject: [PATCH 055/104] Test upcoming Chia 1.7.0 release branch. Also 'provenance: false' fix for Github image change. --- .github/workflows/develop-apple.yaml | 1 + .github/workflows/develop-ballcoin.yaml | 1 + .github/workflows/develop-base.yaml | 2 ++ .github/workflows/develop-bpx.yaml | 1 + .github/workflows/develop-btcgreen.yaml | 1 + .github/workflows/develop-cactus.yaml | 1 + .github/workflows/develop-chia.yaml | 3 ++- .github/workflows/develop-chinilla.yaml | 1 + .github/workflows/develop-chives.yaml | 1 + .github/workflows/develop-coffee.yaml | 1 + .github/workflows/develop-cryptodoge.yaml | 1 + .github/workflows/develop-ecostake.yaml | 1 + .github/workflows/develop-flax.yaml | 1 + .github/workflows/develop-flora.yaml | 1 + .github/workflows/develop-gold.yaml | 1 + .github/workflows/develop-greenbtc.yaml | 1 + .github/workflows/develop-hddcoin.yaml | 1 + .github/workflows/develop-littlelambocoin.yaml | 1 + .github/workflows/develop-maize.yaml | 1 + .github/workflows/develop-mint.yaml | 1 + .github/workflows/develop-mmx.yaml | 1 + .github/workflows/develop-moon.yaml | 1 + .github/workflows/develop-nchain.yaml | 1 + .github/workflows/develop-one.yaml | 1 + .github/workflows/develop-petroleum.yaml | 1 + .github/workflows/develop-pipscoin.yaml | 1 + .github/workflows/develop-profit.yaml | 1 + .github/workflows/develop-shibgreen.yaml | 1 + .github/workflows/develop-silicoin.yaml | 1 + .github/workflows/develop-staicoin.yaml | 1 + .github/workflows/develop-stor.yaml | 1 + .github/workflows/develop-tad.yaml | 1 + .github/workflows/develop-wheat.yaml | 1 + .github/workflows/main-chia.yaml | 2 +- .github/workflows/test-chia.yaml | 2 +- 35 files changed, 37 insertions(+), 3 deletions(-) diff --git a/.github/workflows/develop-apple.yaml b/.github/workflows/develop-apple.yaml index 661ea9a02..2d5e356b1 100644 --- a/.github/workflows/develop-apple.yaml +++ b/.github/workflows/develop-apple.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-ballcoin.yaml b/.github/workflows/develop-ballcoin.yaml index d91473a93..2cfb8ba7f 100644 --- a/.github/workflows/develop-ballcoin.yaml +++ b/.github/workflows/develop-ballcoin.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-base.yaml b/.github/workflows/develop-base.yaml index 0b5b65155..70d6100a2 100644 --- a/.github/workflows/develop-base.yaml +++ b/.github/workflows/develop-base.yaml @@ -35,6 +35,7 @@ jobs: file: docker/dockerfile-jammy.base context: . platforms: linux/amd64 + provenance: false push: true tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-base-jammy:develop @@ -72,6 +73,7 @@ jobs: file: docker/dockerfile-focal.base context: . platforms: linux/amd64 + provenance: false push: true tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-base-focal:develop diff --git a/.github/workflows/develop-bpx.yaml b/.github/workflows/develop-bpx.yaml index afc1e2932..24694d91c 100644 --- a/.github/workflows/develop-bpx.yaml +++ b/.github/workflows/develop-bpx.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-btcgreen.yaml b/.github/workflows/develop-btcgreen.yaml index f7f39214e..20b82dc69 100644 --- a/.github/workflows/develop-btcgreen.yaml +++ b/.github/workflows/develop-btcgreen.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-cactus.yaml b/.github/workflows/develop-cactus.yaml index dd906b79e..0f316a95f 100644 --- a/.github/workflows/develop-cactus.yaml +++ b/.github/workflows/develop-cactus.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-chia.yaml b/.github/workflows/develop-chia.yaml index 3d41f1237..6d8165c8e 100644 --- a/.github/workflows/develop-chia.yaml +++ b/.github/workflows/develop-chia.yaml @@ -38,12 +38,13 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "CHIA_BRANCH=main" + "CHIA_BRANCH=release/1.7.0" "BLADEBIT_BRANCH=master" "PLOTMAN_BRANCH=development" tags: | diff --git a/.github/workflows/develop-chinilla.yaml b/.github/workflows/develop-chinilla.yaml index 1538b8b9e..af579e4f7 100644 --- a/.github/workflows/develop-chinilla.yaml +++ b/.github/workflows/develop-chinilla.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-chives.yaml b/.github/workflows/develop-chives.yaml index 8a3e6fa2e..fafadea05 100644 --- a/.github/workflows/develop-chives.yaml +++ b/.github/workflows/develop-chives.yaml @@ -83,6 +83,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-coffee.yaml b/.github/workflows/develop-coffee.yaml index 2877fe8c8..aaaba8b63 100644 --- a/.github/workflows/develop-coffee.yaml +++ b/.github/workflows/develop-coffee.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-cryptodoge.yaml b/.github/workflows/develop-cryptodoge.yaml index 235a65dea..dfe851052 100644 --- a/.github/workflows/develop-cryptodoge.yaml +++ b/.github/workflows/develop-cryptodoge.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-ecostake.yaml b/.github/workflows/develop-ecostake.yaml index f2ecd3f70..3f7e0fabb 100644 --- a/.github/workflows/develop-ecostake.yaml +++ b/.github/workflows/develop-ecostake.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-flax.yaml b/.github/workflows/develop-flax.yaml index 22034ea60..25b144ff6 100644 --- a/.github/workflows/develop-flax.yaml +++ b/.github/workflows/develop-flax.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-flora.yaml b/.github/workflows/develop-flora.yaml index ff8bdeac0..8eadcf408 100644 --- a/.github/workflows/develop-flora.yaml +++ b/.github/workflows/develop-flora.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-gold.yaml b/.github/workflows/develop-gold.yaml index 7f66ee56e..112ed784f 100644 --- a/.github/workflows/develop-gold.yaml +++ b/.github/workflows/develop-gold.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-greenbtc.yaml b/.github/workflows/develop-greenbtc.yaml index fb006deea..000f4a14a 100644 --- a/.github/workflows/develop-greenbtc.yaml +++ b/.github/workflows/develop-greenbtc.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-hddcoin.yaml b/.github/workflows/develop-hddcoin.yaml index c67caac57..c49c34192 100644 --- a/.github/workflows/develop-hddcoin.yaml +++ b/.github/workflows/develop-hddcoin.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-littlelambocoin.yaml b/.github/workflows/develop-littlelambocoin.yaml index 2bc9e76ff..a3e5e711f 100644 --- a/.github/workflows/develop-littlelambocoin.yaml +++ b/.github/workflows/develop-littlelambocoin.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-maize.yaml b/.github/workflows/develop-maize.yaml index b928392b6..e3b491ac7 100644 --- a/.github/workflows/develop-maize.yaml +++ b/.github/workflows/develop-maize.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-mint.yaml b/.github/workflows/develop-mint.yaml index c82008386..845a33af5 100644 --- a/.github/workflows/develop-mint.yaml +++ b/.github/workflows/develop-mint.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-mmx.yaml b/.github/workflows/develop-mmx.yaml index 4e522c362..0761bdfbd 100644 --- a/.github/workflows/develop-mmx.yaml +++ b/.github/workflows/develop-mmx.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-moon.yaml b/.github/workflows/develop-moon.yaml index 6cb9bc7fb..3e2cb7820 100644 --- a/.github/workflows/develop-moon.yaml +++ b/.github/workflows/develop-moon.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-nchain.yaml b/.github/workflows/develop-nchain.yaml index 5299e4e9a..a8db9e1f3 100644 --- a/.github/workflows/develop-nchain.yaml +++ b/.github/workflows/develop-nchain.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-one.yaml b/.github/workflows/develop-one.yaml index 8743c00f0..be74f30a6 100644 --- a/.github/workflows/develop-one.yaml +++ b/.github/workflows/develop-one.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-petroleum.yaml b/.github/workflows/develop-petroleum.yaml index a59ffd7c5..8f1862672 100644 --- a/.github/workflows/develop-petroleum.yaml +++ b/.github/workflows/develop-petroleum.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-pipscoin.yaml b/.github/workflows/develop-pipscoin.yaml index 25262a20f..b5b5257a9 100644 --- a/.github/workflows/develop-pipscoin.yaml +++ b/.github/workflows/develop-pipscoin.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-profit.yaml b/.github/workflows/develop-profit.yaml index 20f05eb8b..7ab80ac27 100644 --- a/.github/workflows/develop-profit.yaml +++ b/.github/workflows/develop-profit.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-shibgreen.yaml b/.github/workflows/develop-shibgreen.yaml index 0931ac114..f9195e8c0 100644 --- a/.github/workflows/develop-shibgreen.yaml +++ b/.github/workflows/develop-shibgreen.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-silicoin.yaml b/.github/workflows/develop-silicoin.yaml index 16e113f2b..26d82246e 100644 --- a/.github/workflows/develop-silicoin.yaml +++ b/.github/workflows/develop-silicoin.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-staicoin.yaml b/.github/workflows/develop-staicoin.yaml index d009c6c09..1e98777e2 100644 --- a/.github/workflows/develop-staicoin.yaml +++ b/.github/workflows/develop-staicoin.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-stor.yaml b/.github/workflows/develop-stor.yaml index addd6b0cd..9e0d50831 100644 --- a/.github/workflows/develop-stor.yaml +++ b/.github/workflows/develop-stor.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/develop-tad.yaml b/.github/workflows/develop-tad.yaml index a90a6cfea..df4c28f86 100644 --- a/.github/workflows/develop-tad.yaml +++ b/.github/workflows/develop-tad.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/develop-wheat.yaml b/.github/workflows/develop-wheat.yaml index 5860dd1a1..6e9276f9d 100644 --- a/.github/workflows/develop-wheat.yaml +++ b/.github/workflows/develop-wheat.yaml @@ -37,6 +37,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-chia.yaml b/.github/workflows/main-chia.yaml index 7ed8bf78d..86e9cbbcb 100644 --- a/.github/workflows/main-chia.yaml +++ b/.github/workflows/main-chia.yaml @@ -43,7 +43,7 @@ jobs: build-args: | "UBUNTU_VER=jammy" "MACHINARIS_STREAM=latest" - "CHIA_BRANCH=release/1.6.2" + "CHIA_BRANCH=release/1.7.0" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:latest ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:v${{ github.event.inputs.version }} diff --git a/.github/workflows/test-chia.yaml b/.github/workflows/test-chia.yaml index 8faf25c93..e7648eed3 100644 --- a/.github/workflows/test-chia.yaml +++ b/.github/workflows/test-chia.yaml @@ -43,7 +43,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=test" "CHIADOG_BRANCH=dev" - "CHIA_BRANCH=release/1.6.2" + "CHIA_BRANCH=release/1.7.0" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:test ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris:test From fb14d13ac3301497961cabf169e97d70b3cdcd3d Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 27 Jan 2023 12:26:06 -0700 Subject: [PATCH 056/104] Testing new Madmax plotters. --- .github/workflows/develop-mmx.yaml | 2 +- scripts/madmax_setup.sh | 39 ++++-------------------------- 2 files changed, 6 insertions(+), 35 deletions(-) diff --git a/.github/workflows/develop-mmx.yaml b/.github/workflows/develop-mmx.yaml index 0761bdfbd..6900ad49c 100644 --- a/.github/workflows/develop-mmx.yaml +++ b/.github/workflows/develop-mmx.yaml @@ -45,7 +45,7 @@ jobs: "MACHINARIS_STREAM=develop" "MMX_BRANCH=master" "CHIA_BRANCH=latest" - "PLOTMAN_BRANCH=development" + "PLOTMAN_BRANCH=compress" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:develop ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:develop diff --git a/scripts/madmax_setup.sh b/scripts/madmax_setup.sh index 2a9a248ac..8a152a16c 100644 --- a/scripts/madmax_setup.sh +++ b/scripts/madmax_setup.sh @@ -1,41 +1,12 @@ #!/bin/env bash # -# Installs chia-plotter (pipelined multi-threaded) -# See https://github.com/madMAx43v3r/chia-plotter +# Installs chia-plotter (pipelined multi-threaded) from binaries +# +# https://github.com/madMAx43v3r/chia-plotter +# https://github.com/madMAx43v3r/mmx-binaries # -# As of 2022-08-20 -HASH=d1a9e88b44ba37f61bfabcb68e80e83f8b939648 -MADMAX_BRANCH=master - -if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives') ]]; then - if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then - arch_name="$(uname -m)" - if [[ "${arch_name}" = "x86_64" ]] || [[ "${arch_name}" = "arm64" ]]; then - apt update && apt install -y libsodium-dev cmake g++ git build-essential - cd / - git clone --branch ${MADMAX_BRANCH} https://github.com/madMAx43v3r/chia-plotter.git - cd chia-plotter && echo "Building madmax on ${arch_name}..." - if [[ -z "${madmax_relic_main}" ]]; then # Hack on 2021-11-29 due to failed builds on some systems... - sed -i 's/set(ENV{RELIC_MAIN} "1")/#set(ENV{RELIC_MAIN} "1")/g' CMakeLists.txt - fi - git submodule update --init - git checkout $HASH - ./make_devel.sh - mkdir -p /usr/lib/chia-plotter - cp -r ./build/* /usr/lib/chia-plotter - ln -s /usr/lib/chia-plotter/chia_plot /usr/bin/chia_plot - ln -s /usr/lib/chia-plotter/chia_plot_k34 /usr/bin/chia_plot_k34 - cd / - rm -rf chia-plotter - else - echo "Building madmax plotter skipped -> unsupported architecture: ${arch_name}" - fi - fi -fi - -# The MMX blockchain uses plotters from: https://github.com/madMAx43v3r/mmx-binaries -if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && ${blockchains} == 'mmx' ]]; then +if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives' || ${blockchains} == 'mmx')) ]]; then if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then arch_name="$(uname -m)" if [[ "${arch_name}" = "x86_64" ]]; then From 4edb349cedb54b90104f7e4a577899136d60d585 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 27 Jan 2023 13:45:34 -0700 Subject: [PATCH 057/104] Remove extra bracket. --- scripts/madmax_setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/madmax_setup.sh b/scripts/madmax_setup.sh index 8a152a16c..96cba6a11 100644 --- a/scripts/madmax_setup.sh +++ b/scripts/madmax_setup.sh @@ -6,7 +6,7 @@ # https://github.com/madMAx43v3r/mmx-binaries # -if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives' || ${blockchains} == 'mmx')) ]]; then +if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives' || ${blockchains} == 'mmx') ]]; then if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then arch_name="$(uname -m)" if [[ "${arch_name}" = "x86_64" ]]; then From 14e9613d06c5a5aba2360ca75f65518e2f64e099 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 27 Jan 2023 14:13:21 -0700 Subject: [PATCH 058/104] Test compression for Chia too. --- .github/workflows/develop-chia.yaml | 2 +- api/gunicorn.conf.py | 4 ++-- config/plotman.sample-chives.yaml | 2 ++ config/plotman.sample-mmx.yaml | 2 ++ config/plotman.sample.yaml | 4 +++- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/develop-chia.yaml b/.github/workflows/develop-chia.yaml index 6d8165c8e..7a0bfcb21 100644 --- a/.github/workflows/develop-chia.yaml +++ b/.github/workflows/develop-chia.yaml @@ -46,7 +46,7 @@ jobs: "CHIADOG_BRANCH=dev" "CHIA_BRANCH=release/1.7.0" "BLADEBIT_BRANCH=master" - "PLOTMAN_BRANCH=development" + "PLOTMAN_BRANCH=compress" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop diff --git a/api/gunicorn.conf.py b/api/gunicorn.conf.py index e0b4ad114..4afbc963f 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -41,8 +41,8 @@ def on_starting(server): # Collect disk stats from all modes where blockchain is chia, avoiding duplicate disks from multiple forks on same host if 'chia' in globals.enabled_blockchains(): - scheduler.add_job(func=stats_disk.collect, name="stats_disk", trigger='cron', minute="*/10", jitter=JOB_JITTER) # Every 10 minutes - scheduler.add_job(func=status_drives.update, name="status_drives", trigger='cron', minute="*/15", jitter=JOB_JITTER) # Every 15 minutes + scheduler.add_job(func=stats_disk.collect, name="stats_disk", trigger='cron', minute="*/10", jitter=5*60) # Every 10 minutes + scheduler.add_job(func=status_drives.update, name="status_drives", trigger='cron', minute="*/15", jitter=7.5*60) # Every 15 minutes # MMX needs to report plots from harvesters directly as they are not listed via the fullnode like Chia does if not utils.is_fullnode() and globals.harvesting_enabled() and 'mmx' in globals.enabled_blockchains(): diff --git a/config/plotman.sample-chives.yaml b/config/plotman.sample-chives.yaml index d8193b927..151a4fefd 100644 --- a/config/plotman.sample-chives.yaml +++ b/config/plotman.sample-chives.yaml @@ -114,3 +114,5 @@ plotting: n_buckets3: 256 # Default is 256 n_rmulti2: 1 # Default is 1 network_port: 9699 # Default is 8444, but use 9699 for Chives + compression: 1 # Compression level (default = 1, min = 1, max = 9) + gpu_plot: false # If true, requires a GPU device in-container to plot diff --git a/config/plotman.sample-mmx.yaml b/config/plotman.sample-mmx.yaml index 34de53937..9431a551e 100644 --- a/config/plotman.sample-mmx.yaml +++ b/config/plotman.sample-mmx.yaml @@ -110,3 +110,5 @@ plotting: n_buckets3: 256 # Default is 256 n_rmulti2: 1 # Default is 1 network_port: 11337 # Use 11337 + compression: 1 # Compression level (default = 1, min = 1, max = 9) + gpu_plot: false # If true, requires a GPU device in-container to plot diff --git a/config/plotman.sample.yaml b/config/plotman.sample.yaml index c1e173eef..852873965 100644 --- a/config/plotman.sample.yaml +++ b/config/plotman.sample.yaml @@ -119,7 +119,9 @@ plotting: n_buckets3: 256 # Default is 256 n_rmulti2: 1 # Default is 1 network_port: 8444 # Default is 8444, but use 9699 for Chives - + compression: 1 # Compression level (default = 1, min = 1, max = 9) + gpu_plot: false # If true, requires a GPU device in-container to plot + chia: # The stock plotter; see https://github.com/guydavis/machinaris/wiki/Chia#plotting k: 32 # k-size of plot, leave at 32 most of the time From 9d01c1f8b3f4922fada4046deafc5dcc4ee7fc45 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 30 Jan 2023 09:47:12 -0700 Subject: [PATCH 059/104] Fix for alerts timestamp formatting. Shibgreen patch. --- CHANGELOG.md | 2 +- scripts/chiadog_notifier.sh | 3 +-- scripts/forks/shibgreen_install.sh | 4 ++-- scripts/madmax_setup.sh | 34 +++++++++++++++++++++++++++++- 4 files changed, 37 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97fcd2856..44e438ac2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ All notable changes to this project will be documented in this file. The format - [BTCGreen](https://github.com/BTCgreen-Network/btcgreen-blockchain/releases/tag/1.7.0b) to v1.7.0b - [Cactus](https://github.com/Cactus-Network/cactus-blockchain/releases/tag/1.6.2) to v1.6.2 - [Chives](https://github.com/HiveProject2021/chives-blockchain/releases/tag/1.5.3) to v1.5.3, including staking. - - [SHIBGreen](https://github.com/BTCgreen-Network/shibgreen-blockchain/releases/tag/1.7.0b) to v1.7.0b + - [SHIBGreen](https://github.com/BTCgreen-Network/shibgreen-blockchain/releases/tag/1.7.0.1) to v1.7.0.1 - [Staicoin](https://github.com/STATION-I/stai-blockchain/releases/tag/1.3.0) to v1.3.0. Note, they require a fresh `config.yaml`. ## Notes - Support for new Chia forks DOES NOT imply my endorsement for them. Only run those you are comfortable with. diff --git a/scripts/chiadog_notifier.sh b/scripts/chiadog_notifier.sh index d47d8b28e..be59b4dbc 100644 --- a/scripts/chiadog_notifier.sh +++ b/scripts/chiadog_notifier.sh @@ -10,8 +10,7 @@ hostname="$(hostname -s)" now="$(date +'%Y-%m-%d %H:%M:%S.%3N')" unique_id="${hostname}_${blockchains}_${now}" echo "${now} ${hostname} ${event_service_name} ${event_priority_name}: ${event_message}" - -now_secs_only=$(echo "${now}" | sed 's/...$//') +now_secs_only=${now::-4} cd /root/.chia/machinaris/dbs sqlite3 -cmd '.timeout 5000' alerts.db < unsupported architecture: ${arch_name}" + fi + fi +fi + +# MMX blockchain container gets the "new" Madmax plotters, with compression, only available as binaries +if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'mmx') ]]; then if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then arch_name="$(uname -m)" if [[ "${arch_name}" = "x86_64" ]]; then From d77a3b173cb5624e23afb3240df94b2d6bcf710c Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 30 Jan 2023 10:09:00 -0700 Subject: [PATCH 060/104] Fix for provence issue with GHCR. --- .github/workflows/main-apple.yaml | 1 + .github/workflows/main-ballcoin.yaml | 1 + .github/workflows/main-base.yaml | 2 ++ .github/workflows/main-bpx.yaml | 1 + .github/workflows/main-btcgreen.yaml | 1 + .github/workflows/main-cactus.yaml | 2 ++ .github/workflows/main-chia.yaml | 1 + .github/workflows/main-chinilla.yaml | 1 + .github/workflows/main-chives.yaml | 1 + .github/workflows/main-coffee.yaml | 1 + .github/workflows/main-cryptodoge.yaml | 1 + .github/workflows/main-ecostake.yaml | 1 + .github/workflows/main-flax.yaml | 1 + .github/workflows/main-flora.yaml | 1 + .github/workflows/main-gold.yaml | 1 + .github/workflows/main-greenbtc.yaml | 1 + .github/workflows/main-hddcoin.yaml | 1 + .github/workflows/main-littlelambocoin.yaml | 1 + .github/workflows/main-maize.yaml | 1 + .github/workflows/main-mint.yaml | 1 + .github/workflows/main-mmx.yaml | 1 + .github/workflows/main-moon.yaml | 1 + .github/workflows/main-nchain.yaml | 1 + .github/workflows/main-one.yaml | 1 + .github/workflows/main-petroleum.yaml | 1 + .github/workflows/main-pipscoin.yaml | 1 + .github/workflows/main-profit.yaml | 1 + .github/workflows/main-shibgreen.yaml | 1 + .github/workflows/main-silicoin.yaml | 1 + .github/workflows/main-staicoin.yaml | 1 + .github/workflows/main-stor.yaml | 1 + .github/workflows/main-tad.yaml | 1 + .github/workflows/main-wheat.yaml | 1 + .github/workflows/test-apple.yaml | 1 + .github/workflows/test-ballcoin.yaml | 1 + .github/workflows/test-base.yaml | 1 + .github/workflows/test-bpx.yaml | 1 + .github/workflows/test-btcgreen.yaml | 1 + .github/workflows/test-cactus.yaml | 1 + .github/workflows/test-chia.yaml | 1 + .github/workflows/test-chinilla.yaml | 1 + .github/workflows/test-chives.yaml | 1 + .github/workflows/test-coffee.yaml | 1 + .github/workflows/test-cryptodoge.yaml | 1 + .github/workflows/test-ecostake.yaml | 1 + .github/workflows/test-flax.yaml | 1 + .github/workflows/test-flora.yaml | 1 + .github/workflows/test-gold.yaml | 1 + .github/workflows/test-greenbtc.yaml | 1 + .github/workflows/test-hddcoin.yaml | 1 + .github/workflows/test-littlelambocoin.yaml | 1 + .github/workflows/test-maize.yaml | 1 + .github/workflows/test-mint.yaml | 1 + .github/workflows/test-mmx.yaml | 1 + .github/workflows/test-moon.yaml | 1 + .github/workflows/test-nchain.yaml | 1 + .github/workflows/test-one.yaml | 1 + .github/workflows/test-petroleum.yaml | 1 + .github/workflows/test-pipscoin.yaml | 1 + .github/workflows/test-profit.yaml | 1 + .github/workflows/test-shibgreen.yaml | 1 + .github/workflows/test-silicoin.yaml | 1 + .github/workflows/test-staicoin.yaml | 1 + .github/workflows/test-stor.yaml | 1 + .github/workflows/test-tad.yaml | 1 + .github/workflows/test-wheat.yaml | 1 + web/actions/chiadog.py | 9 +++++++-- 67 files changed, 75 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main-apple.yaml b/.github/workflows/main-apple.yaml index 0b480deb5..b67464f92 100644 --- a/.github/workflows/main-apple.yaml +++ b/.github/workflows/main-apple.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-ballcoin.yaml b/.github/workflows/main-ballcoin.yaml index 2672c7f76..a0ff905c3 100644 --- a/.github/workflows/main-ballcoin.yaml +++ b/.github/workflows/main-ballcoin.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-base.yaml b/.github/workflows/main-base.yaml index 080f1acd6..8d639154c 100644 --- a/.github/workflows/main-base.yaml +++ b/.github/workflows/main-base.yaml @@ -35,6 +35,7 @@ jobs: file: docker/dockerfile-jammy.base context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-base-jammy:latest @@ -72,6 +73,7 @@ jobs: file: docker/dockerfile-focal.base context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-base-focal:latest diff --git a/.github/workflows/main-bpx.yaml b/.github/workflows/main-bpx.yaml index 38747738a..6cfb08a27 100644 --- a/.github/workflows/main-bpx.yaml +++ b/.github/workflows/main-bpx.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-btcgreen.yaml b/.github/workflows/main-btcgreen.yaml index d41a9a42f..bfe737799 100644 --- a/.github/workflows/main-btcgreen.yaml +++ b/.github/workflows/main-btcgreen.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-cactus.yaml b/.github/workflows/main-cactus.yaml index 5f09607f8..0b1ff6e46 100644 --- a/.github/workflows/main-cactus.yaml +++ b/.github/workflows/main-cactus.yaml @@ -39,6 +39,8 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-chia.yaml b/.github/workflows/main-chia.yaml index 86e9cbbcb..e0ff030e1 100644 --- a/.github/workflows/main-chia.yaml +++ b/.github/workflows/main-chia.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-chinilla.yaml b/.github/workflows/main-chinilla.yaml index c31c042b9..71ac2dd56 100644 --- a/.github/workflows/main-chinilla.yaml +++ b/.github/workflows/main-chinilla.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-chives.yaml b/.github/workflows/main-chives.yaml index 55f9f5881..cadce9307 100644 --- a/.github/workflows/main-chives.yaml +++ b/.github/workflows/main-chives.yaml @@ -83,6 +83,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-coffee.yaml b/.github/workflows/main-coffee.yaml index f711fd291..a71a12716 100644 --- a/.github/workflows/main-coffee.yaml +++ b/.github/workflows/main-coffee.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-cryptodoge.yaml b/.github/workflows/main-cryptodoge.yaml index 79536f109..8ad2e8138 100644 --- a/.github/workflows/main-cryptodoge.yaml +++ b/.github/workflows/main-cryptodoge.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-ecostake.yaml b/.github/workflows/main-ecostake.yaml index 57fe86143..4b63f6cb2 100644 --- a/.github/workflows/main-ecostake.yaml +++ b/.github/workflows/main-ecostake.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-flax.yaml b/.github/workflows/main-flax.yaml index 0096d7f4c..d9ad33d06 100644 --- a/.github/workflows/main-flax.yaml +++ b/.github/workflows/main-flax.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-flora.yaml b/.github/workflows/main-flora.yaml index 75ccb6678..0346d6c48 100644 --- a/.github/workflows/main-flora.yaml +++ b/.github/workflows/main-flora.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-gold.yaml b/.github/workflows/main-gold.yaml index 3a5c2693a..4de0bd6fe 100644 --- a/.github/workflows/main-gold.yaml +++ b/.github/workflows/main-gold.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-greenbtc.yaml b/.github/workflows/main-greenbtc.yaml index 4a55cfd31..b557ce6d4 100644 --- a/.github/workflows/main-greenbtc.yaml +++ b/.github/workflows/main-greenbtc.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-hddcoin.yaml b/.github/workflows/main-hddcoin.yaml index 045e0ee47..664705012 100644 --- a/.github/workflows/main-hddcoin.yaml +++ b/.github/workflows/main-hddcoin.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-littlelambocoin.yaml b/.github/workflows/main-littlelambocoin.yaml index 764e578e6..6491eb341 100644 --- a/.github/workflows/main-littlelambocoin.yaml +++ b/.github/workflows/main-littlelambocoin.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-maize.yaml b/.github/workflows/main-maize.yaml index ef31e7427..44b103528 100644 --- a/.github/workflows/main-maize.yaml +++ b/.github/workflows/main-maize.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-mint.yaml b/.github/workflows/main-mint.yaml index 92211dd8e..88b0136ba 100644 --- a/.github/workflows/main-mint.yaml +++ b/.github/workflows/main-mint.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-mmx.yaml b/.github/workflows/main-mmx.yaml index 513581349..11af09a11 100644 --- a/.github/workflows/main-mmx.yaml +++ b/.github/workflows/main-mmx.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-moon.yaml b/.github/workflows/main-moon.yaml index 270cffda5..3333d66c7 100644 --- a/.github/workflows/main-moon.yaml +++ b/.github/workflows/main-moon.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-nchain.yaml b/.github/workflows/main-nchain.yaml index 5412e05ff..b5214154d 100644 --- a/.github/workflows/main-nchain.yaml +++ b/.github/workflows/main-nchain.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-one.yaml b/.github/workflows/main-one.yaml index e7c6d0197..4c66b26d2 100644 --- a/.github/workflows/main-one.yaml +++ b/.github/workflows/main-one.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-petroleum.yaml b/.github/workflows/main-petroleum.yaml index f4d1d274e..ca93709fa 100644 --- a/.github/workflows/main-petroleum.yaml +++ b/.github/workflows/main-petroleum.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-pipscoin.yaml b/.github/workflows/main-pipscoin.yaml index 999d9a963..cfb9483fa 100644 --- a/.github/workflows/main-pipscoin.yaml +++ b/.github/workflows/main-pipscoin.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-profit.yaml b/.github/workflows/main-profit.yaml index 72109e69a..70098f54f 100644 --- a/.github/workflows/main-profit.yaml +++ b/.github/workflows/main-profit.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-shibgreen.yaml b/.github/workflows/main-shibgreen.yaml index c629c8ee3..f42b97c49 100644 --- a/.github/workflows/main-shibgreen.yaml +++ b/.github/workflows/main-shibgreen.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-silicoin.yaml b/.github/workflows/main-silicoin.yaml index ec39655e6..eea382696 100644 --- a/.github/workflows/main-silicoin.yaml +++ b/.github/workflows/main-silicoin.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-staicoin.yaml b/.github/workflows/main-staicoin.yaml index f0ba0c079..a570112dd 100644 --- a/.github/workflows/main-staicoin.yaml +++ b/.github/workflows/main-staicoin.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-stor.yaml b/.github/workflows/main-stor.yaml index ef142e9d1..59b0bc04c 100644 --- a/.github/workflows/main-stor.yaml +++ b/.github/workflows/main-stor.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/main-tad.yaml b/.github/workflows/main-tad.yaml index 127bf2251..5a158c920 100644 --- a/.github/workflows/main-tad.yaml +++ b/.github/workflows/main-tad.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/main-wheat.yaml b/.github/workflows/main-wheat.yaml index 5778c95a1..f1447772d 100644 --- a/.github/workflows/main-wheat.yaml +++ b/.github/workflows/main-wheat.yaml @@ -39,6 +39,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-apple.yaml b/.github/workflows/test-apple.yaml index 5cbd0e044..a85fd3951 100644 --- a/.github/workflows/test-apple.yaml +++ b/.github/workflows/test-apple.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-ballcoin.yaml b/.github/workflows/test-ballcoin.yaml index 908b7df88..68a67aaf8 100644 --- a/.github/workflows/test-ballcoin.yaml +++ b/.github/workflows/test-ballcoin.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-base.yaml b/.github/workflows/test-base.yaml index b8209c4e5..7434fa394 100644 --- a/.github/workflows/test-base.yaml +++ b/.github/workflows/test-base.yaml @@ -35,6 +35,7 @@ jobs: file: docker/dockerfile-jammy.base context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-base-jammy:test diff --git a/.github/workflows/test-bpx.yaml b/.github/workflows/test-bpx.yaml index decc34435..29cee94b3 100644 --- a/.github/workflows/test-bpx.yaml +++ b/.github/workflows/test-bpx.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-btcgreen.yaml b/.github/workflows/test-btcgreen.yaml index 88353d0f7..832843924 100644 --- a/.github/workflows/test-btcgreen.yaml +++ b/.github/workflows/test-btcgreen.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-cactus.yaml b/.github/workflows/test-cactus.yaml index 0796aa797..8644cecc1 100644 --- a/.github/workflows/test-cactus.yaml +++ b/.github/workflows/test-cactus.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-chia.yaml b/.github/workflows/test-chia.yaml index e7648eed3..fa66f01a6 100644 --- a/.github/workflows/test-chia.yaml +++ b/.github/workflows/test-chia.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-chinilla.yaml b/.github/workflows/test-chinilla.yaml index 3b5a890bf..a0793869b 100644 --- a/.github/workflows/test-chinilla.yaml +++ b/.github/workflows/test-chinilla.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-chives.yaml b/.github/workflows/test-chives.yaml index ab2009f43..0aeee3e23 100644 --- a/.github/workflows/test-chives.yaml +++ b/.github/workflows/test-chives.yaml @@ -81,6 +81,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-coffee.yaml b/.github/workflows/test-coffee.yaml index 1319a5fdc..5603cf27c 100644 --- a/.github/workflows/test-coffee.yaml +++ b/.github/workflows/test-coffee.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-cryptodoge.yaml b/.github/workflows/test-cryptodoge.yaml index 1dc575b5f..8692df857 100644 --- a/.github/workflows/test-cryptodoge.yaml +++ b/.github/workflows/test-cryptodoge.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-ecostake.yaml b/.github/workflows/test-ecostake.yaml index a82512d9d..f7c465691 100644 --- a/.github/workflows/test-ecostake.yaml +++ b/.github/workflows/test-ecostake.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-flax.yaml b/.github/workflows/test-flax.yaml index d8aa4a45d..b46daa7de 100644 --- a/.github/workflows/test-flax.yaml +++ b/.github/workflows/test-flax.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-flora.yaml b/.github/workflows/test-flora.yaml index 938289552..0273e0587 100644 --- a/.github/workflows/test-flora.yaml +++ b/.github/workflows/test-flora.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-gold.yaml b/.github/workflows/test-gold.yaml index a6e0f4fc3..45f462fed 100644 --- a/.github/workflows/test-gold.yaml +++ b/.github/workflows/test-gold.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-greenbtc.yaml b/.github/workflows/test-greenbtc.yaml index 6e9cbbba0..399cc3c89 100644 --- a/.github/workflows/test-greenbtc.yaml +++ b/.github/workflows/test-greenbtc.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-hddcoin.yaml b/.github/workflows/test-hddcoin.yaml index 2c42f949c..857e5ac21 100644 --- a/.github/workflows/test-hddcoin.yaml +++ b/.github/workflows/test-hddcoin.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-littlelambocoin.yaml b/.github/workflows/test-littlelambocoin.yaml index c3d86a597..cab6398f8 100644 --- a/.github/workflows/test-littlelambocoin.yaml +++ b/.github/workflows/test-littlelambocoin.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-maize.yaml b/.github/workflows/test-maize.yaml index b0ab09b66..ad4f72987 100644 --- a/.github/workflows/test-maize.yaml +++ b/.github/workflows/test-maize.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-mint.yaml b/.github/workflows/test-mint.yaml index f106b5967..cbc92b716 100644 --- a/.github/workflows/test-mint.yaml +++ b/.github/workflows/test-mint.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-mmx.yaml b/.github/workflows/test-mmx.yaml index abf5d0ee7..add9a2f1b 100644 --- a/.github/workflows/test-mmx.yaml +++ b/.github/workflows/test-mmx.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-moon.yaml b/.github/workflows/test-moon.yaml index f150d796c..71e5c2420 100644 --- a/.github/workflows/test-moon.yaml +++ b/.github/workflows/test-moon.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-nchain.yaml b/.github/workflows/test-nchain.yaml index cd0348761..3d1acd2a7 100644 --- a/.github/workflows/test-nchain.yaml +++ b/.github/workflows/test-nchain.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-one.yaml b/.github/workflows/test-one.yaml index ca148779f..4350257b0 100644 --- a/.github/workflows/test-one.yaml +++ b/.github/workflows/test-one.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-petroleum.yaml b/.github/workflows/test-petroleum.yaml index 7f9a954e6..fc435e923 100644 --- a/.github/workflows/test-petroleum.yaml +++ b/.github/workflows/test-petroleum.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-pipscoin.yaml b/.github/workflows/test-pipscoin.yaml index 7b9896d95..85c3df327 100644 --- a/.github/workflows/test-pipscoin.yaml +++ b/.github/workflows/test-pipscoin.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-profit.yaml b/.github/workflows/test-profit.yaml index 7dd758ab9..d4e93c999 100644 --- a/.github/workflows/test-profit.yaml +++ b/.github/workflows/test-profit.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-shibgreen.yaml b/.github/workflows/test-shibgreen.yaml index c725981b3..4516c316d 100644 --- a/.github/workflows/test-shibgreen.yaml +++ b/.github/workflows/test-shibgreen.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-silicoin.yaml b/.github/workflows/test-silicoin.yaml index cc9c0ae3d..2a094e17b 100644 --- a/.github/workflows/test-silicoin.yaml +++ b/.github/workflows/test-silicoin.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-staicoin.yaml b/.github/workflows/test-staicoin.yaml index 797522093..7c647521a 100644 --- a/.github/workflows/test-staicoin.yaml +++ b/.github/workflows/test-staicoin.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-stor.yaml b/.github/workflows/test-stor.yaml index cb88a255d..18c99ba58 100644 --- a/.github/workflows/test-stor.yaml +++ b/.github/workflows/test-stor.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=focal" diff --git a/.github/workflows/test-tad.yaml b/.github/workflows/test-tad.yaml index 9a425c9cb..844c64568 100644 --- a/.github/workflows/test-tad.yaml +++ b/.github/workflows/test-tad.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/.github/workflows/test-wheat.yaml b/.github/workflows/test-wheat.yaml index 8afe34c78..d79ec794b 100644 --- a/.github/workflows/test-wheat.yaml +++ b/.github/workflows/test-wheat.yaml @@ -38,6 +38,7 @@ jobs: file: docker/dockerfile context: . platforms: linux/amd64,linux/arm64 + provenance: false push: true build-args: | "UBUNTU_VER=jammy" diff --git a/web/actions/chiadog.py b/web/actions/chiadog.py index c0f70e4b0..9213f3a74 100644 --- a/web/actions/chiadog.py +++ b/web/actions/chiadog.py @@ -44,8 +44,13 @@ def save_config(farmer, blockchain, config): flash(_("Nice! Chiadog's config.yaml validated and saved successfully."), 'success') def get_notifications(): - alerts = db.session.query(a.Alert).order_by(a.Alert.created_at.desc()).all() - return Alerts(alerts) + try: # Due to defect in date formatting around January 2023, if get a Value + alerts = db.session.query(a.Alert).order_by(a.Alert.created_at.desc()).all() + return Alerts(alerts) + except ValueError: + app.logger.error("Found likely malformeed alert timestamp. Now clearing bad alerts.") + remove_all_alerts() + return Alerts([]) def remove_alerts(unique_ids): app.logger.info("Removing {0} alerts: {1}".format(len(unique_ids), unique_ids)) From b9f2537beaa955b8073eb9fcc10c5854f5f2fb4d Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 30 Jan 2023 14:26:12 -0700 Subject: [PATCH 061/104] Fix for MMX binary path. --- common/config/blockchains.json | 2 +- config/plotman.sample-chives.yaml | 2 -- config/plotman.sample.yaml | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/common/config/blockchains.json b/common/config/blockchains.json index 26e40f01d..16c707fa3 100644 --- a/common/config/blockchains.json +++ b/common/config/blockchains.json @@ -325,7 +325,7 @@ "mmx": { "name": "MMX", "symbol": "MMX" , - "binary": "/mmx-node/build/mmx", + "binary": "/mmx-node/bin/mmx", "network_path": "/root/.mmx/testnet9", "network_name": "testnet9", "network_port": 12339, diff --git a/config/plotman.sample-chives.yaml b/config/plotman.sample-chives.yaml index 151a4fefd..d8193b927 100644 --- a/config/plotman.sample-chives.yaml +++ b/config/plotman.sample-chives.yaml @@ -114,5 +114,3 @@ plotting: n_buckets3: 256 # Default is 256 n_rmulti2: 1 # Default is 1 network_port: 9699 # Default is 8444, but use 9699 for Chives - compression: 1 # Compression level (default = 1, min = 1, max = 9) - gpu_plot: false # If true, requires a GPU device in-container to plot diff --git a/config/plotman.sample.yaml b/config/plotman.sample.yaml index 852873965..41a0f97fd 100644 --- a/config/plotman.sample.yaml +++ b/config/plotman.sample.yaml @@ -119,8 +119,6 @@ plotting: n_buckets3: 256 # Default is 256 n_rmulti2: 1 # Default is 1 network_port: 8444 # Default is 8444, but use 9699 for Chives - compression: 1 # Compression level (default = 1, min = 1, max = 9) - gpu_plot: false # If true, requires a GPU device in-container to plot chia: # The stock plotter; see https://github.com/guydavis/machinaris/wiki/Chia#plotting From d040aefef92385a92e0701ba0ec49dc5d323e334 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 30 Jan 2023 15:40:44 -0700 Subject: [PATCH 062/104] Display compression level of plotting. --- api/commands/plotman_cli.py | 4 +- api/migrations/versions/6cda05ff2952_.py | 440 +++++++++++++++++++++++ api/models/mmx.py | 2 +- api/models/plotman.py | 2 +- api/schedules/stats_effort.py | 2 +- api/schedules/status_plots.py | 2 +- api/schedules/status_plotting.py | 1 + common/models/plottings.py | 1 + web/__init__.py | 2 +- web/actions/warnings.py | 2 +- web/models/plotman.py | 2 + 11 files changed, 452 insertions(+), 8 deletions(-) create mode 100644 api/migrations/versions/6cda05ff2952_.py diff --git a/api/commands/plotman_cli.py b/api/commands/plotman_cli.py index 0814ad764..18ed02a60 100644 --- a/api/commands/plotman_cli.py +++ b/api/commands/plotman_cli.py @@ -175,7 +175,7 @@ def clean_tmp_dirs_before_run(): def check_tmp_file_is_day_old(path): try: - match = re.match("plot(?:-mmx)?-k(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+)", path.name) + match = re.match("plot(?:-mmx)?-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+)", path.name) if match: plot_date = datetime.datetime.strptime("{0}-{1}-{2} {3}:{4}".format( match.group(2), match.group(3), match.group(4), match.group(5), match.group(6)), @@ -276,7 +276,7 @@ def find_plotting_job_log(plot_id): return None def analyze(plot_file): - groups = re.match("plot(?:-mmx)?-k(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", plot_file) + groups = re.match("plot(?:-mmx)?-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", plot_file) if not groups: return "Invalid plot file name provided: {0}".format(plot_file) plot_log_file = find_plotting_job_log(groups[7]) diff --git a/api/migrations/versions/6cda05ff2952_.py b/api/migrations/versions/6cda05ff2952_.py new file mode 100644 index 000000000..d42a7b5f5 --- /dev/null +++ b/api/migrations/versions/6cda05ff2952_.py @@ -0,0 +1,440 @@ +"""empty message + +Revision ID: 6cda05ff2952 +Revises: 2f7f4aa4758b +Create Date: 2023-01-30 15:28:21.362394 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '6cda05ff2952' +down_revision = '2f7f4aa4758b' +branch_labels = None +depends_on = None + + +def upgrade(engine_name): + globals()["upgrade_%s" % engine_name]() + + +def downgrade(engine_name): + globals()["downgrade_%s" % engine_name]() + + + + + +def upgrade_(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_alerts(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_alerts(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_blockchains(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_blockchains(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_challenges(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_challenges(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_connections(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_connections(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_drives(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_drives(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_farms(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_farms(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_keys(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_keys(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_partials(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_partials(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_plotnfts(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_plotnfts(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_plottings(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table('plottings', schema=None) as batch_op: + batch_op.add_column(sa.Column('lvl', sa.Integer(), nullable=True)) + + # ### end Alembic commands ### + + +def downgrade_plottings(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table('plottings', schema=None) as batch_op: + batch_op.drop_column('lvl') + + # ### end Alembic commands ### + + +def upgrade_plots(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_plots(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_pools(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_pools(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_transfers(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_transfers(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_wallets(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_wallets(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_warnings(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_warnings(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_workers(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_workers(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_plot_count(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_plot_count(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_plots_size(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_plots_size(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_total_coins(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_total_coins(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_netspace_size(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_netspace_size(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_time_to_win(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_time_to_win(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_effort(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_effort(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_plots_total_used(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_plots_total_used(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_plots_disk_used(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_plots_disk_used(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_plots_disk_free(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_plots_disk_free(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_plotting_total_used(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_plotting_total_used(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_plotting_disk_used(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_plotting_disk_used(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_plotting_disk_free(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_plotting_disk_free(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_farmed_blocks(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_farmed_blocks(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_wallet_balances(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_wallet_balances(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_total_balance(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_total_balance(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_container_mem_gib(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_container_mem_gib(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def upgrade_stat_host_mem_pct(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade_stat_host_mem_pct(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + diff --git a/api/models/mmx.py b/api/models/mmx.py index 653b7b4a8..5410c5d0a 100644 --- a/api/models/mmx.py +++ b/api/models/mmx.py @@ -82,7 +82,7 @@ def __init__(self, entries): app.logger.info("Skipping non-plot file named: {0}".format(path)) continue dir,file=os.path.split(path) - groups = re.match("plot-mmx-k(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", file) + groups = re.match("plot-mmx-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", file) if not groups: app.logger.info("Invalid plot file name provided: {0}".format(file)) continue diff --git a/api/models/plotman.py b/api/models/plotman.py index 43955a363..eea7b1133 100644 --- a/api/models/plotman.py +++ b/api/models/plotman.py @@ -84,7 +84,7 @@ def parse_transfer_log(self, log_file, running_transfers): elif line.startswith("Completed"): self.end_date = line[line.index(' at ')+4:].strip() elif line.startswith("+ rsync"): - m = re.search("plot(?:-mmx)?-k(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", line) + m = re.search("plot(?:-mmx)?-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", line) if m: self.plot_id = m.group(7)[:16].strip() self.k = int(m.group(1).strip()) diff --git a/api/schedules/stats_effort.py b/api/schedules/stats_effort.py index 6de3c6071..69a538aac 100644 --- a/api/schedules/stats_effort.py +++ b/api/schedules/stats_effort.py @@ -41,7 +41,7 @@ def get_oldest_plot_file_time(): for plot_dir in globals.get_disks("plots"): plots = [f for f in os.listdir(plot_dir) if os.path.isfile(os.path.join(plot_dir,f))] for plot in plots: - match = re.match("plot(?:-mmx)?-k(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", plot) + match = re.match("plot(?:-mmx)?-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", plot) if match: created_at_str = "{0}-{1}-{2} {3}:{4}".format( match.group(2),match.group(3),match.group(4),match.group(5),match.group(6)) created_at_secs = time.mktime(datetime.datetime.strptime(created_at_str, "%Y-%m-%d %H:%M").timetuple()) diff --git a/api/schedules/status_plots.py b/api/schedules/status_plots.py index f7370d518..bf0fd3fb5 100644 --- a/api/schedules/status_plots.py +++ b/api/schedules/status_plots.py @@ -29,7 +29,7 @@ def get_plot_attrs(plot_id, filename): dir,file = os.path.split(filename) - match = re.match("plot(?:-mmx)?-k(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", file) + match = re.match("plot(?:-mmx)?-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", file) if match: short_plot_id = match.group(7)[:16] created_at = "{0}-{1}-{2} {3}:{4}".format( match.group(2),match.group(3),match.group(4),match.group(5),match.group(6)) diff --git a/api/schedules/status_plotting.py b/api/schedules/status_plotting.py index c4c6b7a46..d279b2b73 100644 --- a/api/schedules/status_plotting.py +++ b/api/schedules/status_plotting.py @@ -29,6 +29,7 @@ def update(): "blockchain": blockchain, "plotter": plot['plotter'], "k": plot['k'], + "lvl": plot['lvl'], "tmp": plot['tmp'], "dst": plot['dst'], "wall": plot['wall'], diff --git a/common/models/plottings.py b/common/models/plottings.py index 859763767..de2294fcd 100644 --- a/common/models/plottings.py +++ b/common/models/plottings.py @@ -16,6 +16,7 @@ class Plotting(db.Model): plotter = sa.Column(sa.String(length=64), nullable=False) blockchain = sa.Column(sa.String(length=64), nullable=False) k = sa.Column(sa.Integer, nullable=False) + lvl = sa.Column(sa.Integer, nullable=True) tmp = sa.Column(sa.String(length=255), nullable=False) dst = sa.Column(sa.String(length=255), nullable=False) wall = sa.Column(sa.String(length=8), nullable=False) diff --git a/web/__init__.py b/web/__init__.py index e5518432d..4f74d2f25 100644 --- a/web/__init__.py +++ b/web/__init__.py @@ -85,7 +85,7 @@ def timesecondstrimmer(value): def plotnameshortener(value): #app.logger.info("Shorten: {0}".format(value)) - match = re.match("plot(?:-mmx)?-k(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", value) + match = re.match("plot(?:-mmx)?-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", value) if match: return "plot-k{0}-{1}-{2}-{3}-{4}-{5}-{6}...".format( match.group(1), match.group(2), match.group(3), match.group(4), match.group(5), match.group(6), diff --git a/web/actions/warnings.py b/web/actions/warnings.py index 84940924e..c0a73b743 100644 --- a/web/actions/warnings.py +++ b/web/actions/warnings.py @@ -84,7 +84,7 @@ def check_warnings(args): def get_plot_attrs(filename): dir,file = os.path.split(filename) - match = re.match("plot(?:-mmx)?-k(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", file) + match = re.match("plot(?:-mmx)?-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", file) if match: short_plot_id = match.group(7)[:16] created_at = "{0}-{1}-{2} {3}:{4}".format( match.group(2),match.group(3),match.group(4),match.group(5),match.group(6)) diff --git a/web/models/plotman.py b/web/models/plotman.py index ac2705f2c..eb37e86b9 100644 --- a/web/models/plotman.py +++ b/web/models/plotman.py @@ -15,6 +15,7 @@ def __init__(self, plottings): 'plotter', 'plot_id', 'k', + 'lvl', 'tmp', 'dst', 'wall', @@ -42,6 +43,7 @@ def __init__(self, plottings): 'plotter': plotting.plotter, 'plot_id': plotting.plot_id, 'k': plotting.k, + 'lvl': plotting.lvl, 'tmp': self.strip_trailing_slash(plotting.tmp), 'dst': self.strip_trailing_slash(plotting.dst), 'wall': plotting.wall, From ad53cd088ffbc669e7ff898f205e3bc1b917dca9 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 30 Jan 2023 16:29:09 -0700 Subject: [PATCH 063/104] Fix for compression display. --- api/models/plotman.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/models/plotman.py b/api/models/plotman.py index eea7b1133..29278d5e7 100644 --- a/api/models/plotman.py +++ b/api/models/plotman.py @@ -16,7 +16,7 @@ def __init__(self, cli_stdout, plotman_pid): elif "plot id" in line.strip(): # The header row self.columns = line.replace('plot id', 'plot_id').strip().split() # Plotman has two columns both named 'tmp' so change the 2nd one to 'size' - self.columns[7] = 'size' + 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']: From 29769af8f4b5af3887068c97ee39efad4a191322 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 30 Jan 2023 18:01:55 -0700 Subject: [PATCH 064/104] MMX compression. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44e438ac2..4ad76a3e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. The format - Fix missing Connections listing for Flax and MMX blockchains. Thanks @ekersey! - Fix for Bladebit ramplot relaunching. Thanks @JoeZotacExperience! - Multiple functionality & performance cleanups from excellent code review by @qoole. + - Display compression level for active plotting jobs, currently MMX only. ## Updated - [BTCGreen](https://github.com/BTCgreen-Network/btcgreen-blockchain/releases/tag/1.7.0b) to v1.7.0b - [Cactus](https://github.com/Cactus-Network/cactus-blockchain/releases/tag/1.6.2) to v1.6.2 From 21d27f16b99b7b48bba4a13ca787c789ce9178c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Jan 2023 07:01:48 +0000 Subject: [PATCH 065/104] Bump docker/build-push-action from 3 to 4 Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v3...v4) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/develop-apple.yaml | 2 +- .github/workflows/develop-base.yaml | 4 ++-- .github/workflows/develop-bpx.yaml | 2 +- .github/workflows/develop-btcgreen.yaml | 2 +- .github/workflows/develop-cactus.yaml | 2 +- .github/workflows/develop-chia.yaml | 2 +- .github/workflows/develop-chinilla.yaml | 2 +- .github/workflows/develop-chives.yaml | 2 +- .github/workflows/develop-coffee.yaml | 2 +- .github/workflows/develop-cryptodoge.yaml | 2 +- .github/workflows/develop-ecostake.yaml | 2 +- .github/workflows/develop-flax.yaml | 2 +- .github/workflows/develop-flora.yaml | 2 +- .github/workflows/develop-gold.yaml | 2 +- .github/workflows/develop-greenbtc.yaml | 2 +- .github/workflows/develop-hddcoin.yaml | 2 +- .github/workflows/develop-littlelambocoin.yaml | 2 +- .github/workflows/develop-maize.yaml | 2 +- .github/workflows/develop-mint.yaml | 2 +- .github/workflows/develop-mmx.yaml | 2 +- .github/workflows/develop-moon.yaml | 2 +- .github/workflows/develop-nchain.yaml | 2 +- .github/workflows/develop-one.yaml | 2 +- .github/workflows/develop-petroleum.yaml | 2 +- .github/workflows/develop-profit.yaml | 2 +- .github/workflows/develop-shibgreen.yaml | 2 +- .github/workflows/develop-silicoin.yaml | 2 +- .github/workflows/develop-staicoin.yaml | 2 +- .github/workflows/develop-stor.yaml | 2 +- .github/workflows/develop-tad.yaml | 2 +- .github/workflows/develop-wheat.yaml | 2 +- .github/workflows/main-apple.yaml | 2 +- .github/workflows/main-base.yaml | 4 ++-- .github/workflows/main-bpx.yaml | 2 +- .github/workflows/main-btcgreen.yaml | 2 +- .github/workflows/main-cactus.yaml | 2 +- .github/workflows/main-chia.yaml | 2 +- .github/workflows/main-chinilla.yaml | 2 +- .github/workflows/main-chives.yaml | 2 +- .github/workflows/main-coffee.yaml | 2 +- .github/workflows/main-cryptodoge.yaml | 2 +- .github/workflows/main-ecostake.yaml | 2 +- .github/workflows/main-flax.yaml | 2 +- .github/workflows/main-flora.yaml | 2 +- .github/workflows/main-gold.yaml | 2 +- .github/workflows/main-greenbtc.yaml | 2 +- .github/workflows/main-hddcoin.yaml | 2 +- .github/workflows/main-littlelambocoin.yaml | 2 +- .github/workflows/main-maize.yaml | 2 +- .github/workflows/main-mint.yaml | 2 +- .github/workflows/main-mmx.yaml | 2 +- .github/workflows/main-moon.yaml | 2 +- .github/workflows/main-nchain.yaml | 2 +- .github/workflows/main-one.yaml | 2 +- .github/workflows/main-petroleum.yaml | 2 +- .github/workflows/main-profit.yaml | 2 +- .github/workflows/main-shibgreen.yaml | 2 +- .github/workflows/main-silicoin.yaml | 2 +- .github/workflows/main-staicoin.yaml | 2 +- .github/workflows/main-stor.yaml | 2 +- .github/workflows/main-tad.yaml | 2 +- .github/workflows/main-wheat.yaml | 2 +- .github/workflows/test-apple.yaml | 2 +- .github/workflows/test-base.yaml | 4 ++-- .github/workflows/test-bpx.yaml | 2 +- .github/workflows/test-btcgreen.yaml | 2 +- .github/workflows/test-cactus.yaml | 2 +- .github/workflows/test-chia.yaml | 2 +- .github/workflows/test-chinilla.yaml | 2 +- .github/workflows/test-chives.yaml | 2 +- .github/workflows/test-coffee.yaml | 2 +- .github/workflows/test-cryptodoge.yaml | 2 +- .github/workflows/test-ecostake.yaml | 2 +- .github/workflows/test-flax.yaml | 2 +- .github/workflows/test-flora.yaml | 2 +- .github/workflows/test-gold.yaml | 2 +- .github/workflows/test-greenbtc.yaml | 2 +- .github/workflows/test-hddcoin.yaml | 2 +- .github/workflows/test-littlelambocoin.yaml | 2 +- .github/workflows/test-maize.yaml | 2 +- .github/workflows/test-mint.yaml | 2 +- .github/workflows/test-mmx.yaml | 2 +- .github/workflows/test-moon.yaml | 2 +- .github/workflows/test-nchain.yaml | 2 +- .github/workflows/test-one.yaml | 2 +- .github/workflows/test-petroleum.yaml | 2 +- .github/workflows/test-profit.yaml | 2 +- .github/workflows/test-shibgreen.yaml | 2 +- .github/workflows/test-silicoin.yaml | 2 +- .github/workflows/test-staicoin.yaml | 2 +- .github/workflows/test-stor.yaml | 2 +- .github/workflows/test-tad.yaml | 2 +- .github/workflows/test-wheat.yaml | 2 +- 93 files changed, 96 insertions(+), 96 deletions(-) diff --git a/.github/workflows/develop-apple.yaml b/.github/workflows/develop-apple.yaml index 661ea9a02..5e13aba59 100644 --- a/.github/workflows/develop-apple.yaml +++ b/.github/workflows/develop-apple.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-base.yaml b/.github/workflows/develop-base.yaml index 0b5b65155..0c1ada83e 100644 --- a/.github/workflows/develop-base.yaml +++ b/.github/workflows/develop-base.yaml @@ -30,7 +30,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile-jammy.base context: . @@ -67,7 +67,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile-focal.base context: . diff --git a/.github/workflows/develop-bpx.yaml b/.github/workflows/develop-bpx.yaml index afc1e2932..6d2f37efe 100644 --- a/.github/workflows/develop-bpx.yaml +++ b/.github/workflows/develop-bpx.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-btcgreen.yaml b/.github/workflows/develop-btcgreen.yaml index f7f39214e..c1def0bfd 100644 --- a/.github/workflows/develop-btcgreen.yaml +++ b/.github/workflows/develop-btcgreen.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-cactus.yaml b/.github/workflows/develop-cactus.yaml index dd906b79e..a04293fc0 100644 --- a/.github/workflows/develop-cactus.yaml +++ b/.github/workflows/develop-cactus.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-chia.yaml b/.github/workflows/develop-chia.yaml index c9ba01d59..c493529df 100644 --- a/.github/workflows/develop-chia.yaml +++ b/.github/workflows/develop-chia.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-chinilla.yaml b/.github/workflows/develop-chinilla.yaml index 1538b8b9e..35c45f1f2 100644 --- a/.github/workflows/develop-chinilla.yaml +++ b/.github/workflows/develop-chinilla.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-chives.yaml b/.github/workflows/develop-chives.yaml index 6989dd7b4..4e9b52a0e 100644 --- a/.github/workflows/develop-chives.yaml +++ b/.github/workflows/develop-chives.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-coffee.yaml b/.github/workflows/develop-coffee.yaml index 2877fe8c8..5147bee5e 100644 --- a/.github/workflows/develop-coffee.yaml +++ b/.github/workflows/develop-coffee.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-cryptodoge.yaml b/.github/workflows/develop-cryptodoge.yaml index 235a65dea..20a4677ea 100644 --- a/.github/workflows/develop-cryptodoge.yaml +++ b/.github/workflows/develop-cryptodoge.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-ecostake.yaml b/.github/workflows/develop-ecostake.yaml index f2ecd3f70..833bdb550 100644 --- a/.github/workflows/develop-ecostake.yaml +++ b/.github/workflows/develop-ecostake.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-flax.yaml b/.github/workflows/develop-flax.yaml index 22034ea60..c46db8e0b 100644 --- a/.github/workflows/develop-flax.yaml +++ b/.github/workflows/develop-flax.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-flora.yaml b/.github/workflows/develop-flora.yaml index ff8bdeac0..545e620e4 100644 --- a/.github/workflows/develop-flora.yaml +++ b/.github/workflows/develop-flora.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-gold.yaml b/.github/workflows/develop-gold.yaml index 7f66ee56e..dcbbf0dbc 100644 --- a/.github/workflows/develop-gold.yaml +++ b/.github/workflows/develop-gold.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-greenbtc.yaml b/.github/workflows/develop-greenbtc.yaml index fb006deea..47e22c1d4 100644 --- a/.github/workflows/develop-greenbtc.yaml +++ b/.github/workflows/develop-greenbtc.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-hddcoin.yaml b/.github/workflows/develop-hddcoin.yaml index c67caac57..983ccd392 100644 --- a/.github/workflows/develop-hddcoin.yaml +++ b/.github/workflows/develop-hddcoin.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-littlelambocoin.yaml b/.github/workflows/develop-littlelambocoin.yaml index 2bc9e76ff..8d34e49f7 100644 --- a/.github/workflows/develop-littlelambocoin.yaml +++ b/.github/workflows/develop-littlelambocoin.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-maize.yaml b/.github/workflows/develop-maize.yaml index b928392b6..e9ea69721 100644 --- a/.github/workflows/develop-maize.yaml +++ b/.github/workflows/develop-maize.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-mint.yaml b/.github/workflows/develop-mint.yaml index c82008386..6ecc77203 100644 --- a/.github/workflows/develop-mint.yaml +++ b/.github/workflows/develop-mint.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-mmx.yaml b/.github/workflows/develop-mmx.yaml index 489bae37f..4dab50f39 100644 --- a/.github/workflows/develop-mmx.yaml +++ b/.github/workflows/develop-mmx.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-moon.yaml b/.github/workflows/develop-moon.yaml index 6cb9bc7fb..e6b9cfbf1 100644 --- a/.github/workflows/develop-moon.yaml +++ b/.github/workflows/develop-moon.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-nchain.yaml b/.github/workflows/develop-nchain.yaml index 5299e4e9a..7e18df4f8 100644 --- a/.github/workflows/develop-nchain.yaml +++ b/.github/workflows/develop-nchain.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-one.yaml b/.github/workflows/develop-one.yaml index 8743c00f0..42d677743 100644 --- a/.github/workflows/develop-one.yaml +++ b/.github/workflows/develop-one.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-petroleum.yaml b/.github/workflows/develop-petroleum.yaml index a59ffd7c5..58aef56af 100644 --- a/.github/workflows/develop-petroleum.yaml +++ b/.github/workflows/develop-petroleum.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-profit.yaml b/.github/workflows/develop-profit.yaml index 20f05eb8b..343d07d3a 100644 --- a/.github/workflows/develop-profit.yaml +++ b/.github/workflows/develop-profit.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-shibgreen.yaml b/.github/workflows/develop-shibgreen.yaml index 0931ac114..613063305 100644 --- a/.github/workflows/develop-shibgreen.yaml +++ b/.github/workflows/develop-shibgreen.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-silicoin.yaml b/.github/workflows/develop-silicoin.yaml index 16e113f2b..1621d999c 100644 --- a/.github/workflows/develop-silicoin.yaml +++ b/.github/workflows/develop-silicoin.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-staicoin.yaml b/.github/workflows/develop-staicoin.yaml index f8a20ea9a..fd6fc2d55 100644 --- a/.github/workflows/develop-staicoin.yaml +++ b/.github/workflows/develop-staicoin.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-stor.yaml b/.github/workflows/develop-stor.yaml index addd6b0cd..b4454f3e3 100644 --- a/.github/workflows/develop-stor.yaml +++ b/.github/workflows/develop-stor.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-tad.yaml b/.github/workflows/develop-tad.yaml index a90a6cfea..29dca77bc 100644 --- a/.github/workflows/develop-tad.yaml +++ b/.github/workflows/develop-tad.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/develop-wheat.yaml b/.github/workflows/develop-wheat.yaml index 5860dd1a1..1b2b64e63 100644 --- a/.github/workflows/develop-wheat.yaml +++ b/.github/workflows/develop-wheat.yaml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-apple.yaml b/.github/workflows/main-apple.yaml index 0b480deb5..ace536bd8 100644 --- a/.github/workflows/main-apple.yaml +++ b/.github/workflows/main-apple.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-base.yaml b/.github/workflows/main-base.yaml index 080f1acd6..856d9fc81 100644 --- a/.github/workflows/main-base.yaml +++ b/.github/workflows/main-base.yaml @@ -30,7 +30,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile-jammy.base context: . @@ -67,7 +67,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile-focal.base context: . diff --git a/.github/workflows/main-bpx.yaml b/.github/workflows/main-bpx.yaml index 38747738a..6a68fbf7f 100644 --- a/.github/workflows/main-bpx.yaml +++ b/.github/workflows/main-bpx.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-btcgreen.yaml b/.github/workflows/main-btcgreen.yaml index d41a9a42f..19bb9a856 100644 --- a/.github/workflows/main-btcgreen.yaml +++ b/.github/workflows/main-btcgreen.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-cactus.yaml b/.github/workflows/main-cactus.yaml index 5f09607f8..c7cae57a4 100644 --- a/.github/workflows/main-cactus.yaml +++ b/.github/workflows/main-cactus.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-chia.yaml b/.github/workflows/main-chia.yaml index 7ed8bf78d..78ab24ae5 100644 --- a/.github/workflows/main-chia.yaml +++ b/.github/workflows/main-chia.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-chinilla.yaml b/.github/workflows/main-chinilla.yaml index c31c042b9..ae5311c7c 100644 --- a/.github/workflows/main-chinilla.yaml +++ b/.github/workflows/main-chinilla.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-chives.yaml b/.github/workflows/main-chives.yaml index 81bd249f4..9ad75274d 100644 --- a/.github/workflows/main-chives.yaml +++ b/.github/workflows/main-chives.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-coffee.yaml b/.github/workflows/main-coffee.yaml index f711fd291..e5ea2992b 100644 --- a/.github/workflows/main-coffee.yaml +++ b/.github/workflows/main-coffee.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-cryptodoge.yaml b/.github/workflows/main-cryptodoge.yaml index 79536f109..c029bd4f1 100644 --- a/.github/workflows/main-cryptodoge.yaml +++ b/.github/workflows/main-cryptodoge.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-ecostake.yaml b/.github/workflows/main-ecostake.yaml index 57fe86143..29699bbc8 100644 --- a/.github/workflows/main-ecostake.yaml +++ b/.github/workflows/main-ecostake.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-flax.yaml b/.github/workflows/main-flax.yaml index 0096d7f4c..2bcdf76c6 100644 --- a/.github/workflows/main-flax.yaml +++ b/.github/workflows/main-flax.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-flora.yaml b/.github/workflows/main-flora.yaml index 75ccb6678..fb7900a97 100644 --- a/.github/workflows/main-flora.yaml +++ b/.github/workflows/main-flora.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-gold.yaml b/.github/workflows/main-gold.yaml index 3a5c2693a..ddf7158e1 100644 --- a/.github/workflows/main-gold.yaml +++ b/.github/workflows/main-gold.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-greenbtc.yaml b/.github/workflows/main-greenbtc.yaml index 4a55cfd31..79fdd0551 100644 --- a/.github/workflows/main-greenbtc.yaml +++ b/.github/workflows/main-greenbtc.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-hddcoin.yaml b/.github/workflows/main-hddcoin.yaml index 045e0ee47..6ae15fdfb 100644 --- a/.github/workflows/main-hddcoin.yaml +++ b/.github/workflows/main-hddcoin.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-littlelambocoin.yaml b/.github/workflows/main-littlelambocoin.yaml index 764e578e6..07b14f9e3 100644 --- a/.github/workflows/main-littlelambocoin.yaml +++ b/.github/workflows/main-littlelambocoin.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-maize.yaml b/.github/workflows/main-maize.yaml index ef31e7427..7327983a4 100644 --- a/.github/workflows/main-maize.yaml +++ b/.github/workflows/main-maize.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-mint.yaml b/.github/workflows/main-mint.yaml index 92211dd8e..739e81426 100644 --- a/.github/workflows/main-mint.yaml +++ b/.github/workflows/main-mint.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-mmx.yaml b/.github/workflows/main-mmx.yaml index 513581349..65b78061e 100644 --- a/.github/workflows/main-mmx.yaml +++ b/.github/workflows/main-mmx.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-moon.yaml b/.github/workflows/main-moon.yaml index 270cffda5..08aa5d064 100644 --- a/.github/workflows/main-moon.yaml +++ b/.github/workflows/main-moon.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-nchain.yaml b/.github/workflows/main-nchain.yaml index 5412e05ff..e35c4ebf1 100644 --- a/.github/workflows/main-nchain.yaml +++ b/.github/workflows/main-nchain.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-one.yaml b/.github/workflows/main-one.yaml index e7c6d0197..1ccc6f57f 100644 --- a/.github/workflows/main-one.yaml +++ b/.github/workflows/main-one.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-petroleum.yaml b/.github/workflows/main-petroleum.yaml index f4d1d274e..ba486ff8f 100644 --- a/.github/workflows/main-petroleum.yaml +++ b/.github/workflows/main-petroleum.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-profit.yaml b/.github/workflows/main-profit.yaml index 72109e69a..262609b54 100644 --- a/.github/workflows/main-profit.yaml +++ b/.github/workflows/main-profit.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-shibgreen.yaml b/.github/workflows/main-shibgreen.yaml index c629c8ee3..915ad023c 100644 --- a/.github/workflows/main-shibgreen.yaml +++ b/.github/workflows/main-shibgreen.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-silicoin.yaml b/.github/workflows/main-silicoin.yaml index ec39655e6..41785231a 100644 --- a/.github/workflows/main-silicoin.yaml +++ b/.github/workflows/main-silicoin.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-staicoin.yaml b/.github/workflows/main-staicoin.yaml index 7df7e485a..6b057e25f 100644 --- a/.github/workflows/main-staicoin.yaml +++ b/.github/workflows/main-staicoin.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-stor.yaml b/.github/workflows/main-stor.yaml index ef142e9d1..036edb293 100644 --- a/.github/workflows/main-stor.yaml +++ b/.github/workflows/main-stor.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-tad.yaml b/.github/workflows/main-tad.yaml index 127bf2251..4852a97ef 100644 --- a/.github/workflows/main-tad.yaml +++ b/.github/workflows/main-tad.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/main-wheat.yaml b/.github/workflows/main-wheat.yaml index 5778c95a1..579ab336f 100644 --- a/.github/workflows/main-wheat.yaml +++ b/.github/workflows/main-wheat.yaml @@ -34,7 +34,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-apple.yaml b/.github/workflows/test-apple.yaml index 5cbd0e044..bb390cc07 100644 --- a/.github/workflows/test-apple.yaml +++ b/.github/workflows/test-apple.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-base.yaml b/.github/workflows/test-base.yaml index b8209c4e5..91bd072de 100644 --- a/.github/workflows/test-base.yaml +++ b/.github/workflows/test-base.yaml @@ -30,7 +30,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile-jammy.base context: . @@ -67,7 +67,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile-focal.base context: . diff --git a/.github/workflows/test-bpx.yaml b/.github/workflows/test-bpx.yaml index decc34435..31a9e0a7b 100644 --- a/.github/workflows/test-bpx.yaml +++ b/.github/workflows/test-bpx.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-btcgreen.yaml b/.github/workflows/test-btcgreen.yaml index 88353d0f7..fb4e916d1 100644 --- a/.github/workflows/test-btcgreen.yaml +++ b/.github/workflows/test-btcgreen.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-cactus.yaml b/.github/workflows/test-cactus.yaml index 0796aa797..0343993fe 100644 --- a/.github/workflows/test-cactus.yaml +++ b/.github/workflows/test-cactus.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-chia.yaml b/.github/workflows/test-chia.yaml index 8faf25c93..9ce4a225a 100644 --- a/.github/workflows/test-chia.yaml +++ b/.github/workflows/test-chia.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-chinilla.yaml b/.github/workflows/test-chinilla.yaml index 3b5a890bf..b9e67242f 100644 --- a/.github/workflows/test-chinilla.yaml +++ b/.github/workflows/test-chinilla.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-chives.yaml b/.github/workflows/test-chives.yaml index cad8f20f6..cfef2eb4b 100644 --- a/.github/workflows/test-chives.yaml +++ b/.github/workflows/test-chives.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-coffee.yaml b/.github/workflows/test-coffee.yaml index 1319a5fdc..42849fcaf 100644 --- a/.github/workflows/test-coffee.yaml +++ b/.github/workflows/test-coffee.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-cryptodoge.yaml b/.github/workflows/test-cryptodoge.yaml index 1dc575b5f..2085ebc99 100644 --- a/.github/workflows/test-cryptodoge.yaml +++ b/.github/workflows/test-cryptodoge.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-ecostake.yaml b/.github/workflows/test-ecostake.yaml index a82512d9d..10cabe6e5 100644 --- a/.github/workflows/test-ecostake.yaml +++ b/.github/workflows/test-ecostake.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-flax.yaml b/.github/workflows/test-flax.yaml index d8aa4a45d..83fb241bd 100644 --- a/.github/workflows/test-flax.yaml +++ b/.github/workflows/test-flax.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-flora.yaml b/.github/workflows/test-flora.yaml index 938289552..035aedf02 100644 --- a/.github/workflows/test-flora.yaml +++ b/.github/workflows/test-flora.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-gold.yaml b/.github/workflows/test-gold.yaml index a6e0f4fc3..b5184a7e1 100644 --- a/.github/workflows/test-gold.yaml +++ b/.github/workflows/test-gold.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-greenbtc.yaml b/.github/workflows/test-greenbtc.yaml index 6e9cbbba0..2a128e3d3 100644 --- a/.github/workflows/test-greenbtc.yaml +++ b/.github/workflows/test-greenbtc.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-hddcoin.yaml b/.github/workflows/test-hddcoin.yaml index 2c42f949c..dc178731e 100644 --- a/.github/workflows/test-hddcoin.yaml +++ b/.github/workflows/test-hddcoin.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-littlelambocoin.yaml b/.github/workflows/test-littlelambocoin.yaml index c3d86a597..4f33fcf0d 100644 --- a/.github/workflows/test-littlelambocoin.yaml +++ b/.github/workflows/test-littlelambocoin.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-maize.yaml b/.github/workflows/test-maize.yaml index b0ab09b66..213376dbd 100644 --- a/.github/workflows/test-maize.yaml +++ b/.github/workflows/test-maize.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-mint.yaml b/.github/workflows/test-mint.yaml index f106b5967..35ea7dfc3 100644 --- a/.github/workflows/test-mint.yaml +++ b/.github/workflows/test-mint.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-mmx.yaml b/.github/workflows/test-mmx.yaml index abf5d0ee7..228e22ecf 100644 --- a/.github/workflows/test-mmx.yaml +++ b/.github/workflows/test-mmx.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-moon.yaml b/.github/workflows/test-moon.yaml index f150d796c..ab766575b 100644 --- a/.github/workflows/test-moon.yaml +++ b/.github/workflows/test-moon.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-nchain.yaml b/.github/workflows/test-nchain.yaml index cd0348761..e3c487549 100644 --- a/.github/workflows/test-nchain.yaml +++ b/.github/workflows/test-nchain.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-one.yaml b/.github/workflows/test-one.yaml index ca148779f..1fee64a6f 100644 --- a/.github/workflows/test-one.yaml +++ b/.github/workflows/test-one.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-petroleum.yaml b/.github/workflows/test-petroleum.yaml index 7f9a954e6..8c729376d 100644 --- a/.github/workflows/test-petroleum.yaml +++ b/.github/workflows/test-petroleum.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-profit.yaml b/.github/workflows/test-profit.yaml index 7dd758ab9..0b7eb039b 100644 --- a/.github/workflows/test-profit.yaml +++ b/.github/workflows/test-profit.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-shibgreen.yaml b/.github/workflows/test-shibgreen.yaml index c725981b3..dec1c4daf 100644 --- a/.github/workflows/test-shibgreen.yaml +++ b/.github/workflows/test-shibgreen.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-silicoin.yaml b/.github/workflows/test-silicoin.yaml index cc9c0ae3d..06817b731 100644 --- a/.github/workflows/test-silicoin.yaml +++ b/.github/workflows/test-silicoin.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-staicoin.yaml b/.github/workflows/test-staicoin.yaml index 7111e5552..294cf1f77 100644 --- a/.github/workflows/test-staicoin.yaml +++ b/.github/workflows/test-staicoin.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-stor.yaml b/.github/workflows/test-stor.yaml index cb88a255d..5e197614a 100644 --- a/.github/workflows/test-stor.yaml +++ b/.github/workflows/test-stor.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-tad.yaml b/.github/workflows/test-tad.yaml index 9a425c9cb..5fb3febb8 100644 --- a/.github/workflows/test-tad.yaml +++ b/.github/workflows/test-tad.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . diff --git a/.github/workflows/test-wheat.yaml b/.github/workflows/test-wheat.yaml index 8afe34c78..f4c280ad3 100644 --- a/.github/workflows/test-wheat.yaml +++ b/.github/workflows/test-wheat.yaml @@ -33,7 +33,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: file: docker/dockerfile context: . From 39a163ebbc98c7b30e8f1cf9c2685a87659ed242 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 31 Jan 2023 09:32:52 -0700 Subject: [PATCH 066/104] Fix for plot filename exceptions. --- api/commands/plotman_cli.py | 4 ++-- api/models/plotman.py | 2 +- api/schedules/stats_effort.py | 2 +- api/schedules/status_plots.py | 2 +- web/__init__.py | 8 +------- web/actions/warnings.py | 2 +- 6 files changed, 7 insertions(+), 13 deletions(-) diff --git a/api/commands/plotman_cli.py b/api/commands/plotman_cli.py index 18ed02a60..8f2ea8045 100644 --- a/api/commands/plotman_cli.py +++ b/api/commands/plotman_cli.py @@ -175,7 +175,7 @@ def clean_tmp_dirs_before_run(): def check_tmp_file_is_day_old(path): try: - match = re.match("plot(?:-mmx)?-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+)", path.name) + match = re.match("plot(?:-mmx)?-k(\d+)(?:-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+)", path.name) if match: plot_date = datetime.datetime.strptime("{0}-{1}-{2} {3}:{4}".format( match.group(2), match.group(3), match.group(4), match.group(5), match.group(6)), @@ -276,7 +276,7 @@ def find_plotting_job_log(plot_id): return None def analyze(plot_file): - groups = re.match("plot(?:-mmx)?-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", plot_file) + groups = re.match("plot(?:-mmx)?-k(\d+)(?:-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", plot_file) if not groups: return "Invalid plot file name provided: {0}".format(plot_file) plot_log_file = find_plotting_job_log(groups[7]) diff --git a/api/models/plotman.py b/api/models/plotman.py index 29278d5e7..1aec5ca6d 100644 --- a/api/models/plotman.py +++ b/api/models/plotman.py @@ -84,7 +84,7 @@ def parse_transfer_log(self, log_file, running_transfers): elif line.startswith("Completed"): self.end_date = line[line.index(' at ')+4:].strip() elif line.startswith("+ rsync"): - m = re.search("plot(?:-mmx)?-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", line) + m = re.search("plot(?:-mmx)?-k(\d+)(?:-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", line) if m: self.plot_id = m.group(7)[:16].strip() self.k = int(m.group(1).strip()) diff --git a/api/schedules/stats_effort.py b/api/schedules/stats_effort.py index 69a538aac..0c2cc64c2 100644 --- a/api/schedules/stats_effort.py +++ b/api/schedules/stats_effort.py @@ -41,7 +41,7 @@ def get_oldest_plot_file_time(): for plot_dir in globals.get_disks("plots"): plots = [f for f in os.listdir(plot_dir) if os.path.isfile(os.path.join(plot_dir,f))] for plot in plots: - match = re.match("plot(?:-mmx)?-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", plot) + match = re.match("plot(?:-mmx)?-k(\d+)(?:-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", plot) if match: created_at_str = "{0}-{1}-{2} {3}:{4}".format( match.group(2),match.group(3),match.group(4),match.group(5),match.group(6)) created_at_secs = time.mktime(datetime.datetime.strptime(created_at_str, "%Y-%m-%d %H:%M").timetuple()) diff --git a/api/schedules/status_plots.py b/api/schedules/status_plots.py index bf0fd3fb5..3d06d99d4 100644 --- a/api/schedules/status_plots.py +++ b/api/schedules/status_plots.py @@ -29,7 +29,7 @@ def get_plot_attrs(plot_id, filename): dir,file = os.path.split(filename) - match = re.match("plot(?:-mmx)?-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", file) + match = re.match("plot(?:-mmx)?-k(\d+)(?:-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", file) if match: short_plot_id = match.group(7)[:16] created_at = "{0}-{1}-{2} {3}:{4}".format( match.group(2),match.group(3),match.group(4),match.group(5),match.group(6)) diff --git a/web/__init__.py b/web/__init__.py index 4f74d2f25..754cefa2f 100644 --- a/web/__init__.py +++ b/web/__init__.py @@ -84,13 +84,7 @@ def timesecondstrimmer(value): app.jinja_env.filters['timesecondstrimmer'] = timesecondstrimmer def plotnameshortener(value): - #app.logger.info("Shorten: {0}".format(value)) - match = re.match("plot(?:-mmx)?-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", value) - if match: - return "plot-k{0}-{1}-{2}-{3}-{4}-{5}-{6}...".format( match.group(1), - match.group(2), match.group(3), match.group(4), match.group(5), match.group(6), - match.group(7)[:16]) - return value + return value[:30] app.jinja_env.filters['plotnameshortener'] = plotnameshortener diff --git a/web/actions/warnings.py b/web/actions/warnings.py index c0a73b743..bf1785988 100644 --- a/web/actions/warnings.py +++ b/web/actions/warnings.py @@ -84,7 +84,7 @@ def check_warnings(args): def get_plot_attrs(filename): dir,file = os.path.split(filename) - match = re.match("plot(?:-mmx)?-k(\d+)(-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", file) + match = re.match("plot(?:-mmx)?-k(\d+)(?:-c\d)?-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\w+).plot", file) if match: short_plot_id = match.group(7)[:16] created_at = "{0}-{1}-{2} {3}:{4}".format( match.group(2),match.group(3),match.group(4),match.group(5),match.group(6)) From e739149cc76af07f24c80c07f168696913154cde Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 31 Jan 2023 13:20:49 -0700 Subject: [PATCH 067/104] Fix for Settings | Plotting page loading dirs when switching blockchain. --- web/templates/settings/plotting.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/templates/settings/plotting.html b/web/templates/settings/plotting.html index 709449942..310ac8956 100644 --- a/web/templates/settings/plotting.html +++ b/web/templates/settings/plotting.html @@ -146,7 +146,7 @@ }); $(document).on("change", "#blockchain", function (e) { load_config($("#worker").val(), $("#blockchain").val()) - load_dir($("#worker").val(), $("#blockchain").val()) + load_dirs($("#worker").val(), $("#blockchain").val()) }); //Call the function when the page loads load_config("{{selected_worker}}", "{{selected_blockchain}}"); From 9fc76fe1d7b29c820146939b475d995a65e33f98 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 31 Jan 2023 14:11:08 -0700 Subject: [PATCH 068/104] Fix for missing disk usage charts. --- web/actions/stats.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/web/actions/stats.py b/web/actions/stats.py index d88077179..7c81c6a8d 100644 --- a/web/actions/stats.py +++ b/web/actions/stats.py @@ -41,6 +41,9 @@ # Don't overload the bar chart with tons of plots paths, randomly sample only this amount MAX_ALLOWED_PATHS_ON_BAR_CHART = 20 +# Ignore disk stats that are older than this many minutes ago +STALE_MINUTES_DISK_STATS = 30 + def load_daily_diff(farm_summary): for blockchain in farm_summary.farms: summary = {} @@ -236,8 +239,11 @@ def load_current_disk_usage(disk_type, hostname=None): free = [] used_result = free_result = None if disk_type == 'plots': - created_at_max = db.session.query(StatPlotsDiskUsed).order_by(StatPlotsDiskUsed.created_at.desc()).first() - if created_at_max: + created_at_max = db.session.query(StatPlotsDiskUsed).filter(or_(StatPlotsDiskUsed.hostname == host.hostname, + StatPlotsDiskUsed.hostname == host.displayname)).order_by(StatPlotsDiskUsed.created_at.desc()).first() + if datetime.datetime.strptime(created_at_max.created_at, '%Y%m%d%H%M%S') <= (datetime.datetime.now() - datetime.timedelta(minutes=STALE_MINUTES_DISK_STATS)): + app.logger.info("Last disk stats from {0} at {1}, ignoring as stale and out-of-date. Check on worker status!".format(host.displayname, created_at_max.created_at)) + elif created_at_max: used_result = db.session.query(StatPlotsDiskUsed).filter( or_(StatPlotsDiskUsed.hostname == host.hostname, StatPlotsDiskUsed.hostname == host.displayname), StatPlotsDiskUsed.created_at == created_at_max.created_at).order_by(StatPlotsDiskUsed.path).all() From 12955f51968349e1b9fcbdba0a78db58d840c561 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 31 Jan 2023 14:31:23 -0700 Subject: [PATCH 069/104] Branches for dev & test. --- .github/workflows/develop-chia.yaml | 2 +- .github/workflows/develop-mmx.yaml | 2 +- .github/workflows/main-mmx.yaml | 2 +- .github/workflows/test-chia.yaml | 1 + .github/workflows/test-chives.yaml | 1 + .github/workflows/test-mmx.yaml | 3 ++- docker/dockerfile | 2 +- docker/entrypoint.sh | 2 +- scripts/forks/mmx_install.sh | 2 +- scripts/madmax_setup.sh | 24 +++++++++++++----------- 10 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/develop-chia.yaml b/.github/workflows/develop-chia.yaml index 7a0bfcb21..6d8165c8e 100644 --- a/.github/workflows/develop-chia.yaml +++ b/.github/workflows/develop-chia.yaml @@ -46,7 +46,7 @@ jobs: "CHIADOG_BRANCH=dev" "CHIA_BRANCH=release/1.7.0" "BLADEBIT_BRANCH=master" - "PLOTMAN_BRANCH=compress" + "PLOTMAN_BRANCH=development" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop diff --git a/.github/workflows/develop-mmx.yaml b/.github/workflows/develop-mmx.yaml index 6900ad49c..0761bdfbd 100644 --- a/.github/workflows/develop-mmx.yaml +++ b/.github/workflows/develop-mmx.yaml @@ -45,7 +45,7 @@ jobs: "MACHINARIS_STREAM=develop" "MMX_BRANCH=master" "CHIA_BRANCH=latest" - "PLOTMAN_BRANCH=compress" + "PLOTMAN_BRANCH=development" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:develop ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:develop diff --git a/.github/workflows/main-mmx.yaml b/.github/workflows/main-mmx.yaml index 11af09a11..21b713045 100644 --- a/.github/workflows/main-mmx.yaml +++ b/.github/workflows/main-mmx.yaml @@ -44,7 +44,7 @@ jobs: build-args: | "UBUNTU_VER=jammy" "MACHINARIS_STREAM=latest" - "MMX_BRANCH=v0.9.3" + "MMX_BRANCH=v0.9.8" "CHIA_BRANCH=latest" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:latest diff --git a/.github/workflows/test-chia.yaml b/.github/workflows/test-chia.yaml index fa66f01a6..9bd7e345a 100644 --- a/.github/workflows/test-chia.yaml +++ b/.github/workflows/test-chia.yaml @@ -45,6 +45,7 @@ jobs: "MACHINARIS_STREAM=test" "CHIADOG_BRANCH=dev" "CHIA_BRANCH=release/1.7.0" + "PLOTMAN_BRANCH=development" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:test ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris:test diff --git a/.github/workflows/test-chives.yaml b/.github/workflows/test-chives.yaml index 0aeee3e23..c6cbb64b1 100644 --- a/.github/workflows/test-chives.yaml +++ b/.github/workflows/test-chives.yaml @@ -89,6 +89,7 @@ jobs: "CHIADOG_BRANCH=dev" "CHIVES_REPO=https://github.com/foxypool/chives-blockchain.git" "CHIVES_BRANCH=main" + "PLOTMAN_BRANCH=development" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chivesfoxy:test ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chivesfoxy:test diff --git a/.github/workflows/test-mmx.yaml b/.github/workflows/test-mmx.yaml index add9a2f1b..60ac9e2f2 100644 --- a/.github/workflows/test-mmx.yaml +++ b/.github/workflows/test-mmx.yaml @@ -43,8 +43,9 @@ jobs: build-args: | "UBUNTU_VER=jammy" "MACHINARIS_STREAM=test" - "MMX_BRANCH=v0.9.3" + "MMX_BRANCH=v0.9.8" "CHIA_BRANCH=latest" + "PLOTMAN_BRANCH=development" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:test ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:test diff --git a/docker/dockerfile b/docker/dockerfile index 3e1f049e2..39c797289 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -30,7 +30,7 @@ ARG HDDCOIN_BRANCH ARG LITTLELAMBOCOIN_BRANCH ARG MAIZE_BRANCH ARG MINT_BRANCH -ARG MMX_BRANCH +ARG MMX_BRANCH=master ARG MOON_BRANCH ARG NCHAIN_BRANCH ARG ONE_BRANCH diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 23abd60bf..3bab73dd2 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -106,7 +106,7 @@ if /usr/bin/bash /machinaris/scripts/forks/${blockchains}_launch.sh; then /usr/bin/bash /machinaris/scripts/bladebit_setup.sh ${BLADEBIT_BRANCH} > /tmp/bladebit_setup.log 2>&1 # Conditionally madmax on plotters and fullnodes, sleep a bit first - /usr/bin/bash /machinaris/scripts/madmax_setup.sh > /tmp/madmax_setup.log 2>&1 + /usr/bin/bash /machinaris/scripts/madmax_setup.sh ${MMX_BRANCH} > /tmp/madmax_setup.log 2>&1 # Conditionally install plotman on plotters and fullnodes, after the plotters setup /usr/bin/bash /machinaris/scripts/plotman_autoplot.sh > /tmp/plotman_autoplot.log 2>&1 diff --git a/scripts/forks/mmx_install.sh b/scripts/forks/mmx_install.sh index 10b99677b..0d88b2134 100644 --- a/scripts/forks/mmx_install.sh +++ b/scripts/forks/mmx_install.sh @@ -19,7 +19,7 @@ else apt-get install -y ./amdgpu-install_22.20.50205-1_all.deb # Clone and install MMX from the author's own binaries, not linked to his code branches unfortunately pushd /tmp - git clone --depth 1 --filter=blob:none --sparse https://github.com/madMAx43v3r/mmx-binaries.git + git clone --branch ${MMX_BRANCH} --single-branch --depth 1 --filter=blob:none --sparse https://github.com/madMAx43v3r/mmx-binaries.git pushd mmx-binaries/ git sparse-checkout set mmx-node/linux/x86_64/ pushd mmx-node/linux diff --git a/scripts/madmax_setup.sh b/scripts/madmax_setup.sh index 35aec9d20..90bb1c94c 100644 --- a/scripts/madmax_setup.sh +++ b/scripts/madmax_setup.sh @@ -2,14 +2,16 @@ # # Installs chia-plotter (pipelined multi-threaded) from binaries # -# https://github.com/madMAx43v3r/chia-plotter -# https://github.com/madMAx43v3r/mmx-binaries +# # -# As of 2022-08-20 +# As of 2022-08-20, https://github.com/madMAx43v3r/chia-plotter HASH=d1a9e88b44ba37f61bfabcb68e80e83f8b939648 MADMAX_BRANCH=master +# MMX Plotter binaries, https://github.com/madMAx43v3r/mmx-binaries +MMX_BRANCH=$1 + # Currently Chia and Chives get the "old" Madmax plotter (no compresssion), built from source if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives') ]]; then if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then @@ -43,15 +45,15 @@ if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'mmx arch_name="$(uname -m)" if [[ "${arch_name}" = "x86_64" ]]; then pushd /usr/bin - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cpu-plotter/linux/x86_64/chia_plot - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cpu-plotter/linux/x86_64/chia_plot_k34 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cpu-plotter/linux/x86_64/chia_plot + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cpu-plotter/linux/x86_64/chia_plot_k34 chmod 755 chia_plot* - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cuda-plotter/linux/x86_64/cuda_plot_k26 - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cuda-plotter/linux/x86_64/cuda_plot_k29 - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cuda-plotter/linux/x86_64/cuda_plot_k30 - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cuda-plotter/linux/x86_64/cuda_plot_k31 - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cuda-plotter/linux/x86_64/cuda_plot_k32 - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/master/mmx-cuda-plotter/linux/x86_64/cuda_plot_k33 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k26 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k29 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k30 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k31 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k32 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k33 chmod 755 cuda_plot* popd else From 87992323a2f4816b73a229131724198264001db0 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 31 Jan 2023 14:37:53 -0700 Subject: [PATCH 070/104] MADMAX_BRANCH --- docker/dockerfile | 4 +++- docker/entrypoint.sh | 2 +- scripts/madmax_setup.sh | 22 +++++++++++----------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/docker/dockerfile b/docker/dockerfile index 39c797289..2613cfc0a 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -9,6 +9,7 @@ ARG CHIADOG_BRANCH=main ARG FDCLI_BRANCH=master ARG FORKTOOLS_BRANCH=main ARG BLADEBIT_BRANCH=master +ARG MADMAX_BRANCH=master ARG APPLE_BRANCH ARG BALLCOIN_BRANCH @@ -30,7 +31,7 @@ ARG HDDCOIN_BRANCH ARG LITTLELAMBOCOIN_BRANCH ARG MAIZE_BRANCH ARG MINT_BRANCH -ARG MMX_BRANCH=master +ARG MMX_BRANCH ARG MOON_BRANCH ARG NCHAIN_BRANCH ARG ONE_BRANCH @@ -139,6 +140,7 @@ ENV CHIADOG_BRANCH=${CHIADOG_BRANCH} ENV FDCLI_BRANCH=${FDCLI_BRANCH} ENV FORKTOOLS_BRANCH=${FORKTOOLS_BRANCH} ENV BLADEBIT_BRANCH=${BLADEBIT_BRANCH} +ENV MADMAX_BRANCH=${MADMAX_BRANCH} ENV MMX_HOME=/root/.mmx/ VOLUME [ "/id_rsa" ] diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 3bab73dd2..43ff4ef83 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -106,7 +106,7 @@ if /usr/bin/bash /machinaris/scripts/forks/${blockchains}_launch.sh; then /usr/bin/bash /machinaris/scripts/bladebit_setup.sh ${BLADEBIT_BRANCH} > /tmp/bladebit_setup.log 2>&1 # Conditionally madmax on plotters and fullnodes, sleep a bit first - /usr/bin/bash /machinaris/scripts/madmax_setup.sh ${MMX_BRANCH} > /tmp/madmax_setup.log 2>&1 + /usr/bin/bash /machinaris/scripts/madmax_setup.sh ${MADMAX_BRANCH} > /tmp/madmax_setup.log 2>&1 # Conditionally install plotman on plotters and fullnodes, after the plotters setup /usr/bin/bash /machinaris/scripts/plotman_autoplot.sh > /tmp/plotman_autoplot.log 2>&1 diff --git a/scripts/madmax_setup.sh b/scripts/madmax_setup.sh index 90bb1c94c..2351e7d56 100644 --- a/scripts/madmax_setup.sh +++ b/scripts/madmax_setup.sh @@ -7,10 +7,10 @@ # As of 2022-08-20, https://github.com/madMAx43v3r/chia-plotter HASH=d1a9e88b44ba37f61bfabcb68e80e83f8b939648 -MADMAX_BRANCH=master +ORIG_MADMAX_BRANCH=master # MMX Plotter binaries, https://github.com/madMAx43v3r/mmx-binaries -MMX_BRANCH=$1 +MADMAX_BRANCH=$1 # Currently Chia and Chives get the "old" Madmax plotter (no compresssion), built from source if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives') ]]; then @@ -19,7 +19,7 @@ if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chi if [[ "${arch_name}" = "x86_64" ]] || [[ "${arch_name}" = "arm64" ]]; then apt update && apt install -y libsodium-dev cmake g++ git build-essential cd / - git clone --branch ${MADMAX_BRANCH} https://github.com/madMAx43v3r/chia-plotter.git + git clone --branch ${ORIG_MADMAX_BRANCH} https://github.com/madMAx43v3r/chia-plotter.git cd chia-plotter && echo "Building madmax on ${arch_name}..." if [[ -z "${madmax_relic_main}" ]]; then # Hack on 2021-11-29 due to failed builds on some systems... sed -i 's/set(ENV{RELIC_MAIN} "1")/#set(ENV{RELIC_MAIN} "1")/g' CMakeLists.txt @@ -45,15 +45,15 @@ if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'mmx arch_name="$(uname -m)" if [[ "${arch_name}" = "x86_64" ]]; then pushd /usr/bin - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cpu-plotter/linux/x86_64/chia_plot - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cpu-plotter/linux/x86_64/chia_plot_k34 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MADMAX_BRANCH}/mmx-cpu-plotter/linux/x86_64/chia_plot + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MADMAX_BRANCH}/mmx-cpu-plotter/linux/x86_64/chia_plot_k34 chmod 755 chia_plot* - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k26 - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k29 - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k30 - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k31 - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k32 - curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MMX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k33 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MADMAX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k26 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MADMAX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k29 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MADMAX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k30 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MADMAX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k31 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MADMAX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k32 + curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MADMAX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k33 chmod 755 cuda_plot* popd else From 158797a710e5020bd6f736d52fcaa56e79f8d98e Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 31 Jan 2023 20:33:40 -0700 Subject: [PATCH 071/104] More MMX handling. --- api/schedules/nft_recover.py | 2 ++ api/schedules/plots_check.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/schedules/nft_recover.py b/api/schedules/nft_recover.py index 36b5fdaff..3ccfebf01 100644 --- a/api/schedules/nft_recover.py +++ b/api/schedules/nft_recover.py @@ -19,5 +19,7 @@ def execute(): with app.app_context(): from api import db gc = globals.load() + if globals.enabled_blockchains()[0] == 'mmx': + return # No such thing for MMX app.logger.info("****************** Starting hourly NFT 7/8 qualified reward coins check... *********************") rewards.update_qualified_coins_cache() diff --git a/api/schedules/plots_check.py b/api/schedules/plots_check.py index 8a3a27003..3a137bd8d 100644 --- a/api/schedules/plots_check.py +++ b/api/schedules/plots_check.py @@ -190,13 +190,13 @@ def request_check(plot, workers): def refresh_status_file_from_logs(): status = open_status_json() for key in list(status.keys()): - if (status[key]['check'] is None) and (status[key]['analyze'] is None): + if (not 'check' in status[key] or status[key]['check'] is None) and (not 'analyze' in status[key] or status[key]['analyze'] is None): app.logger.info("Deleting {0} both".format(key)) del status[key] - elif status[key]['check'] is None: + elif 'check' in status[key] and status[key]['check'] is None: app.logger.info("Deleting {0} check".format(key)) del status[key]['check'] - elif status[key]['analyze'] is None: + elif 'analyze' in status[key] and status[key]['analyze'] is None: app.logger.info("Deleting {0} analyze".format(key)) del status[key]['analyze'] write_status_json(status) From c0c6c275af82c00cf83c1a1a850bcc4172fdb812 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 31 Jan 2023 20:50:25 -0700 Subject: [PATCH 072/104] Latest disk stats fix. --- web/actions/stats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/actions/stats.py b/web/actions/stats.py index 7c81c6a8d..51bd9e1b5 100644 --- a/web/actions/stats.py +++ b/web/actions/stats.py @@ -241,7 +241,7 @@ def load_current_disk_usage(disk_type, hostname=None): if disk_type == 'plots': created_at_max = db.session.query(StatPlotsDiskUsed).filter(or_(StatPlotsDiskUsed.hostname == host.hostname, StatPlotsDiskUsed.hostname == host.displayname)).order_by(StatPlotsDiskUsed.created_at.desc()).first() - if datetime.datetime.strptime(created_at_max.created_at, '%Y%m%d%H%M%S') <= (datetime.datetime.now() - datetime.timedelta(minutes=STALE_MINUTES_DISK_STATS)): + if datetime.datetime.strptime(created_at_max.created_at, '%Y%m%d%H%M') <= (datetime.datetime.now() - datetime.timedelta(minutes=STALE_MINUTES_DISK_STATS)): app.logger.info("Last disk stats from {0} at {1}, ignoring as stale and out-of-date. Check on worker status!".format(host.displayname, created_at_max.created_at)) elif created_at_max: used_result = db.session.query(StatPlotsDiskUsed).filter( From 04fb93d1b923e8cf05b458b85d73ed80f880f85b Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 6 Feb 2023 09:32:52 -0700 Subject: [PATCH 073/104] Try Madmax plotters @ v0.9.9. --- .github/workflows/develop-chia.yaml | 1 + .github/workflows/develop-chives.yaml | 1 + .github/workflows/develop-mmx.yaml | 1 + .github/workflows/main-chia.yaml | 1 + .github/workflows/main-chives.yaml | 1 + .github/workflows/main-mmx.yaml | 3 +- .github/workflows/test-chia.yaml | 1 + .github/workflows/test-chives.yaml | 1 + .github/workflows/test-mmx.yaml | 3 +- scripts/madmax_setup.sh | 56 +++++++++++++-------------- scripts/pull_3rd_party_libs.sh | 2 +- 11 files changed, 39 insertions(+), 32 deletions(-) diff --git a/.github/workflows/develop-chia.yaml b/.github/workflows/develop-chia.yaml index 931f45079..09bad885a 100644 --- a/.github/workflows/develop-chia.yaml +++ b/.github/workflows/develop-chia.yaml @@ -46,6 +46,7 @@ jobs: "CHIADOG_BRANCH=dev" "CHIA_BRANCH=release/1.7.0" "BLADEBIT_BRANCH=master" + "MADMAX_BRANCH=master" "PLOTMAN_BRANCH=development" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop diff --git a/.github/workflows/develop-chives.yaml b/.github/workflows/develop-chives.yaml index db5faacf0..2d1cd3394 100644 --- a/.github/workflows/develop-chives.yaml +++ b/.github/workflows/develop-chives.yaml @@ -46,6 +46,7 @@ jobs: "CHIADOG_BRANCH=dev" "CHIVES_REPO=https://github.com/HiveProject2021/chives-blockchain.git" "CHIVES_BRANCH=1.5.3" + "MADMAX_BRANCH=master" "PLOTMAN_BRANCH=development" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:develop diff --git a/.github/workflows/develop-mmx.yaml b/.github/workflows/develop-mmx.yaml index 52b921065..c4f20240a 100644 --- a/.github/workflows/develop-mmx.yaml +++ b/.github/workflows/develop-mmx.yaml @@ -45,6 +45,7 @@ jobs: "MACHINARIS_STREAM=develop" "MMX_BRANCH=master" "CHIA_BRANCH=latest" + "MADMAX_BRANCH=master" "PLOTMAN_BRANCH=development" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:develop diff --git a/.github/workflows/main-chia.yaml b/.github/workflows/main-chia.yaml index 05ce1130a..fd9e9ae7b 100644 --- a/.github/workflows/main-chia.yaml +++ b/.github/workflows/main-chia.yaml @@ -45,6 +45,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=latest" "CHIA_BRANCH=release/1.7.0" + "MADMAX_BRANCH=v0.9.9" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:latest ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:v${{ github.event.inputs.version }} diff --git a/.github/workflows/main-chives.yaml b/.github/workflows/main-chives.yaml index 93e6f4b33..cd8530aaf 100644 --- a/.github/workflows/main-chives.yaml +++ b/.github/workflows/main-chives.yaml @@ -45,6 +45,7 @@ jobs: "MACHINARIS_STREAM=latest" "CHIVES_REPO=https://github.com/HiveProject2021/chives-blockchain.git" "CHIVES_BRANCH=1.5.3" + "MADMAX_BRANCH=v0.9.9" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:latest ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:v${{ github.event.inputs.version }} diff --git a/.github/workflows/main-mmx.yaml b/.github/workflows/main-mmx.yaml index 846403b81..ba7bf0cc3 100644 --- a/.github/workflows/main-mmx.yaml +++ b/.github/workflows/main-mmx.yaml @@ -44,8 +44,9 @@ jobs: build-args: | "UBUNTU_VER=jammy" "MACHINARIS_STREAM=latest" - "MMX_BRANCH=v0.9.8" "CHIA_BRANCH=latest" + "MMX_BRANCH=v0.9.9" + "MADMAX_BRANCH=v0.9.9" 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 50228880f..d14dc7312 100644 --- a/.github/workflows/test-chia.yaml +++ b/.github/workflows/test-chia.yaml @@ -46,6 +46,7 @@ jobs: "CHIADOG_BRANCH=dev" "CHIA_BRANCH=release/1.7.0" "PLOTMAN_BRANCH=development" + "MADMAX_BRANCH=v0.9.9" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:test ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris:test diff --git a/.github/workflows/test-chives.yaml b/.github/workflows/test-chives.yaml index 96dbf169c..954b6e427 100644 --- a/.github/workflows/test-chives.yaml +++ b/.github/workflows/test-chives.yaml @@ -90,6 +90,7 @@ jobs: "CHIVES_REPO=https://github.com/foxypool/chives-blockchain.git" "CHIVES_BRANCH=main" "PLOTMAN_BRANCH=development" + "MADMAX_BRANCH=v0.9.9" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chivesfoxy:test ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chivesfoxy:test diff --git a/.github/workflows/test-mmx.yaml b/.github/workflows/test-mmx.yaml index cf59fab34..a496d384f 100644 --- a/.github/workflows/test-mmx.yaml +++ b/.github/workflows/test-mmx.yaml @@ -43,9 +43,10 @@ jobs: build-args: | "UBUNTU_VER=jammy" "MACHINARIS_STREAM=test" - "MMX_BRANCH=v0.9.8" "CHIA_BRANCH=latest" "PLOTMAN_BRANCH=development" + "MMX_BRANCH=v0.9.9" + "MADMAX_BRANCH=v0.9.9" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:test ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:test diff --git a/scripts/madmax_setup.sh b/scripts/madmax_setup.sh index 2351e7d56..e1f8156b8 100644 --- a/scripts/madmax_setup.sh +++ b/scripts/madmax_setup.sh @@ -2,8 +2,6 @@ # # Installs chia-plotter (pipelined multi-threaded) from binaries # -# -# # As of 2022-08-20, https://github.com/madMAx43v3r/chia-plotter HASH=d1a9e88b44ba37f61bfabcb68e80e83f8b939648 @@ -13,34 +11,34 @@ ORIG_MADMAX_BRANCH=master MADMAX_BRANCH=$1 # Currently Chia and Chives get the "old" Madmax plotter (no compresssion), built from source -if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives') ]]; then - if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then - arch_name="$(uname -m)" - if [[ "${arch_name}" = "x86_64" ]] || [[ "${arch_name}" = "arm64" ]]; then - apt update && apt install -y libsodium-dev cmake g++ git build-essential - cd / - git clone --branch ${ORIG_MADMAX_BRANCH} https://github.com/madMAx43v3r/chia-plotter.git - cd chia-plotter && echo "Building madmax on ${arch_name}..." - if [[ -z "${madmax_relic_main}" ]]; then # Hack on 2021-11-29 due to failed builds on some systems... - sed -i 's/set(ENV{RELIC_MAIN} "1")/#set(ENV{RELIC_MAIN} "1")/g' CMakeLists.txt - fi - git submodule update --init - git checkout $HASH - ./make_devel.sh - mkdir -p /usr/lib/chia-plotter - cp -r ./build/* /usr/lib/chia-plotter - ln -s /usr/lib/chia-plotter/chia_plot /usr/bin/chia_plot - ln -s /usr/lib/chia-plotter/chia_plot_k34 /usr/bin/chia_plot_k34 - cd / - rm -rf chia-plotter - else - echo "Building madmax skipped -> unsupported architecture: ${arch_name}" - fi - fi -fi +#if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives') ]]; then +# if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then +# arch_name="$(uname -m)" +# if [[ "${arch_name}" = "x86_64" ]] || [[ "${arch_name}" = "arm64" ]]; then +# apt update && apt install -y libsodium-dev cmake g++ git build-essential +# cd / +# git clone --branch ${ORIG_MADMAX_BRANCH} https://github.com/madMAx43v3r/chia-plotter.git +# cd chia-plotter && echo "Building madmax on ${arch_name}..." +# if [[ -z "${madmax_relic_main}" ]]; then # Hack on 2021-11-29 due to failed builds on some systems... +# sed -i 's/set(ENV{RELIC_MAIN} "1")/#set(ENV{RELIC_MAIN} "1")/g' CMakeLists.txt +# fi +# git submodule update --init +# git checkout $HASH +# ./make_devel.sh +# mkdir -p /usr/lib/chia-plotter +# cp -r ./build/* /usr/lib/chia-plotter +# ln -s /usr/lib/chia-plotter/chia_plot /usr/bin/chia_plot +# ln -s /usr/lib/chia-plotter/chia_plot_k34 /usr/bin/chia_plot_k34 +# cd / +# rm -rf chia-plotter +# else +# echo "Building madmax skipped -> unsupported architecture: ${arch_name}" +# fi +# fi +#fi -# MMX blockchain container gets the "new" Madmax plotters, with compression, only available as binaries -if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'mmx') ]]; then +# MMX, Chia, and Chives blockchain container gets the "new" Madmax plotters, with compression, only available as binaries +if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'mmx' || ${blockchains} == 'chia' || ${blockchains} == 'chives') ]]; then if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then arch_name="$(uname -m)" if [[ "${arch_name}" = "x86_64" ]]; then diff --git a/scripts/pull_3rd_party_libs.sh b/scripts/pull_3rd_party_libs.sh index c49c120a8..d9cc873cc 100755 --- a/scripts/pull_3rd_party_libs.sh +++ b/scripts/pull_3rd_party_libs.sh @@ -17,7 +17,7 @@ https://cdn.datatables.net/1.13.1/css/dataTables.bootstrap5.css https://cdn.datatables.net/1.13.1/js/dataTables.bootstrap5.js https://cdn.datatables.net/1.13.1/js/jquery.dataTables.js https://cdn.jsdelivr.net/npm/chart.js@4.2.0/dist/chart.umd.min.js -https://cdn.jsdelivr.net/npm/chartjs-adapter-luxon@1.3.0/dist/chartjs-adapter-luxon.umd.min.js +https://cdn.jsdelivr.net/npm/chartjs-adapter-luxon@1.3.1/dist/chartjs-adapter-luxon.umd.min.js https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2.2.0/dist/chartjs-plugin-datalabels.min.js https://cdn.jsdelivr.net/npm/jquery@3.6.3/dist/jquery.min.js https://moment.github.io/luxon/global/luxon.min.js" From 84474eaba6c73fd4c3e7fc4349744236fdb2783a Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 6 Feb 2023 10:30:12 -0700 Subject: [PATCH 074/104] Still plotters only work for MMX blockchain. --- scripts/madmax_setup.sh | 57 ++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/scripts/madmax_setup.sh b/scripts/madmax_setup.sh index e1f8156b8..fc79b6dd1 100644 --- a/scripts/madmax_setup.sh +++ b/scripts/madmax_setup.sh @@ -11,34 +11,34 @@ ORIG_MADMAX_BRANCH=master MADMAX_BRANCH=$1 # Currently Chia and Chives get the "old" Madmax plotter (no compresssion), built from source -#if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives') ]]; then -# if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then -# arch_name="$(uname -m)" -# if [[ "${arch_name}" = "x86_64" ]] || [[ "${arch_name}" = "arm64" ]]; then -# apt update && apt install -y libsodium-dev cmake g++ git build-essential -# cd / -# git clone --branch ${ORIG_MADMAX_BRANCH} https://github.com/madMAx43v3r/chia-plotter.git -# cd chia-plotter && echo "Building madmax on ${arch_name}..." -# if [[ -z "${madmax_relic_main}" ]]; then # Hack on 2021-11-29 due to failed builds on some systems... -# sed -i 's/set(ENV{RELIC_MAIN} "1")/#set(ENV{RELIC_MAIN} "1")/g' CMakeLists.txt -# fi -# git submodule update --init -# git checkout $HASH -# ./make_devel.sh -# mkdir -p /usr/lib/chia-plotter -# cp -r ./build/* /usr/lib/chia-plotter -# ln -s /usr/lib/chia-plotter/chia_plot /usr/bin/chia_plot -# ln -s /usr/lib/chia-plotter/chia_plot_k34 /usr/bin/chia_plot_k34 -# cd / -# rm -rf chia-plotter -# else -# echo "Building madmax skipped -> unsupported architecture: ${arch_name}" -# fi -# fi -#fi +if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives') ]]; then + if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then + arch_name="$(uname -m)" + if [[ "${arch_name}" = "x86_64" ]] || [[ "${arch_name}" = "arm64" ]]; then + apt update && apt install -y libsodium-dev cmake g++ git build-essential + cd / + git clone --branch ${ORIG_MADMAX_BRANCH} https://github.com/madMAx43v3r/chia-plotter.git + cd chia-plotter && echo "Building madmax on ${arch_name}..." + if [[ -z "${madmax_relic_main}" ]]; then # Hack on 2021-11-29 due to failed builds on some systems... + sed -i 's/set(ENV{RELIC_MAIN} "1")/#set(ENV{RELIC_MAIN} "1")/g' CMakeLists.txt + fi + git submodule update --init + git checkout $HASH + ./make_devel.sh + mkdir -p /usr/lib/chia-plotter + cp -r ./build/* /usr/lib/chia-plotter + ln -s /usr/lib/chia-plotter/chia_plot /usr/bin/chia_plot + ln -s /usr/lib/chia-plotter/chia_plot_k34 /usr/bin/chia_plot_k34 + cd / + rm -rf chia-plotter + else + echo "Building madmax skipped -> unsupported architecture: ${arch_name}" + fi + fi +fi -# MMX, Chia, and Chives blockchain container gets the "new" Madmax plotters, with compression, only available as binaries -if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'mmx' || ${blockchains} == 'chia' || ${blockchains} == 'chives') ]]; then +# MMX blockchain container gets the "new" Madmax plotters, with compression, only available as binaries +if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'mmx') ]]; then if [ ! -f /usr/bin/chia_plot ] && [[ "${madmax_skip_build}" != 'true' ]]; then arch_name="$(uname -m)" if [[ "${arch_name}" = "x86_64" ]]; then @@ -54,6 +54,9 @@ if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'mmx curl -sLJO https://github.com/madMAx43v3r/mmx-binaries/raw/${MADMAX_BRANCH}/mmx-cuda-plotter/linux/x86_64/cuda_plot_k33 chmod 755 cuda_plot* popd + echo "Completed download of Madmax binaries for plotting:" + echo "chia_plot @ "`chia_plot --version` + echo "cuda_plot @ "`cuda_plot_k32 --version` else echo "Downloading MMX chia_plot and cuda_plot skipped -> unsupported architecture: ${arch_name}" fi From 56c1e616914a4c84dca2bebc3a64b902910ce60c Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 7 Feb 2023 21:16:09 -0700 Subject: [PATCH 075/104] Plotting scheduling - UI only so far. --- web/actions/plotman.py | 15 +++- web/routes.py | 6 +- web/templates/farming/plots.html | 8 --- web/templates/plotting/jobs.html | 113 ++++++++++++++++++++++++++++++- 4 files changed, 129 insertions(+), 13 deletions(-) diff --git a/web/actions/plotman.py b/web/actions/plotman.py index 7975e0d27..6ecce0175 100644 --- a/web/actions/plotman.py +++ b/web/actions/plotman.py @@ -26,6 +26,7 @@ PLOTMAN_SCRIPT = '/chia-blockchain/venv/bin/plotman' REPLOTTING_CONFIG = '/root/.chia/machinaris/config/replotting.json' +PLOTTING_SCHEDULES = '/root/.chia/machinaris/config/plotting_schedules.json' # Don't query plotman unless at least this long since last time. RELOAD_MINIMUM_SECS = 30 @@ -309,4 +310,16 @@ def save_replotting_settings(form): app.logger.error(msg) flash(msg, 'danger') return - return settings \ No newline at end of file + return settings + +def save_schedules(schedule): + flash(_('Plotting schedule has been saved and applied. Current plotting manager status of running or stopped is not immediately affected.')) + +def load_schedules(): + schedules = [] + if os.path.exists(PLOTTING_SCHEDULES): + with open(PLOTTING_SCHEDULES, 'r') as fp: + settings = json.loads(fp.read()) + if len(schedules) == 0: + schedules.append({'start': '', 'stop': ''}) + return schedules diff --git a/web/routes.py b/web/routes.py index 4b4a0127e..9f802807e 100644 --- a/web/routes.py +++ b/web/routes.py @@ -170,14 +170,18 @@ def plotting_jobs(): action = request.form.get('action') plot_ids = request.form.getlist('plot_id') plotman.action_plots(action, plot_ids) + elif request.form.get('action') == 'schedule': + schedules = request.form.getlist('schedules') + plotman.save_schedules(schedules) else: app.logger.info(_("Unknown plotting form") + ": {0}".format(request.form)) return redirect(url_for('plotting_jobs')) # Force a redirect to allow time to update status plotters = plotman.load_plotters() plotting = plotman.load_plotting_summary() + schedules = plotman.load_schedules() job_stats = stats.load_plotting_stats() return render_template('plotting/jobs.html', reload_seconds=120, plotting=plotting, - plotters=plotters, job_stats=job_stats, global_config=gc, lang=get_lang(request)) + plotters=plotters, job_stats=job_stats, schedules=schedules, global_config=gc, lang=get_lang(request)) @app.route('/plotting/transfers', methods=['GET', 'POST']) def plotting_transfers(): diff --git a/web/templates/farming/plots.html b/web/templates/farming/plots.html index dac9e5631..dbbdebfa7 100644 --- a/web/templates/farming/plots.html +++ b/web/templates/farming/plots.html @@ -31,14 +31,6 @@
-
-
- - - -
-
-
diff --git a/web/templates/plotting/jobs.html b/web/templates/plotting/jobs.html index 99277a2e5..29a8c3b37 100644 --- a/web/templates/plotting/jobs.html +++ b/web/templates/plotting/jobs.html @@ -85,13 +85,110 @@
+ + + + +
- + +   +
-
+ +