diff --git a/src/lib/pickles/cache.ml b/src/lib/pickles/cache.ml index 8c4485f9409..81b66d61897 100644 --- a/src/lib/pickles/cache.ml +++ b/src/lib/pickles/cache.ml @@ -186,8 +186,9 @@ module Wrap = struct header path ) ) let read_or_generate - ~(custom_gate_type : (* TODO: JES: Delete this *) - Backend.Tick.Field.t Kimchi_types.polish_token array option ) + ~(custom_gate_type : + (* TODO: JES: Delete this *) + Backend.Tick.Field.t Kimchi_types.polish_token array option ) ~prev_challenges cache k_p k_v typ return_typ main = let module Vk = Verification_key in let open Impls.Wrap in @@ -203,6 +204,7 @@ module Wrap = struct (Keypair.create ~pk ~vk:(Backend.Tock.Keypair.vk pk), d) | Error _e -> let r = + (* JES: TODO: Try removing custom_gate_type here *) Common.time "wrapkeygen" (fun () -> constraint_system ~input_typ:typ ~return_typ main |> Keypair.generate ~custom_gate_type:None ~prev_challenges ) diff --git a/src/lib/pickles/cache.mli b/src/lib/pickles/cache.mli index 721db577032..7155fc44a0b 100644 --- a/src/lib/pickles/cache.mli +++ b/src/lib/pickles/cache.mli @@ -21,7 +21,8 @@ module Step : sig end val read_or_generate : - custom_gate_type:Impls.Step.Field.Constant.t Kimchi_types.polish_token array option + custom_gate_type: + Impls.Step.Field.Constant.t Kimchi_types.polish_token array option -> prev_challenges:int -> Key_cache.Spec.t list -> Key.Proving.t lazy_t @@ -61,7 +62,8 @@ module Wrap : sig end val read_or_generate : - custom_gate_type:Impls.Step.Field.Constant.t Kimchi_types.polish_token array option + custom_gate_type: + Impls.Step.Field.Constant.t Kimchi_types.polish_token array option -> prev_challenges:Core_kernel.Int.t -> Key_cache.Spec.t list -> Key.Proving.t Core_kernel.Lazy.t diff --git a/src/lib/pickles/compile.ml b/src/lib/pickles/compile.ml index f9effc27437..9108d861646 100644 --- a/src/lib/pickles/compile.ml +++ b/src/lib/pickles/compile.ml @@ -420,12 +420,12 @@ struct in let full_signature = { Full_signature.padded; maxes = (module Maxes) } in Timer.clock __LOC__ ; - (* Note: we have the limitation that the custom_gate_type for all choices must be the same *) let feature_flags, custom_gate_type = let rec go : type a b c d. (a, b, c, d) H4.T(IR).t - -> Opt.Flag.t Plonk_types.Features.Full.t * (Backend.Tick.Field.t Kimchi_types.polish_token array option) = + -> Opt.Flag.t Plonk_types.Features.Full.t + * Backend.Tick.Field.t Kimchi_types.polish_token array option = fun rules -> match rules with | [] -> @@ -440,8 +440,12 @@ struct , r.custom_gate_type ) | r :: rules -> let feature_flags, custom_gate_type = go rules in - (* JES: TODO Assert below *) - (* assert (custom_gate_type = r.custom_gate_type) ; *) + (* Note: For now we only support one choice when custom gates are defined *) + if + Option.is_some custom_gate_type + || Option.is_some r.custom_gate_type + then + failwith "Only a single choice is allowed with configurable gates" ; ( Plonk_types.Features.Full.map2 (Plonk_types.Features.to_full ~or_:( || ) r.feature_flags) feature_flags ~f:(fun enabled flag -> @@ -682,8 +686,11 @@ struct in let r = Common.time "wrap read or generate " (fun () -> - Cache.Wrap.read_or_generate (* Due to Wrap_hack *) - ~custom_gate_type:None (* We don't override custom gates on the wrap proof *) + Cache.Wrap.read_or_generate + (* Due to Wrap_hack *) + (* JES: TODO: Try removing custom_gate_type here *) + ~custom_gate_type:None + (* We don't override custom gates on the wrap proof *) (* Note: custom_gate_type needed for case when gate is overriden (true) and witness is valid *) ~prev_challenges:2 cache disk_key_prover disk_key_verifier typ (Snarky_backendless.Typ.unit ()) @@ -1136,7 +1143,8 @@ let compile_with_wrap_main_override_promise : in let custom_gate_type = let compiled = Types_map.lookup_compiled self.id in - compiled.custom_gate_type in + compiled.custom_gate_type + in let module P = struct type statement = value diff --git a/src/lib/pickles/compile.mli b/src/lib/pickles/compile.mli index 1b2845b35e2..b0da3b75636 100644 --- a/src/lib/pickles/compile.mli +++ b/src/lib/pickles/compile.mli @@ -125,7 +125,8 @@ module Side_loaded : sig name:string -> max_proofs_verified:(module Nat.Add.Intf with type n = 'n1) -> feature_flags:Opt.Flag.t Plonk_types.Features.t - -> custom_gate_type:Backend.Tick.Field.t Kimchi_types.polish_token array option + -> custom_gate_type: + Backend.Tick.Field.t Kimchi_types.polish_token array option -> typ:('var, 'value) Impls.Step.Typ.t -> ('var, 'value, 'n1, Verification_key.Max_branches.n) Tag.t diff --git a/src/lib/pickles/impls.mli b/src/lib/pickles/impls.mli index a8cbf9a6a5a..df4b50ed54a 100644 --- a/src/lib/pickles/impls.mli +++ b/src/lib/pickles/impls.mli @@ -21,7 +21,8 @@ module Step : sig val create : pk:Proving_key.t -> vk:Verification_key.t -> t val generate : - custom_gate_type:Impl.Field.Constant.t Kimchi_types.polish_token array option + custom_gate_type: + Impl.Field.Constant.t Kimchi_types.polish_token array option -> prev_challenges:int -> Kimchi_pasta_constraint_system.Vesta_constraint_system.t -> t @@ -110,7 +111,8 @@ module Wrap : sig val create : pk:Proving_key.t -> vk:Verification_key.t -> t val generate : - custom_gate_type:Impl.Field.Constant.t Kimchi_types.polish_token array option + custom_gate_type: + Impl.Field.Constant.t Kimchi_types.polish_token array option -> prev_challenges:int -> Kimchi_pasta_constraint_system.Pallas_constraint_system.t -> t diff --git a/src/lib/pickles/inductive_rule.ml b/src/lib/pickles/inductive_rule.ml index 298ca625da1..91b3d140ff2 100644 --- a/src/lib/pickles/inductive_rule.ml +++ b/src/lib/pickles/inductive_rule.ml @@ -116,7 +116,8 @@ type ( 'prev_vars 'a_var main_input -> ('prev_vars, 'widths, 'ret_var, 'auxiliary_var) main_return ; feature_flags : bool Pickles_types.Plonk_types.Features.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option } module T diff --git a/src/lib/pickles/inductive_rule.mli b/src/lib/pickles/inductive_rule.mli index 0705329245e..98f4d3e9315 100644 --- a/src/lib/pickles/inductive_rule.mli +++ b/src/lib/pickles/inductive_rule.mli @@ -114,7 +114,8 @@ type ( 'prev_vars 'a_var main_input -> ('prev_vars, 'widths, 'ret_var, 'auxiliary_var) main_return ; feature_flags : bool Pickles_types.Plonk_types.Features.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option } module T diff --git a/src/lib/pickles/pickles_intf.mli b/src/lib/pickles/pickles_intf.mli index 7d2143fce15..63c4fc5e2f4 100644 --- a/src/lib/pickles/pickles_intf.mli +++ b/src/lib/pickles/pickles_intf.mli @@ -235,7 +235,8 @@ module type S = sig 'a_var main_input -> ('prev_vars, 'widths, 'ret_var, 'auxiliary_var) main_return ; feature_flags : bool Pickles_types.Plonk_types.Features.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option } end @@ -244,7 +245,7 @@ module type S = sig val verify_promise : ?chunking_data:chunking_data - -> ?custom_gate_type: Backend.Tick.Field.t Kimchi_types.polish_token array + -> ?custom_gate_type:Backend.Tick.Field.t Kimchi_types.polish_token array -> (module Nat.Intf with type n = 'n) -> (module Statement_value_intf with type t = 'a) -> Verification_key.t @@ -341,7 +342,8 @@ module type S = sig name:string -> max_proofs_verified:(module Nat.Add.Intf with type n = 'n1) -> feature_flags:Opt.Flag.t Plonk_types.Features.t - -> custom_gate_type:Backend.Tick.Field.t Kimchi_types.polish_token array option + -> custom_gate_type: + Backend.Tick.Field.t Kimchi_types.polish_token array option -> typ:('var, 'value) Impls.Step.Typ.t -> ('var, 'value, 'n1, Verification_key.Max_branches.n) Tag.t diff --git a/src/lib/pickles/step_branch_data.ml b/src/lib/pickles/step_branch_data.ml index 06ab5f5f5a6..c0d7f27f320 100644 --- a/src/lib/pickles/step_branch_data.ml +++ b/src/lib/pickles/step_branch_data.ml @@ -53,7 +53,8 @@ type ( 'a_var and type return_value = 'ret_value and type auxiliary_value = 'auxiliary_value ) ; feature_flags : bool Plonk_types.Features.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option } -> ( 'a_var , 'a_value diff --git a/src/lib/pickles/step_branch_data.mli b/src/lib/pickles/step_branch_data.mli index f41ec829360..9d0864cda38 100644 --- a/src/lib/pickles/step_branch_data.mli +++ b/src/lib/pickles/step_branch_data.mli @@ -56,7 +56,8 @@ type ( 'a_var and type return_value = 'ret_value and type statement = 'a_value ) ; feature_flags : bool Plonk_types.Features.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option } -> ( 'a_var , 'a_value diff --git a/src/lib/pickles/step_verifier.ml b/src/lib/pickles/step_verifier.ml index 658f19ae50d..c98c2c96ec6 100644 --- a/src/lib/pickles/step_verifier.ml +++ b/src/lib/pickles/step_verifier.ml @@ -855,8 +855,7 @@ struct (* TODO: This needs to handle the fact of variable length evaluations. Meaning it needs opt sponge. *) let finalize_other_proof (type b branches) - (module Proofs_verified : Nat.Add.Intf with type n = b) - ?custom_gate_type + (module Proofs_verified : Nat.Add.Intf with type n = b) ~custom_gate_type ~(step_domains : [ `Known of (Domains.t, branches) Vector.t | `Side_loaded ] ) ~zk_rows ~(* TODO: Add "actual proofs verified" so that proofs don't diff --git a/src/lib/pickles/step_verifier.mli b/src/lib/pickles/step_verifier.mli index 7fc95d3a37e..6251301c1cd 100644 --- a/src/lib/pickles/step_verifier.mli +++ b/src/lib/pickles/step_verifier.mli @@ -38,7 +38,8 @@ val assert_n_bits : val finalize_other_proof : (module Pickles_types.Nat.Add.Intf with type n = 'b) - -> ?custom_gate_type:Backend.Tick.Field.t Kimchi_types.polish_token array option + -> custom_gate_type: + Backend.Tick.Field.t Kimchi_types.polish_token array option -> step_domains: [ `Known of (Import.Domains.t, 'branches) Pickles_types.Vector.t | `Side_loaded ] diff --git a/src/lib/pickles/test/customizable_gate/test_customizable_gate.ml b/src/lib/pickles/test/customizable_gate/test_customizable_gate.ml index 69518a1ad0b..b8938af5366 100644 --- a/src/lib/pickles/test/customizable_gate/test_customizable_gate.ml +++ b/src/lib/pickles/test/customizable_gate/test_customizable_gate.ml @@ -4,9 +4,9 @@ open Pickles.Impls.Step let perform_step_tests = true -let perform_recursive_tests = false +let perform_recursive_tests = true -let perform_step_choices_test = false +let perform_step_choices_test = true let () = Pickles.Backend.Tick.Keypair.set_urs_info [] @@ -212,8 +212,7 @@ let () = test ~step_only:true ~custom_gate_type:None ~valid_witness:true ; (* Customised as Conditional gate; valid witness *) (* Note: Requires Cache.Wrap.read_or_generate to have custom_gate_type passed to it *) - test ~step_only:true ~custom_gate_type:conditional_gate (* JES: TODO: custom gate def *) - ~valid_witness:true ; + test ~step_only:true ~custom_gate_type:conditional_gate ~valid_witness:true ; (* Customised as ForeignFieldAdd gate; invalid witness *) let test_failed = @@ -230,8 +229,7 @@ let () = let test_failed = try let _cs = - test ~step_only:true - ~custom_gate_type:conditional_gate (* JES: TODO: custom gate def *) + test ~step_only:true ~custom_gate_type:conditional_gate ~valid_witness:false in false @@ -246,9 +244,7 @@ let () = test ~step_only:false ~custom_gate_type:None ~valid_witness:true ; (* Customised as Conditional gate; valid witness *) - test ~step_only:false - ~custom_gate_type:None (* JES: TODO: custom gate def *) - ~valid_witness:true ; + test ~step_only:false ~custom_gate_type:conditional_gate ~valid_witness:true ; (* Customised as ForeignFieldAdd gate; invalid witness *) let test_failed = @@ -265,8 +261,7 @@ let () = let test_failed = try let _cs = - test ~step_only:false - ~custom_gate_type:None (* JES: TODO: custom gate def *) + test ~step_only:false ~custom_gate_type:conditional_gate ~valid_witness:false in false @@ -298,9 +293,7 @@ let () = ; prevs = [] ; main = (fun _ -> - create_customisable_circuit - ~custom_gate_type:None - (* JES: TODO: custom gate def *) + create_customisable_circuit ~custom_gate_type:None ~valid_witness:true ; { previous_proof_statements = [] @@ -310,14 +303,14 @@ let () = ; feature_flags = Pickles_types.Plonk_types.Features. { none_bool with foreign_field_add = true } - ; custom_gate_type = None (* JES: TODO: custom gate def *) + ; custom_gate_type = None } ; { identifier = "customizable gate (choice 2)" ; prevs = [] ; main = (fun _ -> - create_customisable_circuit ~custom_gate_type:None - ~valid_witness:true ; + create_customisable_circuit + ~custom_gate_type:conditional_gate ~valid_witness:true ; { previous_proof_statements = [] ; public_output = () @@ -326,7 +319,7 @@ let () = ; feature_flags = Pickles_types.Plonk_types.Features. { none_bool with foreign_field_add = true } - ; custom_gate_type = None + ; custom_gate_type = conditional_gate } ] ) () diff --git a/src/lib/pickles/test/customizable_optional_gate/customizable_optional_gate.ml b/src/lib/pickles/test/customizable_optional_gate/customizable_optional_gate.ml index 3048eb670e0..9a1484d2cd1 100644 --- a/src/lib/pickles/test/customizable_optional_gate/customizable_optional_gate.ml +++ b/src/lib/pickles/test/customizable_optional_gate/customizable_optional_gate.ml @@ -134,6 +134,36 @@ let register_feature_test (name, specific_feature_flags, custom_gate_type) = specific_feature_flags Plonk_types.Features.none_bool custom_gate_type custom_gate_type +(* User-supplied conditional gate in RPN + * w(0) = w(1) * w(3) + (1 - w(3)) * w(2) + *) +let conditional_gate = + Some + Kimchi_types. + [| Cell { col = Index ForeignFieldAdd; row = Curr } + ; Cell { col = Witness 3; row = Curr } + ; Dup + ; Mul + ; Cell { col = Witness 3; row = Curr } + ; Sub + ; Alpha + ; Pow 1l + ; Cell { col = Witness 0; row = Curr } + ; Cell { col = Witness 3; row = Curr } + ; Cell { col = Witness 1; row = Curr } + ; Mul + ; Literal (Impl.Field.Constant.of_int 1) + ; Cell { col = Witness 3; row = Curr } + ; Sub + ; Cell { col = Witness 2; row = Curr } + ; Mul + ; Add + ; Sub + ; Mul + ; Add + ; Mul + |] + let () = let configurations = [ ( "customizable gate (ffadd)" @@ -141,7 +171,7 @@ let () = , None ) ; ( "customizable gate (conditional)" , Plonk_types.Features.{ none_bool with foreign_field_add = true } - , None (* JES: TODO: set to gate definition *) ) + , conditional_gate ) ] in List.iter ~f:register_feature_test configurations ; diff --git a/src/lib/pickles/types_map.ml b/src/lib/pickles/types_map.ml index 92c88970cfb..9bca144baa3 100644 --- a/src/lib/pickles/types_map.ml +++ b/src/lib/pickles/types_map.ml @@ -19,7 +19,8 @@ module Basic = struct ; wrap_key : Tick.Inner_curve.Affine.t array Plonk_verification_key_evals.t ; wrap_vk : Impls.Wrap.Verification_key.t ; feature_flags : Opt.Flag.t Plonk_types.Features.Full.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option ; num_chunks : int ; zk_rows : int } @@ -42,7 +43,8 @@ module Side_loaded = struct { max_proofs_verified : (module Nat.Add.Intf with type n = 'n1) ; public_input : ('var, 'value) Impls.Step.Typ.t ; feature_flags : Opt.Flag.t Plonk_types.Features.Full.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option ; branches : 'n2 Nat.t ; num_chunks : int ; zk_rows : int @@ -102,7 +104,8 @@ module Compiled = struct ; wrap_domains : Domains.t ; step_domains : (Domains.t, 'branches) Vector.t ; feature_flags : Opt.Flag.t Plonk_types.Features.Full.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option ; num_chunks : int ; zk_rows : int } @@ -123,7 +126,8 @@ module Compiled = struct ; wrap_domains : Domains.t ; step_domains : (Domains.t, 'branches) Vector.t ; feature_flags : Opt.Flag.t Plonk_types.Features.Full.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option ; num_chunks : int ; zk_rows : int } @@ -173,7 +177,8 @@ module For_step = struct Impls.Step.field Pickles_base.Proofs_verified.One_hot.Checked.t ] ; step_domains : [ `Known of (Domains.t, 'branches) Vector.t | `Side_loaded ] ; feature_flags : Opt.Flag.t Plonk_types.Features.Full.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option ; num_chunks : int ; zk_rows : int } diff --git a/src/lib/pickles/types_map.mli b/src/lib/pickles/types_map.mli index 92073762c86..0baf88684c2 100644 --- a/src/lib/pickles/types_map.mli +++ b/src/lib/pickles/types_map.mli @@ -16,7 +16,8 @@ module Basic : sig Pickles_types.Plonk_verification_key_evals.t ; wrap_vk : Impls.Wrap.Verification_key.t ; feature_flags : Opt.Flag.t Plonk_types.Features.Full.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option ; num_chunks : int ; zk_rows : int } @@ -40,7 +41,8 @@ module Side_loaded : sig (module Pickles_types.Nat.Add.Intf with type n = 'n1) ; public_input : ('var, 'value) Impls.Step.Typ.t ; feature_flags : Opt.Flag.t Plonk_types.Features.Full.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option ; branches : 'n2 Pickles_types.Nat.t ; num_chunks : int ; zk_rows : int @@ -66,7 +68,8 @@ module Compiled : sig ; wrap_domains : Import.Domains.t ; step_domains : (Import.Domains.t, 'branches) Pickles_types.Vector.t ; feature_flags : Opt.Flag.t Plonk_types.Features.Full.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option ; num_chunks : int ; zk_rows : int } @@ -86,7 +89,8 @@ module Compiled : sig ; wrap_domains : Import.Domains.t ; step_domains : (Import.Domains.t, 'branches) Pickles_types.Vector.t ; feature_flags : Opt.Flag.t Plonk_types.Features.Full.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option ; num_chunks : int ; zk_rows : int } @@ -111,7 +115,8 @@ module For_step : sig [ `Known of (Import.Domains.t, 'branches) Pickles_types.Vector.t | `Side_loaded ] ; feature_flags : Opt.Flag.t Plonk_types.Features.Full.t - ; custom_gate_type : Backend.Tick.Field.t Kimchi_types.polish_token array option + ; custom_gate_type : + Backend.Tick.Field.t Kimchi_types.polish_token array option ; num_chunks : int ; zk_rows : int } diff --git a/src/lib/pickles/verify.ml b/src/lib/pickles/verify.ml index 4135d6aa9da..08b8361fe4b 100644 --- a/src/lib/pickles/verify.ml +++ b/src/lib/pickles/verify.ml @@ -123,11 +123,7 @@ let verify_heterogenous (ts : Instance.t list) = x.Instance.zk_rows ) in Wrap_deferred_values.expand_deferred ~evals ~zk_rows - ~old_bulletproof_challenges ~proof_state - ~custom_gate_type:custom_gate_type - (* ~custom_gate_type:branch_data.custom_gate_type *) - (* ~custom_gate_type:proof_state.deferred_values.branch_data.custom_gate_type *) - (* TODO: This is not working *) + ~old_bulletproof_challenges ~proof_state ~custom_gate_type in Timer.clock __LOC__ ; let deferred_values = { deferred_values with bulletproof_challenges } in @@ -254,5 +250,11 @@ let verify (type a n) ?chunking_data ?custom_gate_type (key : Verification_key.t) (ts : (a * (n, n) Proof.t) list) = verify_heterogenous (List.map ts ~f:(fun (x, p) -> - Instance.T (max_proofs_verified, a_value, chunking_data, custom_gate_type, key, x, p) ) - ) + Instance.T + ( max_proofs_verified + , a_value + , chunking_data + , custom_gate_type + , key + , x + , p ) ) ) diff --git a/src/lib/pickles/wrap.ml b/src/lib/pickles/wrap.ml index 3be447e652e..22349ff1ad6 100644 --- a/src/lib/pickles/wrap.ml +++ b/src/lib/pickles/wrap.ml @@ -474,6 +474,7 @@ let%test_module "gate finalization" = (* Call finalisation with all of the required details *) Step_verifier.finalize_other_proof (module Nat.N0) + ~custom_gate_type:None ~step_domains: (`Known [ { h = Pow_2_roots_of_unity vk.domain.log_size_of_group } ] diff --git a/src/lib/pickles/wrap.mli b/src/lib/pickles/wrap.mli index 165b80c8b59..a92fe8566f7 100644 --- a/src/lib/pickles/wrap.mli +++ b/src/lib/pickles/wrap.mli @@ -40,7 +40,8 @@ val wrap : -> step_plonk_indices:'d -> feature_flags:Opt.Flag.t Plonk_types.Features.Full.t -> actual_feature_flags:bool Plonk_types.Features.t - -> custom_gate_type:Impls.Step.Impl.field Kimchi_types.polish_token array option + -> custom_gate_type: + Impls.Step.Impl.field Kimchi_types.polish_token array option -> ?tweak_statement: ( ( Import.Challenge.Constant.t , Import.Challenge.Constant.t Import.Types.Scalar_challenge.t @@ -175,7 +176,8 @@ val combined_inner_product : -> xi:Backend.Tick.Field.t -> zeta:Backend.Tick.Field.t -> zetaw:Backend.Tick.Field.t - -> custom_gate_type:Backend.Tick.Field.t Kimchi_types.polish_token array option + -> custom_gate_type: + Backend.Tick.Field.t Kimchi_types.polish_token array option -> Backend.Tick.Field.t val challenge_polynomial : diff --git a/src/lib/pickles/wrap_deferred_values.mli b/src/lib/pickles/wrap_deferred_values.mli index fcb51df680e..9fcb10878bf 100644 --- a/src/lib/pickles/wrap_deferred_values.mli +++ b/src/lib/pickles/wrap_deferred_values.mli @@ -24,7 +24,8 @@ val expand_deferred : Step_bp_vec.t , Branch_data.t ) Types.Wrap.Proof_state.Minimal.t - -> custom_gate_type:Pasta_bindings.Fp.t Kimchi_types.polish_token array option + -> custom_gate_type: + Backend.Tick.Field.t Kimchi_types.polish_token array option -> ( ( Challenge.Constant.t , Challenge.Constant.t Kimchi_types.scalar_challenge , Pasta_bindings.Fp.t Shifted_value.Type1.t