7 from click
import argument, option, command, pass_context, Context, ClickException
11 @argument(
"batch-file")
16 help=
"Number of nested proofs per batch")
18 def check_batch(ctx: Context, batch_file: str, batch_size: int) ->
None:
20 Exit with error if result is not 1 for any nested proof
22 cmd_ctx: CommandContext = ctx.obj
24 cmd_ctx.get_wrapper_snark(), batch_file)
25 inputs = aggregated_tx.ext_proof.inputs
26 results =
int(inputs[1], 16)
27 print(f
"results={hex(results)}")
29 expect_results = (1 << batch_size) - 1
30 if expect_results != results:
31 raise ClickException(
"at least one nested proof judged as invalid")