Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final fixes before release. #62

Merged
merged 4 commits into from
May 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
8 changes: 6 additions & 2 deletions app/commands/global_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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

Expand Down
14 changes: 8 additions & 6 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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."
Expand Down