• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MinaProtocol / mina / 2863

05 Nov 2024 06:20PM UTC coverage: 30.754% (-16.6%) from 47.311%
2863

push

buildkite

web-flow
Merge pull request #16296 from MinaProtocol/dkijania/more_multi_jobs

more multi jobs in CI

20276 of 65930 relevant lines covered (30.75%)

8631.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.43
/src/lib/pickles/wrap_proof.ml
1
open Pickles_types
10✔
2
open Import
3
open Backend
4

5
type dlog_opening = (Tock.Curve.Affine.t, Tock.Field.t) Types.Step.Bulletproof.t
6

7
module Constant = struct
8
  (* Out-of-circuit type for wrap proofs *)
9
  type t =
×
10
    { messages : Tock.Curve.Affine.t Plonk_types.Messages.t
11
    ; opening : dlog_opening
12
    }
13
  [@@deriving hlist]
14
end
15

16
open Step_main_inputs
17

18
module Checked = struct
19
  (* In-circuit type for wrap proofs *)
20
  type t =
76✔
21
    { messages :
22
        (Inner_curve.t, Impl.Boolean.var) Plonk_types.Messages.In_circuit.t
23
    ; opening :
24
        ( Inner_curve.t
25
        , Impls.Step.Other_field.t Shifted_value.Type2.t )
26
        Types.Step.Bulletproof.t
27
    }
28
  [@@deriving hlist]
29
end
30

31
open Impls.Step
32

33
let typ : (Checked.t, Constant.t) Typ.t =
34
  let shift = Shifted_value.Type2.Shift.create (module Tock.Field) in
35
  Typ.of_hlistable ~var_to_hlist:Checked.to_hlist ~var_of_hlist:Checked.of_hlist
10✔
36
    ~value_to_hlist:Constant.to_hlist ~value_of_hlist:Constant.of_hlist
37
    [ Plonk_types.Messages.typ
10✔
38
        (module Impl)
39
        Inner_curve.typ Plonk_types.Features.Full.none ~bool:Boolean.typ
40
        ~dummy:Inner_curve.Params.one
41
        ~commitment_lengths:(Commitment_lengths.default ~num_chunks:1)
42
    ; Types.Step.Bulletproof.typ ~length:(Nat.to_int Tock.Rounds.n)
10✔
43
        ( Typ.transport Other_field.typ
10✔
44
            ~there:(fun x ->
45
              (* When storing, make it a shifted value *)
46
              match
×
47
                Shifted_value.Type2.of_field (module Tock.Field) ~shift x
48
              with
49
              | Shifted_value x ->
×
50
                  x )
51
            ~back:(fun x ->
52
              Shifted_value.Type2.to_field
×
53
                (module Tock.Field)
54
                ~shift (Shifted_value x) )
55
        (* When reading, unshift *)
56
        |> Typ.transport_var
10✔
57
           (* For the var, we just wrap the now shifted underlying value. *)
58
             ~there:(fun (Shifted_value.Type2.Shifted_value x) -> x)
76✔
59
             ~back:(fun x -> Shifted_value x) )
76✔
60
        Inner_curve.typ
61
    ]
20✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc