@@ -43,6 +43,7 @@ export type BBSuccess = {
43
43
export type BBFailure = {
44
44
status : BB_RESULT . FAILURE ;
45
45
reason : string ;
46
+ retry ?: boolean ;
46
47
} ;
47
48
48
49
export type BBResult = BBSuccess | BBFailure ;
@@ -175,6 +176,7 @@ export async function generateKeyForNoirCircuit(
175
176
return {
176
177
status : BB_RESULT . FAILURE ,
177
178
reason : `Failed to generate key. Exit code: ${ result . exitCode } . Signal ${ result . signal } .` ,
179
+ retry : ! ! result . signal ,
178
180
} ;
179
181
} catch ( error ) {
180
182
return { status : BB_RESULT . FAILURE , reason : `${ error } ` } ;
@@ -245,6 +247,7 @@ export async function executeBbClientIvcProof(
245
247
return {
246
248
status : BB_RESULT . FAILURE ,
247
249
reason : `Failed to generate proof. Exit code ${ result . exitCode } . Signal ${ result . signal } .` ,
250
+ retry : ! ! result . signal ,
248
251
} ;
249
252
} catch ( error ) {
250
253
return { status : BB_RESULT . FAILURE , reason : `${ error } ` } ;
@@ -324,6 +327,7 @@ export async function computeVerificationKey(
324
327
return {
325
328
status : BB_RESULT . FAILURE ,
326
329
reason : `Failed to write VK. Exit code ${ result . exitCode } . Signal ${ result . signal } .` ,
330
+ retry : ! ! result . signal ,
327
331
} ;
328
332
} catch ( error ) {
329
333
return { status : BB_RESULT . FAILURE , reason : `${ error } ` } ;
@@ -396,6 +400,7 @@ export async function generateProof(
396
400
return {
397
401
status : BB_RESULT . FAILURE ,
398
402
reason : `Failed to generate proof. Exit code ${ result . exitCode } . Signal ${ result . signal } .` ,
403
+ retry : ! ! result . signal ,
399
404
} ;
400
405
} catch ( error ) {
401
406
return { status : BB_RESULT . FAILURE , reason : `${ error } ` } ;
@@ -470,6 +475,7 @@ export async function generateTubeProof(
470
475
return {
471
476
status : BB_RESULT . FAILURE ,
472
477
reason : `Failed to generate proof. Exit code ${ result . exitCode } . Signal ${ result . signal } .` ,
478
+ retry : ! ! result . signal ,
473
479
} ;
474
480
} catch ( error ) {
475
481
return { status : BB_RESULT . FAILURE , reason : `${ error } ` } ;
@@ -573,6 +579,7 @@ export async function generateAvmProof(
573
579
return {
574
580
status : BB_RESULT . FAILURE ,
575
581
reason : `Failed to generate proof. Exit code ${ result . exitCode } . Signal ${ result . signal } .` ,
582
+ retry : ! ! result . signal ,
576
583
} ;
577
584
} catch ( error ) {
578
585
return { status : BB_RESULT . FAILURE , reason : `${ error } ` } ;
@@ -648,6 +655,7 @@ export async function verifyClientIvcProof(
648
655
return {
649
656
status : BB_RESULT . FAILURE ,
650
657
reason : `Failed to verify proof. Exit code ${ result . exitCode } . Signal ${ result . signal } .` ,
658
+ retry : ! ! result . signal ,
651
659
} ;
652
660
} catch ( error ) {
653
661
return { status : BB_RESULT . FAILURE , reason : `${ error } ` } ;
@@ -690,6 +698,7 @@ async function verifyProofInternal(
690
698
return {
691
699
status : BB_RESULT . FAILURE ,
692
700
reason : `Failed to verify proof. Exit code ${ result . exitCode } . Signal ${ result . signal } .` ,
701
+ retry : ! ! result . signal ,
693
702
} ;
694
703
} catch ( error ) {
695
704
return { status : BB_RESULT . FAILURE , reason : `${ error } ` } ;
@@ -730,6 +739,7 @@ export async function writeVkAsFields(
730
739
return {
731
740
status : BB_RESULT . FAILURE ,
732
741
reason : `Failed to create vk as fields. Exit code ${ result . exitCode } . Signal ${ result . signal } .` ,
742
+ retry : ! ! result . signal ,
733
743
} ;
734
744
} catch ( error ) {
735
745
return { status : BB_RESULT . FAILURE , reason : `${ error } ` } ;
@@ -772,6 +782,7 @@ export async function writeProofAsFields(
772
782
return {
773
783
status : BB_RESULT . FAILURE ,
774
784
reason : `Failed to create proof as fields. Exit code ${ result . exitCode } . Signal ${ result . signal } .` ,
785
+ retry : ! ! result . signal ,
775
786
} ;
776
787
} catch ( error ) {
777
788
return { status : BB_RESULT . FAILURE , reason : `${ error } ` } ;
@@ -813,6 +824,7 @@ export async function generateContractForVerificationKey(
813
824
return {
814
825
status : BB_RESULT . FAILURE ,
815
826
reason : `Failed to write verifier contract. Exit code ${ result . exitCode } . Signal ${ result . signal } .` ,
827
+ retry : ! ! result . signal ,
816
828
} ;
817
829
} catch ( error ) {
818
830
return { status : BB_RESULT . FAILURE , reason : `${ error } ` } ;
0 commit comments