From 118685db176268f7b4be0014a53c92a2810b403e Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sat, 26 Jun 2021 13:50:20 -0600 Subject: [PATCH 0001/1625] Calculate ETW for entire farm, not just fullnode. Fix for #118. --- api/__init__.py | 24 ----------------- api/migrations/README | 42 ++++++++++++++++++++++++++++- api/views/ping/resources.py | 2 +- common/utils/converters.py | 53 +++++++++++++++++++++++++++++++++++-- web/models/chia.py | 18 +++++++++++++ 5 files changed, 111 insertions(+), 28 deletions(-) diff --git a/api/__init__.py b/api/__init__.py index 1d91a2fa..28800dca 100644 --- a/api/__init__.py +++ b/api/__init__.py @@ -35,27 +35,3 @@ def set_sqlite_pragma(dbapi_connection, connection_record): api = extensions.create_api(app) views.register_blueprints(api) - -# -# Notes about using flask-migrate to manage schema: -# From then on as developer, modify models, then run this to generate a new migration and commit it. -# cd /code/machinaris/api -# FLASK_APP=__init__.py flask db migrate -> Creates migration based on current model. -# -# Then in scripts/setup_databases.sh, this is run on each launch -# cd /machinaris/api -# FLASK_APP=__init__.py flask db upgrade -> Applies migrations against old db -# -# -# Notes about the initial setup: -# -# To create very first migration, point to empty sqlite db, by putting these default_settings.py -#SQLALCHEMY_DATABASE_URI = 'sqlite:///' -#SQLALCHEMY_BINDS = { -# 'stats': 'sqlite:///', -# 'chiadog': 'sqlite:///', -#} -# cd /code/machinaris/api -# FLASK_APP=__init__.py flask db init --multidb -# FLASK_APP=__init__.py flask db migrate -# \ No newline at end of file diff --git a/api/migrations/README b/api/migrations/README index 98e4f9c4..2d5a97b2 100644 --- a/api/migrations/README +++ b/api/migrations/README @@ -1 +1,41 @@ -Generic single-database configuration. \ No newline at end of file +Schema versioning with Flask-Migrate + +## Creating a migration +As developer, modify models, then run this to generate a new migration and commit it. + +``` +cd /code/machinaris/api +FLASK_APP=__init__.py flask db migrate +``` +This creates migration based on current model. + +## Testing a migration + +Run scripts/setup_databases.sh manually. (This is run on each launch of the container) + +``` +cd /machinaris/api +FLASK_APP=__init__.py flask db upgrade +``` + +This applies migrations against old db + +## Initial Setup of Flask-migrate + +Note, initial adoption of flask-migrate happened in June, 2021 and should not need to be repeated. + +To create very first migration, point to empty sqlite db, by putting these default_settings.py + +``` +SQLALCHEMY_DATABASE_URI = 'sqlite:///' +SQLALCHEMY_BINDS = { + 'stats': 'sqlite:///', + 'chiadog': 'sqlite:///', +} +``` +then: +``` +cd /code/machinaris/api +FLASK_APP=__init__.py flask db init --multidb +FLASK_APP=__init__.py flask db migrate +``` diff --git a/api/views/ping/resources.py b/api/views/ping/resources.py index 73845e0e..b90b7d12 100644 --- a/api/views/ping/resources.py +++ b/api/views/ping/resources.py @@ -22,7 +22,7 @@ class Logs(MethodView): def get(self): response = make_response( """Pong! - """, 200) +""", 200) response.mimetype = "plain/text" return response diff --git a/common/utils/converters.py b/common/utils/converters.py index 6e9ce780..dc953b06 100644 --- a/common/utils/converters.py +++ b/common/utils/converters.py @@ -32,7 +32,17 @@ def str_to_gibs(str): logging.info(traceback.format_exc()) return None -# Convert expected time to win back to minutes. See https://github.com/Chia-Network/chia-blockchain/blob/9e21716965f6f6250f6fe4b3449a66f20794d3d9/chia/util/misc.py#L18 + + + + +################################################################################################## +# +# Chia™-blockchain - Apache Software License code below. +# For full license see: https://github.com/Chia-Network/chia-blockchain/blob/main/LICENSE +# +# Convert expected time to win back to minutes. +# See https://github.com/Chia-Network/chia-blockchain/blob/9e21716965f6f6250f6fe4b3449a66f20794d3d9/chia/util/misc.py#L18 def etw_to_minutes(etw): logging.info("ETW='{0}'".format(etw)) etw_total_minutes = 0 @@ -59,4 +69,43 @@ def etw_to_minutes(etw): match = re.search("(\d+) minute", etw) if match: etw_total_minutes += int(match.group(1), etw) - return etw_total_minutes \ No newline at end of file + return etw_total_minutes + +# Convert an expected time to win in minutes into human-readable units. +# https://github.com/Chia-Network/chia-blockchain/blob/9e21716965f6f6250f6fe4b3449a66f20794d3d9/chia/util/misc.py#L18 +def format_minutes(minutes: int) -> str: + if not isinstance(minutes, int): + return "Invalid" + if minutes == 0: + return "Now" + hour_minutes = 60 + day_minutes = 24 * hour_minutes + week_minutes = 7 * day_minutes + months_minutes = 43800 + year_minutes = 12 * months_minutes + years = int(minutes / year_minutes) + months = int(minutes / months_minutes) + weeks = int(minutes / week_minutes) + days = int(minutes / day_minutes) + hours = int(minutes / hour_minutes) + def format_unit_string(str_unit: str, count: int) -> str: + return f"{count} {str_unit}{('s' if count > 1 else '')}" + def format_unit(unit: str, count: int, unit_minutes: int, next_unit: str, next_unit_minutes: int) -> str: + formatted = format_unit_string(unit, count) + minutes_left = minutes % unit_minutes + if minutes_left >= next_unit_minutes: + formatted += " and " + format_unit_string(next_unit, int(minutes_left / next_unit_minutes)) + return formatted + if years > 0: + return format_unit("year", years, year_minutes, "month", months_minutes) + if months > 0: + return format_unit("month", months, months_minutes, "week", week_minutes) + if weeks > 0: + return format_unit("week", weeks, week_minutes, "day", day_minutes) + if days > 0: + return format_unit("day", days, day_minutes, "hour", hour_minutes) + if hours > 0: + return format_unit("hour", hours, hour_minutes, "minute", 1) + if minutes > 0: + return format_unit_string("minute", minutes) + return "Unknown" diff --git a/web/models/chia.py b/web/models/chia.py index 992f3fad..c55649b3 100644 --- a/web/models/chia.py +++ b/web/models/chia.py @@ -19,17 +19,22 @@ def __init__(self, farms): self.netspace_size = 0 self.netspace_display_size = "?" self.expected_time_to_win = "Unknown" + fullnode_plots_size = 0 for farm in farms: self.plot_count += farm.plot_count self.plots_size += farm.plots_size if farm.mode == "fullnode": self.total_chia = farm.total_chia + fullnode_plots_size = farm.plots_size self.netspace_display_size = converters.gib_to_fmt(farm.netspace_size) self.netspace_size = farm.netspace_size self.status = farm.status self.expected_time_to_win = farm.expected_time_to_win + self.plots_display_size = converters.gib_to_fmt(self.plots_size) self.calc_status(self.status) + if fullnode_plots_size != self.plots_size: # Calculate for full farm including harvesters + self.calc_entire_farm_etw(fullnode_plots_size, self.expected_time_to_win, self.plots_size) def calc_status(self, status): self.status = status @@ -38,6 +43,19 @@ def calc_status(self, status): else: self.display_status = self.status + def calc_entire_farm_etw(self, fullnode_plots_size, expected_time_to_win, total_farm_plots_size): + fullnode_etw_mins = converters.etw_to_minutes(expected_time_to_win) + #app.logger.info("Fullnode Size: {0}".format(fullnode_plots_size)) + #app.logger.info("Total Farm Size: {0}".format(total_farm_plots_size)) + #app.logger.info("Fullnode ETW Minutes: {0}".format(fullnode_etw_mins)) + try: + total_farm_etw_mins = (fullnode_plots_size / total_farm_plots_size) * fullnode_etw_mins + #app.logger.info("Total Farm ETW Minutes: {0}".format(total_farm_etw_mins)) + self.expected_time_to_win = converters.format_minutes(int(total_farm_etw_mins)) + except: + app.logger.debug("Failed to calculate ETW for entire farm due to: {0}".format(traceback.format_exc())) + self.expected_time_to_win = "Unknown" + class FarmPlots: def __init__(self, plots): From c1c3b620f66b65e21bf5aeddfa6904b078d961eb Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 27 Jun 2021 13:58:37 -0600 Subject: [PATCH 0002/1625] Initial support for Flax. --- .github/workflows/develop.yaml | 1 + config/plotman.sample.yaml | 2 +- dockerfile | 40 +++++----------- entrypoint.sh | 86 +++------------------------------- scripts/chia_install.sh | 11 +++++ scripts/chia_launch.sh | 59 +++++++++++++++++++++++ scripts/flax_install.sh | 13 +++++ scripts/flax_launch.sh | 56 ++++++++++++++++++++++ scripts/start_machinaris.sh | 24 ++++++++-- 9 files changed, 179 insertions(+), 113 deletions(-) create mode 100644 scripts/chia_install.sh create mode 100644 scripts/chia_launch.sh create mode 100644 scripts/flax_install.sh create mode 100644 scripts/flax_launch.sh diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index 7c0b07ad..c5cfd94b 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -41,6 +41,7 @@ jobs: build-args: | "CHIA_BRANCH=1.1.7" "PATCH_CHIAPOS=true" + "FLAX_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop diff --git a/config/plotman.sample.yaml b/config/plotman.sample.yaml index cff4a134..7a7e9f9b 100644 --- a/config/plotman.sample.yaml +++ b/config/plotman.sample.yaml @@ -110,5 +110,5 @@ plotting: # The madmax plotter: https://github.com/madMAx43v3r/chia-plotter madmax: - n_threads: 4 # Default is 4, crank up if you have many cores + n_threads: 4 # Default is 4, SLOWLY crank up if you have many cores n_buckets: 256 # Default is 256 diff --git a/dockerfile b/dockerfile index 983596f3..c6d9006f 100644 --- a/dockerfile +++ b/dockerfile @@ -53,6 +53,7 @@ FROM package_stage # Base install of official Chia binaries at the given branch ARG CHIA_BRANCH ARG PATCH_CHIAPOS +ARG FLAX_BRANCH # copy local files COPY . /machinaris/ @@ -60,30 +61,15 @@ COPY . /machinaris/ # set workdir WORKDIR /chia-blockchain -# install Chia using official Chia Blockchain binaries +# Install Chia, Plotman, Chiadog, Madmax, Flax, Machinaris, etc RUN \ - git clone --branch ${CHIA_BRANCH} --single-branch https://github.com/Chia-Network/chia-blockchain.git /chia-blockchain \ - && git submodule update --init mozilla-ca \ - && chmod +x install.sh \ - && /usr/bin/sh ./install.sh \ - \ -# cleanup apt and pip caches - \ - && rm -rf \ - /root/.cache \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* -# install additional tools such as Plotman, Chiadog, and Machinaris -RUN \ - /usr/bin/bash /machinaris/scripts/patch_chiapos.sh ${PATCH_CHIAPOS} \ - && . /machinaris/scripts/chiadog_install.sh \ - && . /machinaris/scripts/plotman_install.sh \ - && . /machinaris/scripts/madmax_install.sh \ - && . /machinaris/scripts/machinaris_install.sh \ - \ -# cleanup apt and pip caches - \ + /usr/bin/bash /machinaris/scripts/chia_install.sh ${CHIA_BRANCH} \ + && /usr/bin/bash /machinaris/scripts/patch_chiapos.sh ${PATCH_CHIAPOS} \ + && /usr/bin/bash /machinaris/scripts/chiadog_install.sh \ + && /usr/bin/bash /machinaris/scripts/plotman_install.sh \ + && /usr/bin/bash /machinaris/scripts/madmax_install.sh \ + && /usr/bin/bash /machinaris/scripts/machinaris_install.sh \ + && /usr/bin/bash /machinaris/scripts/flax_install.sh ${FLAX_BRANCH} \ && rm -rf \ /root/.cache \ /tmp/* \ @@ -96,14 +82,14 @@ 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" -# If mode=plotter, optional 2 public keys will be set in your plotman.yaml +# Default is only the 'chia' blockchain, but can add 'flax' too. A comma-separated list +ENV blockchains=chia +# If provided then these optional 2 public keys will be set in your plotman.yaml ENV farmer_pk="null" ENV pool_pk="null" # If mode=harvester, required for host and port the harvester will your farmer ENV farmer_address="null" ENV farmer_port="8447" -# Only set true if using Chia's old test for testing only, default uses mainnet -ENV testnet="false" # Can override the location of default settings for api and web servers. ENV API_SETTINGS_FILE='/root/.chia/machinaris/config/api.cfg' ENV WEB_SETTINGS_FILE='/root/.chia/machinaris/config/web.cfg' @@ -112,7 +98,7 @@ ENV controller_host="localhost" ENV controller_web_port=8926 ENV controller_api_port=8927 -ENV PATH="${PATH}:/chia-blockchain/venv/bin" +ENV PATH="${PATH}:/chia-blockchain/venv/bin:/flax-blockchain/venv/bin" ENV TZ=Etc/UTC ENV FLASK_ENV=production ENV FLASK_APP=/machinaris/main.py diff --git a/entrypoint.sh b/entrypoint.sh index dada9655..aeb2c185 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,90 +1,16 @@ # -# Configure and launch services for farming, harvesting, and plotting -# Original: https://github.com/Chia-Network/chia-docker/blob/main/entrypoint.sh -# - Improved key generation via webui when no keys found -# - Add plotter-only mode for systems to just run Plotman -# - Start Chiadog log monitoring process -# - Launch the Machinaris web and api servers in the background +# Configure and start plotting and farming services. # -cd /chia-blockchain +# Always launch Chia - required blockchain +/usr/bin/bash /machinaris/scripts/chia_launch.sh -. ./activate - -mkdir -p /root/.chia/mainnet/log -chia init >> /root/.chia/mainnet/log/init.log 2>&1 - -# Loop over provided list of key paths -for k in ${keys//:/ }; do - if [ -f ${k} ]; then - echo "Adding key at path: ${k}" - chia keys add -f ${k} > /dev/null - else - echo "Skipping 'chia keys add' as no file found at: ${k}" - fi -done - -# Loop over provided list of completed plot directories -for p in ${plots_dir//:/ }; do - chia plots add -d ${p} -done - -# import ssh key if exists -if [ -f "/id_rsa" ]; then - echo "/id_rsa exists, trying to import private ssh key" - mkdir -p ~/.ssh/ - cp -f /id_rsa ~/.ssh/id_rsa - #ssh-keygen -y -f ~/.ssh/id_rsa> ~/.ssh/id_rsa.pub || true - cat > ~/.ssh/config <<'_EOF' - Host * - StrictHostKeyChecking no -_EOF - chmod 700 ~/.ssh - chmod 600 ~/.ssh/* -fi - -sed -i 's/localhost/127.0.0.1/g' ~/.chia/mainnet/config/config.yaml - -# Start services based on mode selected. Default is 'fullnode' -if [[ ${mode} == 'fullnode' ]]; then - chia start farmer -elif [[ ${mode} =~ ^farmer.* ]]; then - chia start farmer-only -elif [[ ${mode} =~ ^harvester.* ]]; then - if [[ -z ${farmer_address} || -z ${farmer_port} ]]; then - echo "A farmer peer address and port are required." - exit - else - if [ -d /root/.chia/farmer_ca ]; then - chia init -c /root/.chia/farmer_ca 2>&1 > /root/.chia/mainnet/log/init.log - else - echo "Did not find your farmer's ca folder at /root/.chia/farmer_ca." - echo "See: https://github.com/guydavis/machinaris/wiki/Generic#harvester-only" - fi - chia configure --set-farmer-peer ${farmer_address}:${farmer_port} - chia configure --enable-upnp false - chia start harvester -r - fi -elif [[ ${mode} == 'plotter' ]]; then - echo "Starting in Plotter-only mode. Run Plotman from either CLI or WebUI." -fi - -# Optionally use testnet instead of mainnet -if [[ ${testnet} == "true" ]]; then - if [[ -z $full_node_port || $full_node_port == "null" ]]; then - chia configure --set-fullnode-port 58444 - fi -fi - -if [ ! -f /root/.chia/plotman/plotman.yaml ]; then - AUTO_PLOT="false" +# Optionally launch forked blockchains for multi-farming +if [[ ${blockchains} =~ ^flax.* ]]; then + /usr/bin/bash /machinaris/scripts/flax_launch.sh fi # Launch Machinaris web server and other services /machinaris/scripts/start_machinaris.sh -if [ ${AUTO_PLOT,,} = "true" ]; then - plotman plot -fi - while true; do sleep 30; done; diff --git a/scripts/chia_install.sh b/scripts/chia_install.sh new file mode 100644 index 00000000..ef0832d5 --- /dev/null +++ b/scripts/chia_install.sh @@ -0,0 +1,11 @@ +#!/bin/env bash +# +# Installs Chia as per https://github.com/Chia-Network/chia-blockchain/wiki/INSTALL#ubuntudebian +# + +CHIA_BRANCH=$1 + +git clone --branch ${CHIA_BRANCH} --single-branch https://github.com/Chia-Network/chia-blockchain.git /chia-blockchain \ + && git submodule update --init mozilla-ca \ + && chmod +x install.sh \ + && /usr/bin/sh ./install.sh diff --git a/scripts/chia_launch.sh b/scripts/chia_launch.sh new file mode 100644 index 00000000..1e9d74f7 --- /dev/null +++ b/scripts/chia_launch.sh @@ -0,0 +1,59 @@ +#!/bin/env bash +# +# Initialize Chia service, depending on mode of system requested +# + + +cd /chia-blockchain + +. ./activate + +mkdir -p /root/.chia/mainnet/log +chia init >> /root/.chia/mainnet/log/init.log 2>&1 + +echo 'Configuring Chia...' +sed -i 's/log_stdout: true/log_stdout: false/g' /root/.chia/mainnet/config/config.yaml +sed -i 's/log_level: WARNING/log_level: INFO/g' /root/.chia/mainnet/config/config.yaml + +# Loop over provided list of key paths +for k in ${keys//:/ }; do + if [ -f ${k} ]; then + echo "Adding key at path: ${k}" + chia keys add -f ${k} > /dev/null + else + echo "Skipping 'chia keys add' as no file found at: ${k}" + fi +done + +# Loop over provided list of completed plot directories +for p in ${plots_dir//:/ }; do + chia plots add -d ${p} +done + + + +sed -i 's/localhost/127.0.0.1/g' ~/.chia/mainnet/config/config.yaml + +# Start services based on mode selected. Default is 'fullnode' +if [[ ${mode} == 'fullnode' ]]; then + chia start farmer +elif [[ ${mode} =~ ^farmer.* ]]; then + chia start farmer-only +elif [[ ${mode} =~ ^harvester.* ]]; then + if [[ -z ${farmer_address} || -z ${farmer_port} ]]; then + echo "A farmer peer address and port are required." + exit + else + if [ -d /root/.chia/farmer_ca ]; then + chia init -c /root/.chia/farmer_ca 2>&1 > /root/.chia/mainnet/log/init.log + else + echo "Did not find your farmer's ca folder at /root/.chia/farmer_ca." + echo "See: https://github.com/guydavis/machinaris/wiki/Workers#harvester" + fi + chia configure --set-farmer-peer ${farmer_address}:${farmer_port} + chia configure --enable-upnp false + chia 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/flax_install.sh b/scripts/flax_install.sh new file mode 100644 index 00000000..6963b0c0 --- /dev/null +++ b/scripts/flax_install.sh @@ -0,0 +1,13 @@ +#!/bin/env bash +# +# Installs Flax as per https://github.com/Flax-Network/flax-blockchain +# + +FLAX_BRANCH=$1 + +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 submodule update --init mozilla-ca \ + && chmod +x install.sh \ + && /usr/bin/sh ./install.sh diff --git a/scripts/flax_launch.sh b/scripts/flax_launch.sh new file mode 100644 index 00000000..7661dfe6 --- /dev/null +++ b/scripts/flax_launch.sh @@ -0,0 +1,56 @@ +#!/bin/env bash +# +# Initialize Flax service, depending on mode of system requested +# + +cd /flax-blockchain + +. ./activate + +mkdir -p /root/.flax/mainnet/log +flax init >> /root/.flax/mainnet/log/init.log 2>&1 + +echo 'Configuring Flax...' +sed -i 's/log_stdout: true/log_stdout: false/g' /root/.flax/mainnet/config/config.yaml +sed -i 's/log_level: WARNING/log_level: INFO/g' /root/.flax/mainnet/config/config.yaml + +# Loop over provided list of key paths +for k in ${keys//:/ }; do + if [ -f ${k} ]; then + echo "Adding key at path: ${k}" + flax keys add -f ${k} > /dev/null + else + echo "Skipping 'flax keys add' as no file found at: ${k}" + fi +done + +# Loop over provided list of completed plot directories +for p in ${plots_dir//:/ }; do + flax plots add -d ${p} +done + +sed -i 's/localhost/127.0.0.1/g' ~/.flax/mainnet/config/config.yaml + +# Start services based on mode selected. Default is 'fullnode' +if [[ ${mode} == 'fullnode' ]]; then + flax start farmer +elif [[ ${mode} =~ ^farmer.* ]]; then + flax start farmer-only +elif [[ ${mode} =~ ^harvester.* ]]; then + if [[ -z ${farmer_address} || -z ${farmer_port} ]]; then + echo "A farmer peer address and port are required." + exit + else + if [ -d /root/.flax/farmer_ca ]; then + flax init -c /root/.flax/farmer_ca 2>&1 > /root/.flax/mainnet/log/init.log + else + echo "Did not find your farmer's ca folder at /root/.flax/farmer_ca." + echo "See: https://github.com/guydavis/machinaris/wiki/Workers#harvester" + fi + flax configure --set-farmer-peer ${farmer_address}:${farmer_port} + flax configure --enable-upnp false + flax 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/start_machinaris.sh b/scripts/start_machinaris.sh index 700957ef..05f912bc 100644 --- a/scripts/start_machinaris.sh +++ b/scripts/start_machinaris.sh @@ -3,10 +3,6 @@ # Configures Chia and Plotman, then launches Machinaris web server # -echo 'Configuring Chia...' -sed -i 's/log_stdout: true/log_stdout: false/g' /root/.chia/mainnet/config/config.yaml -sed -i 's/log_level: WARNING/log_level: INFO/g' /root/.chia/mainnet/config/config.yaml - echo 'Configuring Plotman...' mkdir -p /root/.chia/plotman/logs # Check for existing, old versions of plotman.yaml and migrate them, else use default @@ -17,13 +13,28 @@ fi if [ ${pool_pk} != 'null' ]; then sed -i "s/^.*pool_pk:.*$/ pool_pk: ${pool_pk}/g" /root/.chia/plotman/plotman.yaml fi +# Import ssh key if exists +if [ -f "/id_rsa" ]; then + echo "/id_rsa exists, trying to import private ssh key" + mkdir -p ~/.ssh/ + cp -f /id_rsa ~/.ssh/id_rsa + cat > ~/.ssh/config <<'_EOF' + Host * + StrictHostKeyChecking no +_EOF + chmod 700 ~/.ssh + chmod 600 ~/.ssh/* +fi +# Start plotting automatically if requested (not the default) +if [ ${AUTO_PLOT,,} = "true" ]; then + nohup plotman plot < /dev/tty >> /root/.chia/plotman/logs/plotman.log 2>&1 & +fi if [ "${mode}" != "plotter" ]; then echo 'Configuring Chiadog...' mkdir -p /root/.chia/chiadog/logs cp -n /machinaris/config/chiadog.sample.yaml /root/.chia/chiadog/config.yaml cp -f /machinaris/scripts/chiadog_notifier.sh /root/.chia/chiadog/notifier.sh && chmod 755 /root/.chia/chiadog/notifier.sh - . /machinaris/scripts/setup_databases.sh echo 'Starting Chiadog...' cd /chiadog @@ -34,6 +45,9 @@ if [ "${mode}" != "plotter" ]; then /chia-blockchain/venv/bin/python3 -u main.py --config /root/.chia/chiadog/config.yaml > /root/.chia/chiadog/logs/chiadog.log 2>&1 & fi +# Even standalone plotting mode needs database setup +. /machinaris/scripts/setup_databases.sh + mkdir -p /root/.chia/machinaris/config mkdir -p /root/.chia/machinaris/logs cd /machinaris From 0d1f029051273e4803cbbe321decd72a0951607f Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 27 Jun 2021 21:50:09 -0600 Subject: [PATCH 0003/1625] More for Flax support. --- api/commands/chia_cli.py | 72 ++++++++++------ api/commands/chiadog_cli.py | 20 ++--- api/migrations/versions/cc75568c1716_.py | 100 +++++++++++++++++++++++ api/models/chiadog.py | 1 + api/schedules/stats_farm.py | 39 ++++++--- api/schedules/status_alerts.py | 25 +++--- api/schedules/status_farm.py | 7 +- api/views/challenges/resources.py | 16 ++-- common/config/globals.py | 2 + common/models/alerts.py | 1 + common/models/blockchains.py | 1 + common/models/challenges.py | 1 + common/models/connections.py | 1 + common/models/farms.py | 7 +- common/models/stats.py | 3 + common/models/wallets.py | 1 + common/models/workers.py | 3 + dockerfile | 1 + scripts/flaxdog_install.sh | 22 +++++ scripts/flaxdog_notifier.sh | 13 +++ web/models/chia.py | 2 +- web/templates/index.html | 66 +++++++++++---- 22 files changed, 319 insertions(+), 85 deletions(-) create mode 100644 api/migrations/versions/cc75568c1716_.py create mode 100644 scripts/flaxdog_install.sh create mode 100644 scripts/flaxdog_notifier.sh diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index f2220cdb..f6e0b773 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -24,13 +24,22 @@ from api.models import chia CHIA_BINARY = '/chia-blockchain/venv/bin/chia' +FLAX_BINARY = '/flax-blockchain/venv/bin/flax' # When reading tail of chia plots check output, limit to this many lines MAX_LOG_LINES = 2000 -def load_farm_summary(): +def get_binary(blockchain): + if blockchain == "chia": + return CHIA_BINARY + if blockchain == "flax": + return FLAX_BINARY + raise Exception("Invalid blockchain: ".format(blockchain)) + +def load_farm_summary(blockchain='chia'): + chia_binary = get_binary(blockchain) if globals.farming_enabled(): # Load from chia farm summary - proc = Popen("{0} farm summary".format(CHIA_BINARY), stdout=PIPE, stderr=PIPE, shell=True) + proc = Popen("{0} farm summary".format(chia_binary), stdout=PIPE, stderr=PIPE, shell=True) try: outs, errs = proc.communicate(timeout=90) except TimeoutExpired: @@ -61,16 +70,16 @@ def load_plots_farming(): plots_farming = chia.FarmPlots(all_entries) return plots_farming -def load_config(): - return open('/root/.chia/mainnet/config/config.yaml','r').read() +def load_config(blockchain='chia'): + return open('/root/.{0}/mainnet/config/config.yaml'.format(blockchain),'r').read() -def save_config(config): +def save_config(config, blockchain='chia'): try: # Validate the YAML first yaml.safe_load(config) # Save a copy of the old config file - src="/root/.chia/mainnet/config/config.yaml" - dst="/root/.chia/mainnet/config/config."+time.strftime("%Y%m%d-%H%M%S")+".yaml" + src="/root/.{0}/mainnet/config/config.yaml".format(blockchain) + dst="/root/.{0}/mainnet/config/config.".format(blockchain) + time.strftime("%Y%m%d-%H%M%S")+".yaml" shutil.copy(src,dst) # Now save the new contents to main config file with open(src, 'w') as writer: @@ -79,12 +88,13 @@ def save_config(config): app.logger.info(traceback.format_exc()) raise Exception('Updated config.yaml failed validation!\n' + str(ex)) else: - # TODO restart chia services + # TODO restart chia or flax services pass -def load_wallet_show(): +def load_wallet_show(blockchain='chia'): + chia_binary = get_binary(blockchain) wallet_show = "" - child = pexpect.spawn("{0} wallet show".format(CHIA_BINARY)) + child = pexpect.spawn("{0} wallet show".format(chia_binary)) wallet_index = 1 while True: i = child.expect(["Wallet height:.*\r\n", "Choose wallet key:.*\r\n", "No online backup file found.*\r\n"]) @@ -103,8 +113,9 @@ def load_wallet_show(): wallet_show += "ERROR:\n" + child.after.decode("utf-8") + child.before.decode("utf-8") + child.read().decode("utf-8") return chia.Wallet(wallet_show) -def load_blockchain_show(): - proc = Popen("{0} show --state".format(CHIA_BINARY), stdout=PIPE, stderr=PIPE, shell=True) +def load_blockchain_show(blockchain='chia'): + chia_binary = get_binary(blockchain) + proc = Popen("{0} show --state".format(chia_binary), stdout=PIPE, stderr=PIPE, shell=True) try: outs, errs = proc.communicate(timeout=90) except TimeoutExpired: @@ -115,8 +126,9 @@ def load_blockchain_show(): abort(500, description=errs.decode('utf-8')) return chia.Blockchain(outs.decode('utf-8').splitlines()) -def load_connections_show(): - proc = Popen("{0} show --connections".format(CHIA_BINARY), stdout=PIPE, stderr=PIPE, shell=True) +def load_connections_show(blockchain='chia'): + chia_binary = get_binary(blockchain) + proc = Popen("{0} show --connections".format(chia_binary), stdout=PIPE, stderr=PIPE, shell=True) try: outs, errs = proc.communicate(timeout=90) except TimeoutExpired: @@ -127,14 +139,15 @@ def load_connections_show(): abort(500, description=errs.decode('utf-8')) return chia.Connections(outs.decode('utf-8').splitlines()) -def add_connection(connection): +def add_connection(connection, blockchain='chia'): + chia_binary = get_binary(blockchain) try: hostname,port = connection.split(':') if socket.gethostbyname(hostname) == hostname: app.logger.debug('{} is a valid IP address'.format(hostname)) elif socket.gethostbyname(hostname) != hostname: app.logger.debug('{} is a valid hostname'.format(hostname)) - proc = Popen("{0} show --add-connection {1}".format(CHIA_BINARY, connection), stdout=PIPE, stderr=PIPE, shell=True) + proc = Popen("{0} show --add-connection {1}".format(chia_binary, connection), stdout=PIPE, stderr=PIPE, shell=True) try: outs, errs = proc.communicate(timeout=90) except TimeoutExpired: @@ -209,7 +222,14 @@ def generate_key(key_path): return False flash('Welcome! A new key has been generated at {0}. Keep it secret! Keep it safe!'.format(key_path), 'success') flash('{0}'.format(" ".join(mnemonic_words)), 'info') - proc = Popen("{0} start farmer".format(CHIA_BINARY), stdout=PIPE, stderr=PIPE, shell=True) + start_farmer('chia') + if globals.flax_enabled(): + # TODO 'flax keys add' the new key + start_farmer('flax') + +def start_farmer(blockchain='chia'): + chia_binary = get_binary(blockchain) + proc = Popen("{0} start farmer".format(chia_binary), stdout=PIPE, stderr=PIPE, shell=True) try: outs, errs = proc.communicate(timeout=90) except TimeoutExpired: @@ -226,9 +246,10 @@ def generate_key(key_path): return False return True -def remove_connection(node_id, ip): +def remove_connection(node_id, ip, blockchain='chia'): + chia_binary = get_binary(blockchain) try: - proc = Popen("{0} show --remove-connection {1}".format(CHIA_BINARY, node_id), stdout=PIPE, stderr=PIPE, shell=True) + proc = Popen("{0} show --remove-connection {1}".format(chia_binary, node_id), stdout=PIPE, stderr=PIPE, shell=True) try: outs, errs = proc.communicate(timeout=90) except TimeoutExpired: @@ -246,27 +267,28 @@ def remove_connection(node_id, ip): app.logger.info("Successfully removed connection to {0}".format(ip)) return True -def is_plots_check_running(): +def is_plots_check_running(blockchain='chia'): for proc in psutil.process_iter(['pid', 'name', 'cmdline']): - if proc.info['name'] == 'chia' and 'plots' in proc.info['cmdline'] and 'check' in proc.info['cmdline']: + if proc.info['name'] == blockchain and 'plots' in proc.info['cmdline'] and 'check' in proc.info['cmdline']: return proc.info['pid'] return None -def check_plots(first_load): +def check_plots(first_load, blockchain='chia'): + chia_binary = get_binary(blockchain) output_file = '/root/.chia/mainnet/log/plots_check.log' if not is_plots_check_running() and first_load == "true": try: log_fd = os.open(output_file, os.O_RDWR | os.O_CREAT) log_fo = os.fdopen(log_fd, "a+") - proc = Popen("{0} plots check".format(CHIA_BINARY), shell=True, + proc = Popen("{0} plots check".format(chia_binary), shell=True, universal_newlines=True, stdout=log_fo, stderr=log_fo) except: app.logger.info(traceback.format_exc()) return 'Failed to start plots check job!' else: - return "Starting chia plots check at " + datetime.datetime.now().strftime("%Y-%m-%d %H:%M") + return "Starting plots check at " + datetime.datetime.now().strftime("%Y-%m-%d %H:%M") else: - class_escape = re.compile(r' chia.plotting.(\w+)(\s+): ') + class_escape = re.compile(r' {0}.plotting.(\w+)(\s+): '.format(blockchain)) ansi_escape = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])') proc = Popen(['tail', '-n', str(MAX_LOG_LINES), output_file], stdout=PIPE) return class_escape.sub('', ansi_escape.sub('', proc.stdout.read().decode("utf-8"))) diff --git a/api/commands/chiadog_cli.py b/api/commands/chiadog_cli.py index b3a1f6d6..629f1f21 100644 --- a/api/commands/chiadog_cli.py +++ b/api/commands/chiadog_cli.py @@ -18,16 +18,16 @@ from api.models import chiadog from api import app -def load_config(): - return open('/root/.chia/chiadog/config.yaml','r').read() +def load_config(blockchain='chia'): + return open('/root/.{0}/chiadog/config.yaml'.format(blockchain),'r').read() -def save_config(config): +def save_config(config, blockchain='chia'): try: # Validate the YAML first yaml.safe_load(config) # Save a copy of the old config file - src="/root/.chia/chiadog/config.yaml" - dst="/root/.chia/chiadog/config.yaml."+time.strftime("%Y%m%d-%H%M%S")+".yaml" + src='/root/.{0}/chiadog/config.yaml'.format(blockchain) + dst='/root/.{0}/chiadog/config.yaml'.format(blockchain)+time.strftime("%Y%m%d-%H%M%S")+".yaml" shutil.copy(src,dst) # Now save the new contents to main config file with open(src, 'w') as writer: @@ -36,13 +36,13 @@ def save_config(config): app.logger.info(traceback.format_exc()) raise Exception('Updated config.yaml failed validation!\n' + str(ex)) else: - if get_chiadog_pid(): - stop_chiadog() - start_chiadog() + if get_chiadog_pid(blockchain): + stop_chiadog(blockchain) + start_chiadog(blockchain) -def get_chiadog_pid(): +def get_chiadog_pid(blockchain='chia'): for proc in psutil.process_iter(['pid', 'name', 'cmdline']): - if proc.info['name'] == 'python3' and '/root/.chia/chiadog/config.yaml' in proc.info['cmdline']: + if proc.info['name'] == 'python3' and '/root/.{0}/chiadog/config.yaml'.format(blockchain) in proc.info['cmdline']: return proc.info['pid'] return None diff --git a/api/migrations/versions/cc75568c1716_.py b/api/migrations/versions/cc75568c1716_.py new file mode 100644 index 00000000..219fa79e --- /dev/null +++ b/api/migrations/versions/cc75568c1716_.py @@ -0,0 +1,100 @@ +"""empty message + +Revision ID: cc75568c1716 +Revises: 63557b49558a +Create Date: 2021-06-27 16:37:07.789526 + +""" +from alembic import op +import sqlalchemy as sa +from sqlalchemy.sql import text + + +# revision identifiers, used by Alembic. +revision = 'cc75568c1716' +down_revision = '63557b49558a' +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! ### + op.add_column('alerts', sa.Column('blockchain', sa.String(length=64), nullable=True)) + op.add_column('blockchains', sa.Column('blockchain', sa.String(length=64), nullable=True)) + op.add_column('challenges', sa.Column('blockchain', sa.String(length=64), nullable=True)) + op.add_column('connections', sa.Column('blockchain', sa.String(length=64), nullable=True)) + op.add_column('farms', sa.Column('total_flax', sa.REAL(), nullable=True)) + op.add_column('farms', sa.Column('flax_netspace_size', sa.REAL(), nullable=True)) + op.add_column('farms', sa.Column('flax_expected_time_to_win', sa.String(length=64), nullable=True)) + op.add_column('wallets', sa.Column('blockchain', sa.String(length=64), nullable=True)) + # ### end Alembic commands ### + + # Update existing rows with default 'chia' blockchain + conn = op.get_bind() + conn.execute(text("update alerts set blockchain = 'chia'",{})) + conn.execute(text("update blockchains set blockchain = 'chia'",{})) + conn.execute(text("update challenges set blockchain = 'chia'",{})) + conn.execute(text("update connections set blockchain = 'chia'",{})) + conn.execute(text("update wallets set blockchain = 'chia'",{})) + + +def downgrade_(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('wallets', 'blockchain') + op.drop_column('farms', 'flax_expected_time_to_win') + op.drop_column('farms', 'flax_netspace_size') + op.drop_column('farms', 'total_flax') + op.drop_column('connections', 'blockchain') + op.drop_column('challenges', 'blockchain') + op.drop_column('blockchains', 'blockchain') + op.drop_column('alerts', 'blockchain') + # ### end Alembic commands ### + + +def upgrade_stats(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('stat_netspace_size', sa.Column('blockchain', sa.String(length=64), nullable=True)) + op.add_column('stat_time_to_win', sa.Column('blockchain', sa.String(length=64), nullable=True)) + op.add_column('stat_total_chia', sa.Column('blockchain', sa.String(length=64), nullable=True)) + # ### end Alembic commands ### + + # Update existing rows with default 'chia' blockchain + conn = op.get_bind() + conn.execute(text("update stat_netspace_size set blockchain = 'chia'",{})) + conn.execute(text("update stat_time_to_win set blockchain = 'chia'",{})) + conn.execute(text("update stat_total_chia set blockchain = 'chia'",{})) + +def downgrade_stats(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('stat_total_chia', 'blockchain') + op.drop_column('stat_time_to_win', 'blockchain') + op.drop_column('stat_netspace_size', 'blockchain') + # ### end Alembic commands ### + + +def upgrade_chiadog(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('notification', sa.Column('blockchain', sa.String(length=64), nullable=True)) + # ### end Alembic commands ### + + # Update existing rows with default 'chia' blockchain + conn = op.get_bind() + conn.execute(text("update notification set blockchain = 'chia'",{})) + + +def downgrade_chiadog(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('notification', 'blockchain') + # ### end Alembic commands ### + diff --git a/api/models/chiadog.py b/api/models/chiadog.py index 237893c0..2391acb8 100644 --- a/api/models/chiadog.py +++ b/api/models/chiadog.py @@ -12,6 +12,7 @@ class Notification(db.Model): __bind_key__ = 'chiadog' id = db.Column(db.Integer, primary_key=True, nullable=False) + blockchain = db.Column(db.String(64), nullable=True) priority = db.Column(db.String(40), nullable=False) service = db.Column(db.String(60), nullable=False) message = db.Column(db.String(255), nullable=False) diff --git a/api/schedules/stats_farm.py b/api/schedules/stats_farm.py index 6f707ffe..effbefd1 100644 --- a/api/schedules/stats_farm.py +++ b/api/schedules/stats_farm.py @@ -38,33 +38,52 @@ def collect(): with app.app_context(): app.logger.debug("Collecting stats about farms.") current_datetime = datetime.datetime.now().strftime("%Y%m%d%H%M") - farm_summary = chia_cli.load_farm_summary() + chia_farm_summary = chia_cli.load_farm_summary('chia') + flax_farm_summary = None + if globals.flax_enabled(): + flax_farm_summary = chia_cli.load_farm_summary('flax') db = get_db() cur = db.cursor() try: cur.execute("INSERT INTO stat_plot_count (value, created_at) VALUES (?,?)", - (farm_summary.plot_count,current_datetime,)) + (chia_farm_summary.plot_count,current_datetime,)) except: app.logger.info(traceback.format_exc()) try: cur.execute("INSERT INTO stat_plots_size (value, created_at) VALUES (?,?)", - (converters.str_to_gibs(farm_summary.plots_size),current_datetime,)) + (converters.str_to_gibs(chia_farm_summary.plots_size),current_datetime,)) except: app.logger.info(traceback.format_exc()) - if farm_summary.status == "Farming": # Only collect if fully synced + if chia_farm_summary.status == "Farming": # Only collect if fully synced try: - cur.execute("INSERT INTO stat_total_chia (value, created_at) VALUES (?,?)", - (farm_summary.total_chia,current_datetime,)) + cur.execute("INSERT INTO stat_total_chia (blockchain, value, created_at) VALUES ('chia',?,?)", + (chia_farm_summary.total_chia,current_datetime,)) except: app.logger.info(traceback.format_exc()) try: - cur.execute("INSERT INTO stat_netspace_size (value, created_at) VALUES (?,?)", - (converters.str_to_gibs(farm_summary.netspace_size),current_datetime,)) + cur.execute("INSERT INTO stat_netspace_size (blockchain, value, created_at) VALUES ('chia',?,?)", + (converters.str_to_gibs(chia_farm_summary.netspace_size),current_datetime,)) except: app.logger.info(traceback.format_exc()) try: - cur.execute("INSERT INTO stat_time_to_win (value, created_at) VALUES (?,?)", - (converters.etw_to_minutes(farm_summary.time_to_win),current_datetime,)) + cur.execute("INSERT INTO stat_time_to_win (blockchain, value, created_at) VALUES ('chia',?,?)", + (converters.etw_to_minutes(chia_farm_summary.time_to_win),current_datetime,)) + except: + app.logger.info(traceback.format_exc()) + if flax_farm_summary and flax_farm_summary.status == "Farming": # Only collect if fully synced + try: + cur.execute("INSERT INTO stat_total_chia (blockchain, value, created_at) VALUES ('flax',?,?)", + (flax_farm_summary.total_chia,current_datetime,)) + except: + app.logger.info(traceback.format_exc()) + try: + cur.execute("INSERT INTO stat_netspace_size (blockchain, value, created_at) VALUES ('flax',?,?)", + (converters.str_to_gibs(flax_farm_summary.netspace_size),current_datetime,)) + except: + app.logger.info(traceback.format_exc()) + try: + cur.execute("INSERT INTO stat_time_to_win (blockchain, value, created_at) VALUES ('flax',?,?)", + (converters.etw_to_minutes(flax_farm_summary.time_to_win),current_datetime,)) except: app.logger.info(traceback.format_exc()) db.commit() diff --git a/api/schedules/status_alerts.py b/api/schedules/status_alerts.py index 8264d9a4..60c416f3 100644 --- a/api/schedules/status_alerts.py +++ b/api/schedules/status_alerts.py @@ -34,17 +34,20 @@ def update(): first_run = False else: # On subsequent schedules, load only last 5 minutes. since = (datetime.datetime.now() - datetime.timedelta(minutes=5)).strftime("%Y-%m-%d %H:%M:%S.000") - alerts = chiadog_cli.get_notifications(since) - payload = [] - for alert in alerts: - payload.append({ - "unique_id": hostname + '_' + alert.created_at.strftime("%Y-%m-%d_%H:%M:%S"), - "hostname": hostname, - "priority": alert.priority, - "service": alert.service, - "message": alert.message, - "created_at": alert.created_at.strftime("%Y-%m-%d %H:%M:%S"), - }) + for blockchain in ['chia', 'flax']: + alerts = chiadog_cli.get_notifications(blockchain, since) + payload = [] + for alert in alerts: + payload.append({ + "unique_id": hostname + '_{0}_'.format(blockchain) + \ + alert.created_at.strftime("%Y-%m-%d_%H:%M:%S"), + "hostname": hostname, + "blockchain": blockchain, + "priority": alert.priority, + "service": alert.service, + "message": alert.message, + "created_at": alert.created_at.strftime("%Y-%m-%d %H:%M:%S"), + }) if len(payload) > 0: utils.send_post('/alerts/', payload, debug=False) except: diff --git a/api/schedules/status_farm.py b/api/schedules/status_farm.py index b2677622..f3c86a95 100644 --- a/api/schedules/status_farm.py +++ b/api/schedules/status_farm.py @@ -21,6 +21,8 @@ def update(): try: hostname = utils.get_hostname() farm_summary = chia_cli.load_farm_summary() + if globals.flax_enabled(): + flax_farm_summary = chia_cli.load_flax_farm_summary() payload = { "hostname": hostname, "mode": os.environ['mode'], @@ -29,7 +31,10 @@ def update(): "plots_size": converters.str_to_gibs(farm_summary.plots_size), "total_chia": 0 if not hasattr(farm_summary, 'total_chia') else farm_summary.total_chia, "netspace_size": 0 if not hasattr(farm_summary, 'netspace_size') else converters.str_to_gibs(farm_summary.netspace_size), - "expected_time_to_win": "" if not hasattr(farm_summary, 'time_to_win') else farm_summary.time_to_win + "expected_time_to_win": "" if not hasattr(farm_summary, 'time_to_win') else farm_summary.time_to_win, + "total_flax": 0 if not hasattr(farm_summary, 'total_flax') else farm_summary.total_flax, + "flax_netspace_size": 0 if not hasattr(farm_summary, 'flax_netspace_size') else converters.str_to_gibs(farm_summary.flax_netspace_size), + "flax_expected_time_to_win": "" if not hasattr(farm_summary, 'time_to_win') else farm_summary.flax_time_to_win, } utils.send_post('/farms/', payload, debug=False) except: diff --git a/api/views/challenges/resources.py b/api/views/challenges/resources.py index 7754d6b1..55f1676b 100644 --- a/api/views/challenges/resources.py +++ b/api/views/challenges/resources.py @@ -35,7 +35,7 @@ def get(self, args): def post(self, new_items): if len(new_items) == 0: return "No challenges provided.", 400 - db.session.query(Challenge).filter(Challenge.hostname==new_items[0]['hostname']).delete() + db.session.query(Challenge).filter(Challenge.hostname==new_items[0]['hostname'], Challenge.blockchain==new_items[0]['blockchain']).delete() items = [] for new_item in new_items: item = Challenge(**new_item) @@ -45,19 +45,19 @@ def post(self, new_items): return items -@blp.route('/') +@blp.route('//') class ChallengeByHostname(MethodView): @blp.etag @blp.response(200, ChallengeSchema) - def get(self, hostname): - return db.session.query(Challenge).filter(Challenge.hostname==hostname) + def get(self, hostname, blockchain): + return db.session.query(Challenge).filter(Challenge.hostname==hostname, Challenge.blockchain==blockchain) @blp.etag @blp.arguments(BatchOfChallengeSchema) @blp.response(200, ChallengeSchema(many=True)) - def put(self, new_items, hostname): - db.session.query(Challenge).filter(Challenge.hostname==hostname).delete() + def put(self, new_items, hostname, blockchain): + db.session.query(Challenge).filter(Challenge.hostname==hostname, Challenge.blockchain==blockchain).delete() items = [] for new_item in new_items: item = Challenge(**new_item) @@ -68,6 +68,6 @@ def put(self, new_items, hostname): @blp.etag @blp.response(204) - def delete(self, hostname): - db.session.query(Challenge).filter(Challenge.hostname==hostname).delete() + def delete(self, hostname, blockchain): + db.session.query(Challenge).filter(Challenge.hostname==hostname, Challenge.blockchain==blockchain).delete() db.session.commit() diff --git a/common/config/globals.py b/common/config/globals.py index f3732909..c8e930e1 100644 --- a/common/config/globals.py +++ b/common/config/globals.py @@ -106,6 +106,8 @@ def harvesting_enabled(): def plotting_enabled(): return "mode" in os.environ and ("plotter" in os.environ['mode'] or "fullnode" == os.environ['mode']) +def flax_enabled(): + return "blockchains" in os.environ and "flax" in os.environ['mode'] def archiving_enabled(): if not plotting_enabled(): diff --git a/common/models/alerts.py b/common/models/alerts.py index c03d4a56..3bc00c60 100644 --- a/common/models/alerts.py +++ b/common/models/alerts.py @@ -11,6 +11,7 @@ class Alert(db.Model): unique_id = sa.Column(sa.String(length=128), primary_key=True) hostname = sa.Column(sa.String(length=255), nullable=False) + blockchain = sa.Column(sa.String(length=64), nullable=True) priority = sa.Column(sa.String(64), nullable=False) service = sa.Column(sa.String(64), nullable=False) message = sa.Column(sa.String, nullable=False) diff --git a/common/models/blockchains.py b/common/models/blockchains.py index 76127b1d..e57f2347 100644 --- a/common/models/blockchains.py +++ b/common/models/blockchains.py @@ -10,6 +10,7 @@ class Blockchain(db.Model): __tablename__ = "blockchains" hostname = sa.Column(sa.String(length=255), primary_key=True) + blockchain = sa.Column(sa.String(length=64), nullable=True) details = sa.Column(sa.String, nullable=False) created_at = sa.Column(sa.DateTime(), server_default=func.now()) updated_at = sa.Column(sa.DateTime(), onupdate=func.now()) diff --git a/common/models/challenges.py b/common/models/challenges.py index e13a32e3..24f9c9a6 100644 --- a/common/models/challenges.py +++ b/common/models/challenges.py @@ -11,6 +11,7 @@ class Challenge(db.Model): unique_id = sa.Column(sa.String(length=64), primary_key=True) hostname = sa.Column(sa.String(length=255), nullable=False) + blockchain = sa.Column(sa.String(length=64), nullable=True) challenge_id = sa.Column(sa.String(length=64), nullable=False) plots_past_filter = sa.Column(sa.String(length=32), nullable=False) proofs_found = sa.Column(sa.Integer, nullable=False) diff --git a/common/models/connections.py b/common/models/connections.py index 26c70e64..ebf50226 100644 --- a/common/models/connections.py +++ b/common/models/connections.py @@ -10,6 +10,7 @@ class Connection(db.Model): __tablename__ = "connections" hostname = sa.Column(sa.String(length=255), primary_key=True) + blockchain = sa.Column(sa.String(length=64), nullable=True) details = sa.Column(sa.String, nullable=False) created_at = sa.Column(sa.DateTime(), server_default=func.now()) updated_at = sa.Column(sa.DateTime(), onupdate=func.now()) diff --git a/common/models/farms.py b/common/models/farms.py index a5bccaf9..05289642 100644 --- a/common/models/farms.py +++ b/common/models/farms.py @@ -14,9 +14,14 @@ class Farm(db.Model): status = sa.Column(sa.String(length=128), nullable=False) plot_count = sa.Column(sa.Integer, nullable=False) plots_size = sa.Column(sa.REAL, nullable=False) # GiB + total_chia = sa.Column(sa.REAL, nullable=False) netspace_size = sa.Column(sa.REAL, nullable=False) # GiB expected_time_to_win = sa.Column(sa.String(length=64), nullable=False) + + total_flax = sa.Column(sa.REAL, nullable=True) + flax_netspace_size = sa.Column(sa.REAL, nullable=True) # GiB + flax_expected_time_to_win = sa.Column(sa.String(length=64), nullable=True) + created_at = sa.Column(sa.DateTime(), server_default=func.now()) updated_at = sa.Column(sa.DateTime(), onupdate=func.now()) - diff --git a/common/models/stats.py b/common/models/stats.py index 703fead4..3b98bfb8 100644 --- a/common/models/stats.py +++ b/common/models/stats.py @@ -27,6 +27,7 @@ class StatTotalChia(db.Model): __tablename__ = "stat_total_chia" id = db.Column(db.Integer, primary_key=True) + blockchain = sa.Column(sa.String(length=64), nullable=True) value = db.Column(db.REAL) created_at = db.Column(db.String()) @@ -35,6 +36,7 @@ class StatNetspaceSize(db.Model): __tablename__ = "stat_netspace_size" id = db.Column(db.Integer, primary_key=True) + blockchain = sa.Column(sa.String(length=64), nullable=True) value = db.Column(db.REAL) created_at = db.Column(db.String()) @@ -43,6 +45,7 @@ class StatTimeToWin(db.Model): __tablename__ = "stat_time_to_win" id = db.Column(db.Integer, primary_key=True) + blockchain = sa.Column(sa.String(length=64), nullable=True) value = db.Column(db.REAL) created_at = db.Column(db.String()) diff --git a/common/models/wallets.py b/common/models/wallets.py index b7dbf241..fcc0983b 100644 --- a/common/models/wallets.py +++ b/common/models/wallets.py @@ -10,6 +10,7 @@ class Wallet(db.Model): __tablename__ = "wallets" hostname = sa.Column(sa.String(length=255), primary_key=True) + blockchain = sa.Column(sa.String(length=64), nullable=True) details = sa.Column(sa.String, nullable=False) created_at = sa.Column(sa.DateTime(), server_default=func.now()) updated_at = sa.Column(sa.DateTime(), onupdate=func.now()) diff --git a/common/models/workers.py b/common/models/workers.py index 4691c79c..bd426f71 100644 --- a/common/models/workers.py +++ b/common/models/workers.py @@ -23,6 +23,9 @@ class Worker(db.Model): def farming_status(self): return j.loads(self.services)['chia_farm_status'] + def flax_farming_status(self): + return j.loads(self.services)['flax_farm_status'] + def plotting_status(self): return j.loads(self.services)['plotman_status'] diff --git a/dockerfile b/dockerfile index c6d9006f..e73e93b1 100644 --- a/dockerfile +++ b/dockerfile @@ -70,6 +70,7 @@ RUN \ && /usr/bin/bash /machinaris/scripts/madmax_install.sh \ && /usr/bin/bash /machinaris/scripts/machinaris_install.sh \ && /usr/bin/bash /machinaris/scripts/flax_install.sh ${FLAX_BRANCH} \ + && /usr/bin/bash /machinaris/scripts/flaxdog_install.sh \ && rm -rf \ /root/.cache \ /tmp/* \ diff --git a/scripts/flaxdog_install.sh b/scripts/flaxdog_install.sh new file mode 100644 index 00000000..9b7c047b --- /dev/null +++ b/scripts/flaxdog_install.sh @@ -0,0 +1,22 @@ +#!/bin/env bash +# +# Installs Flaxdog for log monitoring and alerting +# + +echo 'Installing Flaxdog...' + +cd / + +git clone git@github.com:langhorst/flaxdog.git + +cd /flax-blockchain/ + +# Chia-blockchain needs PyYAML=5.4.1 but Chiadog wants exactly 5.4 +sed -i 's/==5.4/~=5.4/g' /flaxdog/requirements.txt + +# Also, as per Chiadog integrations page, the MQTT integration needs +# https://github.com/martomi/chiadog/blob/main/INTEGRATIONS.md +printf "\npaho-mqtt" >> /flaxdog/requirements.txt + +# Now install Chiadog python dependencies +venv/bin/pip3 install -r /flaxdog/requirements.txt diff --git a/scripts/flaxdog_notifier.sh b/scripts/flaxdog_notifier.sh new file mode 100644 index 00000000..ca7a2140 --- /dev/null +++ b/scripts/flaxdog_notifier.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# +# Record notifications from Chiadog to event files for parsing by Machinaris +# + +event_priority_name="$1" +event_service_name="$2" +event_message="$3" + +cd /root/.chia/chiadog/dbs +sqlite3 chiadog.db < - {% if farming.expected_time_to_win != 'Unknown' %} -
-
-
-

Expected Time to Win: - {{ farming.expected_time_to_win }} -

-
-
-
- {% endif %} -
{% if global_config.plotting_enabled %}
@@ -58,37 +46,79 @@
Farming:
-

{{ farming.plot_count }}

+

{{ farming.plot_count }}

Total Plots
{% if global_config.farming_enabled %}
-

{{ farming.total_chia }}

-
Total Chia Farmed
+

{{ farming.plots_display_size }}

+
Total Plots Size
{% endif %}
+ {% if farming.expected_time_to_win != 'Unknown' %} +
+
+
+

Chia - Expected Time to Win: + {{ farming.expected_time_to_win }} +

+
+
+
+ {% endif %} +
-

{{ farming.plots_display_size }}

-
Total Plots Size
+

{{ farming.total_chia }}

+
Total Chia Farmed
{% if global_config.farming_enabled %}

{{ farming.netspace_display_size }}

-
Estimated Netspace Size
+
Chia Netspace Size
{% endif %}
+ {% if global_config.flax_enabled %} + {% if farming.flax_expected_time_to_win != 'Unknown' %} +
+
+
+

Flax - Expected Time to Win: + {{ farming.flax_expected_time_to_win }} +

+
+
+
+ {% endif %} +
+
+
+

{{ farming.total_flax }}

+
Total Flax Farmed
+
+
+ {% if global_config.farming_enabled %} +
+
+

{{ farming.flax_netspace_display_size }}

+
Flax Netspace Size
+
+
+ {% endif %} +
+ {% endif %} + {% if global_config.farming_enabled %}
- Farming: - {{ farming.plot_count }} plots. - Current expected time to win: {{ farming.expected_time_to_win }} +
+
Farming: {{ farming.plot_count }} plots.
+
Chia ETW: {{ farming.expected_time_to_win }}
+ {% if global_config.flax_enabled %} +
Flax ETW: {{ farming.flax_expected_time_to_win }}
+ {% endif %}
@@ -81,11 +84,20 @@
+ +
+ +
-
-
- -
-
- -
-
+ + @@ -95,11 +90,11 @@ //Call the function when the page loads load_config("{{selected_worker.hostname}}", "{{selected_blockchain}}"); }); - + function downloadConfig() { worker = $("#worker").val() blockchain = $("#blockchain").val() - window.location.href = '/settings/config/' + worker + '_'+ blockchain + 'dog_config.yaml?type=alerts&worker=' + worker + "&blockchain=" + blockchain + window.location.href = '/settings/config/' + worker + '_' + blockchain + 'dog_config.yaml?type=alerts&worker=' + worker + "&blockchain=" + blockchain } {% endblock %} \ No newline at end of file diff --git a/web/templates/settings/farming.html b/web/templates/settings/farming.html index 74ff475a..ffa39437 100644 --- a/web/templates/settings/farming.html +++ b/web/templates/settings/farming.html @@ -40,7 +40,8 @@
@@ -57,15 +58,9 @@ -
-
- -
-
- -
-
+ + @@ -96,7 +91,7 @@ //Call the function when the page loads load_config("{{selected_worker.hostname}}", "{{selected_blockchain}}"); }); - + function downloadConfig() { worker = $("#worker").val() blockchain = $("#blockchain").val() diff --git a/web/templates/settings/plotting.html b/web/templates/settings/plotting.html index 9e8cb795..3ff5bcc2 100644 --- a/web/templates/settings/plotting.html +++ b/web/templates/settings/plotting.html @@ -40,8 +40,8 @@
@@ -50,15 +50,9 @@ -
-
- -
-
- -
-
+ + diff --git a/web/templates/worker_launch.html b/web/templates/worker_launch.html index bfd7ddeb..7cd00aab 100644 --- a/web/templates/worker_launch.html +++ b/web/templates/worker_launch.html @@ -155,18 +155,11 @@ cmd += ' -h ' + document.getElementById("worker_hostname").value + line_end; } else { - errors.push("Missing worker hostname. Please also provide an IP address if the hostname won't resolve on your LAN."); + errors.push("Missing worker hostname. Please provide a short name to identify your worker."); } if (document.getElementById("dns_ip_addr").value) { cmd += ' --dns ' + document.getElementById("dns_ip_addr").value + line_end; } - else { - if (os == 'windows') { - cmd += ' --dns (Get-DnsClientServerAddress -AddressFamily IPv4 | Select-Object -ExpandProperty ServerAddresses)' + line_end; - } else { - //cmd += " --dns $(cat /etc/resolv.conf | grep nameserver | cut -d ' ' -f 2)" + line_end; - } - } cmd += ' -v ' + document.getElementById("appdata").value + ':/root/.chia' + line_end; var cur_vols = $('#volumes').children().length var plots_dir = [] @@ -217,6 +210,9 @@ if (document.getElementById("ip_addr").value) { cmd += ' -e worker_address=' + document.getElementById("ip_addr").value + line_end; } + else { + errors.push("Missing worker IP address. Please provide the IP the conntroller will connect to for commands."); + } cmd += ' -e plots_dir=' + plots_dir.join(':') + line_end; var blockchains = 'chia' if (document.getElementById("blockchain-flax").checked) { @@ -387,7 +383,7 @@

Machinaris Worker - Launch Config

- +
@@ -398,7 +394,7 @@

Machinaris Worker - Launch Config

-
@@ -451,7 +447,7 @@

Machinaris Worker - Launch Config

- +
@@ -463,12 +459,12 @@

Machinaris Worker - Launch Config

- +
- +
From 7ff47a5c86f6554dc4560d08d2a07e19eddec8ca Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 20 Aug 2021 13:16:09 -0600 Subject: [PATCH 0082/1625] Fixes --- api/commands/chia_cli.py | 4 +-- api/gunicorn.conf.py | 18 +++++----- api/models/log.py | 6 +++- web/actions/stats.py | 52 +++++++++++++++++++++++------ web/routes.py | 4 +-- web/templates/farming/workers.html | 38 ++++++++++----------- web/templates/plotting/workers.html | 52 ++++++++++++++++++----------- web/templates/settings/pools.html | 1 + 8 files changed, 112 insertions(+), 63 deletions(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index 9bb52171..9a284619 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -98,7 +98,7 @@ def load_wallet_show(blockchain): child = pexpect.spawn("{0} wallet show".format(chia_binary)) wallet_index = 1 while True: - i = child.expect(["Wallet height:.*\r\n", "Choose wallet key:.*\r\n", "No online backup file found.*\r\n"]) + i = child.expect(["Wallet height:.*\r\n", "Choose wallet key:.*\r\n", "No online backup file found.*\r\n"], timeout=120) 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") @@ -120,7 +120,7 @@ def load_plotnft_show(blockchain): child = pexpect.spawn("{0} plotnft show".format(chia_binary)) wallet_index = 1 while True: - i = child.expect(["Wallet height:.*\r\n", "Choose wallet key:.*\r\n", "No online backup file found.*\r\n"]) + i = child.expect(["Wallet height:.*\r\n", "Choose wallet key:.*\r\n", "No online backup file found.*\r\n"], timeout=120) 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/gunicorn.conf.py b/api/gunicorn.conf.py index 2028b210..11e6536d 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -29,15 +29,15 @@ def on_starting(server): scheduler.add_job(func=status_controller.update, name="controller", trigger='interval', seconds=120, jitter=60) scheduler.add_job(func=status_farm.update, name="farms", trigger='interval', seconds=120, jitter=60) scheduler.add_job(func=status_plotting.update, name="plottings", trigger='interval', seconds=120, jitter=60) - scheduler.add_job(func=status_plots.update, name="plots", trigger='interval', seconds=120, jitter=60) - scheduler.add_job(func=status_wallets.update, name="wallets", trigger='interval', seconds=120, jitter=60) - scheduler.add_job(func=status_plotnfts.update, name="plotnfts", trigger='interval', seconds=120, jitter=60) - scheduler.add_job(func=status_blockchains.update, name="blockchains", trigger='interval', seconds=120, jitter=60) - scheduler.add_job(func=status_connections.update, name="connections", trigger='interval', seconds=120, jitter=60) - scheduler.add_job(func=status_keys.update, name="keys", trigger='interval', seconds=120, jitter=60) - scheduler.add_job(func=status_alerts.update, name="alerts", trigger='interval', seconds=120, jitter=60) - scheduler.add_job(func=status_pools.update, name="pools", trigger='interval', seconds=120, jitter=60) - scheduler.add_job(func=status_partials.update, name="partials", trigger='interval', seconds=120, jitter=60) + scheduler.add_job(func=status_plots.update, name="plots", trigger='interval', seconds=300, jitter=150) + scheduler.add_job(func=status_wallets.update, name="wallets", trigger='interval', seconds=600, jitter=300) + scheduler.add_job(func=status_plotnfts.update, name="plotnfts", trigger='interval', seconds=600, jitter=300) + scheduler.add_job(func=status_blockchains.update, name="blockchains", trigger='interval', seconds=300, jitter=150) + scheduler.add_job(func=status_connections.update, name="connections", trigger='interval', seconds=300, jitter=150) + scheduler.add_job(func=status_keys.update, name="keys", trigger='interval', seconds=600, jitter=300) + scheduler.add_job(func=status_alerts.update, name="alerts", trigger='interval', seconds=300, jitter=150) + scheduler.add_job(func=status_pools.update, name="pools", trigger='interval', seconds=300, jitter=150) + scheduler.add_job(func=status_partials.update, name="partials", trigger='interval', seconds=300, jitter=150) #scheduler.add_job(func=status_points.update, name="points", trigger='interval', seconds=10, jitter=0) app.logger.debug("Starting background scheduler...") diff --git a/api/models/log.py b/api/models/log.py index d0abe622..e581cda8 100644 --- a/api/models/log.py +++ b/api/models/log.py @@ -36,6 +36,7 @@ class Partials: def __init__(self, cli_stdout): self.columns = [ 'challenge_id', 'plots_past_filter', 'proofs_found', 'time_taken', 'created_at'] self.rows = [] + launcher_id = None for line in cli_stdout: try: if "Submitting partial" in line: @@ -43,7 +44,7 @@ def __init__(self, cli_stdout): created_at = line.split()[0].replace('T', ' ') launcher_id = re.search('partial for (\w+) to', line, re.IGNORECASE).group(1) pool_url = re.search('to (.*)$', line, re.IGNORECASE).group(1) - elif "Pool response" in line: + elif "Pool response" in line and launcher_id: pool_response = line[line.index('{'):] self.rows.append({ 'launcher_id': launcher_id, @@ -51,6 +52,9 @@ def __init__(self, cli_stdout): 'pool_response': pool_response, 'created_at': created_at }) + created_at = None + launcher_id = None + pool_url = None except: app.logger.info("Failed to parse partial line: {0}".format(line)) app.logger.info(traceback.format_exc()) diff --git a/web/actions/stats.py b/web/actions/stats.py index f8d342ec..8ae3ac82 100644 --- a/web/actions/stats.py +++ b/web/actions/stats.py @@ -142,7 +142,40 @@ def daily_summaries(since, hostname, blockchain): hostname, blockchain, str(ex))) return result -def load_disk_usage(disk_type): +def load_recent_disk_usage(disk_type): + db = get_stats_db() + cur = db.cursor() + summary_by_worker = {} + value_factor = "" # Leave at GB for plotting disks + if disk_type == "plots": + value_factor = "/1024" # Divide to TB for plots disks + for wk in chia.load_farmers(): + hostname = wk['hostname'] + dates = [] + paths = {} + sql = "select path, value{0}, created_at from stat_{1}_disk_used where hostname = ? order by created_at, path".format(value_factor, disk_type) + used_result = cur.execute(sql, [ wk['hostname'], ]).fetchall() + for used_row in used_result: + if not used_row[2] in dates: + dates.append(used_row[2]) + if not used_row[0] in paths: + paths[used_row[0]] = {} + values = paths[used_row[0]] + values[used_row[2]] = used_row[1] + if len(dates) > 0: + summary_by_worker[hostname] = { "dates": dates, "paths": paths.keys(), } + for path in paths.keys(): + path_values = [] + for date in dates: + if path in paths: + path_values.append(paths[path][date]) + else: + path_values.append('null') + summary_by_worker[hostname][path] = path_values + app.logger.info(summary_by_worker.keys()) + return summary_by_worker + +def load_current_disk_usage(disk_type): db = get_stats_db() cur = db.cursor() summary_by_worker = {} @@ -161,16 +194,13 @@ def load_disk_usage(disk_type): if len(used_result) != len(free_result): app.logger.info("Found mismatched count of disk used/free stats for {0}".format(disk_type)) else: - for i in range(len(used_result)): - paths.append(used_result[i][0]) - used.append(used_result[i][1]) - if used_result[i][0] != free_result[i][0]: - app.logger.info("Found misordered paths for {0} disk used/free stats: {1} and {2}".format(disk_type, used_result[i][0], free_result[i][0])) - continue - if used_result[i][2] != free_result[i][2]: - app.logger.info("Found misordered created_at for {0} disk used/free stats: {1} and {2}".format(disk_type, used_result[i][2], free_result[i][2])) - continue - free.append(free_result[i][1]) + for used_row in used_result: + paths.append(used_row[0]) + used.append(used_row[1]) + for free_row in free_result: + if used_row[0] == free_row[0]: + free.append(free_row[1]) + continue if len(paths): summary_by_worker[hostname] = { "paths": paths, "used": used, "free": free} #app.logger.info(summary_by_worker.keys()) diff --git a/web/routes.py b/web/routes.py index c4f37d06..cc39265d 100644 --- a/web/routes.py +++ b/web/routes.py @@ -96,7 +96,7 @@ def plotting_jobs(): def plotting_workers(): gc = globals.load() plotters = plotman.load_plotters() - disk_usage = stats.load_disk_usage('plotting') + disk_usage = stats.load_recent_disk_usage('plotting') return render_template('plotting/workers.html', plotters=plotters, disk_usage=disk_usage, global_config=gc) @app.route('/farming/plots') @@ -120,7 +120,7 @@ def farming_workers(): gc = globals.load() farmers = chia.load_farmers() daily_summaries = stats.load_daily_farming_summaries() - disk_usage = stats.load_disk_usage('plots') + disk_usage = stats.load_current_disk_usage('plots') return render_template('farming/workers.html', farmers=farmers, daily_summaries=daily_summaries, disk_usage=disk_usage, global_config=gc) diff --git a/web/templates/farming/workers.html b/web/templates/farming/workers.html index bbeca202..b2ad0269 100644 --- a/web/templates/farming/workers.html +++ b/web/templates/farming/workers.html @@ -101,32 +101,32 @@
{{ farmer.hostname }}
type: 'bar', data: { labels: {{ disk_usage[farmer.hostname].paths | safe }}, - datasets: [{ - label: "Disk Space Used (TB)", - data: {{ disk_usage[farmer.hostname].used | safe }}, - backgroundColor: 'rgba(255, 99, 132, 0.2)', - borderColor: 'rgba(255, 99, 132, 1)', + datasets: [{ + label: "Disk Space Used (TB)", + data: {{ disk_usage[farmer.hostname].used | safe }}, + backgroundColor: 'rgba(255, 99, 132, 0.2)', + borderColor: 'rgba(255, 99, 132, 1)', }, - { - label: 'Disk Space Free (TB)', - data: {{ disk_usage[farmer.hostname].free | safe }}, - backgroundColor: 'rgba(54, 162, 235, 0.2)', - borderColor: 'rgba(54, 162, 235, 1)', + { + label: 'Disk Space Free (TB)', + data: {{ disk_usage[farmer.hostname].free | safe }}, + backgroundColor: 'rgba(54, 162, 235, 0.2)', + borderColor: 'rgba(54, 162, 235, 1)', }], }, - borderWidth: 1, + borderWidth: 1, options: { - responsive: true, + responsive: true, scales: { - x: { - stacked: true, - }, - y: { - stacked: true, - beginAtZero: true + x: { + stacked: true, + }, + y: { + stacked: true, + beginAtZero: true + } } } - } }); {% endif %} diff --git a/web/templates/plotting/workers.html b/web/templates/plotting/workers.html index 23868139..31d216fd 100644 --- a/web/templates/plotting/workers.html +++ b/web/templates/plotting/workers.html @@ -56,37 +56,51 @@
{{ plotter.hostname }}
{% endblock %} {% block scripts %} + {% for plotter in plotters %} {% if disk_usage[plotter.hostname] %} + {% endblock %} \ No newline at end of file diff --git a/web/templates/workers.html b/web/templates/workers.html index b7aa3dcd..f5f767c3 100644 --- a/web/templates/workers.html +++ b/web/templates/workers.html @@ -50,9 +50,9 @@ {% if worker.hostname == worker.displayname %} - {{worker.displayname}} + {{worker.displayname}} {% else %} - {{worker.displayname}} {% endif %} {{worker.mode}} From 69c6fdf7913cf66416abb656dc5fa28b0b8ec64f Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 24 Aug 2021 22:02:48 -0600 Subject: [PATCH 0084/1625] Blockchain challenges as chart. --- SECURITY.md | 9 ++++ api/commands/log_parser.py | 4 +- api/gunicorn.conf.py | 2 +- api/schedules/stats_disk.py | 2 +- api/schedules/status_alerts.py | 2 +- api/schedules/status_challenges.py | 15 ++++++ api/views/certificates/resources.py | 2 +- api/views/challenges/resources.py | 18 ++++--- common/utils/converters.py | 6 +++ scripts/chia_launch.sh | 2 + scripts/flax_launch.sh | 2 + web/actions/chia.py | 6 ++- web/actions/stats.py | 7 +-- web/models/chia.py | 26 ++++++++++ web/routes.py | 9 ++-- web/templates/alerts.html | 2 +- web/templates/base.html | 4 ++ web/templates/index.html | 76 ++++++++++++++++++++++++----- web/templates/plotting/workers.html | 46 ++++++++++------- web/templates/views/challenges.html | 38 --------------- web/templates/worker.html | 2 +- 21 files changed, 185 insertions(+), 95 deletions(-) create mode 100644 SECURITY.md delete mode 100644 web/templates/views/challenges.html diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..54630f04 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,9 @@ +# Security Policy + +## Supported Versions + +Machinaris security patches will be made for the [current release](https://github.com/guydavis/machinaris/wiki/Releases#release-streams), aka `:latest`. + +## Reporting a Vulnerability + +Please create a new [Discussion](https://github.com/guydavis/machinaris/discussions) with full details of the vulnerability. I will provide a response asap. Thanks in advance! diff --git a/api/commands/log_parser.py b/api/commands/log_parser.py index c9225b90..7ac15d5f 100644 --- a/api/commands/log_parser.py +++ b/api/commands/log_parser.py @@ -24,8 +24,8 @@ CHIA_LOG = '/root/.chia/mainnet/log/debug.log' FLAX_LOG = '/root/.flax/mainnet/log/debug.log' -# Roughly 1 minutes worth of challenges -CHALLENGES_TO_LOAD = 8 +# Roughly 2 minutes worth of challenges, sent 90 seconds, for overlap +CHALLENGES_TO_LOAD = 16 # Most recent partial proofs, actually double as 2 log lines per partial PARTIALS_TO_LOAD = 50 diff --git a/api/gunicorn.conf.py b/api/gunicorn.conf.py index 11e6536d..715fe2f7 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -24,7 +24,7 @@ def on_starting(server): #scheduler.add_job(func=stats_disk.collect, trigger='interval', seconds=10) # Test immediately # Status gathering - reported via API - scheduler.add_job(func=status_challenges.update, name="challenges", trigger='interval', seconds=5) + scheduler.add_job(func=status_challenges.update, name="challenges", trigger='interval', seconds=90, jitter=45) scheduler.add_job(func=status_worker.update, name="workers", trigger='interval', seconds=120, jitter=60) scheduler.add_job(func=status_controller.update, name="controller", trigger='interval', seconds=120, jitter=60) scheduler.add_job(func=status_farm.update, name="farms", trigger='interval', seconds=120, jitter=60) diff --git a/api/schedules/stats_disk.py b/api/schedules/stats_disk.py index 87848189..7e14155c 100644 --- a/api/schedules/stats_disk.py +++ b/api/schedules/stats_disk.py @@ -20,7 +20,7 @@ TABLES = ['stat_plots_total_used', 'stat_plots_disk_used', 'stat_plots_disk_free', 'stat_plotting_total_used', 'stat_plotting_disk_used', 'stat_plotting_disk_free'] -DELETE_OLD_STATS_AFTER_DAYS = 2 +DELETE_OLD_STATS_AFTER_DAYS = 1 def get_db(): db = getattr(g, '_stats_database', None) diff --git a/api/schedules/status_alerts.py b/api/schedules/status_alerts.py index bc1c4a0f..6d2a1a86 100644 --- a/api/schedules/status_alerts.py +++ b/api/schedules/status_alerts.py @@ -38,7 +38,7 @@ def update(): first_run = False else: # On subsequent schedules, load only last 5 minutes. since = (datetime.datetime.now() - datetime.timedelta(minutes=5)).strftime("%Y-%m-%d %H:%M:%S.000") - alerts = db.session.query(a.Alert).filter(a.Alert.created_at >= since).order_by(a.Alert.created_at.desc()).limit(20).all() + alerts = db.session.query(a.Alert).filter(a.Alert.created_at >= since, a.Alert.hostname == hostname).order_by(a.Alert.created_at.desc()).limit(20).all() payload = [] for alert in alerts: payload.append({ diff --git a/api/schedules/status_challenges.py b/api/schedules/status_challenges.py index 20938449..a74e9cd4 100644 --- a/api/schedules/status_challenges.py +++ b/api/schedules/status_challenges.py @@ -2,6 +2,7 @@ # Performs a REST call to controller (possibly localhost) of latest blockchain challenges. # +import datetime import os import traceback @@ -13,11 +14,25 @@ from api.commands import log_parser from api import utils +def delete_old_challenges(db): + try: + cutoff = datetime.datetime.now() - datetime.timedelta(hours=1) + cur = db.cursor() + cur.execute("DELETE FROM challenges WHERE created_at < {1}".format( + table, cutoff.strftime("%Y%m%d%H%M"))) + db.commit() + except: + app.logger.info("Failed to delete old challenges.") + app.logger.info(traceback.format_exc()) + def update(): if not globals.farming_enabled() and not globals.harvesting_enabled(): #app.logger.info("Skipping recent challenges collection on plotting-only instance.") return with app.app_context(): + from api import db + if globals.load()['is_controller']: + delete_old_challenges(db) try: hostname = utils.get_displayname() blockchains = ['chia'] diff --git a/api/views/certificates/resources.py b/api/views/certificates/resources.py index d6e8ace4..2996fdb4 100644 --- a/api/views/certificates/resources.py +++ b/api/views/certificates/resources.py @@ -49,6 +49,6 @@ def allow_download(self): worker_setup_marker = "/root/.chia/machinaris/tmp/worker_launch.tmp" if os.path.exists(worker_setup_marker): last_modified_date = datetime.datetime.fromtimestamp(os.path.getmtime(worker_setup_marker)) - fifteen_minutes_ago = datetime.datetime.now() - datetime.timedelta(minutes=15) + fifteen_minutes_ago = datetime.datetime.now() - datetime.timedelta(minutes=30) return last_modified_date >= fifteen_minutes_ago return False \ No newline at end of file diff --git a/api/views/challenges/resources.py b/api/views/challenges/resources.py index 094dd8b3..d2d6fa1a 100644 --- a/api/views/challenges/resources.py +++ b/api/views/challenges/resources.py @@ -35,12 +35,13 @@ def get(self, args): def post(self, new_items): if len(new_items) == 0: return "No challenges provided.", 400 - db.session.query(Challenge).filter(Challenge.hostname==new_items[0]['hostname']).delete() items = [] for new_item in new_items: - item = Challenge(**new_item) - items.append(item) - db.session.add(item) + item = Challenge.query.get(new_item['unique_id']) + if not item: # Request contains previously received challenges, only add new + item = Challenge(**new_item) + items.append(item) + db.session.add(item) db.session.commit() return items @@ -57,12 +58,13 @@ def get(self, hostname, blockchain): @blp.arguments(BatchOfChallengeSchema) @blp.response(200, ChallengeSchema(many=True)) def put(self, new_items, hostname, blockchain): - db.session.query(Challenge).filter(Challenge.hostname==hostname, Challenge.blockchain==blockchain).delete() items = [] for new_item in new_items: - item = Challenge(**new_item) - items.append(item) - db.session.add(item) + item = Challenge.query.get(new_item['unique_id']) + if not item: # Request contains previously received challenges, only add new + item = Challenge(**new_item) + items.append(item) + db.session.add(item) db.session.commit() return items diff --git a/common/utils/converters.py b/common/utils/converters.py index 6dcaa046..b8140865 100644 --- a/common/utils/converters.py +++ b/common/utils/converters.py @@ -32,6 +32,12 @@ def str_to_gibs(str): print(traceback.format_exc()) return None +def convert_date_for_luxon(datestr): + year = datestr[:4] + month = datestr[4:6] + day = datestr[6:8] + time = datestr[8:] + return "{0}-{1}-{2}T{3}".format(year, month, day, time) diff --git a/scripts/chia_launch.sh b/scripts/chia_launch.sh index 6295f4e8..972c92de 100644 --- a/scripts/chia_launch.sh +++ b/scripts/chia_launch.sh @@ -51,6 +51,8 @@ elif [[ ${mode} =~ ^harvester.* ]]; then response=$(curl --write-out '%{http_code}' --silent http://${controller_host}:8927/certificates/?type=chia --output /tmp/certs.zip) if [ $response == '200' ]; then unzip /tmp/certs.zip -d /root/.chia/farmer_ca + else + echo "Certificates response of ${response} from http://${controller_host}:8927/certificates/?type=chia. Try clicking 'New Worker' button on 'Workers' page first." fi rm -f /tmp/certs.zip fi diff --git a/scripts/flax_launch.sh b/scripts/flax_launch.sh index 168765c7..2480ad9d 100644 --- a/scripts/flax_launch.sh +++ b/scripts/flax_launch.sh @@ -61,6 +61,8 @@ elif [[ ${mode} =~ ^harvester.* ]]; then response=$(curl --write-out '%{http_code}' --silent http://${controller_host}:8927/certificates/?type=flax --output /tmp/certs.zip) if [ $response == '200' ]; then unzip /tmp/certs.zip -d /root/.flax/farmer_ca + else + echo "Certificates response of ${response} from http://${controller_host}:8927/certificates/?type=flax. Try clicking 'New Worker' button on 'Workers' page first." fi rm -f /tmp/certs.zip fi diff --git a/web/actions/chia.py b/web/actions/chia.py index d5859507..b59cf5ba 100644 --- a/web/actions/chia.py +++ b/web/actions/chia.py @@ -28,7 +28,7 @@ partials as pr from common.config import globals from web.models.chia import FarmSummary, FarmPlots, BlockchainChallenges, Wallets, \ - Blockchains, Connections, Keys, Plotnfts, Pools, Partials + Blockchains, Connections, Keys, Plotnfts, Pools, Partials, ChallengesChartData from . import worker as wk CHIA_BINARY = '/chia-blockchain/venv/bin/chia' @@ -51,6 +51,10 @@ def recent_challenges(): challenges = db.session.query(c.Challenge).filter(c.Challenge.created_at >= five_minutes_ago).order_by(c.Challenge.created_at.desc()).limit(20) return BlockchainChallenges(challenges) +def challenges_chart_data(): + challenges = db.session.query(c.Challenge).order_by(c.Challenge.created_at.desc(), c.Challenge.hostname, c.Challenge.blockchain).all() + return ChallengesChartData(challenges) + def load_partials(): partials = db.session.query(pr.Partial).order_by(pr.Partial.created_at.desc()).limit(10) return Partials(partials) diff --git a/web/actions/stats.py b/web/actions/stats.py index cbbb0236..4ff81672 100644 --- a/web/actions/stats.py +++ b/web/actions/stats.py @@ -156,12 +156,13 @@ def load_recent_disk_usage(disk_type): sql = "select path, value{0}, created_at from stat_{1}_disk_used where hostname = ? order by created_at, path".format(value_factor, disk_type) used_result = cur.execute(sql, [ wk['hostname'], ]).fetchall() for used_row in used_result: - if not used_row[2] in dates: - dates.append(used_row[2]) + converted_date = converters.convert_date_for_luxon(used_row[2]) + if not converted_date in dates: + dates.append(converted_date) if not used_row[0] in paths: paths[used_row[0]] = {} values = paths[used_row[0]] - values[used_row[2]] = used_row[1] + values[converted_date] = used_row[1] if len(dates) > 0: summary_by_worker[hostname] = { "dates": dates, "paths": paths.keys(), } for path in paths.keys(): diff --git a/web/models/chia.py b/web/models/chia.py index b307e887..9698bf10 100644 --- a/web/models/chia.py +++ b/web/models/chia.py @@ -109,6 +109,32 @@ def __init__(self, challenges): 'created_at': challenge.created_at, }) + +class ChallengesChartData: + + def __init__(self, challenges): + self.labels = [] + datasets = {} + for challenge in challenges: + created_at = challenge.created_at.replace(' ', 'T') + if not created_at in self.labels: + self.labels.append(created_at) + host_chain = challenge.hostname + '_' + challenge.blockchain + if not host_chain in datasets: + datasets[host_chain] = {} + dataset = datasets[host_chain] + dataset[created_at] = float(challenge.time_taken.split()[0]) # Drop off the 'secs' + # Now build a sparse array with null otherwise + self.data = {} + for key in datasets.keys(): + self.data[key] = [] + for label in self.labels: + for key in datasets.keys(): + if label in datasets[key]: + self.data[key].append(datasets[key][label]) + else: + self.data[key].append('null') # Javascript null + class Wallets: def __init__(self, wallets): diff --git a/web/routes.py b/web/routes.py index 68a103e4..18676749 100644 --- a/web/routes.py +++ b/web/routes.py @@ -30,16 +30,13 @@ def index(): farming = chia.load_farm_summary() plotting = plotman.load_plotting_summary() challenges = chia.recent_challenges() + challenges_chart_data = chia.challenges_chart_data() partials = chia.load_partials() daily_diff = stats.load_daily_diff() return render_template('index.html', reload_seconds=120, farming=farming.__dict__, \ plotting=plotting.__dict__, challenges=challenges, workers=workers, - daily_diff=daily_diff, partials=partials, global_config=gc) - -@app.route('/views/challenges') -def views_challenges(): - challenges = chia.recent_challenges() - return render_template('views/challenges.html', challenges=challenges) + daily_diff=daily_diff, partials=partials, challenges_chart_data=challenges_chart_data, + global_config=gc) @app.route('/setup', methods=['GET', 'POST']) def setup(): diff --git a/web/templates/alerts.html b/web/templates/alerts.html index 200ecb58..7e57cf69 100644 --- a/web/templates/alerts.html +++ b/web/templates/alerts.html @@ -91,7 +91,7 @@ - {{notification.hostname}} + {{notification.worker}} {{notification.blockchain}} {{notification.service}} {{notification.message}} diff --git a/web/templates/base.html b/web/templates/base.html index b6b6fdf4..c47e9224 100644 --- a/web/templates/base.html +++ b/web/templates/base.html @@ -177,6 +177,10 @@ src="https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap5.js"> + + {% block scripts %}{% endblock %} diff --git a/web/templates/index.html b/web/templates/index.html index e1b77a87..7f2ece67 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -120,7 +120,7 @@
Flax Netspace
{% if global_config.farming_enabled %}
- {% include 'views/challenges.html' %} +
{% endif %} @@ -160,20 +160,70 @@
Flax Netspace
{% block scripts %} {% if global_config.farming_enabled %} {% endif %} diff --git a/web/templates/plotting/workers.html b/web/templates/plotting/workers.html index 31d216fd..c9eda3f0 100644 --- a/web/templates/plotting/workers.html +++ b/web/templates/plotting/workers.html @@ -58,20 +58,20 @@
{{ plotter.hostname }}
{% block scripts %} {% for plotter in plotters %} @@ -81,20 +81,30 @@
{{ plotter.hostname }}
var myChart = new Chart(ctx, { type: 'line', data: { - labels: {{ disk_usage[plotter.hostname].dates|safe }}, + labels: {{ disk_usage[plotter.hostname].dates | safe }}, datasets: [ {% for path in disk_usage[plotter.hostname].paths %} - { - label: "{{path}}", - data: {{ disk_usage[plotter.hostname][path]|safe }}, - backgroundColor: color({{loop.index-1}}), - }, + { + label: "{{path}}", + data: {{ disk_usage[plotter.hostname][path] | safe }}, + backgroundColor: color({{ loop.index - 1 }}), + }, {% endfor %} ], }, borderWidth: 1, options: { scales: { + x: { + type: 'time', + time: { + tooltipFormat: 'DD T' + }, + title: { + display: true, + text: 'Time - Last 24 Hours' + } + }, y: { beginAtZero: true, title: { @@ -104,7 +114,7 @@
{{ plotter.hostname }}
} } } - }); + }); {% endif %} {% endfor %} diff --git a/web/templates/views/challenges.html b/web/templates/views/challenges.html deleted file mode 100644 index 00495354..00000000 --- a/web/templates/views/challenges.html +++ /dev/null @@ -1,38 +0,0 @@ -{% if challenges.rows|length > 0 %} - - - - - - - - - - - - - - {% for challenge in challenges.rows %} - - - - - - - - - - {% endfor %} - -
WorkerBlockchainChallengePlots Passed FilterProofs FoundTime TakenDate
{{challenge.hostname}}{{challenge.blockchain}}{{challenge.challenge_id}}{{challenge.plots_past_filter}}{{challenge.proofs_found}}{{challenge.time_taken}}{{challenge.created_at}}
- - {% else %} - -
-
No recent challenges found in Chia's log on your farmers. Are they configured and running?
-
If you have plots and this persists for long, check the Alerts tab and review Chia's log. - See the FAQ.
-
- {% endif %} \ No newline at end of file diff --git a/web/templates/worker.html b/web/templates/worker.html index 79904274..4aa21f49 100644 --- a/web/templates/worker.html +++ b/web/templates/worker.html @@ -52,7 +52,7 @@ {{worker.updated_at | datetimefilter}} - Time on Worker + Local Time on Worker {{worker.time_on_worker}} From bbe464e2373f6fad535ce1b6e75effaa80a47951 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 24 Aug 2021 22:28:16 -0600 Subject: [PATCH 0085/1625] Fix for challenge deletion --- api/schedules/status_challenges.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/schedules/status_challenges.py b/api/schedules/status_challenges.py index a74e9cd4..16c3296d 100644 --- a/api/schedules/status_challenges.py +++ b/api/schedules/status_challenges.py @@ -8,6 +8,7 @@ from flask import g +from common.models import challenges as c from common.config import globals from common.utils import converters from api import app @@ -17,10 +18,9 @@ def delete_old_challenges(db): try: cutoff = datetime.datetime.now() - datetime.timedelta(hours=1) - cur = db.cursor() - cur.execute("DELETE FROM challenges WHERE created_at < {1}".format( - table, cutoff.strftime("%Y%m%d%H%M"))) - db.commit() + db.session.query(c.Challenge).filter(c.Challenge.created_at < "{0}".format( + cutoff.strftime("%Y%m%d%H%M"))).delete() + db.session.commit() except: app.logger.info("Failed to delete old challenges.") app.logger.info(traceback.format_exc()) From 5555eb1a9d4f9b751176e1ae26ce74a1f3523786 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 24 Aug 2021 22:34:48 -0600 Subject: [PATCH 0086/1625] More cleanup of old challenges code. --- web/actions/chia.py | 10 +++------- web/models/chia.py | 24 ------------------------ web/routes.py | 6 ++---- web/templates/index.html | 2 +- 4 files changed, 6 insertions(+), 36 deletions(-) diff --git a/web/actions/chia.py b/web/actions/chia.py index b59cf5ba..638b3b3f 100644 --- a/web/actions/chia.py +++ b/web/actions/chia.py @@ -27,8 +27,9 @@ blockchains as b, connections as co, keys as k, plotnfts as pn, pools as po, \ partials as pr from common.config import globals -from web.models.chia import FarmSummary, FarmPlots, BlockchainChallenges, Wallets, \ - Blockchains, Connections, Keys, Plotnfts, Pools, Partials, ChallengesChartData +from web.models.chia import FarmSummary, FarmPlots, Wallets, \ + Blockchains, Connections, Keys, Plotnfts, Pools, Partials, \ + ChallengesChartData from . import worker as wk CHIA_BINARY = '/chia-blockchain/venv/bin/chia' @@ -46,11 +47,6 @@ def load_plots_farming(hostname=None): plots = query.all() return FarmPlots(plots) -def recent_challenges(): - five_minutes_ago = (datetime.datetime.now() - datetime.timedelta(minutes=5)).strftime("%Y-%m-%d %H:%M:%S.000") - challenges = db.session.query(c.Challenge).filter(c.Challenge.created_at >= five_minutes_ago).order_by(c.Challenge.created_at.desc()).limit(20) - return BlockchainChallenges(challenges) - def challenges_chart_data(): challenges = db.session.query(c.Challenge).order_by(c.Challenge.created_at.desc(), c.Challenge.hostname, c.Challenge.blockchain).all() return ChallengesChartData(challenges) diff --git a/web/models/chia.py b/web/models/chia.py index 9698bf10..364ced07 100644 --- a/web/models/chia.py +++ b/web/models/chia.py @@ -86,30 +86,6 @@ def __init__(self, plots): 'type': plot.type if plot.type else "" }) -class BlockchainChallenges: - - def __init__(self, challenges): - self.columns = ['hostname', - 'blockchain', - 'challenge_id', - 'plots_past_filter', - 'proofs_found', - 'time_taken', - 'created_at', - ] - self.rows = [] - for challenge in challenges: - self.rows.append({ - 'hostname': challenge.hostname, - 'blockchain': challenge.blockchain, - 'challenge_id': challenge.challenge_id, - 'plots_past_filter': challenge.plots_past_filter, - 'proofs_found': challenge.proofs_found, - 'time_taken': challenge.time_taken, - 'created_at': challenge.created_at, - }) - - class ChallengesChartData: def __init__(self, challenges): diff --git a/web/routes.py b/web/routes.py index 18676749..a0aa4407 100644 --- a/web/routes.py +++ b/web/routes.py @@ -29,14 +29,12 @@ def index(): workers = worker.load_worker_summary() farming = chia.load_farm_summary() plotting = plotman.load_plotting_summary() - challenges = chia.recent_challenges() challenges_chart_data = chia.challenges_chart_data() partials = chia.load_partials() daily_diff = stats.load_daily_diff() return render_template('index.html', reload_seconds=120, farming=farming.__dict__, \ - plotting=plotting.__dict__, challenges=challenges, workers=workers, - daily_diff=daily_diff, partials=partials, challenges_chart_data=challenges_chart_data, - global_config=gc) + plotting=plotting.__dict__, workers=workers, daily_diff=daily_diff, partials=partials, + challenges_chart_data=challenges_chart_data, global_config=gc) @app.route('/setup', methods=['GET', 'POST']) def setup(): diff --git a/web/templates/index.html b/web/templates/index.html index 7f2ece67..009d2582 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -182,7 +182,7 @@
Flax Netspace
var ctx = document.getElementById('challenges_chart'); var myChart = new Chart(ctx, { - type: 'line', + type: 'scatter', data: { labels: {{ challenges_chart_data.labels | safe }}, datasets: [ From 9612e409aa226d5ec385ac02a3527c32f2fb03c1 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 25 Aug 2021 10:33:13 -0600 Subject: [PATCH 0087/1625] Display partials in bar chart. --- api/schedules/status_challenges.py | 7 +-- api/schedules/status_partials.py | 15 ++++++ web/actions/chia.py | 9 ++-- web/models/chia.py | 37 ++++++++------- web/routes.py | 7 +-- web/templates/index.html | 73 ++++++++++++++++-------------- 6 files changed, 88 insertions(+), 60 deletions(-) diff --git a/api/schedules/status_challenges.py b/api/schedules/status_challenges.py index 16c3296d..316be7b8 100644 --- a/api/schedules/status_challenges.py +++ b/api/schedules/status_challenges.py @@ -8,8 +8,8 @@ from flask import g -from common.models import challenges as c from common.config import globals +from common.models import challenges as c from common.utils import converters from api import app from api.commands import log_parser @@ -18,8 +18,9 @@ def delete_old_challenges(db): try: cutoff = datetime.datetime.now() - datetime.timedelta(hours=1) - db.session.query(c.Challenge).filter(c.Challenge.created_at < "{0}".format( - cutoff.strftime("%Y%m%d%H%M"))).delete() + cutoff_str = "{0}".format(cutoff.strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]) + #app.logger.info("Purging old challenges earlier than {0}".format(cutoff_str)) + db.session.query(c.Challenge).filter(c.Challenge.created_at < cutoff_str).delete() db.session.commit() except: app.logger.info("Failed to delete old challenges.") diff --git a/api/schedules/status_partials.py b/api/schedules/status_partials.py index 3bc4b2af..de6a3cf1 100644 --- a/api/schedules/status_partials.py +++ b/api/schedules/status_partials.py @@ -8,17 +8,32 @@ from flask import g from common.config import globals +from common.models import partials as p from common.utils import converters from api import app from api.commands import log_parser from api import utils +def delete_old_partials(db): + try: + cutoff = datetime.datetime.now() - datetime.timedelta(days=1) + cutoff_str = "{0}".format(cutoff.strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]) + #app.logger.info("Purging old partials earlier than {0}".format(cutoff_str)) + db.session.query(p.Partial).filter(p.Partial.created_at < cutoff_str).delete() + db.session.commit() + except: + app.logger.info("Failed to delete old partials.") + app.logger.info(traceback.format_exc()) + def update(): if not globals.farming_enabled() and not globals.harvesting_enabled(): #app.logger.info("Skipping recent partials collection on plotting-only instance.") return with app.app_context(): try: + from api import db + if globals.load()['is_controller']: + delete_old_partials(db) hostname = utils.get_hostname() blockchains = ['chia'] if globals.flax_enabled(): diff --git a/web/actions/chia.py b/web/actions/chia.py index 638b3b3f..4f9135e2 100644 --- a/web/actions/chia.py +++ b/web/actions/chia.py @@ -28,7 +28,7 @@ partials as pr from common.config import globals from web.models.chia import FarmSummary, FarmPlots, Wallets, \ - Blockchains, Connections, Keys, Plotnfts, Pools, Partials, \ + Blockchains, Connections, Keys, Plotnfts, Pools, PartialsChartData, \ ChallengesChartData from . import worker as wk @@ -51,9 +51,10 @@ def challenges_chart_data(): challenges = db.session.query(c.Challenge).order_by(c.Challenge.created_at.desc(), c.Challenge.hostname, c.Challenge.blockchain).all() return ChallengesChartData(challenges) -def load_partials(): - partials = db.session.query(pr.Partial).order_by(pr.Partial.created_at.desc()).limit(10) - return Partials(partials) +def partials_chart_data(): + day_ago = (datetime.datetime.now() - datetime.timedelta(days=1)).strftime("%Y-%m-%d %H:00:00.000") + partials = db.session.query(pr.Partial).filter(pr.Partial.created_at >= day_ago).order_by(pr.Partial.created_at.desc()).limit(10) + return PartialsChartData(partials) def load_wallets(): wallets = db.session.query(w.Wallet).all() diff --git a/web/models/chia.py b/web/models/chia.py index 364ced07..7bccdc38 100644 --- a/web/models/chia.py +++ b/web/models/chia.py @@ -2,7 +2,7 @@ import os import traceback -from datetime import datetime +import datetime from web import app from common.utils import converters @@ -147,20 +147,25 @@ def __init__(self, blockchains): 'details': blockchain.details, 'updated_at': blockchain.updated_at }) -class Partials: +class PartialsChartData: def __init__(self, partials): - self.columns = ['hostname', 'blockchain', 'launcher_id', 'pool_url', 'pool_response', 'created_at'] - self.rows = [] + self.labels = [] + label_index_by_hour = {} + for i in range(24): + start_time = datetime.datetime.now().replace(microsecond=0, second=0, minute=0) - datetime.timedelta(hours=24-i) + self.labels.append(start_time.strftime("%I %p")) + label_index_by_hour[start_time.strftime("%H")] = len(self.labels) - 1 + self.data = {} for partial in partials: - self.rows.append({ - 'hostname': partial.hostname, - 'blockchain': partial.blockchain, - 'launcher_id': partial.launcher_id, - 'pool_url': partial.pool_url, - 'pool_response': partial.pool_response, - 'created_at': partial.created_at }) - + created_at = partial.created_at + pool_launcher = partial.pool_url.replace('https://', '') + ' (' + partial.launcher_id[:8] + '...)' + if not pool_launcher in self.data: + self.data[pool_launcher] = [0] * 24 # Initialize as list of zeros + dataset = self.data[pool_launcher] + partial_hour_at = created_at[11:13] + dataset[label_index_by_hour[partial_hour_at]] += 1 + class Connections: def __init__(self, connections): @@ -194,8 +199,8 @@ def parse(connections): 'ip': vals[1], 'ports': vals[2], 'nodeid': vals[3].replace('...',''), - 'last_connect': datetime.strptime( \ - str(datetime.today().year) + ' ' + vals[4] + ' ' + vals[5] + ' ' + vals[6], + 'last_connect': datetime.datetime.strptime( \ + str(datetime.datetime.today().year) + ' ' + vals[4] + ' ' + vals[5] + ' ' + vals[6], '%Y %b %d %H:%M:%S'), 'mib_up': float(vals[7].split('|')[0]), 'mib_down': float(vals[7].split('|')[1]) @@ -210,7 +215,7 @@ def __init__(self, plotnfts): self.columns = ['hostname', 'details', 'updated_at'] self.rows = [] for plotnft in plotnfts: - updated_at = plotnft.updated_at or datetime.now() + updated_at = plotnft.updated_at or datetime.datetime.now() self.rows.append({ 'hostname': plotnft.hostname, 'blockchain': plotnft.blockchain, @@ -235,7 +240,7 @@ def __init__(self, pools, plotnfts): for pool in pools: launcher_id = pool.launcher_id plotnft = self.find_plotnft(plotnfts, launcher_id) - updated_at = pool.updated_at or datetime.now() + updated_at = pool.updated_at or datetime.datetime.now() pool_state = json.loads(pool.pool_state) if plotnft: status = self.extract_plotnft_value(plotnft, "Current state:") diff --git a/web/routes.py b/web/routes.py index a0aa4407..aed9e926 100644 --- a/web/routes.py +++ b/web/routes.py @@ -30,11 +30,12 @@ def index(): farming = chia.load_farm_summary() plotting = plotman.load_plotting_summary() challenges_chart_data = chia.challenges_chart_data() - partials = chia.load_partials() + partials_chart_data = chia.partials_chart_data() daily_diff = stats.load_daily_diff() return render_template('index.html', reload_seconds=120, farming=farming.__dict__, \ - plotting=plotting.__dict__, workers=workers, daily_diff=daily_diff, partials=partials, - challenges_chart_data=challenges_chart_data, global_config=gc) + plotting=plotting.__dict__, workers=workers, daily_diff=daily_diff, \ + partials_chart_data=partials_chart_data, challenges_chart_data=challenges_chart_data, \ + global_config=gc) @app.route('/setup', methods=['GET', 'POST']) def setup(): diff --git a/web/templates/index.html b/web/templates/index.html index 009d2582..f3dd5de9 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -119,40 +119,17 @@
Flax Netspace
{% if global_config.farming_enabled %}
-
+
+

Blockchain Challenges to Harvesters

- {% endif %} - - {% if partials.rows|length > 0 %}
-
- - - - - - - - - - - - {% for partial in partials.rows %} - - - - - - - - {% endfor %} - -
BlockchainPoolResponseLauncherDate
{{partial.blockchain}}{{partial.pool_url}}{{partial.pool_response}}{{partial.launcher_id|launcheridshortener}}{{partial.created_at}}
+
+

Partial Proofs to Pools

+
- {% endif %} {% endblock %} @@ -197,12 +174,6 @@
Flax Netspace
}, borderWidth: 1, options: { - plugins: { - title: { - display: true, - text: 'Blockchain Challenges', - } - }, scales: { x: { type: 'time', @@ -224,6 +195,40 @@
Flax Netspace
} } }); + var ctx = document.getElementById('partials_chart'); + var myChart = new Chart(ctx, { + type: 'bar', + data: { + labels: {{ partials_chart_data.labels | safe }}, + datasets: [ + {% for key in partials_chart_data.data %} + { + label: "{{key}}", + data: {{ partials_chart_data.data[key] | safe }}, + backgroundColor: color({{ loop.index - 1 }}), + }, + {% endfor %} + ], + }, + borderWidth: 1, + options: { + scales: { + x: { + title: { + display: true, + text: 'Time - Last 24 Hours' + } + }, + y: { + beginAtZero: true, + title: { + display: true, + text: "Partials Submitted", + } + } + } + } + }); }) {% endif %} From dce4e5f55a5c134b867b8a85889bd87cefbdce12 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 25 Aug 2021 14:48:23 -0600 Subject: [PATCH 0088/1625] Fixes from fresh install testing. --- api/commands/chia_cli.py | 3 +-- api/schedules/status_partials.py | 1 + common/utils/converters.py | 5 ++++- web/actions/chia.py | 2 +- web/actions/worker.py | 2 +- web/models/chia.py | 2 +- web/templates/index.html | 2 +- web/templates/setup.html | 2 +- 8 files changed, 11 insertions(+), 8 deletions(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index 9a284619..3f585c51 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -48,8 +48,7 @@ def load_farm_summary(blockchain): proc.communicate() abort(500, description="The timeout is expired!") if errs: - app.logger.info("Failed to load chia farm summary at.") - app.logger.info(traceback.format_exc()) + app.logger.debug("Error from {0} farm summary because {1}".format(blockchain, outs.decode('utf-8'))) farm_summary = chia.FarmSummary(cli_stdout=outs.decode('utf-8').splitlines()) else: # Just get plot count and size farm_summary = chia.FarmSummary(farm_plots=load_plots_farming()) diff --git a/api/schedules/status_partials.py b/api/schedules/status_partials.py index de6a3cf1..583a6821 100644 --- a/api/schedules/status_partials.py +++ b/api/schedules/status_partials.py @@ -2,6 +2,7 @@ # Performs a REST call to controller (possibly localhost) of latest blockchain partials. # +import datetime import os import traceback diff --git a/common/utils/converters.py b/common/utils/converters.py index b8140865..1be5096e 100644 --- a/common/utils/converters.py +++ b/common/utils/converters.py @@ -11,7 +11,10 @@ def sizeof_fmt(num, suffix='B'): if abs(num) < 1024.0: return "%3.3f %s%s" % (num, unit, suffix) num /= 1024.0 - return "%.3f %s%s" % (num, 'Yi', suffix) + value = "%.3f %s%s" % (num, 'Yi', suffix) + if value == "0.000 B": + return "0" + return value def gib_to_fmt(gibs): return sizeof_fmt(gibs * 1024 * 1024 * 1024) diff --git a/web/actions/chia.py b/web/actions/chia.py index 4f9135e2..e647fee9 100644 --- a/web/actions/chia.py +++ b/web/actions/chia.py @@ -193,7 +193,7 @@ def generate_key(key_path): return False flash('Welcome! A new key has been generated at {0} within the container filesystem. See the '.format(key_path) + \ 'Wiki for ' + \ - 'details.', 'success') + 'details. Please allow 5-10 minutes for Chia to begin syncing to peers...', 'success') flash('{0}'.format(" ".join(mnemonic_words)), 'info') if os.environ['mode'].startswith('farmer'): cmd = 'farmer-only' diff --git a/web/actions/worker.py b/web/actions/worker.py index 9c8b4f2f..9379911d 100644 --- a/web/actions/worker.py +++ b/web/actions/worker.py @@ -82,7 +82,7 @@ def generate_warnings(worker, plots): warnings = [] worker_plot_file_count = len(plots.rows) worker_summary_plot_count = plot_count_from_summary(worker.hostname) - if not worker_summary_plot_count: + if not worker_summary_plot_count and worker_plot_file_count > 0: warnings.append(WorkerWarning("Disconnected harvester!", "Farm summary reports no harvester for {0}, but Machinaris found {1} plots on disk. Further investigation of the worker harvesting service is recommended.".format( worker.hostname, worker_plot_file_count))) diff --git a/web/models/chia.py b/web/models/chia.py index 7bccdc38..f93f641a 100644 --- a/web/models/chia.py +++ b/web/models/chia.py @@ -117,7 +117,7 @@ def __init__(self, wallets): self.columns = ['hostname', 'details', 'updated_at'] self.rows = [] for wallet in wallets: - updated_at = wallet.updated_at or datetime.now() + updated_at = wallet.updated_at or datetime.datetime.now() self.rows.append({ 'hostname': wallet.hostname, 'blockchain': wallet.blockchain, diff --git a/web/templates/index.html b/web/templates/index.html index f3dd5de9..0bf04434 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -163,7 +163,7 @@

Partial Proofs to Pools

data: { labels: {{ challenges_chart_data.labels | safe }}, datasets: [ - {% for key in challenges_chart_data.data %} + {% for key in challenges_chart_data.data | sort %} { label: "{{key}}", data: {{ challenges_chart_data.data[key] | safe }}, diff --git a/web/templates/setup.html b/web/templates/setup.html index 69fabdaf..71911261 100644 --- a/web/templates/setup.html +++ b/web/templates/setup.html @@ -44,7 +44,7 @@ {% endwith %}
-

To get started with Machinaris as a Chia™ fullnode or farmer, either import your existing +

To get started with Machinaris as a Chia™ fullnode, either import your existing 24-word mnemonic seed phrase:

From 0817629f63b92c155c1a2f36cba97f6cedaf7bd8 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 25 Aug 2021 18:16:47 -0600 Subject: [PATCH 0089/1625] Fix defaults on first sync. --- api/models/chia.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/models/chia.py b/api/models/chia.py index e41bbd80..c921eb62 100644 --- a/api/models/chia.py +++ b/api/models/chia.py @@ -16,7 +16,7 @@ def __init__(self, cli_stdout=None, farm_plots=None): if cli_stdout: next_line_local_harvester = False self.plot_count = 0 - self.plots_size = None + self.plots_size = 0 for line in cli_stdout: if next_line_local_harvester: self.plot_count = line.strip().split(' ')[0] From 0d3477a0f1450904d7c41751137832a68c4015e9 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 25 Aug 2021 20:36:00 -0600 Subject: [PATCH 0090/1625] More guards for initial install. --- api/models/chia.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/models/chia.py b/api/models/chia.py index c921eb62..05c33c5b 100644 --- a/api/models/chia.py +++ b/api/models/chia.py @@ -34,6 +34,11 @@ def __init__(self, cli_stdout=None, farm_plots=None): next_line_local_harvester = True elif not self.plots_size and "Total size of plots" in line: self.plots_size = line.split(':')[1].strip() + try: + float(self.plots_size) + except: + app.logger.info("Plots size was {0} so resetting to zero.".format(self.plots_size)) + self.plots_size = 0 elif "Estimated network space" in line: self.calc_netspace_size(line.split(':')[1].strip()) elif "Expected time to win" in line: From f436af267565e258d8f1bb24d4ddbd2c3fad90b3 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 25 Aug 2021 20:47:15 -0600 Subject: [PATCH 0091/1625] Latest format from Flax. --- api/models/chia.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/api/models/chia.py b/api/models/chia.py index 05c33c5b..395a85ad 100644 --- a/api/models/chia.py +++ b/api/models/chia.py @@ -32,13 +32,6 @@ def __init__(self, cli_stdout=None, farm_plots=None): self.plot_count = line.split(':')[1].strip() elif "Local Harvester" in line: next_line_local_harvester = True - elif not self.plots_size and "Total size of plots" in line: - self.plots_size = line.split(':')[1].strip() - try: - float(self.plots_size) - except: - app.logger.info("Plots size was {0} so resetting to zero.".format(self.plots_size)) - self.plots_size = 0 elif "Estimated network space" in line: self.calc_netspace_size(line.split(':')[1].strip()) elif "Expected time to win" in line: From fe62e7abedffe321637753b9a7e62fa7ab3f38eb Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 25 Aug 2021 20:49:12 -0600 Subject: [PATCH 0092/1625] Latest for Flax again. --- api/models/chia.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/api/models/chia.py b/api/models/chia.py index 395a85ad..f403ffee 100644 --- a/api/models/chia.py +++ b/api/models/chia.py @@ -28,8 +28,6 @@ def __init__(self, cli_stdout=None, farm_plots=None): self.total_chia = line.split(':')[1].strip() elif "Total flax farmed" in line: self.total_chia = line.split(':')[1].strip() - elif "Plot count:" in line: - self.plot_count = line.split(':')[1].strip() elif "Local Harvester" in line: next_line_local_harvester = True elif "Estimated network space" in line: From 2855c6353cfbba9e875ec0bc6def02a6d75dd263 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 25 Aug 2021 21:48:14 -0600 Subject: [PATCH 0093/1625] More plots size conversion guards. --- api/schedules/status_farm.py | 19 +++++++++++++++++-- common/utils/converters.py | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/api/schedules/status_farm.py b/api/schedules/status_farm.py index f14c7422..f7517ddb 100644 --- a/api/schedules/status_farm.py +++ b/api/schedules/status_farm.py @@ -13,6 +13,21 @@ from api.commands import chia_cli from api import utils +# On initialization Chia outputs +def safely_gather_plots_size_gibs(plots_size): + plots_size_gibs = 0 + try: + plots_size_gibs = converters.str_to_gibs(plots_size) + except: + app.logger.info("Unconvertable plots size: {0} Using zero.".format(plots_size)) + plots_size_gibs = 0 + try: + float(plots_size_gibs) + except: + app.logger.info("Unfloatable plots size: {0} Using zero.".format(plots_size)) + plots_size_gibs = 0 + return plots_size_gibs + def update(): if not globals.farming_enabled() and not globals.harvesting_enabled(): #app.logger.info("Skipping farm summary status collection on plotting-only instance.") @@ -26,7 +41,7 @@ def update(): "mode": os.environ['mode'], "status": "" if not hasattr(farm_summary, 'status') else farm_summary.status, "plot_count": farm_summary.plot_count, - "plots_size": converters.str_to_gibs(farm_summary.plots_size), + "plots_size": safely_gather_plots_size_gibs(farm_summary.plots_size), "total_chia": 0 if not hasattr(farm_summary, 'total_chia') else farm_summary.total_chia, "netspace_size": 0 if not hasattr(farm_summary, 'netspace_size') else converters.str_to_gibs(farm_summary.netspace_size), "expected_time_to_win": "" if not hasattr(farm_summary, 'time_to_win') else farm_summary.time_to_win, @@ -38,7 +53,7 @@ def update(): "flax_netspace_size": 0 if not hasattr(flax_farm_summary, 'netspace_size') else converters.str_to_gibs(flax_farm_summary.netspace_size), "flax_expected_time_to_win": "" if not hasattr(flax_farm_summary, 'time_to_win') else flax_farm_summary.time_to_win, }) - utils.send_post('/farms/', payload, debug=False) + utils.send_post('/farms/', payload, debug=True) except: app.logger.info("Failed to load farm summary and send.") app.logger.info(traceback.format_exc()) diff --git a/common/utils/converters.py b/common/utils/converters.py index 1be5096e..e1b167b7 100644 --- a/common/utils/converters.py +++ b/common/utils/converters.py @@ -33,7 +33,7 @@ def str_to_gibs(str): except: print("Failed to convert to GiB: {0}".format(str)) print(traceback.format_exc()) - return None + return 0.0 def convert_date_for_luxon(datestr): year = datestr[:4] From 303428b711b0613e4888cb2d008e1940b055c0eb Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 25 Aug 2021 22:14:21 -0600 Subject: [PATCH 0094/1625] Handle MiB --- common/utils/converters.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/utils/converters.py b/common/utils/converters.py index e1b167b7..cb665974 100644 --- a/common/utils/converters.py +++ b/common/utils/converters.py @@ -22,7 +22,9 @@ def gib_to_fmt(gibs): def str_to_gibs(str): try: val,unit = str.split(' ') - if unit.lower().strip().endswith('gib'): + if unit.lower().strip().endswith('mib'): + return float(val) / 1024 + elif unit.lower().strip().endswith('gib'): return float(val) elif unit.lower().strip().endswith('tib'): return float(val) * 1024 From 21ecc714c5e05e9046b1c2ddf5ea0ad6dbd03765 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Thu, 26 Aug 2021 09:32:16 -0600 Subject: [PATCH 0095/1625] Improved message. --- web/templates/wallet.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/templates/wallet.html b/web/templates/wallet.html index 0c45e0ff..cb19ab12 100644 --- a/web/templates/wallet.html +++ b/web/templates/wallet.html @@ -32,8 +32,8 @@
{% else %}
-
No wallets found from any farmers. Not configured?
-
Try running 'chia wallet show' on your farmers to verify.
+
No wallet status received. Perhaps just starting? Please allow at least 10 minutes to update.
+
You can also try running 'chia wallet show' on your fullnode's in-container shell to verify.
{% endif %} From 815f5f615ed329c98154f985f9bc1b15416cb371 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Thu, 26 Aug 2021 19:50:42 -0600 Subject: [PATCH 0096/1625] Fixes and Chia 1.2.4 --- .github/workflows/develop.yaml | 2 +- .github/workflows/main.yaml | 2 +- .github/workflows/test.yaml | 2 +- CHANGELOG.md | 9 +++++++++ README.md | 2 +- api/schedules/status_farm.py | 2 +- web/routes.py | 2 +- 7 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index bf2ee73a..0aca1b56 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -39,7 +39,7 @@ jobs: platforms: linux/amd64 push: true build-args: | - "CHIA_BRANCH=1.2.3" + "CHIA_BRANCH=1.2.4" "FLAX_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 8e2b05d3..d85e32cb 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -40,7 +40,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: true build-args: | - "CHIA_BRANCH=1.2.3" + "CHIA_BRANCH=1.2.4" "FLAX_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:latest diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0e597a99..da60d449 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -39,7 +39,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: true build-args: | - "CHIA_BRANCH=1.2.3" + "CHIA_BRANCH=1.2.4" "FLAX_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:test diff --git a/CHANGELOG.md b/CHANGELOG.md index 84e769e2..e7ecdf38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ 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). +## [0.5.3] - 2021-08-27 + +- Worker page for each worker shows Warnings for certain configuraton issues. +- Farming page now shows current disk usage for each drive (free and used) +- Plotting page now shows recent disk usage for each drive (free and used) +- Summary page now charts recent blockchain challenges and partial proofs +- Fixes from feedback received by users on the Machinaris Discord. Thanks all! +- Chia - Update to version 1.2.4. See their [changelog for details](https://github.com/Chia-Network/chia-blockchain/releases/tag/1.2.4). + ## [0.5.2] - 2021-08-13 - Machinaris - Docker images now available for [Apple M1](https://github.com/guydavis/machinaris/issues/43) and [Raspberry Pi OS](https://github.com/guydavis/machinaris/issues/155) architectures. diff --git a/README.md b/README.md index 6a7e5877..5bf8d1d8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # machinaris -A Docker image for plotting and farming the Chia™ cryptocurrency on [one computer](https://github.com/guydavis/machinaris/wiki/Docker) or across [many](https://github.com/guydavis/machinaris/wiki/Workers). Try the easy install using [Launch Wizard](https://machinaris.app). +A Docker image for plotting and farming the Chia™ cryptocurrency on [one computer](https://github.com/guydavis/machinaris/wiki/Docker) or across [many](https://github.com/guydavis/machinaris/wiki/Workers). Try the easy install using the [Launch Wizard](https://machinaris.app). ![Home](https://raw.githubusercontent.com/guydavis/machinaris-unraid/master/docs/img/machinaris_home.png) diff --git a/api/schedules/status_farm.py b/api/schedules/status_farm.py index f7517ddb..bc540592 100644 --- a/api/schedules/status_farm.py +++ b/api/schedules/status_farm.py @@ -53,7 +53,7 @@ def update(): "flax_netspace_size": 0 if not hasattr(flax_farm_summary, 'netspace_size') else converters.str_to_gibs(flax_farm_summary.netspace_size), "flax_expected_time_to_win": "" if not hasattr(flax_farm_summary, 'time_to_win') else flax_farm_summary.time_to_win, }) - utils.send_post('/farms/', payload, debug=True) + utils.send_post('/farms/', payload, debug=False) except: app.logger.info("Failed to load farm summary and send.") app.logger.info(traceback.format_exc()) diff --git a/web/routes.py b/web/routes.py index aed9e926..3038a4dd 100644 --- a/web/routes.py +++ b/web/routes.py @@ -82,7 +82,7 @@ def plotting_jobs(): plotman.action_plots(action, plot_ids) else: app.logger.info("Unknown plotting form: {0}".format(request.form)) - return redirect(url_for('plotting')) # Force a redirect to allow time to update status + return redirect(url_for('plotting_jobs')) # Force a redirect to allow time to update status plotters = plotman.load_plotters() plotting = plotman.load_plotting_summary() return render_template('plotting/jobs.html', reload_seconds=120, plotting=plotting, From 91ec2f969a1cd8967caa5e4308180543b73f822d Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Thu, 26 Aug 2021 20:13:59 -0600 Subject: [PATCH 0097/1625] New Chia wants changed CA permsissions. --- scripts/chia_launch.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/chia_launch.sh b/scripts/chia_launch.sh index 972c92de..01a493d3 100644 --- a/scripts/chia_launch.sh +++ b/scripts/chia_launch.sh @@ -38,8 +38,10 @@ sed -i 's/localhost/127.0.0.1/g' ~/.chia/mainnet/config/config.yaml # Start services based on mode selected. Default is 'fullnode' if [[ ${mode} == 'fullnode' ]]; then + chmod -R 0600 ~/.chia/mainnet/config/ssl chia start farmer elif [[ ${mode} =~ ^farmer.* ]]; then + chmod -R 0600 ~/.chia/mainnet/config/ssl chia start farmer-only elif [[ ${mode} =~ ^harvester.* ]]; then if [[ -z ${farmer_address} || -z ${farmer_port} ]]; then @@ -64,6 +66,7 @@ elif [[ ${mode} =~ ^harvester.* ]]; then fi chia configure --set-farmer-peer ${farmer_address}:${farmer_port} chia configure --enable-upnp false + chmod -R 0600 ~/.chia/mainnet/config/ssl chia start harvester -r fi elif [[ ${mode} == 'plotter' ]]; then From e3704b19c9037ed38c002618053ff6e774ff6f82 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Thu, 26 Aug 2021 20:46:30 -0600 Subject: [PATCH 0098/1625] Version guard for 1.2.4 --- common/config/globals.py | 2 +- web/templates/base.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/config/globals.py b/common/config/globals.py index 92391aa3..1feed5d4 100644 --- a/common/config/globals.py +++ b/common/config/globals.py @@ -139,7 +139,7 @@ def archiving_enabled(): def load_chia_version(): global last_chia_version global last_chia_version_load_time - if last_chia_version and last_chia_version_load_time >= \ + if last_chia_version and last_chia_version_load_time and last_chia_version_load_time >= \ (datetime.datetime.now() - datetime.timedelta(days=RELOAD_MINIMUM_DAYS)): return last_chia_version proc = Popen("{0} version".format(CHIA_BINARY), diff --git a/web/templates/base.html b/web/templates/base.html index c47e9224..3c551b3f 100644 --- a/web/templates/base.html +++ b/web/templates/base.html @@ -122,7 +122,7 @@  About
-
-
-
-
Plotting: - - {{ plotting.display_status }} - -
-
-
-
-
-
Farming: - - {{ farming.display_status }} - -
-
-
-
+
{% endfor %} diff --git a/web/templates/farming/plots.html b/web/templates/farming/plots.html index 91cf7b6f..261c279e 100644 --- a/web/templates/farming/plots.html +++ b/web/templates/farming/plots.html @@ -42,22 +42,15 @@ {{ farmer.displayname }}: {{farmer.farming_status}} diff --git a/web/templates/plotting/jobs.html b/web/templates/plotting/jobs.html index 752bb614..04f49d92 100644 --- a/web/templates/plotting/jobs.html +++ b/web/templates/plotting/jobs.html @@ -185,7 +185,7 @@ - + diff --git a/web/templates/summary.html b/web/templates/summary.html index 33d5e9f5..2b733af1 100644 --- a/web/templates/summary.html +++ b/web/templates/summary.html @@ -63,6 +63,10 @@ button.active.nav-link { background-color: #3d3f42 !important } + td.icon_cell { + text-align: center; + padding:0px 5px 0px 0px; + } {% if summaries.rows|length > 0 %} @@ -84,7 +88,8 @@ {{_('EDV')}} {{local_cur_sym|upper}} - {{_('Logs')}} + + @@ -114,8 +119,12 @@ {{summary.wallet}} {{summary.edv}} {{summary.edv_fiat}} - - + + + + + {% endfor %} @@ -142,6 +151,14 @@
{{_('Please allow at least 15 minutes for blockchains to get started.')}}{{_('Please allow at least 15 minutes for blockchains to get started.')}}{{_('Wallet Settings')}}
{{_('Balance')}} {{local_cur_sym}} {{_('Updated At')}} + @@ -137,7 +138,10 @@ {{wallet.total_balance}} {{wallet.blockchain_symbol}} {{wallet.fiat_balance}} {{wallet.updated_at | datetimefilter}} - + + @@ -184,7 +188,7 @@
{{_('You can also try running "chia wallet show" on your fullnode\'s in-cont $(document).ready(function () { $('#data').DataTable({ "pageLength": 25, - "columnDefs": [{ "orderable": false, targets: [7] }], + "columnDefs": [{ "orderable": false, targets: [7,8] }], {% if lang != 'en' %} "language": { "url": "{{ url_for('static', filename='3rd_party/i18n/datatables.'+lang+'.json') }}" @@ -220,5 +224,13 @@
{{_('You can also try running "chia wallet show" on your fullnode\'s in-cont modalTitle.textContent = 'Wallet Settings - ' + blockchain }) }) + function PopupChart(chart_type, blockchain) { + var d = new Date(); + var height = 600; + var width = 900; + var top = (screen.height - height) / 2; + var left = (screen.width - width) / 2; + window.open("{{ url_for('index_chart') }}?type=" + chart_type + "&blockchain=" + blockchain, blockchain + ' - ' + chart_type, 'resizeable=yes,scrollbars=yes,height=' + height + ',width=' + width + ',top=' + top + ',left=' + left).focus(); + } {% endblock %} \ No newline at end of file diff --git a/web/templates/workers.html b/web/templates/workers.html index f0a31cf2..f2bcf8c3 100644 --- a/web/templates/workers.html +++ b/web/templates/workers.html @@ -79,7 +79,7 @@ {{worker.versions.machinaris}} - + {% if worker.mode == "fullnode" and worker.blockchain == "chia" %} {% endif %} From c67999b935cb1ed35a1969166234c4b4a632acf7 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 1 Jun 2022 20:52:24 -0600 Subject: [PATCH 0755/1625] Fix for index page error. --- scripts/forks/mmx_install.sh | 2 +- web/__init__.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/forks/mmx_install.sh b/scripts/forks/mmx_install.sh index bbf900b9..124ba8d9 100644 --- a/scripts/forks/mmx_install.sh +++ b/scripts/forks/mmx_install.sh @@ -5,7 +5,7 @@ MMX_BRANCH=$1 # On 2022-06-01 -HASH=92c909291d3d82f57b1680639b9b4f3c4c0ba05e +HASH=163b59956930a7d164c9c9450f74e160eb320717 if [ -z ${MMX_BRANCH} ]; then echo 'Skipping MMX install as not requested.' diff --git a/web/__init__.py b/web/__init__.py index 76d84ecd..cdfaeb7b 100644 --- a/web/__init__.py +++ b/web/__init__.py @@ -100,6 +100,12 @@ def launcheridshortener(value): app.jinja_env.filters['launcheridshortener'] = launcheridshortener +def alltheblocks_blockchainlink(blockchain): + alltheblocks_blockchain = globals.get_alltheblocks_name(blockchain) + return 'https://alltheblocks.net/{0}'.format(alltheblocks_blockchain) + +app.jinja_env.filters['alltheblocks_blockchainlink'] = alltheblocks_blockchainlink + def alltheblocks_blocklink(block, blockchain): alltheblocks_blockchain = globals.get_alltheblocks_name(blockchain) return '{1}'.format(alltheblocks_blockchain, block) From 82b002162841bd2bdc85e8fca7ffc2edd55fe7c1 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Thu, 2 Jun 2022 20:16:12 -0600 Subject: [PATCH 0756/1625] Fixes from MMX testnet6 testing. --- api/commands/mmx_cli.py | 2 +- api/commands/websvcs.py | 1 - api/models/mmx.py | 2 ++ api/rpc/chia.py | 52 ++++++++++++++++++++++++++++++++-- api/schedules/stats_blocks.py | 13 +++++---- common/config/globals.py | 4 +-- scripts/forks/mmx_install.sh | 4 +-- web/templates/index/index.html | 2 ++ 8 files changed, 66 insertions(+), 14 deletions(-) diff --git a/api/commands/mmx_cli.py b/api/commands/mmx_cli.py index b88518a0..a4b6c850 100644 --- a/api/commands/mmx_cli.py +++ b/api/commands/mmx_cli.py @@ -83,7 +83,7 @@ def save_config(config, blockchain): def load_wallet_show(blockchain): mmx_binary = globals.get_blockchain_binary(blockchain) - proc = Popen("({0} node info | grep Synced) && {0} wallet show".format(mmx_binary), stdout=PIPE, stderr=PIPE, shell=True) + proc = Popen("({0} node info | grep 'Synced: No') && {0} wallet show".format(mmx_binary), stdout=PIPE, stderr=PIPE, shell=True) try: outs, errs = proc.communicate(timeout=90) except TimeoutExpired: diff --git a/api/commands/websvcs.py b/api/commands/websvcs.py index fafe3ca8..062e2c99 100644 --- a/api/commands/websvcs.py +++ b/api/commands/websvcs.py @@ -202,4 +202,3 @@ def save_exchange_rates(debug=False): app.logger.error("Received {0} from {1}".format(resp.status_code, url)) except Exception as ex: app.logger.error("Failed to store exchange cache in {0} because {1}".format(EXCHANGE_RATES_CACHE_FILE, str(ex))) - \ No newline at end of file diff --git a/api/models/mmx.py b/api/models/mmx.py index 2236733a..f3f7a752 100644 --- a/api/models/mmx.py +++ b/api/models/mmx.py @@ -26,6 +26,8 @@ def __init__(self, cli_stdout, blockchain): elif line.startswith('Synced'): if 'Yes' == line.split(':')[1].strip(): self.calc_status('Farming') + elif 'No' == line.split(':')[1].strip(): + self.calc_status('Syncing') else: self.calc_status(line.strip()) if self.plots_size == "Total space: 0 TiB": diff --git a/api/rpc/chia.py b/api/rpc/chia.py index ed85f708..21b25aee 100644 --- a/api/rpc/chia.py +++ b/api/rpc/chia.py @@ -13,74 +13,84 @@ if importlib.util.find_spec("btcgreen"): from btcgreen.rpc.full_node_rpc_client import FullNodeRpcClient from btcgreen.rpc.farmer_rpc_client import FarmerRpcClient + from btcgreen.rpc.farmer_rpc_client import WalletRpcClient from btcgreen.util.default_root import DEFAULT_ROOT_PATH from btcgreen.util.ints import uint16 from btcgreen.util.config import load_config as load_fork_config elif importlib.util.find_spec("cactus"): from cactus.rpc.full_node_rpc_client import FullNodeRpcClient from cactus.rpc.farmer_rpc_client import FarmerRpcClient + from cactus.rpc.farmer_rpc_client import WalletRpcClient from cactus.util.default_root import DEFAULT_ROOT_PATH from cactus.util.ints import uint16 from cactus.util.config import load_config as load_fork_config elif importlib.util.find_spec("chia"): from chia.rpc.full_node_rpc_client import FullNodeRpcClient from chia.rpc.farmer_rpc_client import FarmerRpcClient + from chia.rpc.farmer_rpc_client import WalletRpcClient 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 importlib.util.find_spec("chives"): from chives.rpc.full_node_rpc_client import FullNodeRpcClient from chives.rpc.farmer_rpc_client import FarmerRpcClient - from chives.rpc.harvester_rpc_client import HarvesterRpcClient + from chives.rpc.farmer_rpc_client import WalletRpcClient 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 importlib.util.find_spec("cryptodoge"): from cryptodoge.rpc.full_node_rpc_client import FullNodeRpcClient from cryptodoge.rpc.farmer_rpc_client import FarmerRpcClient - from cryptodoge.rpc.harvester_rpc_client import HarvesterRpcClient + from cryptodoge.rpc.farmer_rpc_client import WalletRpcClient from cryptodoge.util.default_root import DEFAULT_ROOT_PATH from cryptodoge.util.ints import uint16 from cryptodoge.util.config import load_config as load_fork_config elif importlib.util.find_spec("flax"): from flax.rpc.full_node_rpc_client import FullNodeRpcClient from flax.rpc.farmer_rpc_client import FarmerRpcClient + from flax.rpc.farmer_rpc_client import WalletRpcClient from flax.util.default_root import DEFAULT_ROOT_PATH from flax.util.ints import uint16 from flax.util.config import load_config as load_fork_config elif importlib.util.find_spec("flora"): from flora.rpc.full_node_rpc_client import FullNodeRpcClient from flora.rpc.farmer_rpc_client import FarmerRpcClient + from flora.rpc.farmer_rpc_client import WalletRpcClient from flora.util.default_root import DEFAULT_ROOT_PATH from flora.util.ints import uint16 from flora.util.config import load_config as load_fork_config elif importlib.util.find_spec("hddcoin"): from hddcoin.rpc.full_node_rpc_client import FullNodeRpcClient from hddcoin.rpc.farmer_rpc_client import FarmerRpcClient + from hddcoin.rpc.farmer_rpc_client import WalletRpcClient from hddcoin.util.default_root import DEFAULT_ROOT_PATH from hddcoin.util.ints import uint16 from hddcoin.util.config import load_config as load_fork_config elif importlib.util.find_spec("maize"): from maize.rpc.full_node_rpc_client import FullNodeRpcClient from maize.rpc.farmer_rpc_client import FarmerRpcClient + from maize.rpc.farmer_rpc_client import WalletRpcClient from maize.util.default_root import DEFAULT_ROOT_PATH from maize.util.ints import uint16 from maize.util.config import load_config as load_fork_config elif importlib.util.find_spec("shibgreen"): from shibgreen.rpc.full_node_rpc_client import FullNodeRpcClient from shibgreen.rpc.farmer_rpc_client import FarmerRpcClient + from shibgreen.rpc.farmer_rpc_client import WalletRpcClient from shibgreen.util.default_root import DEFAULT_ROOT_PATH from shibgreen.util.ints import uint16 from shibgreen.util.config import load_config as load_fork_config elif importlib.util.find_spec("stai"): from stai.rpc.full_node_rpc_client import FullNodeRpcClient from stai.rpc.farmer_rpc_client import FarmerRpcClient + from stai.rpc.farmer_rpc_client import WalletRpcClient from stai.util.default_root import DEFAULT_ROOT_PATH from stai.util.ints import uint16 from stai.util.config import load_config as load_fork_config elif importlib.util.find_spec("stor"): from stor.rpc.full_node_rpc_client import FullNodeRpcClient from stor.rpc.farmer_rpc_client import FarmerRpcClient + from stor.rpc.farmer_rpc_client import WalletRpcClient from stor.util.default_root import DEFAULT_ROOT_PATH from stor.util.ints import uint16 from stor.util.config import load_config as load_fork_config @@ -167,3 +177,41 @@ async def load_all_plots(): except Exception as ex: app.logger.info("Error getting plots via RPC: {0}".format(str(ex))) return all_plots + +# Used to load farmed blocks via RPC +def get_transactions(address): + farmed_blocks = asyncio.run(load_farmed_blocks()) + return farmed_blocks + +async def load_farmed_blocks(address): + farmed_blocks = [] + try: + config = load_fork_config(DEFAULT_ROOT_PATH, 'config.yaml') + wallet_rpc_port = config["wallet"]["rpc_port"] + wallet = await WalletRpcClient.create( + 'localhost', uint16(wallet_rpc_port), DEFAULT_ROOT_PATH, config + ) + result = await wallet.get_farm_block(address) + wallet.close() + await wallet.await_closed() + for harvester in result["harvesters"]: + # app.logger.info(harvester.keys()) Returns: ['connection', 'failed_to_open_filenames', 'no_key_filenames', 'plots'] + # app.logger.info(harvester['connection']) Returns: {'host': '192.168.1.100', 'node_id': '602eb9...90378', 'port': 62599} + host = harvester["connection"]["host"] + plots = harvester["plots"] + app.logger.info("Listing plots found {0} plots on {1}.".format(len(plots), host)) + for plot in plots: + all_plots.append({ + "hostname": host, + "type": "solo" if (plot["pool_contract_puzzle_hash"] is None) else "portable", + "plot_id": plot['plot_id'], + "file_size": plot['file_size'], # bytes + "filename": plot['filename'], # full path and name + "plot_public_key": plot['plot_public_key'], + "pool_contract_puzzle_hash": plot['pool_contract_puzzle_hash'], + "pool_public_key": plot['pool_public_key'], + }) + except Exception as ex: + app.logger.info("Error getting plots via RPC: {0}".format(str(ex))) + return all_plots + diff --git a/api/schedules/stats_blocks.py b/api/schedules/stats_blocks.py index 15710d31..db0ef6e9 100644 --- a/api/schedules/stats_blocks.py +++ b/api/schedules/stats_blocks.py @@ -24,12 +24,13 @@ def collect(): "Skipping block win stats collection as not farming on this Machinaris instance.") return #app.logger.info("Collecting stats about won blocks.") - for blockchain in globals.enabled_blockchains(): - if not blockchain == 'mmx': - blocks = log_parser.recent_farmed_blocks(blockchain) - store_locally(blockchain, blocks) - if not gc['is_controller']: - send_to_controller(blockchain, blocks) + blockchain = globals.enabled_blockchains()[0] + if blockchain == 'mmx': + return + blocks = log_parser.recent_farmed_blocks(blockchain) + store_locally(blockchain, blocks) + if not gc['is_controller']: + send_to_controller(blockchain, blocks) def store_locally(blockchain, blocks): hostname = utils.get_hostname() diff --git a/common/config/globals.py b/common/config/globals.py index 9a6abc17..f8974489 100644 --- a/common/config/globals.py +++ b/common/config/globals.py @@ -31,8 +31,8 @@ BLADEBIT_BINARY = '/usr/bin/bladebit' CHIADOG_PATH = '/chiadog' -MMX_NETWORK = 'testnet5' -MMX_CONFIG = 'testnet5' +MMX_NETWORK = 'testnet6' +MMX_CONFIG = 'testnet6' RELOAD_MINIMUM_DAYS = 1 # Don't run binaries for version again until this time expires diff --git a/scripts/forks/mmx_install.sh b/scripts/forks/mmx_install.sh index 124ba8d9..c53561bf 100644 --- a/scripts/forks/mmx_install.sh +++ b/scripts/forks/mmx_install.sh @@ -4,8 +4,8 @@ # MMX_BRANCH=$1 -# On 2022-06-01 -HASH=163b59956930a7d164c9c9450f74e160eb320717 +# On 2022-06-02 +HASH=f8ea5be1b2fb61160898d0164cad152da25f4c45 if [ -z ${MMX_BRANCH} ]; then echo 'Skipping MMX install as not requested.' diff --git a/web/templates/index/index.html b/web/templates/index/index.html index 88225e1e..faa3ea78 100644 --- a/web/templates/index/index.html +++ b/web/templates/index/index.html @@ -99,7 +99,9 @@
{{ farms[blockchain].currency_symbol }} {{_('F
+ {% if blockchain != 'mmx' %} + {% endif %}

Date: Thu, 2 Jun 2022 20:50:15 -0600 Subject: [PATCH 0757/1625] Start on effort calculation. --- api/gunicorn.conf.py | 4 +- api/rpc/chia.py | 77 ++++++++++++++++++----------------- api/schedules/stats_effort.py | 33 +++++++++++++++ 3 files changed, 75 insertions(+), 39 deletions(-) create mode 100644 api/schedules/stats_effort.py diff --git a/api/gunicorn.conf.py b/api/gunicorn.conf.py index d4a672a2..7e19bf0b 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -12,7 +12,7 @@ def on_starting(server): status_connections, status_keys, status_alerts, status_controller, \ status_plotnfts, status_pools, status_partials, status_drives, \ stats_blocks, stats_balances, stats_disk, stats_farm, nft_recover, plots_check, \ - log_rotate, db_backup, restart_stuck_farmer, geolocate_peers + log_rotate, db_backup, restart_stuck_farmer, geolocate_peers, stats_effort from common.config import globals from api.commands import websvcs @@ -78,7 +78,7 @@ def on_starting(server): scheduler.add_job(func=stats_balances.collect, name="stats_balances", trigger='cron', minute=0) # Hourly # Testing only - #scheduler.add_job(func=stats_balances.collect, name="stats_balances", trigger='interval', seconds=10) # Test immediately + #scheduler.add_job(func=stats_effort.calculate, name="stats_effort", trigger='interval', seconds=10) # Test immediately app.logger.debug("Starting background scheduler...") scheduler.start() diff --git a/api/rpc/chia.py b/api/rpc/chia.py index 21b25aee..ab438934 100644 --- a/api/rpc/chia.py +++ b/api/rpc/chia.py @@ -13,84 +13,84 @@ if importlib.util.find_spec("btcgreen"): from btcgreen.rpc.full_node_rpc_client import FullNodeRpcClient from btcgreen.rpc.farmer_rpc_client import FarmerRpcClient - from btcgreen.rpc.farmer_rpc_client import WalletRpcClient + from btcgreen.rpc.wallet_rpc_client import WalletRpcClient from btcgreen.util.default_root import DEFAULT_ROOT_PATH from btcgreen.util.ints import uint16 from btcgreen.util.config import load_config as load_fork_config elif importlib.util.find_spec("cactus"): from cactus.rpc.full_node_rpc_client import FullNodeRpcClient from cactus.rpc.farmer_rpc_client import FarmerRpcClient - from cactus.rpc.farmer_rpc_client import WalletRpcClient + from cactus.rpc.wallet_rpc_client import WalletRpcClient from cactus.util.default_root import DEFAULT_ROOT_PATH from cactus.util.ints import uint16 from cactus.util.config import load_config as load_fork_config elif importlib.util.find_spec("chia"): from chia.rpc.full_node_rpc_client import FullNodeRpcClient from chia.rpc.farmer_rpc_client import FarmerRpcClient - from chia.rpc.farmer_rpc_client import WalletRpcClient + from chia.rpc.wallet_rpc_client import WalletRpcClient 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 importlib.util.find_spec("chives"): from chives.rpc.full_node_rpc_client import FullNodeRpcClient from chives.rpc.farmer_rpc_client import FarmerRpcClient - from chives.rpc.farmer_rpc_client import WalletRpcClient + from chives.rpc.wallet_rpc_client import WalletRpcClient 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 importlib.util.find_spec("cryptodoge"): from cryptodoge.rpc.full_node_rpc_client import FullNodeRpcClient from cryptodoge.rpc.farmer_rpc_client import FarmerRpcClient - from cryptodoge.rpc.farmer_rpc_client import WalletRpcClient + from cryptodoge.rpc.wallet_rpc_client import WalletRpcClient from cryptodoge.util.default_root import DEFAULT_ROOT_PATH from cryptodoge.util.ints import uint16 from cryptodoge.util.config import load_config as load_fork_config elif importlib.util.find_spec("flax"): from flax.rpc.full_node_rpc_client import FullNodeRpcClient from flax.rpc.farmer_rpc_client import FarmerRpcClient - from flax.rpc.farmer_rpc_client import WalletRpcClient + from flax.rpc.wallet_rpc_client import WalletRpcClient from flax.util.default_root import DEFAULT_ROOT_PATH from flax.util.ints import uint16 from flax.util.config import load_config as load_fork_config elif importlib.util.find_spec("flora"): from flora.rpc.full_node_rpc_client import FullNodeRpcClient from flora.rpc.farmer_rpc_client import FarmerRpcClient - from flora.rpc.farmer_rpc_client import WalletRpcClient + from flora.rpc.wallet_rpc_client import WalletRpcClient from flora.util.default_root import DEFAULT_ROOT_PATH from flora.util.ints import uint16 from flora.util.config import load_config as load_fork_config elif importlib.util.find_spec("hddcoin"): from hddcoin.rpc.full_node_rpc_client import FullNodeRpcClient from hddcoin.rpc.farmer_rpc_client import FarmerRpcClient - from hddcoin.rpc.farmer_rpc_client import WalletRpcClient + from hddcoin.rpc.wallet_rpc_client import WalletRpcClient from hddcoin.util.default_root import DEFAULT_ROOT_PATH from hddcoin.util.ints import uint16 from hddcoin.util.config import load_config as load_fork_config elif importlib.util.find_spec("maize"): from maize.rpc.full_node_rpc_client import FullNodeRpcClient from maize.rpc.farmer_rpc_client import FarmerRpcClient - from maize.rpc.farmer_rpc_client import WalletRpcClient + from maize.rpc.wallet_rpc_client import WalletRpcClient from maize.util.default_root import DEFAULT_ROOT_PATH from maize.util.ints import uint16 from maize.util.config import load_config as load_fork_config elif importlib.util.find_spec("shibgreen"): from shibgreen.rpc.full_node_rpc_client import FullNodeRpcClient from shibgreen.rpc.farmer_rpc_client import FarmerRpcClient - from shibgreen.rpc.farmer_rpc_client import WalletRpcClient + from shibgreen.rpc.wallet_rpc_client import WalletRpcClient from shibgreen.util.default_root import DEFAULT_ROOT_PATH from shibgreen.util.ints import uint16 from shibgreen.util.config import load_config as load_fork_config elif importlib.util.find_spec("stai"): from stai.rpc.full_node_rpc_client import FullNodeRpcClient from stai.rpc.farmer_rpc_client import FarmerRpcClient - from stai.rpc.farmer_rpc_client import WalletRpcClient + from stai.rpc.wallet_rpc_client import WalletRpcClient from stai.util.default_root import DEFAULT_ROOT_PATH from stai.util.ints import uint16 from stai.util.config import load_config as load_fork_config elif importlib.util.find_spec("stor"): from stor.rpc.full_node_rpc_client import FullNodeRpcClient from stor.rpc.farmer_rpc_client import FarmerRpcClient - from stor.rpc.farmer_rpc_client import WalletRpcClient + from stor.rpc.wallet_rpc_client import WalletRpcClient from stor.util.default_root import DEFAULT_ROOT_PATH from stor.util.ints import uint16 from stor.util.config import load_config as load_fork_config @@ -178,40 +178,43 @@ async def load_all_plots(): app.logger.info("Error getting plots via RPC: {0}".format(str(ex))) return all_plots -# Used to load farmed blocks via RPC -def get_transactions(address): - farmed_blocks = asyncio.run(load_farmed_blocks()) - return farmed_blocks +def get_wallets(): + wallets = asyncio.run(load_wallets()) + return wallets -async def load_farmed_blocks(address): - farmed_blocks = [] +async def load_wallets(): + wallets = [] try: config = load_fork_config(DEFAULT_ROOT_PATH, 'config.yaml') wallet_rpc_port = config["wallet"]["rpc_port"] wallet = await WalletRpcClient.create( 'localhost', uint16(wallet_rpc_port), DEFAULT_ROOT_PATH, config ) - result = await wallet.get_farm_block(address) + result = await wallet.get_wallets() wallet.close() await wallet.await_closed() - for harvester in result["harvesters"]: - # app.logger.info(harvester.keys()) Returns: ['connection', 'failed_to_open_filenames', 'no_key_filenames', 'plots'] - # app.logger.info(harvester['connection']) Returns: {'host': '192.168.1.100', 'node_id': '602eb9...90378', 'port': 62599} - host = harvester["connection"]["host"] - plots = harvester["plots"] - app.logger.info("Listing plots found {0} plots on {1}.".format(len(plots), host)) - for plot in plots: - all_plots.append({ - "hostname": host, - "type": "solo" if (plot["pool_contract_puzzle_hash"] is None) else "portable", - "plot_id": plot['plot_id'], - "file_size": plot['file_size'], # bytes - "filename": plot['filename'], # full path and name - "plot_public_key": plot['plot_public_key'], - "pool_contract_puzzle_hash": plot['pool_contract_puzzle_hash'], - "pool_public_key": plot['pool_public_key'], - }) + print(result) except Exception as ex: app.logger.info("Error getting plots via RPC: {0}".format(str(ex))) - return all_plots + return wallets + +def get_transactions(wallet_id): + transactions = asyncio.run(load_transactions(wallet_id)) + return transactions + +async def load_transactions(wallet_id): + transactions = [] + try: + config = load_fork_config(DEFAULT_ROOT_PATH, 'config.yaml') + wallet_rpc_port = config["wallet"]["rpc_port"] + wallet = await WalletRpcClient.create( + 'localhost', uint16(wallet_rpc_port), DEFAULT_ROOT_PATH, config + ) + result = await wallet.get_transactions(wallet_id) + wallet.close() + await wallet.await_closed() + print(result) + except Exception as ex: + app.logger.info("Error getting plots via RPC: {0}".format(str(ex))) + return transactions diff --git a/api/schedules/stats_effort.py b/api/schedules/stats_effort.py new file mode 100644 index 00000000..17cb1faa --- /dev/null +++ b/api/schedules/stats_effort.py @@ -0,0 +1,33 @@ +# +# Calculates effort per blockchain +# + + +import datetime +import http +import json +import os +import requests +import socket +import sqlite3 +import traceback + +from flask import g + +from common.config import globals +from api.rpc import chia +from api import app, utils, db + +def calculate(): + with app.app_context(): + gc = globals.load() + current_datetime = datetime.datetime.now().strftime("%Y%m%d%H%M") + try: + wallets = chia.get_wallets() + for wallet in wallets: + print(wallet) + app.logger.info("Getting transactions in wallet #{0}: {1}".format(wallet['id'], wallet['name'])) + chia.get_transactions(wallet['id']) + except: + app.logger.info("Failed to calculate blockchain effort.") + app.logger.info(traceback.format_exc()) From 377457e7c53215957be10c5575be6fca345886f8 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 3 Jun 2022 16:43:51 -0600 Subject: [PATCH 0758/1625] Start testing upcoming Chia v1.4 in machinaris:develop stream only. --- .github/workflows/develop-chia.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop-chia.yaml b/.github/workflows/develop-chia.yaml index ab64cc88..82479afd 100644 --- a/.github/workflows/develop-chia.yaml +++ b/.github/workflows/develop-chia.yaml @@ -42,7 +42,7 @@ jobs: build-args: | "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "CHIA_BRANCH=latest" + "CHIA_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop From 03123dbded309d60eff88ebf28b2f703d3762f47 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 3 Jun 2022 16:44:26 -0600 Subject: [PATCH 0759/1625] Revert --- .github/workflows/develop-chia.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop-chia.yaml b/.github/workflows/develop-chia.yaml index 82479afd..ab64cc88 100644 --- a/.github/workflows/develop-chia.yaml +++ b/.github/workflows/develop-chia.yaml @@ -42,7 +42,7 @@ jobs: build-args: | "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "CHIA_BRANCH=main" + "CHIA_BRANCH=latest" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop From 3af894c8ea75586778b99d69418da5e2e61e8b1f Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 3 Jun 2022 16:54:02 -0600 Subject: [PATCH 0760/1625] Start testing upcoming Chia v1.4 in machinaris:develop stream only. --- .github/workflows/develop-chia.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop-chia.yaml b/.github/workflows/develop-chia.yaml index ab64cc88..82479afd 100644 --- a/.github/workflows/develop-chia.yaml +++ b/.github/workflows/develop-chia.yaml @@ -42,7 +42,7 @@ jobs: build-args: | "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "CHIA_BRANCH=latest" + "CHIA_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop From 3d1ec7a5c033d8e9b02784e51ec722813c1f8b34 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 3 Jun 2022 17:40:57 -0600 Subject: [PATCH 0761/1625] Chia prompt changed last month. #682 --- api/commands/chia_cli.py | 2 +- api/commands/pools_cli.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index 0655a852..f74589de 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -77,7 +77,7 @@ def load_wallet_show(blockchain): child = pexpect.spawn("{0} wallet show".format(chia_binary)) wallet_index = 1 while True: - i = child.expect(["Wallet height:.*\r\n", "Choose wallet key:.*\r\n", "No online backup file found.*\r\n"], timeout=120) + i = child.expect(["Wallet height:.*\r\n", "Wallet keys:.*\r\n", "No online backup file found.*\r\n"], timeout=120) 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 f6f3d82f..99da0039 100644 --- a/api/commands/pools_cli.py +++ b/api/commands/pools_cli.py @@ -89,7 +89,7 @@ def load_plotnft_show(blockchain): child = pexpect.spawn("{0} plotnft show".format(chia_binary)) pool_wallet_id = 1 while True: - i = child.expect(["Wallet height:.*\r\n", "Choose wallet key:.*\r\n", "No online backup file found.*\r\n"], timeout=120) + i = child.expect(["Wallet height:.*\r\n", "Wallet keys:.*\r\n", "No online backup file found.*\r\n"], timeout=120) 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") @@ -129,7 +129,7 @@ def process_pool_leave(blockchain, pool_wallet_id): child = pexpect.spawn(cmd) child.logfile = sys.stdout.buffer while True: - i = child.expect(["Choose wallet key:.*\r\n", pexpect.EOF]) + i = child.expect(["Wallet keys:.*\r\n", pexpect.EOF]) if i == 0: app.logger.info("plotnft got index prompt so selecting #{0}".format(pool_wallet_id)) child.sendline("{0}".format(pool_wallet_id)) @@ -173,7 +173,7 @@ def process_pool_join(blockchain, pool_url, pool_wallet_id): child = pexpect.spawn(cmd) child.logfile = sys.stdout.buffer while True: - i = child.expect(["Choose wallet key:.*\r\n", pexpect.EOF]) + i = child.expect(["Wallet keys:.*\r\n", pexpect.EOF]) if i == 0: app.logger.info("plotnft got index prompt so selecting #{0}".format(pool_wallet_id)) child.sendline("{0}".format(pool_wallet_id)) @@ -202,7 +202,7 @@ def process_self_pool(blockchain, pool_wallet_id): child = pexpect.spawn(cmd) child.logfile = sys.stdout.buffer while True: - i = child.expect(["Choose wallet key:.*\r\n", pexpect.EOF]) + i = child.expect(["Wallet keys:.*\r\n", pexpect.EOF]) if i == 0: app.logger.info("plotnft got index prompt so selecting #{0}".format(pool_wallet_id)) child.sendline("{0}".format(pool_wallet_id)) From ee96f10b0d8baaf421246914c99ce1b67e7ff580 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sat, 4 Jun 2022 19:57:27 -0600 Subject: [PATCH 0762/1625] Wallet chart on index page. --- common/utils/fiat.py | 2 +- web/actions/stats.py | 37 +++++++++++- web/routes.py | 1 + web/templates/blockchains.html | 21 +++++-- web/templates/index/index.html | 21 ++++++- web/templates/summary.html | 2 +- web/templates/views/index_script_block.js | 74 +++++++++++++++++++++++ 7 files changed, 146 insertions(+), 12 deletions(-) diff --git a/common/utils/fiat.py b/common/utils/fiat.py index 40a17e31..2def4325 100644 --- a/common/utils/fiat.py +++ b/common/utils/fiat.py @@ -23,7 +23,7 @@ def to_fiat(blockchain, coins): usd_per_coin = float(data[blockchain]) fiat_per_usd = get_fiat_exchange_to_usd() fiat_cur_sym = get_local_currency_symbol().lower() - if usd_per_coin and fiat_per_usd: + if usd_per_coin and fiat_per_usd and coins: #print("Converting {0} coins of {1} with {2}".format(coins, usd_per_coin, fiat_per_usd)) fiat_localized = format_currency(round(usd_per_coin * fiat_per_usd * coins, 2), '') return "{0} {1}".format(fiat_localized, fiat_cur_sym) diff --git a/web/actions/stats.py b/web/actions/stats.py index f4725ee0..152b8f4c 100644 --- a/web/actions/stats.py +++ b/web/actions/stats.py @@ -3,7 +3,6 @@ # import datetime -from decimal import ROUND_HALF_DOWN import sqlite3 from flask import g @@ -404,7 +403,7 @@ def load_farmed_blocks(blockchain): displayname = w.displayname except: app.logger.debug("Failed to find worker for hostname: {0}".format(ResourceWarning.hostname)) - displayname = ROUND_HALF_DOWN.hostname + displayname = hostname blocks.append({ 'hostname': displayname, 'blockchain': blockchain, @@ -413,4 +412,36 @@ def load_farmed_blocks(blockchain): 'plot_files': row.plot_files, }) app.logger.info(blocks) - return blocks \ No newline at end of file + return blocks + +def wallet_chart_data(farm_summary): + for blockchain in farm_summary.farms: + balances = load_wallet_balances(blockchain) + coins = load_farmed_coins(blockchain) + chart_data = { 'dates': [], 'balances': [], 'coins': []} + i = j = 0 + # First push thru wallet balances list + while i < len(balances['dates']): + balance_date = balances['dates'][i] + if j < len(coins['dates']): + coin_date = coins['dates'][j] + else: + coin_date = '2100-01-01' # far in future + if balance_date < coin_date: + chart_data['dates'].append(balance_date) + chart_data['balances'].append(converters.round_balance(balances['vals'][i])) + chart_data['coins'].append('null') # Javascript null + i += 1 + else: + chart_data['dates'].append(coin_date) + chart_data['coins'].append(converters.round_balance(coins['vals'][j])) + chart_data['balances'].append('null') # Javascript null + j += 1 + # Then add any remaining farmed coins + while j < len(coins['dates']): + chart_data['dates'].append(coins['dates'][j]) + chart_data['coins'].append(converters.round_balance(coins['vals'][j])) + chart_data['balances'].append('null') # Javascript null + j += 1 + #app.logger.info("{0} -> {1}".format(blockchain, chart_data)) + farm_summary.farms[blockchain]['wallets'] = chart_data diff --git a/web/routes.py b/web/routes.py index cb8767d7..c77f1d2c 100644 --- a/web/routes.py +++ b/web/routes.py @@ -78,6 +78,7 @@ def index(): chia.challenges_chart_data(farm_summary) p.partials_chart_data(farm_summary) stats.load_daily_diff(farm_summary) + stats.wallet_chart_data(farm_summary) warnings.check_warnings(request.args) return render_template('index/index.html', reload_seconds=120, farms=farm_summary.farms, \ plotting=plotting, workers=workers, global_config=gc, selected_blockchain=selected_blockchain) diff --git a/web/templates/blockchains.html b/web/templates/blockchains.html index 0f8557db..700fd587 100644 --- a/web/templates/blockchains.html +++ b/web/templates/blockchains.html @@ -17,6 +17,10 @@ button.active.nav-link { background-color: #3d3f42 !important } + td.icon_cell { + text-align: center; + padding:0px 5px 0px 0px; + }
@@ -33,7 +37,8 @@ {{_('Peak Height')}} {{_('Peak Time')}} {{_('Updated At')}} - {{_('Logs')}} + + @@ -53,8 +58,16 @@ {{blockchain.peak_height}} {{blockchain.peak_time}} {{blockchain.updated_at | datetimefilter}} - - + {% + if blockchain == 'mmx' + %}{% + else + %}{% + endif + %} + + + {% endfor %} @@ -110,7 +123,7 @@
{{_('Try running "chia show --state" on your farmers to verify.')}}
"pageLength": 25, "columnDefs": [ { - targets: [5], "orderable": false, + targets: [5,6], "orderable": false, } ], {% if lang != 'en' %} diff --git a/web/templates/index/index.html b/web/templates/index/index.html index faa3ea78..02da6a44 100644 --- a/web/templates/index/index.html +++ b/web/templates/index/index.html @@ -99,9 +99,7 @@
{{ farms[blockchain].currency_symbol }} {{_('F

- {% if blockchain != 'mmx' %} - - {% endif %} +

{{ blockchain|capitalize }} {{_('Netspace')}}<

+ {% if farms[blockchain].wallets.dates|length > 0 %} +
+
+
+
+ + + +
+
+
{{blockchain|capitalize}} - {{_('Wallets')}}
+ +
+
+ {% endif %} + {% if farms[blockchain].challenges.labels|length > 0 %}
@@ -143,6 +157,7 @@
{{blockchain|capitalize}} - {{_('Partial Proof
{% endif %} + {% endfor %} diff --git a/web/templates/summary.html b/web/templates/summary.html index 2b733af1..53141bde 100644 --- a/web/templates/summary.html +++ b/web/templates/summary.html @@ -123,7 +123,7 @@
href="#" title="{{_('Chart Wallet')}}" onclick='PopupChart("wallet_balances","{{ summary.blockchain }}");return false;'> - + diff --git a/web/templates/views/index_script_block.js b/web/templates/views/index_script_block.js index 8f2ca5a0..32ad8777 100644 --- a/web/templates/views/index_script_block.js +++ b/web/templates/views/index_script_block.js @@ -40,6 +40,80 @@ $('[data-toggle="tooltip"]').tooltip(); {% for blockchain in farms %} +{% if farms[blockchain].wallets.dates|length > 0 %} +var ctx = document.getElementById('{{blockchain}}_wallets_chart'); +var myChart = new Chart(ctx, { + type: 'line', + data: { + labels: {{ farms[blockchain].wallets.dates | safe }}, + datasets: [ + { + label: "{{_('Farmed Coins')}}", + data: {{ farms[blockchain].wallets.coins | safe }}, + backgroundColor: color(0), + }, + { + label: "{{_('Total Balance')}}", + data: {{ farms[blockchain].wallets.balances | safe }}, + backgroundColor: color(1), + }, + ], + }, + borderWidth: 1, + options: { + plugins: { + legend: { + labels: { + color: "#c7c7c7", + font: { + size: 18 + } + } + } + }, + scales: { + x: { + type: 'time', + time: { + tooltipFormat: 'DD T' + }, + ticks: { + color: "#c7c7c7", + font: { + size: 16 + } + }, + title: { + display: true, + text: "{{_('Date')}}", + color: "#c7c7c7", + font: { + size: 18 + } + } + }, + y: { + ticks: { + color: "#c7c7c7", + font: { + size: 16 + } + }, + beginAtZero: true, + title: { + display: true, + text: "{{_('Coins')}}", + color: "#c7c7c7", + font: { + size: 18 + } + } + } + } + } + }); + {% endif %} + {% if farms[blockchain].challenges.labels|length > 0 %} var ctx = document.getElementById('{{blockchain}}_challenges_chart'); var myChart = new Chart(ctx, { From 5a42666ef5630f4ac8244310321f82d929beff1b Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sat, 4 Jun 2022 22:25:33 -0600 Subject: [PATCH 0763/1625] More charts! --- common/utils/converters.py | 2 +- web/actions/stats.py | 56 ++++++++++ web/routes.py | 9 ++ web/templates/index/chart_netspace.html | 126 ++++++++++++++++++++++ web/templates/index/chart_plot_count.html | 119 ++++++++++++++++++++ web/templates/index/chart_plots_size.html | 119 ++++++++++++++++++++ web/templates/index/index.html | 16 ++- web/templates/views/index_script_block.js | 6 ++ 8 files changed, 448 insertions(+), 5 deletions(-) create mode 100644 web/templates/index/chart_netspace.html create mode 100644 web/templates/index/chart_plot_count.html create mode 100644 web/templates/index/chart_plots_size.html diff --git a/common/utils/converters.py b/common/utils/converters.py index 3dcbde45..41570040 100644 --- a/common/utils/converters.py +++ b/common/utils/converters.py @@ -22,7 +22,7 @@ def sizeof_fmt(num, suffix='B'): def convert_size(size_bytes): if size_bytes == 0: - return "0B" + return "0 B" size_name = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB") i = int(math.floor(math.log(size_bytes, 1024))) p = math.pow(1024, i) diff --git a/web/actions/stats.py b/web/actions/stats.py index 152b8f4c..a45f81f1 100644 --- a/web/actions/stats.py +++ b/web/actions/stats.py @@ -393,6 +393,25 @@ def load_wallet_balances(blockchain): #app.logger.info(values) return { 'title': blockchain.capitalize() + ' - ' + _('Wallet Balances'), 'dates': dates, 'vals': values} +def load_netspace_size(blockchain): + dates = [] + values = [] + result = db.session.query(StatNetspaceSize).order_by(StatNetspaceSize.created_at.asc()).filter( + StatNetspaceSize.blockchain == blockchain).all() + for i in range(len(result)): + s = result[i] + converted_date = converters.convert_date_for_luxon(s.created_at) + if (i == 0) or (i % 24 == 0) or (i == len(result) - 1): + dates.append(converted_date) + values.append(s.value) + #app.logger.info(dates) + # TODO Handle data crossing single unit boundary (either up or down) + unit = converters.gib_to_fmt(max(values)).split()[1] + converted_values = list(map(lambda x: float(converters.gib_to_fmt(x).split()[0]), values)) + app.logger.info(converted_values) + return { 'title': blockchain.capitalize() + ' - ' + _('Netspace Size'), 'dates': dates, 'vals': converted_values, + 'y_axis_title': _('Size') + ' (' + unit + ')'} + def load_farmed_blocks(blockchain): blocks = [] result = db.session.query(StatFarmedBlocks).order_by(StatFarmedBlocks.created_at.desc()).filter( @@ -414,6 +433,43 @@ def load_farmed_blocks(blockchain): app.logger.info(blocks) return blocks +def load_plot_count(blockchain): + dates = [] + values = [] + result = db.session.query(StatPlotCount).order_by(StatPlotCount.created_at.asc()).filter( + StatPlotCount.blockchain == blockchain).all() + last_value = None + for i in range(len(result)): + s = result[i] + converted_date = converters.convert_date_for_luxon(s.created_at) + if (last_value != s.value) or (i % 24 == 0) or (i == len(result) - 1): + dates.append(converted_date) + values.append(s.value) + last_value = s.value + #app.logger.info(dates) + #app.logger.info(values) + return { 'title': blockchain.capitalize() + ' - ' + _('Plot Counts'), 'dates': dates, 'vals': values} + +def load_plots_size(blockchain): + dates = [] + values = [] + result = db.session.query(StatPlotsSize).order_by(StatPlotsSize.created_at.asc()).filter( + StatPlotsSize.blockchain == blockchain).all() + last_value = None + for i in range(len(result)): + s = result[i] + converted_date = converters.convert_date_for_luxon(s.created_at) + if (last_value != s.value) or (i % 24 == 0) or (i == len(result) - 1): + dates.append(converted_date) + values.append(s.value) + last_value = s.value + # TODO Handle data crossing single unit boundary (either up or down) + unit = converters.gib_to_fmt(max(values)).split()[1] + converted_values = list(map(lambda x: float(converters.gib_to_fmt(x).split()[0]), values)) + app.logger.info(converted_values) + return { 'title': blockchain.capitalize() + ' - ' + _('Plots Size'), 'dates': dates, 'vals': converted_values, + 'y_axis_title': _('Size') + ' (' + unit + ')'} + def wallet_chart_data(farm_summary): for blockchain in farm_summary.farms: balances = load_wallet_balances(blockchain) diff --git a/web/routes.py b/web/routes.py index c77f1d2c..c8a053a3 100644 --- a/web/routes.py +++ b/web/routes.py @@ -95,6 +95,15 @@ def index_chart(): chart_data = stats.load_farmed_coins(blockchain) farmed_blocks = stats.load_farmed_blocks(blockchain) return render_template('index/chart_farmed.html', reload_seconds=120, global_config=gc, chart_data=chart_data, farmed_blocks=farmed_blocks, lang=get_lang(request)) + elif chart_type == 'netspace_size': + chart_data = stats.load_netspace_size(blockchain) + return render_template('index/chart_netspace.html', reload_seconds=120, global_config=gc, chart_data=chart_data, lang=get_lang(request)) + elif chart_type == 'plot_count': + chart_data = stats.load_plot_count(blockchain) + return render_template('index/chart_plot_count.html', reload_seconds=120, global_config=gc, chart_data=chart_data, lang=get_lang(request)) + elif chart_type == 'plots_size': + chart_data = stats.load_plots_size(blockchain) + return render_template('index/chart_plots_size.html', reload_seconds=120, global_config=gc, chart_data=chart_data, lang=get_lang(request)) @app.route('/summary', methods=['GET', 'POST']) def summary(): diff --git a/web/templates/index/chart_netspace.html b/web/templates/index/chart_netspace.html new file mode 100644 index 00000000..c3b25b2b --- /dev/null +++ b/web/templates/index/chart_netspace.html @@ -0,0 +1,126 @@ + + + + + + + + + + + {{ chart_data.title }} + {% if reload_seconds %} + + {% endif %} + + + + + + + +
+ +
+ +
Loaded at: {{ global_config.now }}
+ + + + + + + + + + diff --git a/web/templates/index/chart_plot_count.html b/web/templates/index/chart_plot_count.html new file mode 100644 index 00000000..4c1e9e12 --- /dev/null +++ b/web/templates/index/chart_plot_count.html @@ -0,0 +1,119 @@ + + + + + + + + + + {{ chart_data.title }} + {% if reload_seconds %} + + {% endif %} + + + + + + + +
+ +
+
Loaded at: {{ global_config.now }}
+ + + + + + + diff --git a/web/templates/index/chart_plots_size.html b/web/templates/index/chart_plots_size.html new file mode 100644 index 00000000..c375af54 --- /dev/null +++ b/web/templates/index/chart_plots_size.html @@ -0,0 +1,119 @@ + + + + + + + + + + {{ chart_data.title }} + {% if reload_seconds %} + + {% endif %} + + + + + + + +
+ +
+
Loaded at: {{ global_config.now }}
+ + + + + + + diff --git a/web/templates/index/index.html b/web/templates/index/index.html index 02da6a44..a38f1d0d 100644 --- a/web/templates/index/index.html +++ b/web/templates/index/index.html @@ -67,6 +67,7 @@
{{_('Farming')}}:
+

{{farms[blockchain].plot_count }}

{{_('Total Plots')}}
@@ -74,6 +75,7 @@
{{_('Total Plots')}}
+

{{farms[blockchain].plots_display_size }}

{{_('Total Plots Size')}}
@@ -99,7 +101,7 @@
{{ farms[blockchain].currency_symbol }} {{_('F
- +

{{ blockchain|capitalize }} {{_('Netspace')}}<

{{blockchain|capitalize}} - {{_('Wallets')}}
- +
+ +
{% endif %} @@ -137,7 +141,9 @@
{{blockchain|capitalize}} - {{_('Wallets')}}
{{blockchain|capitalize}} - {{_('Challenges from Harvesters')}}
- +
+ +
{% endif %} @@ -153,7 +159,9 @@
{{blockchain|capitalize}} - {{_('Challenges fr
{{blockchain|capitalize}} - {{_('Partial Proofs for Pools')}}
- +
+ +
{% endif %} diff --git a/web/templates/views/index_script_block.js b/web/templates/views/index_script_block.js index 32ad8777..2d7c812b 100644 --- a/web/templates/views/index_script_block.js +++ b/web/templates/views/index_script_block.js @@ -61,6 +61,8 @@ var myChart = new Chart(ctx, { }, borderWidth: 1, options: { + responsive: true, + maintainAspectRatio: false, plugins: { legend: { labels: { @@ -132,6 +134,8 @@ var myChart = new Chart(ctx, { }, borderWidth: 1, options: { + responsive: true, + maintainAspectRatio: false, plugins: { legend: { labels: { @@ -203,6 +207,8 @@ var myChart = new Chart(ctx, { }, borderWidth: 1, options: { + responsive: true, + maintainAspectRatio: false, plugins: { legend: { labels: { From e8cb0f95a3cd07e2aab0f7c2ce9a86ef29a9a3db Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 5 Jun 2022 11:08:32 -0600 Subject: [PATCH 0764/1625] Handle target_unit conversions. --- api/commands/chia_cli.py | 6 +++--- api/commands/pools_cli.py | 6 +++--- api/schedules/nft_recover.py | 2 +- common/utils/converters.py | 17 +++++++++++++++-- web/actions/stats.py | 13 ++++++------- 5 files changed, 28 insertions(+), 16 deletions(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index f74589de..0de0bb7f 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -77,16 +77,16 @@ def load_wallet_show(blockchain): child = pexpect.spawn("{0} wallet show".format(chia_binary)) wallet_index = 1 while True: - i = child.expect(["Wallet height:.*\r\n", "Wallet keys:.*\r\n", "No online backup file found.*\r\n"], timeout=120) + i = child.expect(["Wallet height:.*\r\n", "Wallet keys:.*\r\n", "Choose wallet key:.*\r\n", "No online backup file found.*\r\n"], timeout=120) 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: + elif i == 1 or i == 2: app.logger.debug("wallet show got index prompt so selecting #{0}".format(wallet_index)) child.sendline("{0}".format(wallet_index)) wallet_index += 1 - elif i == 2: + elif i == 3: child.sendline("S") else: app.logger.debug("pexpect returned {0}".format(i)) diff --git a/api/commands/pools_cli.py b/api/commands/pools_cli.py index 99da0039..1aaa08e9 100644 --- a/api/commands/pools_cli.py +++ b/api/commands/pools_cli.py @@ -89,16 +89,16 @@ def load_plotnft_show(blockchain): child = pexpect.spawn("{0} plotnft show".format(chia_binary)) pool_wallet_id = 1 while True: - i = child.expect(["Wallet height:.*\r\n", "Wallet keys:.*\r\n", "No online backup file found.*\r\n"], timeout=120) + i = child.expect(["Wallet height:.*\r\n", "Wallet keys:.*\r\n", "Choose wallet key:.*\r\n", "No online backup file found.*\r\n"], timeout=120) 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: + elif i == 1 or i == 2: 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 == 2: + elif i == 3: child.sendline("S") else: app.logger.debug("pexpect returned {0}".format(i)) diff --git a/api/schedules/nft_recover.py b/api/schedules/nft_recover.py index 3baa6f97..e94b5bac 100644 --- a/api/schedules/nft_recover.py +++ b/api/schedules/nft_recover.py @@ -56,7 +56,7 @@ def execute(): 'pool_contract_address': pool_contract_address } try: - utils.send_worker_post(fullnode, '/rewards/', payload, debug=True) + utils.send_worker_post(fullnode, '/rewards/', payload, debug=False) except Exception as ex: app.logger.error("Failed to request reward recovery for {0} to {1}:{2} because {3}.".format( fullnode.blockchain, fullnode.hostname, fullnode.port, str(ex))) diff --git a/common/utils/converters.py b/common/utils/converters.py index 41570040..b2ef1ed5 100644 --- a/common/utils/converters.py +++ b/common/utils/converters.py @@ -20,6 +20,16 @@ def sizeof_fmt(num, suffix='B'): return "0" return value +def sizeof_fmt_unit(num, target_unit): + for unit in ['','KiB','MiB','GiB','TiB','PiB','EiB','ZiB']: + if target_unit == unit: + return "{0} {1}".format(flask_babel.format_decimal(num), unit) + num /= 1024.0 + value = "{0} {1}".format(flask_babel.format_decimal(num, 'YiB')) + if value == "0.000 B": + return "0" + return value + def convert_size(size_bytes): if size_bytes == 0: return "0 B" @@ -29,8 +39,11 @@ def convert_size(size_bytes): s = round(size_bytes / p, 2) return "%s %s" % (s, size_name[i]) -def gib_to_fmt(gibs): - return sizeof_fmt(gibs * 1024 * 1024 * 1024) +def gib_to_fmt(gibs, target_unit=None): + if target_unit: + return sizeof_fmt_unit(gibs * 1024 * 1024 * 1024, target_unit=target_unit) + else: + return sizeof_fmt(gibs * 1024 * 1024 * 1024) def str_to_gibs(str): if str == "Unknown": diff --git a/web/actions/stats.py b/web/actions/stats.py index a45f81f1..1f1e3f2e 100644 --- a/web/actions/stats.py +++ b/web/actions/stats.py @@ -405,10 +405,9 @@ def load_netspace_size(blockchain): dates.append(converted_date) values.append(s.value) #app.logger.info(dates) - # TODO Handle data crossing single unit boundary (either up or down) unit = converters.gib_to_fmt(max(values)).split()[1] - converted_values = list(map(lambda x: float(converters.gib_to_fmt(x).split()[0]), values)) - app.logger.info(converted_values) + converted_values = list(map(lambda x: float(converters.gib_to_fmt(x, target_unit=unit).split()[0]), values)) + #app.logger.info(converted_values) return { 'title': blockchain.capitalize() + ' - ' + _('Netspace Size'), 'dates': dates, 'vals': converted_values, 'y_axis_title': _('Size') + ' (' + unit + ')'} @@ -422,7 +421,7 @@ def load_farmed_blocks(blockchain): displayname = w.displayname except: app.logger.debug("Failed to find worker for hostname: {0}".format(ResourceWarning.hostname)) - displayname = hostname + displayname = row.hostname blocks.append({ 'hostname': displayname, 'blockchain': blockchain, @@ -463,10 +462,10 @@ def load_plots_size(blockchain): dates.append(converted_date) values.append(s.value) last_value = s.value - # TODO Handle data crossing single unit boundary (either up or down) + #app.logger.info(dates) unit = converters.gib_to_fmt(max(values)).split()[1] - converted_values = list(map(lambda x: float(converters.gib_to_fmt(x).split()[0]), values)) - app.logger.info(converted_values) + converted_values = list(map(lambda x: float(converters.gib_to_fmt(x, target_unit=unit).split()[0]), values)) + #app.logger.info(converted_values) return { 'title': blockchain.capitalize() + ' - ' + _('Plots Size'), 'dates': dates, 'vals': converted_values, 'y_axis_title': _('Size') + ' (' + unit + ')'} From ea98f691ff063f97bc1e1a799bb2a68aeadc9bb6 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 5 Jun 2022 14:11:10 -0600 Subject: [PATCH 0765/1625] Support old and new Chia CLI formats. --- api/commands/chia_cli.py | 6 +++--- api/commands/pools_cli.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index 0de0bb7f..cd024113 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -77,16 +77,16 @@ def load_wallet_show(blockchain): child = pexpect.spawn("{0} wallet show".format(chia_binary)) wallet_index = 1 while True: - i = child.expect(["Wallet height:.*\r\n", "Wallet keys:.*\r\n", "Choose wallet key:.*\r\n", "No online backup file found.*\r\n"], timeout=120) + 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=120) 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: + elif i == 1 or i == 2 or i == 3: app.logger.debug("wallet show got index prompt so selecting #{0}".format(wallet_index)) child.sendline("{0}".format(wallet_index)) wallet_index += 1 - elif i == 3: + elif i == 4: child.sendline("S") else: app.logger.debug("pexpect returned {0}".format(i)) diff --git a/api/commands/pools_cli.py b/api/commands/pools_cli.py index 1aaa08e9..a948ad43 100644 --- a/api/commands/pools_cli.py +++ b/api/commands/pools_cli.py @@ -89,16 +89,16 @@ def load_plotnft_show(blockchain): child = pexpect.spawn("{0} plotnft show".format(chia_binary)) pool_wallet_id = 1 while True: - i = child.expect(["Wallet height:.*\r\n", "Wallet keys:.*\r\n", "Choose wallet key:.*\r\n", "No online backup file found.*\r\n"], timeout=120) + 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=120) 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: + elif i == 1 or i == 2 or i == 3: 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 == 3: + elif i == 4: child.sendline("S") else: app.logger.debug("pexpect returned {0}".format(i)) From f41f3cc88f107dacbfbe11ce937e1b8e343aacd3 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 5 Jun 2022 16:06:06 -0600 Subject: [PATCH 0766/1625] Fixes in upstream Chiadog for Chia log changes. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 649c5346..fe7368ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. The format ## [0.7.3] - 2022-06-? - Wallets - chart each blockchain's farmed coins and wallet balances over the past month. + - [Chia](https://github.com/Chia-Network/chia-blockchain) - v1.3.6 pre-release for testing - [Cactus](https://github.com/Cactus-Network/cactus-blockchain) - v1.3.4, matches Chia 1.3.4, please run: `cactus db upgrade` - [Chives](https://github.com/HiveProject2021/chives-blockchain) - v1.3.1, please run: `chives db upgrade` - [Cryptodoge](https://github.com/CryptoDoge-Network/cryptodoge) - v1.3.4, matches Chia 1.3.4, please run: `cryptodoge db upgrade` From 8b11e269e94357b1ff61064617854054d1d2a201 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 5 Jun 2022 20:42:49 -0600 Subject: [PATCH 0767/1625] Fix links on Blockchains page. Wiki link. --- web/templates/blockchains.html | 6 +++--- web/templates/index/index.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/templates/blockchains.html b/web/templates/blockchains.html index 700fd587..7d77b42c 100644 --- a/web/templates/blockchains.html +++ b/web/templates/blockchains.html @@ -59,10 +59,10 @@ {{blockchain.peak_time}} {{blockchain.updated_at | datetimefilter}} {% - if blockchain == 'mmx' - %}{% + if blockchain.blockchain == 'mmx' + %}{% else - %}{% + %}{% endif %} diff --git a/web/templates/index/index.html b/web/templates/index/index.html index a38f1d0d..3bd67cdb 100644 --- a/web/templates/index/index.html +++ b/web/templates/index/index.html @@ -117,7 +117,7 @@
{{ blockchain|capitalize }} {{_('Netspace')}}<
From 9f0903b59dc61ea98eb30b38e8441b483002e779 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 6 Jun 2022 14:09:20 -0600 Subject: [PATCH 0768/1625] Farmed block easter egg. --- api/schedules/stats_farm.py | 2 +- web/actions/stats.py | 22 +++++++++++++++++++++- web/static/mario_coin.gif | Bin 0 -> 46317 bytes web/templates/index/index.html | 3 ++- 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 web/static/mario_coin.gif diff --git a/api/schedules/stats_farm.py b/api/schedules/stats_farm.py index d905e2bd..39e6c7de 100644 --- a/api/schedules/stats_farm.py +++ b/api/schedules/stats_farm.py @@ -17,7 +17,7 @@ DELETE_OLD_STATS_AFTER_DAYS = 30 TABLES = [ stats.StatPlotCount, stats.StatPlotsSize, stats.StatTotalCoins, - stats.StatNetspaceSize, stats.StatTimeToWin ] + stats.StatNetspaceSize, stats.StatTimeToWin, stats.StatWalletBalances, ] def delete_old_stats(): try: diff --git a/web/actions/stats.py b/web/actions/stats.py index 1f1e3f2e..f1209b53 100644 --- a/web/actions/stats.py +++ b/web/actions/stats.py @@ -40,7 +40,8 @@ def load_daily_diff(farm_summary): since_str = since_date.strftime("%Y%m%d%H%M%S") summary['plot_count'] = plot_count_diff(since_str, blockchain) summary['plots_size'] = plots_size_diff(since_str, blockchain) - summary['total_coin'] = total_coin_diff(since_str, blockchain) + summary['total_coins'] = total_coin_diff(since_str, blockchain) + summary['wallet_balance'] = wallet_balance_diff(since_str, blockchain) summary['netspace_size'] = netspace_size_diff(since_str, blockchain) #app.logger.info("{0} -> {1}".format(blockchain, summary)) farm_summary.farms[blockchain]['daily_diff'] = summary @@ -88,11 +89,30 @@ def total_coin_diff(since, blockchain): #app.logger.info(before.value) if (latest.value - before.value) != 0: result = ("%+6g " % (latest.value - before.value)) + _('in last day.') + #app.logger.info("Total coins daily diff: {0}".format(result)) except Exception as ex: app.logger.debug("Failed to query for day diff of total_coin because {0}".format(str(ex))) #app.logger.info("Result is: {0}".format(result)) return result +def wallet_balance_diff(since, blockchain): + result = '' + try: + latest = db.session.query(StatWalletBalances).filter(StatWalletBalances.blockchain==blockchain).order_by(StatWalletBalances.created_at.desc()).limit(1).first() + #if blockchain == 'cactus': + # app.logger.info(latest.value) + before = db.session.query(StatWalletBalances).filter(StatWalletBalances.blockchain==blockchain, StatWalletBalances.created_at <= since).order_by(StatWalletBalances.created_at.desc()).limit(1).first() + #if blockchain == 'cactus': + # app.logger.info(before.value) + if (latest.value - before.value) != 0: + result = ("%+6g " % (latest.value - before.value)) + _('in last day.') + #app.logger.info("Total coins daily diff: {0}".format(result)) + except Exception as ex: + app.logger.info("Failed to query for day diff of wallet_balances because {0}".format(str(ex))) + #if blockchain == 'cactus': + # app.logger.info("Result is: {0}".format(result)) + return result + def netspace_size_diff(since, blockchain): result = '' try: diff --git a/web/static/mario_coin.gif b/web/static/mario_coin.gif new file mode 100644 index 0000000000000000000000000000000000000000..ba3ea9565229b80d854ce929360011282fadd7c3 GIT binary patch literal 46317 zcmeIbWl&sux9*E4XdDX?B)A2FYe<3yl8}TDoFuqIg1ftGBaK4~&@|GxyIXK~XxuH$ zB}?A5*52>FcURqW>g+nze5H%(+4LN9jAuN*|063eBP6V6gUNxpkMYM(syF$}C$du+ zs;hdJtLgTut1G%Q9DLmC-*WtV#jn?5V54qUPN8@@!Q$-a+$KSiW>2%qS{8`dT3J{e@kwA_mj?yo&nDE8$W*F zjE$uaPO%P;+!&w8n_gy|9a+GcT-kcGHoCC6efV&9et+rc;_gZM#=$B6VH=g;r>HfzwNT z(!{X{>8^7T#RG`Co|*TE%Orb&TxI!YPK&7Gj%KYZ0;`5_ELI2Mt3%C{q*gRnV00zG zRXVo(wJn~WWX5^?-Ev9_wjrKB|I?}bY^Bkc;v?`4%@dWnoCj6>YvTz(y4HLJLBkoK ziy|J4rqGv#n9wR2E=uwPy}nc+7n5r~d;VxR?)z(~` z>@Id0>ZaBHyf{5T&i2*Sp{}ludfIS2a7c~jJWuhWI7zgbl^$T-D{n}`f4sg5^uS|VOY`0y$4(Dm0sDrW-?KX@tl2&#ZlkL0$RzuSlcuaz_-5fSTKr=9KXg!m??VK?L00 zZ3f6_VzrQ87+d34V@-X@d}!bQ1kqPO!F!V-8UXEJc8=hMuxF0h+~gjj*k_}#CYc4KC;yT_B(?|2ZC-(OqVw>lzf1Y2BX=L%zKZjdz0y(P6M#|{t$ zoh}ePOZE@RuLh#sOGq&Vn4y4Px^uO z8w{S1bRt7?0?HW!Z=!^B5`DGjG&8sT3C7ZIJCippV_0KKPto1cGiqkQdK4(4nSlWi zdiIdA5fzkMPyZAv?z-~O2dk?#*4A{I`UznH-#>AH7kdzvC2$)1A@!~ME)Fdi>*&a*= zHm~sE!+MQYxMTUA(uwH@)H$}kNj<(VC4Lb2+If2@^=I;`-E9`W82G^WgUaA_HM}2jg}KL7GpUq{5_!GL%XD%ejn94=qhClR^|+<%~SXx zK+C@&T`-{nPVED0Y8i8#j6TDUISMfJl~T7ZSG`dZ>q{C^ukn`rW2wQeZ{w7Q=mp{< z;o*08_iQQM*~E{;M0RPhOZ9ro@vmJs_<;dh95|E@#~Tei;3rK`J-Vb%y%rNUame7xnLp7tq4e8^+>Fn9e z`H|%@?cvp_#oR5>4rDL?pzx^Zr1-4#0`arrDqt%h&NwB`qy9F5V(wOAlmBf7g=D#+ zg@=|z4Xn*VsED~TZ;B4{`(%S!@(#?)*;$A|ZABOEqn0JXAsrLW7#Gzfu4A z`8A$TZ@~B2LlWG?_ls}CM0;?G2*!885(L&v(AZo=j=y%`oxM!H2tRTpo1!UIsfv4R5^TOWL#-~jGn?#+y*mBTV{frNnoO;? zx?+FDKUz_CrrODKwL9}Q&|+Hn`D3cvz7hJVE&2#r#4q}Z9TbWO-Ws!uV6~Hv>`RrvW0)jO}A${%T4pV%d@7T#MGvdrCj!M-8x#E%|in~5V4+} zY;w+;ovtlnl4UW#3^M$YIKq~JwL2OIZg)LqGe+<#eEtp+31EfvR8Vq2;qaHp!j$D? z0sx%txKca6o|hR~(%ibr;nC#Fv`~7cU$q%qth$z;KS#;FUEUE_6&J9UGpS#`R0>fq zLbftnnjC^(&ejZd8d+3dE|_puPvdg%_}KNx#5H<8;fQN;e?}D7+*lz%+Tx-&72E1l z)-jUFF{5UZVdohV*I}J*7S|c!R887t{9S|>9A_fJ*ZrkKlP^y+dV;TqcJh+1SL^ZL z?$(g&yY&MG_}ATf6Fl;Ji)#L)yXq<&&*Q7H!33xvuDzD0lIT~9ntDU5@JdQ6oSA?! zw5i^jm5Ma6U!7M$NdnZ(Du5g|tEkx-+<3s?zhb)su<)Cd+$Y*T9~L-=RO3VF8N_%*E(A@4_^K@ zEcfw7 zC^Ej=`wb&s8F5!=>{l*#ocPaGs1TYSD4OkRx4FhosBqwMf6=#NH;l8Vp!}K~Bdmxb ze6Tl}J0dXoF0_yj(GSr>&`gg#o$m`K%!v)KLx5&#Ut-=0lPJw{lQ#b>?7^l`g9~w_Ndb{ z1hvOWqHMkAO{Tm#FMI*nN3P3HSmu3jgidu`@Ko~Xyhydxr2HP5jLrK#@)Md5xaDWK z5X5mek3N{kWR2e8$q37Q$n1FD7cU_v#A3L(9dmue3sPf7PuZ1R&&XG#6xz{m=sz*~ z5K4_NMXNG(0ONK8BeEma+=R1YUZ{XP5?=VRG9`Xt`}7!qW!0vSX$xodNcq$$obB=* zYs}Eas!OP#L~aCYc0aEiHzgGTR@Zpbm;o;1XHS2{SM; z%(CZI*vQR*i!g!@^gE1mL2&?sywpJ_BWTV!KG+W43pPpn=tTyF?cPC|W&>W)i-O_0 zl&0Cm9nxKl#Z~7fTZLf5Nk&q)05}a0Vp^@d~IoOpSv47W? z8*l-?(5gLWQY)-K$*451)1eQ^FTH69;wiv*J`Rf|5b!UEza#pJr;eD{elLpRU3F2y z17}U1b~-`fqGoFDlf5KXz6y9JC%Zpa>YXcxw3d?vB3SPOfC~~!VwLb|-*fgiCDpQo zTZMxYIa4KF;)nPBJN=tZE?Mkdlp)DqYOHb2Iyx+x#LiyCTid)JuDw{ zR)0x==@Lheg5g@pEaA@9SB)%g5PG|8LXb%(*o~wgO9Uc9%_I$XmJ!!wyo?o3p zoN(s#c&vy-=_Y*lHA-a)EZ`U|O``i_Jg%NPydIC$F78~9#|?RABDUSR?<2yQY$BZW|r#eT*hXZHhmgiR6b*GU=^QntDdtVL!>rp44 z&$2FPjtCEKbxFOrfw-@!YWZH8lW-kJ^N>gJg(Y#J{?k=dUVrPW2Sr5eGEt-LQ7q;u zuR3^1z2kWF@_XYcE~s6Ea)3kV&~2n85P!Kze@>IxQ-4Ph=#t}dc5WL1l$Bt z9RFGaVqQ(oP|BCyIx30&D6E@Jv+U0gRYhoiFL*Gfny*$YZ@SS^YQNK6%Xx*R%<5p( z5p0Ot^H@!FN-N?yoj}eB`TA$B0EWe34jXuF*9&2t4kD5MPlK`Jab;^1a~lO2`Dt#Z z@yAb7*R;EowhBud#*94sa-1dvpU>R)eHfp20kN6dHVfZ+HwI(7J0`kYO2S@svNfgU z*heBE2H6|yN~#Ofb{-_fS?B`3u0y#HZt2u}=w6Smxgn$cWZ;Chd6(PO!#&>1@6G%VRcqp#6VuvjxAgrzAKqu(e{JPv!M&MHNy zKzchT4lBZuG2xjV&x(Vo%G`21htIfyoo&$iW57FbVvfi6+Q8K~i|s@mpnWTAUWz1} z8Z*8!CBQH(aNm(7(LD}inB}e9$rK)jCDIT{K)+$^99r;*IWnEgX+1V&gPbkX@@`-@ zq)?g?5>^ZbEakuCy=jsU+z)~j=3%jeVNeCsP0ymjI53p3TY+t{nBfJxIeeJOh!d1- z0NE-_Ql4akAJ%-bKwQu%E>@_*gE>PsI@c_s4_4SVt7S(N&8o5H6tik`_7!(rR_Jef z7L(i*gSp^#8DcgPvm|pjXb+z7RN^acX4XA?c!|;c+@zYJjlns&sGKl?)hc*TD+G?k zcF@J^apw`0Z8cxj<#x};iY8yHSacV>*D439i+z=kq{Y8_qEr-4>=RVtt`I-=Z0Mup zG-TioZ^U7U+PmAwIE-Y(2Lsygh>r(9X>gW}G}*Z7P5k^|4ji(GCKhbB;a1D8<|}qt zLAcrDJIt|?)N;gQjD?;C1W8I|&p*+XNG*r@$X1svM|??r)|5<3eukUokK!MujInT< zPW_U0zHt<)eAo`@CpjYgYrZm#%!`s>6r7q1a9zPvdqG2p{aO*c2g}jdl^&&&tNEr0aC`v zlvh^Lc&=Z{FqHN!CA)gkbW$72aG-h-Jh-h9{f@BizS$G-LS_hld=!y=oTjQ9v81xu zt)kK{2roCDCLesIBbUAJam~=-S`QGnDup^+z`U%iXQ7wVPSCRO&9j})(?bU`W1r5L z_-F1q>Mq23v4@MgvL7V&U#R*sidS*X(+r5w^2mYp6?N*amh#d+Udd9LTH^D;os(%{?L{2zK; zoY6ucOU|_($5A$>hso1=U2wQ8uJt(Hkvz;Wv5f@GaG`T@%m_h|qQ*!$`ZI<|VS&h{ zXnC#<#t<24(V5SaQxnHq}e%3L;`8Q zN3Ms80yxt{8q5mf_n~A1yEj%ELx8QPY>610eM=^28!d67Ujt0Q=4Qdn~><*BAj6gGRK@(?lLWHRCThbEDJ+QR|M3u zo5Ql<7h4s3cf0aHEBlj$bpcqKh4tfi#f)=D=|c({arvqX>u<|W`8Hh=P|~*^uUycz z&2^gMwX2&D(RaK9OqsWM7Dz$6=#gD;44!E9gGz~RqP3o+eKV^Tv5yXh=mh=>Dn zm?|sASvVy!)YCjp!|q`}@XZi|AH%&EikP!s1Ru}eA#$_8enUX891>mH)z07R_J!~) zI!aQ$Vl}SV+h=9vFE(iTf)8iB((nQKVoS>s{4Q<6uu3 zz&TRqvuj$cbH|snOunh2!bT*V55ug9$l$3Gky9=yPd}-Q$=T6J?whV79~ULieyn`89=alu z!tZDYeSFV|JL$k`n=goPT@<*QFk=I_#U>0Y%PVV~2xaHUe-yiLa86*x3z=)Ld9>_F95IfSfZrBgMJ}S3*R_}Lj=rel{SFyQ`ZN?VCC#`{w@olY~ zi(;GVo)?d~NzVliRr+`*0W`ss-*`qtfWk64pAI($@5*;2xk8VPd*5nIx`~S&f0_H} zdsSOAS-h}Hoc>&vLyPBV!>#bkXjj|`|I(-LvtPBzY(MSEci7|6LaNSMcXl$|J0)yg zRJV~Dizzy;D65~QJs%%j}#)0Ud&melpfEi;vK8fd4cu>_0;a@fJrE9J$~Iy2Sx0>@RL8{UM$T_2P&3%Lm6##*Lt|L$6ry9@z#c0#Z5I$@$6 zL0b-&0~=c&+fCgKP+pFcH<+0tVgr(g!azbH85_^AiyPTY3!w0RBu@E0C6c6Zf~~1g zm<9D_6I8{efdnCVVNejyqu|ZroX_lLrL8JfTSe0Vo_vfcX^jR%t=~mM`Lcm?LFI%= zmuVH2gGWL6ZfzAu&GAZQa}AON=~arN!L+LDu9f1+$6HOZXvBteA?rvM39UhQ$vB!D z&Q&0=)^{PI+(nNh>1+ym8qZrgigPYEIyve#c-wBZxme%VdE;VBE-YAWOD1l~u}k&r zB*G-@<+Y^UCIED5D}Q}U>G@EeObzr04N|If$VzIubog*0q!jk0kLqCTTGT%rsmPcX zNV~&9j5+z$-IagJ)|-=a+A?#VpOUQoC&sKRaPNe|6S>7U533YMQU}g*a8G8e($gS@ zqb;?BF(VDlamqt1XM`*6dMKB##VcBf%;v4;SEdmxC7Ptt^lN)Areg0JY&!IY8E)0h zS|AFtn@Bu1Kiqijxz%-x+jh^N%R_7wK%nD#;Fd`wo>|?uesOe>jviL%&_J5 zdb?N&*ld5Ju+a5_GtJWEG6Q}kRT7*VE}4DKrvt~>t+~Rqa-$GR#{7A|ejwZ2)5k=2 zBM7(QCjD(}0%%$?hSm|~lN^0)lO;dIzWHv@3~R`((?7_Nooqd)6jp`5&l@AWoykz?dX=+|{6I=upp z6Hh(%zV4(!2h%pk*W0AP{-X-w@Y`uOJ2Y87^vv_=hxFzQryZ$x8z3}e;tAsPYV@`2 zyA_jqbxxdnv^!<3_J7J2?wo!8Zs$(v_`%25)hytJr&q{BKl2Frpf52LQR)fI_r1K6 zmE(-kNdRftH^5+EUix+I%O-){$bVBzSc<41s)9@7H8wT>B`o*#4-5_s{}>q^8=sgQ z!Je6&n_pO5#9UcfTHjb&T|@35w=j1PH@A*X=l0JoFD_3}r~yKjUFrs}4HEhidyDi2 zXOer;A?^LtEjIVK{oduFtTALmX}SHfSPHW`qFLU7H9O$hUGY3$I+Nv#b9$15Y&WI? z;WO<4lGJ!wLihCsykv2iej-YATEk`lE71hItna}R`F71BZ`kDu=^LW%6UIQ_6u%gt z{16U&A^l!GUdnDY$wOIZFTRh`Lq zH9sNruT45xnjH{+J(@iI&3<_HgTJBp%y-AJRsG!Dni)Iish#f!+cnd+uKhn=&N5R= zI-suR&mJIX?JyNiXulsg#>CrRZ&T;IZ_5a&ao<-pn)f9)$eZ`0vio=4+uB0#Z{6F| z5u?RWp_PBsy@V;a9IK4B*Via(pT@7z$zq@z3@WO^9d}d>C|<^?T6AQ`XuEZMy^j@R zeBHg(?n(n_FFjY148doZN%zX}nUiglrE+oXW-4+4?#Ju7iH-`ljVRnvpNuerNUvKs zYc3JPtf+lfoGc$z6PD~)iB8r`AlHOZYN`R)FwZxP%@Cwtu%4Tf1ejnYPFTQ)fK3+O zAd_HTY>=!*2dYO ztV@+`JIUBXV~ch}qRXNRR!g`8weN-)Q+nrEaXmisgK;zdRNv)h!2HO=LyvpU3ifby z1DV@273Iv_Y^6e#-~8a>0@ixRxhucL$ZM0i)iTH|r(?R;%A);sf!HT7vWWLct+l03?^Ch4$*oBIR&RM&_^uI0%=oMmriJ-zV8GlqOC_7O zi#C}!F3($df)#lIMT^_sThtgjRecqNTGd@Ogms?1ZH39z+db@smgRC{65D8@~=G;Cp;=I*@3>BS`n+3AE(ckd)_N4Ri^`i~A z5fmH{_An%pGCGDlE}k?Ia637L1ehl6k$KC>EzcS30Hwf#6~TXLQi$?vO{%)4wywV6 z&mz-|eZ9T9E;0j{!^4B4V}n0N#;3<8F=rMgCKp$F=T0_YcO7j+cI% z9WGy9?`PH*nXJ_7z4~_PsM2ohHF@2_^-8*Ku3Cc0`AnwTQAL?;;g6mNQOU!9D>CX- zWP3V_ZrlegC4#ovN)CdP%bNC9bj2yF9+k-TcPxq-grTj^HzHVHhA0<`ot(Y6Az(C~{<#UP`PcR;en|~(yu)@>hR~TQa;-}dKS!+1W&1|ctW=G0 zKdTAFWwsDGGhWV%&owBhJTqB^0ug@OBIl;YrSsdU5Tf0ZPoqY(*aeDJWm}Www#XT+ zNSIj@%r#e)y8OtprQr^3ZuOLnZFe8P?5fzb?f3rCmxjzWzlsd_BeS8{%$`;I@?&@R z8j0hx@%7NU8#CGt4t|D?e_A%I6Y1xEw`}~ThyPJzuJ!Q$k0K)>SO0sFd9wZNy2#ws z{SqeDSpFqk40V$+%#7%|xq3zg`Wi0Jwayr-B*D5I{8stw>us#BznZHkDd~9EM-9sf z8cySw3E7&@RsaSn9yvEm3WN=k?p1&CBDLw2&rMMtGiFY~y_9Draf`!WOZ1~5FeLId z0p%qHvMCs4d8!cPrI{;luw*1j1c4F(24~sH;UmWDX&g@#3_!7VY{uZ2m5z;E?Xom* zYHBKg6$$ruY;_bKhN z!?Y+`2-7gBSgCb-Ss8xJnj10=k7TYM>%6cC*~@vtU3;|Q%pG#p%F0<|dUpz1hI^32 zQ~z_YKfmFNbTV_}SB2{A7E=|fqQ(cdF3|jG?ai<48UQJH-0Rfj{F`iq5%5kX$mM>= z6QCGh2a_fnZwTYkSaF-j3KeJP6O>El0QVr|3})qIIVwL)21Khr|#tFheEmX*T&xfyN=S$zD#dVdbIvLn$njv5$v;AHD8$#x7b3&dmOL` z-TY2QBLMc+$rqZf5+FHVG=D8i;~hz=TkErO+e+JKmBd3^KjKaR$*&^QYt-}zr@FF) zpY|0elD3@0d+Xs`FJzN$ZAP@41N%y}r{SKYSZ@o1yGwf!AF%qM>jEY9kNR@|y1wB2 zX$jl;vxyP=?=~@}>Ps&ThoO6HT`CC8IC}z;q}JEPB%yGy;-=lMYgp6DA+RQSc5Fw{ z^@X*I7rDEyAG29t5OIJ-n7ngj6iI|bT(D6nAi)z59+Q~PpP80T0DJ?=@reaN@-qsv z^5MnGxzLL83XIyCsyc8}b3<`EqP4EGsJpQ=uWzurqkr^AbNyJ?MBDUm2rRpId46@a zXDxkYYcqA11Ml$Y_~i8L{NnQGAHy3gt-<@(@YW8aYsCD0JN~%^gZzp5b$uE5EE7uo z-0qTGDoZ|`_BA+0&L+Dnj_X5Xh_MY*PlSM_O*iPCeru}GJFIEeZ+WjHWVlI{L?W4o zFqIQ!ltg~8bX;%8O{P2l-FAE=`h$Nft_Z?VE5+V&CA&h5ilU2n&K)t7-( znQ14)m&iKrV+m@PrHz)Rd$jJ!)q6H`eZCAw)YA?J?W4?wh1EZ8PP%6W{ddGrwrBmT zvbpwJHYal%FGeA8eNG~KQ-4{)KG7KhZ4U9rQk`2`1k-GBc@dB7ZkdqL+23>eNasKn z6i?^)5HL#TL<=UPciyfUee{i4!T!;AR&~Jz7w!?nf-5JR5QFCvN;UfT5X?V^w^H*j z|GnWY?pG6&16l!?fg>A}tQyA^lE1YI8>To+(95T~%yby0#9gwkrM)FGF-rBN0p}$v zacr;%i;J-t-^Y4ya%~ACOTCmOf?MgyqnnL^p4@st1`tdL>Lvi`q~G(9&XFjePj1O%iA6 zfJG3bq`~ikgQTaEjk64zQI!u~Vlw4|Z}*CFRcywoTV`j?R23k$2InlRmlxQ;WxIDd z3L3!l(1J!HL89#@99fs$=5)4dSW7%Oy{OU4<&{-CeYB!Y$Lg^syriZTfYlZ^cMflP zQbmQ;9o6n~-Na0qVfH#&i4}vN^KHT!Uit%`7RVwmi~Am6Ondi>-qR`_Aivg}hH>Pk zvDy;22<+O}L(D;A288v}6If~H#}md?;sR3!UBm)}O@7o^pzr&xr5IfW5hvNKr_{Og z8hwgvGt;Rxg1N5GQTB68nMB*=xB+#Ej1fFMV0iRnc z(>_JUwsDEBl*HfO*(xt4x`0-%%2#aH23mayQdxAUt2Ghw2LA-uzYhhx)*OHIjz%)DTVh@#s4LhT8Ji1I z+hRM0TN@zNW}UFn>E!V)g`WF;f&VCQ7qUYK!YHM&25o>}b_k zHC0DqlNHViI;<=`$Rdl-XtX}-q!1QF(WT&M+_lCWUN(%BWp)!f6irlFZV|v^FMF?R z!&s8|^ixsuStem~l!W_T0w>txfehC0&ZTiaf}#7LQo(_2A4qM0@5fk>%?~36w&2gbPSm{d=y@8Oy5t(g51FWi<_E3fFWE+Jq%NsRTIF{ z2>Ki&J!7<*;;;f*O?5eTOo{wP&&r%;3Kw2V^5hlHiwaa9XNe0ppJ$r1m|q&nIiES!0O`-WMMs?D1&A* zsp)1>I}-}B3GWs_ZWi~;uy2(NtD0_=j{REEP1zy05Oa4m+RB%r9;#NX#W`D4ZUTxd zsy1s0xhqwAOm}MDO+hTH&bE<-6|XPZVGn58+Dmn0Q>@||SBeJHt zXQ)}!sH>M;)clZn%9@haTeGQY!^{(o!@kpRqs~-v-4l`CoA>VK$9{64MnBj68#rtifBv&*Shfl3Ir#2f|MyN7s}%ko$;nOW;ZHG| z`#m3X^X*#AOgE1w@3x6slYM(_b~5;ONlQ>t0pI-foHF4HAq9DA?edpF?l1P+zMpb_ z=!itEiVH7U$f52pCu-CRuNWAmM$N_=YMxIz+tP@v=?8>iucsu@h;GQQx>hzL3bjP1 zE4ZgbrwlK)s_GiKU8MI2u7X_}+qera_j?$w#P$csBwhEIeK;^U*G2fMFx1_bk9MDY z5AQvhzrw_Bn#x4}+|VaXy)llD(AmDo4<{BNJ+!9`CatZje)Nz& zSuSX9Po`&`4}PWyR9hW1w*~9; z{Net;wl}yL?=SyY)Ir78p>%#Oo!uaHYR5F9^6aL_qw@Oswpyh3D5SFfSJgfse#BqUs|iXczz3x+&MS&JdS_-ORrK_oeR0qdYT!;POwHF zK}eAJDCz;PV|p}&bVYg$waQs~EZt|}jJU@(jv4W+1??G8#8GFDBJTi%=@NM0tPFss zU`NK}XO+TP38Cqui`QlIm;1l-WH8N#^x9$ZoBKaR;995u<^Io#QT^5GO=T#v0QQ@V zbEmAZO!5-Locd^Ua)SDAgUcviLcp~I5D>hVz~nyG5*S%feJzX?(q1+oVO8hnn6P^{ zQHmTzt;!xyoKCI_XyK3ydwxNW!W(mnA>|}<%ozjG7l;-&XS0eGX?C27u^b3z<$4$) zclm+aLyO}5GNf6}_>8GpZ3T)gziMaWAvf_RuOh6jb|GRHhBIUet03ufHg6`Xd$ZR} z#@)?bd-E36Ud1REAx|^Ijs|ZLv*FZECr2T>P3PUFYSS*-T+;)XaewkYtwcD{w|<;k zN{0>hR9hC5qd73X$4dUYPZ{58@bEKy_-MsX|LGpA^r5IIXZ{$^Vl~HjbA}dt+*nb( zY*N3AsCc4!kdt$=X(Aso^P~@EJDrJgJs|Mfp>~+Zf_ao<$=JgM1?>?*r1i4$%{`15nB9xNIWq2yIfkJWrb8tDzpd~NCGvKj4f>o_N< z^TGNmcCn4R;?(UuoENVy_S-~ts*Add_qGmdRV7=Gh71c`NvGI%ex3k=Cx1RI_M7z< zy9KlKy&$fi^|>VM5BK?rG1tc?PO?U8GsSc|(W)vSjMdrWfmuQ^-@jL%$8#eNAlKF-!uPH{KMNlXwrvrAee8Vg8rZ?0XcjEGIV8q1u@xmMqQ^G>X%;QjJW?CxEA zC;rpm`lufB_rX=K3F9`MNV433-iyEoe5%#tD5*@@U^2;|_wCkM9Z^g#GhVG*Kkf?Q z(oqRvz4x^l!1H_|8DyKQ6e2-;OjH@cG=M1+$V6N@%-r^?nx!cGZtMQ%;5ryVu|Aa99&Ow zw4;(Q{7}e>;_+YAOuMJD6gdiOaKqDbD$@%^*p8r*ofp>{s<5vlsH%6ZrrN$^m!?eF z?=|<4$y$p2v_AUB;3_z6eLS-w))uV#+DUk4?3YpWb=@_~^wzVAtXJC|<#IN8bt6NB`5{x{~tokqs@|39T)i2x8uexlC}u`7uE`y*umqD4j~?yx||} zdp>CKzuY?N3*)^1ZR_Z`OrvhM{uoo!jWs7$FO1b7(ZH!g24Gf3@gm78?93qfo5`=i zRn^fj^*bKj@7@V~MxqVkJ6=qbEa}wb>YWdQWI9=J!<;aTvjUYxo@GBa@-)r?*lghB zCYz{BfdC6q8yPtQohFdDRv23vOy!&n3Z8KS7vyA!7#EaOQkv!0@)B$UeLthrkvY{l zosG~St|}y~Tmpj39VAsWBJB54Fe|Q8SKKNY;DY3Hj47~h<_6Iq^DCF&?0HqIer%Ri z{8@yS)h8%h$dgx+3~~TG|?|2wi)8sluv8fZ+7#g$lNfI z9+YP2DZx;b)LI>S6D)N!{93l>>By_3e$zCysNL)_K?e3GH+2NfACGInsd?*DCiDs? zK2)Y;Pfs|Bp8)mjdCF$>33b6U(KIyzbLI@F(9GRXn)K?R+Z&NQ|9Cic#mYd;7MI z&mPI6y4A!xEVq0P2&K49>(sk04ysk(0r`6A61ww`r@bY`PaZh{T}M}$wQ2^CNkGgW zTftYDm+Qqkbrv*OOq`&L&qnFW#<X-ZL zd=78OYCW(h1g=4oYpI@-$ml;y^?%z3uG@J0z7MS6^LPyu^Cnn6ySLV#`8*g;sx!uD zAm@!WTd2Z!whwu#g}goBBbLzu={m3P=eE$%T!W?zCB+ez$yC$XmHX`W7+Mwfvn%?L zlE3zW{{b{1Dqo)|iSIF>siH7jEdZAK)rwS_OjQaf%6h zqg$qRK*~MUT&MBQRE@cGLHAV3XM9-)5g9H|&Ob7E2ofYPc#2YvF?dO`ku!Qf7g1yM zkyVh>^W~cuWpv}*IAL^`H&9#lduu23IOG%9;c>9y#DkQ;ufI!a71T0jW$P2CWr`RlY2bv+kSJPIbX!cCmyW=bpyf!f$%5(~u(JiU zH^X_WW_f{!3%*u){YUn&AUlXlCq=8qvkms$0>VPDX%ps!}S9 zv<<_XW54}44!YMto$JEhPFFkyrsVPFkn5qG4Job_*_pDWmBKEL(;-r!6#s5{?4;6mM%(J6d>zqA{^1Yrt`SRdUFy;iQ`;@xal<4fj0w*6 zO_MykzG~?i=t2(ygX5CZW7g#cN^susVXxqVU2(+LG~HTd-jaDE;q7gLa0CEr+24l7 zzOhn7!g4mUOQd2wR>wkmB}-$@F}+ZdL!<-{PlH@XtzMK{I16zuFK zk=32=wO19m;NKA3sqSxOX8)N9er~yS6lU;Rx@>CEZEt_XfA(zq2caqI?C9LX7;h)( zjwH^3?b|x+6L%3-yt8n1*2^nXtZ5k@sSx=d9Ngq*Sc0(nN@^Gm@%!Y-+ow`DNG&Yg zqjeW~9G(%_-S(nb(p`8_{_Iv*zt7{Te~gUT*CmYwL;jEL;}K7pJbQ5YSWofN+|o0> zijeS%bZAcM)@h@)0DGxDc7@h)%>x({RaubCeO^#8jMB&GaQ!`R);m+*%KE$I_j&5s z?Tj8Q@xA6W0O-drRmnf>b^Sg^UEFshZ!P1_>S^ceAY|k366_Z0;rJ}vCo(KHBG4|E3oX3B;mklT?4sC6nhaE}WKl zTK^`k-oI%(`g?*u@6kZbpt2sj*`L0eD^ zEk~5z$N%+)e}70-T)$o1-`+5}+MhJ!Sn6*_062a6bp(LI-(LLJ)urDAkN$ae&j0S} z?&Y=(Y&+Ld^Efcv4wj{1G;ZYKu33!`R#FZB_*tO*r*O88$(TrMT&W>p_M}=a^>!Y2 zEzw};G5&=W^YHGa=O9VF=25L;ZZ){lO0lDQv(!$eknP$ zkKYJ!WC;}T!Sa>(i%PDQl|lrl0$yAF`z8K<$^rUI`+v`u_V@qjfAdR=Pw?j<7lRn& ze{KiNi3^$Pf^q>TkU7pN4!o@QM2l50`GTvx=ZTZ9Dm2pM+rwRn){cYoU7B8`vx}DP``6^dJaL>NRAV9)J1_dRh3YBK?^qNwHPK8ue zSxt^z1E@)@NK(r=$y=mibqgh7D4Wf#xUY zac37O-(=KJLKZ99D$5xtl~3%O&PIFUOfl%9^5;^m2T8A7qESyeTKTCXU0&Q9?0Bhn zhd?R{{JNQ(0pwOUhy5N+axQ5s%(F%Y@r0fS=wQ%88Z9dB{vm zL*)2j{Z3MBw7wGPag*8y&!e%i`}$8zTw6b+OcY95`)t|Ry-<&_vM$Xwu`@5PS=*Sv z5aZra)z#9g#C`Z4s$=U@OxcR{L$|I|j{A!?*s*x1H#M`D;!h#*kJ0;IJL79lN>7rV z=WM+<;f|Ji`QBW!JgrWu%i;cF&#IUpO_IlNjAmQv=X0yE$);fD{%O(Ojm04yZp&H> zr=#`pB==i7)h;_wByv_#{0fD-T0cTidf@mmr5S8q)^o zMUBrVst17#;*Ci0b0Rf**A0@L6&!M{SPD9rQok+SG)(eV$2Uq*s{N#%=Cy*K9SC_w zxo#O9m$2v;-;hO8@U!0#}vz% zV3h>wn5F_sJ=i@`lyfG$3hZYFAG`A~zsMfk2@M`iRo^IOF>qchrnS-dY{xn^L0>+t zT*YC}kN}~pTm(O4sMu1u;HstyddO8pUyfv`eYlatUH5RxiLsnS{bNDV4ap=P$0N#0 zsit;`YFIPD8!Bka9l<1P@Ttudcay0BkGAh3e!Ptp*44SSGgGiX+<|SV8(y9B`H@lg ze2>{&k0kb}4W8&1D>zJmFy+wlIZ_ioz{^1WbV!k`zvL!A*4#l80ll#Fh=#3J+Nj!z zQReXH@ci{r1Jh8u35=*3%rVQR8sHS0oT;FTgO1qFj7y=G_lyVa&-r^kWHZHcJd6e9 zcCND*_VY!|!X);~k`iHOl`%~QjuT1F&}W`KXAq3_jzkiSjb>1qWMZRUy0@`(R?ME zuSD~eXucB7S6&|yf#xgGd?lK%MDvwsz7ow>qWMZRUy0@`(R}6q&-1|0d?lK%MDvws zz7ow>{&g@Any*Cjm1w>a%~$@PIjRiJSN;(Vgyt*Jd?lK%MDvw@CKmriAfow7G+&8^ zg8x@T!DznnI<#mV%~zuNN;F@I<}1;BB|5(nonML0uSDlpqVp@!`IYGWN_2iDI=>Q~ zUy07IMCVtc^DEK$mFWCRbbh5D%R&I--_pnb7NdgBuSDlpqVp@!`IYGWN_2iDI=>Q~ zUy07IMCVtc^DEK$mFWD+A&3q-zY?8aiO#P?=U1ZhE7AFt==@4_ekBG+B*s6|c+vTl z==@4_ekD4;5}jX};0XwiNlfR@Ov@$!z5(U<{4bEw(0nDDuSDlpqVp@!`IYGWN|pb) U`IWf0egzn!^DF;-ex>OD1F>S?IsgCw literal 0 HcmV?d00001 diff --git a/web/templates/index/index.html b/web/templates/index/index.html index 3bd67cdb..583d591b 100644 --- a/web/templates/index/index.html +++ b/web/templates/index/index.html @@ -86,13 +86,14 @@
{{_('Total Plots Size')}}
- +

{{farms[blockchain].wallet_balance }}

{{ farms[blockchain].currency_symbol }} {{_('Balance')}}
+

Date: Mon, 6 Jun 2022 18:01:14 -0600 Subject: [PATCH 0769/1625] Fixes for charts. --- .github/workflows/test-btcgreen.yaml | 1 + .github/workflows/test-cactus.yaml | 1 + .github/workflows/test-chia.yaml | 1 + .github/workflows/test-chives.yaml | 1 + .github/workflows/test-cryptodoge.yaml | 1 + .github/workflows/test-flax.yaml | 1 + .github/workflows/test-flora.yaml | 1 + .github/workflows/test-hddcoin.yaml | 1 + .github/workflows/test-maize.yaml | 1 + .github/workflows/test-nchain.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 + api/gunicorn.conf.py | 1 + api/models/chia.py | 17 +++++------ scripts/madmax_setup.sh | 4 +-- web/actions/stats.py | 40 ++++++++++++++------------ web/templates/index/index.html | 2 +- 19 files changed, 48 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test-btcgreen.yaml b/.github/workflows/test-btcgreen.yaml index ed5a0613..9f620071 100644 --- a/.github/workflows/test-btcgreen.yaml +++ b/.github/workflows/test-btcgreen.yaml @@ -41,6 +41,7 @@ jobs: push: true build-args: | "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" "BTCGREEN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-btcgreen:test diff --git a/.github/workflows/test-cactus.yaml b/.github/workflows/test-cactus.yaml index 80503312..9fe4a7cb 100644 --- a/.github/workflows/test-cactus.yaml +++ b/.github/workflows/test-cactus.yaml @@ -41,6 +41,7 @@ jobs: push: true build-args: | "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" "CACTUS_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-cactus:test diff --git a/.github/workflows/test-chia.yaml b/.github/workflows/test-chia.yaml index 53cd6fee..5e2f1398 100644 --- a/.github/workflows/test-chia.yaml +++ b/.github/workflows/test-chia.yaml @@ -41,6 +41,7 @@ jobs: push: true build-args: | "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" "CHIA_BRANCH=latest" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:test diff --git a/.github/workflows/test-chives.yaml b/.github/workflows/test-chives.yaml index c4a55756..65a746d8 100644 --- a/.github/workflows/test-chives.yaml +++ b/.github/workflows/test-chives.yaml @@ -41,6 +41,7 @@ jobs: push: true build-args: | "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" "CHIVES_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:test diff --git a/.github/workflows/test-cryptodoge.yaml b/.github/workflows/test-cryptodoge.yaml index b3456aec..4a61152b 100644 --- a/.github/workflows/test-cryptodoge.yaml +++ b/.github/workflows/test-cryptodoge.yaml @@ -41,6 +41,7 @@ jobs: push: true build-args: | "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" "CRYPTODOGE_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-cryptodoge:test diff --git a/.github/workflows/test-flax.yaml b/.github/workflows/test-flax.yaml index c8889264..0192e6bd 100644 --- a/.github/workflows/test-flax.yaml +++ b/.github/workflows/test-flax.yaml @@ -41,6 +41,7 @@ jobs: push: true build-args: | "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" "FLAX_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-flax:test diff --git a/.github/workflows/test-flora.yaml b/.github/workflows/test-flora.yaml index 4e447deb..7f1d1ade 100644 --- a/.github/workflows/test-flora.yaml +++ b/.github/workflows/test-flora.yaml @@ -41,6 +41,7 @@ jobs: push: true build-args: | "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" "FLORA_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-flora:test diff --git a/.github/workflows/test-hddcoin.yaml b/.github/workflows/test-hddcoin.yaml index 8bd7d9ca..cde549b8 100644 --- a/.github/workflows/test-hddcoin.yaml +++ b/.github/workflows/test-hddcoin.yaml @@ -41,6 +41,7 @@ jobs: push: true build-args: | "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" "HDDCOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-hddcoin:test diff --git a/.github/workflows/test-maize.yaml b/.github/workflows/test-maize.yaml index 0975021d..d962bfb4 100644 --- a/.github/workflows/test-maize.yaml +++ b/.github/workflows/test-maize.yaml @@ -41,6 +41,7 @@ jobs: push: true build-args: | "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" "MAIZE_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-maize:test diff --git a/.github/workflows/test-nchain.yaml b/.github/workflows/test-nchain.yaml index 7b01482c..7b41a0f7 100644 --- a/.github/workflows/test-nchain.yaml +++ b/.github/workflows/test-nchain.yaml @@ -41,6 +41,7 @@ jobs: push: true build-args: | "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" "NCHAIN_BRANCH=net9.dev" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-nchain:test diff --git a/.github/workflows/test-shibgreen.yaml b/.github/workflows/test-shibgreen.yaml index 33ec46f3..3f49f7cd 100644 --- a/.github/workflows/test-shibgreen.yaml +++ b/.github/workflows/test-shibgreen.yaml @@ -41,6 +41,7 @@ jobs: push: true build-args: | "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" "SHIBGREEN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-shibgreen:test diff --git a/.github/workflows/test-silicoin.yaml b/.github/workflows/test-silicoin.yaml index 3d630fc5..c76b9532 100644 --- a/.github/workflows/test-silicoin.yaml +++ b/.github/workflows/test-silicoin.yaml @@ -41,6 +41,7 @@ jobs: push: true build-args: | "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" "SILICOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-silicoin:test diff --git a/.github/workflows/test-staicoin.yaml b/.github/workflows/test-staicoin.yaml index d9b90ec3..6b85777a 100644 --- a/.github/workflows/test-staicoin.yaml +++ b/.github/workflows/test-staicoin.yaml @@ -41,6 +41,7 @@ jobs: push: true build-args: | "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" "STAICOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-staicoin:test diff --git a/.github/workflows/test-stor.yaml b/.github/workflows/test-stor.yaml index fbce9f3c..e0fe9475 100644 --- a/.github/workflows/test-stor.yaml +++ b/.github/workflows/test-stor.yaml @@ -41,6 +41,7 @@ jobs: push: true build-args: | "MACHINARIS_STREAM=test" + "CHIADOG_BRANCH=dev" "STOR_BRANCH=master" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-stor:test diff --git a/api/gunicorn.conf.py b/api/gunicorn.conf.py index 7e19bf0b..519df518 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -78,6 +78,7 @@ def on_starting(server): scheduler.add_job(func=stats_balances.collect, name="stats_balances", trigger='cron', minute=0) # Hourly # Testing only + #scheduler.add_job(func=stats_balances.collect, name="stats_balances", trigger='interval', seconds=10) # Test immediately #scheduler.add_job(func=stats_effort.calculate, name="stats_effort", trigger='interval', seconds=10) # Test immediately app.logger.debug("Starting background scheduler...") diff --git a/api/models/chia.py b/api/models/chia.py index 64a76b78..f4f6ea6c 100644 --- a/api/models/chia.py +++ b/api/models/chia.py @@ -90,11 +90,14 @@ def __init__(self, wallets, cold_wallet_addresses={}): total_balance = float(hot_balance) + float(cold_balance) except: total_balance = hot_balance - self.rows.append({ - 'hostname': wallet.hostname, - 'blockchain': wallet.blockchain, - 'total_balance': total_balance, - 'updated_at': wallet.updated_at }) + if hot_balance: + self.rows.append({ + 'hostname': wallet.hostname, + 'blockchain': wallet.blockchain, + 'total_balance': total_balance, + 'updated_at': wallet.updated_at }) + else: + app.logger.info("Skipping blockchain {0}".format(wallet.blockchain)) def exclude_cat_wallets(self, wallet_details): details = [] @@ -116,9 +119,7 @@ def sum_chia_wallet_balance(self, hostname, blockchain, include_cold_balance=Tru rx = re.compile(numeric_const_pattern, re.VERBOSE) sum = 0 for wallet in self.wallets: - if not 'Sync status: Synced' in wallet.details: - raise Exception('{0} wallet is not synced, so balance is unknown.') - elif wallet.hostname == hostname and wallet.blockchain == blockchain: + if wallet.hostname == hostname and wallet.blockchain == blockchain and wallet.is_synced(): try: for balance in rx.findall(self.exclude_cat_wallets(wallet.details)): #app.logger.info("Found balance of {0} for for {1} - {2}".format(balance, diff --git a/scripts/madmax_setup.sh b/scripts/madmax_setup.sh index 43ea5ea0..f1427840 100644 --- a/scripts/madmax_setup.sh +++ b/scripts/madmax_setup.sh @@ -4,8 +4,8 @@ # See https://github.com/madMAx43v3r/chia-plotter # -# As of 2022-05-18 -HASH=514c51610e70991bfb8160782b12a08bd62259a1 +# As of 2022-06-06 +HASH=ced900e9ea72a5d0e5db785f34be37d98bcda6a9 MADMAX_BRANCH=master if [[ (${mode} == 'fullnode' || ${mode} =~ "plotter") && (${blockchains} == 'chia' || ${blockchains} == 'chives' || ${blockchains} == 'mmx') ]]; then diff --git a/web/actions/stats.py b/web/actions/stats.py index f1209b53..80fe9ddd 100644 --- a/web/actions/stats.py +++ b/web/actions/stats.py @@ -53,7 +53,7 @@ def plot_count_diff(since, blockchain): #app.logger.info(latest.value) before = db.session.query(StatPlotCount).filter(StatPlotCount.blockchain==blockchain, StatPlotCount.created_at <= since).order_by(StatPlotCount.created_at.desc()).limit(1).first() #app.logger.info(before.value) - if (latest.value - before.value) != 0: + if (latest and before) and (latest.value - before.value) != 0: result = ("%+0g " % (latest.value - before.value)) + _('in last day.') except Exception as ex: app.logger.debug("Failed to query for day diff of plot_count because {0}".format(str(ex))) @@ -67,14 +67,15 @@ def plots_size_diff(since, blockchain): #app.logger.info(latest.value) before = db.session.query(StatPlotsSize).filter(StatPlotsSize.blockchain==blockchain, StatPlotsSize.created_at <= since).order_by(StatPlotsSize.created_at.desc()).limit(1).first() #app.logger.info(before.value) - gibs = (latest.value - before.value) - fmtted = converters.gib_to_fmt(gibs) - if fmtted == "0 B": - result = "" - elif not fmtted.startswith('-'): - result = "+{0} in last day.".format(fmtted) - else: - result = fmtted + if (latest and before): + gibs = (latest.value - before.value) + fmtted = converters.gib_to_fmt(gibs) + if fmtted == "0 B": + result = "" + elif not fmtted.startswith('-'): + result = "+{0} in last day.".format(fmtted) + else: + result = fmtted except Exception as ex: app.logger.debug("Failed to query for day diff of plots_size because {0}".format(str(ex))) #app.logger.info("Result is: {0}".format(result)) @@ -87,7 +88,7 @@ def total_coin_diff(since, blockchain): #app.logger.info(latest.value) before = db.session.query(StatTotalCoins).filter(StatTotalCoins.blockchain==blockchain, StatTotalCoins.created_at <= since).order_by(StatTotalCoins.created_at.desc()).limit(1).first() #app.logger.info(before.value) - if (latest.value - before.value) != 0: + if (latest and before) and (latest.value - before.value) != 0: result = ("%+6g " % (latest.value - before.value)) + _('in last day.') #app.logger.info("Total coins daily diff: {0}".format(result)) except Exception as ex: @@ -104,7 +105,7 @@ def wallet_balance_diff(since, blockchain): before = db.session.query(StatWalletBalances).filter(StatWalletBalances.blockchain==blockchain, StatWalletBalances.created_at <= since).order_by(StatWalletBalances.created_at.desc()).limit(1).first() #if blockchain == 'cactus': # app.logger.info(before.value) - if (latest.value - before.value) != 0: + if (latest and before) and (latest.value - before.value) != 0: result = ("%+6g " % (latest.value - before.value)) + _('in last day.') #app.logger.info("Total coins daily diff: {0}".format(result)) except Exception as ex: @@ -120,14 +121,15 @@ def netspace_size_diff(since, blockchain): #app.logger.info(latest.value) before = db.session.query(StatNetspaceSize).filter(StatNetspaceSize.blockchain==blockchain, StatNetspaceSize.created_at <= since).order_by(StatNetspaceSize.created_at.desc()).limit(1).first() #app.logger.info(before.value) - gibs = (latest.value - before.value) - fmtted = converters.gib_to_fmt(gibs) - if fmtted == "0 B": - result = "" - elif not fmtted.startswith('-'): - result = ("+{0} ".format(fmtted)) + _('in last day.') - else: - result = ("{0} ".format(fmtted)) + _('in last day.') + if (latest and before): + gibs = (latest.value - before.value) + fmtted = converters.gib_to_fmt(gibs) + if fmtted == "0 B": + result = "" + elif not fmtted.startswith('-'): + result = ("+{0} ".format(fmtted)) + _('in last day.') + else: + result = ("{0} ".format(fmtted)) + _('in last day.') except Exception as ex: app.logger.debug("Failed to query for day diff of netspace_size because {0}".format(str(ex))) #app.logger.debug("Result is: {0}".format(result)) diff --git a/web/templates/index/index.html b/web/templates/index/index.html index 583d591b..90801732 100644 --- a/web/templates/index/index.html +++ b/web/templates/index/index.html @@ -93,7 +93,7 @@

{{ farms[blockchain].currency_symbol }} {{_('B
- +

Date: Mon, 6 Jun 2022 19:22:22 -0600 Subject: [PATCH 0770/1625] Run Chia main on test branch now. --- .github/workflows/test-chia.yaml | 2 +- api/gunicorn.conf.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-chia.yaml b/.github/workflows/test-chia.yaml index 5e2f1398..2003cebd 100644 --- a/.github/workflows/test-chia.yaml +++ b/.github/workflows/test-chia.yaml @@ -42,7 +42,7 @@ jobs: build-args: | "MACHINARIS_STREAM=test" "CHIADOG_BRANCH=dev" - "CHIA_BRANCH=latest" + "CHIA_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:test ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris:test diff --git a/api/gunicorn.conf.py b/api/gunicorn.conf.py index 519df518..3f1f30d0 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -78,6 +78,7 @@ def on_starting(server): scheduler.add_job(func=stats_balances.collect, name="stats_balances", trigger='cron', minute=0) # Hourly # Testing only + #scheduler.add_job(func=restart_stuck_farmer.execute, name="restart_farmer_if_stuck", 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=stats_effort.calculate, name="stats_effort", trigger='interval', seconds=10) # Test immediately From e74daf49013bba21daa9ace9e18127ca8e2e0ea8 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 6 Jun 2022 20:51:07 -0600 Subject: [PATCH 0771/1625] Extract messages. --- .../de_DE/LC_MESSAGES/messages.po | 2 +- .../fr_FR/LC_MESSAGES/messages.po | 2 +- .../it_IT/LC_MESSAGES/messages.po | 2 +- .../nl_NL/LC_MESSAGES/messages.po | 2 +- .../pt_PT/LC_MESSAGES/messages.po | 2 +- api/translations/zh/LC_MESSAGES/messages.po | 2 +- web/templates/index/chart_balances.html | 1 + .../de_DE/LC_MESSAGES/messages.po | 392 ++++++++++------- .../fr_FR/LC_MESSAGES/messages.po | 396 +++++++++++------- .../it_IT/LC_MESSAGES/messages.po | 395 ++++++++++------- .../nl_NL/LC_MESSAGES/messages.po | 396 +++++++++++------- .../pt_PT/LC_MESSAGES/messages.po | 396 +++++++++++------- web/translations/zh/LC_MESSAGES/messages.po | 387 ++++++++++------- 13 files changed, 1405 insertions(+), 970 deletions(-) diff --git a/api/translations/de_DE/LC_MESSAGES/messages.po b/api/translations/de_DE/LC_MESSAGES/messages.po index 0aa19d6c..9a81e82a 100644 --- a/api/translations/de_DE/LC_MESSAGES/messages.po +++ b/api/translations/de_DE/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-04-23 11:14-0600\n" +"POT-Creation-Date: 2022-06-06 20:47-0600\n" "PO-Revision-Date: 2022-02-15 14:29-0700\n" "Last-Translator: ApfelBirneKreis\n" "Language: de\n" diff --git a/api/translations/fr_FR/LC_MESSAGES/messages.po b/api/translations/fr_FR/LC_MESSAGES/messages.po index 59b29781..a63d5ee7 100644 --- a/api/translations/fr_FR/LC_MESSAGES/messages.po +++ b/api/translations/fr_FR/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-04-23 11:14-0600\n" +"POT-Creation-Date: 2022-06-06 20:47-0600\n" "PO-Revision-Date: 2022-02-15 14:29-0700\n" "Last-Translator: Guy Davis\n" "Language: fr\n" diff --git a/api/translations/it_IT/LC_MESSAGES/messages.po b/api/translations/it_IT/LC_MESSAGES/messages.po index 946ad856..7c5c6d4f 100644 --- a/api/translations/it_IT/LC_MESSAGES/messages.po +++ b/api/translations/it_IT/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-04-23 11:14-0600\n" +"POT-Creation-Date: 2022-06-06 20:47-0600\n" "PO-Revision-Date: 2022-02-15 14:29-0700\n" "Last-Translator: Fabrizio Cacicia\n" "Language: it\n" diff --git a/api/translations/nl_NL/LC_MESSAGES/messages.po b/api/translations/nl_NL/LC_MESSAGES/messages.po index 2dfb1d07..7c50daac 100644 --- a/api/translations/nl_NL/LC_MESSAGES/messages.po +++ b/api/translations/nl_NL/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris/issuesPOT-" "Creation-Date: 2022-03-13 10:30-0600\n" -"POT-Creation-Date: 2022-04-23 11:14-0600\n" +"POT-Creation-Date: 2022-06-06 20:47-0600\n" "PO-Revision-Date: 2022-03-13 10:29-0600\n" "Last-Translator: Bernie Deprez\n" "Language: nl_NL\n" diff --git a/api/translations/pt_PT/LC_MESSAGES/messages.po b/api/translations/pt_PT/LC_MESSAGES/messages.po index bcdfd04f..cb303b8b 100644 --- a/api/translations/pt_PT/LC_MESSAGES/messages.po +++ b/api/translations/pt_PT/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-04-23 11:14-0600\n" +"POT-Creation-Date: 2022-06-06 20:47-0600\n" "PO-Revision-Date: 2022-02-13 13:45-0700\n" "Last-Translator: Antonio Casqueiro\n" "Language: pt\n" diff --git a/api/translations/zh/LC_MESSAGES/messages.po b/api/translations/zh/LC_MESSAGES/messages.po index 2445242e..73e243c1 100644 --- a/api/translations/zh/LC_MESSAGES/messages.po +++ b/api/translations/zh/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-04-23 11:14-0600\n" +"POT-Creation-Date: 2022-06-06 20:47-0600\n" "PO-Revision-Date: 2022-02-15 14:29-0700\n" "Last-Translator: Guy Davis\n" "Language: zh\n" diff --git a/web/templates/index/chart_balances.html b/web/templates/index/chart_balances.html index b1177849..d45f265e 100644 --- a/web/templates/index/chart_balances.html +++ b/web/templates/index/chart_balances.html @@ -77,6 +77,7 @@ x: { type: 'time', time: { + unit: 'day', tooltipFormat: 'DD T' }, title: { diff --git a/web/translations/de_DE/LC_MESSAGES/messages.po b/web/translations/de_DE/LC_MESSAGES/messages.po index c940ae28..8c62ac10 100644 --- a/web/translations/de_DE/LC_MESSAGES/messages.po +++ b/web/translations/de_DE/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-04-23 11:14-0600\n" +"POT-Creation-Date: 2022-06-06 20:47-0600\n" "PO-Revision-Date: 2022-02-13 13:45-0700\n" "Last-Translator: ApfelBirneKreisLanguage: de\n" "Language: de_DE\n" @@ -18,31 +18,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.1\n" -#: routes.py:90 routes.py:233 +#: routes.py:113 routes.py:256 msgid "Saved local currency setting." msgstr "Lokale Währungseinstellung gespeichert" -#: routes.py:110 +#: routes.py:133 msgid "Blockchain download" msgstr "Blockchain herunterladen" -#: routes.py:142 +#: routes.py:165 msgid "Unknown plotting form" msgstr "Unbekannte Plotting Configuration" -#: routes.py:192 +#: routes.py:215 msgid "Error! Please see logs." msgstr "FEHLER! Bitte prüfe die Logs" -#: routes.py:218 +#: routes.py:241 msgid "Unknown alerts form" msgstr "Unbekannte Alarm Configuration" -#: routes.py:238 +#: routes.py:261 msgid "Saved cold wallet addresses." msgstr "Cold Wallet Adressen gespeichert" -#: routes.py:306 +#: routes.py:329 msgid "" "Saved mapping settings. Please allow 10 minutes to generate location " "information for the map." @@ -50,11 +50,11 @@ msgstr "" "Kartendaten gespeichert. Bitte warte bis zu 10 min bis diekartendaten " "generiert wurden" -#: routes.py:314 +#: routes.py:337 msgid "Unknown form action" msgstr "Unbekannte Aktions konfiguration" -#: routes.py:420 +#: routes.py:443 #, python-format msgid "" "No worker at %(worker)s for blockchain %(blockchain)s. Please select " @@ -63,35 +63,35 @@ msgstr "" "Kein passender Worker für %(blockchain)s auf %(worker)s gefundenBitte " "andere Blockchain wählen" -#: routes.py:426 +#: routes.py:449 #, python-format msgid "" "For Alerts config, found no responding fullnode found for %(blockchain)s." " Please check your workers." msgstr "Keine Fullnode für %(blockchain)s Alerts gefundenBitte Worker überprüfen" -#: routes.py:431 +#: routes.py:454 #, python-format msgid "" "For Farming config, found no responding fullnode found for " "%(blockchain)s. Please check your workers." msgstr "Keine Fullnode für %(blockchain)s Farming gefundenBitte Worker überprüfen" -#: routes.py:438 +#: routes.py:461 #, python-format msgid "" "For Plotting config, found no responding fullnode found for " "%(blockchain)s. Please check your workers." msgstr "Keine Fullnode für %(blockchain)s Plotting gefundenBitte Worker überprüfen" -#: routes.py:443 +#: routes.py:466 #, python-format msgid "" "No responding fullnode found for %(blockchain)s. Please check your " "workers." msgstr "Keine Fullnode für %(blockchain)s gefundenBitte Worker überprüfen" -#: routes.py:462 +#: routes.py:485 msgid "Unsupported log type" msgstr "Nicht unterstützter Log Typ" @@ -120,7 +120,8 @@ msgid "Idle" msgstr "Untätig" #: actions/plotman.py:47 actions/plotman.py:48 models/chia.py:211 -#: models/plotman.py:67 templates/index.html:42 templates/index.html:52 +#: models/plotman.py:67 templates/index/index.html:42 +#: templates/index/index.html:52 msgid "Active" msgstr "Aktiv" @@ -128,19 +129,45 @@ msgstr "Aktiv" msgid "Suspended" msgstr "Beendet" -#: actions/stats.py:56 actions/stats.py:90 actions/stats.py:108 -#: actions/stats.py:110 +#: actions/stats.py:57 actions/stats.py:92 actions/stats.py:109 +#: actions/stats.py:130 actions/stats.py:132 msgid "in last day." msgstr "währen des letzten tags" -#: actions/stats.py:338 +#: actions/stats.py:360 msgid "secs" msgstr "Sekunden" -#: actions/stats.py:348 models/chia.py:251 +#: actions/stats.py:370 models/chia.py:251 msgid "hour" msgstr "Stunde" +#: actions/stats.py:399 templates/views/index_script_block.js:51 +msgid "Farmed Coins" +msgstr "" + +#: actions/stats.py:416 +#, fuzzy +msgid "Wallet Balances" +msgstr "Wallet Bilanz" + +#: actions/stats.py:433 templates/index/index.html:105 +msgid "Netspace Size" +msgstr "" + +#: actions/stats.py:434 actions/stats.py:492 +msgid "Size" +msgstr "" + +#: actions/stats.py:472 +msgid "Plot Counts" +msgstr "" + +#: actions/stats.py:491 templates/index/index.html:78 +#, fuzzy +msgid "Plots Size" +msgstr "Gesamte Plot Größe" + #: actions/warnings.py:56 msgid "Dismiss Warning" msgstr "Warnung entfernen" @@ -189,11 +216,11 @@ msgstr "" msgid "days" msgstr "Tage" -#: models/chia.py:213 templates/summary.html:100 templates/wallet.html:128 +#: models/chia.py:213 templates/summary.html:105 templates/wallet.html:129 msgid "Syncing" msgstr "Synchronisierung" -#: models/chia.py:215 templates/index.html:54 +#: models/chia.py:215 templates/index/index.html:54 msgid "Not available" msgstr "Nicht erreichbar" @@ -201,9 +228,10 @@ msgstr "Nicht erreichbar" msgid "Not synced" msgstr "Nicht Syncronisiert" -#: models/chia.py:220 templates/index.html:54 templates/plotting/jobs.html:114 -#: templates/plotting/workers.html:116 templates/summary.html:96 -#: templates/wallet.html:124 templates/worker.html:78 templates/workers.html:72 +#: models/chia.py:220 templates/index/index.html:54 +#: templates/plotting/jobs.html:114 templates/plotting/workers.html:116 +#: templates/summary.html:101 templates/wallet.html:125 +#: templates/worker.html:78 templates/workers.html:72 msgid "Offline" msgstr "Offline" @@ -264,16 +292,16 @@ msgid "Alerts: Recent Notifications" msgstr "Alerts: Kürzliche Nachrichten" #: templates/alerts.html:72 templates/drives.html:86 -#: templates/settings/alerts.html:36 templates/settings/farming.html:37 -#: templates/settings/plotting.html:37 templates/settings/tools.html:36 -#: templates/worker.html:14 +#: templates/index/chart_farmed.html:52 templates/settings/alerts.html:36 +#: templates/settings/farming.html:37 templates/settings/plotting.html:37 +#: templates/settings/tools.html:36 templates/worker.html:14 msgid "Worker" msgstr "Worker" -#: templates/alerts.html:73 templates/blockchains.html:31 +#: templates/alerts.html:73 templates/blockchains.html:35 #: templates/settings/alerts.html:45 templates/settings/farming.html:46 #: templates/settings/plotting.html:46 templates/settings/tools.html:45 -#: templates/summary.html:73 templates/wallet.html:108 templates/worker.html:47 +#: templates/summary.html:77 templates/wallet.html:108 templates/worker.html:47 #: templates/workers.html:43 msgid "Blockchain" msgstr "Blockchain" @@ -341,17 +369,17 @@ msgstr "Machinaris" msgid "Summary" msgstr "Zusammenfassung" -#: templates/base.html:38 templates/base.html:113 templates/index.html:41 +#: templates/base.html:38 templates/base.html:113 templates/index/index.html:41 #: templates/plotting/jobs.html:101 templates/settings/plotting.html:14 msgid "Plotting" msgstr "" -#: templates/base.html:44 templates/base.html:107 templates/index.html:50 +#: templates/base.html:44 templates/base.html:107 templates/index/index.html:50 #: templates/settings/farming.html:15 msgid "Farming" msgstr "" -#: templates/base.html:50 +#: templates/base.html:50 templates/index/index.html:126 msgid "Wallets" msgstr "" @@ -378,7 +406,7 @@ msgstr "" #: templates/base.html:86 templates/farming/plots.html:69 #: templates/farming/workers.html:28 templates/plotting/jobs.html:94 -#: templates/plotting/workers.html:96 templates/summary.html:77 +#: templates/plotting/workers.html:96 templates/summary.html:81 #: templates/workers.html:14 msgid "Workers" msgstr "" @@ -438,48 +466,52 @@ msgstr "" msgid "Plotman" msgstr "" -#: templates/blockchains.html:23 +#: templates/blockchains.html:27 msgid "Blockchain Summary" msgstr "Blockchain Zusammenfassung" -#: templates/blockchains.html:32 templates/drives.html:91 -#: templates/summary.html:74 templates/wallet.html:109 +#: templates/blockchains.html:36 templates/drives.html:91 +#: templates/summary.html:78 templates/wallet.html:109 msgid "Status" msgstr "" -#: templates/blockchains.html:33 +#: templates/blockchains.html:37 msgid "Peak Height" msgstr "" -#: templates/blockchains.html:34 +#: templates/blockchains.html:38 msgid "Peak Time" msgstr "" -#: templates/blockchains.html:35 templates/drives.html:93 +#: templates/blockchains.html:39 templates/drives.html:93 #: templates/wallet.html:114 msgid "Updated At" msgstr "" -#: templates/blockchains.html:36 templates/summary.html:87 -#: templates/workers.html:49 -msgid "Logs" +#: templates/blockchains.html:63 +msgid "View Blockchain Details" msgstr "" -#: templates/blockchains.html:66 +#: templates/blockchains.html:65 templates/blockchains.html:79 msgid "Blockchain Details" msgstr "" -#: templates/blockchains.html:91 +#: templates/blockchains.html:69 templates/summary.html:126 +#, fuzzy +msgid "View Blockchain Log" +msgstr "Blockchain herunterladen" + +#: templates/blockchains.html:104 msgid "No blockchains found from any farmers. Not added?" msgstr "" "Es konnten keine Blockchains gefunden werden. Wurden Blockchains " "hinzugefügt?" -#: templates/blockchains.html:92 +#: templates/blockchains.html:105 msgid "Try running \"chia show --state\" on your farmers to verify." msgstr "Versuche \"chia show --state\" " -#: templates/blockchains.html:106 templates/summary.html:143 +#: templates/blockchains.html:119 templates/summary.html:152 msgid "Fullnode Log for " msgstr "Fullnode Log für" @@ -650,46 +682,6 @@ msgstr "" "Für mehr, schau dir das Machinaris " "%(wiki_link_open)swiki%(wiki_link_close)s an" -#: templates/index.html:30 -msgid "Expected Time to Win" -msgstr "Erwartete TTW" - -#: templates/index.html:72 -msgid "Total Plots" -msgstr "Gesamte Plots" - -#: templates/index.html:79 -msgid "Total Plots Size" -msgstr "Gesamte Plot Größe" - -#: templates/index.html:89 templates/wallet.html:113 -msgid "Balance" -msgstr "Bilanz" - -#: templates/index.html:96 -msgid "Farmed" -msgstr "Erfarmt" - -#: templates/index.html:105 -msgid "Netspace" -msgstr "" - -#: templates/index.html:120 -msgid "Challenges from Harvesters" -msgstr "Challenges der Harvester" - -#: templates/index.html:136 -msgid "Partial Proofs for Pools" -msgstr "Partial Proofs der Pools" - -#: templates/farming/workers.html:80 templates/index.html:147 -msgid "Previous" -msgstr "Vorherige" - -#: templates/farming/workers.html:84 templates/index.html:151 -msgid "Next" -msgstr "Nächste" - #: templates/keys.html:43 msgid "NOTE: Machinaris will never display your private key here." msgstr "ACHTUNG: Machinaris wird hier nie deinen privaten Key anzeigen" @@ -849,50 +841,55 @@ msgstr "" msgid "Local Currency:" msgstr "Lokale Währung" -#: templates/summary.html:75 +#: templates/summary.html:79 msgid "Height" msgstr "Höhe" #: templates/farming/plots.html:66 templates/farming/workers.html:25 -#: templates/summary.html:76 +#: templates/summary.html:80 msgid "Plots" msgstr "" -#: templates/summary.html:78 +#: templates/summary.html:82 msgid "Max Resp." msgstr "Max. Antwortdauer" -#: templates/summary.html:79 +#: templates/summary.html:83 msgid "Partials" msgstr "" -#: templates/summary.html:80 +#: templates/summary.html:84 msgid "ETW" msgstr "" -#: templates/summary.html:82 +#: templates/summary.html:86 msgid "Wallet" msgstr "" -#: templates/summary.html:83 templates/summary.html:84 +#: templates/summary.html:87 templates/summary.html:88 msgid "EDV" msgstr "" -#: templates/summary.html:98 templates/wallet.html:126 +#: templates/summary.html:103 templates/wallet.html:127 msgid "Synced" msgstr "Synchronisiert" -#: templates/summary.html:102 templates/wallet.html:130 +#: templates/summary.html:107 templates/wallet.html:131 msgid "Not Synced" msgstr "Nicht Synchronisiert" -#: templates/summary.html:128 +#: templates/summary.html:123 templates/wallet.html:142 +#, fuzzy +msgid "Chart Wallet" +msgstr "Wallet editieren" + +#: templates/summary.html:137 msgid "No blockchains found from any farmers. Just starting up?" msgstr "" "Es konnte keine Blockchain gefunden werden. Wurde gerade erst neu " "gestartet?" -#: templates/summary.html:129 +#: templates/summary.html:138 msgid "Please allow at least 15 minutes for blockchains to get started." msgstr "Bitte warte 15 min damit die Blockchain statrten kann" @@ -908,7 +905,7 @@ msgstr "Cold Wallet Adresse:" msgid "Wallet Summary" msgstr "Wallet Zusammenfassung" -#: templates/wallet.html:110 +#: templates/index/index.html:89 templates/wallet.html:110 msgid "Wallet Balance" msgstr "Wallet Bilanz" @@ -916,19 +913,23 @@ msgstr "Wallet Bilanz" msgid "Cold Wallet Balance" msgstr "Cold Wallet Bilanz" -#: templates/wallet.html:112 +#: templates/views/index_script_block.js:56 templates/wallet.html:112 msgid "Total Balance" msgstr "Totale Bilanz" -#: templates/wallet.html:140 +#: templates/index/index.html:92 templates/wallet.html:113 +msgid "Balance" +msgstr "Bilanz" + +#: templates/wallet.html:144 msgid "Edit Wallet" msgstr "Wallet editieren" -#: templates/wallet.html:151 +#: templates/wallet.html:155 msgid "Wallet Details" msgstr "" -#: templates/wallet.html:175 +#: templates/wallet.html:179 msgid "" "No wallet status received. Perhaps just starting? Please allow at least" " 10 minutes to update." @@ -936,7 +937,7 @@ msgstr "" "Es wurde keine Wallet gefunden. Wurde gerade erst gestartet? Es kann bis " "zu 10 min dauern" -#: templates/wallet.html:176 +#: templates/wallet.html:180 msgid "" "You can also try running \"chia wallet show\" on your fullnode's in-" "container shell to verify." @@ -1022,45 +1023,45 @@ msgstr "" msgid "Disk Space Free (GB)" msgstr "" -#: templates/worker_launch.html:50 templates/worker_launch.html:640 -#: templates/worker_launch.html:669 +#: templates/worker_launch.html:50 templates/worker_launch.html:642 +#: templates/worker_launch.html:671 msgid "Host Path" msgstr "Host Pfad" -#: templates/worker_launch.html:55 templates/worker_launch.html:645 -#: templates/worker_launch.html:674 +#: templates/worker_launch.html:55 templates/worker_launch.html:647 +#: templates/worker_launch.html:676 msgid "Container Path" msgstr "Container Pfad" -#: templates/worker_launch.html:60 templates/worker_launch.html:650 -#: templates/worker_launch.html:679 +#: templates/worker_launch.html:60 templates/worker_launch.html:652 +#: templates/worker_launch.html:681 msgid "Used for:" msgstr "Benutzt für:" -#: templates/worker_launch.html:63 templates/worker_launch.html:653 -#: templates/worker_launch.html:682 +#: templates/worker_launch.html:63 templates/worker_launch.html:655 +#: templates/worker_launch.html:684 msgid "Final Plots" msgstr "Finale Plots" -#: templates/worker_launch.html:64 templates/worker_launch.html:654 -#: templates/worker_launch.html:683 +#: templates/worker_launch.html:64 templates/worker_launch.html:656 +#: templates/worker_launch.html:685 msgid "Plotting Temp" msgstr "" -#: templates/worker_launch.html:65 templates/worker_launch.html:655 -#: templates/worker_launch.html:684 +#: templates/worker_launch.html:65 templates/worker_launch.html:657 +#: templates/worker_launch.html:686 msgid "Other" msgstr "Andere" -#: templates/worker_launch.html:69 templates/worker_launch.html:659 +#: templates/worker_launch.html:69 templates/worker_launch.html:661 msgid "Location" msgstr "Ort" -#: templates/worker_launch.html:72 templates/worker_launch.html:662 +#: templates/worker_launch.html:72 templates/worker_launch.html:664 msgid "Local" msgstr "" -#: templates/worker_launch.html:73 templates/worker_launch.html:663 +#: templates/worker_launch.html:73 templates/worker_launch.html:665 msgid "Remote" msgstr "" @@ -1068,51 +1069,51 @@ msgstr "" msgid "Unknown blockchain fork of selected:" msgstr "Unbekannter Blockschain Fork der ausgewählten:" -#: templates/worker_launch.html:284 +#: templates/worker_launch.html:285 msgid "" "Missing worker hostname. Please provide a short name to identify your " "worker." msgstr "Der Worker Hostname fehlt. Bitte einen kurzen Namen vergeben" -#: templates/worker_launch.html:304 +#: templates/worker_launch.html:305 msgid "" "Invalid host path ending with colon. Try adding a slash to the end like " "this" msgstr "Der Host pfad endet mit einem Komma. Versuche es mit Slash wie hier" -#: templates/worker_launch.html:307 +#: templates/worker_launch.html:308 msgid "Empty host path provided for volume at " msgstr "Leerer Host Pfad für Volumen " -#: templates/worker_launch.html:307 +#: templates/worker_launch.html:308 msgid "Please provide a host path." msgstr "Bitte Hostpfad angeben" -#: templates/worker_launch.html:309 +#: templates/worker_launch.html:310 msgid "Empty container path provided for volume at " msgstr "Leerer container Pfad für Volumen " -#: templates/worker_launch.html:309 +#: templates/worker_launch.html:310 msgid "Please provide a container path." msgstr "Bitte Containerpfad angeben" -#: templates/worker_launch.html:355 +#: templates/worker_launch.html:356 msgid "Neither Harvester or Plottter mode selected. Please choose one or both." msgstr "" "Weder Harvester noch Plotter Modus ausgewählt. Bitte einen oder beide " "wählen" -#: templates/worker_launch.html:361 +#: templates/worker_launch.html:362 msgid "" "Missing worker IP address. Please provide the IP the controller will " "connect to for commands." msgstr "Worker IP Adresse fehlt" -#: templates/worker_launch.html:411 +#: templates/worker_launch.html:413 msgid "Machinaris Worker - Launch Config" msgstr "Machinaris Worker - Configuration starten" -#: templates/worker_launch.html:412 +#: templates/worker_launch.html:414 msgid "" "Complete the form below to run new harvesters/plotters on other computers" " across your network. Save the generated docker-compose.yml file to a " @@ -1122,95 +1123,95 @@ msgstr "" "Um die Harvester/Plotter auf einem anderen System laufen zu lassen,bitte " "folgendes ausfüllen" -#: templates/worker_launch.html:416 +#: templates/worker_launch.html:418 msgid "Operating System" msgstr "Betriebssystem" -#: templates/worker_launch.html:422 +#: templates/worker_launch.html:424 msgid "Linux" msgstr "" -#: templates/worker_launch.html:429 +#: templates/worker_launch.html:431 msgid "Macintosh" msgstr "" -#: templates/worker_launch.html:436 +#: templates/worker_launch.html:438 msgid "Windows" msgstr "" -#: templates/worker_launch.html:442 +#: templates/worker_launch.html:444 msgid "Machinaris Mode" msgstr "Machinaris Modus" -#: templates/worker_launch.html:448 +#: templates/worker_launch.html:450 msgid "Harvester" msgstr "" -#: templates/worker_launch.html:455 +#: templates/worker_launch.html:457 msgid "Plotter" msgstr "" -#: templates/worker_launch.html:463 +#: templates/worker_launch.html:465 msgid "Farmer Public Key" msgstr "" -#: templates/worker_launch.html:468 +#: templates/worker_launch.html:470 msgid "Pool Public Key" msgstr "" -#: templates/worker_launch.html:473 +#: templates/worker_launch.html:475 msgid "Pool Contract Address" msgstr "" -#: templates/worker_launch.html:478 +#: templates/worker_launch.html:480 msgid "Plot on Startup" msgstr "" -#: templates/worker_launch.html:484 +#: templates/worker_launch.html:486 msgid "True" msgstr "" -#: templates/worker_launch.html:491 +#: templates/worker_launch.html:493 msgid "False" msgstr "" -#: templates/worker_launch.html:499 +#: templates/worker_launch.html:501 msgid "Controller IP Address" msgstr "" -#: templates/worker_launch.html:504 +#: templates/worker_launch.html:506 msgid "Controller API Port" msgstr "" -#: templates/worker_launch.html:511 +#: templates/worker_launch.html:513 msgid "Worker Hostname" msgstr "" -#: templates/worker_launch.html:516 +#: templates/worker_launch.html:518 msgid "Worker IP Address" msgstr "Worker IP Adresse" -#: templates/worker_launch.html:523 +#: templates/worker_launch.html:525 msgid "Blockchains to Farm" msgstr "Gefarmte Blockchains" -#: templates/worker_launch.html:636 +#: templates/worker_launch.html:638 msgid "Volume Mounts" msgstr "" -#: templates/worker_launch.html:693 +#: templates/worker_launch.html:695 msgid "Add New Volume" msgstr "Neues Volumen hinzufügen" -#: templates/worker_launch.html:695 +#: templates/worker_launch.html:697 msgid "Remove Last Volume" msgstr "Letztes Volumen entfernen" -#: templates/worker_launch.html:702 +#: templates/worker_launch.html:704 msgid "Copy" msgstr "Kopieren" -#: templates/worker_launch.html:706 +#: templates/worker_launch.html:708 msgid "Docker Compose" msgstr "" @@ -1226,6 +1227,10 @@ msgstr "Letzter Ping" msgid "Last Successful Ping" msgstr "Letzter erfolgreicher Ping" +#: templates/workers.html:49 +msgid "Logs" +msgstr "" + #: templates/workers.html:94 msgid "Prune Selected" msgstr "Entferne ausgewählte" @@ -1294,6 +1299,14 @@ msgstr "" "Bitte überprüfe ob der Container der entsprechenden Blockchain " "läuft.Überprüfe auch die Einstellung der Benachrichtigungen" +#: templates/farming/workers.html:80 templates/index/index.html:176 +msgid "Previous" +msgstr "Vorherige" + +#: templates/farming/workers.html:84 templates/index/index.html:180 +msgid "Next" +msgstr "Nächste" + #: templates/farming/workers.html:94 #, python-format msgid "" @@ -1303,6 +1316,69 @@ msgid "" "worker is reporting into the controller on the Workers page." msgstr "" +#: templates/index/chart_balances.html:85 templates/index/chart_farmed.html:131 +#: templates/index/chart_netspace.html:91 +#: templates/index/chart_plot_count.html:84 +#: templates/index/chart_plots_size.html:84 templates/plotting/jobs.html:285 +#: templates/views/index_script_block.js:90 +msgid "Date" +msgstr "" + +#: templates/index/chart_balances.html:102 +#: templates/index/chart_farmed.html:148 +#: templates/views/index_script_block.js:107 +msgid "Coins" +msgstr "" + +#: templates/index/chart_farmed.html:48 templates/index/index.html:97 +msgid "Farmed Blocks" +msgstr "" + +#: templates/index/chart_farmed.html:53 +msgid "Plot File" +msgstr "" + +#: templates/index/chart_farmed.html:54 +msgid "Farmed Block" +msgstr "" + +#: templates/index/chart_farmed.html:55 +#, fuzzy +msgid "Farmed At" +msgstr "Erfarmt" + +#: templates/index/chart_plot_count.html:101 templates/index/index.html:70 +msgid "Plot Count" +msgstr "" + +#: templates/index/index.html:30 +msgid "Expected Time to Win" +msgstr "Erwartete TTW" + +#: templates/index/index.html:73 +msgid "Total Plots" +msgstr "Gesamte Plots" + +#: templates/index/index.html:81 +msgid "Total Plots Size" +msgstr "Gesamte Plot Größe" + +#: templates/index/index.html:101 +msgid "Farmed" +msgstr "Erfarmt" + +#: templates/index/index.html:111 +msgid "Netspace" +msgstr "" + +#: templates/index/index.html:144 +msgid "Challenges from Harvesters" +msgstr "Challenges der Harvester" + +#: templates/index/index.html:162 +msgid "Partial Proofs for Pools" +msgstr "Partial Proofs der Pools" + #: templates/plotting/jobs.html:9 msgid "Confirm Kill" msgstr "Bestätige Abbruch" @@ -1396,10 +1472,6 @@ msgstr "ausgewählte wiederaufnehmen" msgid "Plotting Speed - k%(k_size)s Plots" msgstr "" -#: templates/plotting/jobs.html:285 -msgid "Date" -msgstr "" - #: templates/plotting/jobs.html:302 msgid "Time (minutes)" msgstr "" @@ -1455,7 +1527,7 @@ msgid "Archiving is disabled. See Settings | Plotting page." msgstr "Archivierung ist ausgeschaltet" #: templates/plotting/workers.html:256 -#: templates/views/index_script_block.js:152 +#: templates/views/index_script_block.js:232 msgid "Time - Last 24 Hours" msgstr "" @@ -1543,15 +1615,15 @@ msgstr "Speichern..." msgid "PlotNFT Log on " msgstr "PlotNFT Login" -#: templates/views/index_script_block.js:85 +#: templates/views/index_script_block.js:163 msgid "Time - Recent" msgstr "" -#: templates/views/index_script_block.js:102 +#: templates/views/index_script_block.js:180 msgid "Time Taken (seconds)" msgstr "" -#: templates/views/index_script_block.js:169 +#: templates/views/index_script_block.js:249 msgid "Partials Submitted" msgstr "" diff --git a/web/translations/fr_FR/LC_MESSAGES/messages.po b/web/translations/fr_FR/LC_MESSAGES/messages.po index b5c84544..1575d98f 100644 --- a/web/translations/fr_FR/LC_MESSAGES/messages.po +++ b/web/translations/fr_FR/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-04-23 11:14-0600\n" +"POT-Creation-Date: 2022-06-06 20:47-0600\n" "PO-Revision-Date: 2022-02-13 13:45-0700\n" "Last-Translator: FULL NAME\n" "Language: fr\n" @@ -18,31 +18,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.1\n" -#: routes.py:90 routes.py:233 +#: routes.py:113 routes.py:256 msgid "Saved local currency setting." msgstr "Paramètre de devise locale enregistré." -#: routes.py:110 +#: routes.py:133 msgid "Blockchain download" msgstr "Télécharger le blockchain" -#: routes.py:142 +#: routes.py:165 msgid "Unknown plotting form" msgstr "Forme inconnue" -#: routes.py:192 +#: routes.py:215 msgid "Error! Please see logs." msgstr "Erreur! Veuillez consulter les journaux." -#: routes.py:218 +#: routes.py:241 msgid "Unknown alerts form" msgstr "Forme inconnue" -#: routes.py:238 +#: routes.py:261 msgid "Saved cold wallet addresses." msgstr "Adresses de portefeuille froid enregistrées." -#: routes.py:306 +#: routes.py:329 msgid "" "Saved mapping settings. Please allow 10 minutes to generate location " "information for the map." @@ -50,11 +50,11 @@ msgstr "" "Paramètres de cartographie enregistrés. Veuillez patienter 10 minutes " "pour générer l'emplacementinformations pour la carte." -#: routes.py:314 +#: routes.py:337 msgid "Unknown form action" msgstr "Action inconnue" -#: routes.py:420 +#: routes.py:443 #, python-format msgid "" "No worker at %(worker)s for blockchain %(blockchain)s. Please select " @@ -63,7 +63,7 @@ msgstr "" "Aucun travailleur %(worker)s pour la blockchain %(blockchain)s. Veuillez " "sélectionner une autre blockchain." -#: routes.py:426 +#: routes.py:449 #, python-format msgid "" "For Alerts config, found no responding fullnode found for %(blockchain)s." @@ -72,7 +72,7 @@ msgstr "" "Aucun fullnode répondant n'a été trouvé pour notifier %(blockchain)s. " "Veuillez vérifier vos travailleurs." -#: routes.py:431 +#: routes.py:454 #, python-format msgid "" "For Farming config, found no responding fullnode found for " @@ -81,7 +81,7 @@ msgstr "" "Aucun fullnode répondant n'a été trouvé pour cultiver %(blockchain)s. " "Veuillez vérifier vos travailleurs." -#: routes.py:438 +#: routes.py:461 #, python-format msgid "" "For Plotting config, found no responding fullnode found for " @@ -90,7 +90,7 @@ msgstr "" "Aucun fullnode répondant n'a été trouvé pour parceller %(blockchain)s. " "Veuillez vérifier vos travailleurs." -#: routes.py:443 +#: routes.py:466 #, python-format msgid "" "No responding fullnode found for %(blockchain)s. Please check your " @@ -99,7 +99,7 @@ msgstr "" "Aucun fullnode répondant n'a été trouvé pour %(blockchain)s. Veuillez " "vérifier vos travailleurs." -#: routes.py:462 +#: routes.py:485 msgid "Unsupported log type" msgstr "Type de journal non pris en charge" @@ -130,7 +130,8 @@ msgid "Idle" msgstr "Inactif" #: actions/plotman.py:47 actions/plotman.py:48 models/chia.py:211 -#: models/plotman.py:67 templates/index.html:42 templates/index.html:52 +#: models/plotman.py:67 templates/index/index.html:42 +#: templates/index/index.html:52 msgid "Active" msgstr "Sauvegarder" @@ -138,19 +139,46 @@ msgstr "Sauvegarder" msgid "Suspended" msgstr "Suspendu" -#: actions/stats.py:56 actions/stats.py:90 actions/stats.py:108 -#: actions/stats.py:110 +#: actions/stats.py:57 actions/stats.py:92 actions/stats.py:109 +#: actions/stats.py:130 actions/stats.py:132 msgid "in last day." msgstr "au dernier jour." -#: actions/stats.py:338 +#: actions/stats.py:360 msgid "secs" msgstr "secs" -#: actions/stats.py:348 models/chia.py:251 +#: actions/stats.py:370 models/chia.py:251 msgid "hour" msgstr "heure" +#: actions/stats.py:399 templates/views/index_script_block.js:51 +msgid "Farmed Coins" +msgstr "" + +#: actions/stats.py:416 +#, fuzzy +msgid "Wallet Balances" +msgstr "Solde du portefeuille" + +#: actions/stats.py:433 templates/index/index.html:105 +#, fuzzy +msgid "Netspace Size" +msgstr "Netspace" + +#: actions/stats.py:434 actions/stats.py:492 +msgid "Size" +msgstr "" + +#: actions/stats.py:472 +msgid "Plot Counts" +msgstr "" + +#: actions/stats.py:491 templates/index/index.html:78 +#, fuzzy +msgid "Plots Size" +msgstr "Taille totale des plots" + #: actions/warnings.py:56 msgid "Dismiss Warning" msgstr "Ignorer l'avertissement" @@ -201,11 +229,11 @@ msgstr "" msgid "days" msgstr "jours" -#: models/chia.py:213 templates/summary.html:100 templates/wallet.html:128 +#: models/chia.py:213 templates/summary.html:105 templates/wallet.html:129 msgid "Syncing" msgstr "Synchronisation" -#: models/chia.py:215 templates/index.html:54 +#: models/chia.py:215 templates/index/index.html:54 msgid "Not available" msgstr "Indisponible" @@ -213,9 +241,10 @@ msgstr "Indisponible" msgid "Not synced" msgstr "Non synchronisé" -#: models/chia.py:220 templates/index.html:54 templates/plotting/jobs.html:114 -#: templates/plotting/workers.html:116 templates/summary.html:96 -#: templates/wallet.html:124 templates/worker.html:78 templates/workers.html:72 +#: models/chia.py:220 templates/index/index.html:54 +#: templates/plotting/jobs.html:114 templates/plotting/workers.html:116 +#: templates/summary.html:101 templates/wallet.html:125 +#: templates/worker.html:78 templates/workers.html:72 msgid "Offline" msgstr "Hors ligne" @@ -276,16 +305,16 @@ msgid "Alerts: Recent Notifications" msgstr "Alertes: notifications récentes" #: templates/alerts.html:72 templates/drives.html:86 -#: templates/settings/alerts.html:36 templates/settings/farming.html:37 -#: templates/settings/plotting.html:37 templates/settings/tools.html:36 -#: templates/worker.html:14 +#: templates/index/chart_farmed.html:52 templates/settings/alerts.html:36 +#: templates/settings/farming.html:37 templates/settings/plotting.html:37 +#: templates/settings/tools.html:36 templates/worker.html:14 msgid "Worker" msgstr "Worker" -#: templates/alerts.html:73 templates/blockchains.html:31 +#: templates/alerts.html:73 templates/blockchains.html:35 #: templates/settings/alerts.html:45 templates/settings/farming.html:46 #: templates/settings/plotting.html:46 templates/settings/tools.html:45 -#: templates/summary.html:73 templates/wallet.html:108 templates/worker.html:47 +#: templates/summary.html:77 templates/wallet.html:108 templates/worker.html:47 #: templates/workers.html:43 msgid "Blockchain" msgstr "Blockchain" @@ -355,17 +384,17 @@ msgstr "Machinaris" msgid "Summary" msgstr "Résumé" -#: templates/base.html:38 templates/base.html:113 templates/index.html:41 +#: templates/base.html:38 templates/base.html:113 templates/index/index.html:41 #: templates/plotting/jobs.html:101 templates/settings/plotting.html:14 msgid "Plotting" msgstr "Plotting" -#: templates/base.html:44 templates/base.html:107 templates/index.html:50 +#: templates/base.html:44 templates/base.html:107 templates/index/index.html:50 #: templates/settings/farming.html:15 msgid "Farming" msgstr "Farming" -#: templates/base.html:50 +#: templates/base.html:50 templates/index/index.html:126 msgid "Wallets" msgstr "Portefeuilles" @@ -392,7 +421,7 @@ msgstr "Pools" #: templates/base.html:86 templates/farming/plots.html:69 #: templates/farming/workers.html:28 templates/plotting/jobs.html:94 -#: templates/plotting/workers.html:96 templates/summary.html:77 +#: templates/plotting/workers.html:96 templates/summary.html:81 #: templates/workers.html:14 msgid "Workers" msgstr "Workers" @@ -452,46 +481,51 @@ msgstr "Madmax" msgid "Plotman" msgstr "Plotman" -#: templates/blockchains.html:23 +#: templates/blockchains.html:27 msgid "Blockchain Summary" msgstr "Blockchain" -#: templates/blockchains.html:32 templates/drives.html:91 -#: templates/summary.html:74 templates/wallet.html:109 +#: templates/blockchains.html:36 templates/drives.html:91 +#: templates/summary.html:78 templates/wallet.html:109 msgid "Status" msgstr "Statut" -#: templates/blockchains.html:33 +#: templates/blockchains.html:37 msgid "Peak Height" msgstr "Hauteur maximale" -#: templates/blockchains.html:34 +#: templates/blockchains.html:38 msgid "Peak Time" msgstr "Heure de pointe" -#: templates/blockchains.html:35 templates/drives.html:93 +#: templates/blockchains.html:39 templates/drives.html:93 #: templates/wallet.html:114 msgid "Updated At" msgstr "Mis à jour à" -#: templates/blockchains.html:36 templates/summary.html:87 -#: templates/workers.html:49 -msgid "Logs" -msgstr "Journaux" +#: templates/blockchains.html:63 +#, fuzzy +msgid "View Blockchain Details" +msgstr "Détails de le blockchain" -#: templates/blockchains.html:66 +#: templates/blockchains.html:65 templates/blockchains.html:79 msgid "Blockchain Details" msgstr "Détails de le blockchain" -#: templates/blockchains.html:91 +#: templates/blockchains.html:69 templates/summary.html:126 +#, fuzzy +msgid "View Blockchain Log" +msgstr "Télécharger le blockchain" + +#: templates/blockchains.html:104 msgid "No blockchains found from any farmers. Not added?" msgstr "Aucune blockchain trouvée chez les farmers. Pas ajouté?" -#: templates/blockchains.html:92 +#: templates/blockchains.html:105 msgid "Try running \"chia show --state\" on your farmers to verify." msgstr "Essayez d'exécuter \"chia show --state\" sur vos farmers pour vérifier." -#: templates/blockchains.html:106 templates/summary.html:143 +#: templates/blockchains.html:119 templates/summary.html:152 msgid "Fullnode Log for " msgstr "" @@ -666,46 +700,6 @@ msgstr "" "Pour en savoir plus, consultez le " "%(wiki_link_open)swiki%(wiki_link_close)s Machinaris." -#: templates/index.html:30 -msgid "Expected Time to Win" -msgstr "Temps prévu pour gagner" - -#: templates/index.html:72 -msgid "Total Plots" -msgstr "Plots totales" - -#: templates/index.html:79 -msgid "Total Plots Size" -msgstr "Taille totale des plots" - -#: templates/index.html:89 templates/wallet.html:113 -msgid "Balance" -msgstr "Total" - -#: templates/index.html:96 -msgid "Farmed" -msgstr "Farmed" - -#: templates/index.html:105 -msgid "Netspace" -msgstr "Netspace" - -#: templates/index.html:120 -msgid "Challenges from Harvesters" -msgstr "Défis des moissonneurs" - -#: templates/index.html:136 -msgid "Partial Proofs for Pools" -msgstr "Preuves partielles pour les pools" - -#: templates/farming/workers.html:80 templates/index.html:147 -msgid "Previous" -msgstr "Précédent" - -#: templates/farming/workers.html:84 templates/index.html:151 -msgid "Next" -msgstr "Suivant" - #: templates/keys.html:43 msgid "NOTE: Machinaris will never display your private key here." msgstr "" @@ -876,48 +870,53 @@ msgstr "" msgid "Local Currency:" msgstr "Monnaie locale:" -#: templates/summary.html:75 +#: templates/summary.html:79 msgid "Height" msgstr "Hauteur" #: templates/farming/plots.html:66 templates/farming/workers.html:25 -#: templates/summary.html:76 +#: templates/summary.html:80 msgid "Plots" msgstr "Plots" -#: templates/summary.html:78 +#: templates/summary.html:82 msgid "Max Resp." msgstr "Resp. Max" -#: templates/summary.html:79 +#: templates/summary.html:83 msgid "Partials" msgstr "Partiels" -#: templates/summary.html:80 +#: templates/summary.html:84 msgid "ETW" msgstr "ETW" -#: templates/summary.html:82 +#: templates/summary.html:86 msgid "Wallet" msgstr "Portefeuille" -#: templates/summary.html:83 templates/summary.html:84 +#: templates/summary.html:87 templates/summary.html:88 msgid "EDV" msgstr "EDV" -#: templates/summary.html:98 templates/wallet.html:126 +#: templates/summary.html:103 templates/wallet.html:127 msgid "Synced" msgstr "Synchronisé" -#: templates/summary.html:102 templates/wallet.html:130 +#: templates/summary.html:107 templates/wallet.html:131 msgid "Not Synced" msgstr "Non synchronisé" -#: templates/summary.html:128 +#: templates/summary.html:123 templates/wallet.html:142 +#, fuzzy +msgid "Chart Wallet" +msgstr "Modifier le portefeuille" + +#: templates/summary.html:137 msgid "No blockchains found from any farmers. Just starting up?" msgstr "Aucune blockchain trouvée chez les farmers. Pas ajouté?" -#: templates/summary.html:129 +#: templates/summary.html:138 msgid "Please allow at least 15 minutes for blockchains to get started." msgstr "Veuillez prévoir au moins 15 minutes pour que les blockchains commencent." @@ -933,7 +932,7 @@ msgstr "Adresse du portefeuille froid:" msgid "Wallet Summary" msgstr "Résumé quotidien" -#: templates/wallet.html:110 +#: templates/index/index.html:89 templates/wallet.html:110 msgid "Wallet Balance" msgstr "Solde du portefeuille" @@ -941,19 +940,23 @@ msgstr "Solde du portefeuille" msgid "Cold Wallet Balance" msgstr "Solde de portefeuille froid" -#: templates/wallet.html:112 +#: templates/views/index_script_block.js:56 templates/wallet.html:112 msgid "Total Balance" msgstr "Solde total" -#: templates/wallet.html:140 +#: templates/index/index.html:92 templates/wallet.html:113 +msgid "Balance" +msgstr "Total" + +#: templates/wallet.html:144 msgid "Edit Wallet" msgstr "Modifier le portefeuille" -#: templates/wallet.html:151 +#: templates/wallet.html:155 msgid "Wallet Details" msgstr "Détails du portefeuille" -#: templates/wallet.html:175 +#: templates/wallet.html:179 msgid "" "No wallet status received. Perhaps just starting? Please allow at least" " 10 minutes to update." @@ -961,7 +964,7 @@ msgstr "" "Aucun statut de portefeuille reçu. Peut-être que vous venez juste de " "commencer? Veuillez autoriser au moins 10 minutes pour mettre à jour." -#: templates/wallet.html:176 +#: templates/wallet.html:180 msgid "" "You can also try running \"chia wallet show\" on your fullnode's in-" "container shell to verify." @@ -1047,45 +1050,45 @@ msgstr "Espace disque utilisé (GB)" msgid "Disk Space Free (GB)" msgstr "Espace disque libre (GB)" -#: templates/worker_launch.html:50 templates/worker_launch.html:640 -#: templates/worker_launch.html:669 +#: templates/worker_launch.html:50 templates/worker_launch.html:642 +#: templates/worker_launch.html:671 msgid "Host Path" msgstr "Chemin de l'hôte" -#: templates/worker_launch.html:55 templates/worker_launch.html:645 -#: templates/worker_launch.html:674 +#: templates/worker_launch.html:55 templates/worker_launch.html:647 +#: templates/worker_launch.html:676 msgid "Container Path" msgstr "Chemin du conteneur" -#: templates/worker_launch.html:60 templates/worker_launch.html:650 -#: templates/worker_launch.html:679 +#: templates/worker_launch.html:60 templates/worker_launch.html:652 +#: templates/worker_launch.html:681 msgid "Used for:" msgstr "Utilisé pour:" -#: templates/worker_launch.html:63 templates/worker_launch.html:653 -#: templates/worker_launch.html:682 +#: templates/worker_launch.html:63 templates/worker_launch.html:655 +#: templates/worker_launch.html:684 msgid "Final Plots" msgstr "Plots finale" -#: templates/worker_launch.html:64 templates/worker_launch.html:654 -#: templates/worker_launch.html:683 +#: templates/worker_launch.html:64 templates/worker_launch.html:656 +#: templates/worker_launch.html:685 msgid "Plotting Temp" msgstr "Plotting Temporaire" -#: templates/worker_launch.html:65 templates/worker_launch.html:655 -#: templates/worker_launch.html:684 +#: templates/worker_launch.html:65 templates/worker_launch.html:657 +#: templates/worker_launch.html:686 msgid "Other" msgstr "Autre" -#: templates/worker_launch.html:69 templates/worker_launch.html:659 +#: templates/worker_launch.html:69 templates/worker_launch.html:661 msgid "Location" msgstr "Location" -#: templates/worker_launch.html:72 templates/worker_launch.html:662 +#: templates/worker_launch.html:72 templates/worker_launch.html:664 msgid "Local" msgstr "Local" -#: templates/worker_launch.html:73 templates/worker_launch.html:663 +#: templates/worker_launch.html:73 templates/worker_launch.html:665 msgid "Remote" msgstr "À distance" @@ -1093,7 +1096,7 @@ msgstr "À distance" msgid "Unknown blockchain fork of selected:" msgstr "Blockchain inconnue de la sélection:" -#: templates/worker_launch.html:284 +#: templates/worker_launch.html:285 msgid "" "Missing worker hostname. Please provide a short name to identify your " "worker." @@ -1101,7 +1104,7 @@ msgstr "" "Nom d'hôte du worker de calcul manquant. Veuillez fournir un nom court " "pour identifier votre ouvrier." -#: templates/worker_launch.html:304 +#: templates/worker_launch.html:305 msgid "" "Invalid host path ending with colon. Try adding a slash to the end like " "this" @@ -1109,29 +1112,29 @@ msgstr "" "Chemin d'hôte non valide se terminant par deux-points. Essayez d'ajouter " "une barre oblique à la fin comme ce" -#: templates/worker_launch.html:307 +#: templates/worker_launch.html:308 msgid "Empty host path provided for volume at " msgstr "Chemin d'hôte vide fourni pour le volume à" -#: templates/worker_launch.html:307 +#: templates/worker_launch.html:308 msgid "Please provide a host path." msgstr "Veuillez fournir un chemin d'accès à l'hôte." -#: templates/worker_launch.html:309 +#: templates/worker_launch.html:310 msgid "Empty container path provided for volume at " msgstr "Chemin de conteneur vide fourni pour le volume à " -#: templates/worker_launch.html:309 +#: templates/worker_launch.html:310 msgid "Please provide a container path." msgstr "Veuillez fournir un chemin de conteneur." -#: templates/worker_launch.html:355 +#: templates/worker_launch.html:356 msgid "Neither Harvester or Plottter mode selected. Please choose one or both." msgstr "" "Aucun mode Harvester ou Plotter n'est sélectionné. Veuillez en choisir un" " ou les deux." -#: templates/worker_launch.html:361 +#: templates/worker_launch.html:362 msgid "" "Missing worker IP address. Please provide the IP the controller will " "connect to for commands." @@ -1139,11 +1142,11 @@ msgstr "" "Adresse IP du worker manquante. Veuillez fournir l'adresse IP que le " "contrôleur se connecter à pour les commandes." -#: templates/worker_launch.html:411 +#: templates/worker_launch.html:413 msgid "Machinaris Worker - Launch Config" msgstr "Machinaris Worker - Lancer la configuration" -#: templates/worker_launch.html:412 +#: templates/worker_launch.html:414 msgid "" "Complete the form below to run new harvesters/plotters on other computers" " across your network. Save the generated docker-compose.yml file to a " @@ -1156,95 +1159,95 @@ msgstr "" "\"machinaris\", puis exécutez \"docker-compose up\" à partir d'un " "coquille." -#: templates/worker_launch.html:416 +#: templates/worker_launch.html:418 msgid "Operating System" msgstr "Système opérateur" -#: templates/worker_launch.html:422 +#: templates/worker_launch.html:424 msgid "Linux" msgstr "Linux" -#: templates/worker_launch.html:429 +#: templates/worker_launch.html:431 msgid "Macintosh" msgstr "Macintosh" -#: templates/worker_launch.html:436 +#: templates/worker_launch.html:438 msgid "Windows" msgstr "Windows" -#: templates/worker_launch.html:442 +#: templates/worker_launch.html:444 msgid "Machinaris Mode" msgstr "Mode Machinaris" -#: templates/worker_launch.html:448 +#: templates/worker_launch.html:450 msgid "Harvester" msgstr "Harvester" -#: templates/worker_launch.html:455 +#: templates/worker_launch.html:457 msgid "Plotter" msgstr "Plotter" -#: templates/worker_launch.html:463 +#: templates/worker_launch.html:465 msgid "Farmer Public Key" msgstr "Clé publique de farmer" -#: templates/worker_launch.html:468 +#: templates/worker_launch.html:470 msgid "Pool Public Key" msgstr "Clé publique de pool" -#: templates/worker_launch.html:473 +#: templates/worker_launch.html:475 msgid "Pool Contract Address" msgstr "Adresse du contrat de pool" -#: templates/worker_launch.html:478 +#: templates/worker_launch.html:480 msgid "Plot on Startup" msgstr "Plot au démarrage" -#: templates/worker_launch.html:484 +#: templates/worker_launch.html:486 msgid "True" msgstr "Vrai" -#: templates/worker_launch.html:491 +#: templates/worker_launch.html:493 msgid "False" msgstr "Faux" -#: templates/worker_launch.html:499 +#: templates/worker_launch.html:501 msgid "Controller IP Address" msgstr "Adresse IP du contrôleur" -#: templates/worker_launch.html:504 +#: templates/worker_launch.html:506 msgid "Controller API Port" msgstr "Port API du contrôleur" -#: templates/worker_launch.html:511 +#: templates/worker_launch.html:513 msgid "Worker Hostname" msgstr "Nom d'hôte du worker" -#: templates/worker_launch.html:516 +#: templates/worker_launch.html:518 msgid "Worker IP Address" msgstr "Adresse IP du worker" -#: templates/worker_launch.html:523 +#: templates/worker_launch.html:525 msgid "Blockchains to Farm" msgstr "Blockchains a Farm" -#: templates/worker_launch.html:636 +#: templates/worker_launch.html:638 msgid "Volume Mounts" msgstr "Montages de volume" -#: templates/worker_launch.html:693 +#: templates/worker_launch.html:695 msgid "Add New Volume" msgstr "Ajouter un nouveau volume" -#: templates/worker_launch.html:695 +#: templates/worker_launch.html:697 msgid "Remove Last Volume" msgstr "Supprimer le dernier volume" -#: templates/worker_launch.html:702 +#: templates/worker_launch.html:704 msgid "Copy" msgstr "Copie" -#: templates/worker_launch.html:706 +#: templates/worker_launch.html:708 msgid "Docker Compose" msgstr "Docker Compose" @@ -1260,6 +1263,10 @@ msgstr "Dernier ping" msgid "Last Successful Ping" msgstr "Dernier ping réussi" +#: templates/workers.html:49 +msgid "Logs" +msgstr "Journaux" + #: templates/workers.html:94 msgid "Prune Selected" msgstr "Taille sélectionnée" @@ -1329,6 +1336,14 @@ msgstr "" "est en cours d'exécution. Veuillez également vérifier les paramètres sur " "la page Alertes." +#: templates/farming/workers.html:80 templates/index/index.html:176 +msgid "Previous" +msgstr "Précédent" + +#: templates/farming/workers.html:84 templates/index/index.html:180 +msgid "Next" +msgstr "Suivant" + #: templates/farming/workers.html:94 #, python-format msgid "" @@ -1343,6 +1358,69 @@ msgstr "" " Assurez-vous également que le worker Chia fait rapport au contrôleur sur" " la page Workers." +#: templates/index/chart_balances.html:85 templates/index/chart_farmed.html:131 +#: templates/index/chart_netspace.html:91 +#: templates/index/chart_plot_count.html:84 +#: templates/index/chart_plots_size.html:84 templates/plotting/jobs.html:285 +#: templates/views/index_script_block.js:90 +msgid "Date" +msgstr "Date" + +#: templates/index/chart_balances.html:102 +#: templates/index/chart_farmed.html:148 +#: templates/views/index_script_block.js:107 +msgid "Coins" +msgstr "" + +#: templates/index/chart_farmed.html:48 templates/index/index.html:97 +msgid "Farmed Blocks" +msgstr "" + +#: templates/index/chart_farmed.html:53 +msgid "Plot File" +msgstr "" + +#: templates/index/chart_farmed.html:54 +msgid "Farmed Block" +msgstr "" + +#: templates/index/chart_farmed.html:55 +#, fuzzy +msgid "Farmed At" +msgstr "Farmed" + +#: templates/index/chart_plot_count.html:101 templates/index/index.html:70 +msgid "Plot Count" +msgstr "" + +#: templates/index/index.html:30 +msgid "Expected Time to Win" +msgstr "Temps prévu pour gagner" + +#: templates/index/index.html:73 +msgid "Total Plots" +msgstr "Plots totales" + +#: templates/index/index.html:81 +msgid "Total Plots Size" +msgstr "Taille totale des plots" + +#: templates/index/index.html:101 +msgid "Farmed" +msgstr "Farmed" + +#: templates/index/index.html:111 +msgid "Netspace" +msgstr "Netspace" + +#: templates/index/index.html:144 +msgid "Challenges from Harvesters" +msgstr "Défis des moissonneurs" + +#: templates/index/index.html:162 +msgid "Partial Proofs for Pools" +msgstr "Preuves partielles pour les pools" + #: templates/plotting/jobs.html:9 msgid "Confirm Kill" msgstr "Confirmer tuer" @@ -1447,10 +1525,6 @@ msgstr "Continuer la sélection" msgid "Plotting Speed - k%(k_size)s Plots" msgstr "Vitesse de Plotting - k%(k_size)s Plots" -#: templates/plotting/jobs.html:285 -msgid "Date" -msgstr "Date" - #: templates/plotting/jobs.html:302 msgid "Time (minutes)" msgstr "Temps (minutes)" @@ -1515,7 +1589,7 @@ msgid "Archiving is disabled. See Settings | Plotting page." msgstr "L'archivage est désactivé. Voir page Paramètres | Traçage." #: templates/plotting/workers.html:256 -#: templates/views/index_script_block.js:152 +#: templates/views/index_script_block.js:232 msgid "Time - Last 24 Hours" msgstr "Heure - Dernières 24 heures" @@ -1609,15 +1683,15 @@ msgstr "Commencer..." msgid "PlotNFT Log on " msgstr "Journaux PlotNFT de" -#: templates/views/index_script_block.js:85 +#: templates/views/index_script_block.js:163 msgid "Time - Recent" msgstr "Heure - Récent" -#: templates/views/index_script_block.js:102 +#: templates/views/index_script_block.js:180 msgid "Time Taken (seconds)" msgstr "Temps pris (secondes)" -#: templates/views/index_script_block.js:169 +#: templates/views/index_script_block.js:249 msgid "Partials Submitted" msgstr "Partiels soumis" diff --git a/web/translations/it_IT/LC_MESSAGES/messages.po b/web/translations/it_IT/LC_MESSAGES/messages.po index 700fdf53..ef60cc2f 100644 --- a/web/translations/it_IT/LC_MESSAGES/messages.po +++ b/web/translations/it_IT/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-04-23 11:14-0600\n" +"POT-Creation-Date: 2022-06-06 20:47-0600\n" "PO-Revision-Date: 2022-02-15 10:14-0700\n" "Last-Translator: Fabrizio Cacicia\n" "Language: it\n" @@ -18,31 +18,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.1\n" -#: routes.py:90 routes.py:233 +#: routes.py:113 routes.py:256 msgid "Saved local currency setting." msgstr "Impostazione valuta locale salvata." -#: routes.py:110 +#: routes.py:133 msgid "Blockchain download" msgstr "" -#: routes.py:142 +#: routes.py:165 msgid "Unknown plotting form" msgstr "Formato plotting sconosciuto" -#: routes.py:192 +#: routes.py:215 msgid "Error! Please see logs." msgstr "Errore! Controlla i logs." -#: routes.py:218 +#: routes.py:241 msgid "Unknown alerts form" msgstr "Formato avvisi sconosciuto" -#: routes.py:238 +#: routes.py:261 msgid "Saved cold wallet addresses." msgstr "Indirizzi cold wallet salvati." -#: routes.py:306 +#: routes.py:329 msgid "" "Saved mapping settings. Please allow 10 minutes to generate location " "information for the map." @@ -50,11 +50,11 @@ msgstr "" "Impostazioni salvate. Attendi 10 minuti affinché le informazioni vengano " "generate." -#: routes.py:314 +#: routes.py:337 msgid "Unknown form action" msgstr "Azione sconosciuta." -#: routes.py:420 +#: routes.py:443 #, python-format msgid "" "No worker at %(worker)s for blockchain %(blockchain)s. Please select " @@ -63,7 +63,7 @@ msgstr "" "Nessun worker in %(worker)s per la blockchain %(blockchain)s. Scegli " "un'altra blockchain." -#: routes.py:426 +#: routes.py:449 #, python-format msgid "" "For Alerts config, found no responding fullnode found for %(blockchain)s." @@ -72,7 +72,7 @@ msgstr "" "Per le configurazioni degli Avvisi, non è stato trovato alcun fullnode " "per %(blockchain)s. Controlla i tuoi worker." -#: routes.py:431 +#: routes.py:454 #, python-format msgid "" "For Farming config, found no responding fullnode found for " @@ -81,7 +81,7 @@ msgstr "" "Per le configurazioni del Farming, non è stato trovato alcun fullnode per" " %(blockchain)s. Controlla i tuoi worker." -#: routes.py:438 +#: routes.py:461 #, python-format msgid "" "For Plotting config, found no responding fullnode found for " @@ -90,7 +90,7 @@ msgstr "" "Per le configurazioni del Plotting, non è stato trovato alcun fullnode " "per %(blockchain)s. Controlla i tuoi worker." -#: routes.py:443 +#: routes.py:466 #, python-format msgid "" "No responding fullnode found for %(blockchain)s. Please check your " @@ -99,7 +99,7 @@ msgstr "" "Non è stato trovato alcun fullnode che risponden per %(blockchain)s. " "Controlla i tuoi workers." -#: routes.py:462 +#: routes.py:485 msgid "Unsupported log type" msgstr "Formato log non supportato" @@ -132,7 +132,8 @@ msgid "Idle" msgstr "Inattivo" #: actions/plotman.py:47 actions/plotman.py:48 models/chia.py:211 -#: models/plotman.py:67 templates/index.html:42 templates/index.html:52 +#: models/plotman.py:67 templates/index/index.html:42 +#: templates/index/index.html:52 msgid "Active" msgstr "Attivo" @@ -140,19 +141,46 @@ msgstr "Attivo" msgid "Suspended" msgstr "Sospeso" -#: actions/stats.py:56 actions/stats.py:90 actions/stats.py:108 -#: actions/stats.py:110 +#: actions/stats.py:57 actions/stats.py:92 actions/stats.py:109 +#: actions/stats.py:130 actions/stats.py:132 msgid "in last day." msgstr "nell'ultimo giorno." -#: actions/stats.py:338 +#: actions/stats.py:360 msgid "secs" msgstr "secondi" -#: actions/stats.py:348 models/chia.py:251 +#: actions/stats.py:370 models/chia.py:251 msgid "hour" msgstr "ora" +#: actions/stats.py:399 templates/views/index_script_block.js:51 +msgid "Farmed Coins" +msgstr "" + +#: actions/stats.py:416 +#, fuzzy +msgid "Wallet Balances" +msgstr "Saldo portafoglio" + +#: actions/stats.py:433 templates/index/index.html:105 +#, fuzzy +msgid "Netspace Size" +msgstr "Spazio Rete" + +#: actions/stats.py:434 actions/stats.py:492 +msgid "Size" +msgstr "" + +#: actions/stats.py:472 +msgid "Plot Counts" +msgstr "" + +#: actions/stats.py:491 templates/index/index.html:78 +#, fuzzy +msgid "Plots Size" +msgstr "Dimensione Totale PLots" + #: actions/warnings.py:56 msgid "Dismiss Warning" msgstr "Ignora Avvertenza" @@ -199,11 +227,11 @@ msgstr "Usa una versione di Machinaris coerente per evitare problemi." msgid "days" msgstr "giorni" -#: models/chia.py:213 templates/summary.html:100 templates/wallet.html:128 +#: models/chia.py:213 templates/summary.html:105 templates/wallet.html:129 msgid "Syncing" msgstr "Sincronizzazione" -#: models/chia.py:215 templates/index.html:54 +#: models/chia.py:215 templates/index/index.html:54 msgid "Not available" msgstr "Non disponibile" @@ -211,9 +239,10 @@ msgstr "Non disponibile" msgid "Not synced" msgstr "non sincronizzato" -#: models/chia.py:220 templates/index.html:54 templates/plotting/jobs.html:114 -#: templates/plotting/workers.html:116 templates/summary.html:96 -#: templates/wallet.html:124 templates/worker.html:78 templates/workers.html:72 +#: models/chia.py:220 templates/index/index.html:54 +#: templates/plotting/jobs.html:114 templates/plotting/workers.html:116 +#: templates/summary.html:101 templates/wallet.html:125 +#: templates/worker.html:78 templates/workers.html:72 msgid "Offline" msgstr "" @@ -274,16 +303,16 @@ msgid "Alerts: Recent Notifications" msgstr "Avvisi: Notifiche Recenti" #: templates/alerts.html:72 templates/drives.html:86 -#: templates/settings/alerts.html:36 templates/settings/farming.html:37 -#: templates/settings/plotting.html:37 templates/settings/tools.html:36 -#: templates/worker.html:14 +#: templates/index/chart_farmed.html:52 templates/settings/alerts.html:36 +#: templates/settings/farming.html:37 templates/settings/plotting.html:37 +#: templates/settings/tools.html:36 templates/worker.html:14 msgid "Worker" msgstr "" -#: templates/alerts.html:73 templates/blockchains.html:31 +#: templates/alerts.html:73 templates/blockchains.html:35 #: templates/settings/alerts.html:45 templates/settings/farming.html:46 #: templates/settings/plotting.html:46 templates/settings/tools.html:45 -#: templates/summary.html:73 templates/wallet.html:108 templates/worker.html:47 +#: templates/summary.html:77 templates/wallet.html:108 templates/worker.html:47 #: templates/workers.html:43 msgid "Blockchain" msgstr "" @@ -353,17 +382,17 @@ msgstr "" msgid "Summary" msgstr "Riepilogo" -#: templates/base.html:38 templates/base.html:113 templates/index.html:41 +#: templates/base.html:38 templates/base.html:113 templates/index/index.html:41 #: templates/plotting/jobs.html:101 templates/settings/plotting.html:14 msgid "Plotting" msgstr "" -#: templates/base.html:44 templates/base.html:107 templates/index.html:50 +#: templates/base.html:44 templates/base.html:107 templates/index/index.html:50 #: templates/settings/farming.html:15 msgid "Farming" msgstr "" -#: templates/base.html:50 +#: templates/base.html:50 templates/index/index.html:126 msgid "Wallets" msgstr "Portafogli" @@ -390,7 +419,7 @@ msgstr "" #: templates/base.html:86 templates/farming/plots.html:69 #: templates/farming/workers.html:28 templates/plotting/jobs.html:94 -#: templates/plotting/workers.html:96 templates/summary.html:77 +#: templates/plotting/workers.html:96 templates/summary.html:81 #: templates/workers.html:14 msgid "Workers" msgstr "" @@ -450,46 +479,50 @@ msgstr "" msgid "Plotman" msgstr "" -#: templates/blockchains.html:23 +#: templates/blockchains.html:27 msgid "Blockchain Summary" msgstr "Riepilogo Blockchain" -#: templates/blockchains.html:32 templates/drives.html:91 -#: templates/summary.html:74 templates/wallet.html:109 +#: templates/blockchains.html:36 templates/drives.html:91 +#: templates/summary.html:78 templates/wallet.html:109 msgid "Status" msgstr "Stato" -#: templates/blockchains.html:33 +#: templates/blockchains.html:37 msgid "Peak Height" msgstr "" -#: templates/blockchains.html:34 +#: templates/blockchains.html:38 msgid "Peak Time" msgstr "" -#: templates/blockchains.html:35 templates/drives.html:93 +#: templates/blockchains.html:39 templates/drives.html:93 #: templates/wallet.html:114 msgid "Updated At" msgstr "Aggiornato a" -#: templates/blockchains.html:36 templates/summary.html:87 -#: templates/workers.html:49 -msgid "Logs" -msgstr "" +#: templates/blockchains.html:63 +#, fuzzy +msgid "View Blockchain Details" +msgstr "Dettagli Blockchain" -#: templates/blockchains.html:66 +#: templates/blockchains.html:65 templates/blockchains.html:79 msgid "Blockchain Details" msgstr "Dettagli Blockchain" -#: templates/blockchains.html:91 +#: templates/blockchains.html:69 templates/summary.html:126 +msgid "View Blockchain Log" +msgstr "" + +#: templates/blockchains.html:104 msgid "No blockchains found from any farmers. Not added?" msgstr "Nessuna blockchain trovata da nessun farmer. Non ancora aggiunte?" -#: templates/blockchains.html:92 +#: templates/blockchains.html:105 msgid "Try running \"chia show --state\" on your farmers to verify." msgstr "Prova ad eseguire \"chia show --state\" sui tuoi farmer per verificare." -#: templates/blockchains.html:106 templates/summary.html:143 +#: templates/blockchains.html:119 templates/summary.html:152 msgid "Fullnode Log for " msgstr "" @@ -667,46 +700,6 @@ msgstr "" "Per maggiori informazioni, guarda " "%(wiki_link_open)swiki%(wiki_link_close)s." -#: templates/index.html:30 -msgid "Expected Time to Win" -msgstr "Tempo Previsto per Vincere" - -#: templates/index.html:72 -msgid "Total Plots" -msgstr "Plots Totali" - -#: templates/index.html:79 -msgid "Total Plots Size" -msgstr "Dimensione Totale PLots" - -#: templates/index.html:89 templates/wallet.html:113 -msgid "Balance" -msgstr "Saldo" - -#: templates/index.html:96 -msgid "Farmed" -msgstr "Farmati" - -#: templates/index.html:105 -msgid "Netspace" -msgstr "Spazio Rete" - -#: templates/index.html:120 -msgid "Challenges from Harvesters" -msgstr "Challenges per Harvester" - -#: templates/index.html:136 -msgid "Partial Proofs for Pools" -msgstr "Partial Proofs per Pool" - -#: templates/farming/workers.html:80 templates/index.html:147 -msgid "Previous" -msgstr "Precedente" - -#: templates/farming/workers.html:84 templates/index.html:151 -msgid "Next" -msgstr "Successivo" - #: templates/keys.html:43 msgid "NOTE: Machinaris will never display your private key here." msgstr "NOTA: Machinaris non mostrerà mai la tua chiave privata qui." @@ -876,48 +869,53 @@ msgstr "" msgid "Local Currency:" msgstr "Valuta Locale:" -#: templates/summary.html:75 +#: templates/summary.html:79 msgid "Height" msgstr "Altezza" #: templates/farming/plots.html:66 templates/farming/workers.html:25 -#: templates/summary.html:76 +#: templates/summary.html:80 msgid "Plots" msgstr "" -#: templates/summary.html:78 +#: templates/summary.html:82 msgid "Max Resp." msgstr "Max Risp." -#: templates/summary.html:79 +#: templates/summary.html:83 msgid "Partials" msgstr "Parziali" -#: templates/summary.html:80 +#: templates/summary.html:84 msgid "ETW" msgstr "" -#: templates/summary.html:82 +#: templates/summary.html:86 msgid "Wallet" msgstr "Portafogli" -#: templates/summary.html:83 templates/summary.html:84 +#: templates/summary.html:87 templates/summary.html:88 msgid "EDV" msgstr "" -#: templates/summary.html:98 templates/wallet.html:126 +#: templates/summary.html:103 templates/wallet.html:127 msgid "Synced" msgstr "Sincronizzato" -#: templates/summary.html:102 templates/wallet.html:130 +#: templates/summary.html:107 templates/wallet.html:131 msgid "Not Synced" msgstr "Non Sincronizzato" -#: templates/summary.html:128 +#: templates/summary.html:123 templates/wallet.html:142 +#, fuzzy +msgid "Chart Wallet" +msgstr "Modifica Portafoglio" + +#: templates/summary.html:137 msgid "No blockchains found from any farmers. Just starting up?" msgstr "Nessuna blockchain trovata da nessun farmer. Hai appena avviato?" -#: templates/summary.html:129 +#: templates/summary.html:138 msgid "Please allow at least 15 minutes for blockchains to get started." msgstr "Attendi almeno 15 minuti affinché le blockchain si avviino." @@ -933,7 +931,7 @@ msgstr "Indirizzo Cold Wallet:" msgid "Wallet Summary" msgstr "Riepilogo Portafoglio" -#: templates/wallet.html:110 +#: templates/index/index.html:89 templates/wallet.html:110 msgid "Wallet Balance" msgstr "Saldo portafoglio" @@ -941,19 +939,23 @@ msgstr "Saldo portafoglio" msgid "Cold Wallet Balance" msgstr "Saldo Cold Wallet" -#: templates/wallet.html:112 +#: templates/views/index_script_block.js:56 templates/wallet.html:112 msgid "Total Balance" msgstr "Saldo Totale" -#: templates/wallet.html:140 +#: templates/index/index.html:92 templates/wallet.html:113 +msgid "Balance" +msgstr "Saldo" + +#: templates/wallet.html:144 msgid "Edit Wallet" msgstr "Modifica Portafoglio" -#: templates/wallet.html:151 +#: templates/wallet.html:155 msgid "Wallet Details" msgstr "Dettagli Portafoglio" -#: templates/wallet.html:175 +#: templates/wallet.html:179 msgid "" "No wallet status received. Perhaps just starting? Please allow at least" " 10 minutes to update." @@ -961,7 +963,7 @@ msgstr "" "Stato del portafogli non ricevuto. Forse hai appena avviato? Attendi " "almeno 10 minuti affinché si aggiorni." -#: templates/wallet.html:176 +#: templates/wallet.html:180 msgid "" "You can also try running \"chia wallet show\" on your fullnode's in-" "container shell to verify." @@ -1049,46 +1051,46 @@ msgstr "Spazio Usato su Disco (GB)" msgid "Disk Space Free (GB)" msgstr "Spazio Libero su Disco (GB)" -#: templates/worker_launch.html:50 templates/worker_launch.html:640 -#: templates/worker_launch.html:669 +#: templates/worker_launch.html:50 templates/worker_launch.html:642 +#: templates/worker_launch.html:671 msgid "Host Path" msgstr "Percorso Host" -#: templates/worker_launch.html:55 templates/worker_launch.html:645 -#: templates/worker_launch.html:674 +#: templates/worker_launch.html:55 templates/worker_launch.html:647 +#: templates/worker_launch.html:676 msgid "Container Path" msgstr "Percorso Container" -#: templates/worker_launch.html:60 templates/worker_launch.html:650 -#: templates/worker_launch.html:679 +#: templates/worker_launch.html:60 templates/worker_launch.html:652 +#: templates/worker_launch.html:681 msgid "Used for:" msgstr "Usato per:" -#: templates/worker_launch.html:63 templates/worker_launch.html:653 -#: templates/worker_launch.html:682 +#: templates/worker_launch.html:63 templates/worker_launch.html:655 +#: templates/worker_launch.html:684 msgid "Final Plots" msgstr "Plots Completati" -#: templates/worker_launch.html:64 templates/worker_launch.html:654 -#: templates/worker_launch.html:683 +#: templates/worker_launch.html:64 templates/worker_launch.html:656 +#: templates/worker_launch.html:685 msgid "Plotting Temp" msgstr "Plotting" -#: templates/worker_launch.html:65 templates/worker_launch.html:655 -#: templates/worker_launch.html:684 +#: templates/worker_launch.html:65 templates/worker_launch.html:657 +#: templates/worker_launch.html:686 msgid "Other" msgstr "Altro" -#: templates/worker_launch.html:69 templates/worker_launch.html:659 +#: templates/worker_launch.html:69 templates/worker_launch.html:661 #, fuzzy msgid "Location" msgstr "Notifica" -#: templates/worker_launch.html:72 templates/worker_launch.html:662 +#: templates/worker_launch.html:72 templates/worker_launch.html:664 msgid "Local" msgstr "" -#: templates/worker_launch.html:73 templates/worker_launch.html:663 +#: templates/worker_launch.html:73 templates/worker_launch.html:665 msgid "Remote" msgstr "" @@ -1096,7 +1098,7 @@ msgstr "" msgid "Unknown blockchain fork of selected:" msgstr "Fork sconosciuto per:" -#: templates/worker_launch.html:284 +#: templates/worker_launch.html:285 msgid "" "Missing worker hostname. Please provide a short name to identify your " "worker." @@ -1104,7 +1106,7 @@ msgstr "" "Nome host del worker mancante. Fornisci un nome breve per identificare il" " tuo worker." -#: templates/worker_launch.html:304 +#: templates/worker_launch.html:305 msgid "" "Invalid host path ending with colon. Try adding a slash to the end like " "this" @@ -1112,29 +1114,29 @@ msgstr "" "Percorso host non valido, non può finire con i due punti. Prova ad " "aggiungere uno slash alla fine, in questo modo" -#: templates/worker_launch.html:307 +#: templates/worker_launch.html:308 msgid "Empty host path provided for volume at " msgstr "Hai fornito un percorso host vuoto per il volume a " -#: templates/worker_launch.html:307 +#: templates/worker_launch.html:308 msgid "Please provide a host path." msgstr "Fornisci un percorso host." -#: templates/worker_launch.html:309 +#: templates/worker_launch.html:310 msgid "Empty container path provided for volume at " msgstr "Hai fornito un percorso container vuoto per il volume a " -#: templates/worker_launch.html:309 +#: templates/worker_launch.html:310 msgid "Please provide a container path." msgstr "Fornisci un percorso container." -#: templates/worker_launch.html:355 +#: templates/worker_launch.html:356 msgid "Neither Harvester or Plottter mode selected. Please choose one or both." msgstr "" "Non hai selezionato né modalità Harvester né plotter. Scegline una o " "entrambe." -#: templates/worker_launch.html:361 +#: templates/worker_launch.html:362 msgid "" "Missing worker IP address. Please provide the IP the controller will " "connect to for commands." @@ -1142,11 +1144,11 @@ msgstr "" "Indirizzo IP worker mancante. Fornisci l'indirizzo IP a cui il controller" " si connetterà per i comandi." -#: templates/worker_launch.html:411 +#: templates/worker_launch.html:413 msgid "Machinaris Worker - Launch Config" msgstr "Machinaris Worker - Avvia Configurazione" -#: templates/worker_launch.html:412 +#: templates/worker_launch.html:414 msgid "" "Complete the form below to run new harvesters/plotters on other computers" " across your network. Save the generated docker-compose.yml file to a " @@ -1158,95 +1160,95 @@ msgstr "" "cartella chiamata \"machinaris\", ed esegui il comando \"docker-compose " "up\" dalla shell." -#: templates/worker_launch.html:416 +#: templates/worker_launch.html:418 msgid "Operating System" msgstr "Sistema Operativo" -#: templates/worker_launch.html:422 +#: templates/worker_launch.html:424 msgid "Linux" msgstr "" -#: templates/worker_launch.html:429 +#: templates/worker_launch.html:431 msgid "Macintosh" msgstr "" -#: templates/worker_launch.html:436 +#: templates/worker_launch.html:438 msgid "Windows" msgstr "" -#: templates/worker_launch.html:442 +#: templates/worker_launch.html:444 msgid "Machinaris Mode" msgstr "Modalità" -#: templates/worker_launch.html:448 +#: templates/worker_launch.html:450 msgid "Harvester" msgstr "" -#: templates/worker_launch.html:455 +#: templates/worker_launch.html:457 msgid "Plotter" msgstr "" -#: templates/worker_launch.html:463 +#: templates/worker_launch.html:465 msgid "Farmer Public Key" msgstr "Chiave Pubblica Farmer" -#: templates/worker_launch.html:468 +#: templates/worker_launch.html:470 msgid "Pool Public Key" msgstr "Chiave Pubblica Pool" -#: templates/worker_launch.html:473 +#: templates/worker_launch.html:475 msgid "Pool Contract Address" msgstr "" -#: templates/worker_launch.html:478 +#: templates/worker_launch.html:480 msgid "Plot on Startup" msgstr "Plotta all'avvio" -#: templates/worker_launch.html:484 +#: templates/worker_launch.html:486 msgid "True" msgstr "Vero" -#: templates/worker_launch.html:491 +#: templates/worker_launch.html:493 msgid "False" msgstr "Falso" -#: templates/worker_launch.html:499 +#: templates/worker_launch.html:501 msgid "Controller IP Address" msgstr "Indirizzo IP Controller" -#: templates/worker_launch.html:504 +#: templates/worker_launch.html:506 msgid "Controller API Port" msgstr "Porta API Controller" -#: templates/worker_launch.html:511 +#: templates/worker_launch.html:513 msgid "Worker Hostname" msgstr "Nome host Worker" -#: templates/worker_launch.html:516 +#: templates/worker_launch.html:518 msgid "Worker IP Address" msgstr "Indirizzo IP Worker" -#: templates/worker_launch.html:523 +#: templates/worker_launch.html:525 msgid "Blockchains to Farm" msgstr "Blockchains da Farmare" -#: templates/worker_launch.html:636 +#: templates/worker_launch.html:638 msgid "Volume Mounts" msgstr "Volumi da Montare" -#: templates/worker_launch.html:693 +#: templates/worker_launch.html:695 msgid "Add New Volume" msgstr "Aggiungi Nuovo Volume" -#: templates/worker_launch.html:695 +#: templates/worker_launch.html:697 msgid "Remove Last Volume" msgstr "Rimuovi Ultimo Volume" -#: templates/worker_launch.html:702 +#: templates/worker_launch.html:704 msgid "Copy" msgstr "Copia" -#: templates/worker_launch.html:706 +#: templates/worker_launch.html:708 msgid "Docker Compose" msgstr "" @@ -1262,6 +1264,10 @@ msgstr "Ultimo Ping" msgid "Last Successful Ping" msgstr "Ultimo Ping con successo" +#: templates/workers.html:49 +msgid "Logs" +msgstr "" + #: templates/workers.html:94 msgid "Prune Selected" msgstr "Togli Selezionati" @@ -1332,6 +1338,14 @@ msgstr "" "Controlla che il Machinaris container per questa blockchain sia in " "esecuzione. Verifica inoltre le impostazioni nella pagina Avvisi." +#: templates/farming/workers.html:80 templates/index/index.html:176 +msgid "Previous" +msgstr "Precedente" + +#: templates/farming/workers.html:84 templates/index/index.html:180 +msgid "Next" +msgstr "Successivo" + #: templates/farming/workers.html:94 #, python-format msgid "" @@ -1346,6 +1360,69 @@ msgstr "" "Assicurati inoltre che il worker di Chia stia rispondendo nel controller " "dalla pagina Workers." +#: templates/index/chart_balances.html:85 templates/index/chart_farmed.html:131 +#: templates/index/chart_netspace.html:91 +#: templates/index/chart_plot_count.html:84 +#: templates/index/chart_plots_size.html:84 templates/plotting/jobs.html:285 +#: templates/views/index_script_block.js:90 +msgid "Date" +msgstr "" + +#: templates/index/chart_balances.html:102 +#: templates/index/chart_farmed.html:148 +#: templates/views/index_script_block.js:107 +msgid "Coins" +msgstr "" + +#: templates/index/chart_farmed.html:48 templates/index/index.html:97 +msgid "Farmed Blocks" +msgstr "" + +#: templates/index/chart_farmed.html:53 +msgid "Plot File" +msgstr "" + +#: templates/index/chart_farmed.html:54 +msgid "Farmed Block" +msgstr "" + +#: templates/index/chart_farmed.html:55 +#, fuzzy +msgid "Farmed At" +msgstr "Farmati" + +#: templates/index/chart_plot_count.html:101 templates/index/index.html:70 +msgid "Plot Count" +msgstr "" + +#: templates/index/index.html:30 +msgid "Expected Time to Win" +msgstr "Tempo Previsto per Vincere" + +#: templates/index/index.html:73 +msgid "Total Plots" +msgstr "Plots Totali" + +#: templates/index/index.html:81 +msgid "Total Plots Size" +msgstr "Dimensione Totale PLots" + +#: templates/index/index.html:101 +msgid "Farmed" +msgstr "Farmati" + +#: templates/index/index.html:111 +msgid "Netspace" +msgstr "Spazio Rete" + +#: templates/index/index.html:144 +msgid "Challenges from Harvesters" +msgstr "Challenges per Harvester" + +#: templates/index/index.html:162 +msgid "Partial Proofs for Pools" +msgstr "Partial Proofs per Pool" + #: templates/plotting/jobs.html:9 msgid "Confirm Kill" msgstr "Conferma Terminazione" @@ -1451,10 +1528,6 @@ msgstr "Riprendi Selezionati" msgid "Plotting Speed - k%(k_size)s Plots" msgstr "Velocità di Plotting - k%(k_size)s Plots" -#: templates/plotting/jobs.html:285 -msgid "Date" -msgstr "" - #: templates/plotting/jobs.html:302 msgid "Time (minutes)" msgstr "" @@ -1522,7 +1595,7 @@ msgstr "" "Plotting\"." #: templates/plotting/workers.html:256 -#: templates/views/index_script_block.js:152 +#: templates/views/index_script_block.js:232 msgid "Time - Last 24 Hours" msgstr "" @@ -1616,15 +1689,15 @@ msgstr "Salvataggio in corso..." msgid "PlotNFT Log on " msgstr "" -#: templates/views/index_script_block.js:85 +#: templates/views/index_script_block.js:163 msgid "Time - Recent" msgstr "" -#: templates/views/index_script_block.js:102 +#: templates/views/index_script_block.js:180 msgid "Time Taken (seconds)" msgstr "" -#: templates/views/index_script_block.js:169 +#: templates/views/index_script_block.js:249 msgid "Partials Submitted" msgstr "" diff --git a/web/translations/nl_NL/LC_MESSAGES/messages.po b/web/translations/nl_NL/LC_MESSAGES/messages.po index 75b827cc..d2d56e14 100644 --- a/web/translations/nl_NL/LC_MESSAGES/messages.po +++ b/web/translations/nl_NL/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris/issuesPOT-" "Creation-Date: 2022-03-13 10:29-0600\n" -"POT-Creation-Date: 2022-04-23 11:14-0600\n" +"POT-Creation-Date: 2022-06-06 20:47-0600\n" "PO-Revision-Date: 2022-03-13 10:29-0600\n" "Last-Translator: Bernie Deprez\n" "Language: nl_NL\n" @@ -18,31 +18,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.1\n" -#: routes.py:90 routes.py:233 +#: routes.py:113 routes.py:256 msgid "Saved local currency setting." msgstr "Lokale munt instelling opgeslagen." -#: routes.py:110 +#: routes.py:133 msgid "Blockchain download" msgstr "Blockchain download" -#: routes.py:142 +#: routes.py:165 msgid "Unknown plotting form" msgstr "Ongekend plottingformaat" -#: routes.py:192 +#: routes.py:215 msgid "Error! Please see logs." msgstr "Error! Controleer de logs." -#: routes.py:218 +#: routes.py:241 msgid "Unknown alerts form" msgstr "Ongekend waarschuwingsformaat" -#: routes.py:238 +#: routes.py:261 msgid "Saved cold wallet addresses." msgstr "Adres koude portefeuille opgeslagen." -#: routes.py:306 +#: routes.py:329 msgid "" "Saved mapping settings. Please allow 10 minutes to generate location " "information for the map." @@ -50,11 +50,11 @@ msgstr "" "Kaart instellingen opgeslagen. Wacht 10 minuten terwijl lokatie " "informatie voor de kaart wordt gegenereerd." -#: routes.py:314 +#: routes.py:337 msgid "Unknown form action" msgstr "Ongekende formulier actie" -#: routes.py:420 +#: routes.py:443 #, python-format msgid "" "No worker at %(worker)s for blockchain %(blockchain)s. Please select " @@ -63,7 +63,7 @@ msgstr "" "Geen werker op %(worker)s voor blockchain %(blockchain)s. Gelieve een " "ander blockchain te kiezen." -#: routes.py:426 +#: routes.py:449 #, python-format msgid "" "For Alerts config, found no responding fullnode found for %(blockchain)s." @@ -72,7 +72,7 @@ msgstr "" "Voor Waarschuwingsconfiguratie, geen reagerende fullnode voor " "%(blockchain)s gevonden. Gelieve uw werkers te controleren." -#: routes.py:431 +#: routes.py:454 #, python-format msgid "" "For Farming config, found no responding fullnode found for " @@ -81,7 +81,7 @@ msgstr "" "Voor Farming configuratie, geen reagerende fullnode voor %(blockchain)s " "gevonden. Gelieve uw werkers te controleren." -#: routes.py:438 +#: routes.py:461 #, python-format msgid "" "For Plotting config, found no responding fullnode found for " @@ -90,7 +90,7 @@ msgstr "" "Voor Plotting configuratie, geen reagerende fullnode gevonden voor " "%(blockchain)s. Gelieve uw werkers te controleren." -#: routes.py:443 +#: routes.py:466 #, python-format msgid "" "No responding fullnode found for %(blockchain)s. Please check your " @@ -99,7 +99,7 @@ msgstr "" "Geen reagerende fullnode gevonden voor %(blockchain)s. Gelieve uw werkers" " te controleren." -#: routes.py:462 +#: routes.py:485 msgid "Unsupported log type" msgstr "Log type niet ondersteund" @@ -130,7 +130,8 @@ msgid "Idle" msgstr "Inactief" #: actions/plotman.py:47 actions/plotman.py:48 models/chia.py:211 -#: models/plotman.py:67 templates/index.html:42 templates/index.html:52 +#: models/plotman.py:67 templates/index/index.html:42 +#: templates/index/index.html:52 msgid "Active" msgstr "Actief" @@ -138,19 +139,46 @@ msgstr "Actief" msgid "Suspended" msgstr "Opgeschort" -#: actions/stats.py:56 actions/stats.py:90 actions/stats.py:108 -#: actions/stats.py:110 +#: actions/stats.py:57 actions/stats.py:92 actions/stats.py:109 +#: actions/stats.py:130 actions/stats.py:132 msgid "in last day." msgstr "in voorbije dag." -#: actions/stats.py:338 +#: actions/stats.py:360 msgid "secs" msgstr "seconden" -#: actions/stats.py:348 models/chia.py:251 +#: actions/stats.py:370 models/chia.py:251 msgid "hour" msgstr "uur" +#: actions/stats.py:399 templates/views/index_script_block.js:51 +msgid "Farmed Coins" +msgstr "" + +#: actions/stats.py:416 +#, fuzzy +msgid "Wallet Balances" +msgstr "Saldo Portefeuille" + +#: actions/stats.py:433 templates/index/index.html:105 +#, fuzzy +msgid "Netspace Size" +msgstr "Netgrootte" + +#: actions/stats.py:434 actions/stats.py:492 +msgid "Size" +msgstr "" + +#: actions/stats.py:472 +msgid "Plot Counts" +msgstr "" + +#: actions/stats.py:491 templates/index/index.html:78 +#, fuzzy +msgid "Plots Size" +msgstr "Totale Omvang Plots" + #: actions/warnings.py:56 msgid "Dismiss Warning" msgstr "Verwerp waarschuwing" @@ -197,11 +225,11 @@ msgstr "Om problemen te voorkomen gebruik een consistente Machinaris versie." msgid "days" msgstr "dagen" -#: models/chia.py:213 templates/summary.html:100 templates/wallet.html:128 +#: models/chia.py:213 templates/summary.html:105 templates/wallet.html:129 msgid "Syncing" msgstr "Synchronisatie" -#: models/chia.py:215 templates/index.html:54 +#: models/chia.py:215 templates/index/index.html:54 msgid "Not available" msgstr "Niet beschikbaar" @@ -209,9 +237,10 @@ msgstr "Niet beschikbaar" msgid "Not synced" msgstr "Niet gesynchroniseerd" -#: models/chia.py:220 templates/index.html:54 templates/plotting/jobs.html:114 -#: templates/plotting/workers.html:116 templates/summary.html:96 -#: templates/wallet.html:124 templates/worker.html:78 templates/workers.html:72 +#: models/chia.py:220 templates/index/index.html:54 +#: templates/plotting/jobs.html:114 templates/plotting/workers.html:116 +#: templates/summary.html:101 templates/wallet.html:125 +#: templates/worker.html:78 templates/workers.html:72 msgid "Offline" msgstr "Offline" @@ -272,16 +301,16 @@ msgid "Alerts: Recent Notifications" msgstr "Waarschuwingen: Recente notificaties" #: templates/alerts.html:72 templates/drives.html:86 -#: templates/settings/alerts.html:36 templates/settings/farming.html:37 -#: templates/settings/plotting.html:37 templates/settings/tools.html:36 -#: templates/worker.html:14 +#: templates/index/chart_farmed.html:52 templates/settings/alerts.html:36 +#: templates/settings/farming.html:37 templates/settings/plotting.html:37 +#: templates/settings/tools.html:36 templates/worker.html:14 msgid "Worker" msgstr "Werker" -#: templates/alerts.html:73 templates/blockchains.html:31 +#: templates/alerts.html:73 templates/blockchains.html:35 #: templates/settings/alerts.html:45 templates/settings/farming.html:46 #: templates/settings/plotting.html:46 templates/settings/tools.html:45 -#: templates/summary.html:73 templates/wallet.html:108 templates/worker.html:47 +#: templates/summary.html:77 templates/wallet.html:108 templates/worker.html:47 #: templates/workers.html:43 msgid "Blockchain" msgstr "Blockchain" @@ -351,17 +380,17 @@ msgstr "Marchinaris" msgid "Summary" msgstr "Samenvatting" -#: templates/base.html:38 templates/base.html:113 templates/index.html:41 +#: templates/base.html:38 templates/base.html:113 templates/index/index.html:41 #: templates/plotting/jobs.html:101 templates/settings/plotting.html:14 msgid "Plotting" msgstr "Plotting" -#: templates/base.html:44 templates/base.html:107 templates/index.html:50 +#: templates/base.html:44 templates/base.html:107 templates/index/index.html:50 #: templates/settings/farming.html:15 msgid "Farming" msgstr "Farming" -#: templates/base.html:50 +#: templates/base.html:50 templates/index/index.html:126 msgid "Wallets" msgstr "Portefeuilles" @@ -388,7 +417,7 @@ msgstr "Pools" #: templates/base.html:86 templates/farming/plots.html:69 #: templates/farming/workers.html:28 templates/plotting/jobs.html:94 -#: templates/plotting/workers.html:96 templates/summary.html:77 +#: templates/plotting/workers.html:96 templates/summary.html:81 #: templates/workers.html:14 msgid "Workers" msgstr "Werkers" @@ -448,48 +477,53 @@ msgstr "Madmax" msgid "Plotman" msgstr "Plotman" -#: templates/blockchains.html:23 +#: templates/blockchains.html:27 msgid "Blockchain Summary" msgstr "Blockchain Samenvatting" -#: templates/blockchains.html:32 templates/drives.html:91 -#: templates/summary.html:74 templates/wallet.html:109 +#: templates/blockchains.html:36 templates/drives.html:91 +#: templates/summary.html:78 templates/wallet.html:109 msgid "Status" msgstr "Status" -#: templates/blockchains.html:33 +#: templates/blockchains.html:37 msgid "Peak Height" msgstr "Piek Hoogte" -#: templates/blockchains.html:34 +#: templates/blockchains.html:38 msgid "Peak Time" msgstr "Piek Tijd" -#: templates/blockchains.html:35 templates/drives.html:93 +#: templates/blockchains.html:39 templates/drives.html:93 #: templates/wallet.html:114 msgid "Updated At" msgstr "Bijgewerkt om" -#: templates/blockchains.html:36 templates/summary.html:87 -#: templates/workers.html:49 -msgid "Logs" -msgstr "Logs" +#: templates/blockchains.html:63 +#, fuzzy +msgid "View Blockchain Details" +msgstr "Blockchain Details" -#: templates/blockchains.html:66 +#: templates/blockchains.html:65 templates/blockchains.html:79 msgid "Blockchain Details" msgstr "Blockchain Details" -#: templates/blockchains.html:91 +#: templates/blockchains.html:69 templates/summary.html:126 +#, fuzzy +msgid "View Blockchain Log" +msgstr "Blockchain download" + +#: templates/blockchains.html:104 msgid "No blockchains found from any farmers. Not added?" msgstr "Geen blockchains gevonden in uw farmers. Niet toegevoegd?" -#: templates/blockchains.html:92 +#: templates/blockchains.html:105 msgid "Try running \"chia show --state\" on your farmers to verify." msgstr "" "Probeer \"chia show --state\" uit te voeren op uw farmers om te " "controleren." -#: templates/blockchains.html:106 templates/summary.html:143 +#: templates/blockchains.html:119 templates/summary.html:152 msgid "Fullnode Log for " msgstr "" @@ -663,46 +697,6 @@ msgstr "" "Voor meer info, zie de Machinaris " "%(wiki_link_open)swiki%(wiki_link_close)s." -#: templates/index.html:30 -msgid "Expected Time to Win" -msgstr "Verwachte Tijd om te Winnen" - -#: templates/index.html:72 -msgid "Total Plots" -msgstr "Totaal Aantal Plots" - -#: templates/index.html:79 -msgid "Total Plots Size" -msgstr "Totale Omvang Plots" - -#: templates/index.html:89 templates/wallet.html:113 -msgid "Balance" -msgstr "Saldo" - -#: templates/index.html:96 -msgid "Farmed" -msgstr "Farmed" - -#: templates/index.html:105 -msgid "Netspace" -msgstr "Netgrootte" - -#: templates/index.html:120 -msgid "Challenges from Harvesters" -msgstr "Uitdagingen van Harvesters" - -#: templates/index.html:136 -msgid "Partial Proofs for Pools" -msgstr "Gedeeltelijke bewijzen voor Pools" - -#: templates/farming/workers.html:80 templates/index.html:147 -msgid "Previous" -msgstr "Vorige" - -#: templates/farming/workers.html:84 templates/index.html:151 -msgid "Next" -msgstr "Volgende" - #: templates/keys.html:43 msgid "NOTE: Machinaris will never display your private key here." msgstr "NOTA: Machinaris zal hier nooit uw private sleutels tonen." @@ -874,48 +868,53 @@ msgstr "" msgid "Local Currency:" msgstr "Lokale Munt:" -#: templates/summary.html:75 +#: templates/summary.html:79 msgid "Height" msgstr "Hoogte" #: templates/farming/plots.html:66 templates/farming/workers.html:25 -#: templates/summary.html:76 +#: templates/summary.html:80 msgid "Plots" msgstr "Plots" -#: templates/summary.html:78 +#: templates/summary.html:82 msgid "Max Resp." msgstr "Max Resp." -#: templates/summary.html:79 +#: templates/summary.html:83 msgid "Partials" msgstr "Partials" -#: templates/summary.html:80 +#: templates/summary.html:84 msgid "ETW" msgstr "ETW" -#: templates/summary.html:82 +#: templates/summary.html:86 msgid "Wallet" msgstr "Portefeuille" -#: templates/summary.html:83 templates/summary.html:84 +#: templates/summary.html:87 templates/summary.html:88 msgid "EDV" msgstr "EDV" -#: templates/summary.html:98 templates/wallet.html:126 +#: templates/summary.html:103 templates/wallet.html:127 msgid "Synced" msgstr "Gesynchroniseerd" -#: templates/summary.html:102 templates/wallet.html:130 +#: templates/summary.html:107 templates/wallet.html:131 msgid "Not Synced" msgstr "Niet Gesynchroniseerd" -#: templates/summary.html:128 +#: templates/summary.html:123 templates/wallet.html:142 +#, fuzzy +msgid "Chart Wallet" +msgstr "Wijzig Portefeuille" + +#: templates/summary.html:137 msgid "No blockchains found from any farmers. Just starting up?" msgstr "Geen blockchains gevonden in uw farmers. Nog aan het opstarten?" -#: templates/summary.html:129 +#: templates/summary.html:138 msgid "Please allow at least 15 minutes for blockchains to get started." msgstr "Wacht minstens 15 minuten terwijl de blockchains opstarten." @@ -931,7 +930,7 @@ msgstr "Adres Koude Portefeuille" msgid "Wallet Summary" msgstr "Portefeuille Samenvatting" -#: templates/wallet.html:110 +#: templates/index/index.html:89 templates/wallet.html:110 msgid "Wallet Balance" msgstr "Saldo Portefeuille" @@ -939,19 +938,23 @@ msgstr "Saldo Portefeuille" msgid "Cold Wallet Balance" msgstr "Saldo Koude Portefeuille" -#: templates/wallet.html:112 +#: templates/views/index_script_block.js:56 templates/wallet.html:112 msgid "Total Balance" msgstr "Totale Saldo" -#: templates/wallet.html:140 +#: templates/index/index.html:92 templates/wallet.html:113 +msgid "Balance" +msgstr "Saldo" + +#: templates/wallet.html:144 msgid "Edit Wallet" msgstr "Wijzig Portefeuille" -#: templates/wallet.html:151 +#: templates/wallet.html:155 msgid "Wallet Details" msgstr "Portefeuille Details" -#: templates/wallet.html:175 +#: templates/wallet.html:179 msgid "" "No wallet status received. Perhaps just starting? Please allow at least" " 10 minutes to update." @@ -959,7 +962,7 @@ msgstr "" "Geen portefeuille status ontvangen. Nog aan het opstarten? Wacht minstens" " 10 minuten voor updates." -#: templates/wallet.html:176 +#: templates/wallet.html:180 msgid "" "You can also try running \"chia wallet show\" on your fullnode's in-" "container shell to verify." @@ -1047,45 +1050,45 @@ msgstr "Gebruikte Schijfruimte (GB)" msgid "Disk Space Free (GB)" msgstr "Vrije Schijfruimte (GB)" -#: templates/worker_launch.html:50 templates/worker_launch.html:640 -#: templates/worker_launch.html:669 +#: templates/worker_launch.html:50 templates/worker_launch.html:642 +#: templates/worker_launch.html:671 msgid "Host Path" msgstr "Host Pad" -#: templates/worker_launch.html:55 templates/worker_launch.html:645 -#: templates/worker_launch.html:674 +#: templates/worker_launch.html:55 templates/worker_launch.html:647 +#: templates/worker_launch.html:676 msgid "Container Path" msgstr "Container Pad" -#: templates/worker_launch.html:60 templates/worker_launch.html:650 -#: templates/worker_launch.html:679 +#: templates/worker_launch.html:60 templates/worker_launch.html:652 +#: templates/worker_launch.html:681 msgid "Used for:" msgstr "Gebruikt voor:" -#: templates/worker_launch.html:63 templates/worker_launch.html:653 -#: templates/worker_launch.html:682 +#: templates/worker_launch.html:63 templates/worker_launch.html:655 +#: templates/worker_launch.html:684 msgid "Final Plots" msgstr "Finale Plots" -#: templates/worker_launch.html:64 templates/worker_launch.html:654 -#: templates/worker_launch.html:683 +#: templates/worker_launch.html:64 templates/worker_launch.html:656 +#: templates/worker_launch.html:685 msgid "Plotting Temp" msgstr "Plotting Temp" -#: templates/worker_launch.html:65 templates/worker_launch.html:655 -#: templates/worker_launch.html:684 +#: templates/worker_launch.html:65 templates/worker_launch.html:657 +#: templates/worker_launch.html:686 msgid "Other" msgstr "Andere" -#: templates/worker_launch.html:69 templates/worker_launch.html:659 +#: templates/worker_launch.html:69 templates/worker_launch.html:661 msgid "Location" msgstr "Locatie" -#: templates/worker_launch.html:72 templates/worker_launch.html:662 +#: templates/worker_launch.html:72 templates/worker_launch.html:664 msgid "Local" msgstr "Lokaal" -#: templates/worker_launch.html:73 templates/worker_launch.html:663 +#: templates/worker_launch.html:73 templates/worker_launch.html:665 msgid "Remote" msgstr "Extern" @@ -1093,7 +1096,7 @@ msgstr "Extern" msgid "Unknown blockchain fork of selected:" msgstr "Ongekende blockchain fork geselecteerd:" -#: templates/worker_launch.html:284 +#: templates/worker_launch.html:285 msgid "" "Missing worker hostname. Please provide a short name to identify your " "worker." @@ -1101,7 +1104,7 @@ msgstr "" "Ontbrekende werker hostname. Geef een korte naam om uw werker mee te " "identificeren." -#: templates/worker_launch.html:304 +#: templates/worker_launch.html:305 msgid "" "Invalid host path ending with colon. Try adding a slash to the end like " "this" @@ -1109,27 +1112,27 @@ msgstr "" "Ongeldig pad eindigend met een dubbele punt. Probeer een slash toe te " "voegen aan het einde, als volgt" -#: templates/worker_launch.html:307 +#: templates/worker_launch.html:308 msgid "Empty host path provided for volume at " msgstr "Ongeldige host pad opgegeven voor volume op " -#: templates/worker_launch.html:307 +#: templates/worker_launch.html:308 msgid "Please provide a host path." msgstr "Gelieve een host pad op te geven." -#: templates/worker_launch.html:309 +#: templates/worker_launch.html:310 msgid "Empty container path provided for volume at " msgstr "Leeg container pad opgegeven voor volume op " -#: templates/worker_launch.html:309 +#: templates/worker_launch.html:310 msgid "Please provide a container path." msgstr "Gelieve een container pad op te geven." -#: templates/worker_launch.html:355 +#: templates/worker_launch.html:356 msgid "Neither Harvester or Plottter mode selected. Please choose one or both." msgstr "Noch Harvester noch Plotter modus geselecteerd. Kies een of beide." -#: templates/worker_launch.html:361 +#: templates/worker_launch.html:362 msgid "" "Missing worker IP address. Please provide the IP the controller will " "connect to for commands." @@ -1137,11 +1140,11 @@ msgstr "" "Werker IP adres ontbreekt. Gelieve een IP op te geven waarmee de " "controller zal verbinden voor commandos." -#: templates/worker_launch.html:411 +#: templates/worker_launch.html:413 msgid "Machinaris Worker - Launch Config" msgstr "Machinaris werker - Lanceer Configuratie" -#: templates/worker_launch.html:412 +#: templates/worker_launch.html:414 msgid "" "Complete the form below to run new harvesters/plotters on other computers" " across your network. Save the generated docker-compose.yml file to a " @@ -1153,95 +1156,95 @@ msgstr "" "compose.yml bestand op in een map genaamd \"machinaris\", en voer dan het" " commando \"docker-compose up\" uit via de commandoprompt." -#: templates/worker_launch.html:416 +#: templates/worker_launch.html:418 msgid "Operating System" msgstr "Besturingssysteem" -#: templates/worker_launch.html:422 +#: templates/worker_launch.html:424 msgid "Linux" msgstr "Linux" -#: templates/worker_launch.html:429 +#: templates/worker_launch.html:431 msgid "Macintosh" msgstr "Macintosh" -#: templates/worker_launch.html:436 +#: templates/worker_launch.html:438 msgid "Windows" msgstr "Windows" -#: templates/worker_launch.html:442 +#: templates/worker_launch.html:444 msgid "Machinaris Mode" msgstr "Machinaris Modus" -#: templates/worker_launch.html:448 +#: templates/worker_launch.html:450 msgid "Harvester" msgstr "Harvester" -#: templates/worker_launch.html:455 +#: templates/worker_launch.html:457 msgid "Plotter" msgstr "Plotter" -#: templates/worker_launch.html:463 +#: templates/worker_launch.html:465 msgid "Farmer Public Key" msgstr "Farmer publieke sleutel" -#: templates/worker_launch.html:468 +#: templates/worker_launch.html:470 msgid "Pool Public Key" msgstr "Pool publieke sleutel" -#: templates/worker_launch.html:473 +#: templates/worker_launch.html:475 msgid "Pool Contract Address" msgstr "Pool contract adres" -#: templates/worker_launch.html:478 +#: templates/worker_launch.html:480 msgid "Plot on Startup" msgstr "Plot on Startup" -#: templates/worker_launch.html:484 +#: templates/worker_launch.html:486 msgid "True" msgstr "True" -#: templates/worker_launch.html:491 +#: templates/worker_launch.html:493 msgid "False" msgstr "False" -#: templates/worker_launch.html:499 +#: templates/worker_launch.html:501 msgid "Controller IP Address" msgstr "Controller IP adres" -#: templates/worker_launch.html:504 +#: templates/worker_launch.html:506 msgid "Controller API Port" msgstr "Controller API poort" -#: templates/worker_launch.html:511 +#: templates/worker_launch.html:513 msgid "Worker Hostname" msgstr "Werker hostname" -#: templates/worker_launch.html:516 +#: templates/worker_launch.html:518 msgid "Worker IP Address" msgstr "Werker IP adres" -#: templates/worker_launch.html:523 +#: templates/worker_launch.html:525 msgid "Blockchains to Farm" msgstr "Blockchains to Farm" -#: templates/worker_launch.html:636 +#: templates/worker_launch.html:638 msgid "Volume Mounts" msgstr "Volume Mounts" -#: templates/worker_launch.html:693 +#: templates/worker_launch.html:695 msgid "Add New Volume" msgstr "Voeg nieuw volume toe" -#: templates/worker_launch.html:695 +#: templates/worker_launch.html:697 msgid "Remove Last Volume" msgstr "Verwijder laatste volume" -#: templates/worker_launch.html:702 +#: templates/worker_launch.html:704 msgid "Copy" msgstr "Kopieer" -#: templates/worker_launch.html:706 +#: templates/worker_launch.html:708 msgid "Docker Compose" msgstr "Docker Compose" @@ -1257,6 +1260,10 @@ msgstr "Laatste ping" msgid "Last Successful Ping" msgstr "Laatste succesvolle ping" +#: templates/workers.html:49 +msgid "Logs" +msgstr "Logs" + #: templates/workers.html:94 msgid "Prune Selected" msgstr "Verwijder geselecteerde" @@ -1325,6 +1332,14 @@ msgstr "" "Gelieve na te zien of uw Machinaris container voor deze blockchain actief" " is. Verifieer ook de instellingen op de pagina Waarschuwingen." +#: templates/farming/workers.html:80 templates/index/index.html:176 +msgid "Previous" +msgstr "Vorige" + +#: templates/farming/workers.html:84 templates/index/index.html:180 +msgid "Next" +msgstr "Volgende" + #: templates/farming/workers.html:94 #, python-format msgid "" @@ -1338,6 +1353,69 @@ msgstr "" "%(wiki_link_open)s geconfigureerd %(wiki_link_close)s. Verifieer ook op " "de Werkers pagina of de Chia werker rapporteert naar de controller." +#: templates/index/chart_balances.html:85 templates/index/chart_farmed.html:131 +#: templates/index/chart_netspace.html:91 +#: templates/index/chart_plot_count.html:84 +#: templates/index/chart_plots_size.html:84 templates/plotting/jobs.html:285 +#: templates/views/index_script_block.js:90 +msgid "Date" +msgstr "" + +#: templates/index/chart_balances.html:102 +#: templates/index/chart_farmed.html:148 +#: templates/views/index_script_block.js:107 +msgid "Coins" +msgstr "" + +#: templates/index/chart_farmed.html:48 templates/index/index.html:97 +msgid "Farmed Blocks" +msgstr "" + +#: templates/index/chart_farmed.html:53 +msgid "Plot File" +msgstr "" + +#: templates/index/chart_farmed.html:54 +msgid "Farmed Block" +msgstr "" + +#: templates/index/chart_farmed.html:55 +#, fuzzy +msgid "Farmed At" +msgstr "Farmed" + +#: templates/index/chart_plot_count.html:101 templates/index/index.html:70 +msgid "Plot Count" +msgstr "" + +#: templates/index/index.html:30 +msgid "Expected Time to Win" +msgstr "Verwachte Tijd om te Winnen" + +#: templates/index/index.html:73 +msgid "Total Plots" +msgstr "Totaal Aantal Plots" + +#: templates/index/index.html:81 +msgid "Total Plots Size" +msgstr "Totale Omvang Plots" + +#: templates/index/index.html:101 +msgid "Farmed" +msgstr "Farmed" + +#: templates/index/index.html:111 +msgid "Netspace" +msgstr "Netgrootte" + +#: templates/index/index.html:144 +msgid "Challenges from Harvesters" +msgstr "Uitdagingen van Harvesters" + +#: templates/index/index.html:162 +msgid "Partial Proofs for Pools" +msgstr "Gedeeltelijke bewijzen voor Pools" + #: templates/plotting/jobs.html:9 msgid "Confirm Kill" msgstr "Bevestig Kill" @@ -1441,10 +1519,6 @@ msgstr "Geselecteerde herstarten" msgid "Plotting Speed - k%(k_size)s Plots" msgstr "Plotting snelheid - k%(k_size)s Plots" -#: templates/plotting/jobs.html:285 -msgid "Date" -msgstr "" - #: templates/plotting/jobs.html:302 msgid "Time (minutes)" msgstr "" @@ -1509,7 +1583,7 @@ msgid "Archiving is disabled. See Settings | Plotting page." msgstr "Archivering is uitgeschakeld. Zie pagina Instellingen | Plotting." #: templates/plotting/workers.html:256 -#: templates/views/index_script_block.js:152 +#: templates/views/index_script_block.js:232 msgid "Time - Last 24 Hours" msgstr "" @@ -1602,15 +1676,15 @@ msgstr "Opslaan..." msgid "PlotNFT Log on " msgstr "PlotNFS log op " -#: templates/views/index_script_block.js:85 +#: templates/views/index_script_block.js:163 msgid "Time - Recent" msgstr "" -#: templates/views/index_script_block.js:102 +#: templates/views/index_script_block.js:180 msgid "Time Taken (seconds)" msgstr "" -#: templates/views/index_script_block.js:169 +#: templates/views/index_script_block.js:249 msgid "Partials Submitted" msgstr "" diff --git a/web/translations/pt_PT/LC_MESSAGES/messages.po b/web/translations/pt_PT/LC_MESSAGES/messages.po index d17d6dd9..30799a27 100644 --- a/web/translations/pt_PT/LC_MESSAGES/messages.po +++ b/web/translations/pt_PT/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-04-23 11:14-0600\n" +"POT-Creation-Date: 2022-06-06 20:47-0600\n" "PO-Revision-Date: 2022-02-13 13:45-0700\n" "Last-Translator: Antonio Casqueiro\n" "Language: pt\n" @@ -18,31 +18,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.1\n" -#: routes.py:90 routes.py:233 +#: routes.py:113 routes.py:256 msgid "Saved local currency setting." msgstr "Gravar definições da moeda local" -#: routes.py:110 +#: routes.py:133 msgid "Blockchain download" msgstr "Descarregando o Blockchain" -#: routes.py:142 +#: routes.py:165 msgid "Unknown plotting form" msgstr "Plotting form desconhecido" -#: routes.py:192 +#: routes.py:215 msgid "Error! Please see logs." msgstr "Erro! Por favor consulte os logs." -#: routes.py:218 +#: routes.py:241 msgid "Unknown alerts form" msgstr "Alerts form desconhecido" -#: routes.py:238 +#: routes.py:261 msgid "Saved cold wallet addresses." msgstr "O endereço da Cold Wallet foi gravado." -#: routes.py:306 +#: routes.py:329 msgid "" "Saved mapping settings. Please allow 10 minutes to generate location " "information for the map." @@ -50,11 +50,11 @@ msgstr "" "A definições do mapa foram gravadas. Por favor aguarde 10 minutos para " "que o mapa seja actualizado com a geolocalização." -#: routes.py:314 +#: routes.py:337 msgid "Unknown form action" msgstr "Form action desconhecida" -#: routes.py:420 +#: routes.py:443 #, fuzzy, python-format msgid "" "No worker at %(worker)s for blockchain %(blockchain)s. Please select " @@ -63,7 +63,7 @@ msgstr "" "Não existe worker no %(worker)s para o blockchain %(blockchain)s. Por " "favor seleccione outro blockchain." -#: routes.py:426 +#: routes.py:449 #, fuzzy, python-format msgid "" "For Alerts config, found no responding fullnode found for %(blockchain)s." @@ -72,7 +72,7 @@ msgstr "" "Na configuração dos Alertas, foi encontrado um fullnode que não responde " "para o %(blockchain)s. Por favor verifica os teus workers." -#: routes.py:431 +#: routes.py:454 #, fuzzy, python-format msgid "" "For Farming config, found no responding fullnode found for " @@ -81,7 +81,7 @@ msgstr "" "Na configuração de Farming, foi encontrado um fullnode que não responde " "para o %(blockchain)s. Por favor verifica os teus workers." -#: routes.py:438 +#: routes.py:461 #, fuzzy, python-format msgid "" "For Plotting config, found no responding fullnode found for " @@ -90,7 +90,7 @@ msgstr "" "Na configuração de Plotting, foi encontrado um fullnode que não responde " "para o %(blockchain)s. Por favor verifica os teus workers." -#: routes.py:443 +#: routes.py:466 #, fuzzy, python-format msgid "" "No responding fullnode found for %(blockchain)s. Please check your " @@ -99,7 +99,7 @@ msgstr "" "Foi encontrado um fullnode que não responde para o %(blockchain)s. Por " "favor verifica os teus workers." -#: routes.py:462 +#: routes.py:485 msgid "Unsupported log type" msgstr "Tipo de log não suportado" @@ -128,7 +128,8 @@ msgid "Idle" msgstr "" #: actions/plotman.py:47 actions/plotman.py:48 models/chia.py:211 -#: models/plotman.py:67 templates/index.html:42 templates/index.html:52 +#: models/plotman.py:67 templates/index/index.html:42 +#: templates/index/index.html:52 #, fuzzy msgid "Active" msgstr "Gravar" @@ -138,19 +139,46 @@ msgstr "Gravar" msgid "Suspended" msgstr "Suspender os seleccionados" -#: actions/stats.py:56 actions/stats.py:90 actions/stats.py:108 -#: actions/stats.py:110 +#: actions/stats.py:57 actions/stats.py:92 actions/stats.py:109 +#: actions/stats.py:130 actions/stats.py:132 msgid "in last day." msgstr "no último dia." -#: actions/stats.py:338 +#: actions/stats.py:360 msgid "secs" msgstr "segs" -#: actions/stats.py:348 models/chia.py:251 +#: actions/stats.py:370 models/chia.py:251 msgid "hour" msgstr "hora" +#: actions/stats.py:399 templates/views/index_script_block.js:51 +msgid "Farmed Coins" +msgstr "" + +#: actions/stats.py:416 +#, fuzzy +msgid "Wallet Balances" +msgstr "Wallet: Saldo" + +#: actions/stats.py:433 templates/index/index.html:105 +#, fuzzy +msgid "Netspace Size" +msgstr "Netspace" + +#: actions/stats.py:434 actions/stats.py:492 +msgid "Size" +msgstr "" + +#: actions/stats.py:472 +msgid "Plot Counts" +msgstr "" + +#: actions/stats.py:491 templates/index/index.html:78 +#, fuzzy +msgid "Plots Size" +msgstr "Plots: Total de espaço ocupado" + #: actions/warnings.py:56 msgid "Dismiss Warning" msgstr "" @@ -200,11 +228,11 @@ msgstr "" msgid "days" msgstr "dias" -#: models/chia.py:213 templates/summary.html:100 templates/wallet.html:128 +#: models/chia.py:213 templates/summary.html:105 templates/wallet.html:129 msgid "Syncing" msgstr "A sincronizar" -#: models/chia.py:215 templates/index.html:54 +#: models/chia.py:215 templates/index/index.html:54 msgid "Not available" msgstr "" @@ -213,9 +241,10 @@ msgstr "" msgid "Not synced" msgstr "Não sincronizado" -#: models/chia.py:220 templates/index.html:54 templates/plotting/jobs.html:114 -#: templates/plotting/workers.html:116 templates/summary.html:96 -#: templates/wallet.html:124 templates/worker.html:78 templates/workers.html:72 +#: models/chia.py:220 templates/index/index.html:54 +#: templates/plotting/jobs.html:114 templates/plotting/workers.html:116 +#: templates/summary.html:101 templates/wallet.html:125 +#: templates/worker.html:78 templates/workers.html:72 msgid "Offline" msgstr "Offline" @@ -276,16 +305,16 @@ msgid "Alerts: Recent Notifications" msgstr "Alertas: Notificações recentes" #: templates/alerts.html:72 templates/drives.html:86 -#: templates/settings/alerts.html:36 templates/settings/farming.html:37 -#: templates/settings/plotting.html:37 templates/settings/tools.html:36 -#: templates/worker.html:14 +#: templates/index/chart_farmed.html:52 templates/settings/alerts.html:36 +#: templates/settings/farming.html:37 templates/settings/plotting.html:37 +#: templates/settings/tools.html:36 templates/worker.html:14 msgid "Worker" msgstr "Worker" -#: templates/alerts.html:73 templates/blockchains.html:31 +#: templates/alerts.html:73 templates/blockchains.html:35 #: templates/settings/alerts.html:45 templates/settings/farming.html:46 #: templates/settings/plotting.html:46 templates/settings/tools.html:45 -#: templates/summary.html:73 templates/wallet.html:108 templates/worker.html:47 +#: templates/summary.html:77 templates/wallet.html:108 templates/worker.html:47 #: templates/workers.html:43 msgid "Blockchain" msgstr "Blockchain" @@ -357,17 +386,17 @@ msgstr "Machinaris" msgid "Summary" msgstr "Sumário" -#: templates/base.html:38 templates/base.html:113 templates/index.html:41 +#: templates/base.html:38 templates/base.html:113 templates/index/index.html:41 #: templates/plotting/jobs.html:101 templates/settings/plotting.html:14 msgid "Plotting" msgstr "Plotting" -#: templates/base.html:44 templates/base.html:107 templates/index.html:50 +#: templates/base.html:44 templates/base.html:107 templates/index/index.html:50 #: templates/settings/farming.html:15 msgid "Farming" msgstr "Farming" -#: templates/base.html:50 +#: templates/base.html:50 templates/index/index.html:126 msgid "Wallets" msgstr "Wallets" @@ -394,7 +423,7 @@ msgstr "Pools" #: templates/base.html:86 templates/farming/plots.html:69 #: templates/farming/workers.html:28 templates/plotting/jobs.html:94 -#: templates/plotting/workers.html:96 templates/summary.html:77 +#: templates/plotting/workers.html:96 templates/summary.html:81 #: templates/workers.html:14 msgid "Workers" msgstr "Workers" @@ -454,48 +483,53 @@ msgstr "Madmax" msgid "Plotman" msgstr "Plotman" -#: templates/blockchains.html:23 +#: templates/blockchains.html:27 msgid "Blockchain Summary" msgstr "Blockchain sumário" -#: templates/blockchains.html:32 templates/drives.html:91 -#: templates/summary.html:74 templates/wallet.html:109 +#: templates/blockchains.html:36 templates/drives.html:91 +#: templates/summary.html:78 templates/wallet.html:109 msgid "Status" msgstr "Estado" -#: templates/blockchains.html:33 +#: templates/blockchains.html:37 msgid "Peak Height" msgstr "Peak Height\"" -#: templates/blockchains.html:34 +#: templates/blockchains.html:38 msgid "Peak Time" msgstr "Peak Time" -#: templates/blockchains.html:35 templates/drives.html:93 +#: templates/blockchains.html:39 templates/drives.html:93 #: templates/wallet.html:114 msgid "Updated At" msgstr "Actualizado em" -#: templates/blockchains.html:36 templates/summary.html:87 -#: templates/workers.html:49 -msgid "Logs" -msgstr "Logs" +#: templates/blockchains.html:63 +#, fuzzy +msgid "View Blockchain Details" +msgstr "Blockchain: Detalhes" -#: templates/blockchains.html:66 +#: templates/blockchains.html:65 templates/blockchains.html:79 msgid "Blockchain Details" msgstr "Blockchain: Detalhes" -#: templates/blockchains.html:91 +#: templates/blockchains.html:69 templates/summary.html:126 +#, fuzzy +msgid "View Blockchain Log" +msgstr "Descarregando o Blockchain" + +#: templates/blockchains.html:104 msgid "No blockchains found from any farmers. Not added?" msgstr "" "Não foi encontrado nenhum blockchain para os farmers. Não foram " "adicionados?" -#: templates/blockchains.html:92 +#: templates/blockchains.html:105 msgid "Try running \"chia show --state\" on your farmers to verify." msgstr "Tente correr \"chia show --state\" nos seus farmers para verificar." -#: templates/blockchains.html:106 templates/summary.html:143 +#: templates/blockchains.html:119 templates/summary.html:152 msgid "Fullnode Log for " msgstr "" @@ -671,46 +705,6 @@ msgstr "" "Para mais informação, veja o Machinaris " "%(wiki_link_open)swiki%(wiki_link_close)s." -#: templates/index.html:30 -msgid "Expected Time to Win" -msgstr "Tempo expectável para ganhar" - -#: templates/index.html:72 -msgid "Total Plots" -msgstr "Plots: Total" - -#: templates/index.html:79 -msgid "Total Plots Size" -msgstr "Plots: Total de espaço ocupado" - -#: templates/index.html:89 templates/wallet.html:113 -msgid "Balance" -msgstr "Saldo" - -#: templates/index.html:96 -msgid "Farmed" -msgstr "Farmed" - -#: templates/index.html:105 -msgid "Netspace" -msgstr "Netspace" - -#: templates/index.html:120 -msgid "Challenges from Harvesters" -msgstr "Challenges das Harvesters" - -#: templates/index.html:136 -msgid "Partial Proofs for Pools" -msgstr "Partial Proofs das Pools" - -#: templates/farming/workers.html:80 templates/index.html:147 -msgid "Previous" -msgstr "Anterior" - -#: templates/farming/workers.html:84 templates/index.html:151 -msgid "Next" -msgstr "Seguinte" - #: templates/keys.html:43 msgid "NOTE: Machinaris will never display your private key here." msgstr "NOTA: Machinaris nunca irá mostrar a tua chave privada aqui." @@ -882,50 +876,55 @@ msgstr "" msgid "Local Currency:" msgstr "Moeda local:" -#: templates/summary.html:75 +#: templates/summary.html:79 msgid "Height" msgstr "Height" #: templates/farming/plots.html:66 templates/farming/workers.html:25 -#: templates/summary.html:76 +#: templates/summary.html:80 msgid "Plots" msgstr "Plots" -#: templates/summary.html:78 +#: templates/summary.html:82 msgid "Max Resp." msgstr "Max Resp." -#: templates/summary.html:79 +#: templates/summary.html:83 msgid "Partials" msgstr "Partials" -#: templates/summary.html:80 +#: templates/summary.html:84 msgid "ETW" msgstr "ETW" -#: templates/summary.html:82 +#: templates/summary.html:86 msgid "Wallet" msgstr "Wallet" -#: templates/summary.html:83 templates/summary.html:84 +#: templates/summary.html:87 templates/summary.html:88 msgid "EDV" msgstr "EDV" -#: templates/summary.html:98 templates/wallet.html:126 +#: templates/summary.html:103 templates/wallet.html:127 msgid "Synced" msgstr "Sincronizado" -#: templates/summary.html:102 templates/wallet.html:130 +#: templates/summary.html:107 templates/wallet.html:131 msgid "Not Synced" msgstr "Não sincronizado" -#: templates/summary.html:128 +#: templates/summary.html:123 templates/wallet.html:142 +#, fuzzy +msgid "Chart Wallet" +msgstr "Editar wallet" + +#: templates/summary.html:137 msgid "No blockchains found from any farmers. Just starting up?" msgstr "" "Não foram encontrados blockchains para nenhum dos farmers. Acabaste de " "arrancar o sistema?" -#: templates/summary.html:129 +#: templates/summary.html:138 msgid "Please allow at least 15 minutes for blockchains to get started." msgstr "Por favor aguarde pelo menos 15 minutos para os blockchains iniciarem." @@ -941,7 +940,7 @@ msgstr "Endereço da Cold Wallet:" msgid "Wallet Summary" msgstr "Wallet: Sumário" -#: templates/wallet.html:110 +#: templates/index/index.html:89 templates/wallet.html:110 msgid "Wallet Balance" msgstr "Wallet: Saldo" @@ -949,19 +948,23 @@ msgstr "Wallet: Saldo" msgid "Cold Wallet Balance" msgstr "Cold Wallet: Saldo" -#: templates/wallet.html:112 +#: templates/views/index_script_block.js:56 templates/wallet.html:112 msgid "Total Balance" msgstr "Saldo" -#: templates/wallet.html:140 +#: templates/index/index.html:92 templates/wallet.html:113 +msgid "Balance" +msgstr "Saldo" + +#: templates/wallet.html:144 msgid "Edit Wallet" msgstr "Editar wallet" -#: templates/wallet.html:151 +#: templates/wallet.html:155 msgid "Wallet Details" msgstr "Detalhes da Wallet" -#: templates/wallet.html:175 +#: templates/wallet.html:179 msgid "" "No wallet status received. Perhaps just starting? Please allow at least" " 10 minutes to update." @@ -969,7 +972,7 @@ msgstr "" "O estado da Wallet ainda não foi recebido. Acabaste de arrancar o " "sistema? Por favor aguarda pelo menos 10 minutos para a actualização." -#: templates/wallet.html:176 +#: templates/wallet.html:180 msgid "" "You can also try running \"chia wallet show\" on your fullnode's in-" "container shell to verify." @@ -1057,46 +1060,46 @@ msgstr "Espaço em disco usado (GB)" msgid "Disk Space Free (GB)" msgstr "Espaço em disco livre (GB)" -#: templates/worker_launch.html:50 templates/worker_launch.html:640 -#: templates/worker_launch.html:669 +#: templates/worker_launch.html:50 templates/worker_launch.html:642 +#: templates/worker_launch.html:671 msgid "Host Path" msgstr "Host path" -#: templates/worker_launch.html:55 templates/worker_launch.html:645 -#: templates/worker_launch.html:674 +#: templates/worker_launch.html:55 templates/worker_launch.html:647 +#: templates/worker_launch.html:676 msgid "Container Path" msgstr "Container path" -#: templates/worker_launch.html:60 templates/worker_launch.html:650 -#: templates/worker_launch.html:679 +#: templates/worker_launch.html:60 templates/worker_launch.html:652 +#: templates/worker_launch.html:681 msgid "Used for:" msgstr "Usado para:" -#: templates/worker_launch.html:63 templates/worker_launch.html:653 -#: templates/worker_launch.html:682 +#: templates/worker_launch.html:63 templates/worker_launch.html:655 +#: templates/worker_launch.html:684 msgid "Final Plots" msgstr "Plots finais" -#: templates/worker_launch.html:64 templates/worker_launch.html:654 -#: templates/worker_launch.html:683 +#: templates/worker_launch.html:64 templates/worker_launch.html:656 +#: templates/worker_launch.html:685 msgid "Plotting Temp" msgstr "Plotting temp" -#: templates/worker_launch.html:65 templates/worker_launch.html:655 -#: templates/worker_launch.html:684 +#: templates/worker_launch.html:65 templates/worker_launch.html:657 +#: templates/worker_launch.html:686 msgid "Other" msgstr "Outros" -#: templates/worker_launch.html:69 templates/worker_launch.html:659 +#: templates/worker_launch.html:69 templates/worker_launch.html:661 #, fuzzy msgid "Location" msgstr "Notifcação" -#: templates/worker_launch.html:72 templates/worker_launch.html:662 +#: templates/worker_launch.html:72 templates/worker_launch.html:664 msgid "Local" msgstr "" -#: templates/worker_launch.html:73 templates/worker_launch.html:663 +#: templates/worker_launch.html:73 templates/worker_launch.html:665 msgid "Remote" msgstr "" @@ -1104,7 +1107,7 @@ msgstr "" msgid "Unknown blockchain fork of selected:" msgstr "Unknown blockchain fork of selected:" -#: templates/worker_launch.html:284 +#: templates/worker_launch.html:285 msgid "" "Missing worker hostname. Please provide a short name to identify your " "worker." @@ -1112,7 +1115,7 @@ msgstr "" "Falta o hostname do Worker. Por favor indique um nome cursto para " "identificar o Worker." -#: templates/worker_launch.html:304 +#: templates/worker_launch.html:305 msgid "" "Invalid host path ending with colon. Try adding a slash to the end like " "this" @@ -1120,29 +1123,29 @@ msgstr "" "Host path inválido terminado com dois pontos. Tente adicionar o caracter " "'/' no final assim" -#: templates/worker_launch.html:307 +#: templates/worker_launch.html:308 msgid "Empty host path provided for volume at " msgstr "Foi indicado um host path vazio para o volume em " -#: templates/worker_launch.html:307 +#: templates/worker_launch.html:308 msgid "Please provide a host path." msgstr "Por favor indique um host path." -#: templates/worker_launch.html:309 +#: templates/worker_launch.html:310 msgid "Empty container path provided for volume at " msgstr "Foi indicado um container path vazio para o volume em " -#: templates/worker_launch.html:309 +#: templates/worker_launch.html:310 msgid "Please provide a container path." msgstr "Por favor indique um container path." -#: templates/worker_launch.html:355 +#: templates/worker_launch.html:356 msgid "Neither Harvester or Plottter mode selected. Please choose one or both." msgstr "" "Não foi seleccionado o modo Harvester nem o modo Plottter. Por favor " "escolha um ou ambos." -#: templates/worker_launch.html:361 +#: templates/worker_launch.html:362 msgid "" "Missing worker IP address. Please provide the IP the controller will " "connect to for commands." @@ -1150,11 +1153,11 @@ msgstr "" "Falta o endereço IP do Worker. Por favor indique o endereço IP que o " "controlador irá ligar-se para comandos." -#: templates/worker_launch.html:411 +#: templates/worker_launch.html:413 msgid "Machinaris Worker - Launch Config" msgstr "Machinaris Worker - Configuração de arranque" -#: templates/worker_launch.html:412 +#: templates/worker_launch.html:414 msgid "" "Complete the form below to run new harvesters/plotters on other computers" " across your network. Save the generated docker-compose.yml file to a " @@ -1166,95 +1169,95 @@ msgstr "" "numa pasta chamada \"machinaris\", depois executa \"docker-compose up\" a" " partir da linha de comandos." -#: templates/worker_launch.html:416 +#: templates/worker_launch.html:418 msgid "Operating System" msgstr "Sistema operativo" -#: templates/worker_launch.html:422 +#: templates/worker_launch.html:424 msgid "Linux" msgstr "Linux" -#: templates/worker_launch.html:429 +#: templates/worker_launch.html:431 msgid "Macintosh" msgstr "Macintosh" -#: templates/worker_launch.html:436 +#: templates/worker_launch.html:438 msgid "Windows" msgstr "Windows" -#: templates/worker_launch.html:442 +#: templates/worker_launch.html:444 msgid "Machinaris Mode" msgstr "Modo do Machinaris" -#: templates/worker_launch.html:448 +#: templates/worker_launch.html:450 msgid "Harvester" msgstr "Harvester" -#: templates/worker_launch.html:455 +#: templates/worker_launch.html:457 msgid "Plotter" msgstr "Plotter" -#: templates/worker_launch.html:463 +#: templates/worker_launch.html:465 msgid "Farmer Public Key" msgstr "Farmer chave pública" -#: templates/worker_launch.html:468 +#: templates/worker_launch.html:470 msgid "Pool Public Key" msgstr "Pool chave pública" -#: templates/worker_launch.html:473 +#: templates/worker_launch.html:475 msgid "Pool Contract Address" msgstr "Pool endereço do contrato" -#: templates/worker_launch.html:478 +#: templates/worker_launch.html:480 msgid "Plot on Startup" msgstr "Iniciar plotting ao arrancar" -#: templates/worker_launch.html:484 +#: templates/worker_launch.html:486 msgid "True" msgstr "Verdadeiro" -#: templates/worker_launch.html:491 +#: templates/worker_launch.html:493 msgid "False" msgstr "False" -#: templates/worker_launch.html:499 +#: templates/worker_launch.html:501 msgid "Controller IP Address" msgstr "Controlador: Endereço IP" -#: templates/worker_launch.html:504 +#: templates/worker_launch.html:506 msgid "Controller API Port" msgstr "Controlador: Porto da API" -#: templates/worker_launch.html:511 +#: templates/worker_launch.html:513 msgid "Worker Hostname" msgstr "Worker: Hostname" -#: templates/worker_launch.html:516 +#: templates/worker_launch.html:518 msgid "Worker IP Address" msgstr "Worker: Endereço IP" -#: templates/worker_launch.html:523 +#: templates/worker_launch.html:525 msgid "Blockchains to Farm" msgstr "Blockchains to Farm" -#: templates/worker_launch.html:636 +#: templates/worker_launch.html:638 msgid "Volume Mounts" msgstr "Volumes montados" -#: templates/worker_launch.html:693 +#: templates/worker_launch.html:695 msgid "Add New Volume" msgstr "Adicionar um novo volume" -#: templates/worker_launch.html:695 +#: templates/worker_launch.html:697 msgid "Remove Last Volume" msgstr "Remover o último volume" -#: templates/worker_launch.html:702 +#: templates/worker_launch.html:704 msgid "Copy" msgstr "Copiar" -#: templates/worker_launch.html:706 +#: templates/worker_launch.html:708 msgid "Docker Compose" msgstr "Docker Compose" @@ -1270,6 +1273,10 @@ msgstr "Último ping" msgid "Last Successful Ping" msgstr "Último ping com sucesso" +#: templates/workers.html:49 +msgid "Logs" +msgstr "Logs" + #: templates/workers.html:94 msgid "Prune Selected" msgstr "Eliminar os seleccionados" @@ -1340,6 +1347,14 @@ msgstr "" "Por favor verifique que o container Machinaris para este blockchain está " "a correr. Por favor verifique também as definições na página de Alertas." +#: templates/farming/workers.html:80 templates/index/index.html:176 +msgid "Previous" +msgstr "Anterior" + +#: templates/farming/workers.html:84 templates/index/index.html:180 +msgid "Next" +msgstr "Seguinte" + #: templates/farming/workers.html:94 #, python-format msgid "" @@ -1354,6 +1369,69 @@ msgstr "" "%(wiki_link_close)s. Verifique ainda que o Chia worker está a reportar " "para o Conttrolador na página dos Workers." +#: templates/index/chart_balances.html:85 templates/index/chart_farmed.html:131 +#: templates/index/chart_netspace.html:91 +#: templates/index/chart_plot_count.html:84 +#: templates/index/chart_plots_size.html:84 templates/plotting/jobs.html:285 +#: templates/views/index_script_block.js:90 +msgid "Date" +msgstr "" + +#: templates/index/chart_balances.html:102 +#: templates/index/chart_farmed.html:148 +#: templates/views/index_script_block.js:107 +msgid "Coins" +msgstr "" + +#: templates/index/chart_farmed.html:48 templates/index/index.html:97 +msgid "Farmed Blocks" +msgstr "" + +#: templates/index/chart_farmed.html:53 +msgid "Plot File" +msgstr "" + +#: templates/index/chart_farmed.html:54 +msgid "Farmed Block" +msgstr "" + +#: templates/index/chart_farmed.html:55 +#, fuzzy +msgid "Farmed At" +msgstr "Farmed" + +#: templates/index/chart_plot_count.html:101 templates/index/index.html:70 +msgid "Plot Count" +msgstr "" + +#: templates/index/index.html:30 +msgid "Expected Time to Win" +msgstr "Tempo expectável para ganhar" + +#: templates/index/index.html:73 +msgid "Total Plots" +msgstr "Plots: Total" + +#: templates/index/index.html:81 +msgid "Total Plots Size" +msgstr "Plots: Total de espaço ocupado" + +#: templates/index/index.html:101 +msgid "Farmed" +msgstr "Farmed" + +#: templates/index/index.html:111 +msgid "Netspace" +msgstr "Netspace" + +#: templates/index/index.html:144 +msgid "Challenges from Harvesters" +msgstr "Challenges das Harvesters" + +#: templates/index/index.html:162 +msgid "Partial Proofs for Pools" +msgstr "Partial Proofs das Pools" + #: templates/plotting/jobs.html:9 msgid "Confirm Kill" msgstr "Confirmar que é para matar" @@ -1457,10 +1535,6 @@ msgstr "Retomar os seleccionados" msgid "Plotting Speed - k%(k_size)s Plots" msgstr "Velocidade de Plotting - k%(k_size)s Plots" -#: templates/plotting/jobs.html:285 -msgid "Date" -msgstr "" - #: templates/plotting/jobs.html:302 msgid "Time (minutes)" msgstr "" @@ -1526,7 +1600,7 @@ msgid "Archiving is disabled. See Settings | Plotting page." msgstr "Arquivar: Desactivado. Veja a página Definições | Plotting." #: templates/plotting/workers.html:256 -#: templates/views/index_script_block.js:152 +#: templates/views/index_script_block.js:232 msgid "Time - Last 24 Hours" msgstr "" @@ -1622,15 +1696,15 @@ msgstr "Gravando..." msgid "PlotNFT Log on " msgstr "PlotNFT Log de " -#: templates/views/index_script_block.js:85 +#: templates/views/index_script_block.js:163 msgid "Time - Recent" msgstr "" -#: templates/views/index_script_block.js:102 +#: templates/views/index_script_block.js:180 msgid "Time Taken (seconds)" msgstr "" -#: templates/views/index_script_block.js:169 +#: templates/views/index_script_block.js:249 msgid "Partials Submitted" msgstr "" diff --git a/web/translations/zh/LC_MESSAGES/messages.po b/web/translations/zh/LC_MESSAGES/messages.po index a96e3747..32d98f30 100644 --- a/web/translations/zh/LC_MESSAGES/messages.po +++ b/web/translations/zh/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-04-23 11:14-0600\n" +"POT-Creation-Date: 2022-06-06 20:47-0600\n" "PO-Revision-Date: 2022-02-15 14:29-0700\n" "Last-Translator: Guy Davis\n" "Language: zh\n" @@ -19,76 +19,76 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.1\n" -#: routes.py:90 routes.py:233 +#: routes.py:113 routes.py:256 msgid "Saved local currency setting." msgstr "" -#: routes.py:110 +#: routes.py:133 msgid "Blockchain download" msgstr "" -#: routes.py:142 +#: routes.py:165 msgid "Unknown plotting form" msgstr "" -#: routes.py:192 +#: routes.py:215 msgid "Error! Please see logs." msgstr "" -#: routes.py:218 +#: routes.py:241 msgid "Unknown alerts form" msgstr "" -#: routes.py:238 +#: routes.py:261 msgid "Saved cold wallet addresses." msgstr "" -#: routes.py:306 +#: routes.py:329 msgid "" "Saved mapping settings. Please allow 10 minutes to generate location " "information for the map." msgstr "" -#: routes.py:314 +#: routes.py:337 msgid "Unknown form action" msgstr "" -#: routes.py:420 +#: routes.py:443 #, python-format msgid "" "No worker at %(worker)s for blockchain %(blockchain)s. Please select " "another blockchain." msgstr "" -#: routes.py:426 +#: routes.py:449 #, python-format msgid "" "For Alerts config, found no responding fullnode found for %(blockchain)s." " Please check your workers." msgstr "" -#: routes.py:431 +#: routes.py:454 #, python-format msgid "" "For Farming config, found no responding fullnode found for " "%(blockchain)s. Please check your workers." msgstr "" -#: routes.py:438 +#: routes.py:461 #, python-format msgid "" "For Plotting config, found no responding fullnode found for " "%(blockchain)s. Please check your workers." msgstr "" -#: routes.py:443 +#: routes.py:466 #, python-format msgid "" "No responding fullnode found for %(blockchain)s. Please check your " "workers." msgstr "" -#: routes.py:462 +#: routes.py:485 msgid "Unsupported log type" msgstr "" @@ -116,7 +116,8 @@ msgid "Idle" msgstr "" #: actions/plotman.py:47 actions/plotman.py:48 models/chia.py:211 -#: models/plotman.py:67 templates/index.html:42 templates/index.html:52 +#: models/plotman.py:67 templates/index/index.html:42 +#: templates/index/index.html:52 msgid "Active" msgstr "" @@ -124,19 +125,43 @@ msgstr "" msgid "Suspended" msgstr "" -#: actions/stats.py:56 actions/stats.py:90 actions/stats.py:108 -#: actions/stats.py:110 +#: actions/stats.py:57 actions/stats.py:92 actions/stats.py:109 +#: actions/stats.py:130 actions/stats.py:132 msgid "in last day." msgstr "" -#: actions/stats.py:338 +#: actions/stats.py:360 msgid "secs" msgstr "" -#: actions/stats.py:348 models/chia.py:251 +#: actions/stats.py:370 models/chia.py:251 msgid "hour" msgstr "" +#: actions/stats.py:399 templates/views/index_script_block.js:51 +msgid "Farmed Coins" +msgstr "" + +#: actions/stats.py:416 +msgid "Wallet Balances" +msgstr "" + +#: actions/stats.py:433 templates/index/index.html:105 +msgid "Netspace Size" +msgstr "" + +#: actions/stats.py:434 actions/stats.py:492 +msgid "Size" +msgstr "" + +#: actions/stats.py:472 +msgid "Plot Counts" +msgstr "" + +#: actions/stats.py:491 templates/index/index.html:78 +msgid "Plots Size" +msgstr "" + #: actions/warnings.py:56 msgid "Dismiss Warning" msgstr "" @@ -178,11 +203,11 @@ msgstr "" msgid "days" msgstr "" -#: models/chia.py:213 templates/summary.html:100 templates/wallet.html:128 +#: models/chia.py:213 templates/summary.html:105 templates/wallet.html:129 msgid "Syncing" msgstr "" -#: models/chia.py:215 templates/index.html:54 +#: models/chia.py:215 templates/index/index.html:54 msgid "Not available" msgstr "" @@ -190,9 +215,10 @@ msgstr "" msgid "Not synced" msgstr "" -#: models/chia.py:220 templates/index.html:54 templates/plotting/jobs.html:114 -#: templates/plotting/workers.html:116 templates/summary.html:96 -#: templates/wallet.html:124 templates/worker.html:78 templates/workers.html:72 +#: models/chia.py:220 templates/index/index.html:54 +#: templates/plotting/jobs.html:114 templates/plotting/workers.html:116 +#: templates/summary.html:101 templates/wallet.html:125 +#: templates/worker.html:78 templates/workers.html:72 msgid "Offline" msgstr "" @@ -253,16 +279,16 @@ msgid "Alerts: Recent Notifications" msgstr "" #: templates/alerts.html:72 templates/drives.html:86 -#: templates/settings/alerts.html:36 templates/settings/farming.html:37 -#: templates/settings/plotting.html:37 templates/settings/tools.html:36 -#: templates/worker.html:14 +#: templates/index/chart_farmed.html:52 templates/settings/alerts.html:36 +#: templates/settings/farming.html:37 templates/settings/plotting.html:37 +#: templates/settings/tools.html:36 templates/worker.html:14 msgid "Worker" msgstr "" -#: templates/alerts.html:73 templates/blockchains.html:31 +#: templates/alerts.html:73 templates/blockchains.html:35 #: templates/settings/alerts.html:45 templates/settings/farming.html:46 #: templates/settings/plotting.html:46 templates/settings/tools.html:45 -#: templates/summary.html:73 templates/wallet.html:108 templates/worker.html:47 +#: templates/summary.html:77 templates/wallet.html:108 templates/worker.html:47 #: templates/workers.html:43 msgid "Blockchain" msgstr "" @@ -330,17 +356,17 @@ msgstr "" msgid "Summary" msgstr "" -#: templates/base.html:38 templates/base.html:113 templates/index.html:41 +#: templates/base.html:38 templates/base.html:113 templates/index/index.html:41 #: templates/plotting/jobs.html:101 templates/settings/plotting.html:14 msgid "Plotting" msgstr "" -#: templates/base.html:44 templates/base.html:107 templates/index.html:50 +#: templates/base.html:44 templates/base.html:107 templates/index/index.html:50 #: templates/settings/farming.html:15 msgid "Farming" msgstr "" -#: templates/base.html:50 +#: templates/base.html:50 templates/index/index.html:126 msgid "Wallets" msgstr "" @@ -367,7 +393,7 @@ msgstr "" #: templates/base.html:86 templates/farming/plots.html:69 #: templates/farming/workers.html:28 templates/plotting/jobs.html:94 -#: templates/plotting/workers.html:96 templates/summary.html:77 +#: templates/plotting/workers.html:96 templates/summary.html:81 #: templates/workers.html:14 msgid "Workers" msgstr "" @@ -427,46 +453,49 @@ msgstr "" msgid "Plotman" msgstr "" -#: templates/blockchains.html:23 +#: templates/blockchains.html:27 msgid "Blockchain Summary" msgstr "" -#: templates/blockchains.html:32 templates/drives.html:91 -#: templates/summary.html:74 templates/wallet.html:109 +#: templates/blockchains.html:36 templates/drives.html:91 +#: templates/summary.html:78 templates/wallet.html:109 msgid "Status" msgstr "" -#: templates/blockchains.html:33 +#: templates/blockchains.html:37 msgid "Peak Height" msgstr "" -#: templates/blockchains.html:34 +#: templates/blockchains.html:38 msgid "Peak Time" msgstr "" -#: templates/blockchains.html:35 templates/drives.html:93 +#: templates/blockchains.html:39 templates/drives.html:93 #: templates/wallet.html:114 msgid "Updated At" msgstr "" -#: templates/blockchains.html:36 templates/summary.html:87 -#: templates/workers.html:49 -msgid "Logs" +#: templates/blockchains.html:63 +msgid "View Blockchain Details" msgstr "" -#: templates/blockchains.html:66 +#: templates/blockchains.html:65 templates/blockchains.html:79 msgid "Blockchain Details" msgstr "" -#: templates/blockchains.html:91 +#: templates/blockchains.html:69 templates/summary.html:126 +msgid "View Blockchain Log" +msgstr "" + +#: templates/blockchains.html:104 msgid "No blockchains found from any farmers. Not added?" msgstr "" -#: templates/blockchains.html:92 +#: templates/blockchains.html:105 msgid "Try running \"chia show --state\" on your farmers to verify." msgstr "" -#: templates/blockchains.html:106 templates/summary.html:143 +#: templates/blockchains.html:119 templates/summary.html:152 msgid "Fullnode Log for " msgstr "" @@ -633,46 +662,6 @@ msgstr "" msgid "For more, see the Machinaris %(wiki_link_open)swiki%(wiki_link_close)s." msgstr "" -#: templates/index.html:30 -msgid "Expected Time to Win" -msgstr "" - -#: templates/index.html:72 -msgid "Total Plots" -msgstr "" - -#: templates/index.html:79 -msgid "Total Plots Size" -msgstr "" - -#: templates/index.html:89 templates/wallet.html:113 -msgid "Balance" -msgstr "" - -#: templates/index.html:96 -msgid "Farmed" -msgstr "" - -#: templates/index.html:105 -msgid "Netspace" -msgstr "" - -#: templates/index.html:120 -msgid "Challenges from Harvesters" -msgstr "" - -#: templates/index.html:136 -msgid "Partial Proofs for Pools" -msgstr "" - -#: templates/farming/workers.html:80 templates/index.html:147 -msgid "Previous" -msgstr "" - -#: templates/farming/workers.html:84 templates/index.html:151 -msgid "Next" -msgstr "" - #: templates/keys.html:43 msgid "NOTE: Machinaris will never display your private key here." msgstr "" @@ -821,48 +810,52 @@ msgstr "" msgid "Local Currency:" msgstr "" -#: templates/summary.html:75 +#: templates/summary.html:79 msgid "Height" msgstr "" #: templates/farming/plots.html:66 templates/farming/workers.html:25 -#: templates/summary.html:76 +#: templates/summary.html:80 msgid "Plots" msgstr "" -#: templates/summary.html:78 +#: templates/summary.html:82 msgid "Max Resp." msgstr "" -#: templates/summary.html:79 +#: templates/summary.html:83 msgid "Partials" msgstr "" -#: templates/summary.html:80 +#: templates/summary.html:84 msgid "ETW" msgstr "" -#: templates/summary.html:82 +#: templates/summary.html:86 msgid "Wallet" msgstr "" -#: templates/summary.html:83 templates/summary.html:84 +#: templates/summary.html:87 templates/summary.html:88 msgid "EDV" msgstr "" -#: templates/summary.html:98 templates/wallet.html:126 +#: templates/summary.html:103 templates/wallet.html:127 msgid "Synced" msgstr "" -#: templates/summary.html:102 templates/wallet.html:130 +#: templates/summary.html:107 templates/wallet.html:131 msgid "Not Synced" msgstr "" -#: templates/summary.html:128 +#: templates/summary.html:123 templates/wallet.html:142 +msgid "Chart Wallet" +msgstr "" + +#: templates/summary.html:137 msgid "No blockchains found from any farmers. Just starting up?" msgstr "" -#: templates/summary.html:129 +#: templates/summary.html:138 msgid "Please allow at least 15 minutes for blockchains to get started." msgstr "" @@ -878,7 +871,7 @@ msgstr "" msgid "Wallet Summary" msgstr "" -#: templates/wallet.html:110 +#: templates/index/index.html:89 templates/wallet.html:110 msgid "Wallet Balance" msgstr "" @@ -886,25 +879,29 @@ msgstr "" msgid "Cold Wallet Balance" msgstr "" -#: templates/wallet.html:112 +#: templates/views/index_script_block.js:56 templates/wallet.html:112 msgid "Total Balance" msgstr "" -#: templates/wallet.html:140 +#: templates/index/index.html:92 templates/wallet.html:113 +msgid "Balance" +msgstr "" + +#: templates/wallet.html:144 msgid "Edit Wallet" msgstr "" -#: templates/wallet.html:151 +#: templates/wallet.html:155 msgid "Wallet Details" msgstr "" -#: templates/wallet.html:175 +#: templates/wallet.html:179 msgid "" "No wallet status received. Perhaps just starting? Please allow at least" " 10 minutes to update." msgstr "" -#: templates/wallet.html:176 +#: templates/wallet.html:180 msgid "" "You can also try running \"chia wallet show\" on your fullnode's in-" "container shell to verify." @@ -990,45 +987,45 @@ msgstr "" msgid "Disk Space Free (GB)" msgstr "" -#: templates/worker_launch.html:50 templates/worker_launch.html:640 -#: templates/worker_launch.html:669 +#: templates/worker_launch.html:50 templates/worker_launch.html:642 +#: templates/worker_launch.html:671 msgid "Host Path" msgstr "" -#: templates/worker_launch.html:55 templates/worker_launch.html:645 -#: templates/worker_launch.html:674 +#: templates/worker_launch.html:55 templates/worker_launch.html:647 +#: templates/worker_launch.html:676 msgid "Container Path" msgstr "" -#: templates/worker_launch.html:60 templates/worker_launch.html:650 -#: templates/worker_launch.html:679 +#: templates/worker_launch.html:60 templates/worker_launch.html:652 +#: templates/worker_launch.html:681 msgid "Used for:" msgstr "" -#: templates/worker_launch.html:63 templates/worker_launch.html:653 -#: templates/worker_launch.html:682 +#: templates/worker_launch.html:63 templates/worker_launch.html:655 +#: templates/worker_launch.html:684 msgid "Final Plots" msgstr "" -#: templates/worker_launch.html:64 templates/worker_launch.html:654 -#: templates/worker_launch.html:683 +#: templates/worker_launch.html:64 templates/worker_launch.html:656 +#: templates/worker_launch.html:685 msgid "Plotting Temp" msgstr "" -#: templates/worker_launch.html:65 templates/worker_launch.html:655 -#: templates/worker_launch.html:684 +#: templates/worker_launch.html:65 templates/worker_launch.html:657 +#: templates/worker_launch.html:686 msgid "Other" msgstr "" -#: templates/worker_launch.html:69 templates/worker_launch.html:659 +#: templates/worker_launch.html:69 templates/worker_launch.html:661 msgid "Location" msgstr "" -#: templates/worker_launch.html:72 templates/worker_launch.html:662 +#: templates/worker_launch.html:72 templates/worker_launch.html:664 msgid "Local" msgstr "" -#: templates/worker_launch.html:73 templates/worker_launch.html:663 +#: templates/worker_launch.html:73 templates/worker_launch.html:665 msgid "Remote" msgstr "" @@ -1036,49 +1033,49 @@ msgstr "" msgid "Unknown blockchain fork of selected:" msgstr "" -#: templates/worker_launch.html:284 +#: templates/worker_launch.html:285 msgid "" "Missing worker hostname. Please provide a short name to identify your " "worker." msgstr "" -#: templates/worker_launch.html:304 +#: templates/worker_launch.html:305 msgid "" "Invalid host path ending with colon. Try adding a slash to the end like " "this" msgstr "" -#: templates/worker_launch.html:307 +#: templates/worker_launch.html:308 msgid "Empty host path provided for volume at " msgstr "" -#: templates/worker_launch.html:307 +#: templates/worker_launch.html:308 msgid "Please provide a host path." msgstr "" -#: templates/worker_launch.html:309 +#: templates/worker_launch.html:310 msgid "Empty container path provided for volume at " msgstr "" -#: templates/worker_launch.html:309 +#: templates/worker_launch.html:310 msgid "Please provide a container path." msgstr "" -#: templates/worker_launch.html:355 +#: templates/worker_launch.html:356 msgid "Neither Harvester or Plottter mode selected. Please choose one or both." msgstr "" -#: templates/worker_launch.html:361 +#: templates/worker_launch.html:362 msgid "" "Missing worker IP address. Please provide the IP the controller will " "connect to for commands." msgstr "" -#: templates/worker_launch.html:411 +#: templates/worker_launch.html:413 msgid "Machinaris Worker - Launch Config" msgstr "" -#: templates/worker_launch.html:412 +#: templates/worker_launch.html:414 msgid "" "Complete the form below to run new harvesters/plotters on other computers" " across your network. Save the generated docker-compose.yml file to a " @@ -1086,95 +1083,95 @@ msgid "" "shell." msgstr "" -#: templates/worker_launch.html:416 +#: templates/worker_launch.html:418 msgid "Operating System" msgstr "" -#: templates/worker_launch.html:422 +#: templates/worker_launch.html:424 msgid "Linux" msgstr "" -#: templates/worker_launch.html:429 +#: templates/worker_launch.html:431 msgid "Macintosh" msgstr "" -#: templates/worker_launch.html:436 +#: templates/worker_launch.html:438 msgid "Windows" msgstr "" -#: templates/worker_launch.html:442 +#: templates/worker_launch.html:444 msgid "Machinaris Mode" msgstr "" -#: templates/worker_launch.html:448 +#: templates/worker_launch.html:450 msgid "Harvester" msgstr "" -#: templates/worker_launch.html:455 +#: templates/worker_launch.html:457 msgid "Plotter" msgstr "" -#: templates/worker_launch.html:463 +#: templates/worker_launch.html:465 msgid "Farmer Public Key" msgstr "" -#: templates/worker_launch.html:468 +#: templates/worker_launch.html:470 msgid "Pool Public Key" msgstr "" -#: templates/worker_launch.html:473 +#: templates/worker_launch.html:475 msgid "Pool Contract Address" msgstr "" -#: templates/worker_launch.html:478 +#: templates/worker_launch.html:480 msgid "Plot on Startup" msgstr "" -#: templates/worker_launch.html:484 +#: templates/worker_launch.html:486 msgid "True" msgstr "" -#: templates/worker_launch.html:491 +#: templates/worker_launch.html:493 msgid "False" msgstr "" -#: templates/worker_launch.html:499 +#: templates/worker_launch.html:501 msgid "Controller IP Address" msgstr "" -#: templates/worker_launch.html:504 +#: templates/worker_launch.html:506 msgid "Controller API Port" msgstr "" -#: templates/worker_launch.html:511 +#: templates/worker_launch.html:513 msgid "Worker Hostname" msgstr "" -#: templates/worker_launch.html:516 +#: templates/worker_launch.html:518 msgid "Worker IP Address" msgstr "" -#: templates/worker_launch.html:523 +#: templates/worker_launch.html:525 msgid "Blockchains to Farm" msgstr "" -#: templates/worker_launch.html:636 +#: templates/worker_launch.html:638 msgid "Volume Mounts" msgstr "" -#: templates/worker_launch.html:693 +#: templates/worker_launch.html:695 msgid "Add New Volume" msgstr "" -#: templates/worker_launch.html:695 +#: templates/worker_launch.html:697 msgid "Remove Last Volume" msgstr "" -#: templates/worker_launch.html:702 +#: templates/worker_launch.html:704 msgid "Copy" msgstr "" -#: templates/worker_launch.html:706 +#: templates/worker_launch.html:708 msgid "Docker Compose" msgstr "" @@ -1190,6 +1187,10 @@ msgstr "" msgid "Last Successful Ping" msgstr "" +#: templates/workers.html:49 +msgid "Logs" +msgstr "" + #: templates/workers.html:94 msgid "Prune Selected" msgstr "" @@ -1254,6 +1255,14 @@ msgid "" "running. Also please verify settings on the Alerts page." msgstr "" +#: templates/farming/workers.html:80 templates/index/index.html:176 +msgid "Previous" +msgstr "" + +#: templates/farming/workers.html:84 templates/index/index.html:180 +msgid "Next" +msgstr "" + #: templates/farming/workers.html:94 #, python-format msgid "" @@ -1263,6 +1272,68 @@ msgid "" "worker is reporting into the controller on the Workers page." msgstr "" +#: templates/index/chart_balances.html:85 templates/index/chart_farmed.html:131 +#: templates/index/chart_netspace.html:91 +#: templates/index/chart_plot_count.html:84 +#: templates/index/chart_plots_size.html:84 templates/plotting/jobs.html:285 +#: templates/views/index_script_block.js:90 +msgid "Date" +msgstr "" + +#: templates/index/chart_balances.html:102 +#: templates/index/chart_farmed.html:148 +#: templates/views/index_script_block.js:107 +msgid "Coins" +msgstr "" + +#: templates/index/chart_farmed.html:48 templates/index/index.html:97 +msgid "Farmed Blocks" +msgstr "" + +#: templates/index/chart_farmed.html:53 +msgid "Plot File" +msgstr "" + +#: templates/index/chart_farmed.html:54 +msgid "Farmed Block" +msgstr "" + +#: templates/index/chart_farmed.html:55 +msgid "Farmed At" +msgstr "" + +#: templates/index/chart_plot_count.html:101 templates/index/index.html:70 +msgid "Plot Count" +msgstr "" + +#: templates/index/index.html:30 +msgid "Expected Time to Win" +msgstr "" + +#: templates/index/index.html:73 +msgid "Total Plots" +msgstr "" + +#: templates/index/index.html:81 +msgid "Total Plots Size" +msgstr "" + +#: templates/index/index.html:101 +msgid "Farmed" +msgstr "" + +#: templates/index/index.html:111 +msgid "Netspace" +msgstr "" + +#: templates/index/index.html:144 +msgid "Challenges from Harvesters" +msgstr "" + +#: templates/index/index.html:162 +msgid "Partial Proofs for Pools" +msgstr "" + #: templates/plotting/jobs.html:9 msgid "Confirm Kill" msgstr "" @@ -1354,10 +1425,6 @@ msgstr "" msgid "Plotting Speed - k%(k_size)s Plots" msgstr "" -#: templates/plotting/jobs.html:285 -msgid "Date" -msgstr "" - #: templates/plotting/jobs.html:302 msgid "Time (minutes)" msgstr "" @@ -1413,7 +1480,7 @@ msgid "Archiving is disabled. See Settings | Plotting page." msgstr "" #: templates/plotting/workers.html:256 -#: templates/views/index_script_block.js:152 +#: templates/views/index_script_block.js:232 msgid "Time - Last 24 Hours" msgstr "" @@ -1499,15 +1566,15 @@ msgstr "" msgid "PlotNFT Log on " msgstr "" -#: templates/views/index_script_block.js:85 +#: templates/views/index_script_block.js:163 msgid "Time - Recent" msgstr "" -#: templates/views/index_script_block.js:102 +#: templates/views/index_script_block.js:180 msgid "Time Taken (seconds)" msgstr "" -#: templates/views/index_script_block.js:169 +#: templates/views/index_script_block.js:249 msgid "Partials Submitted" msgstr "" From ca6b31bd332215d743dc3ee538419b273f4b4151 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 7 Jun 2022 17:23:19 -0600 Subject: [PATCH 0772/1625] Updates for charts and i18n. --- CHANGELOG.md | 2 +- api/models/chia.py | 2 +- .../de_DE/LC_MESSAGES/messages.po | 2 +- .../fr_FR/LC_MESSAGES/messages.po | 2 +- .../it_IT/LC_MESSAGES/messages.po | 2 +- .../nl_NL/LC_MESSAGES/messages.po | 2 +- .../pt_PT/LC_MESSAGES/messages.po | 2 +- api/translations/zh/LC_MESSAGES/messages.po | 2 +- scripts/forks/mmx_install.sh | 4 +- web/actions/stats.py | 4 +- web/templates/connections.html | 29 ++++++- web/templates/index/chart_farmed.html | 4 +- web/templates/index/index.html | 4 +- web/templates/plotting/jobs.html | 9 +- .../de_DE/LC_MESSAGES/messages.po | 83 ++++++++++++------- .../fr_FR/LC_MESSAGES/messages.po | 83 ++++++++++++------- .../it_IT/LC_MESSAGES/messages.po | 83 ++++++++++++------- .../nl_NL/LC_MESSAGES/messages.po | 83 ++++++++++++------- .../pt_PT/LC_MESSAGES/messages.po | 83 ++++++++++++------- web/translations/zh/LC_MESSAGES/messages.po | 80 +++++++++++------- 20 files changed, 365 insertions(+), 200 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe7368ee..2f2907ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.7.3] - 2022-06-? - - Wallets - chart each blockchain's farmed coins and wallet balances over the past month. + - Charting of each blockchain's farmed coins and wallet balances over the past month. - [Chia](https://github.com/Chia-Network/chia-blockchain) - v1.3.6 pre-release for testing - [Cactus](https://github.com/Cactus-Network/cactus-blockchain) - v1.3.4, matches Chia 1.3.4, please run: `cactus db upgrade` - [Chives](https://github.com/HiveProject2021/chives-blockchain) - v1.3.1, please run: `chives db upgrade` diff --git a/api/models/chia.py b/api/models/chia.py index f4f6ea6c..97eede8b 100644 --- a/api/models/chia.py +++ b/api/models/chia.py @@ -97,7 +97,7 @@ def __init__(self, wallets, cold_wallet_addresses={}): 'total_balance': total_balance, 'updated_at': wallet.updated_at }) else: - app.logger.info("Skipping blockchain {0}".format(wallet.blockchain)) + app.logger.debug("api.models.Wallets.init(): Skipping blockchain {0}".format(wallet.blockchain)) def exclude_cat_wallets(self, wallet_details): details = [] diff --git a/api/translations/de_DE/LC_MESSAGES/messages.po b/api/translations/de_DE/LC_MESSAGES/messages.po index 9a81e82a..380d86e2 100644 --- a/api/translations/de_DE/LC_MESSAGES/messages.po +++ b/api/translations/de_DE/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-06-06 20:47-0600\n" +"POT-Creation-Date: 2022-06-07 10:26-0600\n" "PO-Revision-Date: 2022-02-15 14:29-0700\n" "Last-Translator: ApfelBirneKreis\n" "Language: de\n" diff --git a/api/translations/fr_FR/LC_MESSAGES/messages.po b/api/translations/fr_FR/LC_MESSAGES/messages.po index a63d5ee7..8c89d452 100644 --- a/api/translations/fr_FR/LC_MESSAGES/messages.po +++ b/api/translations/fr_FR/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-06-06 20:47-0600\n" +"POT-Creation-Date: 2022-06-07 10:26-0600\n" "PO-Revision-Date: 2022-02-15 14:29-0700\n" "Last-Translator: Guy Davis\n" "Language: fr\n" diff --git a/api/translations/it_IT/LC_MESSAGES/messages.po b/api/translations/it_IT/LC_MESSAGES/messages.po index 7c5c6d4f..afd7fe4f 100644 --- a/api/translations/it_IT/LC_MESSAGES/messages.po +++ b/api/translations/it_IT/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-06-06 20:47-0600\n" +"POT-Creation-Date: 2022-06-07 10:26-0600\n" "PO-Revision-Date: 2022-02-15 14:29-0700\n" "Last-Translator: Fabrizio Cacicia\n" "Language: it\n" diff --git a/api/translations/nl_NL/LC_MESSAGES/messages.po b/api/translations/nl_NL/LC_MESSAGES/messages.po index 7c50daac..ac175409 100644 --- a/api/translations/nl_NL/LC_MESSAGES/messages.po +++ b/api/translations/nl_NL/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris/issuesPOT-" "Creation-Date: 2022-03-13 10:30-0600\n" -"POT-Creation-Date: 2022-06-06 20:47-0600\n" +"POT-Creation-Date: 2022-06-07 10:26-0600\n" "PO-Revision-Date: 2022-03-13 10:29-0600\n" "Last-Translator: Bernie Deprez\n" "Language: nl_NL\n" diff --git a/api/translations/pt_PT/LC_MESSAGES/messages.po b/api/translations/pt_PT/LC_MESSAGES/messages.po index cb303b8b..9c233eda 100644 --- a/api/translations/pt_PT/LC_MESSAGES/messages.po +++ b/api/translations/pt_PT/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-06-06 20:47-0600\n" +"POT-Creation-Date: 2022-06-07 10:26-0600\n" "PO-Revision-Date: 2022-02-13 13:45-0700\n" "Last-Translator: Antonio Casqueiro\n" "Language: pt\n" diff --git a/api/translations/zh/LC_MESSAGES/messages.po b/api/translations/zh/LC_MESSAGES/messages.po index 73e243c1..e183d932 100644 --- a/api/translations/zh/LC_MESSAGES/messages.po +++ b/api/translations/zh/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Machinaris VERSION\n" "Report-Msgid-Bugs-To: https://github.com/guydavis/machinaris" "/issuesCreation-Date: 2022-02-16 15:00-0700\n" -"POT-Creation-Date: 2022-06-06 20:47-0600\n" +"POT-Creation-Date: 2022-06-07 10:26-0600\n" "PO-Revision-Date: 2022-02-15 14:29-0700\n" "Last-Translator: Guy Davis\n" "Language: zh\n" diff --git a/scripts/forks/mmx_install.sh b/scripts/forks/mmx_install.sh index c53561bf..83321d63 100644 --- a/scripts/forks/mmx_install.sh +++ b/scripts/forks/mmx_install.sh @@ -4,8 +4,8 @@ # MMX_BRANCH=$1 -# On 2022-06-02 -HASH=f8ea5be1b2fb61160898d0164cad152da25f4c45 +# On 2022-06-07 +HASH=7b2a969adc382aff9d7b736dd3883e8c09fdcf74 if [ -z ${MMX_BRANCH} ]; then echo 'Skipping MMX install as not requested.' diff --git a/web/actions/stats.py b/web/actions/stats.py index 80fe9ddd..c5130621 100644 --- a/web/actions/stats.py +++ b/web/actions/stats.py @@ -407,13 +407,13 @@ def load_wallet_balances(blockchain): for i in range(len(result)): s = result[i] converted_date = converters.convert_date_for_luxon(s.created_at) - if (last_value != s.value) or (i % 24 == 0) or (i == len(result) - 1): + if (last_value != s.value) or ((i + 12) % 24 == 0) or (i == len(result) - 1): dates.append(converted_date) values.append(s.value) last_value = s.value #app.logger.info(dates) #app.logger.info(values) - return { 'title': blockchain.capitalize() + ' - ' + _('Wallet Balances'), 'dates': dates, 'vals': values} + return { 'title': blockchain.capitalize() + ' - ' + _('Total Balance'), 'dates': dates, 'vals': values} def load_netspace_size(blockchain): dates = [] diff --git a/web/templates/connections.html b/web/templates/connections.html index 8b682b75..3e47934c 100644 --- a/web/templates/connections.html +++ b/web/templates/connections.html @@ -77,11 +77,11 @@ {% endfor %} -{% if maxmind_license %} -
{{_('Connections Map')}}
+ +{% if maxmind_license %}

-
- {{_('Connection Details')}} +{% else %} +
+
+ + + +

{{_('Map your network peers around the world')}}...

+ {% autoescape false %} +

{{_('To get started, you\'ll need a %(maxmind_link)s%(b_tag_open)sFREE%(b_tag_close)s Maxmind account%(a_tag_close)s to + allow Machinaris to geolocate your network peer IP addresses. %(i_tag_open)sOptionally%(i_tag_close)s, you can also get + better looking map tiles with a %(mapbox_link)s%(b_tag_open)sFREE%(b_tag_close)s Mapbox account%(a_tag_close)s.', + maxmind_link='', + mapbox_link='', + i_tag_open='', i_tag_close='', b_tag_open='', b_tag_close='', a_tag_close='')}} + {{_('To enter your map account details, click the Settings (gear icon) button on the top-right of this page.')}} +

+ {% endautoescape %} +
+
{% endif %} +
+ {{_('Connection Details')}} +
+ {% if connections.rows|length > 0 %} diff --git a/web/utils.py b/web/utils.py index d92b4263..87571814 100644 --- a/web/utils.py +++ b/web/utils.py @@ -71,3 +71,8 @@ def get_hostname(): def is_controller(): return app.config['CONTROLLER_HOST'] == "localhost" + +def convert_chia_ip_address(chia_ip_address): + if chia_ip_address in ['127.0.0.1']: + return get_hostname() + return chia_ip_address # TODO Map duplicated IPs from docker internals... \ No newline at end of file From 500e070e3c23d73eabf862d9439665ccb8594e20 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 16 Sep 2022 09:30:46 -0600 Subject: [PATCH 0974/1625] Setup page: prevent browser client-side caching of mnemonic on re-installs with autocomplete="off". Thanks @Baatezu --- web/templates/setup.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/templates/setup.html b/web/templates/setup.html index cdb5f6f0..68dcfdfc 100644 --- a/web/templates/setup.html +++ b/web/templates/setup.html @@ -82,9 +82,9 @@ {% else %}

{{_('To get started with Machinaris as a Chia%(trademark)s fullnode, either import your existing 24-word mnemonic seed phrase', trademark='™')}}:

- +
-
From 29083482fb6b2f3627a2511d4189293b87c1af0d Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 16 Sep 2022 19:53:11 -0600 Subject: [PATCH 0975/1625] Cactus and MMX updates. --- CHANGELOG.md | 3 ++- scripts/forks/cactus_install.sh | 4 ++-- scripts/forks/mmx_install.sh | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c031f66..26304081 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ All notable changes to this project will be documented in this file. The format - Scaling-Down: Optional mode where wallets are synced daily, not run 24/7. Saves ~35% memory so smaller farmers can farm more blockchains concurrently on the same machine. See Wallets page, top-right Settings. - Scaling-Up: Improved plot tracking efficiency for multi-PB sized farms. - Warnings for duplicated, invalid, or key-less plots. See Farming page. -- Update: [Flax](https://github.com/Flax-Network/flax-blockchain) to v0.1.10 +- Update: [Flax](https://github.com/Flax-Network/flax-blockchain) to v0.1.10, [Cactus](https://github.com/Cactus-Network/cactus-blockchain) to v1.5.2 +- Security: Disable Setup page's mnemonic import field autocomplete from caching value in your local browser. Thanks @Baatezu! - Fixes: Better handling of farmed block logging for certain blockchains like Apple & BPX, Alerts from Chia 1.5.1 for added coins missing due to blockchain logging changes. Improved Smartctl response processing. ## [0.8.3] - 2022-08-23 diff --git a/scripts/forks/cactus_install.sh b/scripts/forks/cactus_install.sh index 7c0b3c20..31d4e313 100644 --- a/scripts/forks/cactus_install.sh +++ b/scripts/forks/cactus_install.sh @@ -4,8 +4,8 @@ # CACTUS_BRANCH=$1 -# On 2022-08-20 -HASH=b758b13d3d88f8076e99671e641f9402cd7c05ea +# On 2022-09-16 +HASH=b006b43ef4bf5b1be114a5648f56db966733e74d if [ -z ${CACTUS_BRANCH} ]; then echo 'Skipping Cactus install as not requested.' diff --git a/scripts/forks/mmx_install.sh b/scripts/forks/mmx_install.sh index 322c2001..e20cc079 100644 --- a/scripts/forks/mmx_install.sh +++ b/scripts/forks/mmx_install.sh @@ -4,8 +4,8 @@ # MMX_BRANCH=$1 -# On 2022-09-07 -HASH=d0f91e87a8faada3d006a995dac2eba49b76f31d +# On 2022-09-16 +HASH=d6160e8c701afeaed723c487f002f2e73c44b25d if [ -z ${MMX_BRANCH} ]; then echo 'Skipping MMX install as not requested.' From df6bd95f5d987b0f368f48647c547cc5036f65f9 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sat, 17 Sep 2022 06:54:37 -0600 Subject: [PATCH 0976/1625] Update staicoin_install.sh Staicoin 1.2.3 emergency release due them letting their SSL certificate expire. --- scripts/forks/staicoin_install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/forks/staicoin_install.sh b/scripts/forks/staicoin_install.sh index fcaf51f0..fc3e35cc 100644 --- a/scripts/forks/staicoin_install.sh +++ b/scripts/forks/staicoin_install.sh @@ -4,8 +4,8 @@ # STAICOIN_BRANCH=$1 -# On 2022-04-23 -HASH=b8686c75dd5fe7883115d9613858c9c8cadfc4a7 +# On 2022-09-17 +HASH=4808632d8147b1fb8ec9ec7aad5a80f86a509b3d if [ -z ${STAICOIN_BRANCH} ]; then echo 'Skipping Staicoin install as not requested.' From bb55add0a4e42eae98cc66c35823c0d51d09e405 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sat, 17 Sep 2022 07:12:42 -0600 Subject: [PATCH 0977/1625] Cactus lost backwards compatibility for `cactus keys add` CLI. --- scripts/forks/cactus_launch.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/forks/cactus_launch.sh b/scripts/forks/cactus_launch.sh index fc56079f..b1e9045c 100644 --- a/scripts/forks/cactus_launch.sh +++ b/scripts/forks/cactus_launch.sh @@ -37,12 +37,14 @@ if [ -f /root/.cactus/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}" - cactus keys add -f ${k} > /dev/null + echo "Adding key #${label_num} at path: ${k}" + cactus keys add -l "key_${label_num}" -f ${k} > /dev/null + ((label_num=label_num+1)) fi done From 80bbaaef7e521fd9879a04fc05bb07dcd14ccc73 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sat, 17 Sep 2022 11:19:02 -0600 Subject: [PATCH 0978/1625] Stop polling for market prices from Posat as its dead. Using ATB and Vayamos still. --- api/commands/rpc.py | 8 ++++---- api/commands/websvcs.py | 6 +++--- scripts/forks/cactus_launch.sh | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/commands/rpc.py b/api/commands/rpc.py index aa0baadc..49ed93b6 100644 --- a/api/commands/rpc.py +++ b/api/commands/rpc.py @@ -342,7 +342,7 @@ async def _load_transactions(self, wallet_id, reverse): app.logger.info("Error getting transactions via RPC: {0}".format(str(ex))) return transactions - # Get warnings about problem plots + # Get warnings about problem plots, only first 100 warnings each to avoid overwhelming the user async def _load_harvester_warnings(self): harvesters = {} try: @@ -370,7 +370,7 @@ async def _load_harvester_warnings(self): invalid_plots = [] results = await farmer.get_harvester_plots_invalid(PlotPathRequestData(bytes.fromhex(node_id[2:]), 0, 1000)) - invalid_plots.extend(results['plots']) + invalid_plots.extend(results['plots'][:100]) farmer.close() await farmer.await_closed() @@ -380,7 +380,7 @@ async def _load_harvester_warnings(self): ) missing_keys = [] results = await farmer.get_harvester_plots_keys_missing(PlotPathRequestData(bytes.fromhex(node_id[2:]), 0, 1000)) - missing_keys.extend(results['plots']) + missing_keys.extend(results['plots'][:100]) farmer.close() await farmer.await_closed() @@ -390,7 +390,7 @@ async def _load_harvester_warnings(self): ) duplicate_plots = [] results = await farmer.get_harvester_plots_duplicates(PlotPathRequestData(bytes.fromhex(node_id[2:]), 0, 1000)) - duplicate_plots.extend(results['plots']) + duplicate_plots.extend(results['plots'][:100]) farmer.close() await farmer.await_closed() diff --git a/api/commands/websvcs.py b/api/commands/websvcs.py index 929b0bb6..a7f55903 100644 --- a/api/commands/websvcs.py +++ b/api/commands/websvcs.py @@ -325,8 +325,8 @@ def request_vayamos_prices(debug=False): if not market['pair'].endswith('USDT'): continue # Skip other market pairs than USDT for blockchain in SUPPORTED_BLOCKCHAINS: - posat_symbol = globals.get_blockchain_symbol(blockchain).upper() - if market['base'] == posat_symbol: + vayamos_symbol = globals.get_blockchain_symbol(blockchain).upper() + if market['base'] == vayamos_symbol: #app.logger.info("VAYAMOS: {0} @ {1}".format(blockchain, market['price'])) try: prices[blockchain] = float(market['price']) @@ -367,7 +367,7 @@ 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) + #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) save_prices_cache(prices) except Exception as ex: diff --git a/scripts/forks/cactus_launch.sh b/scripts/forks/cactus_launch.sh index b1e9045c..fe088134 100644 --- a/scripts/forks/cactus_launch.sh +++ b/scripts/forks/cactus_launch.sh @@ -37,7 +37,7 @@ if [ -f /root/.cactus/mainnet/config/config.yaml ]; then fi # Loop over provided list of key paths -label_num = 0 +label_num=0 for k in ${keys//:/ }; do if [[ "${k}" == "persistent" ]]; then echo "Not touching key directories." From cb0657110a876609fd5b5181dbc4734e94995d90 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sat, 17 Sep 2022 11:58:34 -0600 Subject: [PATCH 0979/1625] Sqlite3 bulk_save_objects for plot status. --- api/schedules/status_plots.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/api/schedules/status_plots.py b/api/schedules/status_plots.py index 7b9c1591..785e8ff6 100644 --- a/api/schedules/status_plots.py +++ b/api/schedules/status_plots.py @@ -103,7 +103,7 @@ def save_duplicate_plots(duplicated_plots): app.logger.error('Failed to send duplicated plots warnings due to '+ str(ex)) def update_chia_plots(plots_status, since): - payload = [] + items = [] time_start = time.time() memory_start = utils.current_memory_megabytes() try: @@ -140,7 +140,7 @@ def update_chia_plots(plots_status, since): add_duplicate_plots(duplicate_plots, file, plot['hostname'], dir, plots_by_id[short_plot_id]['hostname'], plots_by_id[short_plot_id]['path']) plots_by_id[short_plot_id] = { 'hostname': plot['hostname'], 'worker': displayname, 'path': dir, 'file': file } if not duplicated_on_same_host and (not since or created_at > since): - payload.append({ + items.append(p.Plot(**{ "plot_id": short_plot_id, "blockchain": 'chia', "hostname": plot['hostname'] if plot['hostname'] in ['127.0.0.1'] else plot['hostname'], @@ -152,15 +152,13 @@ def update_chia_plots(plots_status, since): "plot_analyze": analyze_status(plots_status, short_plot_id), "plot_check": check_status(plots_status, short_plot_id), "size": plot['file_size'] - }) - if len(payload) > 0: + })) + if len(items) > 0: memory_prestore = utils.current_memory_megabytes() - app.logger.info("PLOT STATUS: About to store {0} Chia plots.".format(len(payload))) + app.logger.info("PLOT STATUS: About to store {0} Chia plots.".format(len(items))) try: - for new_item in payload: # Maximum of chunk_size plots inserted at a time. - item = p.Plot(**new_item) - db.session.add(item) - db.session.commit() # Commit every chunk size + db.session.bulk_save_objects(items) + db.session.commit() except Exception as ex: app.logger.error("PLOT STATUS: Failed to store batch of Chia plots being farmed [{0}:{1}] because {2}".format(i, i+chunk_size, str(ex))) if not since: # Save current duplicate plots @@ -170,8 +168,8 @@ def update_chia_plots(plots_status, since): traceback.print_exc() memory_afterward = utils.current_memory_megabytes() del plots_farming - if payload: - del payload + if items: + del items gc.collect() app.logger.info("PLOT STATUS: In {3} seconds, memory went from {0} MB to {2} MB, {1} MB at prestore.".format( memory_start, memory_prestore, memory_afterward, (round(time.time()-time_start, 2)))) From ebff13b8f5c1a9cd579a08107e8b307bf1ca8704 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sat, 17 Sep 2022 15:23:07 -0600 Subject: [PATCH 0980/1625] Garbage collect other dictionary. --- api/schedules/status_plots.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/schedules/status_plots.py b/api/schedules/status_plots.py index 785e8ff6..ac050c95 100644 --- a/api/schedules/status_plots.py +++ b/api/schedules/status_plots.py @@ -166,11 +166,12 @@ def update_chia_plots(plots_status, since): except Exception as ex: app.logger.error("PLOT STATUS: Failed to load Chia plots being farmed because {0}".format(str(ex))) traceback.print_exc() - memory_afterward = utils.current_memory_megabytes() del plots_farming + del plots_by_id if items: del items gc.collect() + memory_afterward = utils.current_memory_megabytes() app.logger.info("PLOT STATUS: In {3} seconds, memory went from {0} MB to {2} MB, {1} MB at prestore.".format( memory_start, memory_prestore, memory_afterward, (round(time.time()-time_start, 2)))) From 972379f0747df1cdd4355ec9921e37bae03db6b4 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sat, 17 Sep 2022 16:35:58 -0600 Subject: [PATCH 0981/1625] Further memory logging. --- api/schedules/status_plots.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/api/schedules/status_plots.py b/api/schedules/status_plots.py index ac050c95..a1c86010 100644 --- a/api/schedules/status_plots.py +++ b/api/schedules/status_plots.py @@ -103,14 +103,15 @@ def save_duplicate_plots(duplicated_plots): app.logger.error('Failed to send duplicated plots warnings due to '+ str(ex)) def update_chia_plots(plots_status, since): - items = [] time_start = time.time() memory_start = utils.current_memory_megabytes() + memory_prestore = None try: if not since: # If no filter, delete all for this blockchain before storing again db.session.query(p.Plot).filter(p.Plot.blockchain=='chia').delete() db.session.commit() blockchain_rpc = rpc.RPC() + items = [] plots_farming = blockchain_rpc.get_all_plots() plots_by_id = {} duplicate_plots = {} @@ -153,7 +154,7 @@ def update_chia_plots(plots_status, since): "plot_check": check_status(plots_status, short_plot_id), "size": plot['file_size'] })) - if len(items) > 0: + if items: memory_prestore = utils.current_memory_megabytes() app.logger.info("PLOT STATUS: About to store {0} Chia plots.".format(len(items))) try: @@ -170,10 +171,14 @@ def update_chia_plots(plots_status, since): del plots_by_id if items: del items - gc.collect() - memory_afterward = utils.current_memory_megabytes() + gc.collect() + memory_afterward = utils.current_memory_megabytes() + if memory_prestore: # Full re-sync app.logger.info("PLOT STATUS: In {3} seconds, memory went from {0} MB to {2} MB, {1} MB at prestore.".format( memory_start, memory_prestore, memory_afterward, (round(time.time()-time_start, 2)))) + else: # Only new plots added, if any + app.logger.info("PLOT STATUS: In {2} seconds, memory went from {0} MB to {1} MB.".format( + memory_start, memory_afterward, (round(time.time()-time_start, 2)))) # Sent from a separate fullnode container def update_chives_plots(since): From 9567995b69aa85aa93435f373dedb3ff5cf6bcfc Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 18 Sep 2022 17:04:12 -0600 Subject: [PATCH 0982/1625] Test harness that loads 120k plot status records to check memory and performance. --- CHANGELOG.md | 2 +- api/commands/rpc.py | 20 +++++++++++++++++++- api/gunicorn.conf.py | 2 +- api/schedules/status_plots.py | 29 ++++++++++++++++------------- 4 files changed, 37 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26304081..940ab295 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format ## [0.8.4] - 2022-09-? - Scaling-Down: Optional mode where wallets are synced daily, not run 24/7. Saves ~35% memory so smaller farmers can farm more blockchains concurrently on the same machine. See Wallets page, top-right Settings. -- Scaling-Up: Improved plot tracking efficiency for multi-PB sized farms. +- Scaling-Up: Improved plot tracking efficiency for multi-PB sized farms. Thanks @grobalt! - Warnings for duplicated, invalid, or key-less plots. See Farming page. - Update: [Flax](https://github.com/Flax-Network/flax-blockchain) to v0.1.10, [Cactus](https://github.com/Cactus-Network/cactus-blockchain) to v1.5.2 - Security: Disable Setup page's mnemonic import field autocomplete from caching value in your local browser. Thanks @Baatezu! diff --git a/api/commands/rpc.py b/api/commands/rpc.py index 49ed93b6..c6acbe25 100644 --- a/api/commands/rpc.py +++ b/api/commands/rpc.py @@ -7,6 +7,7 @@ import importlib import os import traceback +import uuid from common.config import globals from api import app @@ -200,6 +201,19 @@ def __init__(self): loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) + # Used to load all plots on all harvesters + def get_all_plots_test_harness(self): + testing_plots = [] + for i in range(240): # 240 x 500 is 120000 plots + for plot in asyncio.run(self._load_all_plots())[:500]: + #old_plot_name = plot['filename'] + plot['plot_id'] = str(uuid.uuid4())[:16] # Generate a unique plot + idx = plot['filename'].rindex('-') + plot['filename'] = plot['filename'][:idx+1] + plot['plot_id'] + plot['filename'][idx+17:] + #app.logger.info("{0} -> {1}".format(old_plot_name, plot['filename'])) + testing_plots.append(plot) + return testing_plots + # Used to load all plots on all harvesters def get_all_plots(self): plots_via_rpc = asyncio.run(self._load_all_plots()) @@ -207,11 +221,15 @@ def get_all_plots(self): # Get all wallet info def get_wallets(self): + if not globals.wallet_running(): + return [] wallets = asyncio.run(self._load_wallets()) return wallets # Get transactions for a particular wallet def get_transactions(self, wallet_id, reverse=False): + if not globals.wallet_running(): + return [] if globals.legacy_blockchain(globals.enabled_blockchains()[0]): transactions = asyncio.run(self._load_transactions_legacy_blockchains(wallet_id, reverse)) else: @@ -264,7 +282,7 @@ async def _load_all_plots(self): # app.logger.info(harvester['connection']) Returns: {'host': '192.168.1.100', 'node_id': '602eb9...90378', 'port': 62599} host = utils.convert_chia_ip_address(harvester["connection"]["host"]) plots = harvester["plots"] - app.logger.info("Listing plots found {0} plots on {1}.".format(len(plots), host)) + #app.logger.info("Listing plots found {0} plots on {1}.".format(len(plots), host)) for plot in plots: all_plots.append({ "hostname": host, diff --git a/api/gunicorn.conf.py b/api/gunicorn.conf.py index 84d2f9a0..347210f8 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -87,7 +87,7 @@ def on_starting(server): scheduler.add_job(func=stats_balances.collect, name="stats_balances", trigger='cron', minute=0) # Hourly # Testing only - #scheduler.add_job(func=status_plotnfts.update, name="status_plotnfts", trigger='interval', seconds=10) # Test immediately + #scheduler.add_job(func=status_plots.update, name="status_plots", trigger='interval', seconds=60) # Test immediately #scheduler.add_job(func=stats_blocks.collect, name="stats_blocks", trigger='interval', seconds=10) # Test immediately #scheduler.add_job(func=stats_effort.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 diff --git a/api/schedules/status_plots.py b/api/schedules/status_plots.py index a1c86010..0b0ebbc8 100644 --- a/api/schedules/status_plots.py +++ b/api/schedules/status_plots.py @@ -106,6 +106,7 @@ def update_chia_plots(plots_status, since): time_start = time.time() memory_start = utils.current_memory_megabytes() memory_prestore = None + plots_farming = None try: if not since: # If no filter, delete all for this blockchain before storing again db.session.query(p.Plot).filter(p.Plot.blockchain=='chia').delete() @@ -129,6 +130,7 @@ def update_chia_plots(plots_status, since): displayname = plot['hostname'] displaynames[plot['hostname']] = displayname short_plot_id,dir,file,created_at = get_plot_attrs(plot['plot_id'], plot['filename']) + #app.logger.info("{0} -> {1}".format(short_plot_id, file)) duplicated_on_same_host = False if not since and short_plot_id in plots_by_id: # Only check for duplicates on full load if plot['hostname'] == plots_by_id[short_plot_id]['hostname']: @@ -161,24 +163,25 @@ def update_chia_plots(plots_status, since): db.session.bulk_save_objects(items) db.session.commit() except Exception as ex: - app.logger.error("PLOT STATUS: Failed to store batch of Chia plots being farmed [{0}:{1}] because {2}".format(i, i+chunk_size, str(ex))) + app.logger.error("PLOT STATUS: Failed to store Chia plots being farmed because {0}".format(str(ex))) if not since: # Save current duplicate plots save_duplicate_plots(duplicate_plots) except Exception as ex: app.logger.error("PLOT STATUS: Failed to load Chia plots being farmed because {0}".format(str(ex))) traceback.print_exc() - del plots_farming - del plots_by_id - if items: - del items - gc.collect() - memory_afterward = utils.current_memory_megabytes() - if memory_prestore: # Full re-sync - app.logger.info("PLOT STATUS: In {3} seconds, memory went from {0} MB to {2} MB, {1} MB at prestore.".format( - memory_start, memory_prestore, memory_afterward, (round(time.time()-time_start, 2)))) - else: # Only new plots added, if any - app.logger.info("PLOT STATUS: In {2} seconds, memory went from {0} MB to {1} MB.".format( - memory_start, memory_afterward, (round(time.time()-time_start, 2)))) + finally: + del plots_farming + del plots_by_id + if items: + del items + gc.collect() + memory_afterward = utils.current_memory_megabytes() + if memory_prestore: # Full re-sync + app.logger.info("PLOT STATUS: In {3} seconds, memory went from {0} MB to {2} MB, {1} MB at prestore.".format( + memory_start, memory_prestore, memory_afterward, (round(time.time()-time_start, 2)))) + else: # Only new plots added, if any + app.logger.info("PLOT STATUS: In {2} seconds, memory went from {0} MB to {1} MB.".format( + memory_start, memory_afterward, (round(time.time()-time_start, 2)))) # Sent from a separate fullnode container def update_chives_plots(since): From 157a401a5daf8b6fa3f8d70f50a52e99a7048a97 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 19 Sep 2022 13:39:55 -0600 Subject: [PATCH 0983/1625] Logging for balance duplication issue. --- api/commands/rpc.py | 2 +- api/commands/websvcs.py | 4 +++- api/schedules/stats_balances.py | 5 ++++- api/schedules/stats_effort.py | 2 ++ web/models/chia.py | 1 + web/templates/blockchains.html | 10 ++++++++-- 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/api/commands/rpc.py b/api/commands/rpc.py index c6acbe25..eebb06ac 100644 --- a/api/commands/rpc.py +++ b/api/commands/rpc.py @@ -201,7 +201,7 @@ def __init__(self): loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) - # Used to load all plots on all harvesters + # Used to load all plots on all harvesters when testing performance of 100,000+ inserts def get_all_plots_test_harness(self): testing_plots = [] for i in range(240): # 240 x 500 is 120000 plots diff --git a/api/commands/websvcs.py b/api/commands/websvcs.py index a7f55903..193c3896 100644 --- a/api/commands/websvcs.py +++ b/api/commands/websvcs.py @@ -59,7 +59,7 @@ def load_cold_wallet_cache(): return data def save_cold_wallet_cache(cold_wallet_cache): - app.logger.debug("Saving cold wallet cache: {0}".format(cold_wallet_cache)) + app.logger.info("Saving cold wallet cache: {0}".format(cold_wallet_cache)) try: with open(COLD_WALLET_CACHE_FILE, 'w') as f: json.dump(cold_wallet_cache, f) @@ -180,6 +180,7 @@ def cold_wallet_balance(blockchain): app.logger.error("Failed to request cold wallet balance for {0} due to {1}".format(cold_blockchain, str(ex))) save_cold_wallet_cache(cold_wallet_cache) # Now for that specific blockchain, check for a cold wallet balance in the cache + total_balance = 0.0 if blockchain in addresses_per_blockchain: for address in addresses_per_blockchain[blockchain]: if address in cold_wallet_cache: @@ -191,6 +192,7 @@ def cold_wallet_balance(blockchain): except Exception as ex: app.logger.info("During cold balance lookup, deleting old cold wallet cache file with legacy format. {0}".format(str(ex))) os.remove(COLD_WALLET_CACHE_FILE) + app.logger.info("Returning {0} cold wallet balance of {1}".format(blockchain, total_balance)) return total_balance return 0.0 # No cold wallet addresses to check, so no errors obviously diff --git a/api/schedules/stats_balances.py b/api/schedules/stats_balances.py index b32867be..6c0f10f5 100644 --- a/api/schedules/stats_balances.py +++ b/api/schedules/stats_balances.py @@ -60,7 +60,8 @@ def collect(): cold_wallet_balance_error = True # Skip recording a balance data point for this blockchain app.logger.error("No wallet balance recorded. Received an erroneous cold wallet balance for {0} wallet. Please correct the address and verify at https://alltheblocks.net".format(wallet['blockchain'])) continue # Don't save a data point if part of the sum is missing due to error - app.logger.debug("Fiat total is {0} {1}".format(round(fiat_total, 2), currency_symbol)) + if wallet['blockchain'] == 'chia': + app.logger.info("From {0} wallet rows, fiat total (including cold wallet balance) is {1} {2}".format(len(wallets.rows), round(fiat_total, 2), currency_symbol)) if not cold_wallet_balance_error: # Don't record a total across all wallets if one is temporarily erroring out store_total_locally(round(fiat_total, 2), currency_symbol, current_datetime) except: @@ -68,6 +69,8 @@ def collect(): app.logger.info(traceback.format_exc()) def store_balance_locally(blockchain, wallet_balance, current_datetime): + if blockchain == 'chia': + app.logger.info("Storing Chia total wallet balance (including cold wallet balance) of {0}".format(wallet_balance)) try: db.session.add(stats.StatWalletBalances( hostname=utils.get_hostname(), diff --git a/api/schedules/stats_effort.py b/api/schedules/stats_effort.py index 62ddd594..6de3c607 100644 --- a/api/schedules/stats_effort.py +++ b/api/schedules/stats_effort.py @@ -61,6 +61,8 @@ def collect(): return farm_summary = chia_cli.load_farm_summary(blockchain) wallets = blockchain_rpc.get_wallets() + if len(wallets) < 1: # If no wallet status returned, then no effort stat to record. + return transactions = blockchain_rpc.get_transactions(wallets[0]['id'], reverse=True) # Search primary wallet only most_recent_block_reward_time = None for transaction in transactions: # Order is reversed; newest to oldest diff --git a/web/models/chia.py b/web/models/chia.py index 237bbec7..2539b532 100644 --- a/web/models/chia.py +++ b/web/models/chia.py @@ -625,6 +625,7 @@ def extract_status(self, blockchain, details, worker_status): if 'No' == status: # MMX return "Syncing" return status + return "Error" return "Offline" def extract_height(self, blockchain, details): diff --git a/web/templates/blockchains.html b/web/templates/blockchains.html index b1c1b363..e9119847 100644 --- a/web/templates/blockchains.html +++ b/web/templates/blockchains.html @@ -124,10 +124,16 @@ {% if blockchain.status == 'Offline' %} -   {{blockchain.status}} +   {{_('Offline')}} {% elif blockchain.status.lower().startswith('synced') %} -   {{blockchain.status}} +   {{_('Synced')}} + {% elif blockchain.status.lower().startswith('not synced') or blockchain.status.lower().startswith('syncing') %} + +   {{_('Syncing')}} + {% elif blockchain.status.lower().startswith('error') %} + +   {{_('Error')}} {% else %}   {{blockchain.status}} From 71905f867f576d1f895d3e19e59bc1d25fb898da Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 19 Sep 2022 18:15:05 -0600 Subject: [PATCH 0984/1625] Tweak color of "Not Synced" blockchains status. --- scripts/forks/mmx_install.sh | 4 ++-- web/templates/blockchains.html | 5 ++++- web/templates/summary.html | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/forks/mmx_install.sh b/scripts/forks/mmx_install.sh index e20cc079..17fb4f25 100644 --- a/scripts/forks/mmx_install.sh +++ b/scripts/forks/mmx_install.sh @@ -4,8 +4,8 @@ # MMX_BRANCH=$1 -# On 2022-09-16 -HASH=d6160e8c701afeaed723c487f002f2e73c44b25d +# On 2022-09-19 +HASH=1d39de976d57aae0b3655d72642bcdf110d4610c if [ -z ${MMX_BRANCH} ]; then echo 'Skipping MMX install as not requested.' diff --git a/web/templates/blockchains.html b/web/templates/blockchains.html index e9119847..10c6c067 100644 --- a/web/templates/blockchains.html +++ b/web/templates/blockchains.html @@ -128,7 +128,10 @@ {% elif blockchain.status.lower().startswith('synced') %}   {{_('Synced')}} - {% elif blockchain.status.lower().startswith('not synced') or blockchain.status.lower().startswith('syncing') %} + {% elif blockchain.status.lower().startswith('not synced') %} + +   {{_('Not Synced')}} + {% elif blockchain.status.lower().startswith('syncing') %}   {{_('Syncing')}} {% elif blockchain.status.lower().startswith('error') %} diff --git a/web/templates/summary.html b/web/templates/summary.html index 406b0abd..482488e2 100644 --- a/web/templates/summary.html +++ b/web/templates/summary.html @@ -106,7 +106,7 @@ {% elif summary.status.lower().startswith('syncing') %} {{_('Syncing')}} {% elif summary.status.lower().startswith('not synced') %} - {{_('Not Synced')}} + {{_('Not Synced')}} {% else %} {{summary.status}} {% endif %}   From 68d390e489ab7b8448070db0fbbccb67d27a1918 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 19 Sep 2022 21:27:57 -0600 Subject: [PATCH 0985/1625] Testing updated fd-cli versions. --- .github/workflows/develop-shibgreen.yaml | 1 + docker/dockerfile | 1 + docker/dockerfile-jammy.base | 1 + docker/entrypoint.sh | 2 +- scripts/fd-cli_setup.sh | 8 +++++--- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/develop-shibgreen.yaml b/.github/workflows/develop-shibgreen.yaml index 75c260a3..0931ac11 100644 --- a/.github/workflows/develop-shibgreen.yaml +++ b/.github/workflows/develop-shibgreen.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "SHIBGREEN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-shibgreen:develop diff --git a/docker/dockerfile b/docker/dockerfile index 210796f4..f5de3fe1 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -5,6 +5,7 @@ FROM ghcr.io/guydavis/machinaris-base-${UBUNTU_VER}:${MACHINARIS_STREAM} ARG DEBIAN_FRONTEND=noninteractive ARG CHIADOG_BRANCH=main +ARG FDCLI_BRANCH=master ARG BLADEBIT_BRANCH=master ARG APPLE_BRANCH diff --git a/docker/dockerfile-jammy.base b/docker/dockerfile-jammy.base index 1941dadb..9f27ebed 100644 --- a/docker/dockerfile-jammy.base +++ b/docker/dockerfile-jammy.base @@ -12,6 +12,7 @@ RUN apt-get update \ bc \ ca-certificates \ cifs-utils \ + cmake \ curl \ git \ iproute2 \ diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index b904db8d..42b8b840 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -81,7 +81,7 @@ if /usr/bin/bash /machinaris/scripts/forks/${blockchains}_launch.sh; then /usr/bin/bash /machinaris/scripts/farmr_setup.sh > /tmp/farmr_setup.log 2>&1 # Conditionally install fd-cli on fullnodes, excluding Chia and Chives - /usr/bin/bash /machinaris/scripts/fd-cli_setup.sh > /tmp/fd-cli_setup.log 2>&1 + /usr/bin/bash /machinaris/scripts/fd-cli_setup.sh ${FDCLI_BRANCH} > /tmp/fd-cli_setup.log 2>&1 # Conditionally build bladebit on plotters and fullnodes, sleep a bit first /usr/bin/bash /machinaris/scripts/bladebit_setup.sh ${BLADEBIT_BRANCH} > /tmp/bladebit_setup.log 2>&1 diff --git a/scripts/fd-cli_setup.sh b/scripts/fd-cli_setup.sh index 58999f0a..b26c82a5 100644 --- a/scripts/fd-cli_setup.sh +++ b/scripts/fd-cli_setup.sh @@ -6,13 +6,15 @@ # # On 2021-11-08 -HASH=e99cf3c9d39d0a6c71ee0f92f11034f0b5516df7 +HASH=c9f562728acde289d3406d5cdc5a1139fd4267c8 + +FDCLI_BRANCH=$1 if [[ ${mode} == 'fullnode' ]]; then if [[ "${blockchains}" != 'chia' ]] && [[ "${blockchains}" != 'chives' ]] && [[ "${blockchains}" != 'mmx' ]]; then cd / - git clone https://github.com/Flora-Network/fd-cli.git - cd fd-cli + git clone --branch ${FDCLI_BRANCH} https://github.com/guydavis/flora-dev-cli.git + cd flora-dev-cli git checkout $HASH pip install -e . --extra-index-url https://pypi.chia.net/simple/ fi From d1facf43f89fa0edca9b2ba24e8a388d6e42dd4a Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 19 Sep 2022 21:43:44 -0600 Subject: [PATCH 0986/1625] Test with BTCGreen as well. --- .github/workflows/develop-btcgreen.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/develop-btcgreen.yaml b/.github/workflows/develop-btcgreen.yaml index 41e4bcab..f7f39214 100644 --- a/.github/workflows/develop-btcgreen.yaml +++ b/.github/workflows/develop-btcgreen.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "BTCGREEN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-btcgreen:develop From 62855106d19aeed377397b3711eeea6fe8f6b5c5 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 20 Sep 2022 09:34:09 -0600 Subject: [PATCH 0987/1625] More fdccli update testing. --- docker/dockerfile | 1 + scripts/fd-cli_setup.sh | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/docker/dockerfile b/docker/dockerfile index f5de3fe1..c24675b2 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -120,6 +120,7 @@ ENV FLASK_ENV=production ENV XDG_CONFIG_HOME=/root/.chia ENV AUTO_PLOT=false ENV CHIADOG_BRANCH=${CHIADOG_BRANCH} +ENV FDCLI_BRANCH=${FDCLI_BRANCH} ENV BLADEBIT_BRANCH=${BLADEBIT_BRANCH} VOLUME [ "/id_rsa" ] diff --git a/scripts/fd-cli_setup.sh b/scripts/fd-cli_setup.sh index b26c82a5..e46de44c 100644 --- a/scripts/fd-cli_setup.sh +++ b/scripts/fd-cli_setup.sh @@ -5,9 +5,6 @@ # Not needed on either the Chia or Chives images, only other forks. # -# On 2021-11-08 -HASH=c9f562728acde289d3406d5cdc5a1139fd4267c8 - FDCLI_BRANCH=$1 if [[ ${mode} == 'fullnode' ]]; then @@ -15,7 +12,6 @@ if [[ ${mode} == 'fullnode' ]]; then cd / git clone --branch ${FDCLI_BRANCH} https://github.com/guydavis/flora-dev-cli.git cd flora-dev-cli - git checkout $HASH pip install -e . --extra-index-url https://pypi.chia.net/simple/ fi fi \ No newline at end of file From 98f039628555dd5f0773d39aad65a4a39d241ff2 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 20 Sep 2022 10:05:43 -0600 Subject: [PATCH 0988/1625] Test against on Focal with HDDCoin. --- .github/workflows/develop-hddcoin.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/develop-hddcoin.yaml b/.github/workflows/develop-hddcoin.yaml index 60a39f16..c67caac5 100644 --- a/.github/workflows/develop-hddcoin.yaml +++ b/.github/workflows/develop-hddcoin.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "HDDCOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-hddcoin:develop From 8be9e7b9cfd4ebdb156ce537cba6e6d63d12df53 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 20 Sep 2022 15:43:19 -0600 Subject: [PATCH 0989/1625] Paths to database files for v2 as well. --- .github/workflows/develop-cactus.yaml | 1 + .github/workflows/develop-hddcoin.yaml | 1 - api/commands/fd_cli.py | 26 ++++++++++++++++++++++---- api/gunicorn.conf.py | 3 ++- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/workflows/develop-cactus.yaml b/.github/workflows/develop-cactus.yaml index 81165e8c..dd906b79 100644 --- a/.github/workflows/develop-cactus.yaml +++ b/.github/workflows/develop-cactus.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "CACTUS_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-cactus:develop diff --git a/.github/workflows/develop-hddcoin.yaml b/.github/workflows/develop-hddcoin.yaml index c67caac5..60a39f16 100644 --- a/.github/workflows/develop-hddcoin.yaml +++ b/.github/workflows/develop-hddcoin.yaml @@ -43,7 +43,6 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "FDCLI_BRANCH=dev" "HDDCOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-hddcoin:develop diff --git a/api/commands/fd_cli.py b/api/commands/fd_cli.py index 02f69016..59fa86b6 100644 --- a/api/commands/fd_cli.py +++ b/api/commands/fd_cli.py @@ -26,15 +26,33 @@ def reward_recovery(wallet_id, launcher_id, pool_contract_address): vars = {} network_path = globals.get_blockchain_network_path(blockchain) network_name = globals.get_blockchain_network_name(blockchain) - vars['FD_CLI_BC_DB_PATH'] = f'{network_path}/db/blockchain_v1_{network_name}.sqlite' - vars['FD_CLI_WT_DB_PATH'] = f'{network_path}/wallet/db/blockchain_wallet_v1_{network_name}_{wallet_id}.sqlite' + blockchain_db_path = f'{network_path}/db/blockchain_v2_{network_name}.sqlite' + if os.path.exists(blockchain_db_path): # First check for a v2 blockchain and wallet + vars['FD_CLI_BC_DB_PATH'] = blockchain_db_path + wallet_db_path = f'{network_path}/wallet/db/blockchain_wallet_v2_r1_{network_name}_{wallet_id}.sqlite' + if os.path.exists(wallet_db_path): + vars['FD_CLI_WT_DB_PATH'] = wallet_db_path + else: + app.logger.error("Reward Recovery found no v2 wallet database: {0}".format(wallet_db_path)) + else: # Then check for old v1 blockchain and wallet if no v2 found + blockchain_db_path = f'{network_path}/db/blockchain_v1_{network_name}.sqlite' + if os.path.exists(blockchain_db_path): # Then check for a v1 blockchain and wallet + vars['FD_CLI_BC_DB_PATH'] = blockchain_db_path + wallet_db_path = f'{network_path}/wallet/db/blockchain_wallet_v1_{network_name}_{wallet_id}.sqlite' + if os.path.exists(wallet_db_path): + vars['FD_CLI_WT_DB_PATH'] = wallet_db_path + else: + app.logger.error("Reward Recovery found no v1 wallet database: {0}".format(wallet_db_path)) + else: + app.logger.error("Reward Recovery found neither v1 or v2 blockchain database at: {0}/db".format(network_path)) fd_env = os.environ.copy() fd_env.update(vars) cmd = f"/usr/local/bin/fd-cli nft-recover -l {launcher_id} -p {pool_contract_address} -nh 127.0.0.1 -np {rpc_port} -ct {network_path}/config/ssl/full_node/private_full_node.crt -ck {network_path}/config/ssl/full_node/private_full_node.key" app.logger.info(f"Executing NFT 7/8 win recovery for {blockchain}: {cmd}") - log_fo.write("\n\nExecuted at: {0}\n{1}".format(time.strftime("%Y-%m-%d-%H:%M:%S"), cmd)) + log_fo.write("\n\nExecuted at: {0}\nFD_CLI_BC_DB_PATH={1} FD_CLI_WT_DB_PATH={2} {3}".format( + time.strftime("%Y-%m-%d-%H:%M:%S"), vars['FD_CLI_BC_DB_PATH'], vars['FD_CLI_WT_DB_PATH'], cmd)) log_fo.flush() - proc = Popen(cmd,cwd="/fd-cli", env=fd_env, shell=True, universal_newlines=True, stdout=log_fo, stderr=log_fo) + proc = Popen(cmd,cwd="/flora-dev-cli", env=fd_env, shell=True, universal_newlines=True, stdout=log_fo, stderr=log_fo) try: outs, errs = proc.communicate(timeout=1800) if errs: diff --git a/api/gunicorn.conf.py b/api/gunicorn.conf.py index 347210f8..d224d95d 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -96,7 +96,8 @@ def on_starting(server): #scheduler.add_job(func=status_warnings.collect, name="farms", trigger='interval', seconds=10) # Test immediately #scheduler.add_job(func=periodically_sync_wallet.execute, name="periodically_sync_wallet", trigger='interval', seconds=60) # Test immediately #scheduler.add_job(func=status_warnings.collect, name="status_warnings", trigger='interval', seconds=60) # Test immediately - + #scheduler.add_job(func=nft_recover.execute, name="status_nft_recover", trigger='interval', seconds=60) + app.logger.debug("Starting background scheduler...") scheduler.start() From ce5ce5fc990f3d7d209c6806c6f085c8032af2e6 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 20 Sep 2022 15:50:11 -0600 Subject: [PATCH 0990/1625] Chia 1.6.0 dropped. --- .github/workflows/develop-chia.yaml | 2 +- CHANGELOG.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/develop-chia.yaml b/.github/workflows/develop-chia.yaml index d9df9e67..c328fdd9 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.0" + "CHIA_BRANCH=latest" "BLADEBIT_BRANCH=2.0.0-beta1" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop diff --git a/CHANGELOG.md b/CHANGELOG.md index 940ab295..a2128f13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +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). -## [0.8.4] - 2022-09-? +## [0.8.4] - 2022-09-21 - Scaling-Down: Optional mode where wallets are synced daily, not run 24/7. Saves ~35% memory so smaller farmers can farm more blockchains concurrently on the same machine. See Wallets page, top-right Settings. - Scaling-Up: Improved plot tracking efficiency for multi-PB sized farms. Thanks @grobalt! - Warnings for duplicated, invalid, or key-less plots. See Farming page. -- Update: [Flax](https://github.com/Flax-Network/flax-blockchain) to v0.1.10, [Cactus](https://github.com/Cactus-Network/cactus-blockchain) to v1.5.2 +- Update: [Flax](https://github.com/Flax-Network/flax-blockchain) to v0.1.10, [Cactus](https://github.com/Cactus-Network/cactus-blockchain) to v1.5.2, [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/1.6.0) to v1.6.0 - Security: Disable Setup page's mnemonic import field autocomplete from caching value in your local browser. Thanks @Baatezu! - Fixes: Better handling of farmed block logging for certain blockchains like Apple & BPX, Alerts from Chia 1.5.1 for added coins missing due to blockchain logging changes. Improved Smartctl response processing. From 12d650f572d8372f446c0671d2d1d2a9feb6dcc3 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 20 Sep 2022 16:36:50 -0600 Subject: [PATCH 0991/1625] Trigger another build against latest base. --- api/gunicorn.conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/api/gunicorn.conf.py b/api/gunicorn.conf.py index d224d95d..07d03960 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -97,7 +97,6 @@ def on_starting(server): #scheduler.add_job(func=periodically_sync_wallet.execute, name="periodically_sync_wallet", trigger='interval', seconds=60) # Test immediately #scheduler.add_job(func=status_warnings.collect, name="status_warnings", trigger='interval', seconds=60) # Test immediately #scheduler.add_job(func=nft_recover.execute, name="status_nft_recover", trigger='interval', seconds=60) - app.logger.debug("Starting background scheduler...") scheduler.start() From bca5a917188ec8f574afeace65822192cd00fe77 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 21 Sep 2022 10:08:52 -0600 Subject: [PATCH 0992/1625] Fixes for Cactus CLI renamings. --- api/commands/chia_cli.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index b3ae5902..ea553e46 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -117,7 +117,10 @@ def load_blockchain_show(blockchain): def load_connections_show(blockchain): chia_binary = globals.get_blockchain_binary(blockchain) - proc = Popen("{0} show --connections".format(chia_binary), stdout=PIPE, stderr=PIPE, shell=True) + if blockchain == 'cactus': # Cactus now supports only 'peer' command + proc = Popen("{0} peer -c full_node".format(chia_binary), stdout=PIPE, stderr=PIPE, shell=True) + else: + proc = Popen("{0} show --connections".format(chia_binary), stdout=PIPE, stderr=PIPE, shell=True) try: outs, errs = proc.communicate(timeout=30) if errs: @@ -205,7 +208,10 @@ def pause_wallet(blockchain): def remove_connection(node_id, ip, blockchain): chia_binary = globals.get_blockchain_binary(blockchain) try: - proc = Popen("{0} show --remove-connection {1}".format(chia_binary, node_id), stdout=PIPE, stderr=PIPE, shell=True) + if blockchain == 'cactus': # Cactus now supports only 'peer' command + proc = Popen("{0} peer --remove-connection {1} full_node".format(chia_binary, node_id), stdout=PIPE, stderr=PIPE, shell=True) + else: + proc = Popen("{0} show --remove-connection {1}".format(chia_binary, node_id), stdout=PIPE, stderr=PIPE, shell=True) try: outs, errs = proc.communicate(timeout=30) if errs: @@ -286,7 +292,10 @@ def add_connections(connections, blockchain): elif socket.gethostbyname(hostname) != hostname: app.logger.debug('{} is a valid hostname'.format(hostname)) app.logger.info("Adding {0} connection to peer: {1}".format(blockchain, connection)) - proc = Popen("{0} show --add-connection {1}".format(chia_binary, connection), stdout=PIPE, stderr=PIPE, shell=True) + if blockchain == 'cactus': # Cactus now supports only 'peer' command + proc = Popen("{0} peer --add-connection {1} full_node".format(chia_binary, connection), stdout=PIPE, stderr=PIPE, shell=True) + else: + proc = Popen("{0} show --add-connection {1}".format(chia_binary, connection), stdout=PIPE, stderr=PIPE, shell=True) try: outs, errs = proc.communicate(timeout=60) if errs: From abbf22931af985ee2af3ace9dd26267a989bad8a Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 23 Sep 2022 09:01:25 -0600 Subject: [PATCH 0993/1625] Latest Maize now at 1.6.0 --- CHANGELOG.md | 3 +++ VERSION | 2 +- scripts/forks/maize_install.sh | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2128f13..2af1b904 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ 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). +## [0.8.5] - 2022-10-? + - Update: [Maize](https://github.com/Maize-Network/maize-blockchain/releases/tag/1.6.0) to v1.6.0 + ## [0.8.4] - 2022-09-21 - Scaling-Down: Optional mode where wallets are synced daily, not run 24/7. Saves ~35% memory so smaller farmers can farm more blockchains concurrently on the same machine. See Wallets page, top-right Settings. - Scaling-Up: Improved plot tracking efficiency for multi-PB sized farms. Thanks @grobalt! diff --git a/VERSION b/VERSION index fcbb5375..bbde4bee 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.4 \ No newline at end of file +0.8.5 \ No newline at end of file diff --git a/scripts/forks/maize_install.sh b/scripts/forks/maize_install.sh index f61a3f4d..31ea8b10 100644 --- a/scripts/forks/maize_install.sh +++ b/scripts/forks/maize_install.sh @@ -4,8 +4,8 @@ # MAIZE_BRANCH=$1 -# On 2022-08-18 -HASH=2fcb4deeb2944e0ff96158ec8986b23580d875d5 +# On 2022-09-22 +HASH=1530e15a5fba769f9387508e842121daca5d44e2 if [ -z ${MAIZE_BRANCH} ]; then echo 'Skipping Maize install as not requested.' From 6cb9dbbdb1518d460160e65c0ed6f992d1ab5d30 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sat, 24 Sep 2022 12:59:17 -0600 Subject: [PATCH 0994/1625] More discarding of backwards compatibility by blockchains. --- api/commands/chia_cli.py | 6 +++--- scripts/forks/maize_launch.sh | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index ea553e46..ae7d6eb8 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -117,7 +117,7 @@ def load_blockchain_show(blockchain): def load_connections_show(blockchain): chia_binary = globals.get_blockchain_binary(blockchain) - if blockchain == 'cactus': # Cactus now supports only 'peer' command + if blockchain in ['cactus', 'maize']: # Cactus & Maize now supports only 'peer' command proc = Popen("{0} peer -c full_node".format(chia_binary), stdout=PIPE, stderr=PIPE, shell=True) else: proc = Popen("{0} show --connections".format(chia_binary), stdout=PIPE, stderr=PIPE, shell=True) @@ -208,7 +208,7 @@ def pause_wallet(blockchain): def remove_connection(node_id, ip, blockchain): chia_binary = globals.get_blockchain_binary(blockchain) try: - if blockchain == 'cactus': # Cactus now supports only 'peer' command + if blockchain in ['cactus', 'maize']: # Cactus & Maize now supports only 'peer' command proc = Popen("{0} peer --remove-connection {1} full_node".format(chia_binary, node_id), stdout=PIPE, stderr=PIPE, shell=True) else: proc = Popen("{0} show --remove-connection {1}".format(chia_binary, node_id), stdout=PIPE, stderr=PIPE, shell=True) @@ -292,7 +292,7 @@ def add_connections(connections, blockchain): elif socket.gethostbyname(hostname) != hostname: app.logger.debug('{} is a valid hostname'.format(hostname)) app.logger.info("Adding {0} connection to peer: {1}".format(blockchain, connection)) - if blockchain == 'cactus': # Cactus now supports only 'peer' command + if blockchain in ['cactus', 'maize']: # Cactus & Maize now supports only 'peer' command proc = Popen("{0} peer --add-connection {1} full_node".format(chia_binary, connection), stdout=PIPE, stderr=PIPE, shell=True) else: proc = Popen("{0} show --add-connection {1}".format(chia_binary, connection), stdout=PIPE, stderr=PIPE, shell=True) diff --git a/scripts/forks/maize_launch.sh b/scripts/forks/maize_launch.sh index 6a5ab77b..46c325ff 100644 --- a/scripts/forks/maize_launch.sh +++ b/scripts/forks/maize_launch.sh @@ -32,15 +32,18 @@ if [ -f /root/.maize/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}" - maize keys add -f ${k} > /dev/null + echo "Adding key #${label_num} at path: ${k}" + maize 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[@]}") From 3f2b20e411ff476bc5b479f512379eb964dc2985 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 25 Sep 2022 14:24:18 -0600 Subject: [PATCH 0995/1625] Use dev branch of fd-cli tool. --- .github/workflows/develop-apple.yaml | 1 + .github/workflows/develop-bpx.yaml | 1 + .github/workflows/develop-chinilla.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-hddcoin.yaml | 1 + .github/workflows/develop-littlelambocoin.yaml | 1 + .github/workflows/develop-maize.yaml | 1 + .github/workflows/develop-mint.yaml | 1 + .github/workflows/develop-nchain.yaml | 1 + .github/workflows/develop-petroleum.yaml | 1 + .github/workflows/develop-profit.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 + 20 files changed, 20 insertions(+) diff --git a/.github/workflows/develop-apple.yaml b/.github/workflows/develop-apple.yaml index 0eb92bc8..661ea9a0 100644 --- a/.github/workflows/develop-apple.yaml +++ b/.github/workflows/develop-apple.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "APPLE_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-apple:develop diff --git a/.github/workflows/develop-bpx.yaml b/.github/workflows/develop-bpx.yaml index 0343c974..afc1e293 100644 --- a/.github/workflows/develop-bpx.yaml +++ b/.github/workflows/develop-bpx.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "BPX_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-bpx:develop diff --git a/.github/workflows/develop-chinilla.yaml b/.github/workflows/develop-chinilla.yaml index 00ef6260..1f1562a6 100644 --- a/.github/workflows/develop-chinilla.yaml +++ b/.github/workflows/develop-chinilla.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "CHINILLA_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chinilla:develop diff --git a/.github/workflows/develop-cryptodoge.yaml b/.github/workflows/develop-cryptodoge.yaml index cf008279..235a65de 100644 --- a/.github/workflows/develop-cryptodoge.yaml +++ b/.github/workflows/develop-cryptodoge.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "CRYPTODOGE_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-cryptodoge:develop diff --git a/.github/workflows/develop-ecostake.yaml b/.github/workflows/develop-ecostake.yaml index d3c4b0a1..f2ecd3f7 100644 --- a/.github/workflows/develop-ecostake.yaml +++ b/.github/workflows/develop-ecostake.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "ECOSTAKE_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ecostake:develop diff --git a/.github/workflows/develop-flax.yaml b/.github/workflows/develop-flax.yaml index 88e68186..22034ea6 100644 --- a/.github/workflows/develop-flax.yaml +++ b/.github/workflows/develop-flax.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "FLAX_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-flax:develop diff --git a/.github/workflows/develop-flora.yaml b/.github/workflows/develop-flora.yaml index 7a5ef22b..ff8bdeac 100644 --- a/.github/workflows/develop-flora.yaml +++ b/.github/workflows/develop-flora.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "FLORA_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-flora:develop diff --git a/.github/workflows/develop-gold.yaml b/.github/workflows/develop-gold.yaml index 99bc8145..7f66ee56 100644 --- a/.github/workflows/develop-gold.yaml +++ b/.github/workflows/develop-gold.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "GOLD_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-gold:develop diff --git a/.github/workflows/develop-hddcoin.yaml b/.github/workflows/develop-hddcoin.yaml index 60a39f16..c67caac5 100644 --- a/.github/workflows/develop-hddcoin.yaml +++ b/.github/workflows/develop-hddcoin.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "HDDCOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-hddcoin:develop diff --git a/.github/workflows/develop-littlelambocoin.yaml b/.github/workflows/develop-littlelambocoin.yaml index 896480bb..2bc9e76f 100644 --- a/.github/workflows/develop-littlelambocoin.yaml +++ b/.github/workflows/develop-littlelambocoin.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "LITTLELAMBOCOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-littlelambocoin:develop diff --git a/.github/workflows/develop-maize.yaml b/.github/workflows/develop-maize.yaml index e7199c6d..b928392b 100644 --- a/.github/workflows/develop-maize.yaml +++ b/.github/workflows/develop-maize.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "MAIZE_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-maize:develop diff --git a/.github/workflows/develop-mint.yaml b/.github/workflows/develop-mint.yaml index e87873c5..c8200838 100644 --- a/.github/workflows/develop-mint.yaml +++ b/.github/workflows/develop-mint.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "MINT_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mint:develop diff --git a/.github/workflows/develop-nchain.yaml b/.github/workflows/develop-nchain.yaml index b8ddffdd..5299e4e9 100644 --- a/.github/workflows/develop-nchain.yaml +++ b/.github/workflows/develop-nchain.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "NCHAIN_BRANCH=net9.dev" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-nchain:develop diff --git a/.github/workflows/develop-petroleum.yaml b/.github/workflows/develop-petroleum.yaml index aacea88c..a59ffd7c 100644 --- a/.github/workflows/develop-petroleum.yaml +++ b/.github/workflows/develop-petroleum.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "PETROLEUM_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-petroleum:develop diff --git a/.github/workflows/develop-profit.yaml b/.github/workflows/develop-profit.yaml index 4b531df6..20f05eb8 100644 --- a/.github/workflows/develop-profit.yaml +++ b/.github/workflows/develop-profit.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "PROFIT_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-profit:develop diff --git a/.github/workflows/develop-silicoin.yaml b/.github/workflows/develop-silicoin.yaml index 23af89e8..16e113f2 100644 --- a/.github/workflows/develop-silicoin.yaml +++ b/.github/workflows/develop-silicoin.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "SILICOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-silicoin:develop diff --git a/.github/workflows/develop-staicoin.yaml b/.github/workflows/develop-staicoin.yaml index b8a8c47f..f8a20ea9 100644 --- a/.github/workflows/develop-staicoin.yaml +++ b/.github/workflows/develop-staicoin.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "STAICOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-staicoin:develop diff --git a/.github/workflows/develop-stor.yaml b/.github/workflows/develop-stor.yaml index 3bb5074b..addd6b0c 100644 --- a/.github/workflows/develop-stor.yaml +++ b/.github/workflows/develop-stor.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "STOR_BRANCH=master" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-stor:develop diff --git a/.github/workflows/develop-tad.yaml b/.github/workflows/develop-tad.yaml index b5d4f3e1..a90a6cfe 100644 --- a/.github/workflows/develop-tad.yaml +++ b/.github/workflows/develop-tad.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "TAD_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-tad:develop diff --git a/.github/workflows/develop-wheat.yaml b/.github/workflows/develop-wheat.yaml index 4a8eb1d2..5860dd1a 100644 --- a/.github/workflows/develop-wheat.yaml +++ b/.github/workflows/develop-wheat.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "WHEAT_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-wheat:develop From 3da6551051f0b64d441c73748d0727a467802661 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 25 Sep 2022 16:35:42 -0600 Subject: [PATCH 0996/1625] Fix for setting Wallet Sync back to Always. --- api/commands/chia_cli.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index ae7d6eb8..aea868d1 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -333,11 +333,14 @@ def remove_connection(node_ids, blockchain): def save_wallet_settings(settings, blockchain): try: + app.logger.info("Setting wallet frequency: {0}".format(settings)) if not settings: # User reverting to defaults, no custom settings - os.path(WALLET_SETTINGS_FILE).delete() + app.logger.info("Deleting settings at {0}".format(WALLET_SETTINGS_FILE)) + os.remove(WALLET_SETTINGS_FILE) else: + app.logger.info("Updating settings at {0}".format(WALLET_SETTINGS_FILE)) with open(WALLET_SETTINGS_FILE, 'w') as outfile: json.dump(settings, outfile) except Exception as ex: - app.logger.info(traceback.format_exc()) + app.logger.debug(traceback.format_exc()) raise Exception('Failed to store {0} wallet settings to {1}.'.format(blockchain, WALLET_SETTINGS_FILE) + '\n' + str(ex)) From 45ff0d1dcc75b550d325570272669adcce99f17d Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 25 Sep 2022 16:45:33 -0600 Subject: [PATCH 0997/1625] Fix for wallet settings. --- api/commands/chia_cli.py | 5 ++++- web/actions/chia.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index aea868d1..b1117f0f 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -336,7 +336,10 @@ def save_wallet_settings(settings, blockchain): app.logger.info("Setting wallet frequency: {0}".format(settings)) if not settings: # User reverting to defaults, no custom settings app.logger.info("Deleting settings at {0}".format(WALLET_SETTINGS_FILE)) - os.remove(WALLET_SETTINGS_FILE) + try: + os.remove(WALLET_SETTINGS_FILE) + except OSError: + pass else: app.logger.info("Updating settings at {0}".format(WALLET_SETTINGS_FILE)) with open(WALLET_SETTINGS_FILE, 'w') as outfile: diff --git a/web/actions/chia.py b/web/actions/chia.py index e3da44ca..c219ec87 100644 --- a/web/actions/chia.py +++ b/web/actions/chia.py @@ -454,7 +454,7 @@ def load_current_wallet_sync_frequency(): def save_current_wallet_sync_frequency(freq): settings = {} # An "always" (-1) frequency is an empty settings dict to fullnodes - if int(freq) > 0: + if int(freq) >= 0: # 0 is Never, other is hours of frequency settings = {'wallet_sync_frequency': freq} fullnodes = wk.get_fullnodes_by_blockchain() for blockchain in fullnodes.keys(): From 6ae69cd6657efd231a990b53940947c50b2dc4f8 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 25 Sep 2022 17:02:55 -0600 Subject: [PATCH 0998/1625] Delete alerts which are older than 3 days to avoid too many rows. --- api/gunicorn.conf.py | 2 +- api/schedules/status_alerts.py | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/api/gunicorn.conf.py b/api/gunicorn.conf.py index 07d03960..8463f3f6 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -93,7 +93,7 @@ def on_starting(server): #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 - #scheduler.add_job(func=status_warnings.collect, name="farms", trigger='interval', seconds=10) # Test immediately + #scheduler.add_job(func=status_alerts.update, name="alerts", trigger='interval', seconds=10) # Test immediately #scheduler.add_job(func=periodically_sync_wallet.execute, name="periodically_sync_wallet", trigger='interval', seconds=60) # Test immediately #scheduler.add_job(func=status_warnings.collect, name="status_warnings", trigger='interval', seconds=60) # Test immediately #scheduler.add_job(func=nft_recover.execute, name="status_nft_recover", trigger='interval', seconds=60) diff --git a/api/schedules/status_alerts.py b/api/schedules/status_alerts.py index 6c1b0130..83a92acc 100644 --- a/api/schedules/status_alerts.py +++ b/api/schedules/status_alerts.py @@ -19,16 +19,29 @@ from api.commands import chiadog_cli from api import app, utils +DELETE_OLD_STATS_AFTER_DAYS = 3 # Keep at most 3 days of old alerts + first_run = True +def delete_old_alerts(db): + try: + cutoff = datetime.datetime.now() - datetime.timedelta(days=DELETE_OLD_STATS_AFTER_DAYS) + db.session.query(a.Alert).filter(a.Alert.created_at <= cutoff).delete() + db.session.commit() + app.logger.debug("Deleted old alerts before {0}".format(cutoff.strftime("%Y-%m-%d %H:%M"))) + except: + app.logger.info("Failed to delete old alerts.") + app.logger.info(traceback.format_exc()) + def update(): global first_run - if globals.load()['is_controller']: - #app.logger.info("Skipping alerts polling on fullnode are already placed in database directly via chiadog_notifier.sh script.") - return with app.app_context(): try: from api import db + delete_old_alerts(db) + if globals.load()['is_controller']: + #app.logger.info("Skipping alerts polling on fullnode are already placed in database directly via chiadog_notifier.sh script.") + return hostname = utils.get_hostname() if first_run: # On first launch, load last hour of notifications since = (datetime.datetime.now() - datetime.timedelta(hours=1)).strftime("%Y-%m-%d %H:%M:%S") From 84e13d33c15fe49288c872093a952c44809dd5ed Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 26 Sep 2022 08:01:03 -0600 Subject: [PATCH 0999/1625] Extra line break after fd-cli log output. --- CHANGELOG.md | 1 + api/commands/fd_cli.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2af1b904..21863d77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.8.5] - 2022-10-? + - Fixes: Enhance 'NFT Reward Recovery' tool to support v2 databases and run on Ubuntu 22.04 base image. - Update: [Maize](https://github.com/Maize-Network/maize-blockchain/releases/tag/1.6.0) to v1.6.0 ## [0.8.4] - 2022-09-21 diff --git a/api/commands/fd_cli.py b/api/commands/fd_cli.py index 59fa86b6..438ff77d 100644 --- a/api/commands/fd_cli.py +++ b/api/commands/fd_cli.py @@ -49,7 +49,7 @@ def reward_recovery(wallet_id, launcher_id, pool_contract_address): fd_env.update(vars) cmd = f"/usr/local/bin/fd-cli nft-recover -l {launcher_id} -p {pool_contract_address} -nh 127.0.0.1 -np {rpc_port} -ct {network_path}/config/ssl/full_node/private_full_node.crt -ck {network_path}/config/ssl/full_node/private_full_node.key" app.logger.info(f"Executing NFT 7/8 win recovery for {blockchain}: {cmd}") - log_fo.write("\n\nExecuted at: {0}\nFD_CLI_BC_DB_PATH={1} FD_CLI_WT_DB_PATH={2} {3}".format( + log_fo.write("\n\nExecuted at: {0}\nFD_CLI_BC_DB_PATH={1} FD_CLI_WT_DB_PATH={2} {3}\n".format( time.strftime("%Y-%m-%d-%H:%M:%S"), vars['FD_CLI_BC_DB_PATH'], vars['FD_CLI_WT_DB_PATH'], cmd)) log_fo.flush() proc = Popen(cmd,cwd="/flora-dev-cli", env=fd_env, shell=True, universal_newlines=True, stdout=log_fo, stderr=log_fo) From e27a6d6f6b0bd62589f51de6ec69ea3444a48b7b Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 26 Sep 2022 08:25:09 -0600 Subject: [PATCH 1000/1625] Collect status before pausing wallet. --- api/schedules/periodically_sync_wallet.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/api/schedules/periodically_sync_wallet.py b/api/schedules/periodically_sync_wallet.py index 2f898fd1..734767d7 100644 --- a/api/schedules/periodically_sync_wallet.py +++ b/api/schedules/periodically_sync_wallet.py @@ -15,6 +15,7 @@ from api import app from common.config import globals from api.commands import chia_cli +from api.schedules import stats_effort, status_wallets, status_farm, status_pools # When this file present, we are leaving wallet paused normally, syncing every day or so WALLET_SETTINGS_FILE = '/root/.chia/machinaris/config/wallet_settings.json' @@ -51,7 +52,12 @@ def execute(): wallet = chia_cli.load_wallet_show(blockchain) if not wallet.is_synced(): app.logger.info("SYNC: Wallet running but still not synced. Leaving it running since {0}".format(last_wallet_start_at.strftime('%Y-%m-%d %H:%M:%S'))) - else: + else: # Collect stats needing a synced wallet, then pause wallet to save memory + app.logger.info("SYNC: Collecting farm, wallet, pool, and effort status before pausing wallet...") + stats_effort.collect() + status_wallets.update() + status_farm.update() + status_pools.update() app.logger.info("SYNC: Wallet running and is now synced. Pausing wallet now, after earlier sync start at {0}".format(last_wallet_start_at.strftime('%Y-%m-%d %H:%M:%S'))) chia_cli.pause_wallet(blockchain) # Wallet running, currently synced, so stop it until next sync time else: # Wallet not running, so check to see if a sync is due From fdfa31d65e1b3f33590e1455d9ec25bbfecb8ea6 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 26 Sep 2022 20:42:28 -0600 Subject: [PATCH 1001/1625] Trigger a build against latest Chiadog. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21863d77..df8708ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.8.5] - 2022-10-? - - Fixes: Enhance 'NFT Reward Recovery' tool to support v2 databases and run on Ubuntu 22.04 base image. + - Fixes: Enhance 'NFT Reward Recovery' tool to support v2 databases. Fix for invalid Chiadog harvester alerts. - Update: [Maize](https://github.com/Maize-Network/maize-blockchain/releases/tag/1.6.0) to v1.6.0 ## [0.8.4] - 2022-09-21 From e81562b5f2d978798ed526902143c0a9d4abd4f6 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 27 Sep 2022 08:59:19 -0600 Subject: [PATCH 1002/1625] Path to fd-cli binary has changed. --- api/commands/fd_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/commands/fd_cli.py b/api/commands/fd_cli.py index 438ff77d..7b26f040 100644 --- a/api/commands/fd_cli.py +++ b/api/commands/fd_cli.py @@ -47,7 +47,7 @@ def reward_recovery(wallet_id, launcher_id, pool_contract_address): app.logger.error("Reward Recovery found neither v1 or v2 blockchain database at: {0}/db".format(network_path)) fd_env = os.environ.copy() fd_env.update(vars) - cmd = f"/usr/local/bin/fd-cli nft-recover -l {launcher_id} -p {pool_contract_address} -nh 127.0.0.1 -np {rpc_port} -ct {network_path}/config/ssl/full_node/private_full_node.crt -ck {network_path}/config/ssl/full_node/private_full_node.key" + cmd = f"fd-cli nft-recover -l {launcher_id} -p {pool_contract_address} -nh 127.0.0.1 -np {rpc_port} -ct {network_path}/config/ssl/full_node/private_full_node.crt -ck {network_path}/config/ssl/full_node/private_full_node.key" app.logger.info(f"Executing NFT 7/8 win recovery for {blockchain}: {cmd}") log_fo.write("\n\nExecuted at: {0}\nFD_CLI_BC_DB_PATH={1} FD_CLI_WT_DB_PATH={2} {3}\n".format( time.strftime("%Y-%m-%d-%H:%M:%S"), vars['FD_CLI_BC_DB_PATH'], vars['FD_CLI_WT_DB_PATH'], cmd)) From 3a263ae900c76c174fd2fac6b792a70e20e42d8d Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 27 Sep 2022 10:04:52 -0600 Subject: [PATCH 1003/1625] Use legacy fd-cli on legacy blockchains. --- .github/workflows/develop-cryptodoge.yaml | 1 - .github/workflows/develop-ecostake.yaml | 1 - .github/workflows/develop-flora.yaml | 1 - .github/workflows/develop-gold.yaml | 1 - .github/workflows/develop-hddcoin.yaml | 1 - .github/workflows/develop-mint.yaml | 1 - .github/workflows/develop-nchain.yaml | 1 - .github/workflows/develop-petroleum.yaml | 1 - .github/workflows/develop-silicoin.yaml | 1 - .github/workflows/develop-staicoin.yaml | 1 - .github/workflows/develop-stor.yaml | 1 - 11 files changed, 11 deletions(-) diff --git a/.github/workflows/develop-cryptodoge.yaml b/.github/workflows/develop-cryptodoge.yaml index 235a65de..cf008279 100644 --- a/.github/workflows/develop-cryptodoge.yaml +++ b/.github/workflows/develop-cryptodoge.yaml @@ -43,7 +43,6 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "FDCLI_BRANCH=dev" "CRYPTODOGE_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-cryptodoge:develop diff --git a/.github/workflows/develop-ecostake.yaml b/.github/workflows/develop-ecostake.yaml index f2ecd3f7..d3c4b0a1 100644 --- a/.github/workflows/develop-ecostake.yaml +++ b/.github/workflows/develop-ecostake.yaml @@ -42,7 +42,6 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "FDCLI_BRANCH=dev" "ECOSTAKE_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ecostake:develop diff --git a/.github/workflows/develop-flora.yaml b/.github/workflows/develop-flora.yaml index ff8bdeac..7a5ef22b 100644 --- a/.github/workflows/develop-flora.yaml +++ b/.github/workflows/develop-flora.yaml @@ -43,7 +43,6 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "FDCLI_BRANCH=dev" "FLORA_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-flora:develop diff --git a/.github/workflows/develop-gold.yaml b/.github/workflows/develop-gold.yaml index 7f66ee56..99bc8145 100644 --- a/.github/workflows/develop-gold.yaml +++ b/.github/workflows/develop-gold.yaml @@ -42,7 +42,6 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "FDCLI_BRANCH=dev" "GOLD_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-gold:develop diff --git a/.github/workflows/develop-hddcoin.yaml b/.github/workflows/develop-hddcoin.yaml index c67caac5..60a39f16 100644 --- a/.github/workflows/develop-hddcoin.yaml +++ b/.github/workflows/develop-hddcoin.yaml @@ -43,7 +43,6 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "FDCLI_BRANCH=dev" "HDDCOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-hddcoin:develop diff --git a/.github/workflows/develop-mint.yaml b/.github/workflows/develop-mint.yaml index c8200838..e87873c5 100644 --- a/.github/workflows/develop-mint.yaml +++ b/.github/workflows/develop-mint.yaml @@ -42,7 +42,6 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "FDCLI_BRANCH=dev" "MINT_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mint:develop diff --git a/.github/workflows/develop-nchain.yaml b/.github/workflows/develop-nchain.yaml index 5299e4e9..b8ddffdd 100644 --- a/.github/workflows/develop-nchain.yaml +++ b/.github/workflows/develop-nchain.yaml @@ -43,7 +43,6 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "FDCLI_BRANCH=dev" "NCHAIN_BRANCH=net9.dev" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-nchain:develop diff --git a/.github/workflows/develop-petroleum.yaml b/.github/workflows/develop-petroleum.yaml index a59ffd7c..aacea88c 100644 --- a/.github/workflows/develop-petroleum.yaml +++ b/.github/workflows/develop-petroleum.yaml @@ -42,7 +42,6 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "FDCLI_BRANCH=dev" "PETROLEUM_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-petroleum:develop diff --git a/.github/workflows/develop-silicoin.yaml b/.github/workflows/develop-silicoin.yaml index 16e113f2..23af89e8 100644 --- a/.github/workflows/develop-silicoin.yaml +++ b/.github/workflows/develop-silicoin.yaml @@ -42,7 +42,6 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "FDCLI_BRANCH=dev" "SILICOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-silicoin:develop diff --git a/.github/workflows/develop-staicoin.yaml b/.github/workflows/develop-staicoin.yaml index f8a20ea9..b8a8c47f 100644 --- a/.github/workflows/develop-staicoin.yaml +++ b/.github/workflows/develop-staicoin.yaml @@ -43,7 +43,6 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "FDCLI_BRANCH=dev" "STAICOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-staicoin:develop diff --git a/.github/workflows/develop-stor.yaml b/.github/workflows/develop-stor.yaml index addd6b0c..3bb5074b 100644 --- a/.github/workflows/develop-stor.yaml +++ b/.github/workflows/develop-stor.yaml @@ -43,7 +43,6 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" - "FDCLI_BRANCH=dev" "STOR_BRANCH=master" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-stor:develop From 0e8fb43f5159a63f77e25458149e4b2ed8d81843 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 27 Sep 2022 10:10:27 -0600 Subject: [PATCH 1004/1625] fd-cli path --- api/commands/fd_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/commands/fd_cli.py b/api/commands/fd_cli.py index 7b26f040..438ff77d 100644 --- a/api/commands/fd_cli.py +++ b/api/commands/fd_cli.py @@ -47,7 +47,7 @@ def reward_recovery(wallet_id, launcher_id, pool_contract_address): app.logger.error("Reward Recovery found neither v1 or v2 blockchain database at: {0}/db".format(network_path)) fd_env = os.environ.copy() fd_env.update(vars) - cmd = f"fd-cli nft-recover -l {launcher_id} -p {pool_contract_address} -nh 127.0.0.1 -np {rpc_port} -ct {network_path}/config/ssl/full_node/private_full_node.crt -ck {network_path}/config/ssl/full_node/private_full_node.key" + cmd = f"/usr/local/bin/fd-cli nft-recover -l {launcher_id} -p {pool_contract_address} -nh 127.0.0.1 -np {rpc_port} -ct {network_path}/config/ssl/full_node/private_full_node.crt -ck {network_path}/config/ssl/full_node/private_full_node.key" app.logger.info(f"Executing NFT 7/8 win recovery for {blockchain}: {cmd}") log_fo.write("\n\nExecuted at: {0}\nFD_CLI_BC_DB_PATH={1} FD_CLI_WT_DB_PATH={2} {3}\n".format( time.strftime("%Y-%m-%d-%H:%M:%S"), vars['FD_CLI_BC_DB_PATH'], vars['FD_CLI_WT_DB_PATH'], cmd)) From ec7dbc9797b8e6fbf806b467d2b85a3dc72c2451 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 28 Sep 2022 07:42:04 -0600 Subject: [PATCH 1005/1625] Fix for Github security alert on regexps. --- api/commands/chia_cli.py | 2 +- api/commands/log_parser.py | 2 +- api/schedules/stats_balances.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/commands/chia_cli.py b/api/commands/chia_cli.py index b1117f0f..4b6d4eba 100644 --- a/api/commands/chia_cli.py +++ b/api/commands/chia_cli.py @@ -254,7 +254,7 @@ def plot_check(blockchain, plot_path): raise Exception("The timeout is expired attempting to check plots.") app.logger.info("Completed plot check of: {0}".format(plot_path)) class_escape = re.compile(r'.*: INFO\s+') - ansi_escape = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])') + ansi_escape = re.compile(r'\x1B(?:[@A-Z\\-_]|\[[0-9:;<=>?]*[ -/]*[@-~])') return class_escape.sub('', ansi_escape.sub('', outs)) def dispatch_action(job): diff --git a/api/commands/log_parser.py b/api/commands/log_parser.py index 9a0dc4fb..c7e0e83e 100644 --- a/api/commands/log_parser.py +++ b/api/commands/log_parser.py @@ -161,6 +161,6 @@ def get_log_lines(log_type, log_id=None, blockchain=None): app.logger.info("No log file found at {0}".format(log_file)) return 'No log file found!' #app.logger.info("Log file found at {0}".format(log_file)) - ansi_escape = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])') + ansi_escape = re.compile(r'\x1B(?:[@A-Z\\-_]|\[[0-9:;<=>?]*[ -/]*[@-~])') proc = Popen(['tail', '-n', str(MAX_LOG_LINES), log_file], stdout=PIPE) return ansi_escape.sub('', proc.stdout.read().decode("utf-8")) diff --git a/api/schedules/stats_balances.py b/api/schedules/stats_balances.py index 6c0f10f5..bea1d8d1 100644 --- a/api/schedules/stats_balances.py +++ b/api/schedules/stats_balances.py @@ -82,6 +82,7 @@ def store_balance_locally(blockchain, wallet_balance, current_datetime): db.session.commit() def store_total_locally(total_balance, currency_symbol, current_datetime): + app.logger.info("Storing total wallet balance (all blockchains) of {0}".format(total_balance)) try: db.session.add(stats.StatTotalBalance( hostname=utils.get_hostname(), From 535180c8a2aa32be2175ec4733f95017b6ca398d Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Wed, 28 Sep 2022 10:47:06 -0600 Subject: [PATCH 1006/1625] Use newer version of fd-cli --- .github/workflows/develop-cryptodoge.yaml | 1 + .github/workflows/develop-ecostake.yaml | 1 + .github/workflows/develop-flora.yaml | 1 + .github/workflows/develop-gold.yaml | 1 + .github/workflows/develop-hddcoin.yaml | 1 + .github/workflows/develop-mint.yaml | 1 + .github/workflows/develop-nchain.yaml | 1 + .github/workflows/develop-petroleum.yaml | 1 + .github/workflows/develop-silicoin.yaml | 1 + .github/workflows/develop-staicoin.yaml | 1 + .github/workflows/develop-stor.yaml | 1 + scripts/fd-cli_setup.sh | 4 ++++ 12 files changed, 15 insertions(+) diff --git a/.github/workflows/develop-cryptodoge.yaml b/.github/workflows/develop-cryptodoge.yaml index cf008279..235a65de 100644 --- a/.github/workflows/develop-cryptodoge.yaml +++ b/.github/workflows/develop-cryptodoge.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "CRYPTODOGE_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-cryptodoge:develop diff --git a/.github/workflows/develop-ecostake.yaml b/.github/workflows/develop-ecostake.yaml index d3c4b0a1..f2ecd3f7 100644 --- a/.github/workflows/develop-ecostake.yaml +++ b/.github/workflows/develop-ecostake.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "ECOSTAKE_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ecostake:develop diff --git a/.github/workflows/develop-flora.yaml b/.github/workflows/develop-flora.yaml index 7a5ef22b..ff8bdeac 100644 --- a/.github/workflows/develop-flora.yaml +++ b/.github/workflows/develop-flora.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "FLORA_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-flora:develop diff --git a/.github/workflows/develop-gold.yaml b/.github/workflows/develop-gold.yaml index 99bc8145..7f66ee56 100644 --- a/.github/workflows/develop-gold.yaml +++ b/.github/workflows/develop-gold.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "GOLD_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-gold:develop diff --git a/.github/workflows/develop-hddcoin.yaml b/.github/workflows/develop-hddcoin.yaml index 60a39f16..c67caac5 100644 --- a/.github/workflows/develop-hddcoin.yaml +++ b/.github/workflows/develop-hddcoin.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "HDDCOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-hddcoin:develop diff --git a/.github/workflows/develop-mint.yaml b/.github/workflows/develop-mint.yaml index e87873c5..c8200838 100644 --- a/.github/workflows/develop-mint.yaml +++ b/.github/workflows/develop-mint.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "MINT_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mint:develop diff --git a/.github/workflows/develop-nchain.yaml b/.github/workflows/develop-nchain.yaml index b8ddffdd..5299e4e9 100644 --- a/.github/workflows/develop-nchain.yaml +++ b/.github/workflows/develop-nchain.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "NCHAIN_BRANCH=net9.dev" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-nchain:develop diff --git a/.github/workflows/develop-petroleum.yaml b/.github/workflows/develop-petroleum.yaml index aacea88c..a59ffd7c 100644 --- a/.github/workflows/develop-petroleum.yaml +++ b/.github/workflows/develop-petroleum.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "PETROLEUM_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-petroleum:develop diff --git a/.github/workflows/develop-silicoin.yaml b/.github/workflows/develop-silicoin.yaml index 23af89e8..16e113f2 100644 --- a/.github/workflows/develop-silicoin.yaml +++ b/.github/workflows/develop-silicoin.yaml @@ -42,6 +42,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "SILICOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-silicoin:develop diff --git a/.github/workflows/develop-staicoin.yaml b/.github/workflows/develop-staicoin.yaml index b8a8c47f..f8a20ea9 100644 --- a/.github/workflows/develop-staicoin.yaml +++ b/.github/workflows/develop-staicoin.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "STAICOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-staicoin:develop diff --git a/.github/workflows/develop-stor.yaml b/.github/workflows/develop-stor.yaml index 3bb5074b..addd6b0c 100644 --- a/.github/workflows/develop-stor.yaml +++ b/.github/workflows/develop-stor.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=focal" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FDCLI_BRANCH=dev" "STOR_BRANCH=master" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-stor:develop diff --git a/scripts/fd-cli_setup.sh b/scripts/fd-cli_setup.sh index e46de44c..7249f88a 100644 --- a/scripts/fd-cli_setup.sh +++ b/scripts/fd-cli_setup.sh @@ -12,6 +12,10 @@ if [[ ${mode} == 'fullnode' ]]; then cd / git clone --branch ${FDCLI_BRANCH} https://github.com/guydavis/flora-dev-cli.git cd flora-dev-cli + codename=`lsb_release -c -s` + echo "Building fd-cli on Ubuntu ${codename}..." + cp requirements_${codename}.txt requirements.txt + cp setup_${codename}.py setup.py pip install -e . --extra-index-url https://pypi.chia.net/simple/ fi fi \ No newline at end of file From 24a85902c062988a48a510815efae282c7b8f605 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 30 Sep 2022 15:58:53 -0600 Subject: [PATCH 1007/1625] Container memory current display. --- api/commands/blockchain_db.py | 50 ++++++++++++++++++++++++++++++++++ api/gunicorn.conf.py | 20 ++++++++------ api/schedules/status_worker.py | 5 +++- api/views/rewards/resources.py | 8 +++++- common/config/blockchains.json | 2 +- common/config/globals.py | 8 ++++++ common/models/workers.py | 6 ++++ web/actions/chia.py | 2 +- web/templates/workers.html | 2 ++ 9 files changed, 91 insertions(+), 12 deletions(-) create mode 100644 api/commands/blockchain_db.py diff --git a/api/commands/blockchain_db.py b/api/commands/blockchain_db.py new file mode 100644 index 00000000..78bd6d23 --- /dev/null +++ b/api/commands/blockchain_db.py @@ -0,0 +1,50 @@ +# +# DB access to blockchain databases, used when RPC API isn't enough +# + +import os +import sqlite3 + +from chia.util.bech32m import decode_puzzle_hash + +from common.config import globals +from api import app + +def _get_blockchain_db_path(): + blockchain = globals.enabled_blockchains()[0] + network_path = globals.get_blockchain_network_path(blockchain) + network_name = globals.get_blockchain_network_name(blockchain) + blockchain_db_path = f'{network_path}/db/blockchain_v2_{network_name}.sqlite' + if os.path.exists(blockchain_db_path): # First check for a v2 blockchain + app.logger.info("For {0}, found v2 blockchain database at: {1}".formtat(blockchain, blockchain_db_path)) + return blockchain_db_path + else: # Then check for old v1 blockchain and wallet if no v2 found + blockchain_db_path = f'{network_path}/db/blockchain_v1_{network_name}.sqlite' + if os.path.exists(blockchain_db_path): # Then check for a v1 blockchain + app.logger.info("For {0}, found v1 blockchain database at: {1}".formtat(blockchain, blockchain_db_path)) + return blockchain_db_path + raise Exception("Found neither v1 or v2 blockchain database at: {0}/db".format(network_path)) + +def get_unspent_coins(pool_contract_address): + puzzle_hash = decode_puzzle_hash(pool_contract_address) + db_path = _get_blockchain_db_path() + spent_column_name = 'spent' # v1 + if '_v2_' in db_path: + spent_column_name = 'spent_index' + conn = sqlite3.connect(db_path) + cursor = conn.cursor() + cursor.execute( + f"SELECT * " + f"FROM coin_record " + f"WHERE {spent_column_name} == 0 " + f"AND timestamp <= (strftime('%s', 'now') - 604800) " + f"AND puzzle_hash LIKE '{puzzle_hash}' " + f"ORDER BY timestamp DESC") + rows = [] + for row in cursor.fetchall(): + amount = int.from_bytes(row[7], byteorder='big', signed=False) + if amount > 0: + rows.append(row) + if len(rows) == 0: + app.logger.info("No coins are eligible for recovery yet. Notice that 604800 seconds must pass since coin creation to recover it.") + return rows \ No newline at end of file diff --git a/api/gunicorn.conf.py b/api/gunicorn.conf.py index 8463f3f6..e4d440fa 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -19,6 +19,7 @@ def on_starting(server): log_rotate, restart_stuck_farmer, geolocate_peers, \ stats_effort, status_warnings from common.config import globals + from common.models import pools from api.commands import websvcs @@ -52,6 +53,8 @@ def on_starting(server): scheduler.add_job(func=status_challenges.update, name="status_challenges", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) scheduler.add_job(func=status_alerts.update, name="status_alerts", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) 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 # Status for plotters @@ -67,14 +70,16 @@ 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_farms", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) - scheduler.add_job(func=status_plots.update, name="status_plots", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) - scheduler.add_job(func=status_plotnfts.update, name="status_plotnfts", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) - scheduler.add_job(func=status_pools.update, name="status_pools", 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=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=status_partials.update, name="status_partials", 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) - + if globals.enabled_blockchains()[0] in ['chia', 'chives', 'mmx']: # 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 + scheduler.add_job(func=status_pools.update, name="status_pools", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) + scheduler.add_job(func=status_partials.update, name="status_partials", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) + scheduler.add_job(func=status_plotnfts.update, name="status_plotnfts", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) + # Status for single Machinaris controller only, should be blockchain=chia if utils.is_controller(): scheduler.add_job(func=plots_check.execute, name="plot_checks", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER, @@ -87,8 +92,7 @@ def on_starting(server): scheduler.add_job(func=stats_balances.collect, name="stats_balances", trigger='cron', minute=0) # Hourly # Testing only - #scheduler.add_job(func=status_plots.update, name="status_plots", trigger='interval', seconds=60) # Test immediately - #scheduler.add_job(func=stats_blocks.collect, name="stats_blocks", trigger='interval', seconds=10) # Test immediately + #scheduler.add_job(func=status_worker.update, name="status_worker", trigger='interval', seconds=10) # Test immediately #scheduler.add_job(func=stats_effort.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 diff --git a/api/schedules/status_worker.py b/api/schedules/status_worker.py index 7a9722fd..e690af7b 100644 --- a/api/schedules/status_worker.py +++ b/api/schedules/status_worker.py @@ -77,4 +77,7 @@ def gather_services_status(): response['farming_status'] = farming_status if gc['machinaris_mode'] == 'fullnode': response['wallet_status'] = wallet_status - return json.dumps(response) \ No newline at end of file + memory_usage = globals.get_container_memory_usage_bytes() + if memory_usage: + response['container_memory_usage_bytes'] = memory_usage + return json.dumps(response) diff --git a/api/views/rewards/resources.py b/api/views/rewards/resources.py index ddc9798e..130fc38f 100644 --- a/api/views/rewards/resources.py +++ b/api/views/rewards/resources.py @@ -10,7 +10,7 @@ from api import app from api.extensions.api import Blueprint -from api.commands import fd_cli +from api.commands import fd_cli, blockchain_db from common.models import pools blp = Blueprint( @@ -23,6 +23,12 @@ @blp.route('/') class Rewards(MethodView): + def get(self): + coins = blockchain_db.get_unspent_coins('TESTING') + response = make_response(json.dumps(coins), 200) + response.mimetype = "text/json" + return response + def post(self): try: body = json.loads(request.data) diff --git a/common/config/blockchains.json b/common/config/blockchains.json index 95abeca5..f43cea94 100644 --- a/common/config/blockchains.json +++ b/common/config/blockchains.json @@ -352,7 +352,7 @@ "blocks_per_day": 4608, "git_url": "https://github.com/SHIBgreen-Network/shibgreen-blockchain", "discord_url": "https://discord.gg/yZSKtPf8", - "website_url": "https://shibgreen.com/" + "website_url": "https://shib.green/" }, "silicoin": { "name": "Silicoin", diff --git a/common/config/globals.py b/common/config/globals.py index d37bd60e..b75c26c3 100644 --- a/common/config/globals.py +++ b/common/config/globals.py @@ -512,3 +512,11 @@ def wallet_running(): except: logging.error(traceback.format_exc()) return False + +def get_container_memory_usage_bytes(): + try: + with open("/sys/fs/cgroup/memory/memory.usage_in_bytes", "r") as f: + return int(f.readline()) + except Exception as ex: + logging.error("Failed to read current container memory usage in bytes due to: {0}".format(str(ex))) + return None diff --git a/common/models/workers.py b/common/models/workers.py index b75a3b5a..fc218bf8 100644 --- a/common/models/workers.py +++ b/common/models/workers.py @@ -65,6 +65,12 @@ def monitoring_status(self): except: return "unknown" + def container_memory_usage_gb(self): + try: + return "{:.2f} GB".format(int(j.loads(self.services)['container_memory_usage_bytes']) / 1024 / 1024 / 1024) + except Exception as ex: + return '' + def connection_status(self): fifteen_mins_ago = dt.datetime.now() - dt.timedelta(minutes=15) if self.ping_success_at and self.ping_success_at >= fifteen_mins_ago: diff --git a/web/actions/chia.py b/web/actions/chia.py index c219ec87..9128d637 100644 --- a/web/actions/chia.py +++ b/web/actions/chia.py @@ -416,7 +416,7 @@ def restart_farmer(hostname, blockchain): farmer = wk.get_worker(hostname, blockchain) try: # Send request, but timeout in only a second while API works in background utils.send_post(farmer, "/actions/", \ - { 'service': 'farming', 'action': 'restart', 'blockchain': blockchain, }, debug=True, timeout=1) + { 'service': 'farming', 'action': 'restart', 'blockchain': blockchain, }, debug=False, timeout=1) except requests.exceptions.ReadTimeout: pass diff --git a/web/templates/workers.html b/web/templates/workers.html index 00cca5e4..24d47e56 100644 --- a/web/templates/workers.html +++ b/web/templates/workers.html @@ -42,6 +42,7 @@ {{_('Hostname')}} {{_('Blockchain')}} {{_('Mode')}} + {{_('Memory')}} {{_('Last Status Received')}} {{_('Last Ping')}} {{_('Last Successful Ping')}} @@ -57,6 +58,7 @@ title="{{worker.hostname}}:{{worker.port}}">{{worker.displayname}} {{worker.blockchain}} {{worker.mode}} + {{worker.container_memory_usage_gb()}} {{worker.updated_at | datetimefilter}} From 1e3cddb0dd0f50df147e69dd182031f79cf157f2 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 30 Sep 2022 18:32:23 -0600 Subject: [PATCH 1008/1625] Chia import. --- api/commands/blockchain_db.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/commands/blockchain_db.py b/api/commands/blockchain_db.py index 78bd6d23..b1084873 100644 --- a/api/commands/blockchain_db.py +++ b/api/commands/blockchain_db.py @@ -5,7 +5,10 @@ import os import sqlite3 -from chia.util.bech32m import decode_puzzle_hash +# TODO Handle other blockchains +if "chia" == globals.enabled_blockchains()[0]: + # https://github.com/Chia-Network/chia-blockchain/blob/main/chia/util/bech32m.py + from chia.util.bech32m import decode_puzzle_hash from common.config import globals from api import app From 3b9f7cef6108f10c51d0e2512be586e61f517de0 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Fri, 30 Sep 2022 18:56:10 -0600 Subject: [PATCH 1009/1625] Will have to send puzzle hash from Chia controller. --- api/commands/blockchain_db.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/api/commands/blockchain_db.py b/api/commands/blockchain_db.py index b1084873..1f78d4a7 100644 --- a/api/commands/blockchain_db.py +++ b/api/commands/blockchain_db.py @@ -5,11 +5,6 @@ import os import sqlite3 -# TODO Handle other blockchains -if "chia" == globals.enabled_blockchains()[0]: - # https://github.com/Chia-Network/chia-blockchain/blob/main/chia/util/bech32m.py - from chia.util.bech32m import decode_puzzle_hash - from common.config import globals from api import app @@ -28,8 +23,7 @@ def _get_blockchain_db_path(): return blockchain_db_path raise Exception("Found neither v1 or v2 blockchain database at: {0}/db".format(network_path)) -def get_unspent_coins(pool_contract_address): - puzzle_hash = decode_puzzle_hash(pool_contract_address) +def get_unspent_coins(puzzle_hash): db_path = _get_blockchain_db_path() spent_column_name = 'spent' # v1 if '_v2_' in db_path: From 89f44e78bd0fd2ec6aae7ccad723438d99916676 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 2 Oct 2022 09:33:26 -0600 Subject: [PATCH 1010/1625] Chart memory usage of each container (GiB) and total host usage (%). --- api/default_settings.py | 2 + api/migrations/versions/00382c81d58e_.py | 12 + api/migrations/versions/4251648e5e30_.py | 12 + api/migrations/versions/53d13c2cdac7_.py | 12 + api/migrations/versions/8acdc24f8d3d_.py | 12 + api/migrations/versions/a73e47f22d10_.py | 12 + api/migrations/versions/aa872a73d89d_.py | 12 + api/migrations/versions/bad9ae7e11d9_.py | 12 + api/migrations/versions/da71a39b8e21_.py | 12 + api/migrations/versions/e5c6d9a6d9c3_.py | 12 + api/migrations/versions/e8e78a7c23bf_.py | 437 +++++++++++++++++++++ api/schedules/stats_disk.py | 3 +- api/schedules/status_worker.py | 5 + api/views/workers/resources.py | 32 ++ common/config/globals.py | 18 + common/models/stats.py | 19 + common/models/workers.py | 4 +- web/actions/stats.py | 107 ++++- web/default_settings.py | 2 + web/routes.py | 15 +- web/templates/charts/container_memory.html | 126 ++++++ web/templates/farming/workers.html | 110 +++++- web/templates/plotting/workers.html | 89 ++++- web/templates/wallet.html | 4 +- web/templates/worker.html | 97 ++++- web/templates/workers.html | 135 ++++++- 26 files changed, 1288 insertions(+), 25 deletions(-) create mode 100644 api/migrations/versions/e8e78a7c23bf_.py create mode 100644 web/templates/charts/container_memory.html diff --git a/api/default_settings.py b/api/default_settings.py index 505e614c..3cea47a4 100644 --- a/api/default_settings.py +++ b/api/default_settings.py @@ -44,6 +44,8 @@ class DefaultConfig: 'stat_farmed_blocks': 'sqlite:////root/.chia/machinaris/dbs/stat_farmed_blocks.db', 'stat_wallet_balances': 'sqlite:////root/.chia/machinaris/dbs/stat_wallet_balances.db', 'stat_total_balance': 'sqlite:////root/.chia/machinaris/dbs/stat_total_balance.db', + '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 ETAG_DISABLED = True # https://flask-smorest.readthedocs.io/en/latest/etag.html diff --git a/api/migrations/versions/00382c81d58e_.py b/api/migrations/versions/00382c81d58e_.py index 7302f939..34244c40 100644 --- a/api/migrations/versions/00382c81d58e_.py +++ b/api/migrations/versions/00382c81d58e_.py @@ -402,3 +402,15 @@ def upgrade_warnings(): def downgrade_warnings(): pass + +def upgrade_stat_container_mem_gib(): + pass + +def downgrade_stat_container_mem_gib(): + pass + +def upgrade_stat_host_mem_pct(): + pass + +def downgrade_stat_host_mem_pct(): + pass diff --git a/api/migrations/versions/4251648e5e30_.py b/api/migrations/versions/4251648e5e30_.py index 42ac3e94..6e9c9f11 100644 --- a/api/migrations/versions/4251648e5e30_.py +++ b/api/migrations/versions/4251648e5e30_.py @@ -382,4 +382,16 @@ def upgrade_warnings(): pass def downgrade_warnings(): + pass + +def upgrade_stat_container_mem_gib(): + pass + +def downgrade_stat_container_mem_gib(): + pass + +def upgrade_stat_host_mem_pct(): + pass + +def downgrade_stat_host_mem_pct(): pass \ No newline at end of file diff --git a/api/migrations/versions/53d13c2cdac7_.py b/api/migrations/versions/53d13c2cdac7_.py index 8577585c..d4fd7395 100644 --- a/api/migrations/versions/53d13c2cdac7_.py +++ b/api/migrations/versions/53d13c2cdac7_.py @@ -378,3 +378,15 @@ def upgrade_warnings(): def downgrade_warnings(): pass + +def upgrade_stat_container_mem_gib(): + pass + +def downgrade_stat_container_mem_gib(): + pass + +def upgrade_stat_host_mem_pct(): + pass + +def downgrade_stat_host_mem_pct(): + pass diff --git a/api/migrations/versions/8acdc24f8d3d_.py b/api/migrations/versions/8acdc24f8d3d_.py index 02053ad6..f5d3ab8b 100644 --- a/api/migrations/versions/8acdc24f8d3d_.py +++ b/api/migrations/versions/8acdc24f8d3d_.py @@ -384,3 +384,15 @@ def upgrade_warnings(): def downgrade_warnings(): pass + +def upgrade_stat_container_mem_gib(): + pass + +def downgrade_stat_container_mem_gib(): + pass + +def upgrade_stat_host_mem_pct(): + pass + +def downgrade_stat_host_mem_pct(): + pass diff --git a/api/migrations/versions/a73e47f22d10_.py b/api/migrations/versions/a73e47f22d10_.py index 05cb8623..5d4d2b55 100644 --- a/api/migrations/versions/a73e47f22d10_.py +++ b/api/migrations/versions/a73e47f22d10_.py @@ -407,3 +407,15 @@ def downgrade_stat_total_balance(): # ### commands auto generated by Alembic - please adjust! ### pass # ### end Alembic commands ### + +def upgrade_stat_container_mem_gib(): + pass + +def downgrade_stat_container_mem_gib(): + pass + +def upgrade_stat_host_mem_pct(): + pass + +def downgrade_stat_host_mem_pct(): + pass \ No newline at end of file diff --git a/api/migrations/versions/aa872a73d89d_.py b/api/migrations/versions/aa872a73d89d_.py index 598c6961..a5ef727c 100644 --- a/api/migrations/versions/aa872a73d89d_.py +++ b/api/migrations/versions/aa872a73d89d_.py @@ -397,4 +397,16 @@ def upgrade_warnings(): pass def downgrade_warnings(): + pass + +def upgrade_stat_container_mem_gib(): + pass + +def downgrade_stat_container_mem_gib(): + pass + +def upgrade_stat_host_mem_pct(): + pass + +def downgrade_stat_host_mem_pct(): pass \ No newline at end of file diff --git a/api/migrations/versions/bad9ae7e11d9_.py b/api/migrations/versions/bad9ae7e11d9_.py index cad85859..11ace85a 100644 --- a/api/migrations/versions/bad9ae7e11d9_.py +++ b/api/migrations/versions/bad9ae7e11d9_.py @@ -392,3 +392,15 @@ def upgrade_warnings(): def downgrade_warnings(): pass + +def upgrade_stat_container_mem_gib(): + pass + +def downgrade_stat_container_mem_gib(): + pass + +def upgrade_stat_host_mem_pct(): + pass + +def downgrade_stat_host_mem_pct(): + pass diff --git a/api/migrations/versions/da71a39b8e21_.py b/api/migrations/versions/da71a39b8e21_.py index 45b2fe67..d5ba62d3 100644 --- a/api/migrations/versions/da71a39b8e21_.py +++ b/api/migrations/versions/da71a39b8e21_.py @@ -569,4 +569,16 @@ def upgrade_warnings(): pass def downgrade_warnings(): + pass + +def upgrade_stat_container_mem_gib(): + pass + +def downgrade_stat_container_mem_gib(): + pass + +def upgrade_stat_host_mem_pct(): + pass + +def downgrade_stat_host_mem_pct(): pass \ No newline at end of file diff --git a/api/migrations/versions/e5c6d9a6d9c3_.py b/api/migrations/versions/e5c6d9a6d9c3_.py index 50571bf8..ac1f3366 100644 --- a/api/migrations/versions/e5c6d9a6d9c3_.py +++ b/api/migrations/versions/e5c6d9a6d9c3_.py @@ -381,4 +381,16 @@ def upgrade_warnings(): pass def downgrade_warnings(): + pass + +def upgrade_stat_container_mem_gib(): + pass + +def downgrade_stat_container_mem_gib(): + pass + +def upgrade_stat_host_mem_pct(): + pass + +def downgrade_stat_host_mem_pct(): pass \ No newline at end of file diff --git a/api/migrations/versions/e8e78a7c23bf_.py b/api/migrations/versions/e8e78a7c23bf_.py new file mode 100644 index 00000000..0767f9c7 --- /dev/null +++ b/api/migrations/versions/e8e78a7c23bf_.py @@ -0,0 +1,437 @@ +"""empty message + +Revision ID: e8e78a7c23bf +Revises: a73e47f22d10 +Create Date: 2022-10-01 17:19:07.495438 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = 'e8e78a7c23bf' +down_revision = 'a73e47f22d10' +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! ### + pass + # ### end Alembic commands ### + + +def downgrade_plottings(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### 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_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! ### + op.create_table('stat_container_mem_gib', + sa.Column('id', sa.Integer(), nullable=False), + sa.Column('hostname', sa.String(), nullable=True), + sa.Column('blockchain', sa.String(length=64), nullable=False), + sa.Column('value', sa.Integer(), nullable=True), + sa.Column('created_at', sa.String(), nullable=True), + sa.PrimaryKeyConstraint('id') + ) + # ### end Alembic commands ### + + +def downgrade_stat_container_mem_gib(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_table('stat_container_mem_gib') + # ### end Alembic commands ### + + +def upgrade_stat_host_mem_pct(): + # ### commands auto generated by Alembic - please adjust! ### + op.create_table('stat_host_mem_pct', + sa.Column('id', sa.Integer(), nullable=False), + sa.Column('hostname', sa.String(), nullable=True), + sa.Column('value', sa.Integer(), nullable=True), + sa.Column('created_at', sa.String(), nullable=True), + sa.PrimaryKeyConstraint('id') + ) + # ### end Alembic commands ### + + +def downgrade_stat_host_mem_pct(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_table('stat_host_mem_pct') + # ### end Alembic commands ### + diff --git a/api/schedules/stats_disk.py b/api/schedules/stats_disk.py index aa895562..5978fe93 100644 --- a/api/schedules/stats_disk.py +++ b/api/schedules/stats_disk.py @@ -16,7 +16,8 @@ DELETE_OLD_STATS_AFTER_DAYS = 1 TABLES = [ stats.StatPlotsTotalUsed, stats.StatPlotsDiskUsed, stats.StatPlotsDiskFree, - stats.StatPlottingTotalUsed, stats.StatPlottingDiskUsed, stats.StatPlottingDiskFree, ] + stats.StatPlottingTotalUsed, stats.StatPlottingDiskUsed, stats.StatPlottingDiskFree, + stats.StatContainerMemoryUsageGib, stats.StatHostMemoryUsagePercent, ] # Also delete memory stats def delete_old_stats(): try: diff --git a/api/schedules/status_worker.py b/api/schedules/status_worker.py index e690af7b..4f3da524 100644 --- a/api/schedules/status_worker.py +++ b/api/schedules/status_worker.py @@ -80,4 +80,9 @@ def gather_services_status(): memory_usage = globals.get_container_memory_usage_bytes() if memory_usage: response['container_memory_usage_bytes'] = memory_usage + if blockchain == 'chia': # Only Chia container records host memory usage + host_memory_usage_percent = globals.get_host_memory_usage_percent() + if host_memory_usage_percent: + response['host_memory_usage_percent'] = host_memory_usage_percent + app.logger.info(response) return json.dumps(response) diff --git a/api/views/workers/resources.py b/api/views/workers/resources.py index ea9c299d..4cd9d26c 100644 --- a/api/views/workers/resources.py +++ b/api/views/workers/resources.py @@ -1,4 +1,5 @@ import datetime as dt +import json import pytz import os @@ -9,6 +10,7 @@ from api.extensions.api import Blueprint, SQLCursorPage from common.extensions.database import db from common.models import Worker +from common.models.stats import StatContainerMemoryUsageGib, StatHostMemoryUsagePercent from .schemas import WorkerSchema, WorkerQueryArgsSchema @@ -47,6 +49,17 @@ def post(self, new_item, hostname, port): WorkerSchema().update(item, new_item) else: # insert item = Worker(**new_item) + try: + created_at = dt.datetime.now().strftime("%Y%m%d%H%M") + hostname = new_item['hostname'] + blockchain = new_item['blockchain'] + services = json.loads(item.services) + if 'container_memory_usage_bytes' in services: + self.save_container_memory_usage(hostname, blockchain, services['container_memory_usage_bytes'], created_at) + if 'host_memory_usage_percent' in services: + self.save_host_memory_usage(hostname, blockchain, services['host_memory_usage_percent'], created_at) + except Exception as ex: + app.logger.error("Failed to record memory statistic from worker status due to: {0}".format(str(ex))) db.session.add(item) db.session.commit() return item @@ -59,3 +72,22 @@ def delete(self, hostname, port): blp.check_etag(item, WorkerSchema) db.session.delete(item) db.session.commit() + + def save_container_memory_usage(self, hostname, blockchain, mem_bytes, created_at): + item = StatContainerMemoryUsageGib(**{ + 'hostname': hostname, + 'blockchain': blockchain, + 'value': mem_bytes, + 'created_at': created_at + }) + db.session.add(item) + db.session.commit() + + def save_host_memory_usage(self, hostname, blokchain, pct_used, created_at): + item = StatHostMemoryUsagePercent(**{ + 'hostname': hostname, + 'value': pct_used, + 'created_at': created_at + }) + db.session.add(item) + db.session.commit() diff --git a/common/config/globals.py b/common/config/globals.py index b75c26c3..9d9abc4b 100644 --- a/common/config/globals.py +++ b/common/config/globals.py @@ -520,3 +520,21 @@ def get_container_memory_usage_bytes(): except Exception as ex: logging.error("Failed to read current container memory usage in bytes due to: {0}".format(str(ex))) return None + +def get_host_memory_usage_percent(): + try: + total_mem = None + avail_mem = None + with open("/proc/meminfo", "r") as f: + for line in f.readlines(): + if line.startswith('MemTotal:'): + #logging.error("{0} -> {1}".format(line, line.split(':')[1].strip().split(' ')[0])) + total_mem = int(line.split(':')[1].strip().split(' ')[0]) + elif line.startswith('MemAvailable:'): + #logging.error("{0} -> {1}".format(line, line.split(':')[1].strip().split(' ')[0])) + avail_mem = int(line.split(':')[1].strip().split(' ')[0]) + if total_mem and avail_mem: + return 100 - int(avail_mem / total_mem * 100) # Used memory percentage + except Exception as ex: + logging.error("Failed to calculate total host memory usage percentage due to: {0}".format(str(ex))) + return None diff --git a/common/models/stats.py b/common/models/stats.py index 74c51589..54c364c1 100644 --- a/common/models/stats.py +++ b/common/models/stats.py @@ -158,3 +158,22 @@ class StatTotalBalance(db.Model): value = db.Column(db.REAL) currency = db.Column(db.String()) created_at = db.Column(db.String()) + +class StatContainerMemoryUsageGib(db.Model): + __bind_key__ = 'stat_container_mem_gib' + __tablename__ = "stat_container_mem_gib" + + id = db.Column(db.Integer, primary_key=True) + hostname = db.Column(db.String()) + blockchain = db.Column(db.String(length=64), nullable=False) + value = db.Column(db.Integer) + created_at = db.Column(db.String()) + +class StatHostMemoryUsagePercent(db.Model): + __bind_key__ = 'stat_host_mem_pct' + __tablename__ = "stat_host_mem_pct" + + id = db.Column(db.Integer, primary_key=True) + hostname = db.Column(db.String()) + value = db.Column(db.Integer) + created_at = db.Column(db.String()) diff --git a/common/models/workers.py b/common/models/workers.py index fc218bf8..fe5c3d8e 100644 --- a/common/models/workers.py +++ b/common/models/workers.py @@ -65,9 +65,9 @@ def monitoring_status(self): except: return "unknown" - def container_memory_usage_gb(self): + def container_memory_usage_gib(self): try: - return "{:.2f} GB".format(int(j.loads(self.services)['container_memory_usage_bytes']) / 1024 / 1024 / 1024) + return "{:.2f} GiB".format(int(j.loads(self.services)['container_memory_usage_bytes']) / 1024 / 1024 / 1024) except Exception as ex: return '' diff --git a/web/actions/stats.py b/web/actions/stats.py index 28fd48b0..e516b0d1 100644 --- a/web/actions/stats.py +++ b/web/actions/stats.py @@ -26,7 +26,8 @@ from common.models.partials import Partial from common.models.stats import StatPlotCount, StatPlotsSize, StatTotalCoins, StatNetspaceSize, StatTimeToWin, \ StatPlotsTotalUsed, StatPlotsDiskUsed, StatPlotsDiskFree, StatPlottingTotalUsed, StatEffort, \ - StatPlottingDiskUsed, StatPlottingDiskFree, StatFarmedBlocks, StatWalletBalances, StatTotalBalance + StatPlottingDiskUsed, StatPlottingDiskFree, StatFarmedBlocks, StatWalletBalances, StatTotalBalance, \ + StatContainerMemoryUsageGib, StatHostMemoryUsagePercent from web import app, db, utils from web.actions import chia, worker @@ -474,6 +475,46 @@ def load_total_balances(current_currency_symbol): return { 'title': _('Wallets Total') + ' (' + current_currency_symbol + ')', 'y_axis_title': _('Fiat Currency'), 'dates': dates, 'vals': values, 'last_value': " - {0} {1}".format(last_value, current_currency_symbol) } +def load_host_memory_usage(): + dates = [] + workers = {} + displaynames_for_hosts = {} + result = db.session.query(StatHostMemoryUsagePercent).order_by(StatHostMemoryUsagePercent.created_at.asc()).all() + for p in result: + converted_date = converters.convert_date_for_luxon(p.created_at) + if not converted_date in dates: + dates.append(converted_date) + if p.hostname in displaynames_for_hosts: + displayname = displaynames_for_hosts[p.hostname] + else: + try: + w = worker.get_worker(p.hostname) + displayname = w.displayname + except: + app.logger.debug("Failed to find worker for hostname: {0}".format(p.hostname)) + displayname = p.hostname + if not displayname in workers: + workers[displayname] = {} + values = workers[displayname] + values[converted_date] = p.value # Integer as percent of all host memory used + values_per_worker = {} + if len(dates) > 0: + for wk in workers.keys(): + worker_values = [] + for date in dates: + if wk in workers: + if date in workers[wk]: + worker_values.append(str(workers[wk][date])) + else: # Due to exeception reported by one user + worker_values.append('null') + else: + worker_values.append('null') + values_per_worker[wk] = worker_values + #app.logger.info(dates) + #app.logger.info(values_per_worker) + return {'y_axis_title': _('Host Memory Usage') + ' (%)', + 'dates': dates, "workers": workers.keys(), "values_per_worker": values_per_worker } + def load_netspace_size(blockchain): dates = [] values = [] @@ -503,7 +544,7 @@ def load_farmed_blocks(blockchain): w = worker.get_worker(row.hostname) displayname = w.displayname except: - app.logger.debug("Failed to find worker for hostname: {0}".format(ResourceWarning.hostname)) + app.logger.debug("Failed to find worker for hostname: {0}".format(w.hostname)) displayname = row.hostname blocks.append({ 'hostname': displayname, @@ -621,6 +662,31 @@ def load_time_to_win(blockchain): return { 'title': blockchain.capitalize() + ' - ' + _('ETW'), 'dates': dates, 'vals': converted_values, 'y_axis_title': _('Estimated Time to Win') + ' (' + _('days') + ')'} +def load_container_memory(hostname, blockchain): + dates = [] + values = [] + result = db.session.query(StatContainerMemoryUsageGib).order_by(StatContainerMemoryUsageGib.created_at.asc()).filter( + StatContainerMemoryUsageGib.hostname == hostname, StatContainerMemoryUsageGib.blockchain == blockchain).all() + for i in range(len(result)): + s = result[i] + converted_date = converters.convert_date_for_luxon(s.created_at) + # First, last, and every 5th (at ~2x5 min intervals) + if (i == 0) or (i % 5 == 0) or (i == len(result) - 1): + dates.append(converted_date) + values.append(s.value) + app.logger.debug("{0} before {1}".format(blockchain, values)) + if len(values) > 0: + converted_values = list(map(lambda x: round(x/1024/1024/1024,2), values)) # Bytes to GiB + else: + converted_values = [] + app.logger.debug("{0} after {1}".format(blockchain, converted_values)) + try: + displayname = worker.get_worker(hostname).displayname + except: + displayname = hostname + return { 'title': blockchain.capitalize() + ' - ' + _('Container Memory Usage') + ' - ' + displayname, 'dates': dates, 'vals': converted_values, + 'y_axis_title': _('GiB') } + def count_plots_by_type(hostname): plots_by_type = {} result = db.session.query(Plot.type, func.count(Plot.hostname)).filter(Plot.hostname==hostname).group_by(Plot.type).all() @@ -656,3 +722,40 @@ def set_disk_usage_per_farmer(farmers, disk_usage): else: app.logger.info("No disk usage stats found for {0}".format(farmer.hostname)) farmer.drive_usage = "" # Empty string to report + +def load_recent_mem_usage(worker_type, only_hostname=None): + summary_by_worker = {} + for host in worker.load_workers(): + hostname = host.hostname + if only_hostname and hostname != only_hostname: + continue + dates = [] + data_by_blockchain = {} + mem_result = db.session.query(StatContainerMemoryUsageGib).filter( + StatContainerMemoryUsageGib.hostname == host.hostname). \ + order_by(StatContainerMemoryUsageGib.created_at, StatContainerMemoryUsageGib.blockchain).all() + for row in mem_result: + if worker_type == 'plotting' and host.mode != 'plotter' and (host.mode == 'fullnode' and not row.blockchain in ['chia', 'chives', 'mmx']): + continue # Not a plotting container + elif worker_type == 'farming' and host.mode == 'plotter': + continue # Not a farmer or harvester + converted_date = converters.convert_date_for_luxon(row.created_at) + if not converted_date in dates: + dates.append(converted_date) + if not row.blockchain in data_by_blockchain: + data_by_blockchain[row.blockchain] = {} + data_by_blockchain[row.blockchain][converted_date] = round((row.value / 1024 / 1024 /1024), 2) + if len(dates) > 0: + summary_by_worker[hostname] = { "dates": dates, "blockchains": data_by_blockchain.keys(), } + for blockchain in data_by_blockchain.keys(): + blockchain_values = [] + for date in dates: + if blockchain in data_by_blockchain: + if date in data_by_blockchain[blockchain]: + blockchain_values.append(str(data_by_blockchain[blockchain][date])) + else: + blockchain_values.append('null') + else: + blockchain_values.append('null') + summary_by_worker[hostname][blockchain] = blockchain_values + return summary_by_worker diff --git a/web/default_settings.py b/web/default_settings.py index c29da506..752c281f 100644 --- a/web/default_settings.py +++ b/web/default_settings.py @@ -36,6 +36,8 @@ class DefaultConfig: 'stat_farmed_blocks': 'sqlite:////root/.chia/machinaris/dbs/stat_farmed_blocks.db', 'stat_wallet_balances': 'sqlite:////root/.chia/machinaris/dbs/stat_wallet_balances.db', 'stat_total_balance': 'sqlite:////root/.chia/machinaris/dbs/stat_total_balance.db', + '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 CONTROLLER_SCHEME = 'http' diff --git a/web/routes.py b/web/routes.py index 996a295f..67cb1f11 100644 --- a/web/routes.py +++ b/web/routes.py @@ -110,6 +110,9 @@ def chart(): elif chart_type == 'timetowin': chart_data = stats.load_time_to_win(blockchain) return render_template('charts/timetowin.html', reload_seconds=120, global_config=gc, chart_data=chart_data, lang=get_lang(request)) + elif chart_type == 'container_memory': + chart_data = stats.load_container_memory(request.args.get('hostname'), blockchain) + return render_template('charts/container_memory.html', reload_seconds=120, global_config=gc, chart_data=chart_data, lang=get_lang(request)) @app.route('/summary', methods=['GET', 'POST']) def summary(): @@ -195,7 +198,8 @@ def plotting_workers(): return redirect(url_for('plotting_workers')) # Force a redirect to allow time to update status plotters = plotman.load_plotters() disk_usage = stats.load_recent_disk_usage('plotting') - return render_template('plotting/workers.html', plotters=plotters, disk_usage=disk_usage, global_config=gc) + mem_usage = stats.load_recent_mem_usage('plotting') + return render_template('plotting/workers.html', plotters=plotters, disk_usage=disk_usage, mem_usage=mem_usage, global_config=gc) @app.route('/farming/plots') def farming_plots(): @@ -227,8 +231,9 @@ def farming_workers(): daily_summaries = stats.load_daily_farming_summaries(farmers) disk_usage = stats.load_current_disk_usage('plots') stats.set_disk_usage_per_farmer(farmers, disk_usage) + mem_usage = stats.load_recent_mem_usage('farming') return render_template('farming/workers.html', farmers=farmers, - daily_summaries=daily_summaries, disk_usage=disk_usage, + daily_summaries=daily_summaries, disk_usage=disk_usage, mem_usage=mem_usage, MAX_COLUMNS_ON_CHART=stats.MAX_ALLOWED_PATHS_ON_BAR_CHART, global_config=gc) @@ -310,8 +315,9 @@ def workers(): if request.form.get('action') == "prune": worker.prune_workers_status(request.form.getlist('worker')) wkrs = worker.load_worker_summary() + chart_data = stats.load_host_memory_usage() return render_template('workers.html', reload_seconds=120, - workers=wkrs, global_config=gc, lang=get_lang(request)) + workers=wkrs, global_config=gc, chart_data=chart_data, lang=get_lang(request)) @app.route('/worker', methods=['GET']) def worker_route(): @@ -322,9 +328,10 @@ def worker_route(): plotting = plotman.load_plotting_summary(hostname=hostname) plots_disk_usage = stats.load_current_disk_usage('plots',hostname=hostname) plotting_disk_usage = stats.load_current_disk_usage('plotting',hostname=hostname) + mem_usage = stats.load_recent_mem_usage('all', only_hostname=hostname) warnings = worker.generate_warnings(wkr) return render_template('worker.html', worker=wkr, - plotting=plotting, plots_disk_usage=plots_disk_usage, + plotting=plotting, mem_usage=mem_usage, plots_disk_usage=plots_disk_usage, plotting_disk_usage=plotting_disk_usage, warnings=warnings, global_config=gc, MAX_COLUMNS_ON_CHART=stats.MAX_ALLOWED_PATHS_ON_BAR_CHART, lang=get_lang(request)) diff --git a/web/templates/charts/container_memory.html b/web/templates/charts/container_memory.html new file mode 100644 index 00000000..c3b25b2b --- /dev/null +++ b/web/templates/charts/container_memory.html @@ -0,0 +1,126 @@ + + + + + + + + + + + {{ chart_data.title }} + {% if reload_seconds %} + + {% endif %} + + + + + + + +
+ +
+ +
Loaded at: {{ global_config.now }}
+ + + + + + + + + + diff --git a/web/templates/farming/workers.html b/web/templates/farming/workers.html index 31a56fa4..beb7561e 100644 --- a/web/templates/farming/workers.html +++ b/web/templates/farming/workers.html @@ -128,6 +128,18 @@

{{ blockchain|capitalize }} - {{_('Daily Summary')}}

+
+
+ {% if mem_usage[farmer.hostname] %} + + {% else %} + {% autoescape false %} +

{{_('No memory usage stats recorded recently for %(hostname)s with Chia blockchain. Please ensure the Chia worker is reporting into the controller on the Workers page.', hostname=farmer.hostname)}} +

+ {% endautoescape %} + {% endif %} +
+
{% if disk_usage[farmer.hostname] %} @@ -153,11 +165,23 @@

{{ blockchain|capitalize }} - {{_('Daily Summary')}}

- Chart.register(ChartDataLabels); - + const COLORS = [ + '#3aac59', + '#4dc9f6', + '#f67019', + '#f53794', + '#537bc4', + '#acc236', + '#166a8f', + '#00a950', + '#58595b', + '#8549ba' + ]; + function color(index) { + return COLORS[index % COLORS.length]; + } {% for farmer in farmers %} {% if disk_usage[farmer.hostname] %} - {% endif %} {% endfor %} + {% endblock %} \ No newline at end of file diff --git a/web/templates/plotting/workers.html b/web/templates/plotting/workers.html index 4d7718b7..88eb2f12 100644 --- a/web/templates/plotting/workers.html +++ b/web/templates/plotting/workers.html @@ -178,6 +178,18 @@
{{ plotter.displayname }}
+
+
+ {% if mem_usage[plotter.hostname] %} + + {% else %} +

+ No Docker container memory usage recorded recently for {{plotter.hostname}}. + Also ensure the worker is reporting into the controller on the Workers page. +

+ {% endif %} +
+
{% if disk_usage[plotter.hostname] %} @@ -216,10 +228,8 @@
{{ plotter.displayname }}
function color(index) { return COLORS[index % COLORS.length]; } - {% for plotter in plotters %} {% if disk_usage[plotter.hostname] %} - - {% endif %} - {% endfor %} {% endblock %} \ No newline at end of file diff --git a/web/templates/wallet.html b/web/templates/wallet.html index c2e404e7..4c4a61c3 100644 --- a/web/templates/wallet.html +++ b/web/templates/wallet.html @@ -364,7 +364,7 @@
{{_('You can also try running "chia wallet show" on your fullnode\'s in-cont return COLORS[index % COLORS.length]; } - {% if chart_data.dates|length > 0 %} + {% if chart_data.dates|length > 0 %} var ctx = document.getElementById('total_balance_chart'); var myChart = new Chart(ctx, { type: 'line', @@ -434,6 +434,6 @@
{{_('You can also try running "chia wallet show" on your fullnode\'s in-cont } } }); - {% endif %} + {% endif %} {% endblock %} \ No newline at end of file diff --git a/web/templates/worker.html b/web/templates/worker.html index 0e1bcfd3..3da543ad 100644 --- a/web/templates/worker.html +++ b/web/templates/worker.html @@ -11,7 +11,7 @@
- {{_('Worker')}} - {{ worker.displayname }} + {{_('Worker')}} - {{ worker.displayname }} - {{ worker.blockchain }} - {{ worker.mode}}
@@ -126,6 +126,13 @@
+ {% if mem_usage[worker.hostname] %} +
+
Memory Usage
+ +
+ {% endif %} + {% if plots_disk_usage[worker.hostname] %}
Plots
@@ -167,6 +174,21 @@ {% block scripts %} {% endblock %} \ No newline at end of file From 3eb1b8c58fa72d95a3122aee89719ac28c393647 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 2 Oct 2022 10:31:14 -0600 Subject: [PATCH 1011/1625] Support cgroups v2 --- CHANGELOG.md | 1 + common/config/globals.py | 9 +++++++-- web/static/landings/de_DE.txt | 2 +- web/static/landings/en.txt | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df8708ff..a9f2da50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.8.5] - 2022-10-? + - Chart memory usage per container (GiB) as well as total host memory usage (%) for OS and all apps. Add 'SYS_RAWIO' to your `docker-compose.yml` - Fixes: Enhance 'NFT Reward Recovery' tool to support v2 databases. Fix for invalid Chiadog harvester alerts. - Update: [Maize](https://github.com/Maize-Network/maize-blockchain/releases/tag/1.6.0) to v1.6.0 diff --git a/common/config/globals.py b/common/config/globals.py index 9d9abc4b..80227d9c 100644 --- a/common/config/globals.py +++ b/common/config/globals.py @@ -514,11 +514,16 @@ def wallet_running(): return False def get_container_memory_usage_bytes(): - try: + try: # Check cgroups v1 with open("/sys/fs/cgroup/memory/memory.usage_in_bytes", "r") as f: return int(f.readline()) except Exception as ex: - logging.error("Failed to read current container memory usage in bytes due to: {0}".format(str(ex))) + pass + try: # Check cgroups v2 + with open("/sys/fs/cgroup/memory.current", "r") as f: + return int(f.readline()) + except Exception as ex: + pass return None def get_host_memory_usage_percent(): diff --git a/web/static/landings/de_DE.txt b/web/static/landings/de_DE.txt index 41eca535..769ceb3e 100644 --- a/web/static/landings/de_DE.txt +++ b/web/static/landings/de_DE.txt @@ -51,4 +51,4 @@ Wenn sich der Staubsturm legt... (zu früh?) Bitte CD2 einlegen und irgendeine taste drücken... Error in Error reporting, cannot Error @$Error. Starting Log4j in 3... 2... 1... Du hättest auch Grafikkarten kaufen können -1337.png +1337.png \ No newline at end of file diff --git a/web/static/landings/en.txt b/web/static/landings/en.txt index e7eb2a03..826738a9 100644 --- a/web/static/landings/en.txt +++ b/web/static/landings/en.txt @@ -64,5 +64,5 @@ Power surge! Is your UPS working? Light out! Are your hard drives with bad sectors now? Light out! Does the system still boot? Light out! Lets replot again! -I wish daddy had given me an UPS last Christmas, now my hard drives are all dead! -1337.png \ No newline at end of file +1337.png +You said 'Buy Crypto'! No... I said 'Bye Crypto' \ No newline at end of file From 78d5bd6d108b907b30e1304dff647ea7c3e05efc Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 3 Oct 2022 10:30:46 -0600 Subject: [PATCH 1012/1625] Move to WatchedFileHandler and use logroate instead. --- api/log.conf | 4 ++-- api/schedules/log_rotate.py | 1 + api/schedules/status_worker.py | 2 +- scripts/machinaris_install.sh | 11 +++++++++++ web/log.conf | 4 ++-- web/templates/workers.html | 3 +++ 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/api/log.conf b/api/log.conf index d913744a..e9e585de 100644 --- a/api/log.conf +++ b/api/log.conf @@ -26,9 +26,9 @@ propagate=1 qualname=gunicorn.access [handler_server_file] -class=logging.handlers.TimedRotatingFileHandler +class=logging.handlers.WatchedFileHandler formatter=generic -args=('/root/.chia/machinaris/logs/apisrv.log', 'midnight', 1, 10, 'utf-8') +args=('/root/.chia/machinaris/logs/apisrv.log', 'a', 'utf-8') [handler_null] class=NullHandler diff --git a/api/schedules/log_rotate.py b/api/schedules/log_rotate.py index b5b43a30..85587f3a 100644 --- a/api/schedules/log_rotate.py +++ b/api/schedules/log_rotate.py @@ -11,6 +11,7 @@ MAX_LOG_SIZE_MB = 20 LOG_ROTATE_CONFIG_DIR = '/etc/logrotate.d/' LOG_ROTATE_CONFIGS = [ + 'machinaris', 'farmr', 'mmx-node', ] diff --git a/api/schedules/status_worker.py b/api/schedules/status_worker.py index 4f3da524..d22b44de 100644 --- a/api/schedules/status_worker.py +++ b/api/schedules/status_worker.py @@ -84,5 +84,5 @@ def gather_services_status(): host_memory_usage_percent = globals.get_host_memory_usage_percent() if host_memory_usage_percent: response['host_memory_usage_percent'] = host_memory_usage_percent - app.logger.info(response) + #app.logger.info(response) return json.dumps(response) diff --git a/scripts/machinaris_install.sh b/scripts/machinaris_install.sh index 151d9796..bce38545 100644 --- a/scripts/machinaris_install.sh +++ b/scripts/machinaris_install.sh @@ -12,3 +12,14 @@ venv/bin/pip3 install -r /machinaris/docker/requirements.txt cp -f /machinaris/docker/entrypoint.sh /chia-blockchain/ chmod 755 /machinaris/scripts/* /chia-blockchain/entrypoint.sh + +tee /etc/logrotate.d/machinaris >/dev/null <{{_('For more, see the Machinaris %(wiki_link_open)swiki%(wiki_link_close)s. } }, beginAtZero: true, + max: 100, + steps: 10, + stepValue: 5, title: { display: true, text: "{{ chart_data.y_axis_title }}", From 4d70fba48b9206bbd34169792974a87f553891a6 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 3 Oct 2022 11:15:00 -0600 Subject: [PATCH 1013/1625] Improved Workers table filtering. --- api/commands/fd_cli.py | 2 +- scripts/fd-cli_setup.sh | 9 +++++++++ web/actions/stats.py | 14 ++++++++++---- web/routes.py | 2 +- web/templates/workers.html | 32 ++++++++++++++++++++++++++++---- 5 files changed, 49 insertions(+), 10 deletions(-) diff --git a/api/commands/fd_cli.py b/api/commands/fd_cli.py index 438ff77d..38e023a1 100644 --- a/api/commands/fd_cli.py +++ b/api/commands/fd_cli.py @@ -20,7 +20,7 @@ def reward_recovery(wallet_id, launcher_id, pool_contract_address): if not rpc_port: app.logger.info("Skipping NFT reward recovery on unsupported blockchain: {0}".format(blockchain)) return - logfile = "/root/.chia/machinaris/logs/fd-cli.log" + logfile = "/root/.chia/machinaris/logs/rewards.log" log_fd = os.open(logfile, os.O_RDWR | os.O_CREAT) log_fo = os.fdopen(log_fd, "a+") vars = {} diff --git a/scripts/fd-cli_setup.sh b/scripts/fd-cli_setup.sh index 7249f88a..97684db9 100644 --- a/scripts/fd-cli_setup.sh +++ b/scripts/fd-cli_setup.sh @@ -17,5 +17,14 @@ if [[ ${mode} == 'fullnode' ]]; then cp requirements_${codename}.txt requirements.txt cp setup_${codename}.py setup.py pip install -e . --extra-index-url https://pypi.chia.net/simple/ + + # v0.8.5 - upgrade to new log file name + if [[ -f /root/.chia/machinaris/logs/fd-cli.log ]]; then + if [[ -f /root/.chia/machinaris/logs/rewards.log ]]; then + rm -f /root/.chia/machinaris/logs/fd-cli.log + else # Save old log + mv /root/.chia/machinaris/logs/fd-cli.log /root/.chia/machinaris/logs/rewards.log + fi + fi fi fi \ No newline at end of file diff --git a/web/actions/stats.py b/web/actions/stats.py index e516b0d1..edf52027 100644 --- a/web/actions/stats.py +++ b/web/actions/stats.py @@ -723,7 +723,7 @@ def set_disk_usage_per_farmer(farmers, disk_usage): app.logger.info("No disk usage stats found for {0}".format(farmer.hostname)) farmer.drive_usage = "" # Empty string to report -def load_recent_mem_usage(worker_type, only_hostname=None): +def load_recent_mem_usage(worker_type, only_hostname=None, only_blockchain=None): summary_by_worker = {} for host in worker.load_workers(): hostname = host.hostname @@ -731,9 +731,14 @@ def load_recent_mem_usage(worker_type, only_hostname=None): continue dates = [] data_by_blockchain = {} - mem_result = db.session.query(StatContainerMemoryUsageGib).filter( - StatContainerMemoryUsageGib.hostname == host.hostname). \ - order_by(StatContainerMemoryUsageGib.created_at, StatContainerMemoryUsageGib.blockchain).all() + if only_blockchain: + mem_result = db.session.query(StatContainerMemoryUsageGib).filter( + StatContainerMemoryUsageGib.hostname == host.hostname, StatContainerMemoryUsageGib.blockchain == only_blockchain). \ + order_by(StatContainerMemoryUsageGib.created_at, StatContainerMemoryUsageGib.blockchain).all() + else: # all blockchains on that hostname + mem_result = db.session.query(StatContainerMemoryUsageGib).filter( + StatContainerMemoryUsageGib.hostname == host.hostname). \ + order_by(StatContainerMemoryUsageGib.created_at, StatContainerMemoryUsageGib.blockchain).all() for row in mem_result: if worker_type == 'plotting' and host.mode != 'plotter' and (host.mode == 'fullnode' and not row.blockchain in ['chia', 'chives', 'mmx']): continue # Not a plotting container @@ -757,5 +762,6 @@ def load_recent_mem_usage(worker_type, only_hostname=None): blockchain_values.append('null') else: blockchain_values.append('null') + # TODO Decimate the memory usage datapoints as too many being returned... summary_by_worker[hostname][blockchain] = blockchain_values return summary_by_worker diff --git a/web/routes.py b/web/routes.py index 67cb1f11..c5cc4dd5 100644 --- a/web/routes.py +++ b/web/routes.py @@ -328,7 +328,7 @@ def worker_route(): plotting = plotman.load_plotting_summary(hostname=hostname) plots_disk_usage = stats.load_current_disk_usage('plots',hostname=hostname) plotting_disk_usage = stats.load_current_disk_usage('plotting',hostname=hostname) - mem_usage = stats.load_recent_mem_usage('all', only_hostname=hostname) + mem_usage = stats.load_recent_mem_usage('all', only_hostname=hostname, only_blockchain=blockchain) warnings = worker.generate_warnings(wkr) return render_template('worker.html', worker=wkr, plotting=plotting, mem_usage=mem_usage, plots_disk_usage=plots_disk_usage, diff --git a/web/templates/workers.html b/web/templates/workers.html index 944e3d6c..7287ae50 100644 --- a/web/templates/workers.html +++ b/web/templates/workers.html @@ -63,10 +63,9 @@ {% for worker in workers.workers %} - + {{ worker.hostname }}|{{ worker.blockchain }}|{{ worker.port }} {{worker.displayname}} - {{worker.blockchain}} + {{worker.blockchain}} {{worker.mode}} {{worker.container_memory_usage_gib()}} {{_('For more, see the Machinaris %(wiki_link_open)swiki%(wiki_link_close)s. "pageLength": 25, "lengthMenu": [ [25, 50, 100, 200, -1], [25, 50, 100, 200, "All"] ], "order": [[1, "asc"]], - "columnDefs": [{ "orderable": false, targets: [0,8] }], + "columnDefs": [ + { + targets: [0], "orderable": false, + "render": function ( data, type, row, meta ) { + console.log(row); + arr = data.split('|'); + hostname = arr[0]; + blockchain = arr[1]; + port = arr[2]; + return ''; + } + }, + { + targets: [2], "orderable": true, + "render": function ( data, type, row, meta ) { + console.log(row); + var url = "{{ url_for('worker_route') }}"; + arr = row[0].split('|'); + hostname = arr[0]; + blockchain = arr[1]; + port = arr[2]; + return '' + data +''; + } + }, + { "orderable": false, targets: [8] }, + ], {% if lang != 'en' %} "language": { "url": "{{ url_for('static', filename='3rd_party/i18n/datatables.'+lang+'.json') }}" From 466e2b3d11cca6ef9faacf523eda8c9c21931065 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 3 Oct 2022 15:40:01 -0600 Subject: [PATCH 1014/1625] Fork forktools. --- scripts/forktools_setup.sh | 6 +++--- web/templates/workers.html | 16 +++++++++++----- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/scripts/forktools_setup.sh b/scripts/forktools_setup.sh index 4ccdcdad..d48f998f 100644 --- a/scripts/forktools_setup.sh +++ b/scripts/forktools_setup.sh @@ -3,12 +3,12 @@ # Installs forktools - https://github.com/Qwinn1/forktools # -# On 2021-12-01 -HASH=5df93f705f650cbd1379eee21efaeef8f6dc262a +FORKTOOLS_BRANCH=testing + if [[ "${forktools_skip_build}" != 'true' ]]; then if [[ (${mode} == 'fullnode' || ${mode} =~ "harvester") && ${blockchains} != 'mmx' ]]; then cd / - git clone https://github.com/Qwinn1/forktools + git clone --branch ${FORKTOOLS_BRANCH} git@github.com:guydavis/forktools.git cd forktools bash installft.sh git checkout $HASH > /dev/null diff --git a/web/templates/workers.html b/web/templates/workers.html index 7287ae50..bbda0bf4 100644 --- a/web/templates/workers.html +++ b/web/templates/workers.html @@ -87,8 +87,7 @@ {% endif %} {{worker.ping_success_at | datetimefilter}} - {{worker.versions.machinaris}} + {{worker.versions.machinaris}}|{{worker.versions.components}} {% if worker.mode == "fullnode" and worker.blockchain == "chia" %} @@ -163,7 +162,6 @@
{{_('For more, see the Machinaris %(wiki_link_open)swiki%(wiki_link_close)s. { targets: [0], "orderable": false, "render": function ( data, type, row, meta ) { - console.log(row); arr = data.split('|'); hostname = arr[0]; blockchain = arr[1]; @@ -174,7 +172,6 @@
{{_('For more, see the Machinaris %(wiki_link_open)swiki%(wiki_link_close)s. { targets: [2], "orderable": true, "render": function ( data, type, row, meta ) { - console.log(row); var url = "{{ url_for('worker_route') }}"; arr = row[0].split('|'); hostname = arr[0]; @@ -183,7 +180,16 @@
{{_('For more, see the Machinaris %(wiki_link_open)swiki%(wiki_link_close)s. return '' + data +''; } }, - { "orderable": false, targets: [8] }, + { + targets: [8], "orderable": true, + "render": function ( data, type, row, meta ) { + arr = data.split('|'); + machinaris_version = arr[0]; + component_versions = arr[1]; + return ''+machinaris_version+''; + } + }, + { "orderable": false, targets: [9] }, ], {% if lang != 'en' %} "language": { From 18de79b7480ccc5b8fc53e1c684313483a436742 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 3 Oct 2022 16:43:22 -0600 Subject: [PATCH 1015/1625] Forktools git url. --- scripts/forktools_setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/forktools_setup.sh b/scripts/forktools_setup.sh index d48f998f..84fd0864 100644 --- a/scripts/forktools_setup.sh +++ b/scripts/forktools_setup.sh @@ -8,7 +8,7 @@ FORKTOOLS_BRANCH=testing if [[ "${forktools_skip_build}" != 'true' ]]; then if [[ (${mode} == 'fullnode' || ${mode} =~ "harvester") && ${blockchains} != 'mmx' ]]; then cd / - git clone --branch ${FORKTOOLS_BRANCH} git@github.com:guydavis/forktools.git + git clone --branch ${FORKTOOLS_BRANCH} https://github.com/guydavis/forktools.git cd forktools bash installft.sh git checkout $HASH > /dev/null From c07b3bee255916bf51bf1abcf602556f772f6622 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 4 Oct 2022 14:31:18 -0600 Subject: [PATCH 1016/1625] MMX updated to testnet7 --- .github/workflows/develop-apple.yaml | 1 + .github/workflows/develop-bpx.yaml | 1 + .github/workflows/develop-btcgreen.yaml | 1 + .github/workflows/develop-cactus.yaml | 1 + .github/workflows/develop-chia.yaml | 1 + .github/workflows/develop-chinilla.yaml | 1 + .github/workflows/develop-flax.yaml | 1 + .github/workflows/develop-littlelambocoin.yaml | 1 + .github/workflows/develop-maize.yaml | 1 + .github/workflows/develop-shibgreen.yaml | 1 + .github/workflows/develop-wheat.yaml | 1 + CHANGELOG.md | 2 +- api/gunicorn.conf.py | 4 ++-- common/config/blockchains.json | 4 ++-- docker/dockerfile | 2 ++ docker/entrypoint.sh | 2 +- scripts/forks/mmx_install.sh | 9 +++++---- scripts/forks/mmx_launch.sh | 18 +++++++++--------- scripts/forktools_setup.sh | 2 +- 19 files changed, 34 insertions(+), 20 deletions(-) diff --git a/.github/workflows/develop-apple.yaml b/.github/workflows/develop-apple.yaml index 661ea9a0..f5b357a1 100644 --- a/.github/workflows/develop-apple.yaml +++ b/.github/workflows/develop-apple.yaml @@ -43,6 +43,7 @@ jobs: "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" "FDCLI_BRANCH=dev" + "FORKTOOLS_BRANCH=reserved_cores" "APPLE_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-apple:develop diff --git a/.github/workflows/develop-bpx.yaml b/.github/workflows/develop-bpx.yaml index afc1e293..da350549 100644 --- a/.github/workflows/develop-bpx.yaml +++ b/.github/workflows/develop-bpx.yaml @@ -43,6 +43,7 @@ jobs: "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" "FDCLI_BRANCH=dev" + "FORKTOOLS_BRANCH=reserved_cores" "BPX_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-bpx:develop diff --git a/.github/workflows/develop-btcgreen.yaml b/.github/workflows/develop-btcgreen.yaml index f7f39214..8dfb4cdd 100644 --- a/.github/workflows/develop-btcgreen.yaml +++ b/.github/workflows/develop-btcgreen.yaml @@ -44,6 +44,7 @@ jobs: "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" "FDCLI_BRANCH=dev" + "FORKTOOLS_BRANCH=reserved_cores" "BTCGREEN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-btcgreen:develop diff --git a/.github/workflows/develop-cactus.yaml b/.github/workflows/develop-cactus.yaml index dd906b79..1c044bf5 100644 --- a/.github/workflows/develop-cactus.yaml +++ b/.github/workflows/develop-cactus.yaml @@ -44,6 +44,7 @@ jobs: "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" "FDCLI_BRANCH=dev" + "FORKTOOLS_BRANCH=reserved_cores" "CACTUS_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-cactus:develop diff --git a/.github/workflows/develop-chia.yaml b/.github/workflows/develop-chia.yaml index c328fdd9..38aa71cf 100644 --- a/.github/workflows/develop-chia.yaml +++ b/.github/workflows/develop-chia.yaml @@ -43,6 +43,7 @@ jobs: "UBUNTU_VER=jammy" "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" + "FORKTOOLS_BRANCH=reserved_cores" "CHIA_BRANCH=latest" "BLADEBIT_BRANCH=2.0.0-beta1" tags: | diff --git a/.github/workflows/develop-chinilla.yaml b/.github/workflows/develop-chinilla.yaml index 1f1562a6..5741704e 100644 --- a/.github/workflows/develop-chinilla.yaml +++ b/.github/workflows/develop-chinilla.yaml @@ -43,6 +43,7 @@ jobs: "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" "FDCLI_BRANCH=dev" + "FORKTOOLS_BRANCH=reserved_cores" "CHINILLA_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chinilla:develop diff --git a/.github/workflows/develop-flax.yaml b/.github/workflows/develop-flax.yaml index 22034ea6..d5ffab4a 100644 --- a/.github/workflows/develop-flax.yaml +++ b/.github/workflows/develop-flax.yaml @@ -44,6 +44,7 @@ jobs: "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" "FDCLI_BRANCH=dev" + "FORKTOOLS_BRANCH=reserved_cores" "FLAX_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-flax:develop diff --git a/.github/workflows/develop-littlelambocoin.yaml b/.github/workflows/develop-littlelambocoin.yaml index 2bc9e76f..ae766a14 100644 --- a/.github/workflows/develop-littlelambocoin.yaml +++ b/.github/workflows/develop-littlelambocoin.yaml @@ -43,6 +43,7 @@ jobs: "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" "FDCLI_BRANCH=dev" + "FORKTOOLS_BRANCH=reserved_cores" "LITTLELAMBOCOIN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-littlelambocoin:develop diff --git a/.github/workflows/develop-maize.yaml b/.github/workflows/develop-maize.yaml index b928392b..774d4a7f 100644 --- a/.github/workflows/develop-maize.yaml +++ b/.github/workflows/develop-maize.yaml @@ -44,6 +44,7 @@ jobs: "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" "FDCLI_BRANCH=dev" + "FORKTOOLS_BRANCH=reserved_cores" "MAIZE_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-maize:develop diff --git a/.github/workflows/develop-shibgreen.yaml b/.github/workflows/develop-shibgreen.yaml index 0931ac11..b6df5bc0 100644 --- a/.github/workflows/develop-shibgreen.yaml +++ b/.github/workflows/develop-shibgreen.yaml @@ -43,6 +43,7 @@ jobs: "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" "FDCLI_BRANCH=dev" + "FORKTOOLS_BRANCH=reserved_cores" "SHIBGREEN_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-shibgreen:develop diff --git a/.github/workflows/develop-wheat.yaml b/.github/workflows/develop-wheat.yaml index 5860dd1a..7ee87acc 100644 --- a/.github/workflows/develop-wheat.yaml +++ b/.github/workflows/develop-wheat.yaml @@ -43,6 +43,7 @@ jobs: "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" "FDCLI_BRANCH=dev" + "FORKTOOLS_BRANCH=reserved_cores" "WHEAT_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-wheat:develop diff --git a/CHANGELOG.md b/CHANGELOG.md index a9f2da50..b06d3209 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format ## [0.8.5] - 2022-10-? - Chart memory usage per container (GiB) as well as total host memory usage (%) for OS and all apps. Add 'SYS_RAWIO' to your `docker-compose.yml` - Fixes: Enhance 'NFT Reward Recovery' tool to support v2 databases. Fix for invalid Chiadog harvester alerts. - - Update: [Maize](https://github.com/Maize-Network/maize-blockchain/releases/tag/1.6.0) to v1.6.0 + - Update: [Maize](https://github.com/Maize-Network/maize-blockchain/releases/tag/1.6.0) to v1.6.0, [MMX](https://github.com/madMAx43v3r/mmx-node) to `testnet7`. ## [0.8.4] - 2022-09-21 - Scaling-Down: Optional mode where wallets are synced daily, not run 24/7. Saves ~35% memory so smaller farmers can farm more blockchains concurrently on the same machine. See Wallets page, top-right Settings. diff --git a/api/gunicorn.conf.py b/api/gunicorn.conf.py index e4d440fa..13bd4ef2 100644 --- a/api/gunicorn.conf.py +++ b/api/gunicorn.conf.py @@ -19,7 +19,7 @@ def on_starting(server): log_rotate, restart_stuck_farmer, geolocate_peers, \ stats_effort, status_warnings from common.config import globals - from common.models import pools + from common.models import pools, plottings from api.commands import websvcs @@ -73,7 +73,7 @@ def on_starting(server): scheduler.add_job(func=stats_blocks.collect, name="status_blocks", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) 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) - if globals.enabled_blockchains()[0] in ['chia', 'chives', 'mmx']: # Only get plot listing from these three blockchains + 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 scheduler.add_job(func=status_pools.update, name="status_pools", trigger='interval', seconds=JOB_FREQUENCY, jitter=JOB_JITTER) diff --git a/common/config/blockchains.json b/common/config/blockchains.json index f43cea94..6b7d888a 100644 --- a/common/config/blockchains.json +++ b/common/config/blockchains.json @@ -275,8 +275,8 @@ "name": "MMX", "symbol": "MMX" , "binary": "/mmx-node/build/mmx", - "network_path": "/root/.mmx/testnet6", - "network_name": "testnet6", + "network_path": "/root/.mmx/testnet7", + "network_name": "testnet7", "network_port": 12334, "farmer_port": 11330, "worker_port": 8940, diff --git a/docker/dockerfile b/docker/dockerfile index c24675b2..89ea4eff 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -6,6 +6,7 @@ FROM ghcr.io/guydavis/machinaris-base-${UBUNTU_VER}:${MACHINARIS_STREAM} ARG DEBIAN_FRONTEND=noninteractive ARG CHIADOG_BRANCH=main ARG FDCLI_BRANCH=master +ARG FORKTOOLS_BRANCH=testing ARG BLADEBIT_BRANCH=master ARG APPLE_BRANCH @@ -121,6 +122,7 @@ ENV XDG_CONFIG_HOME=/root/.chia ENV AUTO_PLOT=false ENV CHIADOG_BRANCH=${CHIADOG_BRANCH} ENV FDCLI_BRANCH=${FDCLI_BRANCH} +ENV FORKTOOLS_BRANCH=${FORKTOOLS_BRANCH} ENV BLADEBIT_BRANCH=${BLADEBIT_BRANCH} VOLUME [ "/id_rsa" ] diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 42b8b840..a41f0f4c 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -93,7 +93,7 @@ if /usr/bin/bash /machinaris/scripts/forks/${blockchains}_launch.sh; then /usr/bin/bash /machinaris/scripts/plotman_autoplot.sh > /tmp/plotman_autoplot.log 2>&1 # Conditionally install forktools on fullnodes - /usr/bin/bash /machinaris/scripts/forktools_setup.sh > /tmp/forktools_setup.log 2>&1 + /usr/bin/bash /machinaris/scripts/forktools_setup.sh ${FORKTOOLS_BRANCH} > /tmp/forktools_setup.log 2>&1 fi diff --git a/scripts/forks/mmx_install.sh b/scripts/forks/mmx_install.sh index 17fb4f25..18dd7bb1 100644 --- a/scripts/forks/mmx_install.sh +++ b/scripts/forks/mmx_install.sh @@ -4,16 +4,17 @@ # MMX_BRANCH=$1 -# On 2022-09-19 -HASH=1d39de976d57aae0b3655d72642bcdf110d4610c +# On 2022-10-04 +HASH=341442465b1470d8c4b57d1253eaa2e02d4b0b6c if [ -z ${MMX_BRANCH} ]; then echo 'Skipping MMX install as not requested.' else rm -rf /root/.cache apt-get update - # Install dependencies - apt-get install -y git cmake build-essential libsecp256k1-dev librocksdb-dev libsodium-dev zlib1g-dev ocl-icd-opencl-dev clinfo screen initramfs-tools ocl-icd-libopencl1 opencl-headers apt-utils libnuma1 + # 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 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/21.40/ubuntu/focal/amdgpu-install-21.40.40500-1_all.deb apt install -y ./amdgpu-install-21.40.40500-1_all.deb diff --git a/scripts/forks/mmx_launch.sh b/scripts/forks/mmx_launch.sh index f9cfa7de..e34dbe9f 100644 --- a/scripts/forks/mmx_launch.sh +++ b/scripts/forks/mmx_launch.sh @@ -28,9 +28,9 @@ if [ ! -d /root/.chia/mmx/config ]; then EOF # For a fresh install of Machinaris-MMX, disable timelord by default to save CPU usage echo false > /root/.chia/mmx/config/local/timelord -elif [ ! -d /root/.chia/mmx/config/testnet6 ]; then # Handle an upgrade from older testnet +elif [ ! -d /root/.chia/mmx/config/testnet7 ]; then # Handle an upgrade from older testnet echo 'Copying over new testnet configs to /root/.chia/mmx/config/' - cp -r ./config/testnet6 /root/.chia/mmx/config/ + cp -r ./config/testnet7 /root/.chia/mmx/config/ fi rm -rf ./config ln -s /root/.chia/mmx/config /mmx-node/config @@ -54,19 +54,19 @@ else echo "No OPENCL_GPU provided. MMX blockchain will use use CPU instead." fi -# Symlink the NETWORK file, use 'testnet6' for now +# Symlink the NETWORK file, use 'testnet7' for now #if [ ! -f /root/.chia/mmx/NETWORK ]; then -echo 'testnet6' > /root/.chia/mmx/NETWORK +echo 'testnet7' > /root/.chia/mmx/NETWORK #fi rm -f ./NETWORK ln -s /root/.chia/mmx/NETWORK /mmx-node/NETWORK -# Symlink the testnet6 folder -if [ ! -d /root/.chia/mmx/testnet6 ]; then - mkdir /root/.chia/mmx/testnet6 +# Symlink the testnet7 folder +if [ ! -d /root/.chia/mmx/testnet7 ]; then + mkdir /root/.chia/mmx/testnet7 fi -rm -rf ./testnet6 -ln -s /root/.chia/mmx/testnet6 /mmx-node/testnet6 +rm -rf ./testnet7 +ln -s /root/.chia/mmx/testnet7 /mmx-node/testnet7 # Create a key if none found from previous runs if [[ ${mode} == 'fullnode' ]]; then diff --git a/scripts/forktools_setup.sh b/scripts/forktools_setup.sh index 84fd0864..63c82da3 100644 --- a/scripts/forktools_setup.sh +++ b/scripts/forktools_setup.sh @@ -3,7 +3,7 @@ # Installs forktools - https://github.com/Qwinn1/forktools # -FORKTOOLS_BRANCH=testing +FORKTOOLS_BRANCH=$1 if [[ "${forktools_skip_build}" != 'true' ]]; then if [[ (${mode} == 'fullnode' || ${mode} =~ "harvester") && ${blockchains} != 'mmx' ]]; then From 21be29ea9fdb4baad17834e45a88559edd694785 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 4 Oct 2022 15:03:01 -0600 Subject: [PATCH 1017/1625] Try with 16 character plot_id. --- api/schedules/status_plots.py | 49 +++++++++++++++++------------------ api/views/plots/resources.py | 6 ++--- web/actions/warnings.py | 2 +- 3 files changed, 28 insertions(+), 29 deletions(-) diff --git a/api/schedules/status_plots.py b/api/schedules/status_plots.py index 0b0ebbc8..7b62e1c3 100644 --- a/api/schedules/status_plots.py +++ b/api/schedules/status_plots.py @@ -31,10 +31,10 @@ 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) if match: - short_plot_id = match.group(7)[:8] + 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)) else: - short_plot_id = plot_id[2:10] + short_plot_id = plot_id[2:18] created_at = "" return [short_plot_id, dir,file,created_at] @@ -114,7 +114,7 @@ def update_chia_plots(plots_status, since): blockchain_rpc = rpc.RPC() items = [] plots_farming = blockchain_rpc.get_all_plots() - plots_by_id = {} + plots_by_filename = {} duplicate_plots = {} displaynames = {} app.logger.info("PLOT STATUS: Chia farmer RPC reports {0} total plots in this farm.".format(len(plots_farming))) @@ -130,18 +130,17 @@ def update_chia_plots(plots_status, since): displayname = plot['hostname'] displaynames[plot['hostname']] = displayname short_plot_id,dir,file,created_at = get_plot_attrs(plot['plot_id'], plot['filename']) - #app.logger.info("{0} -> {1}".format(short_plot_id, file)) duplicated_on_same_host = False - if not since and short_plot_id in plots_by_id: # Only check for duplicates on full load - if plot['hostname'] == plots_by_id[short_plot_id]['hostname']: + if not since and file in plots_by_filename: # Only check for duplicates on full load + if plot['hostname'] == plots_by_filename[file]['hostname']: app.logger.error("PLOT STATUS: Duplicate Chia plot found on same worker {0} at both {1}/{2} and {3}/{4}".format( - displayname, plots_by_id[short_plot_id]['path'], plots_by_id[short_plot_id]['file'], dir, file)) + displayname, plots_by_filename[file]['path'], plots_by_filename[file]['file'], dir, file)) duplicated_on_same_host = True else: app.logger.error("PLOT STATUS: Duplicate Chia plot found on different workers at {0}@{1}/{2} and {3}@{4}/{5}".format( - plots_by_id[short_plot_id]['worker'], plots_by_id[short_plot_id]['path'], plots_by_id[short_plot_id]['file'], displayname, dir, file)) - add_duplicate_plots(duplicate_plots, file, plot['hostname'], dir, plots_by_id[short_plot_id]['hostname'], plots_by_id[short_plot_id]['path']) - plots_by_id[short_plot_id] = { 'hostname': plot['hostname'], 'worker': displayname, 'path': dir, 'file': file } + plots_by_filename[file]['worker'], plots_by_filename[file]['path'], plots_by_filename[file]['file'], displayname, dir, file)) + add_duplicate_plots(duplicate_plots, file, plot['hostname'], dir, plots_by_filename[file]['hostname'], plots_by_filename[file]['path']) + plots_by_filename[file] = { 'hostname': plot['hostname'], 'worker': displayname, 'path': dir, 'file': file } if not duplicated_on_same_host and (not since or created_at > since): items.append(p.Plot(**{ "plot_id": short_plot_id, @@ -152,8 +151,8 @@ def update_chia_plots(plots_status, since): "file": file, "type": plot['type'], "created_at": created_at, - "plot_analyze": analyze_status(plots_status, short_plot_id), - "plot_check": check_status(plots_status, short_plot_id), + "plot_analyze": analyze_status(plots_status, short_plot_id[:8]), + "plot_check": check_status(plots_status, short_plot_id[:8]), "size": plot['file_size'] })) if items: @@ -171,7 +170,7 @@ def update_chia_plots(plots_status, since): traceback.print_exc() finally: del plots_farming - del plots_by_id + del plots_by_filename if items: del items gc.collect() @@ -191,19 +190,19 @@ def update_chives_plots(since): hostname = utils.get_hostname() plots_farming = blockchain_rpc.get_all_plots() payload = [] - plots_by_id = {} + plots_by_filename = {} for plot in plots_farming: short_plot_id,dir,file,created_at = get_plot_attrs(plot['plot_id'], plot['filename']) duplicated_on_same_host = False - if not since and short_plot_id in plots_by_id: # Only check for duplicates on full load - if plot['hostname'] == plots_by_id[short_plot_id]['hostname']: + if not since and file in plots_by_filename: # Only check for duplicates on full load + if plot['hostname'] == plots_by_filename[file]['hostname']: app.logger.error("DUPLICATE CHIVES PLOT FOUND ON SAME WORKER {0} AT BOTH {1}/{2} AND {3}/{4}".format( - plot['hostname'], plots_by_id[short_plot_id]['path'], plots_by_id[short_plot_id]['file'], dir, file)) + plot['hostname'], plots_by_filename[file]['path'], plots_by_filename[file]['file'], dir, file)) duplicated_on_same_host = True else: app.logger.error("DUPLICATE CHIVES PLOT FOUND ON DIFFERENT WORKERS AT {0}@{1}/{2} AND {3}@{4}/{5}".format( - plots_by_id[short_plot_id]['worker'], plots_by_id[short_plot_id]['path'], plots_by_id[short_plot_id]['file'], plot['hostname'], dir, file)) - plots_by_id[short_plot_id] = { 'hostname': plot['hostname'], 'worker': plot['hostname'], 'path': dir, 'file': file } + plots_by_filename[file]['worker'], plots_by_filename[file]['path'], plots_by_filename[file]['file'], plot['hostname'], dir, file)) + plots_by_filename[file] = { 'hostname': plot['hostname'], 'worker': plot['hostname'], 'path': dir, 'file': file } if not duplicated_on_same_host and not since or created_at > since: payload.append({ "plot_id": short_plot_id, @@ -232,19 +231,19 @@ def update_mmx_plots(since): hostname = utils.get_hostname() plots_farming = mmx_cli.list_plots() payload = [] - plots_by_id = {} + plots_by_filename = {} for plot in plots_farming.rows: short_plot_id,dir,file,created_at = get_plot_attrs(plot['plot_id'], plot['filename']) duplicated_on_same_host = False - if not since and short_plot_id in plots_by_id: # Only check for duplicates on full load - if plot['hostname'] == plots_by_id[short_plot_id]['hostname']: + if not since and file in plots_by_filename: # Only check for duplicates on full load + if plot['hostname'] == plots_by_filename[file]['hostname']: app.logger.error("DUPLICATE MMX PLOT FOUND ON SAME WORKER {0} AT BOTH {1}/{2} AND {3}/{4}".format( - plot['hostname'], plots_by_id[short_plot_id]['path'], plots_by_id[short_plot_id]['file'], dir, file)) + plot['hostname'], plots_by_filename[file]['path'], plots_by_filename[file]['file'], dir, file)) duplicated_on_same_host = True else: app.logger.error("DUPLICATE MMX PLOT FOUND ON DIFFERENT WORKERS AT {0}@{1}/{2} AND {3}@{4}/{5}".format( - plots_by_id[short_plot_id]['worker'], plots_by_id[short_plot_id]['path'], plots_by_id[short_plot_id]['file'], plot['hostname'], dir, file)) - plots_by_id[short_plot_id] = { 'hostname': plot['hostname'], 'worker': plot['hostname'], 'path': dir, 'file': file } + plots_by_filename[file]['worker'], plots_by_filename[file]['path'], plots_by_filename[file]['file'], plot['hostname'], dir, file)) + plots_by_filename[file] = { 'hostname': plot['hostname'], 'worker': plot['hostname'], 'path': dir, 'file': file } if not duplicated_on_same_host and not since or created_at > since: payload.append({ "plot_id": short_plot_id, diff --git a/api/views/plots/resources.py b/api/views/plots/resources.py index e0803867..7b4d52fa 100644 --- a/api/views/plots/resources.py +++ b/api/views/plots/resources.py @@ -118,10 +118,10 @@ def put(self, new_items, hostname, blockchain): # Skip any previously sent by existing plot_id if not db.session.query(Plot).filter(Plot.hostname==new_item['hostname'], Plot.plot_id==new_item['plot_id']).first(): - short_plot_id = new_item['plot_id'][:8] + short_plot_id = new_item['plot_id'] item = Plot(**new_item) - item.plot_analyze = analyze_status(plots_status, short_plot_id) - item.plot_check = check_status(plots_status, short_plot_id) + item.plot_analyze = analyze_status(plots_status, short_plot_id[:8]) + item.plot_check = check_status(plots_status, short_plot_id[:8]) items.append(item) db.session.add(item) db.session.commit() diff --git a/web/actions/warnings.py b/web/actions/warnings.py index 2c07a674..8a03c65c 100644 --- a/web/actions/warnings.py +++ b/web/actions/warnings.py @@ -86,7 +86,7 @@ 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) if match: - short_plot_id = match.group(7)[:8] + 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)) else: raise Exception("Malformed plot path/filename: {0}".format(filename)) From 7ccfd45719ce39b2b39b692467b05ffdc4ee0f3e Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 4 Oct 2022 15:09:28 -0600 Subject: [PATCH 1018/1625] Additional plot_id handling for backwards compatibility. --- api/schedules/plots_check.py | 16 ++++++++-------- web/routes.py | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api/schedules/plots_check.py b/api/schedules/plots_check.py index 3ffe044e..4c74039b 100644 --- a/api/schedules/plots_check.py +++ b/api/schedules/plots_check.py @@ -47,7 +47,7 @@ def write_status_json(status): def set_analyze_status(workers, status, plot): #app.logger.info("Checking for analyze of {0}".format(plot.plot_id)) - analyze_log = ANALYZE_LOGS + '/' + plot.plot_id + '.log' + analyze_log = ANALYZE_LOGS + '/' + plot.plot_id[:8] + '.log' analysis_seconds = None if not os.path.exists(analyze_log): [hostname, displayname, result] = request_analyze(plot.file, workers) @@ -75,11 +75,11 @@ def set_analyze_status(workers, status, plot): except Exception as ex: app.log.error("Failed to parse plotman analyze line because: {0}".format(str(ex))) app.log.error(line) - if plot.plot_id in status: - plot_state = status[plot.plot_id] + if plot.plot_id[:8] in status: + plot_state = status[plot.plot_id[:8]] else: plot_state = {} - status[plot.plot_id] = plot_state + status[plot.plot_id[:8]] = plot_state if analysis_seconds: #app.logger.info("For {0} found {1} seconds.".format(plot.plot_id, analysis_seconds)) plot_state['analyze'] = { 'host': hostname, 'seconds': analysis_seconds } @@ -113,7 +113,7 @@ def request_analyze(plot_file, workers): def set_check_status(workers, status, plot): #app.logger.info("Checking for plot check of {0}".format(plot.plot_id)) - check_log = CHECK_LOGS + '/' + plot.plot_id + '.log' + check_log = CHECK_LOGS + '/' + plot.plot_id[:8] + '.log' check_status = None requested_status = False if not os.path.exists(check_log): @@ -140,11 +140,11 @@ def set_check_status(workers, status, plot): app.log.error(line) elif "Found 1 valid plots" in line: check_status = 'GOOD' - if plot.plot_id in status: - plot_state = status[plot.plot_id] + if plot.plot_id[:8] in status: + plot_state = status[plot.plot_id[:8]] else: plot_state = {} - status[plot.plot_id] = plot_state + status[plot.plot_id[:8]] = plot_state if check_status: #app.logger.info("For {0} found {1} status.".format(plot.plot_id, check_status)) plot_state['check'] = { 'host': hostname, 'status': check_status } diff --git a/web/routes.py b/web/routes.py index c5cc4dd5..510297e8 100644 --- a/web/routes.py +++ b/web/routes.py @@ -205,10 +205,10 @@ def plotting_workers(): def farming_plots(): if request.args.get('analyze'): # Xhr with a plot_id plot_id = request.args.get('analyze') - return plotman.analyze(plot_id) + 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) + return chia.check(plot_id[:8]) gc = globals.load() farmers = chia.load_farmers() plots = chia.load_plots_farming() From 4b722f920a606daaa50e1b4d5962563ff3d00efd Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 4 Oct 2022 15:59:20 -0600 Subject: [PATCH 1019/1625] Latest version of Bootstrap --- scripts/pull_3rd_party_libs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pull_3rd_party_libs.sh b/scripts/pull_3rd_party_libs.sh index b344c381..dba2ac23 100755 --- a/scripts/pull_3rd_party_libs.sh +++ b/scripts/pull_3rd_party_libs.sh @@ -4,8 +4,8 @@ # # Bootstrap Icons -BSI_VERSION=1.8.2 -BOOTSTRAP_VERSION=5.2.1 +BSI_VERSION=1.9.1 +BOOTSTRAP_VERSION=5.2.2 BASEPATH=${JS_LIBS_BASEPATH:-/machinaris/web/static/3rd_party} # List of other css/js links From cd65ea7b283d8861da07d40483381e8813335590 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 4 Oct 2022 17:00:33 -0600 Subject: [PATCH 1020/1625] Simplify Forktools install, by fixing in upstream repo. --- scripts/forktools_setup.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/forktools_setup.sh b/scripts/forktools_setup.sh index 63c82da3..530ee2a9 100644 --- a/scripts/forktools_setup.sh +++ b/scripts/forktools_setup.sh @@ -11,7 +11,6 @@ if [[ "${forktools_skip_build}" != 'true' ]]; then git clone --branch ${FORKTOOLS_BRANCH} https://github.com/guydavis/forktools.git cd forktools bash installft.sh - git checkout $HASH > /dev/null mkdir -p /root/.chia/forktools/ftconfigs cp -n ftconfigs/* /root/.chia/forktools/ftconfigs > /dev/null @@ -27,13 +26,6 @@ if [[ "${forktools_skip_build}" != 'true' ]]; then # Now multiproc patch fullnodes to limit memory usage, but delay to offset resource crunch on launch if [[ ${mode} == 'fullnode' ]]; then - if [ ! -f /root/.chia/forktools/ftconfigs/.configured ]; then - sed -i "s/SETMAXLOGROTATION='99'/SETMAXLOGROTATION='7'/g" /root/.chia/forktools/ftconfigs/config.forkfixconfig* - sed -i "s/SETPLOTLOADFREQUENCY='18000'/SETPLOTLOADFREQUENCY='1800'/g" /root/.chia/forktools/ftconfigs/config.forkfixconfig* - sed -i "s/SETFNTARGETPEERCOUNT='80'/SETFNTARGETPEERCOUNT='20'/g" /root/.chia/forktools/ftconfigs/config.forkfixconfig* - sed -i "s/\"/'/g" /root/.chia/forktools/ftconfigs/config.forkfixconfig - touch /root/.chia/forktools/ftconfigs/.configured - fi echo 'Y' | ./forkfixconfig all sleep $[ ( $RANDOM % 300 ) + 1 ]s ./forkpatch all -multiproc || true From 4ff6d590603909eb7ce10e0b598bd9cd2aa302b1 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 4 Oct 2022 17:32:20 -0600 Subject: [PATCH 1021/1625] Update changelog for `reserved_cores` setting. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b06d3209..679a3c2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. The format ## [0.8.5] - 2022-10-? - Chart memory usage per container (GiB) as well as total host memory usage (%) for OS and all apps. Add 'SYS_RAWIO' to your `docker-compose.yml` + - Enhanced Forktools to limit a blockchain's process count, which greatly limits full_node memory usage. - Fixes: Enhance 'NFT Reward Recovery' tool to support v2 databases. Fix for invalid Chiadog harvester alerts. - Update: [Maize](https://github.com/Maize-Network/maize-blockchain/releases/tag/1.6.0) to v1.6.0, [MMX](https://github.com/madMAx43v3r/mmx-node) to `testnet7`. From b323e163a2e50b220dca0f8f7cf2970999422f7c Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 4 Oct 2022 18:53:24 -0600 Subject: [PATCH 1022/1625] Updated changelog entry. --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 679a3c2e..8e0d3a71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +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). ## [0.8.5] - 2022-10-? - - Chart memory usage per container (GiB) as well as total host memory usage (%) for OS and all apps. Add 'SYS_RAWIO' to your `docker-compose.yml` - - Enhanced Forktools to limit a blockchain's process count, which greatly limits full_node memory usage. + - Chart memory usage per container (GiB) as well as total host memory usage (%) for OS and all apps. + - Enhanced Forktools to decrease a blockchain's full_node process count, which greatly limits memory usage. - Fixes: Enhance 'NFT Reward Recovery' tool to support v2 databases. Fix for invalid Chiadog harvester alerts. - Update: [Maize](https://github.com/Maize-Network/maize-blockchain/releases/tag/1.6.0) to v1.6.0, [MMX](https://github.com/madMAx43v3r/mmx-node) to `testnet7`. From 426fbd03ff1f11642e1a28d2650750d7104fd984 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 4 Oct 2022 20:03:41 -0600 Subject: [PATCH 1023/1625] Tad as well for reserved_cores. --- .github/workflows/develop-tad.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/develop-tad.yaml b/.github/workflows/develop-tad.yaml index a90a6cfe..92ce292a 100644 --- a/.github/workflows/develop-tad.yaml +++ b/.github/workflows/develop-tad.yaml @@ -43,6 +43,7 @@ jobs: "MACHINARIS_STREAM=develop" "CHIADOG_BRANCH=dev" "FDCLI_BRANCH=dev" + "FORKTOOLS_BRANCH=reserved_cores" "TAD_BRANCH=main" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-tad:develop From 0fcaccb3b5c262e1e454420b29c0d70b92344a65 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 4 Oct 2022 21:41:19 -0600 Subject: [PATCH 1024/1625] Latest LLC. --- CHANGELOG.md | 2 +- scripts/forks/littlelambocoin_install.sh | 4 ++-- web/templates/blockchains.html | 2 +- web/templates/drives.html | 4 ++-- web/templates/summary.html | 4 ++-- web/templates/wallet.html | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e0d3a71..dd53f47e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file. The format - Chart memory usage per container (GiB) as well as total host memory usage (%) for OS and all apps. - Enhanced Forktools to decrease a blockchain's full_node process count, which greatly limits memory usage. - Fixes: Enhance 'NFT Reward Recovery' tool to support v2 databases. Fix for invalid Chiadog harvester alerts. - - Update: [Maize](https://github.com/Maize-Network/maize-blockchain/releases/tag/1.6.0) to v1.6.0, [MMX](https://github.com/madMAx43v3r/mmx-node) to `testnet7`. + - Update: [Littlelambocoin](https://github.com/BTCgreen-Network/littlelambocoin-blockchain/releases/tag/1.6.0) to v1.6.0, [Maize](https://github.com/Maize-Network/maize-blockchain/releases/tag/1.6.0) to v1.6.0, [MMX](https://github.com/madMAx43v3r/mmx-node) to `testnet7`. ## [0.8.4] - 2022-09-21 - Scaling-Down: Optional mode where wallets are synced daily, not run 24/7. Saves ~35% memory so smaller farmers can farm more blockchains concurrently on the same machine. See Wallets page, top-right Settings. diff --git a/scripts/forks/littlelambocoin_install.sh b/scripts/forks/littlelambocoin_install.sh index 0bc683e9..7188d2f3 100644 --- a/scripts/forks/littlelambocoin_install.sh +++ b/scripts/forks/littlelambocoin_install.sh @@ -4,8 +4,8 @@ # LITTLELAMBOCOIN_BRANCH=$1 -# On 2022-08-20 -HASH=8454a7093626a388364ff7425e1b9400ffbbb15a +# On 2022-10-04 +HASH=5126d3af5901aa2d59fbe4e6e2716a2b0bfc88fb if [ -z ${LITTLELAMBOCOIN_BRANCH} ]; then echo 'Skipping LittleLamboCoin install as not requested.' diff --git a/web/templates/blockchains.html b/web/templates/blockchains.html index 10c6c067..fcc0f584 100644 --- a/web/templates/blockchains.html +++ b/web/templates/blockchains.html @@ -129,7 +129,7 @@   {{_('Synced')}} {% elif blockchain.status.lower().startswith('not synced') %} - +   {{_('Not Synced')}} {% elif blockchain.status.lower().startswith('syncing') %} diff --git a/web/templates/drives.html b/web/templates/drives.html index 736c4403..58f76671 100644 --- a/web/templates/drives.html +++ b/web/templates/drives.html @@ -73,11 +73,11 @@
Temperatures
 <  °C -   +    <  °C  <  -   +  
- + +
@@ -49,6 +50,13 @@
+
@@ -65,7 +73,7 @@ {% block scripts %} + {% endblock %} \ No newline at end of file diff --git a/web/templates/plotting/workers.html b/web/templates/plotting/workers.html index 0c88fa40..2c54eeca 100644 --- a/web/templates/plotting/workers.html +++ b/web/templates/plotting/workers.html @@ -94,62 +94,13 @@ + - - - -
- {{_('Archiving')}}: - {% for plotter in plotters %} -
- - -
- {% endfor %} -
-
@@ -169,38 +120,6 @@ {% endwith %}
-
-
-
- - - - {% for column in transfers.columns %} - - {% endfor %} - - - - - {% for row in transfers.rows %} - - {% for column in transfers.columns %} - - {% endfor %} - - - {% endfor %} - -
{{ column }}
{{ row[column] }} - - - - -
-
-
-
-
{% for plotter in plotters %}
From 25f0e4732afef1e2a91e86efeff0d8261ed7f12c Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 13 Nov 2022 20:22:24 -0700 Subject: [PATCH 1093/1625] Fix for 'Import Mnemonic' due to Chia 1.6.1 breaking their CLI again. --- web/actions/chia.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/actions/chia.py b/web/actions/chia.py index 46f81dad..99a8adc3 100644 --- a/web/actions/chia.py +++ b/web/actions/chia.py @@ -260,7 +260,7 @@ def import_key(key_path, mnemonic, blockchain): with open(key_path, 'w') as keyfile: keyfile.write('{0}\n'.format(mnemonic)) time.sleep(3) - proc = Popen("{0} keys add -f {1}".format(chia_binary, key_path), stdout=PIPE, stderr=PIPE, shell=True) + proc = Popen("{0} keys add --label key_0 -f {1}".format(chia_binary, key_path), stdout=PIPE, stderr=PIPE, shell=True) try: outs, errs = proc.communicate(timeout=90) if errs: From 432256784bf68084d7d3753deaed42f39f317558 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 13 Nov 2022 20:48:54 -0700 Subject: [PATCH 1094/1625] Fix for Settings | Farming config load on fresh install. --- scripts/forks/flax_launch.sh | 6 ++++-- web/templates/settings/farming.html | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/forks/flax_launch.sh b/scripts/forks/flax_launch.sh index 2c56117d..ac0186a2 100644 --- a/scripts/forks/flax_launch.sh +++ b/scripts/forks/flax_launch.sh @@ -34,12 +34,14 @@ if [ -f /root/.flax/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}" - flax keys add -f ${k} > /dev/null + echo "Adding key #${label_num} at path: ${k}" + flax keys add -l "key_${label_num}" -f ${k} > /dev/null + ((label_num=label_num+1)) fi done diff --git a/web/templates/settings/farming.html b/web/templates/settings/farming.html index ca648989..effa2f76 100644 --- a/web/templates/settings/farming.html +++ b/web/templates/settings/farming.html @@ -108,10 +108,10 @@ endfor %} var unknown_target_addresses = []; for (target_address of target_addresses) { - if (hot_addresses.get(blockchain).includes(target_address)) { + if (hot_addresses.has(blockchain) && hot_addresses.get(blockchain).includes(target_address)) { continue; } - if (cold_addresses.get(blockchain).includes(target_address)) { + if (cold_addresses.has(blockchain) && cold_addresses.get(blockchain).includes(target_address)) { continue; } unknown_target_addresses.push(target_address); From af714d8b7c4b55eb0c3404a0861732a0fd8478dd Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 13 Nov 2022 21:17:04 -0700 Subject: [PATCH 1095/1625] Fix for Settings | Farming page. --- CHANGELOG.md | 4 ++-- web/templates/settings/farming.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a439d2fd..a7fe6a71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,14 +7,14 @@ All notable changes to this project will be documented in this file. The format - List recent plot archiving (local and remote) on Plotting | Workers page. - [Moon](https://github.com/MOONCOINTEAM/moon-blockchain) at 1.6.0 ### Changed - - Fixed broken 'Generate Key' action for Chia 1.6.1 on Setup page. Thanks @SilverFolfy + - Fixed broken 'Generate/Import Key' actions for Chia 1.6.1 on Setup page. Thanks @SilverFolfy ### 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.6.1) to v1.6.1 - [Chiadog](https://github.com/guydavis/chiadog/releases/tag/v0.7.5) to v0.7.5 - [Flax](https://github.com/Flax-Network/flax-blockchain/releases/tag/0.1.11) to v0.1.11 ### Known Issues - - + - Incorrect reward recovery calculations for some blockchains. Please use AllTheBlocks site if this affects you. ## [0.8.5] - 2022-11-03 ### Added diff --git a/web/templates/settings/farming.html b/web/templates/settings/farming.html index effa2f76..a8c73985 100644 --- a/web/templates/settings/farming.html +++ b/web/templates/settings/farming.html @@ -108,10 +108,10 @@ endfor %} var unknown_target_addresses = []; for (target_address of target_addresses) { - if (hot_addresses.has(blockchain) && hot_addresses.get(blockchain).includes(target_address)) { + if (!hot_addresses.has(blockchain) || hot_addresses.get(blockchain).includes(target_address)) { continue; } - if (cold_addresses.has(blockchain) && cold_addresses.get(blockchain).includes(target_address)) { + if (!cold_addresses.has(blockchain) || cold_addresses.get(blockchain).includes(target_address)) { continue; } unknown_target_addresses.push(target_address); From ab78cfcd246f0da20e05a32a36dc65afa19dc70e Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 13 Nov 2022 21:19:56 -0700 Subject: [PATCH 1096/1625] Fix for transfers redirect on start. --- web/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/routes.py b/web/routes.py index cffb65fc..0ef2243a 100644 --- a/web/routes.py +++ b/web/routes.py @@ -195,7 +195,7 @@ def plotting_transfers(): plotter = worker.get_worker(hostname, blockchain) if request.form.get('service') == 'archiving': plotman.stop_archiving(plotter) - return redirect(url_for('plotting_workers')) # Force a redirect to allow time to update status + return redirect(url_for('plotting_transfers')) # Force a redirect to allow time to update status plotters = plotman.load_plotters() transfers = plotman.load_archiving_summary() disk_usage = stats.load_current_disk_usage('plots') From c8280afbaea92e143b042495207442908b8dc659 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 13 Nov 2022 21:24:27 -0700 Subject: [PATCH 1097/1625] Update archiving status after a start/stop. --- api/views/actions/resources.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/views/actions/resources.py b/api/views/actions/resources.py index 0bc15b8a..4e4d2c48 100644 --- a/api/views/actions/resources.py +++ b/api/views/actions/resources.py @@ -11,7 +11,7 @@ from api.commands import chiadog_cli, chia_cli, plotman_cli, pools_cli from api.schedules import status_worker, status_plotting, status_farm, \ - status_alerts, status_connections, status_pools, status_plotnfts + status_alerts, status_connections, status_pools, status_plotnfts, status_archiving blp = Blueprint( 'Action', @@ -47,8 +47,10 @@ def post(self): # Now trigger updates after a delay time.sleep(17) status_worker.update() - if service in ["plotting", "archiving"]: + if service == "plotting": status_plotting.update() + elif service == "archiving": + status_archiving.update() elif service == "farming": status_farm.update() elif service == "networking": From 356fe5e180720bc39d99dcca9b9e081d21beaf17 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 13 Nov 2022 21:25:52 -0700 Subject: [PATCH 1098/1625] Reload archiving jobs every 2 minutes. --- web/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/routes.py b/web/routes.py index 0ef2243a..00d76542 100644 --- a/web/routes.py +++ b/web/routes.py @@ -202,7 +202,7 @@ def plotting_transfers(): farmers = chia.load_farmers() stats.set_disk_usage_per_farmer(farmers, disk_usage) return render_template('plotting/transfers.html', plotters=plotters, farmers=farmers, transfers=transfers, - disk_usage=disk_usage, global_config=gc, lang=get_lang(request)) + disk_usage=disk_usage, global_config=gc, lang=get_lang(request), reload_seconds=120) @app.route('/plotting/workers') def plotting_workers(): From 0beeaa076afd57df920990a2d63cd7983c37d8c4 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 13 Nov 2022 21:30:45 -0700 Subject: [PATCH 1099/1625] More cleanups to split Transfers and Workers pages. --- web/templates/plotting/workers.html | 117 ---------------------------- 1 file changed, 117 deletions(-) diff --git a/web/templates/plotting/workers.html b/web/templates/plotting/workers.html index 2c54eeca..59df70ca 100644 --- a/web/templates/plotting/workers.html +++ b/web/templates/plotting/workers.html @@ -2,79 +2,6 @@ {% block content %} - - - - - - - -
@@ -350,50 +277,6 @@
{{ plotter.displayname }}
}, {% endif %} }); - $("#btnConfirmStart").click(function () { - $("#btnCancelStart").prop("disabled", true); - $(this).prop("disabled", true); - $(this).html( - ` Starting...` - ); - $('#plotman-form').append(''); - $('#plotman-form').append(''); - $("#plotman-form").submit(); - }); - $("#btnConfirmStop").click(function () { - $("#btnCancelStop").prop("disabled", true); - $(this).prop("disabled", true); - $(this).html( - ` Stopping...` - ); - $('#plotman-form').append(''); - $('#plotman-form').append(''); - $("#plotman-form").submit(); - }); - var startModal = document.getElementById('startModal') - startModal.addEventListener('show.bs.modal', function (event) { - var button = event.relatedTarget - var hostname = button.getAttribute('data-bs-hostname') - var blockchain = button.getAttribute('data-bs-blockchain') - document.getElementById('hostname').value = hostname - document.getElementById('blockchain').value = blockchain - }); - var stopModal = document.getElementById('stopModal') - stopModal.addEventListener('show.bs.modal', function (event) { - var button = event.relatedTarget - var hostname = button.getAttribute('data-bs-hostname') - var blockchain = button.getAttribute('data-bs-blockchain') - document.getElementById('hostname').value = hostname - document.getElementById('blockchain').value = blockchain - }); - var disabledModal = document.getElementById('disabledModal') - disabledModal.addEventListener('show.bs.modal', function (event) { - var button = event.relatedTarget - var hostname = button.getAttribute('data-bs-hostname') - var blockchain = button.getAttribute('data-bs-blockchain') - document.getElementById('hostname').value = hostname - document.getElementById('blockchain').value = blockchain - }); }); {% endblock %} \ No newline at end of file From 8e2a97b447f6182ea65225b4dc6c3b80fed3caca Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 14 Nov 2022 10:11:32 -0700 Subject: [PATCH 1100/1625] Merged Plotman improvements. --- .github/workflows/develop-chia.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop-chia.yaml b/.github/workflows/develop-chia.yaml index 3840c9f2..3b0fa156 100644 --- a/.github/workflows/develop-chia.yaml +++ b/.github/workflows/develop-chia.yaml @@ -45,7 +45,7 @@ jobs: "CHIADOG_BRANCH=dev" "CHIA_BRANCH=release/1.6.1" "BLADEBIT_BRANCH=master" - "PLOTMAN_BRANCH=diskplot" + "PLOTMAN_BRANCH=development" tags: | ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop From 6974f2905d32f7da831d7417944ba2d8a17055fa Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 14 Nov 2022 15:04:59 -0700 Subject: [PATCH 1101/1625] Guard against malformed status.json content. --- README.md | 12 +++++++++--- api/schedules/plots_check.py | 9 ++++++--- api/schedules/status_plots.py | 9 ++++++--- api/views/plots/resources.py | 9 ++++++--- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 8cfc0d83..aeb7bf53 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ For details, see your particular platform: [Windows](https://github.com/guydavis ## Plotting View -Plotting with the [MadMax](https://github.com/madMAx43v3r/chia-plotter), [Bladebit](https://github.com/harold-b/bladebit), and [Chia™](https://github.com/Chia-Network/chia-blockchain) plotters is managed by [Plotman](https://github.com/ericaltendorf/plotman) through the Machinaris WebUI. +Plotting with the [MadMax](https://github.com/madMAx43v3r/chia-plotter), [Bladebit](https://github.com/harold-b/bladebit), and [Chia™](https://github.com/Chia-Network/chia-blockchain) plotters is managed by [Plotman](https://github.com/ericaltendorf/plotman) through the Machinaris WebUI across many machines: ![Plotting](https://raw.githubusercontent.com/guydavis/machinaris-unraid/master/docs/img/machinaris_plotting.png) @@ -16,6 +16,10 @@ Track your plotter machines performance as you fine-tune your plotting, graphed ![Speed](https://raw.githubusercontent.com/guydavis/machinaris-unraid/master/docs/img/plotting_speed_chart.png) +Archive your new plots to their final destination on local drives or on remote harvesters (via rsync): + +![Transfers](https://raw.githubusercontent.com/guydavis/machinaris-unraid/master/docs/img/archiving_transfers.png) + ## Farming View Machinaris bundles the [latest Chia™ version](https://github.com/Chia-Network/chia-blockchain/wiki/INSTALL#ubuntudebian) inside the Docker image. @@ -26,11 +30,13 @@ Machinaris also optionally farms your plots to other blockchains including [BPX] ## Alerts -[Chiadog](https://github.com/martomi/chiadog) provides monitoring of the log files, ensuring you get notified when important events occur across your farm: +[Chiadog](https://github.com/guydavis/machinaris/wiki/ChiaDog) provides monitoring of the log files, ensuring you get notified when important events occur across your farm: ![Alerts](https://raw.githubusercontent.com/guydavis/machinaris-unraid/master/docs/img/ChiaDog-1-Example.png) -Notifications can be sent to e-mail, telegram, discord, slack, etc. +[Drive health](https://github.com/guydavis/machinaris/wiki/Drives) is monitored as with `smartctl` on Linux. Notifications can be sent to e-mail, telegram, discord, slack, etc. + +![Drives](https://raw.githubusercontent.com/guydavis/machinaris-unraid/master/docs/img/drives_grid.png) ## Setup diff --git a/api/schedules/plots_check.py b/api/schedules/plots_check.py index baaee11e..e5f015db 100644 --- a/api/schedules/plots_check.py +++ b/api/schedules/plots_check.py @@ -36,9 +36,12 @@ def have_recent_plot_check_log(plot_check_log): def open_status_json(): status = {} - if os.path.exists(STATUS_FILE): - with open(STATUS_FILE, 'r+') as fp: - status = json.load(fp) + try: + if os.path.exists(STATUS_FILE): + with open(STATUS_FILE, 'r') as fp: + status = json.load(fp) + except Exception as ex: + app.logger.error("Failed to read JSON from {0} because {1}".format(STATUS_FILE, str(ex))) return status def write_status_json(status): diff --git a/api/schedules/status_plots.py b/api/schedules/status_plots.py index c25930f7..f7370d51 100644 --- a/api/schedules/status_plots.py +++ b/api/schedules/status_plots.py @@ -40,9 +40,12 @@ def get_plot_attrs(plot_id, filename): def open_status_json(): status = {} - if os.path.exists(STATUS_FILE): - with open(STATUS_FILE, 'r+') as fp: - status = json.load(fp) + try: + if os.path.exists(STATUS_FILE): + with open(STATUS_FILE, 'r') as fp: + status = json.load(fp) + except Exception as ex: + app.logger.error("Failed to read JSON from {0} because {1}".format(STATUS_FILE, str(ex))) return status def update(): diff --git a/api/views/plots/resources.py b/api/views/plots/resources.py index b5f6e82a..e7c7252a 100644 --- a/api/views/plots/resources.py +++ b/api/views/plots/resources.py @@ -26,9 +26,12 @@ def open_status_json(): status = {} - if os.path.exists(STATUS_FILE): - with open(STATUS_FILE, 'r+') as fp: - status = json.load(fp) + try: + if os.path.exists(STATUS_FILE): + with open(STATUS_FILE, 'r') as fp: + status = json.load(fp) + except Exception as ex: + app.logger.error("Failed to read JSON from {0} because {1}".format(STATUS_FILE, str(ex))) return status def analyze_status(plots_status, short_plot_id): From 4362ce8de946c400e78b2862ff9f9a71d45951bd Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Mon, 14 Nov 2022 21:39:36 -0700 Subject: [PATCH 1102/1625] Send Test Alert for Alerts page. --- CHANGELOG.md | 2 ++ api/commands/chiadog_cli.py | 28 +++++++++++++++++ web/actions/chiadog.py | 9 ++++++ web/routes.py | 6 +++- web/templates/settings/alerts.html | 49 ++++++++++++++++++++++++++++++ 5 files changed, 93 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7fe6a71..89e58132 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,11 @@ All notable changes to this project will be documented in this file. The format ## [Unreleased] ### Added - List recent plot archiving (local and remote) on Plotting | Workers page. + - Settings | Alerts page: new 'Send Test Alert' button to validate Chiadog configs. - [Moon](https://github.com/MOONCOINTEAM/moon-blockchain) at 1.6.0 ### Changed - Fixed broken 'Generate/Import Key' actions for Chia 1.6.1 on Setup page. Thanks @SilverFolfy + - Missing plots on Farming page when a status.json file was corrupted. Thanks @Yurly ### 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.6.1) to v1.6.1 diff --git a/api/commands/chiadog_cli.py b/api/commands/chiadog_cli.py index 52ca14f2..2128aaf8 100644 --- a/api/commands/chiadog_cli.py +++ b/api/commands/chiadog_cli.py @@ -3,8 +3,11 @@ # import datetime +import http +import json import os import psutil +import requests import signal import shutil import sqlite3 @@ -58,6 +61,8 @@ def dispatch_action(job): stop_chiadog() time.sleep(5) start_chiadog() + elif action == "test": + test_chiadog() else: raise Exception("Unsupported action {0} for monitoring.".format(action)) @@ -90,3 +95,26 @@ def stop_chiadog(): except: app.logger.info('Failed to stop monitoring!') app.logger.info(traceback.format_exc()) + +# If enhanced Chiadog is running within container, then its listening on http://localhost:8925 +# Example: curl -X POST http://localhost:8925 -H 'Content-Type: application/json' -d '{"type":"user", "service":"farmer", "priority":"high", "message":"Hello World"}' +def test_chiadog(debug=False): + try: + headers = {'Content-type': 'application/json', 'Accept': 'application/json'} + if debug: + http.client.HTTPConnection.debuglevel = 1 + mode = 'full_node' + if 'mode' in os.environ and 'harvester' in os.environ['mode']: + mode = 'harvester' + response = requests.post("http://localhost:8925", headers = headers, data = json.dumps( + { + "type": "user", + "service": mode, + "priority": "high", + "message": "Test alert from Machinaris!" + } + )) + except Exception as ex: + app.logger.info("Failed to notify Chiadog with test alert.") + finally: + http.client.HTTPConnection.debuglevel = 0 \ No newline at end of file diff --git a/web/actions/chiadog.py b/web/actions/chiadog.py index 357455f2..4b538f69 100644 --- a/web/actions/chiadog.py +++ b/web/actions/chiadog.py @@ -76,3 +76,12 @@ def stop_chiadog(farmer): flash(_('Failed to stop Chiadog monitoring! Please see log files.'), 'danger') else: flash(_('Chiadog monitoring stopped successfully. No notifications will be sent!'), 'success') + +def send_test_alert(farmer): + try: + utils.send_post(farmer, "/actions/", payload={"service": "monitoring","action": "test"}, debug=False) + except Exception as ex: + flash(_('Failed to contact farmer to send test alert. Please ensure the worker is running and check it\'s logs.'), 'danger') + flash(str(ex), 'warning') + else: + flash(_("Test alert has been sent. Please check notification target(s) for test success."), 'success') \ No newline at end of file diff --git a/web/routes.py b/web/routes.py index 00d76542..228a19a6 100644 --- a/web/routes.py +++ b/web/routes.py @@ -459,7 +459,11 @@ def settings_alerts(): if request.method == 'POST': selected_worker_hostname = request.form.get('worker') selected_blockchain = request.form.get('blockchain') - chiadog.save_config(worker.get_worker(selected_worker_hostname, selected_blockchain), selected_blockchain, request.form.get("config")) + selected_worker = worker.get_worker(selected_worker_hostname, selected_blockchain) + if request.form.get('action') == 'test': + chiadog.send_test_alert(selected_worker) + else: # Save config + chiadog.save_config(selected_worker, selected_blockchain, request.form.get("config")) farmers = chiadog.load_farmers() selected_worker = find_selected_worker(farmers, selected_worker_hostname, selected_blockchain) if not selected_blockchain: diff --git a/web/templates/settings/alerts.html b/web/templates/settings/alerts.html index bdafe990..ad63c324 100644 --- a/web/templates/settings/alerts.html +++ b/web/templates/settings/alerts.html @@ -2,6 +2,34 @@ {% block content %} +
+
+ {{_('Alerts')}} - config.yaml
@@ -86,6 +116,17 @@ }); //Call the function when the page loads load_config("{{selected_worker}}", "{{selected_blockchain}}"); + + var testModal = document.getElementById('testModal') + testModal.addEventListener('show.bs.modal', function (event) { + var button = event.relatedTarget + var blockchainField = document.getElementById('blockchain_field') + blockchainField.value = $("#blockchain").val() + $('#blockchain_label').text($("#blockchain option:selected").text()) + var workerField = document.getElementById('hostname_field') + workerField.value = $("#worker").val() + $('#hostname_label').text($("#worker option:selected").text()) + }) }); function update_blockchain_options(hostname) { @@ -120,5 +161,13 @@ blockchain = $("#blockchain").val() window.location.href = '/settings/config/' + worker + '_' + blockchain + 'dog_config.yaml?type=alerts&worker=' + worker + "&blockchain=" + blockchain }); + $("#btnConfirmTest").click(function () { + $("#btnCancelTest").prop("disabled", true); + $(this).prop("disabled", true); + $(this).html( + ` Sending...` + ); + $("#test-form").submit(); + }); {% endblock %} \ No newline at end of file From a261e3f76d1a8ca49110cb941c9699bec8664cc8 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 15 Nov 2022 08:56:48 -0700 Subject: [PATCH 1103/1625] Redirect after test to Alerts listing page. --- web/actions/chiadog.py | 2 +- web/routes.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/web/actions/chiadog.py b/web/actions/chiadog.py index 4b538f69..c0f70e4b 100644 --- a/web/actions/chiadog.py +++ b/web/actions/chiadog.py @@ -84,4 +84,4 @@ def send_test_alert(farmer): flash(_('Failed to contact farmer to send test alert. Please ensure the worker is running and check it\'s logs.'), 'danger') flash(str(ex), 'warning') else: - flash(_("Test alert has been sent. Please check notification target(s) for test success."), 'success') \ No newline at end of file + flash(_("Test alert has been sent. Please check your configured notification target(s) for receipt of the test alert."), 'success') \ No newline at end of file diff --git a/web/routes.py b/web/routes.py index 228a19a6..dd68253c 100644 --- a/web/routes.py +++ b/web/routes.py @@ -462,6 +462,7 @@ def settings_alerts(): selected_worker = worker.get_worker(selected_worker_hostname, selected_blockchain) if request.form.get('action') == 'test': chiadog.send_test_alert(selected_worker) + return redirect(url_for('alerts')) # Redirct to page showing the test alert else: # Save config chiadog.save_config(selected_worker, selected_blockchain, request.form.get("config")) farmers = chiadog.load_farmers() From 3a4ab6a9bcb67ff19965a218570c00522c5e7b53 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Thu, 17 Nov 2022 21:42:11 -0700 Subject: [PATCH 1104/1625] Start on a settings UI for replotting. --- api/schedules/plots_check.py | 2 +- web/actions/plotman.py | 10 ++ web/routes.py | 6 +- web/templates/farming/plots.html | 153 +++++++++++++++++++++++++- web/templates/plotting/jobs.html | 2 +- web/templates/plotting/transfers.html | 2 +- web/templates/wallet.html | 2 +- 7 files changed, 169 insertions(+), 8 deletions(-) diff --git a/api/schedules/plots_check.py b/api/schedules/plots_check.py index e5f015db..7c0d074d 100644 --- a/api/schedules/plots_check.py +++ b/api/schedules/plots_check.py @@ -185,7 +185,7 @@ def request_check(plot, workers): return [None, None, None] def execute(): - if 'plots_check_analyze_skip' in os.environ: + 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 with app.app_context(): diff --git a/web/actions/plotman.py b/web/actions/plotman.py index a867f1e1..1d0486ca 100644 --- a/web/actions/plotman.py +++ b/web/actions/plotman.py @@ -272,3 +272,13 @@ def load_plotting_keys(blockchain): if not pool_contract_address: pool_contract_address = None if os.environ['pool_contract_address'] == 'null' else os.environ['pool_contract_address'] return [farmer_pk, pool_pk, pool_contract_address] + +def load_replotting_settings(): + # TODO Load from file with real settings, here are some test defaults + settings = {} + for blockchain in PLOTTABLE_BLOCKCHAINS: + if blockchain == 'chia': + settings[blockchain] = { "enabled": True, "delete_solo": True, "delete_before": "2021-07-01", "delete_ksizes": [ 29, 30], "free_ksize": 32 } + else: + settings[blockchain] = { "enabled": False, "delete_solo": False, } + return settings \ No newline at end of file diff --git a/web/routes.py b/web/routes.py index dd68253c..38df41d1 100644 --- a/web/routes.py +++ b/web/routes.py @@ -224,8 +224,10 @@ def farming_plots(): gc = globals.load() farmers = chia.load_farmers() plots = chia.load_plots_farming() - return render_template('farming/plots.html', farmers=farmers, plots=plots, global_config=gc, - lang=get_lang(request)) + ksizes = [29, 30, 31, 32, 33, 34] + settings = { 'replotting': plotman.load_replotting_settings() } + return render_template('farming/plots.html', farmers=farmers, plots=plots, + settings=settings, ksizes=ksizes, global_config=gc, lang=get_lang(request)) @app.route('/farming/data') def farming_data(): diff --git a/web/templates/farming/plots.html b/web/templates/farming/plots.html index b9e2cdfe..9c211220 100644 --- a/web/templates/farming/plots.html +++ b/web/templates/farming/plots.html @@ -37,7 +37,17 @@
-
+
+ +
+
+ +   + + + +
+
+ + + +
From 372384bafc23e147e249205362404b86cb38ee3c Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Tue, 17 Jan 2023 20:03:13 -0700 Subject: [PATCH 1176/1625] 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 7972039f..7821dcf5 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 83dae859..64917b44 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 1177/1625] 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 562421e8..39c1975d 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 97f719dc..9cc4479e 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 1178/1625] 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 f8a20ea9..d009c6c0 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 7df7e485..f0ba0c07 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 7111e555..79752209 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 1179/1625] 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 c83f523a..a5abecbe 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 5fc6b7be..6ea4898d 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 1180/1625] 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 7b59c062..25febee0 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 625fd15e..ffef5a80 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 810c8f7e..617d127f 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 1181/1625] 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 a5abecbe..c15f825f 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 6ea4898d..f879ca3a 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 25febee0..fa1ca977 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 df828d9a..eacdc2b3 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 1182/1625] 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 f879ca3a..c96c3e1b 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 04b1ff74..7f48c373 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 641698fa..ee36bd77 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 1183/1625] 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 4066cb46..097715d8 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 88b6e9e7..c26f4f8c 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 a8f45655..e5518432 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 1184/1625] 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 3b19d055..713c9dac 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 1185/1625] 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 c15f825f..5e1ab601 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 c96c3e1b..6400e083 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 713c9dac..5d8898d2 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 46b3eb27..c4fd1b29 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 0fbf4516..2bb59ca3 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 6c711803..4b4a0127 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 1186/1625] 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 c4fd1b29..1f548d23 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 1187/1625] 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 1f548d23..c158b7e5 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 1188/1625] 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 617d127f..43ff4755 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 c158b7e5..236eb6f6 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 2bb59ca3..0ce893d2 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 1189/1625] 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 0ce893d2..ccfc1758 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 c18d6dc1..8687ec80 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 1190/1625] 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 236eb6f6..0e908573 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 1191/1625] 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 c26f4f8c..c49c120a 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 1192/1625] 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 43ff4755..e0b4ad11 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 1193/1625] 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 5e1ab601..97fcd285 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 0216d34a..fb5e1787 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 1194/1625] 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 00000000..a3f98feb --- /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 00000000..7aeaa9d4 --- /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 00000000..e6c22852 --- /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 4201aceb..f11a1c67 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 00000000..307e2f36 --- /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 20857515..4185df33 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 00000000..c53433fc --- /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 00000000..e0fd0672 --- /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 4be358e4..79a55a77 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 1195/1625] Update CREDITS.md --- CREDITS.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CREDITS.md b/CREDITS.md index 5fc6b7be..cd9c5a2e 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 1196/1625] 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 7aeaa9d4..933a9088 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 1197/1625] 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 a3f98feb..d7f8c38c 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 1198/1625] 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 e6c22852..7cfb8b32 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 1199/1625] 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 48eb6449..1625bca8 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 2a30295e..211ff406 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 460017ec..d62b194c 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 fb5e1787..21b748f4 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 3c830d99..4297eed5 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 78b1288b..31982360 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 86892bea..15481a55 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 c2ea961b..623a8329 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 fafb9c45..4a090fa5 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 b0900e94..1aff10de 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 560eba93..53a0bd09 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 381c91b7..def21e07 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 ec56f299..347bf168 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 8c8ac76a..68a1d03e 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 b55be8d6..b73bbc82 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 31ea8b10..4af7a2ed 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 07e9456c..c9a261aa 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 0b51f654..10b99677 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 8dcc99e3..4e7c1ed5 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 7a7c6f65..de42a5ee 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 a479b93b..295ba332 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 b8e166bb..4a24cb55 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 7821dcf5..87bd034f 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 8b7d4af2..0f417c12 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 e7ff30a6..6b8c2807 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 38ff0d8e..94eed494 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 7ae7f81a..2100bc9c 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 6759ffbe..a40efd6d 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 a3f10cbe..9c798a79 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 9bf5fc46..376681ec 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 1200/1625] 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 d7f8c38c..00000000 --- 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 7342d5ee..8a3e6fa2 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 933a9088..00000000 --- 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 95ff811f..55f9f588 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 7cfb8b32..00000000 --- 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 e34b5a6b..ab2009f4 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 4b76b09b..26e40f01 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 307e2f36..00000000 --- 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 f726e80c..3e1f049e 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 e0fd0672..00000000 --- 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 31982360..76d36c9e 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 3368616c..9cc239bf 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 1201/1625] 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 21b748f4..70095e31 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 c53433fc..00000000 --- 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 1202/1625] 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 661ea9a0..2d5e356b 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 d91473a9..2cfb8ba7 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 0b5b6515..70d6100a 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 afc1e293..24694d91 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 f7f39214..20b82dc6 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 dd906b79..0f316a95 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 3d41f123..6d8165c8 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 1538b8b9..af579e4f 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 8a3e6fa2..fafadea0 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 2877fe8c..aaaba8b6 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 235a65de..dfe85105 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 f2ecd3f7..3f7e0fab 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 22034ea6..25b144ff 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 ff8bdeac..8eadcf40 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 7f66ee56..112ed784 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 fb006dee..000f4a14 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 c67caac5..c49c3419 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 2bc9e76f..a3e5e711 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 b928392b..e3b491ac 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 c8200838..845a33af 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 4e522c36..0761bdfb 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 6cb9bc7f..3e2cb782 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 5299e4e9..a8db9e1f 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 8743c00f..be74f30a 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 a59ffd7c..8f186267 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 25262a20..b5b5257a 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 20f05eb8..7ab80ac2 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 0931ac11..f9195e8c 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 16e113f2..26d82246 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 d009c6c0..1e98777e 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 addd6b0c..9e0d5083 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 a90a6cfe..df4c28f8 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 5860dd1a..6e9276f9 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 7ed8bf78..86e9cbbc 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 8faf25c9..e7648eed 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 1203/1625] 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 0761bdfb..6900ad49 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 2a9a248a..8a152a16 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 1204/1625] 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 8a152a16..96cba6a1 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 1205/1625] 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 6d8165c8..7a0bfcb2 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 e0b4ad11..4afbc963 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 d8193b92..151a4fef 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 34de5393..9431a551 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 c1e173ee..85287396 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 1206/1625] 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 97fcd285..44e438ac 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 d47d8b28..be59b4db 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 1207/1625] 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 0b480deb..b67464f9 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 2672c7f7..a0ff905c 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 080f1acd..8d639154 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 38747738..6cfb08a2 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 d41a9a42..bfe73779 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 5f09607f..0b1ff6e4 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 86e9cbbc..e0ff030e 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 c31c042b..71ac2dd5 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 55f9f588..cadce930 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 f711fd29..a71a1271 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 79536f10..8ad2e813 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 57fe8614..4b63f6cb 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 0096d7f4..d9ad33d0 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 75ccb667..0346d6c4 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 3a5c2693..4de0bd6f 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 4a55cfd3..b557ce6d 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 045e0ee4..66470501 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 764e578e..6491eb34 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 ef31e742..44b10352 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 92211dd8..88b0136b 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 51358134..11af09a1 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 270cffda..3333d66c 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 5412e05f..b5214154 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 e7c6d019..4c66b26d 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 f4d1d274..ca93709f 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 999d9a96..cfb9483f 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 72109e69..70098f54 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 c629c8ee..f42b97c4 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 ec39655e..eea38269 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 f0ba0c07..a570112d 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 ef142e9d..59b0bc04 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 127bf225..5a158c92 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 5778c95a..f1447772 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 5cbd0e04..a85fd395 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 908b7df8..68a67aaf 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 b8209c4e..7434fa39 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 decc3443..29cee94b 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 88353d0f..83284392 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 0796aa79..8644cecc 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 e7648eed..fa66f01a 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 3b5a890b..a0793869 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 ab2009f4..0aeee3e2 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 1319a5fd..5603cf27 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 1dc575b5..8692df85 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 a82512d9..f7c46569 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 d8aa4a45..b46daa7d 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 93828955..0273e058 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 a6e0f4fc..45f462fe 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 6e9cbbba..399cc3c8 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 2c42f949..857e5ac2 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 c3d86a59..cab6398f 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 b0ab09b6..ad4f7298 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 f106b596..cbc92b71 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 abf5d0ee..add9a2f1 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 f150d796..71e5c242 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 cd034876..3d1acd2a 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 ca148779..4350257b 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 7f9a954e..fc435e92 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 7b9896d9..85c3df32 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 7dd758ab..d4e93c99 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 c725981b..4516c316 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 cc9c0ae3..2a094e17 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 79752209..7c647521 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 cb88a255..18c99ba5 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 9a425c9c..844c6456 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 8afe34c7..d79ec794 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 c0f70e4b..9213f3a7 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 1208/1625] 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 26e40f01..16c707fa 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 151a4fef..d8193b92 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 85287396..41a0f97f 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 1209/1625] 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 0814ad76..18ed02a6 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 00000000..d42a7b5f --- /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 653b7b4a..5410c5d0 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 43955a36..eea7b113 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 6de3c607..69a538aa 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 f7370d51..bf0fd3fb 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 c4c6b7a4..d279b2b7 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 85976376..de2294fc 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 e5518432..4f74d2f2 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 84940924..c0a73b74 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 ac2705f2..eb37e86b 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 1210/1625] 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 eea7b113..29278d5e 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 1211/1625] MMX compression. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44e438ac..4ad76a3e 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 1212/1625] 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 661ea9a0..5e13aba5 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 0b5b6515..0c1ada83 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 afc1e293..6d2f37ef 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 f7f39214..c1def0bf 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 dd906b79..a04293fc 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 c9ba01d5..c493529d 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 1538b8b9..35c45f1f 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 6989dd7b..4e9b52a0 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 2877fe8c..5147bee5 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 235a65de..20a4677e 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 f2ecd3f7..833bdb55 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 22034ea6..c46db8e0 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 ff8bdeac..545e620e 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 7f66ee56..dcbbf0db 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 fb006dee..47e22c1d 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 c67caac5..983ccd39 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 2bc9e76f..8d34e49f 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 b928392b..e9ea6972 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 c8200838..6ecc7720 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 489bae37..4dab50f3 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 6cb9bc7f..e6b9cfbf 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 5299e4e9..7e18df4f 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 8743c00f..42d67774 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 a59ffd7c..58aef56a 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 20f05eb8..343d07d3 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 0931ac11..61306330 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 16e113f2..1621d999 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 f8a20ea9..fd6fc2d5 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 addd6b0c..b4454f3e 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 a90a6cfe..29dca77b 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 5860dd1a..1b2b64e6 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 0b480deb..ace536bd 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 080f1acd..856d9fc8 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 38747738..6a68fbf7 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 d41a9a42..19bb9a85 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 5f09607f..c7cae57a 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 7ed8bf78..78ab24ae 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 c31c042b..ae5311c7 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 81bd249f..9ad75274 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 f711fd29..e5ea2992 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 79536f10..c029bd4f 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 57fe8614..29699bbc 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 0096d7f4..2bcdf76c 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 75ccb667..fb7900a9 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 3a5c2693..ddf7158e 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 4a55cfd3..79fdd055 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 045e0ee4..6ae15fdf 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 764e578e..07b14f9e 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 ef31e742..7327983a 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 92211dd8..739e8142 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 51358134..65b78061 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 270cffda..08aa5d06 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 5412e05f..e35c4ebf 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 e7c6d019..1ccc6f57 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 f4d1d274..ba486ff8 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 72109e69..262609b5 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 c629c8ee..915ad023 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 ec39655e..41785231 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 7df7e485..6b057e25 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 ef142e9d..036edb29 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 127bf225..4852a97e 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 5778c95a..579ab336 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 5cbd0e04..bb390cc0 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 b8209c4e..91bd072d 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 decc3443..31a9e0a7 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 88353d0f..fb4e916d 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 0796aa79..0343993f 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 8faf25c9..9ce4a225 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 3b5a890b..b9e67242 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 cad8f20f..cfef2eb4 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 1319a5fd..42849fca 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 1dc575b5..2085ebc9 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 a82512d9..10cabe6e 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 d8aa4a45..83fb241b 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 93828955..035aedf0 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 a6e0f4fc..b5184a7e 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 6e9cbbba..2a128e3d 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 2c42f949..dc178731 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 c3d86a59..4f33fcf0 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 b0ab09b6..213376db 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 f106b596..35ea7dfc 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 abf5d0ee..228e22ec 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 f150d796..ab766575 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 cd034876..e3c48754 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 ca148779..1fee64a6 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 7f9a954e..8c729376 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 7dd758ab..0b7eb039 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 c725981b..dec1c4da 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 cc9c0ae3..06817b73 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 7111e555..294cf1f7 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 cb88a255..5e197614 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 9a425c9c..5fb3febb 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 8afe34c7..f4c280ad 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 1213/1625] 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 18ed02a6..8f2ea804 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 29278d5e..1aec5ca6 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 69a538aa..0c2cc64c 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 bf0fd3fb..3d06d99d 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 4f74d2f2..754cefa2 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 c0a73b74..bf178598 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 1214/1625] 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 70944994..310ac895 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 1215/1625] 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 d8807717..7c81c6a8 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 1216/1625] 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 7a0bfcb2..6d8165c8 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 6900ad49..0761bdfb 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 11af09a1..21b71304 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 fa66f01a..9bd7e345 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 0aeee3e2..c6cbb64b 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 add9a2f1..60ac9e2f 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 3e1f049e..39c79728 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 23abd60b..3bab73dd 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 10b99677..0d88b213 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 35aec9d2..90bb1c94 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 1217/1625] 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 39c79728..2613cfc0 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 3bab73dd..43ff4ef8 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 90bb1c94..2351e7d5 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 1218/1625] 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 36b5fdaf..3ccfebf0 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 8a3a2700..3a137bd8 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 1219/1625] 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 7c81c6a8..51bd9e1b 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 1220/1625] 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 931f4507..09bad885 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 db5faacf..2d1cd339 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 52b92106..c4f20240 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 05ce1130..fd9e9ae7 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 93e6f4b3..cd8530aa 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 846403b8..ba7bf0cc 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 50228880..d14dc731 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 96dbf169..954b6e42 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 cf59fab3..a496d384 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 2351e7d5..e1f8156b 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 c49c120a..d9cc873c 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 1221/1625] 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 e1f8156b..fc79b6dd 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 1222/1625] 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 7975e0d2..6ecce017 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 4b4a0127..9f802807 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 dac9e563..dbbdebfa 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 99277a2e..29a8c3b3 100644 --- a/web/templates/plotting/jobs.html +++ b/web/templates/plotting/jobs.html @@ -85,13 +85,110 @@
+ + + + +
- + +   +
-
+ +