plotman
Advanced tools
+16
-0
@@ -8,2 +8,18 @@ # Change Log | ||
| ## [0.5.1] - 2021-07-15 | ||
| ### Fixed | ||
| - Detects binary-installed Chia plotting processes again after being broken in v0.5. | ||
| ([#865](https://github.com/ericaltendorf/plotman/pull/865)) | ||
| - Wrap archival indexes around when there are fewer disks, rather than just pointing all the "extra" indexes at the last disk. | ||
| This will distribute the plot transfers better when you have fewer disks than plotters. | ||
| ([#855](https://github.com/ericaltendorf/plotman/pull/855)) | ||
| ### Added | ||
| - `path_suffix` option for rsync and rsyncd archive targets. | ||
| Allows adding suffixes to the destination path such as to separate original vs. pool plots. | ||
| ([#800](https://github.com/ericaltendorf/plotman/pull/800)) | ||
| - `executable` option for each configurable plotter. | ||
| Allows explicit specification of the plotter executable path if this is preferred over setting the `PATH` environment variable to find the program. | ||
| Presently does not support executables other than the expected names (`chia`, and `chia_plot`). | ||
| ([#823](https://github.com/ericaltendorf/plotman/pull/823)) | ||
| ## [0.5] - 2021-07-07 | ||
@@ -10,0 +26,0 @@ ### Fixed |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: plotman | ||
| Version: 0.5 | ||
| Version: 0.5.1 | ||
| Summary: Chia plotting manager | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/ericaltendorf/plotman |
| Metadata-Version: 2.1 | ||
| Name: plotman | ||
| Version: 0.5 | ||
| Version: 0.5.1 | ||
| Summary: Chia plotting manager | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/ericaltendorf/plotman |
@@ -243,3 +243,3 @@ import argparse | ||
| if len(available) > 0: | ||
| index = min(arch_cfg.index, len(available) - 1) | ||
| index = arch_cfg.index % len(available) | ||
| (archdir, freespace) = sorted(available)[index] | ||
@@ -246,0 +246,0 @@ |
@@ -76,2 +76,4 @@ import contextlib | ||
| if loaded.plotting.chia is None: | ||
| # TODO: fix all the `TODO: use the configured executable` so this is not | ||
| # needed. | ||
| raise ConfigurationException( | ||
@@ -85,2 +87,8 @@ "chia selected as plotter but plotting: chia: was not specified in the config", | ||
| ) | ||
| executable_name = os.path.basename(loaded.plotting.chia.executable) | ||
| if executable_name != "chia": | ||
| raise ConfigurationException( | ||
| "plotting: chia: executable: must refer to an executable named chia" | ||
| ) | ||
| elif loaded.plotting.type == "madmax": | ||
@@ -106,2 +114,10 @@ if loaded.plotting.madmax is None: | ||
| executable_name = os.path.basename(loaded.plotting.madmax.executable) | ||
| if executable_name != "chia_plot": | ||
| # TODO: fix all the `TODO: use the configured executable` so this is not | ||
| # needed. | ||
| raise ConfigurationException( | ||
| "plotting: madmax: executable: must refer to an executable named chia_plot" | ||
| ) | ||
| if loaded.archiving is not None: | ||
@@ -318,2 +334,3 @@ preset_target_objects = yaml.safe_load(preset_target_definitions_text) | ||
| class ChiaPlotterOptions: | ||
| executable: str = "chia" | ||
| n_threads: int = 2 | ||
@@ -328,2 +345,3 @@ n_buckets: int = 128 | ||
| class MadmaxPlotterOptions: | ||
| executable: str = "chia_plot" | ||
| n_threads: int = 4 | ||
@@ -377,5 +395,11 @@ n_buckets: int = 256 | ||
| if self.plotting.type == 'chia': | ||
| if self.plotting.chia is None: | ||
| message = ( | ||
| "internal plotman error, please report the full traceback and your" | ||
| + " full configuration file" | ||
| ) | ||
| raise Exception(message) | ||
| if self.plotting.pool_contract_address is not None: | ||
| completed_process = subprocess.run( | ||
| args=['chia', 'version'], | ||
| args=[self.plotting.chia.executable, 'version'], | ||
| capture_output=True, | ||
@@ -393,5 +417,12 @@ check=True, | ||
| elif self.plotting.type == 'madmax': | ||
| if self.plotting.madmax is None: | ||
| message = ( | ||
| "internal plotman error, please report the full traceback and your" | ||
| + " full configuration file" | ||
| ) | ||
| raise Exception(message) | ||
| if self.plotting.pool_contract_address is not None: | ||
| completed_process = subprocess.run( | ||
| args=['chia_plot', '--help'], | ||
| args=[self.plotting.madmax.executable, '--help'], | ||
| capture_output=True, | ||
@@ -398,0 +429,0 @@ check=True, |
+20
-11
@@ -34,6 +34,14 @@ # TODO do we use all these? | ||
| def is_plotting_cmdline(cmdline: typing.List[str]) -> bool: | ||
| if cmdline and 'python' in cmdline[0].lower(): # Stock Chia plotter | ||
| cmdline = cmdline[1:] | ||
| if len(cmdline) == 0: | ||
| return False | ||
| if 'chia_plot' == os.path.basename(cmdline[0].lower()): # Madmax plotter | ||
| # TODO: use the configured executable | ||
| return True | ||
| else: | ||
| if 'python' in cmdline[0].lower(): # Stock Chia plotter | ||
| cmdline = cmdline[1:] | ||
| return ( | ||
| len(cmdline) >= 3 | ||
| # TODO: use the configured executable | ||
| and 'chia' in cmdline[0] | ||
@@ -43,5 +51,2 @@ and 'plots' == cmdline[1] | ||
| ) | ||
| elif cmdline and 'chia_plot' == os.path.basename(cmdline[0].lower()): # Madmax plotter | ||
| return True | ||
| return False | ||
@@ -59,5 +64,12 @@ def parse_chia_plot_time(s: str) -> pendulum.DateTime: | ||
| # Parse command line args | ||
| if 'python' in command_line[0].lower(): # Stock Chia plotter | ||
| command_line = command_line[1:] | ||
| if 'chia_plot' == os.path.basename(command_line[0].lower()): # Madmax plotter | ||
| # TODO: use the configured executable | ||
| all_command_arguments = command_line[1:] | ||
| command = madmax._cli_c8121b9 | ||
| else: | ||
| if 'python' in command_line[0].lower(): # Stock Chia plotter | ||
| command_line = command_line[1:] | ||
| assert len(command_line) >= 3 | ||
| # TODO: use the configured executable | ||
| assert 'chia' in command_line[0] | ||
@@ -71,6 +83,2 @@ assert 'plots' == command_line[1] | ||
| command = chia.commands.latest_command() | ||
| elif 'chia_plot' in command_line[0].lower(): # Madmax plotter | ||
| command_line = command_line[1:] | ||
| all_command_arguments = command_line[2:] | ||
| command = madmax._cli_c8121b9 | ||
@@ -275,2 +283,3 @@ # nice idea, but this doesn't include -h | ||
| # } | ||
| # TODO: use the configured executable | ||
| if proc.name().startswith("chia_plot"): # MADMAX | ||
@@ -277,0 +286,0 @@ self.k = 32 |
@@ -147,3 +147,4 @@ import logging | ||
| ) | ||
| plot_args = ['chia_plot', | ||
| plot_args = [ | ||
| plotting_cfg.madmax.executable, | ||
| '-n', str(1), | ||
@@ -162,3 +163,3 @@ '-r', str(plotting_cfg.madmax.n_threads), | ||
| ) | ||
| plot_args = ['chia', 'plots', 'create', | ||
| plot_args = [plotting_cfg.chia.executable, 'plots', 'create', | ||
| '-k', str(plotting_cfg.chia.k), | ||
@@ -165,0 +166,0 @@ '-r', str(plotting_cfg.chia.n_threads), |
@@ -153,6 +153,10 @@ # Default/example plotman.yaml configuration file | ||
| plotting: | ||
| # Your public keys: farmer and pool - Required for madMAx, optional for chia with mnemonic.txt | ||
| # Your public keys. Be sure to use the pool contract address for | ||
| # portable pool plots. The pool public key is only for original | ||
| # non-portable plots that can not be used with the official pooling | ||
| # protocol. | ||
| # farmer_pk: ... | ||
| # pool_pk: ... | ||
| # pool_contract_address: ... | ||
| # If you enable Chia, plot in *parallel* with higher tmpdir_max_jobs and global_max_jobs | ||
@@ -162,2 +166,3 @@ type: chia | ||
| # The stock plotter: https://github.com/Chia-Network/chia-blockchain | ||
| # executable: /path/to/chia | ||
| k: 32 # k-size of plot, leave at 32 most of the time | ||
@@ -172,3 +177,4 @@ e: False # Use -e plotting option | ||
| # madMAx plotter: https://github.com/madMAx43v3r/chia-plotter | ||
| # executable: /path/to/chia_plot | ||
| n_threads: 4 # Default is 4, crank up if you have many cores | ||
| n_buckets: 256 # Default is 256 |
@@ -7,2 +7,3 @@ target_definitions: | ||
| site_root: null | ||
| path_suffix: "" | ||
@@ -28,3 +29,4 @@ # The disk space script must return a line for each directory | ||
| set -evx | ||
| "${command}" ${options} "${source}" "${destination}" | ||
| full_destination=$(realpath --canonicalize-missing "${destination}/${path_suffix}") | ||
| "${command}" ${options} "${source}" "${full_destination}/" | ||
| transfer_process_name: "{command}" | ||
@@ -43,2 +45,3 @@ transfer_process_argument_prefix: "{site_root}" | ||
| site: null | ||
| path_suffix: "" | ||
| disk_space_script: | | ||
@@ -55,5 +58,6 @@ #!/bin/bash | ||
| echo Launching transfer activity | ||
| relative_path=$(realpath --canonicalize-missing --relative-to="${site_root}" "${destination}") | ||
| full_destination=$(realpath --canonicalize-missing "${destination}/${path_suffix}") | ||
| relative_path=$(realpath --canonicalize-missing --relative-to="${site_root}" "${full_destination}") | ||
| url_root="rsync://${user}@${host}:${rsync_port}/${site}" | ||
| "${command}" ${options} "${source}" "${url_root}/${relative_path}" | ||
| "${command}" ${options} "${source}" "${url_root}/${relative_path}/" | ||
| transfer_process_name: "{command}" | ||
@@ -60,0 +64,0 @@ transfer_process_argument_prefix: "rsync://{user}@{host}:{rsync_port}/{site}" |
+1
-1
@@ -1,1 +0,1 @@ | ||
| 0.5 | ||
| 0.5.1 |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
421667
0.78%3615
1.01%