@@ -173,44 +173,15 @@ def process_plot(plot_path: Path, plot_info: PlotInfo, num_start: int, num_end:
173
173
# Some plot errors cause get_qualities_for_challenge to throw a RuntimeError
174
174
try :
175
175
quality_start_time = round (monotonic () * 1000 )
176
- for index , quality_str in enumerate (pr .get_qualities_for_challenge (challenge )):
177
- quality_spent_time = round (monotonic () * 1000 ) - quality_start_time
178
- if quality_spent_time > 8000 :
179
- log .warning (
180
- f"\t Looking up qualities took: { quality_spent_time } ms. This should be below 8 seconds "
181
- f"to minimize risk of losing rewards. Filepath: { plot_path } "
182
- )
183
- else :
184
- log .info (f"\t Looking up qualities took: { quality_spent_time } ms. Filepath: { plot_path } " )
185
-
186
- # Other plot errors cause get_full_proof or validate_proof to throw an AssertionError
187
- try :
188
- proof_start_time = round (monotonic () * 1000 )
189
- # TODO : todo_v2_plots handle v2 plots
190
- proof = pr .get_full_proof (challenge , index , parallel_read )
191
- proof_spent_time = round (monotonic () * 1000 ) - proof_start_time
192
- if proof_spent_time > 15000 :
193
- log .warning (
194
- f"\t Finding proof took: { proof_spent_time } ms. This should be below 15 seconds "
195
- f"to minimize risk of losing rewards. Filepath: { plot_path } "
196
- )
197
- else :
198
- log .info (f"\t Finding proof took: { proof_spent_time } ms. Filepath: { plot_path } " )
199
-
200
- ver_quality_str = v .validate_proof (pr .get_id (), pr .get_size (), challenge , proof )
201
- if quality_str == ver_quality_str :
202
- total_proofs += 1
203
- else :
204
- log .warning (
205
- f"\t Quality doesn't match with proof. Filepath: { plot_path } "
206
- "This can occasionally happen with a compressed plot."
207
- )
208
- except AssertionError as e :
209
- log .error (
210
- f"{ type (e )} : { e } error in proving/verifying for plot { plot_path } . Filepath: { plot_path } "
211
- )
212
- caught_exception = True
213
- quality_start_time = round (monotonic () * 1000 )
176
+ qualities = pr .get_qualities_for_challenge (challenge )
177
+ quality_spent_time = round (monotonic () * 1000 ) - quality_start_time
178
+ if quality_spent_time > 8000 :
179
+ log .warning (
180
+ f"\t Looking up qualities took: { quality_spent_time } ms. This should be below 8 seconds "
181
+ f"to minimize risk of losing rewards. Filepath: { plot_path } "
182
+ )
183
+ else :
184
+ log .info (f"\t Looking up qualities took: { quality_spent_time } ms. Filepath: { plot_path } " )
214
185
except KeyboardInterrupt :
215
186
log .warning ("Interrupted, closing" )
216
187
return
@@ -224,9 +195,40 @@ def process_plot(plot_path: Path, plot_info: PlotInfo, num_start: int, num_end:
224
195
else :
225
196
log .error (f"{ type (e )} : { e } error in getting challenge qualities for plot { plot_path } " )
226
197
caught_exception = True
198
+ continue
227
199
except Exception as e :
228
200
log .error (f"{ type (e )} : { e } error in getting challenge qualities for plot { plot_path } " )
229
201
caught_exception = True
202
+ break
203
+
204
+ for index , quality_str in enumerate (qualities ):
205
+ # Other plot errors cause get_full_proof or validate_proof to throw an AssertionError
206
+ try :
207
+ proof_start_time = round (monotonic () * 1000 )
208
+ # TODO : todo_v2_plots handle v2 plots
209
+ proof = pr .get_full_proof (challenge , index , parallel_read )
210
+ proof_spent_time = round (monotonic () * 1000 ) - proof_start_time
211
+ if proof_spent_time > 15000 :
212
+ log .warning (
213
+ f"\t Finding proof took: { proof_spent_time } ms. This should be below 15 seconds "
214
+ f"to minimize risk of losing rewards. Filepath: { plot_path } "
215
+ )
216
+ else :
217
+ log .info (f"\t Finding proof took: { proof_spent_time } ms. Filepath: { plot_path } " )
218
+
219
+ ver_quality_str = v .validate_proof (pr .get_id (), pr .get_size (), challenge , proof )
220
+ if quality_str == ver_quality_str :
221
+ total_proofs += 1
222
+ else :
223
+ log .warning (
224
+ f"\t Quality doesn't match with proof. Filepath: { plot_path } "
225
+ "This can occasionally happen with a compressed plot."
226
+ )
227
+ except AssertionError as e :
228
+ log .error (
229
+ f"{ type (e )} : { e } error in proving/verifying for plot { plot_path } . Filepath: { plot_path } "
230
+ )
231
+ caught_exception = True
230
232
if caught_exception is True :
231
233
break
232
234
0 commit comments