Skip to content

Commit be859db

Browse files
committed
Remove Zkapp_command.Verifiable.Stable
1 parent 83b9bdc commit be859db

File tree

3 files changed

+25
-50
lines changed

3 files changed

+25
-50
lines changed

src/lib/mina_base/user_command.ml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,11 @@ module Zero_one_or_two = struct
138138
end
139139

140140
module Verifiable = struct
141-
[%%versioned
142-
module Stable = struct
143-
module V2 = struct
144-
type t =
145-
( Signed_command.Stable.V2.t
146-
, Zkapp_command.Verifiable.Stable.V1.t )
147-
Poly.Stable.V2.t
148-
[@@deriving sexp, compare, equal, hash, yojson]
149-
150-
let to_latest = Fn.id
151-
end
152-
end]
141+
type t =
142+
( Signed_command.Stable.Latest.t
143+
, Zkapp_command.Verifiable.t )
144+
Poly.Stable.Latest.t
145+
[@@deriving sexp, compare, equal, hash, yojson, bin_io_unversioned]
153146

154147
let fee_payer (t : t) =
155148
match t with

src/lib/mina_base/zkapp_command.ml

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -402,24 +402,14 @@ let check_authorization (p : Account_update.t) : unit Or_error.t =
402402
Error err
403403

404404
module Verifiable : sig
405-
[%%versioned:
406-
module Stable : sig
407-
module V1 : sig
408-
type t = private
409-
{ fee_payer : Account_update.Fee_payer.Stable.V1.t
410-
; account_updates :
411-
( Side_loaded_verification_key.Stable.V2.t
412-
, Zkapp_basic.F.Stable.V1.t )
413-
With_hash.Stable.V1.t
414-
option
415-
Call_forest.With_hashes_and_data.Stable.V1.t
416-
; memo : Signed_command_memo.Stable.V1.t
417-
}
418-
[@@deriving sexp, compare, equal, hash, yojson]
419-
420-
val to_latest : t -> t
421-
end
422-
end]
405+
type t = private
406+
{ fee_payer : Account_update.Fee_payer.t
407+
; account_updates :
408+
(Side_loaded_verification_key.t, Zkapp_basic.F.t) With_hash.t option
409+
Call_forest.With_hashes_and_data.t
410+
; memo : Signed_command_memo.t
411+
}
412+
[@@deriving sexp, compare, equal, hash, yojson, bin_io]
423413

424414
val load_vk_from_ledger :
425415
location_of_account:(Account_id.t -> 'loc option)
@@ -472,24 +462,17 @@ module Verifiable : sig
472462
with type 'a Command_wrapper.t = 'a With_status.t
473463
and type cache = Verification_key_wire.t Account_id.Map.t
474464
end = struct
475-
[%%versioned
476-
module Stable = struct
477-
module V1 = struct
478-
type t =
479-
{ fee_payer : Account_update.Fee_payer.Stable.V1.t
480-
; account_updates :
481-
( Side_loaded_verification_key.Stable.V2.t
482-
, Zkapp_basic.F.Stable.V1.t )
483-
With_hash.Stable.V1.t
484-
option
485-
Call_forest.With_hashes_and_data.Stable.V1.t
486-
; memo : Signed_command_memo.Stable.V1.t
487-
}
488-
[@@deriving sexp, compare, equal, hash, yojson]
489-
490-
let to_latest = Fn.id
491-
end
492-
end]
465+
type t =
466+
{ fee_payer : Account_update.Fee_payer.Stable.Latest.t
467+
; account_updates :
468+
( Side_loaded_verification_key.Stable.Latest.t
469+
, Zkapp_basic.F.Stable.Latest.t )
470+
With_hash.Stable.Latest.t
471+
option
472+
Call_forest.With_hashes_and_data.Stable.Latest.t
473+
; memo : Signed_command_memo.Stable.Latest.t
474+
}
475+
[@@deriving sexp, compare, equal, hash, yojson, bin_io_unversioned]
493476

494477
let ok_if_vk_hash_expected ~got ~expected =
495478
if not @@ Zkapp_basic.F.equal (With_hash.hash got) expected then

src/lib/verifier/prod.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,7 @@ module Worker = struct
319319
; verify_commands =
320320
f
321321
( [%bin_type_class:
322-
User_command.Verifiable.Stable.Latest.t
323-
With_status.Stable.Latest.t
322+
User_command.Verifiable.t With_status.Stable.Latest.t
324323
With_id_tag.t
325324
list]
326325
, [%bin_type_class:

0 commit comments

Comments
 (0)