From 90d5fdf1432d9fd3091bc99ed2fd32fae050b30c Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 22 Aug 2025 09:31:12 +0200 Subject: [PATCH] just like we ignore unreasonably small v1 plots, ignore unreasonably small v2 plots --- chia/plotting/manager.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/chia/plotting/manager.py b/chia/plotting/manager.py index 147b5650b3ae..6ba06c8fa005 100644 --- a/chia/plotting/manager.py +++ b/chia/plotting/manager.py @@ -333,22 +333,20 @@ def process_file(file_path: Path) -> Optional[PlotInfo]: # TODO: consider checking if the file was just written to (which would mean that the file is still # being copied). A segfault might happen in this edge case. - version_and_size = prover.get_size() - if version_and_size.size_v1 is not None: - k = version_and_size.size_v1 - level = prover.get_compression_level() - if level == 0: - if k >= 30 and stat_info.st_size < 0.98 * expected_size: - log.warning( - f"Not farming plot {file_path}. " - f"Size is {stat_info.st_size / (1024**3)} GiB, " - f"but expected at least: {expected_size / (1024**3)} GiB. " - "We assume the file is being copied." - ) - return None - else: - # TODO: todo_v2_plots do we need to check v2 plots? - pass + k = prover.get_size() + level = prover.get_compression_level() + if ( + level == 0 + and stat_info.st_size < 0.98 * expected_size + and ((k.size_v1 is not None and k.size_v1 >= 30) or (k.size_v2 is not None and k.size_v2 >= 28)) + ): + log.warning( + f"Not farming plot {file_path}. " + f"Size is {stat_info.st_size / (1024**3)} GiB, " + f"but expected at least: {expected_size / (1024**3)} GiB. " + "We assume the file is being copied." + ) + return None cache_entry = CacheEntry.from_prover(prover) self.cache.update(file_path, cache_entry)