Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor pickles compile #255

Draft
wants to merge 1 commit into
base: v1
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ocaml/lib/pickles_bindings.ml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ let public_input_typ (i : int) = Typ.array ~length:i Field.typ
let statement_typ (input_size : int) (output_size : int) =
Typ.(array ~length:input_size Field.typ * array ~length:output_size Field.typ)

type proof = (Pickles_types.Nat.N0.n, Pickles_types.Nat.N0.n) Pickles.Proof.t

type ('prev_proof, 'proof) js_prover =
Public_input.Constant.t
-> 'prev_proof array
Expand Down Expand Up @@ -73,7 +75,8 @@ type pickles_rule_js =
; proofsToVerify :
< isSelf : bool Js.t Js.prop ; tag : Js.Unsafe.any Js.t Js.prop > Js.t
array
Js.prop >
Js.prop
; previousProofs : proof array Js.prop >
Js.t

module Choices = struct
Expand Down Expand Up @@ -497,8 +500,6 @@ module Cache = struct
[ d ]
end

type proof = (Pickles_types.Nat.N0.n, Pickles_types.Nat.N0.n) Pickles.Proof.t

module Public_inputs_with_proofs =
Pickles_types.Hlist.H3.T (Pickles.Statement_with_proof)

Expand Down
7 changes: 4 additions & 3 deletions ocaml/lib/pickles_bindings.mli
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ module Statement : sig
end
end

type proof = (Pickles_types.Nat.N0.n, Pickles_types.Nat.N0.n) Pickles.Proof.t

type pickles_rule_js =
< identifier : Js.js_string Js.t Js.prop
; main :
Expand All @@ -34,15 +36,14 @@ type pickles_rule_js =
; proofsToVerify :
< isSelf : bool Js.t Js.prop ; tag : Js.Unsafe.any Js.t Js.prop > Js.t
array
Js.prop >
Js.prop
; pickles_rule_js : proof array Js.prop >
Js.t

module Cache : sig
type js_storable
end

type proof = (Pickles_types.Nat.N0.n, Pickles_types.Nat.N0.n) Pickles.Proof.t

module Proof0 : sig
type t = (Pickles_types.Nat.N0.n, Pickles_types.Nat.N0.n) Pickles.Proof.t
end
Expand Down
Loading