From c960812f0ea5ef641d1c5cd2f806433697590054 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 12 Jan 2024 08:51:15 -0700 Subject: [PATCH 01/24] Gigahorse version bump to 2.1.4.giga26 --- .github/workflows/develop-chia.yaml | 2 +- .github/workflows/main-chia.yaml | 2 +- .github/workflows/main-mmx.yaml | 2 +- .github/workflows/test-chia.yaml | 2 +- .github/workflows/test-mmx.yaml | 2 +- CHANGELOG.md | 5 +++++ VERSION | 2 +- 7 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/develop-chia.yaml b/.github/workflows/develop-chia.yaml index 3ea2be6f..ce043fdf 100644 --- a/.github/workflows/develop-chia.yaml +++ b/.github/workflows/develop-chia.yaml @@ -89,7 +89,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "GIGAHORSE_BRANCH=v2.1.3.giga26" + "GIGAHORSE_BRANCH=v2.1.4.giga26" "CHIA_BRANCH=main" "PLOTMAN_BRANCH=compress" tags: | diff --git a/.github/workflows/main-chia.yaml b/.github/workflows/main-chia.yaml index 4ad46407..8aba54a2 100644 --- a/.github/workflows/main-chia.yaml +++ b/.github/workflows/main-chia.yaml @@ -89,7 +89,7 @@ jobs: build-args: | "UBUNTU_VER=jammy" "MACHINARIS_STREAM=latest" - "GIGAHORSE_BRANCH=v2.1.3.giga26" + "GIGAHORSE_BRANCH=v2.1.4.giga26" "CHIA_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-gigahorse:latest diff --git a/.github/workflows/main-mmx.yaml b/.github/workflows/main-mmx.yaml index 2e08fdb2..ecd2d577 100644 --- a/.github/workflows/main-mmx.yaml +++ b/.github/workflows/main-mmx.yaml @@ -46,7 +46,7 @@ jobs: "MACHINARIS_STREAM=latest" "CHIA_BRANCH=latest" "MMX_BRANCH=v0.10.6" - "GIGAHORSE_BRANCH=v2.1.3.giga26" + "GIGAHORSE_BRANCH=v2.1.4.giga26" 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 e27aee5d..64b2423c 100644 --- a/.github/workflows/test-chia.yaml +++ b/.github/workflows/test-chia.yaml @@ -89,7 +89,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=test" "CHIADOG_BRANCH=dev" - "GIGAHORSE_BRANCH=v2.1.3.giga26" + "GIGAHORSE_BRANCH=v2.1.4.giga26" "CHIA_BRANCH=main" "PLOTMAN_BRANCH=development" tags: | diff --git a/.github/workflows/test-mmx.yaml b/.github/workflows/test-mmx.yaml index e5bd7257..a2519693 100644 --- a/.github/workflows/test-mmx.yaml +++ b/.github/workflows/test-mmx.yaml @@ -46,7 +46,7 @@ jobs: "CHIA_BRANCH=latest" "PLOTMAN_BRANCH=development" "MMX_BRANCH=v0.10.6" - "GIGAHORSE_BRANCH=v2.1.3.giga26" + "GIGAHORSE_BRANCH=v2.1.4.giga26" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:test ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:test diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e92bcb4..cd70cdd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ 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] +### Updated + - [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.1.5) to v2.1.5 - misc improvements, see their release notes. + - [Gigahorse](https://github.com/madMAx43v3r/chia-gigahorse/releases/tag/v2.1.4.giga26) to v2.1.4.giga26. + ## [2.1.4] - 2024-01-11 ### Added - Optionally launch `chia-exporter` [metrics endpoint](https://github.com/Chia-Network/chia-exporter) for Prometheus reporting if env var `chia_exporter=true` is set. diff --git a/VERSION b/VERSION index c346e7a0..c5864dcf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.4 \ No newline at end of file +2.1.5 \ No newline at end of file From 0799fa488dc53a94ec5eeae7b93aa2c6876d3a9a Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 12 Jan 2024 15:22:08 -0700 Subject: [PATCH 02/24] Optionally start chia exporter in harvester mode as well. --- CHANGELOG.md | 2 ++ scripts/forks/chia_launch.sh | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd70cdd5..432eb74a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ 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] +### Changed + - Harvester mode will now optionally also run chia-exporter for Prometheus results. ### Updated - [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.1.5) to v2.1.5 - misc improvements, see their release notes. - [Gigahorse](https://github.com/madMAx43v3r/chia-gigahorse/releases/tag/v2.1.4.giga26) to v2.1.4.giga26. diff --git a/scripts/forks/chia_launch.sh b/scripts/forks/chia_launch.sh index bfa1371a..e1681172 100644 --- a/scripts/forks/chia_launch.sh +++ b/scripts/forks/chia_launch.sh @@ -136,6 +136,10 @@ elif [[ ${mode} =~ ^harvester.* ]]; then chia configure --set-farmer-peer ${farmer_address}:${farmer_port} 2>&1 >> /root/.chia/mainnet/log/init.log chia configure --enable-upnp false 2>&1 >> /root/.chia/mainnet/log/init.log chia start harvester -r + if [[ ${chia_exporter} == "true" ]]; then + echo "Starting Chia Exporter service for Prometheus reporting..." + sleep 20 && /usr/local/bin/chia-exporter serve 2>&1 > /root/.chia/mainnet/log/chia-exporter.log & + fi fi elif [[ ${mode} == 'plotter' ]]; then echo "Starting in Plotter-only mode. Run Plotman from either CLI or WebUI." From badc2c97ca38a51caa4b5c7187f0b146d919aeed Mon Sep 17 00:00:00 2001 From: chris-merritt <135200846+chris-merritt@users.noreply.github.com> Date: Mon, 15 Jan 2024 12:02:32 -0500 Subject: [PATCH 03/24] Update status_plotnfts.py Fix for change in chia cli plotnft --- api/schedules/status_plotnfts.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/schedules/status_plotnfts.py b/api/schedules/status_plotnfts.py index c56ceb6b..b64f5798 100644 --- a/api/schedules/status_plotnfts.py +++ b/api/schedules/status_plotnfts.py @@ -24,6 +24,8 @@ def extract_wallet_num(plotnft): for line in plotnft.split('\n'): if line.strip().startswith("Wallet id"): return int(line[len('Wallet id '): len(line)-2]) + if line.strip().startswith("Wallet ID:"): + return int(line[len('Wallet ID: '): len(line)]) return None def extract_launcher_id(plotnft): From 6a63957dfce2e6a2405e2c2f20dcd2d1af396e7e Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 24 Jan 2024 08:44:49 -0700 Subject: [PATCH 04/24] Cactus to v2.1.4 --- CHANGELOG.md | 1 + CREDITS.md | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 432eb74a..ece06675 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file. The format - Harvester mode will now optionally also run chia-exporter for Prometheus results. ### Updated - [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.1.5) to v2.1.5 - misc improvements, see their release notes. + - [Cactus](https://github.com/Cactus-Network/cactus-blockchain/releases/tag/v2.1.4) to v2.1.4. - [Gigahorse](https://github.com/madMAx43v3r/chia-gigahorse/releases/tag/v2.1.4.giga26) to v2.1.4.giga26. ## [2.1.4] - 2024-01-11 diff --git a/CREDITS.md b/CREDITS.md index 461cf096..416e0542 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -94,6 +94,7 @@ A big thanks to all that contributed with dev and test including: * @slowfinger * @ToTo * @Finball +* @chris-merritt ## 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 a786159d908dc9822f0e803b9b5148d2ea418043 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 24 Jan 2024 08:55:47 -0700 Subject: [PATCH 05/24] Cactus @ v2.1.4 --- scripts/forks/cactus_install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/forks/cactus_install.sh b/scripts/forks/cactus_install.sh index 554e28a0..ce1701e0 100644 --- a/scripts/forks/cactus_install.sh +++ b/scripts/forks/cactus_install.sh @@ -4,8 +4,8 @@ # CACTUS_BRANCH=$1 -# On 2023-08-24 -HASH=5e000ae5c26fd5799a025527720559fb2252b1d3 +# On 2024-01-24 +HASH=a1b033bfed034a699e14bd93ed356b7f8207e077 if [ -z ${CACTUS_BRANCH} ]; then echo 'Skipping Cactus install as not requested.' From 3cc7c8f29d1693f707c3fd2dd2072b7ff6ffcb6b Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Thu, 1 Feb 2024 16:07:18 -0700 Subject: [PATCH 06/24] Chia 2.2.0rc1 --- VERSION | 2 +- scripts/forks/chia_install.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index c5864dcf..e3a4f193 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.5 \ No newline at end of file +2.2.0 \ No newline at end of file diff --git a/scripts/forks/chia_install.sh b/scripts/forks/chia_install.sh index 4dfb3d17..8101d73e 100644 --- a/scripts/forks/chia_install.sh +++ b/scripts/forks/chia_install.sh @@ -27,10 +27,10 @@ else echo "Installing Chia CUDA binaries on ${arch_name}..." cd /tmp if [[ "${arch_name}" == "x86_64" ]]; then - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.1.4/chia-blockchain-cli_2.1.4-1_amd64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc1/chia-blockchain-cli_2.2.0rc1-1_amd64.deb apt-get install ./chia-blockchain-cli*.deb else - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.1.4/chia-blockchain-cli_2.1.4-1_arm64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc1/chia-blockchain-cli_2.2.0rc1-1_arm64.deb apt-get install ./chia-blockchain-cli*.deb fi From 0ac7b6e696ab2cc0862e33a918c6a4f6d9449c14 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sat, 3 Feb 2024 10:02:49 -0700 Subject: [PATCH 07/24] Optionally start chia data layer services. --- CHANGELOG.md | 2 ++ docker/dockerfile | 1 + scripts/forks/chia_launch.sh | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ece06675..d23a54c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ 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 +- Optionally launch Chia Data Layer services (https://docs.chia.net/guides/datalayer-user-guide/) if env var `chia_data=true` is set. ### Changed - Harvester mode will now optionally also run chia-exporter for Prometheus results. ### Updated diff --git a/docker/dockerfile b/docker/dockerfile index d62c888e..ea5ba410 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -101,6 +101,7 @@ ENV keys="/root/.chia/mnemonic.txt" ENV plots_dir="/plots" # One of fullnode, farmer, harvester, plotter, farmer+plotter, harvester+plotter. Default is fullnode ENV mode="fullnode" +ENV chia_data="false" ENV chia_exporter="false" ENV chives_masternode="false" ENV gigahorse_recompute_server="false" diff --git a/scripts/forks/chia_launch.sh b/scripts/forks/chia_launch.sh index e1681172..271a177f 100644 --- a/scripts/forks/chia_launch.sh +++ b/scripts/forks/chia_launch.sh @@ -99,6 +99,11 @@ if [[ ${mode} =~ ^fullnode.* ]]; then echo "Starting Chia Exporter service for Prometheus reporting..." sleep 20 && /usr/local/bin/chia-exporter serve 2>&1 > /root/.chia/mainnet/log/chia-exporter.log & fi + if [[ ${chia_data} == "true" ]]; then + echo "Starting Chia Data Layer services..." + sleep 20 && chia start data 2>&1 > /root/.chia/mainnet/log/chia-data.log & + sleep 20 && chia start data_layer_http 2>&1 >> /root/.chia/mainnet/log/chia-data.log & + fi if [[ ${mode} =~ .*timelord$ ]]; then if [ ! -f vdf_bench ]; then echo "Building timelord binaries..." From 2b40032323840b639bd3c63c35c39471c8591955 Mon Sep 17 00:00:00 2001 From: priyanku89 Date: Wed, 7 Feb 2024 23:04:17 -0500 Subject: [PATCH 08/24] Bump up GreenBTC to latest hash --- scripts/forks/greenbtc_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/forks/greenbtc_install.sh b/scripts/forks/greenbtc_install.sh index 347bf168..dea8e756 100644 --- a/scripts/forks/greenbtc_install.sh +++ b/scripts/forks/greenbtc_install.sh @@ -5,7 +5,7 @@ GREENBTC_BRANCH=$1 # On 2023-01-02 -HASH=e14bc12696af1cbcdf89a3e7bea0cdb1dd0e89ad +HASH=200816a51c24375fadcbcd25a0b1cb7549f61c77 if [ -z ${GREENBTC_BRANCH} ]; then echo 'Skipping GreenBTC install as not requested.' From 6885ae27745484ba84338c06c7945fe6c73e4f3e Mon Sep 17 00:00:00 2001 From: priyankub Date: Wed, 7 Feb 2024 23:49:17 -0500 Subject: [PATCH 09/24] Update chia_cli.py for greenbtc Greenbtc should use peer --- 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 69b9a68e..7de40238 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', 'flora', 'gigahorse', 'hddcoin', 'littlelambocoin', 'maize', 'one', 'pipscoin', 'shibgreen', 'tad', 'wheat'] +BLOCKCHAINS_USING_PEER_CMD = ['btcgreen', 'cactus', 'chia', 'chinilla', 'flax', 'flora', 'gigahorse', 'greenbtc', 'hddcoin', 'littlelambocoin', 'maize', 'one', 'pipscoin', 'shibgreen', 'tad', 'wheat'] def load_farm_summary(blockchain): chia_binary = globals.get_blockchain_binary(blockchain) From 25352ac88699f2eff8d0adcc8782ac516b2c303b Mon Sep 17 00:00:00 2001 From: priyanku89 Date: Thu, 8 Feb 2024 00:24:05 -0500 Subject: [PATCH 10/24] 1. Achi check in - Develop branch --- .github/workflows/develop-achi.yaml | 51 ++++++++++++ .github/workflows/main-achi.yaml | 52 +++++++++++++ .github/workflows/test-achi.yaml | 50 ++++++++++++ api/commands/rpc.py | 9 ++- common/config/blockchains.json | 17 ++++ docker/dockerfile | 4 +- scripts/forks/achi_install.sh | 26 +++++++ scripts/forks/achi_launch.sh | 116 ++++++++++++++++++++++++++++ scripts/worker_port_warning.sh | 3 + web/templates/worker_launch.html | 13 ++++ 10 files changed, 339 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/develop-achi.yaml create mode 100644 .github/workflows/main-achi.yaml create mode 100644 .github/workflows/test-achi.yaml create mode 100644 scripts/forks/achi_install.sh create mode 100644 scripts/forks/achi_launch.sh diff --git a/.github/workflows/develop-achi.yaml b/.github/workflows/develop-achi.yaml new file mode 100644 index 00000000..68e33cec --- /dev/null +++ b/.github/workflows/develop-achi.yaml @@ -0,0 +1,51 @@ +name: develop-achi + +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@v4 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64 + provenance: false + push: true + build-args: | + "UBUNTU_VER=focal" + "MACHINARIS_STREAM=develop" + "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" + "ACHI_BRANCH=master" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:develop + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:develop diff --git a/.github/workflows/main-achi.yaml b/.github/workflows/main-achi.yaml new file mode 100644 index 00000000..dde8f1af --- /dev/null +++ b/.github/workflows/main-achi.yaml @@ -0,0 +1,52 @@ +name: release-achi + +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@v4 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64,linux/arm64 + provenance: false + push: true + build-args: | + "UBUNTU_VER=focal" + "MACHINARIS_STREAM=latest" + "ACHI_BRANCH=master" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:latest + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:v${{ github.event.inputs.version }} + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:latest + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:v${{ github.event.inputs.version }} diff --git a/.github/workflows/test-achi.yaml b/.github/workflows/test-achi.yaml new file mode 100644 index 00000000..df34bee8 --- /dev/null +++ b/.github/workflows/test-achi.yaml @@ -0,0 +1,50 @@ +name: test-achi + +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@v4 + with: + file: docker/dockerfile + context: . + platforms: linux/amd64,linux/arm64 + provenance: false + push: true + build-args: | + "UBUNTU_VER=focal" + "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" + "ACHI_BRANCH=master" + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:test + ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:test diff --git a/api/commands/rpc.py b/api/commands/rpc.py index 2c301c57..6865cd57 100644 --- a/api/commands/rpc.py +++ b/api/commands/rpc.py @@ -15,7 +15,14 @@ blockchain = globals.enabled_blockchains()[0] -if blockchain == "apple": +if blockchain == "achi": + from achi.rpc.full_node_rpc_client import FullNodeRpcClient + from achi.rpc.farmer_rpc_client import FarmerRpcClient + from achi.rpc.wallet_rpc_client import WalletRpcClient + from achi.util.default_root import DEFAULT_ROOT_PATH + from achi.util.ints import uint16 + from achi.util.config import load_config as load_fork_config +elif blockchain == "apple": from apple.rpc.full_node_rpc_client import FullNodeRpcClient from apple.rpc.farmer_rpc_client import FarmerRpcClient from apple.rpc.wallet_rpc_client import WalletRpcClient diff --git a/common/config/blockchains.json b/common/config/blockchains.json index 7bca352f..ad05d2e5 100644 --- a/common/config/blockchains.json +++ b/common/config/blockchains.json @@ -1,4 +1,21 @@ { + "achi": { + "name": "Achi", + "symbol": "ACH" , + "binary": "/achi-blockchain/venv/bin/achi", + "network_path": "/root/.achi/mainnet", + "network_name": "mainnet", + "network_port": 9975, + "farmer_port": 9977, + "fullnode_rpc_port": 9965, + "worker_port": 8960, + "reward": 495, + "mojos_per_coin": 1000000000, + "blocks_per_day": 4608, + "git_url": "https://github.com/Achi-Coin/achi-blockchain/", + "discord_url": "https://discord.gg/ZTtQ9922zp", + "website_url": "https://achicoin.org/" + }, "apple": { "name": "Apple", "symbol": "APPLE", diff --git a/docker/dockerfile b/docker/dockerfile index ea5ba410..962e823a 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -10,6 +10,7 @@ ARG FDCLI_BRANCH=master ARG FORKTOOLS_BRANCH=main ARG BLADEBIT_BRANCH=master +ARG ACHI_BRANCH ARG APPLE_BRANCH ARG BALLCOIN_BRANCH ARG BPX_BRANCH @@ -53,7 +54,8 @@ 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/achi_install.sh ${ACHI_BRANCH} \ + && /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} \ diff --git a/scripts/forks/achi_install.sh b/scripts/forks/achi_install.sh new file mode 100644 index 00000000..fae8b3e9 --- /dev/null +++ b/scripts/forks/achi_install.sh @@ -0,0 +1,26 @@ +#!/bin/env bash +# +# Installs Achi as per https://github.com/Achi-Coin/achi-blockchain +# + +ACHI_BRANCH=$1 +# On 2024-02-08 +HASH=e3ca475efb3d7267d3a2eedef8b4897d129aeb5d + +if [ -z ${ACHI_BRANCH} ]; then + echo 'Skipping Achi install as not requested.' +else + git clone --branch ${ACHI_BRANCH} --recurse-submodules https://github.com/Achi-Coin/achi-blockchain.git /achi-blockchain + cd /achi-blockchain + git submodule update --init mozilla-ca + git checkout $HASH + chmod +x install.sh + /usr/bin/sh ./install.sh + + if [ ! -d /chia-blockchain/venv ]; then + cd / + rmdir /chia-blockchain + ln -s /achi-blockchain /chia-blockchain + ln -s /achi-blockchain/venv/bin/achi /chia-blockchain/venv/bin/chia + fi +fi \ No newline at end of file diff --git a/scripts/forks/achi_launch.sh b/scripts/forks/achi_launch.sh new file mode 100644 index 00000000..32bcdb14 --- /dev/null +++ b/scripts/forks/achi_launch.sh @@ -0,0 +1,116 @@ +#!/bin/env bash +# +# Initialize Achi service, depending on mode of system requested +# + +cd /achi-blockchain + +. ./activate + +# Only the /root/.chia folder is volume-mounted so store achi within +mkdir -p /root/.chia/achi +rm -f /root/.achi +ln -s /root/.chia/achi /root/.achi + +if [[ "${blockchain_db_download}" == 'true' ]] \ + && [[ "${mode}" == 'fullnode' ]] \ + && [[ ! -f /root/.achi/mainnet/db/blockchain_v1_mainnet.sqlite ]] \ + && [[ ! -f /root/.achi/mainnet/db/blockchain_v2_mainnet.sqlite ]]; then + echo "Sorry, achi 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/.achi/mainnet/log +achi init >> /root/.achi/mainnet/log/init.log 2>&1 + +echo 'Configuring achi...' +if [ -f /root/.achi/mainnet/config/config.yaml ]; then + sed -i 's/log_stdout: true/log_stdout: false/g' /root/.achi/mainnet/config/config.yaml + sed -i 's/log_level: WARNING/log_level: INFO/g' /root/.achi/mainnet/config/config.yaml + sed -i 's/localhost/127.0.0.1/g' /root/.achi/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}" + achi 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 + achi plots add -d ${p} +done + +chmod 755 -R /root/.achi/mainnet/config/ssl/ &> /dev/null +achi init --fix-ssl-permissions >/dev/null 2>&1 + +# 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 + achi keys add -f ${k} + sleep 10 + fi + done + done + if [ -f /root/.chia/machinaris/config/wallet_settings.json ]; then + achi start farmer-no-wallet + else + achi start farmer + fi + if [[ ${mode} =~ .*timelord$ ]]; then + if [ ! -f vdf_bench ]; then + echo "Building timelord binaries..." + apt-get update > /tmp/timelord_build.sh 2>&1 + apt-get install -y libgmp-dev libboost-python-dev libboost-system-dev >> /tmp/timelord_build.sh 2>&1 + BUILD_VDF_CLIENT=Y BUILD_VDF_BENCH=Y /usr/bin/sh ./install-timelord.sh >> /tmp/timelord_build.sh 2>&1 + fi + achi start timelord-only + fi +elif [[ ${mode} =~ ^farmer.* ]]; then + if [ ! -f ~/.achi/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 + achi 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/.achi/farmer_ca/private_ca.crt ]; then + mkdir -p /root/.achi/farmer_ca + response=$(curl --write-out '%{http_code}' --silent http://${farmer_address}:8960/certificates/?type=achi --output /tmp/certs.zip) + if [ $response == '200' ]; then + unzip /tmp/certs.zip -d /root/.achi/farmer_ca + else + echo "Certificates response of ${response} from http://${farmer_address}:8960/certificates/?type=achi. Is the fork's fullnode container running?" + fi + rm -f /tmp/certs.zip + fi + if [[ -f /root/.achi/farmer_ca/private_ca.crt ]] && [[ ! ${keys} == "persistent" ]]; then + achi init -c /root/.achi/farmer_ca 2>&1 > /root/.achi/mainnet/log/init.log + chmod 755 -R /root/.achi/mainnet/config/ssl/ &> /dev/null + achi init --fix-ssl-permissions >/dev/null 2>&1 + else + echo "Did not find your farmer's certificates within /root/.achi/farmer_ca." + echo "See: https://github.com/guydavis/machinaris/wiki/Workers#harvester" + fi + echo "Configuring farmer peer at ${farmer_address}:${farmer_port}" + achi configure --set-farmer-peer ${farmer_address}:${farmer_port} 2>&1 >> /root/.achi/mainnet/log/init.log + achi configure --enable-upnp false 2>&1 >> /root/.achi/mainnet/log/init.log + achi 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 964f45f0..6ae02e2b 100644 --- a/scripts/worker_port_warning.sh +++ b/scripts/worker_port_warning.sh @@ -1,4 +1,7 @@ # Warn if non-standard worker_api_port is being used, likely default value they did not override properly +if [[ "${blockchains}" == "achi" && "${worker_api_port}" != '8960' ]]; then + echo "Achi worker with non-standard worker_api_port of ${worker_api_port} found. Did you mean to use 8960?" +fi 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 diff --git a/web/templates/worker_launch.html b/web/templates/worker_launch.html index 1340a839..fecb62e8 100644 --- a/web/templates/worker_launch.html +++ b/web/templates/worker_launch.html @@ -155,6 +155,9 @@ } function lookup_worker_port(blockchain) { + if (blockchain == 'achi') { + return 8960; + } if (blockchain == 'apple') { return 8947; } @@ -258,6 +261,9 @@ } function lookup_farmer_port(blockchain) { + if (blockchain == 'achi') { + return 9977; + } if (blockchain == 'apple') { return 26667; } @@ -671,6 +677,13 @@

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

+
+ + +
From 2c0ad124f2fc4275f74d8fc5299194cc3dd507b5 Mon Sep 17 00:00:00 2001 From: priyanku89 Date: Thu, 8 Feb 2024 01:10:40 -0500 Subject: [PATCH 11/24] 1. Correct Achi links, and minor case corrections in comments --- common/config/blockchains.json | 6 +++--- scripts/forks/achi_install.sh | 2 +- scripts/forks/achi_launch.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/config/blockchains.json b/common/config/blockchains.json index ad05d2e5..34cfca8c 100644 --- a/common/config/blockchains.json +++ b/common/config/blockchains.json @@ -9,11 +9,11 @@ "farmer_port": 9977, "fullnode_rpc_port": 9965, "worker_port": 8960, - "reward": 495, + "reward": 512.0, "mojos_per_coin": 1000000000, "blocks_per_day": 4608, - "git_url": "https://github.com/Achi-Coin/achi-blockchain/", - "discord_url": "https://discord.gg/ZTtQ9922zp", + "git_url": "https://github.com/Achi-Coin/achi-blockchain", + "discord_url": "https://discord.gg/cnS7fUfwTq", "website_url": "https://achicoin.org/" }, "apple": { diff --git a/scripts/forks/achi_install.sh b/scripts/forks/achi_install.sh index fae8b3e9..a866b028 100644 --- a/scripts/forks/achi_install.sh +++ b/scripts/forks/achi_install.sh @@ -1,6 +1,6 @@ #!/bin/env bash # -# Installs Achi as per https://github.com/Achi-Coin/achi-blockchain +# Installs Achi as per https://achicoin.org/achipedia/post-1/ # ACHI_BRANCH=$1 diff --git a/scripts/forks/achi_launch.sh b/scripts/forks/achi_launch.sh index 32bcdb14..361863ee 100644 --- a/scripts/forks/achi_launch.sh +++ b/scripts/forks/achi_launch.sh @@ -16,14 +16,14 @@ if [[ "${blockchain_db_download}" == 'true' ]] \ && [[ "${mode}" == 'fullnode' ]] \ && [[ ! -f /root/.achi/mainnet/db/blockchain_v1_mainnet.sqlite ]] \ && [[ ! -f /root/.achi/mainnet/db/blockchain_v2_mainnet.sqlite ]]; then - echo "Sorry, achi does not offer a recent blockchain DB for download. Standard sync will happen over a few days." + echo "Sorry, Achi 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/.achi/mainnet/log achi init >> /root/.achi/mainnet/log/init.log 2>&1 -echo 'Configuring achi...' +echo 'Configuring Achi...' if [ -f /root/.achi/mainnet/config/config.yaml ]; then sed -i 's/log_stdout: true/log_stdout: false/g' /root/.achi/mainnet/config/config.yaml sed -i 's/log_level: WARNING/log_level: INFO/g' /root/.achi/mainnet/config/config.yaml From 0a3213a569afb09341f1e4d503d79605d32db9a6 Mon Sep 17 00:00:00 2001 From: priyanku89 Date: Thu, 8 Feb 2024 12:43:46 -0500 Subject: [PATCH 12/24] 1. Update legacy chains - remove greenbtc, add achi 2. Use priyankub chiadog with update achi mojo --- common/config/globals.py | 2 +- scripts/chiadog_setup.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/config/globals.py b/common/config/globals.py index 0982ec35..cbab735f 100644 --- a/common/config/globals.py +++ b/common/config/globals.py @@ -460,7 +460,7 @@ def get_alltheblocks_name(blockchain): return blockchain def legacy_blockchain(blockchain): - return blockchain in ['ballcoin', 'coffee', 'ecostake', 'greenbtc', 'gold', 'mint', 'nchain', 'petroleum', 'profit', 'silicoin', 'stor'] + return blockchain in ['achi', 'ballcoin', 'coffee', 'ecostake', 'gold', 'mint', 'nchain', 'petroleum', 'profit', 'silicoin', 'stor'] last_mmx_reward = None last_mmx_reward_load_time = None diff --git a/scripts/chiadog_setup.sh b/scripts/chiadog_setup.sh index 258d1102..824c5128 100644 --- a/scripts/chiadog_setup.sh +++ b/scripts/chiadog_setup.sh @@ -8,9 +8,9 @@ CHIADOG_BRANCH=$1 if [[ (${mode} =~ ^fullnode.* || ${mode} =~ "harvester") && ${blockchains} != 'mmx' ]]; then if [[ ! -f /chiadog/main.py ]]; then - echo 'Installing Chiadog from https://github.com/guydavis/chiadog using branch: ${CHIADOG_BRANCH}' + echo 'Installing Chiadog from https://github.com/priyankub/chiadog using branch: ${CHIADOG_BRANCH}' cd / - git clone --branch ${CHIADOG_BRANCH} https://github.com/guydavis/chiadog.git + git clone --branch ${CHIADOG_BRANCH} https://github.com/priyankub/chiadog.git cd /chia-blockchain/ venv/bin/pip3 install -r /chiadog/requirements.txt fi From 5ca5e933107737392956605ddfb402dcda71c89a Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Thu, 8 Feb 2024 16:36:11 -0700 Subject: [PATCH 13/24] Chia 2.2.0rc2 --- scripts/forks/chia_install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/forks/chia_install.sh b/scripts/forks/chia_install.sh index 8101d73e..f0033233 100644 --- a/scripts/forks/chia_install.sh +++ b/scripts/forks/chia_install.sh @@ -27,10 +27,10 @@ else echo "Installing Chia CUDA binaries on ${arch_name}..." cd /tmp if [[ "${arch_name}" == "x86_64" ]]; then - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc1/chia-blockchain-cli_2.2.0rc1-1_amd64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc2/chia-blockchain-cli_2.2.0rc2-1_amd64.deb apt-get install ./chia-blockchain-cli*.deb else - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc1/chia-blockchain-cli_2.2.0rc1-1_arm64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc2/chia-blockchain-cli_2.2.0rc2-1_arm64.deb apt-get install ./chia-blockchain-cli*.deb fi From e3e56af2d2bf47a437604ffceb628948668858ab Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 16 Feb 2024 09:38:17 -0700 Subject: [PATCH 14/24] Chia 2.2.0rc3 --- scripts/forks/chia_install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/forks/chia_install.sh b/scripts/forks/chia_install.sh index f0033233..b3c900ac 100644 --- a/scripts/forks/chia_install.sh +++ b/scripts/forks/chia_install.sh @@ -27,10 +27,10 @@ else echo "Installing Chia CUDA binaries on ${arch_name}..." cd /tmp if [[ "${arch_name}" == "x86_64" ]]; then - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc2/chia-blockchain-cli_2.2.0rc2-1_amd64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc2/chia-blockchain-cli_2.2.0rc3-1_amd64.deb apt-get install ./chia-blockchain-cli*.deb else - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc2/chia-blockchain-cli_2.2.0rc2-1_arm64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc2/chia-blockchain-cli_2.2.0rc3-1_arm64.deb apt-get install ./chia-blockchain-cli*.deb fi From cee3d7ddf1cba9c6283911bfa3ba28950c8f80ce Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 16 Feb 2024 14:11:10 -0700 Subject: [PATCH 15/24] Cleanups after merge. --- CHANGELOG.md | 3 +- CREDITS.md | 1 + config/chiadog/achi.sample.yaml | 91 +++++++++++++++++++++++++++++++ scripts/chiadog_setup.sh | 4 +- scripts/forks/achi_install.sh | 2 +- scripts/forks/greenbtc_install.sh | 2 +- 6 files changed, 98 insertions(+), 5 deletions(-) create mode 100644 config/chiadog/achi.sample.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index d23a54c1..55146cda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ All notable changes to this project will be documented in this file. The format ## [Unreleased] ### Added -- Optionally launch Chia Data Layer services (https://docs.chia.net/guides/datalayer-user-guide/) if env var `chia_data=true` is set. + - Support for Achi blockchain. Requires its own plots (like Chives), you'll have to plot separately if interested. Thanks @priyankub + - Optionally launch Chia Data Layer services (https://docs.chia.net/guides/datalayer-user-guide/) if env var `chia_data=true` is set. ### Changed - Harvester mode will now optionally also run chia-exporter for Prometheus results. ### Updated diff --git a/CREDITS.md b/CREDITS.md index 416e0542..5614e916 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -95,6 +95,7 @@ A big thanks to all that contributed with dev and test including: * @ToTo * @Finball * @chris-merritt +* @priyankub ## 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/config/chiadog/achi.sample.yaml b/config/chiadog/achi.sample.yaml new file mode 100644 index 00000000..85c9c320 --- /dev/null +++ b/config/chiadog/achi.sample.yaml @@ -0,0 +1,91 @@ +# This is useful to differentiate multiple +# instances monitoring multiple harvesters +notification_title_prefix: '$HOSTNAME-achi' +log_level: INFO +coin_name: 'achi' +coin_symbol: 'achi' + +# 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: 'achi' + file_path: '~/.chia/achi/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: 'achi@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: achi/achidog/alert + qos: 1 + retain: false + credentials: + host: '192.168.0.10' + port: 8883 + username: '' + password: '' diff --git a/scripts/chiadog_setup.sh b/scripts/chiadog_setup.sh index 824c5128..258d1102 100644 --- a/scripts/chiadog_setup.sh +++ b/scripts/chiadog_setup.sh @@ -8,9 +8,9 @@ CHIADOG_BRANCH=$1 if [[ (${mode} =~ ^fullnode.* || ${mode} =~ "harvester") && ${blockchains} != 'mmx' ]]; then if [[ ! -f /chiadog/main.py ]]; then - echo 'Installing Chiadog from https://github.com/priyankub/chiadog using branch: ${CHIADOG_BRANCH}' + echo 'Installing Chiadog from https://github.com/guydavis/chiadog using branch: ${CHIADOG_BRANCH}' cd / - git clone --branch ${CHIADOG_BRANCH} https://github.com/priyankub/chiadog.git + git clone --branch ${CHIADOG_BRANCH} https://github.com/guydavis/chiadog.git cd /chia-blockchain/ venv/bin/pip3 install -r /chiadog/requirements.txt fi diff --git a/scripts/forks/achi_install.sh b/scripts/forks/achi_install.sh index a866b028..fae8b3e9 100644 --- a/scripts/forks/achi_install.sh +++ b/scripts/forks/achi_install.sh @@ -1,6 +1,6 @@ #!/bin/env bash # -# Installs Achi as per https://achicoin.org/achipedia/post-1/ +# Installs Achi as per https://github.com/Achi-Coin/achi-blockchain # ACHI_BRANCH=$1 diff --git a/scripts/forks/greenbtc_install.sh b/scripts/forks/greenbtc_install.sh index dea8e756..27dfc6e0 100644 --- a/scripts/forks/greenbtc_install.sh +++ b/scripts/forks/greenbtc_install.sh @@ -4,7 +4,7 @@ # GREENBTC_BRANCH=$1 -# On 2023-01-02 +# On 2024-02-16 HASH=200816a51c24375fadcbcd25a0b1cb7549f61c77 if [ -z ${GREENBTC_BRANCH} ]; then From bff7737097bc2d2f00d6caf351f9c8356191eefc Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 18 Feb 2024 07:09:49 -0700 Subject: [PATCH 16/24] Formatting fix for Achi. --- CHANGELOG.md | 2 ++ scripts/forks/chia_install.sh | 4 ++-- web/templates/worker_launch.html | 21 ++++++++++----------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55146cda..407fa3f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ All notable changes to this project will be documented in this file. The format - [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.1.5) to v2.1.5 - misc improvements, see their release notes. - [Cactus](https://github.com/Cactus-Network/cactus-blockchain/releases/tag/v2.1.4) to v2.1.4. - [Gigahorse](https://github.com/madMAx43v3r/chia-gigahorse/releases/tag/v2.1.4.giga26) to v2.1.4.giga26. +### Notes + - Support for new blockchains and tools DOES NOT imply my endorsement for them. *Only run those you are comfortable with.* ## [2.1.4] - 2024-01-11 ### Added diff --git a/scripts/forks/chia_install.sh b/scripts/forks/chia_install.sh index b3c900ac..a70708e9 100644 --- a/scripts/forks/chia_install.sh +++ b/scripts/forks/chia_install.sh @@ -27,10 +27,10 @@ else echo "Installing Chia CUDA binaries on ${arch_name}..." cd /tmp if [[ "${arch_name}" == "x86_64" ]]; then - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc2/chia-blockchain-cli_2.2.0rc3-1_amd64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc3/chia-blockchain-cli_2.2.0rc3-1_amd64.deb apt-get install ./chia-blockchain-cli*.deb else - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc2/chia-blockchain-cli_2.2.0rc3-1_arm64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc3/chia-blockchain-cli_2.2.0rc3-1_arm64.deb apt-get install ./chia-blockchain-cli*.deb fi diff --git a/web/templates/worker_launch.html b/web/templates/worker_launch.html index fecb62e8..92feb095 100644 --- a/web/templates/worker_launch.html +++ b/web/templates/worker_launch.html @@ -712,6 +712,8 @@

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

Cactus
+
+
@@ -719,8 +721,6 @@

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

Chia
-
-
@@ -749,6 +749,8 @@

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

Cryptodoge
+
+
@@ -756,8 +758,6 @@

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

Ecostake
-
-
@@ -786,6 +786,8 @@

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

Gold
+
+
@@ -793,8 +795,6 @@

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

GreenBTC
-
-
@@ -823,6 +823,8 @@

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

Mint
+
+
@@ -830,8 +832,6 @@

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

MMX
-
-
@@ -860,6 +860,8 @@

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

Pipscoin
+
+
@@ -867,8 +869,6 @@

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

Profit
-
-
@@ -897,7 +897,6 @@

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

Wheat
-
 
From b7866feec980aa0f966b7c7f824d1cc0ce8a9c0f Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 19 Feb 2024 09:15:14 -0700 Subject: [PATCH 17/24] Wheat @ 2.1.5 --- CHANGELOG.md | 1 + scripts/forks/wheat_install.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 407fa3f8..22fd2252 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file. The format ### Updated - [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.1.4) to v2.1.4 - misc improvements, see their release notes. - [Gigahorse](https://github.com/madMAx43v3r/chia-gigahorse/releases/tag/v2.1.3.giga26) to v2.1.3.giga26. + - [Wheat](https://github.com/wheatnetwork/wheat-blockchain/releases/tag/2.1.5) to v2.1.5. ## [2.1.3] - 2023-12-19 ### Updated diff --git a/scripts/forks/wheat_install.sh b/scripts/forks/wheat_install.sh index b0f3fa5a..d77a91f0 100644 --- a/scripts/forks/wheat_install.sh +++ b/scripts/forks/wheat_install.sh @@ -4,8 +4,8 @@ # WHEAT_BRANCH=$1 -# On 2023-07-20 -HASH=5185edcd0ae333da6c157783cf4d1f19ee0a252d +# On 2024-02-19 +HASH=5c8df453677d18609dcbad4b47cbf431feccf79b if [ -z ${WHEAT_BRANCH} ]; then echo 'Skipping Wheat install as not requested.' From 59546f7c2bde62c59a534505a14234e361c4449f Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 20 Feb 2024 13:15:05 -0700 Subject: [PATCH 18/24] Latest JS libs. --- scripts/pull_3rd_party_libs.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/pull_3rd_party_libs.sh b/scripts/pull_3rd_party_libs.sh index 767b97df..b0d232ee 100755 --- a/scripts/pull_3rd_party_libs.sh +++ b/scripts/pull_3rd_party_libs.sh @@ -4,8 +4,8 @@ # # Bootstrap and Icons -BSI_VERSION=1.11.1 -BOOTSTRAP_VERSION=5.3.2 +BSI_VERSION=1.11.3 +BOOTSTRAP_VERSION=5.3.3 BASEPATH=${JS_LIBS_BASEPATH:-/machinaris/web/static/3rd_party} # Mapping library @@ -13,11 +13,11 @@ LEAFLET_VERSION=1.9.4 # List of other css/js links LIST=" -https://cdn.datatables.net/1.13.7/css/dataTables.bootstrap5.css -https://cdn.datatables.net/1.13.7/js/dataTables.bootstrap5.js -https://cdn.datatables.net/1.13.7/js/jquery.dataTables.js -https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.js.map -https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js +https://cdn.datatables.net/2.0.0/css/dataTables.bootstrap5.css +https://cdn.datatables.net/2.0.0/js/dataTables.bootstrap5.js +https://cdn.datatables.net/2.0.0/js/jquery.dataTables.js +https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.js.map +https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.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.7.1/dist/jquery.min.js From e85d87e662f160ea7b8b721c02cb3abfb3776277 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 21 Feb 2024 08:19:29 -0700 Subject: [PATCH 19/24] Wheat @ 2.1.6 --- CHANGELOG.md | 2 +- scripts/forks/wheat_install.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22fd2252..a0251656 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 - [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.1.5) to v2.1.5 - misc improvements, see their release notes. - [Cactus](https://github.com/Cactus-Network/cactus-blockchain/releases/tag/v2.1.4) to v2.1.4. - [Gigahorse](https://github.com/madMAx43v3r/chia-gigahorse/releases/tag/v2.1.4.giga26) to v2.1.4.giga26. + - [Wheat](https://github.com/wheatnetwork/wheat-blockchain/releases/tag/2.1.6) to v2.1.6 ### Notes - Support for new blockchains and tools DOES NOT imply my endorsement for them. *Only run those you are comfortable with.* @@ -26,7 +27,6 @@ All notable changes to this project will be documented in this file. The format ### Updated - [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.1.4) to v2.1.4 - misc improvements, see their release notes. - [Gigahorse](https://github.com/madMAx43v3r/chia-gigahorse/releases/tag/v2.1.3.giga26) to v2.1.3.giga26. - - [Wheat](https://github.com/wheatnetwork/wheat-blockchain/releases/tag/2.1.5) to v2.1.5. ## [2.1.3] - 2023-12-19 ### Updated diff --git a/scripts/forks/wheat_install.sh b/scripts/forks/wheat_install.sh index d77a91f0..cede9e78 100644 --- a/scripts/forks/wheat_install.sh +++ b/scripts/forks/wheat_install.sh @@ -4,8 +4,8 @@ # WHEAT_BRANCH=$1 -# On 2024-02-19 -HASH=5c8df453677d18609dcbad4b47cbf431feccf79b +# On 2024-02-21 +HASH=869c0b5f26d82e81528a823dcda33e82bd9ed4f9 if [ -z ${WHEAT_BRANCH} ]; then echo 'Skipping Wheat install as not requested.' From 42e806fe5894f5f822007750e44d8d62939fc9d0 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 21 Feb 2024 14:55:24 -0700 Subject: [PATCH 20/24] Chia 2.2.0rc4 --- scripts/forks/chia_install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/forks/chia_install.sh b/scripts/forks/chia_install.sh index a70708e9..86e522be 100644 --- a/scripts/forks/chia_install.sh +++ b/scripts/forks/chia_install.sh @@ -27,10 +27,10 @@ else echo "Installing Chia CUDA binaries on ${arch_name}..." cd /tmp if [[ "${arch_name}" == "x86_64" ]]; then - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc3/chia-blockchain-cli_2.2.0rc3-1_amd64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc4/chia-blockchain-cli_2.2.0rc4-1_amd64.deb apt-get install ./chia-blockchain-cli*.deb else - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc3/chia-blockchain-cli_2.2.0rc3-1_arm64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc4/chia-blockchain-cli_2.2.0rc4-1_arm64.deb apt-get install ./chia-blockchain-cli*.deb fi From 1d2696e480f62ca4c6a9030662571cb600941305 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Thu, 22 Feb 2024 14:11:47 -0700 Subject: [PATCH 21/24] Fixing for Datatables.js v2.0 import issue. --- scripts/pull_3rd_party_libs.sh | 2 +- web/templates/base.html | 2 +- web/templates/charts/container_memory.html | 2 +- web/templates/charts/farmed.html | 2 +- web/templates/charts/netspace.html | 2 +- web/templates/transactions.html | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/pull_3rd_party_libs.sh b/scripts/pull_3rd_party_libs.sh index b0d232ee..792f38a3 100755 --- a/scripts/pull_3rd_party_libs.sh +++ b/scripts/pull_3rd_party_libs.sh @@ -15,7 +15,7 @@ LEAFLET_VERSION=1.9.4 LIST=" https://cdn.datatables.net/2.0.0/css/dataTables.bootstrap5.css https://cdn.datatables.net/2.0.0/js/dataTables.bootstrap5.js -https://cdn.datatables.net/2.0.0/js/jquery.dataTables.js +https://cdn.datatables.net/2.0.0/js/dataTables.min.js https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.js.map https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js https://cdn.jsdelivr.net/npm/chartjs-adapter-luxon@1.3.1/dist/chartjs-adapter-luxon.umd.min.js diff --git a/web/templates/base.html b/web/templates/base.html index 4d05fc37..c92f58c4 100644 --- a/web/templates/base.html +++ b/web/templates/base.html @@ -187,7 +187,7 @@ + src="{{ url_for('static', filename='3rd_party/dataTables.min.js') }}"> diff --git a/web/templates/charts/container_memory.html b/web/templates/charts/container_memory.html index c9276ec8..f7eb679b 100644 --- a/web/templates/charts/container_memory.html +++ b/web/templates/charts/container_memory.html @@ -48,7 +48,7 @@ + src="{{ url_for('static', filename='3rd_party/dataTables.min.js') }}"> diff --git a/web/templates/charts/farmed.html b/web/templates/charts/farmed.html index 85db0620..5b2485c7 100644 --- a/web/templates/charts/farmed.html +++ b/web/templates/charts/farmed.html @@ -73,7 +73,7 @@

{{_('Farmed Blocks')}}

+ src="{{ url_for('static', filename='3rd_party/dataTables.min.js') }}"> diff --git a/web/templates/charts/netspace.html b/web/templates/charts/netspace.html index c9276ec8..f7eb679b 100644 --- a/web/templates/charts/netspace.html +++ b/web/templates/charts/netspace.html @@ -48,7 +48,7 @@ + src="{{ url_for('static', filename='3rd_party/dataTables.min.js') }}"> diff --git a/web/templates/transactions.html b/web/templates/transactions.html index da1f6a5d..ae5a5489 100644 --- a/web/templates/transactions.html +++ b/web/templates/transactions.html @@ -101,7 +101,7 @@
{{_('Also ensure the blockchain fullnode is not Offline, by checking the Wor + src="{{ url_for('static', filename='3rd_party/dataTables.min.js') }}"> From 273537968a8eb87321338870794661689eeea234 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 26 Feb 2024 09:27:24 -0700 Subject: [PATCH 22/24] Fix for Chia's changes to bladebit packaging. --- scripts/bladebit_setup.sh | 3 ++- web/static/landings/en.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/bladebit_setup.sh b/scripts/bladebit_setup.sh index 4c799352..c7f965a0 100644 --- a/scripts/bladebit_setup.sh +++ b/scripts/bladebit_setup.sh @@ -13,8 +13,9 @@ if [[ (${mode} =~ ^fullnode.* || ${mode} =~ "plotter") && (${blockchains} == 'c cd / && echo "Installing bladebit on ${arch_name}..." # Now install CNI's separate binary for actual GPU plotting... + mkdir -p /opt/chia/bladebit cd /opt/chia/bladebit - rm -f ./bladebit # Remove stale version bundled in the DEB package. + rm -f ./bladebit* # Remove any stale versions bundled in the DEB package. if [[ "${arch_name}" == "x86_64" ]]; then curl -sLJO https://github.com/Chia-Network/bladebit/releases/download/v3.1.0/bladebit-v3.1.0-ubuntu-x86-64.tar.gz curl -sLJO https://github.com/Chia-Network/bladebit/releases/download/v3.1.0/bladebit-cuda-v3.1.0-ubuntu-x86-64.tar.gz diff --git a/web/static/landings/en.txt b/web/static/landings/en.txt index e0d268e1..cde01ddb 100644 --- a/web/static/landings/en.txt +++ b/web/static/landings/en.txt @@ -64,4 +64,5 @@ Lights out! Does the system still boot? Lights out! Lets replot again! 1337.png You said 'Buy Crypto'! No... I said 'Bye Crypto' -2023: Dust off your GPU, Chia is going PoW! :) \ No newline at end of file +2023: Dust off your GPU, Chia is going PoW! :) +2024: Sure, everyone has a spare 24GB Nvidia GPU lying around. \ No newline at end of file From bf7b8d35373ac2ac2a0f33cb9646148a67201bdb Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 28 Feb 2024 13:40:34 -0700 Subject: [PATCH 23/24] Chia 2.2.0 --- CHANGELOG.md | 4 ++-- common/config/blockchains.json | 2 +- scripts/forks/chia_install.sh | 4 ++-- web/static/landings/en.txt | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0251656..4649cb39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,14 @@ 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] +## [2.2.0] - 2024-02-29 ### Added - Support for Achi blockchain. Requires its own plots (like Chives), you'll have to plot separately if interested. Thanks @priyankub - Optionally launch Chia Data Layer services (https://docs.chia.net/guides/datalayer-user-guide/) if env var `chia_data=true` is set. ### Changed - Harvester mode will now optionally also run chia-exporter for Prometheus results. ### Updated - - [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.1.5) to v2.1.5 - misc improvements, see their release notes. + - [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.2.0) to v2.2.0 - misc improvements, see their release notes. - [Cactus](https://github.com/Cactus-Network/cactus-blockchain/releases/tag/v2.1.4) to v2.1.4. - [Gigahorse](https://github.com/madMAx43v3r/chia-gigahorse/releases/tag/v2.1.4.giga26) to v2.1.4.giga26. - [Wheat](https://github.com/wheatnetwork/wheat-blockchain/releases/tag/2.1.6) to v2.1.6 diff --git a/common/config/blockchains.json b/common/config/blockchains.json index 34cfca8c..54b92d93 100644 --- a/common/config/blockchains.json +++ b/common/config/blockchains.json @@ -111,7 +111,7 @@ "farmer_port": 8447, "fullnode_rpc_port": 8555, "worker_port": 8927, - "reward": 2.0, + "reward": 1.0, "mojos_per_coin": 1000000000000, "blocks_per_day": 4608, "git_url": "https://github.com/Chia-Network/chia-blockchain", diff --git a/scripts/forks/chia_install.sh b/scripts/forks/chia_install.sh index 86e522be..2126506c 100644 --- a/scripts/forks/chia_install.sh +++ b/scripts/forks/chia_install.sh @@ -27,10 +27,10 @@ else echo "Installing Chia CUDA binaries on ${arch_name}..." cd /tmp if [[ "${arch_name}" == "x86_64" ]]; then - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc4/chia-blockchain-cli_2.2.0rc4-1_amd64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0/chia-blockchain-cli_2.2.0-1_amd64.deb apt-get install ./chia-blockchain-cli*.deb else - curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0-rc4/chia-blockchain-cli_2.2.0rc4-1_arm64.deb + curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.2.0/chia-blockchain-cli_2.2.0-1_arm64.deb apt-get install ./chia-blockchain-cli*.deb fi diff --git a/web/static/landings/en.txt b/web/static/landings/en.txt index cde01ddb..03e887d8 100644 --- a/web/static/landings/en.txt +++ b/web/static/landings/en.txt @@ -65,4 +65,5 @@ Lights out! Lets replot again! 1337.png You said 'Buy Crypto'! No... I said 'Bye Crypto' 2023: Dust off your GPU, Chia is going PoW! :) -2024: Sure, everyone has a spare 24GB Nvidia GPU lying around. \ No newline at end of file +2024: Sure, everyone has a spare 24GB Nvidia GPU lying around. +2024: Wasn't the Chia halving supposed to raise the price of XCH? \ No newline at end of file From 3be12ce4a92c249e4ada7bd0378c648246bf46a2 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Thu, 29 Feb 2024 09:19:36 -0700 Subject: [PATCH 24/24] Account for another year of Chia blockchain DB bloat. --- common/config/globals.py | 4 ++-- scripts/forks/chia_launch.sh | 4 ++-- scripts/forks/gigahorse_launch.sh | 4 ++-- web/templates/setup.html | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common/config/globals.py b/common/config/globals.py index cbab735f..22e578aa 100644 --- a/common/config/globals.py +++ b/common/config/globals.py @@ -159,8 +159,8 @@ def is_setup(): return foundKey # On very first launch of the main Chia container, blockchain DB gz is being downloaded via torrent so must wait. -CHIA_COMPRESSED_DB_SIZE = 56 * 1024 * 1024 * 1024 # Compressed GB in March 2023 -CHIA_BLOCKCHAIN_DB_SIZE = 106 * 1024 * 1024 * 1024 # Uncompressed GB in March 2023 +CHIA_COMPRESSED_DB_SIZE = 75 * 1024 * 1024 * 1024 # Compressed GB in March 2024 +CHIA_BLOCKCHAIN_DB_SIZE = 127 * 1024 * 1024 * 1024 # Uncompressed GB in March 2024 def blockchain_downloading(): db_path = '/root/.chia/mainnet/db' if path.exists(f"{db_path}/blockchain_v1_mainnet.sqlite") or path.exists(f"{db_path}/blockchain_v2_mainnet.sqlite"): diff --git a/scripts/forks/chia_launch.sh b/scripts/forks/chia_launch.sh index 271a177f..2214f691 100644 --- a/scripts/forks/chia_launch.sh +++ b/scripts/forks/chia_launch.sh @@ -35,7 +35,7 @@ if [[ "${blockchain_db_download}" == 'true' ]] \ echo "Downloading Chia blockchain DB (many GBs in size) on first launch..." echo "Please be patient as this takes hours now, but saves days of syncing time later." mkdir -p /root/.chia/mainnet/db/chia && cd /root/.chia/mainnet/db/chia - # Latest Blockchain DB, first try direct download, then fallback to slower torrent + # Latest Blockchain DB via torrent download torrent=$(curl -s https://www.chia.net/downloads/ | grep -Po "https://torrents.chia.net/databases/mainnet/mainnet.\d{4}-\d{2}-\d{2}.tar.gz.torrent") echo "Please be patient! Downloading blockchain database indirectly (via libtorrent) from: " echo " ${torrent}" @@ -43,8 +43,8 @@ if [[ "${blockchain_db_download}" == 'true' ]] \ /usr/bin/python /machinaris/scripts/chiadb_download.py $PWD/*.torrent >> /tmp/chiadb_download.log 2>&1 echo "Now decompressing the blockchain database..." cd /root/.chia/mainnet/db/chia && tar -xf *.gz + mv blockchain_v2_mainnet.sqlite height-to-hash .. cd /root/.chia/mainnet/db - mv /root/.chia/mainnet/db/chia/blockchain_v2_mainnet.*.sqlite blockchain_v2_mainnet.sqlite rm -rf /root/.chia/mainnet/db/chia fi diff --git a/scripts/forks/gigahorse_launch.sh b/scripts/forks/gigahorse_launch.sh index 8a2c78d1..13fe7b39 100644 --- a/scripts/forks/gigahorse_launch.sh +++ b/scripts/forks/gigahorse_launch.sh @@ -32,7 +32,7 @@ if [[ "${blockchain_db_download}" == 'true' ]] \ echo "Downloading Chia blockchain DB (many GBs in size) on first launch..." echo "Please be patient as this takes hours now, but saves days of syncing time later." mkdir -p /root/.chia/mainnet/db/chia && cd /root/.chia/mainnet/db/chia - # Latest Blockchain DB, first try direct download, then fallback to slower torrent + # Latest Blockchain DB via torrent download torrent=$(curl -s https://www.chia.net/downloads/ | grep -Po "https://torrents.chia.net/databases/mainnet/mainnet.\d{4}-\d{2}-\d{2}.tar.gz.torrent") echo "Please be patient! Downloading blockchain database indirectly (via libtorrent) from: " echo " ${torrent}" @@ -40,8 +40,8 @@ if [[ "${blockchain_db_download}" == 'true' ]] \ /usr/bin/python /machinaris/scripts/chiadb_download.py $PWD/*.torrent >> /tmp/chiadb_download.log 2>&1 echo "Now decompressing the blockchain database..." cd /root/.chia/mainnet/db/chia && tar -xf *.gz + mv blockchain_v2_mainnet.sqlite height-to-hash .. cd /root/.chia/mainnet/db - mv /root/.chia/mainnet/db/chia/blockchain_v2_mainnet.*.sqlite blockchain_v2_mainnet.sqlite rm -rf /root/.chia/mainnet/db/chia fi diff --git a/web/templates/setup.html b/web/templates/setup.html index 76d84eff..7d6d067b 100644 --- a/web/templates/setup.html +++ b/web/templates/setup.html @@ -61,7 +61,7 @@ {% autoescape false %}

{{_( 'On very first launch, the Chia compressed blockchain database %(compressed)s is being downloaded from %(dl_link)s, then unzipped. At about %(uncompressed)s in uncompressed size, this will take a while. However an hour or two now, will save you multiple days of blockchain syncing later. Please be patient!', - compressed="(~56 GB)", uncompressed="106 GB", + compressed="(~75 GB)", uncompressed="127 GB", dl_link='https://www.chia.net/downloads/' )}}