@@ -189,6 +189,7 @@ pub fn caml_pasta_fp_plonk_proof_create_and_verify(
189189#[ ocaml:: func]
190190pub fn caml_pasta_fp_plonk_proof_example_with_lookup (
191191 srs : CamlFpSrs ,
192+ lazy_mode : bool ,
192193) -> (
193194 CamlPastaFpPlonkIndex ,
194195 CamlFp ,
@@ -279,13 +280,14 @@ pub fn caml_pasta_fp_plonk_proof_example_with_lookup(
279280 . runtime ( Some ( runtime_tables_setup) )
280281 . lookup ( fixed_tables)
281282 . public ( num_public_inputs)
283+ . lazy_mode ( lazy_mode)
282284 . build ( )
283285 . unwrap ( ) ;
284286
285287 srs. 0 . with_lagrange_basis ( cs. domain . d1 ) ;
286288
287289 let ( endo_q, _endo_r) = endos :: < Pallas > ( ) ;
288- let index = ProverIndex :: < Vesta , OpeningProof < Vesta > > :: create ( cs, endo_q, srs. 0 ) ;
290+ let index = ProverIndex :: < Vesta , OpeningProof < Vesta > > :: create ( cs, endo_q, srs. 0 , lazy_mode ) ;
289291 let group_map = <Vesta as CommitmentCurve >:: Map :: setup ( ) ;
290292 let public_input = witness[ 0 ] [ 0 ] ;
291293 let proof = ProverProof :: create_recursive :: < EFqSponge , EFrSponge , _ > (
@@ -312,6 +314,7 @@ pub fn caml_pasta_fp_plonk_proof_example_with_lookup(
312314#[ ocaml:: func]
313315pub fn caml_pasta_fp_plonk_proof_example_with_foreign_field_mul (
314316 srs : CamlFpSrs ,
317+ lazy_mode : bool ,
315318) -> (
316319 CamlPastaFpPlonkIndex ,
317320 CamlProofWithPublic < CamlGVesta , CamlFp > ,
@@ -443,12 +446,15 @@ pub fn caml_pasta_fp_plonk_proof_example_with_foreign_field_mul(
443446 }
444447
445448 // Create constraint system
446- let cs = ConstraintSystem :: < Fp > :: create ( gates) . build ( ) . unwrap ( ) ;
449+ let cs = ConstraintSystem :: < Fp > :: create ( gates)
450+ . lazy_mode ( lazy_mode)
451+ . build ( )
452+ . unwrap ( ) ;
447453
448454 srs. 0 . with_lagrange_basis ( cs. domain . d1 ) ;
449455
450456 let ( endo_q, _endo_r) = endos :: < Pallas > ( ) ;
451- let index = ProverIndex :: < Vesta , OpeningProof < Vesta > > :: create ( cs, endo_q, srs. 0 ) ;
457+ let index = ProverIndex :: < Vesta , OpeningProof < Vesta > > :: create ( cs, endo_q, srs. 0 , lazy_mode ) ;
452458 let group_map = <Vesta as CommitmentCurve >:: Map :: setup ( ) ;
453459 let proof = ProverProof :: create_recursive :: < EFqSponge , EFrSponge , _ > (
454460 & group_map,
@@ -470,6 +476,7 @@ pub fn caml_pasta_fp_plonk_proof_example_with_foreign_field_mul(
470476#[ ocaml:: func]
471477pub fn caml_pasta_fp_plonk_proof_example_with_range_check (
472478 srs : CamlFpSrs ,
479+ lazy_mode : bool ,
473480) -> (
474481 CamlPastaFpPlonkIndex ,
475482 CamlProofWithPublic < CamlGVesta , CamlFp > ,
@@ -511,12 +518,15 @@ pub fn caml_pasta_fp_plonk_proof_example_with_range_check(
511518 }
512519
513520 // Create constraint system
514- let cs = ConstraintSystem :: < Fp > :: create ( gates) . build ( ) . unwrap ( ) ;
521+ let cs = ConstraintSystem :: < Fp > :: create ( gates)
522+ . lazy_mode ( lazy_mode)
523+ . build ( )
524+ . unwrap ( ) ;
515525
516526 srs. 0 . with_lagrange_basis ( cs. domain . d1 ) ;
517527
518528 let ( endo_q, _endo_r) = endos :: < Pallas > ( ) ;
519- let index = ProverIndex :: < Vesta , OpeningProof < Vesta > > :: create ( cs, endo_q, srs. 0 ) ;
529+ let index = ProverIndex :: < Vesta , OpeningProof < Vesta > > :: create ( cs, endo_q, srs. 0 , lazy_mode ) ;
520530 let group_map = <Vesta as CommitmentCurve >:: Map :: setup ( ) ;
521531 let proof = ProverProof :: create_recursive :: < EFqSponge , EFrSponge , _ > (
522532 & group_map,
@@ -538,6 +548,7 @@ pub fn caml_pasta_fp_plonk_proof_example_with_range_check(
538548#[ ocaml:: func]
539549pub fn caml_pasta_fp_plonk_proof_example_with_range_check0 (
540550 srs : CamlFpSrs ,
551+ lazy_mode : bool ,
541552) -> (
542553 CamlPastaFpPlonkIndex ,
543554 CamlProofWithPublic < CamlGVesta , CamlFp > ,
@@ -583,12 +594,15 @@ pub fn caml_pasta_fp_plonk_proof_example_with_range_check0(
583594 } ;
584595
585596 // not sure if theres a smarter way instead of the double unwrap, but should be fine in the test
586- let cs = ConstraintSystem :: < Fp > :: create ( gates) . build ( ) . unwrap ( ) ;
597+ let cs = ConstraintSystem :: < Fp > :: create ( gates)
598+ . lazy_mode ( lazy_mode)
599+ . build ( )
600+ . unwrap ( ) ;
587601
588602 srs. 0 . with_lagrange_basis ( cs. domain . d1 ) ;
589603
590604 let ( endo_q, _endo_r) = endos :: < Pallas > ( ) ;
591- let index = ProverIndex :: < Vesta , OpeningProof < Vesta > > :: create ( cs, endo_q, srs. 0 ) ;
605+ let index = ProverIndex :: < Vesta , OpeningProof < Vesta > > :: create ( cs, endo_q, srs. 0 , lazy_mode ) ;
592606 let group_map = <Vesta as CommitmentCurve >:: Map :: setup ( ) ;
593607 let proof = ProverProof :: create_recursive :: < EFqSponge , EFrSponge , _ > (
594608 & group_map,
@@ -610,6 +624,7 @@ pub fn caml_pasta_fp_plonk_proof_example_with_range_check0(
610624#[ ocaml:: func]
611625pub fn caml_pasta_fp_plonk_proof_example_with_ffadd (
612626 srs : CamlFpSrs ,
627+ lazy_mode : bool ,
613628) -> (
614629 CamlPastaFpPlonkIndex ,
615630 CamlFp ,
@@ -708,13 +723,14 @@ pub fn caml_pasta_fp_plonk_proof_example_with_ffadd(
708723 // be fine in the test
709724 let cs = ConstraintSystem :: < Fp > :: create ( gates)
710725 . public ( num_public_inputs)
726+ . lazy_mode ( lazy_mode)
711727 . build ( )
712728 . unwrap ( ) ;
713729
714730 srs. 0 . with_lagrange_basis ( cs. domain . d1 ) ;
715731
716732 let ( endo_q, _endo_r) = endos :: < Pallas > ( ) ;
717- let index = ProverIndex :: < Vesta , OpeningProof < Vesta > > :: create ( cs, endo_q, srs. 0 ) ;
733+ let index = ProverIndex :: < Vesta , OpeningProof < Vesta > > :: create ( cs, endo_q, srs. 0 , lazy_mode ) ;
718734 let group_map = <Vesta as CommitmentCurve >:: Map :: setup ( ) ;
719735 let public_input = witness[ 0 ] [ 0 ] ;
720736 let proof = ProverProof :: create_recursive :: < EFqSponge , EFrSponge , _ > (
@@ -738,6 +754,7 @@ pub fn caml_pasta_fp_plonk_proof_example_with_ffadd(
738754#[ ocaml:: func]
739755pub fn caml_pasta_fp_plonk_proof_example_with_xor (
740756 srs : CamlFpSrs ,
757+ lazy_mode : bool ,
741758) -> (
742759 CamlPastaFpPlonkIndex ,
743760 ( CamlFp , CamlFp ) ,
@@ -799,13 +816,14 @@ pub fn caml_pasta_fp_plonk_proof_example_with_xor(
799816 // be fine in the test
800817 let cs = ConstraintSystem :: < Fp > :: create ( gates)
801818 . public ( num_public_inputs)
819+ . lazy_mode ( lazy_mode)
802820 . build ( )
803821 . unwrap ( ) ;
804822
805823 srs. 0 . with_lagrange_basis ( cs. domain . d1 ) ;
806824
807825 let ( endo_q, _endo_r) = endos :: < Pallas > ( ) ;
808- let index = ProverIndex :: < Vesta , OpeningProof < Vesta > > :: create ( cs, endo_q, srs. 0 ) ;
826+ let index = ProverIndex :: < Vesta , OpeningProof < Vesta > > :: create ( cs, endo_q, srs. 0 , lazy_mode ) ;
809827 let group_map = <Vesta as CommitmentCurve >:: Map :: setup ( ) ;
810828 let public_input = ( witness[ 0 ] [ 0 ] , witness[ 0 ] [ 1 ] ) ;
811829 let proof = ProverProof :: create_recursive :: < EFqSponge , EFrSponge , _ > (
@@ -829,6 +847,7 @@ pub fn caml_pasta_fp_plonk_proof_example_with_xor(
829847#[ ocaml:: func]
830848pub fn caml_pasta_fp_plonk_proof_example_with_rot (
831849 srs : CamlFpSrs ,
850+ lazy_mode : bool ,
832851) -> (
833852 CamlPastaFpPlonkIndex ,
834853 ( CamlFp , CamlFp ) ,
@@ -893,13 +912,14 @@ pub fn caml_pasta_fp_plonk_proof_example_with_rot(
893912 // be fine in the test
894913 let cs = ConstraintSystem :: < Fp > :: create ( gates)
895914 . public ( num_public_inputs)
915+ . lazy_mode ( lazy_mode)
896916 . build ( )
897917 . unwrap ( ) ;
898918
899919 srs. 0 . with_lagrange_basis ( cs. domain . d1 ) ;
900920
901921 let ( endo_q, _endo_r) = endos :: < Pallas > ( ) ;
902- let index = ProverIndex :: < Vesta , OpeningProof < Vesta > > :: create ( cs, endo_q, srs. 0 ) ;
922+ let index = ProverIndex :: < Vesta , OpeningProof < Vesta > > :: create ( cs, endo_q, srs. 0 , lazy_mode ) ;
903923 let group_map = <Vesta as CommitmentCurve >:: Map :: setup ( ) ;
904924 let public_input = ( witness[ 0 ] [ 0 ] , witness[ 0 ] [ 1 ] ) ;
905925 let proof = ProverProof :: create_recursive :: < EFqSponge , EFrSponge , _ > (
0 commit comments