• 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

47.37
/src/lib/pickles/composition_types/digest.ml
1
open Pickles_types
11✔
2
open Core_kernel
3
module Limbs = Nat.N4
4

5
module Constant = struct
6
  include Limb_vector.Constant.Make (Limbs)
7

8
  [%%versioned
9
  module Stable = struct
10
    [@@@no_toplevel_latest_type]
11

12
    module V1 = struct
13
      type t =
11✔
14
        Limb_vector.Constant.Hex64.Stable.V1.t Vector.Vector_4.Stable.V1.t
×
15
      [@@deriving compare, sexp, yojson, hash, equal]
55✔
16

17
      let to_latest = Fn.id
18
    end
19
  end]
20

21
  (* Force the typechecker to verify that these types are equal. *)
22
  let (_ : (t, Stable.Latest.t) Type_equal.t) = Type_equal.T
23

24
  open Backend
25

26
  let to_tick_field x = Tick.Field.of_bits (to_bits x)
×
27

28
  let to_tock_field x = Tock.Field.of_bits (to_bits x)
×
29

30
  let of_tick_field x = of_bits (Tick.Field.to_bits x)
×
31
end
32

33
module Make (Impl : Snarky_backendless.Snark_intf.Run) = struct
34
  open Impl
35

36
  type t = Field.t
37

38
  let to_bits = Field.choose_preimage_var ~length:Field.size_in_bits
39

40
  module Unsafe = struct
41
    let to_bits_unboolean x =
42
      with_label __LOC__ (fun () ->
×
43
          let length = Field.size_in_bits in
×
44
          let res =
45
            exists
46
              (Typ.list Boolean.typ_unchecked ~length)
×
47
              ~compute:As_prover.(fun () -> Field.Constant.unpack (read_var x))
×
48
          in
49
          Field.Assert.equal x (Field.project res) ;
×
50
          res )
×
51
  end
52

53
  let () = assert (Field.size_in_bits < 64 * Nat.to_int Limbs.n)
231✔
54

55
  module Constant = struct
56
    include Constant
57

58
    let to_bits x = List.take (to_bits x) Field.size_in_bits
4✔
59
  end
60

61
  let typ =
62
    Typ.transport Field.typ
231✔
63
      ~there:(Fn.compose Field.Constant.project Constant.to_bits)
231✔
64
      ~back:(Fn.compose Constant.of_bits Field.Constant.unpack)
231✔
65
end
22✔
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