diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e2fddef..d56809dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.3.0] - 2021-05-? +## [0.3.0] - 2021-05-28 - Integrate the excellent Chiadog project for log monitoring and alerting -- Rebase off ubuntu:focal, include nice Dockerfile cleanup by sparklyballs -- Support farmer_pk and pool_pk env vars when mode=plotter, automatically configure Plotman +- Plotman Analyze output to show time spent in each plotting phase - Log Viewer for Farming, Alerts, and Plotting including logs for running plot jobs -- Plotman Analyze output available for plots with Plotman job logs. +- Rebase off ubuntu:focal, include nice Dockerfile cleanup by sparklyballs +- When mode=plotter, autoconfigure Plotman with provided farmer_pk and pool_pk +- When mode=harvester, auto import of your farmer's CA certificates ## [0.2.1] - 2021-05-21 diff --git a/CREDITS.md b/CREDITS.md index 95920a7f..b76809ff 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -37,6 +37,7 @@ A big thanks to all that contributed with dev and test including: * Praghaels * judy * Allram +* Fumo696 ## 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/app/commands/global_config.py b/app/commands/global_config.py index 9ff3aa44..4421a187 100644 --- a/app/commands/global_config.py +++ b/app/commands/global_config.py @@ -50,6 +50,9 @@ def is_setup(): app.logger.debug( "Found plotter mode with farmer_pk and pool_pk provided.") return True # When plotting don't need private in mnemonic.txt + if "mode" in os.environ and os.environ['mode'] == 'harvester': + # Harvester doesn't require a mnemonic private key as farmer's ca already imported. + return True # All other modes, we should have at least one keys path if "keys" not in os.environ: app.logger.info( @@ -173,8 +176,9 @@ def load_chiadog_version(): if errs: abort(500, description=errs.decode('utf-8')) last_chiadog_version = outs.decode('utf-8').strip() - if last_chiadog_version.startswith('chiadog'): - last_chiadog_version = last_chiadog_version[len('chiadog'):].strip() + app.logger.info(last_chiadog_version) + if last_chiadog_version.startswith('v'): + last_chiadog_version = last_chiadog_version[len('v'):].strip() last_chiadog_version_load_time = datetime.datetime.now() return last_chiadog_version diff --git a/entrypoint.sh b/entrypoint.sh index 1415ae48..fca7acee 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,11 +11,7 @@ cd /chia-blockchain . ./activate mkdir -p /root/.chia/mainnet/log -if [ -d /root/.chia/farmer_ca ]; then - chia init -c /root/.chia/farmer_ca 2>&1 > /root/.chia/mainnet/log/init.log -else # All regular cases - chia init 2>&1 > /root/.chia/mainnet/log/init.log -fi +chia init 2>&1 > /root/.chia/mainnet/log/init.log # Loop over provided list of key paths for k in ${keys//:/ }; do @@ -38,9 +34,15 @@ elif [[ ${mode} == 'harvester' ]]; 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 + chia start harvester -r fi elif [[ ${mode} == 'plotter' ]]; then echo "Starting in Plotter-only mode. Run Plotman from either CLI or WebUI."