swar / Swar-Chia-Plot-Manager

This is a Cross-Platform Plot Manager for Chia Plotting that is simple, easy-to-use, and reliable.
GNU General Public License v3.0
1.26k stars 389 forks source link
chia chia-plots plot plot-manager python

Swar's Chia Plot Manager

A plot manager for Chia plotting: https://www.chia.net/

English / Русский

The view of the manager

Development Version: v0.1.1

This is a cross-platform Chia Plot Manager that will work on the major operating systems. This is not a plotter. The purpose of this library is to manage your plotting and kick off new plots with the settings that you configure. Everyone's system is unique so customization is an important feature that was engraved into this library.

This library is simple, easy-to-use, and reliable to keep the plots generating.

This library has been tested for Windows and Linux.

Features

Sponsor / Support this Library

This library took a lot of time and effort in order to get it before you today. Consider sponsoring or supporting the library. This is not necessary but more a kind gestures.

Support / Questions

Please do not use GitHub issues for questions or support regarding your own personal setups. Issues should pertain to actual bugs in the code and ideas. It has been tested to work on Windows, Linux, and Mac OS by numerous people at this point. So any questions relating to tech support, configuration setup, or things pertaining to your own personal use cases should be posted at any of the links below.

Frequently Asked Questions

Can I reload my config?
If I stop manager will it kill my plots?
How are temporary2 and destination selected if I have a list?
What is temporary2_destination_sync?
What is the best config for my setup?

All Commands

Example Usage of Commands
> python3 manager.py start

> python3 manager.py restart

> python3 manager.py stop

> python3 manager.py view

> python3 manager.py status

> python3 manager.py analyze_logs

start

This command will start the manager in the background. Once you start it, it will always be running unless all jobs have had their max_plots completed or there is an error. Errors will be logged in a file created debug.log

stop

This command will terminate the manager in the background. It does not stop running plots, it will only stop new plots from getting created.

restart

This command will run start and stop sequentially.

view

This command will show the view that you can use to keep track of your running plots. This will get updated every X seconds defined by your config.yaml.

status

This command will a single snapshot of the view. It will not loop.

analyze_logs

This command will analyze all completed plot logs in your log folder and calculate the proper weights and line ends for your computer's configuration. Just populate the returned values under the progress section in your config.yaml. This only impacts the progress bar.

Installation

The installation of this library is straightforward. I have attached detailed instructions below that should help you get started.

NOTE: If python does not work, please try python3.

  1. Download and Install Python 3.7 or higher: https://www.python.org/
  2. git clone this repo or download it.
  3. Open CommandPrompt / PowerShell / Terminal and cd into the main library folder.
    • Example: cd C:\Users\Swar\Documents\Swar-Chia-Plot-Manager
  4. OPTIONAL: Create a virtual environment for Python. This is recommended if you use Python for other things.
    1. Create a new python environment: python -m venv venv
      • The second venv can be renamed to whatever you want. I prefer venv because it's a standard.
    2. Activate the virtual environment. This must be done every single time you open a new window.
      • Example Windows: venv\Scripts\activate
      • Example Linux: . ./venv/bin/activate or source ./venv/bin/activate
      • Example Mac OS: /Applications/Chia.app/Contents/Resources/app.asar.unpacked/daemon/chia
    3. Confirm that it has activated by seeing the (venv) prefix. The prefix will change depending on what you named it.
  5. Install the required modules: pip install -r requirements.txt
    • If you plan on using Notifications or Prometheus then run the following to install the required modules: pip install -r requirements-notification.txt
  6. Copy config.yaml.default and name it as config.yaml in the same directory.
  7. Edit and set up the config.yaml to your own personal settings. There is more help on this below.
    • You will need to add the chia_location as well! This should point to your chia executable.
  8. Run the Manager: python manager.py start
    • This will start a process in the background that will manage plots based on your inputted settings.
  9. Run the View: python manager.py view
    • This will loop through a view screen with details about active plots.

Configuration

The configuration of this library is unique to every end-user. The config.yaml file is where the configuration will live.

This plot manager works based on the idea of jobs. Each job will have its own settings that you can configure and customize. No two drives are unique so this will provide flexibility for your own constraints and requirements.

chia_location

This is a single variable that should contain the location of your chia executable file. This is the blockchain executable.

backend

This is where you signify if you are using Chia or the MadMax binary files for plotting.

manager

These are the config settings that will only be used by the plot manager.

log

view

These are the settings that will be used by the view.

notifications

These are different settings in order to send notifications when the plot manager starts and when a plot has been completed.

instrumentation

Settings for enabling Prometheus to gather metrics.

List of Metrics Gathered

progress

global

job

Each job must have unique temporary directories.

These are the settings that will be used by each job. Please note you can have multiple jobs and each job should be in YAML format in order for it to be interpreted correctly. Almost all the values here will be passed into the Chia executable file.

Check for more details on the Chia CLI here: https://github.com/Chia-Network/chia-blockchain/wiki/CLI-Commands-Reference