Skip to content

Commit

Permalink
Merge branch 'tmp' into feature/async-exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mitschabaude committed Mar 5, 2024
2 parents 8cbda0b + 199d662 commit a306b33
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/base/snark0.ml
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,10 @@ module Run = struct
~eval_constraints:false ~num_inputs:0 ~next_auxiliary:(ref 0)
~with_witness:false ~stack:[] ~is_running:false () )

let get_state () = !state

let set_state s = state := s

let dump () = Run_state.dump !state

let in_prover () : bool = Run_state.has_witness !state
Expand Down
6 changes: 4 additions & 2 deletions src/base/snark_intf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1122,8 +1122,10 @@ module type Run_basic = sig
(** The finite field over which the R1CS operates. *)
type field

(* a reference to the internal Run_state.t *)
val state : field Run_state.t ref
(* get and set the internal Run_state.t *)
val get_state : unit -> field Run_state.t

val set_state : field Run_state.t -> unit

module Bigint : sig
include Snarky_intf.Bigint_intf.Extended with type field := field
Expand Down

0 comments on commit a306b33

Please # to comment.