Skip to content

Commit

Permalink
refactor branch_data
Browse files Browse the repository at this point in the history
  • Loading branch information
Izaak Meckler committed Jun 3, 2022
1 parent 1c37781 commit 64782d5
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/lib/pickles/types_map.ml
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ module For_step = struct
; value_to_field_elements : 'a_value -> Tick.Field.t array
; var_to_field_elements : 'a_var -> Impls.Step.Field.t array
; wrap_key : inner_curve_var Plonk_verification_key_evals.t
; wrap_domains : Domains.t
; wrap_domain :
[ `Known of Domain.t
| `Side_loaded of
Impls.Step.field Pickles_base.Proofs_verified.One_hot.Checked.t ]
; step_domains : [ `Known of (Domains.t, 'branches) Vector.t | `Side_loaded ]
; max_width : Side_loaded_verification_key.Width.Checked.t option
}

let of_side_loaded (type a b c d)
Expand Down Expand Up @@ -183,11 +185,8 @@ module For_step = struct
; value_to_field_elements
; var_to_field_elements
; wrap_key = index.wrap_index
; wrap_domains =
Common.wrap_domains
~proofs_verified:(Nat.to_int (Nat.Add.n max_proofs_verified))
; wrap_domain = `Side_loaded index.max_proofs_verified
; step_domains = `Side_loaded
; max_width = Some index.max_width
}

let of_compiled
Expand All @@ -203,7 +202,6 @@ module For_step = struct
} :
_ Compiled.t ) =
{ branches
; max_width = None
; max_proofs_verified
; proofs_verifieds =
`Known (Vector.map proofs_verifieds ~f:Impls.Step.Field.of_int)
Expand All @@ -213,7 +211,7 @@ module For_step = struct
; wrap_key =
Plonk_verification_key_evals.map (Lazy.force wrap_key)
~f:Step_main_inputs.Inner_curve.constant
; wrap_domains
; wrap_domain = `Known wrap_domains.h
; step_domains = `Known step_domains
}
end
Expand Down

0 comments on commit 64782d5

Please sign in to comment.