• 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

13.64
/src/lib/work_selector/inputs.ml
1
open Core_kernel
1✔
2
open Currency
3

4
module Test_inputs = struct
5
  module Transaction_witness = Int
6
  module Ledger_hash = Int
7
  module Sparse_ledger = Int
8
  module Transaction = Int
9
  module Ledger_proof_statement = Fee
10

11
  module Transaction_protocol_state = struct
12
    type 'a t = 'a
13
  end
14

15
  module Ledger_proof = struct
16
    type t = Fee.t [@@deriving hash, compare, sexp]
×
17
  end
18

19
  module Transaction_snark_work = struct
20
    type t = Fee.t
21

22
    let fee = Fn.id
23

24
    module Statement = struct
25
      type t = Transaction_snark.Statement.t One_or_two.t
26
    end
27
  end
28

29
  module Snark_pool = struct
30
    [%%versioned
31
    module Stable = struct
32
      [@@@no_toplevel_latest_type]
33

34
      module V2 = struct
35
        type t = Transaction_snark.Statement.Stable.V2.t One_or_two.Stable.V1.t
×
36
        [@@deriving hash, compare, sexp]
5✔
37

38
        let to_latest = Fn.id
39
      end
40
    end]
41

42
    module Work = Hashable.Make_binable (Stable.Latest)
43

44
    type t = Currency.Fee.t Work.Table.t
45

46
    let get_completed_work (t : t) = Work.Table.find t
×
47

48
    let create () = Work.Table.create ()
×
49

50
    let add_snark t ~work ~fee =
51
      Work.Table.update t work ~f:(function
×
52
        | None ->
×
53
            fee
54
        | Some fee' ->
×
55
            Currency.Fee.min fee fee' )
56
  end
57

58
  module Staged_ledger = struct
59
    type t =
60
      (int, Transaction_snark_work.t) Snark_work_lib.Work.Single.Spec.t List.t
61

62
    let work = Fn.id
63

64
    let all_work_pairs t ~get_state:_ = Ok (One_or_two.group_list t)
×
65
  end
66

67
  module Transition_frontier = struct
68
    type t = Staged_ledger.t
69

70
    type best_tip_view = unit
71

72
    let best_tip_pipe : t -> best_tip_view Pipe_lib.Broadcast_pipe.Reader.t =
73
     fun _t ->
74
      let reader, _writer = Pipe_lib.Broadcast_pipe.create () in
×
75
      reader
×
76

77
    let best_tip_staged_ledger = Fn.id
78

79
    let get_protocol_state _t _hash =
80
      Ok
×
81
        (Lazy.force Precomputed_values.for_unit_tests)
×
82
          .protocol_state_with_hashes
83
          .data
84
  end
85
end
86

87
module Implementation_inputs = struct
88
  open Mina_base
89
  open Mina_transaction
90
  module Ledger_hash = Ledger_hash
91
  module Sparse_ledger = Mina_ledger.Sparse_ledger
92
  module Transaction = Transaction
93
  module Transaction_witness = Transaction_witness
94
  module Ledger_proof = Ledger_proof
95
  module Transaction_snark_work = Transaction_snark_work
96
  module Snark_pool = Network_pool.Snark_pool
97
  module Staged_ledger = Staged_ledger
98
  module Transaction_protocol_state = Transaction_protocol_state
99

100
  module Transition_frontier = struct
101
    type t = Transition_frontier.t
102

103
    type best_tip_view = Extensions.Best_tip_diff.view
104

105
    let best_tip_pipe : t -> best_tip_view Pipe_lib.Broadcast_pipe.Reader.t =
106
     fun t ->
107
      let open Transition_frontier.Extensions in
×
108
      let extensions = Transition_frontier.extensions t in
109
      get_view_pipe extensions Best_tip_diff
×
110

111
    let best_tip_staged_ledger t =
112
      Transition_frontier.(best_tip t |> Breadcrumb.staged_ledger)
×
113

114
    let get_protocol_state t state_hash =
115
      match Transition_frontier.find_protocol_state t state_hash with
×
116
      | Some p ->
×
117
          Ok p
118
      | None ->
×
119
          Or_error.errorf
120
            !"Protocol state with hash %{sexp: State_hash.t} not found"
×
121
            state_hash
122
  end
123
end
1✔
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