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

[develop] Commenting some wrap related code #14309

Closed
wants to merge 1 commit into from
Closed
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
41 changes: 32 additions & 9 deletions src/lib/pickles/wrap_main.mli
Original file line number Diff line number Diff line change
@@ -1,24 +1,47 @@
open Pickles_types

(** [wrap_main] is the SNARK function for wrapping any proof coming from the given set of
keys **)
(** [wrap_main] is the SNARK function for wrapping any proof coming from the given set of keys.

The arguments are:
- [feature_flags] TODO
- [full_signature] TODO
- [pi_branches] TODO
- [step_keys] are the verifications keys for each step proofs. The size of
the vector is given by [`branches].
- [step_widths] TODO
- [step_domains] are the domains for each verification keys. The size of the
vector is given by [`branches].
- [~srs] TODO
- [max_proofs_verified] TODO

The output of the function is a tuple (req, main_fn) where:
- [req] TODO
- [main_fn] is the main function that will be used by the wrap prover and
wrap verifier.
*)
val wrap_main :
feature_flags:Opt.Flag.t Plonk_types.Features.Full.t
-> ( 'max_proofs_verified
, 'branches
(* number of step proofs *)
, 'max_local_max_proofs_verifieds )
Full_signature.t
-> ('prev_varss, 'branches) Pickles_types.Hlist.Length.t
-> ( ( Wrap_main_inputs.Inner_curve.Constant.t
, Wrap_main_inputs.Inner_curve.Constant.t option )
(* full_signature *)
-> ('prev_varss, 'branches) Pickles_types.Hlist.Length.t (* pi_branches *)
-> ( ( Wrap_main_inputs.Inner_curve.Constant.t (* commitments *)
, Wrap_main_inputs.Inner_curve.Constant.t option
(* optional commitments *) )
Wrap_verifier.index'
, 'branches )
, 'branches
(* number of vk *) )
Pickles_types.Vector.t
Core_kernel.Lazy.t
-> (int, 'branches) Pickles_types.Vector.t
-> (Import.Domains.t, 'branches) Pickles_types.Vector.t
-> srs:Kimchi_bindings.Protocol.SRS.Fp.t
(* step_keys, verification keys for the wrap proofs *)
-> (int, 'branches) Pickles_types.Vector.t (* step_widths *)
-> (Import.Domains.t, 'branches) Pickles_types.Vector.t (* step_domains *)
-> srs:Kimchi_bindings.Protocol.SRS.Fp.t (* srs *)
-> (module Pickles_types.Nat.Add.Intf with type n = 'max_proofs_verified)
(* max_proofs_verified *)
-> ('max_proofs_verified, 'max_local_max_proofs_verifieds) Requests.Wrap.t
* ( ( Wrap_main_inputs.Impl.Field.t
, Wrap_verifier.Scalar_challenge.t
Expand Down