@@ -458,8 +458,9 @@ module Proof_with_metric = struct
458
458
end
459
459
460
460
let construct_selector_result
461
- ~(instances : (Selector.Single.Spec.t * Proof_with_metric.t) One_or_two.t )
462
- ~fee ~prover =
461
+ ~(instances :
462
+ (_ Work.Single.Spec.t * _ Proof_with_metric.Poly.t) One_or_two.t ) ~fee
463
+ ~prover =
463
464
let proofs = One_or_two. map ~f: (fun (_ , { proof; _ } ) -> proof) instances in
464
465
let metrics =
465
466
One_or_two. map
@@ -476,7 +477,8 @@ let construct_selector_result
476
477
in
477
478
478
479
let instances = One_or_two. map ~f: (fun (single , _ ) -> single) instances in
479
- ({ proofs; metrics; spec = { instances; fee }; prover } : Selector.Result.t )
480
+ ( { proofs; metrics; spec = ({ instances; fee } : _ Work.Spec.t ); prover }
481
+ : _ Work.Result. t )
480
482
481
483
module Result = struct
482
484
module Poly = struct
@@ -553,53 +555,37 @@ module Result = struct
553
555
554
556
module V1 = struct
555
557
type t =
556
- { data :
557
- ( Transaction_witness.Stable.V2 .t
558
- , Transaction_snark.Zkapp_command_segment.Witness.Stable.V1 .t
559
- , Ledger_proof.Stable.V2 .t
560
- , Proof_with_metric.Stable.V1 .t )
561
- Spec.Poly.Stable.V1 .t
562
- ; prover : Signature_lib.Public_key.Compressed.Stable.V1 .t
563
- }
558
+ ( Transaction_witness.Stable.V2 .t
559
+ , Transaction_snark.Zkapp_command_segment.Witness.Stable.V1 .t
560
+ , Ledger_proof.Stable.V2 .t
561
+ , Proof_with_metric.Stable.V1 .t )
562
+ Spec.Poly.Stable.V1 .t
564
563
565
564
let to_latest = Fn. id
566
565
end
567
566
end ]
568
567
569
568
type t =
570
- { data :
571
- ( Transaction_witness .t
572
- , Transaction_snark.Zkapp_command_segment.Witness .t
573
- , Ledger_proof.Cached .t
574
- , Proof_with_metric .t )
575
- Spec.Poly .t
576
- ; prover : Signature_lib.Public_key.Compressed .t
577
- }
578
-
579
- let read_all_proofs_from_disk ({ data; prover } : t ) : Stable.Latest.t =
580
- let data =
581
- Spec.Poly. map ~f_witness: Transaction_witness. read_all_proofs_from_disk
582
- ~f_zkapp_command_segment_witness:
583
- Transaction_witness. Zkapp_command_segment_witness
584
- .read_all_proofs_from_disk
585
- ~f_proof: Ledger_proof.Cached. read_proof_from_disk
586
- ~f_metric: Proof_with_metric. read_all_proofs_from_disk data
587
- in
588
-
589
- { data; prover }
590
-
591
- let write_all_proofs_to_disk ~proof_cache_db
592
- ({ data; prover } : Stable.Latest.t ) : t =
593
- let data =
594
- Spec.Poly. map
595
- ~f_witness:
596
- (Transaction_witness. write_all_proofs_to_disk ~proof_cache_db )
597
- ~f_zkapp_command_segment_witness:
598
- (Transaction_witness. Zkapp_command_segment_witness
599
- .write_all_proofs_to_disk ~proof_cache_db )
600
- ~f_proof: (Ledger_proof.Cached. write_proof_to_disk ~proof_cache_db )
601
- ~f_metric: (Proof_with_metric. write_all_proofs_to_disk ~proof_cache_db )
602
- data
603
- in
604
- { data; prover }
569
+ ( Transaction_witness .t
570
+ , Transaction_snark.Zkapp_command_segment.Witness .t
571
+ , Ledger_proof.Cached .t
572
+ , Proof_with_metric .t )
573
+ Spec.Poly .t
574
+
575
+ let read_all_proofs_from_disk =
576
+ Spec.Poly. map ~f_witness: Transaction_witness. read_all_proofs_from_disk
577
+ ~f_zkapp_command_segment_witness:
578
+ Transaction_witness. Zkapp_command_segment_witness
579
+ .read_all_proofs_from_disk
580
+ ~f_proof: Ledger_proof.Cached. read_proof_from_disk
581
+ ~f_metric: Proof_with_metric. read_all_proofs_from_disk
582
+
583
+ let write_all_proofs_to_disk ~proof_cache_db =
584
+ Spec.Poly. map
585
+ ~f_witness: (Transaction_witness. write_all_proofs_to_disk ~proof_cache_db )
586
+ ~f_zkapp_command_segment_witness:
587
+ (Transaction_witness. Zkapp_command_segment_witness
588
+ .write_all_proofs_to_disk ~proof_cache_db )
589
+ ~f_proof: (Ledger_proof.Cached. write_proof_to_disk ~proof_cache_db )
590
+ ~f_metric: (Proof_with_metric. write_all_proofs_to_disk ~proof_cache_db )
605
591
end
0 commit comments