diff --git a/src/lib_scoru_wasm/test/ast_generators.ml b/src/lib_scoru_wasm/test/ast_generators.ml index 767a53e3f87683a27c3d7396a05b61bd35996b32..03e04c4e9cbea73640ab226c8719cb2e58a226bb 100644 --- a/src/lib_scoru_wasm/test/ast_generators.ml +++ b/src/lib_scoru_wasm/test/ast_generators.ml @@ -787,13 +787,16 @@ let step_kont_gen ~module_reg = sk_trapped_gen; ] -let config_gen ~host_funcs ~module_reg = +let buffers_gen = let* input = input_buffer_gen in let _input_list = Lwt_main.run @@ Lazy_vector.ZVector.to_list @@ Lazy_vector.Mutable.ZVector.snapshot input.content in - let* output = output_buffer_gen in + let+ output = output_buffer_gen in + Eval.{input; output} + +let config_gen ~host_funcs ~module_reg = let* stack_size_limit = small_int in let+ step_kont = step_kont_gen ~module_reg in - Eval.{input; output; step_kont; host_funcs; stack_size_limit} + Eval.{step_kont; host_funcs; stack_size_limit} diff --git a/src/lib_scoru_wasm/test/ast_printer.ml b/src/lib_scoru_wasm/test/ast_printer.ml index ea70d7aac27664d8f9e7704ab09c4be0215c4089..688d857089b3b30264ba699b431508f2efce16b7 100644 --- a/src/lib_scoru_wasm/test/ast_printer.ml +++ b/src/lib_scoru_wasm/test/ast_printer.ml @@ -544,15 +544,19 @@ let pp_output_buffer out (output : Output_buffer.t) = (pp_vector (fun o -> pp_index_vector o)) (Output_buffer.Level_Vector.snapshot output) -let pp_config out - Eval.{input; output; step_kont; host_funcs = _; stack_size_limit} = +let pp_buffers out Eval.{input; output} = Format.fprintf out - "@[{input = %a;@;output = %a;@;frame_kont = %a;@;budget = %i;@;}@]" + "@[{input = %a;@;output = %a;@;}@]" pp_input_buffer input pp_output_buffer output + +let pp_config out Eval.{step_kont; host_funcs = _; stack_size_limit} = + Format.fprintf + out + "@[{frame_kont = %a;@;budget = %i;@;}@]" pp_step_kont step_kont stack_size_limit diff --git a/src/lib_scoru_wasm/test/test_get_set.ml b/src/lib_scoru_wasm/test/test_get_set.ml index 98a5b0515612741280b565e69bb5058a635a62f8..3329fa9a9fb11413101b0a345a3c241098d535a2 100644 --- a/src/lib_scoru_wasm/test/test_get_set.ml +++ b/src/lib_scoru_wasm/test/test_get_set.ml @@ -87,6 +87,10 @@ let floppy_encoding = let inp_encoding = Tree_encoding.value ["input"; "0"; "1"] Data_encoding.string +(* Replicates the encoding of buffers from [Wasm_pvm] as part of the pvm_state. *) +let buffers_encoding = + Tree_encoding.scope ["pvm"; "buffers"] Wasm_encoding.buffers_encoding + let zero = WithExceptions.Option.get ~loc:__LOC__ @@ -124,7 +128,10 @@ let initialise_tree () = Wasm_pvm_sig.Input_required tree in - Lwt.return tree + Tree_encoding_runner.encode + buffers_encoding + (Tezos_webassembly_interpreter.Eval.buffers ()) + tree let make_inbox_info ~inbox_level ~message_counter = Wasm_pvm_sig. @@ -225,8 +232,6 @@ let test_set_input () = let tick_state = Eval. { - input = Input_buffer.alloc (); - output = Output_buffer.alloc (); host_funcs; step_kont = SK_Result (Vector.empty ()); stack_size_limit = 1000; @@ -274,17 +279,8 @@ let test_get_output () = let output = Output_buffer.alloc () in Output_buffer.set_level output 0l ; let* () = Output_buffer.set_value output @@ Bytes.of_string "hello" in - let tick_state = - Eval. - { - input = Input_buffer.alloc (); - output; - host_funcs; - step_kont = SK_Result (Vector.empty ()); - stack_size_limit = 1000; - } - in - let* tree = encode_tick_state ~host_funcs tick_state tree in + let buffers = Eval.{input = Input_buffer.alloc (); output} in + let* tree = Tree_encoding_runner.encode buffers_encoding buffers tree in let output_info = make_output_info ~outbox_level:0 ~message_index:0 in let* payload = Wasm.get_output output_info tree in assert (payload = "hello") ; diff --git a/src/lib_scoru_wasm/test/test_wasm_encoding.ml b/src/lib_scoru_wasm/test/test_wasm_encoding.ml index 07f090e28d1156d2850a793fe2189d0834e43a3b..0c3e797f148adbc8f89d9ee7fe1f81a6820160c7 100644 --- a/src/lib_scoru_wasm/test/test_wasm_encoding.ml +++ b/src/lib_scoru_wasm/test/test_wasm_encoding.ml @@ -121,19 +121,12 @@ let test_frame_tree = ~gen:(fun ~host_funcs:_ -> Ast_generators.frame_gen) ~encoding:(fun ~host_funcs:_ -> Wasm_encoding.frame_encoding) -(** Test serialize/deserialize input buffers and compare trees. *) -let test_input_buffer_tree = +(** Test serialize/deserialize input and output buffers and compare trees. *) +let test_buffers_tree = test_generic_tree - ~pp:Ast_printer.pp_input_buffer - ~gen:(fun ~host_funcs:_ ~module_reg:_ -> Ast_generators.input_buffer_gen) - ~encoding:(fun ~host_funcs:_ -> Wasm_encoding.input_buffer_encoding) - -(** Test serialize/deserialize output buffers and compare trees. *) -let test_output_buffer_tree = - test_generic_tree - ~pp:Ast_printer.pp_output_buffer - ~gen:(fun ~host_funcs:_ ~module_reg:_ -> Ast_generators.output_buffer_gen) - ~encoding:(fun ~host_funcs:_ -> Wasm_encoding.output_buffer_encoding) + ~pp:Ast_printer.pp_buffers + ~gen:(fun ~host_funcs:_ ~module_reg:_ -> Ast_generators.buffers_gen) + ~encoding:(fun ~host_funcs:_ -> Wasm_encoding.buffers_encoding) (** Test serialize/deserialize values and compare trees. *) let test_values_tree = @@ -167,8 +160,7 @@ let tests = tztest "Module trees" `Quick test_module_tree; tztest "Values trees" `Quick test_values_tree; tztest "Admin_instr trees" `Quick test_admin_instr_tree; - tztest "Input_buffer trees" `Quick test_input_buffer_tree; - tztest "Output_buffer trees" `Quick test_output_buffer_tree; + tztest "Input and output buffers trees" `Quick test_buffers_tree; tztest "Frame trees" `Quick test_frame_tree; tztest "Config trees" `Quick test_config_tree; ] diff --git a/src/lib_scoru_wasm/wasm_encoding.ml b/src/lib_scoru_wasm/wasm_encoding.ml index 5325c5197f1a63058499f6770d5af6b363dd9643..96ccefa95fdf712d9c5d2bbf539ec64c25f63224 100644 --- a/src/lib_scoru_wasm/wasm_encoding.ml +++ b/src/lib_scoru_wasm/wasm_encoding.ml @@ -1114,13 +1114,19 @@ let output_buffer_encoding = let config_encoding ~host_funcs = conv - (fun (input, output, step_kont, stack_size_limit) -> - Eval.{input; output; step_kont; host_funcs; stack_size_limit}) - (fun Eval.{input; output; step_kont; stack_size_limit; _} -> - (input, output, step_kont, stack_size_limit)) - (tup4 + (fun (step_kont, stack_size_limit) -> + Eval.{step_kont; host_funcs; stack_size_limit}) + (fun Eval.{step_kont; stack_size_limit; _} -> (step_kont, stack_size_limit)) + (tup2 ~flatten:true - (scope ["input"] input_buffer_encoding) - (scope ["output"] output_buffer_encoding) (scope ["step_kont"] step_kont_encoding) (value ["stack_size_limit"] Data_encoding.int31)) + +let buffers_encoding = + conv + (fun (input, output) -> Eval.{input; output}) + (fun Eval.{input; output; _} -> (input, output)) + (tup2 + ~flatten:true + (scope ["input"] input_buffer_encoding) + (scope ["output"] output_buffer_encoding)) diff --git a/src/lib_scoru_wasm/wasm_encoding.mli b/src/lib_scoru_wasm/wasm_encoding.mli index f4290c8438a78fcb543d6ff3e4fdb4f3c2f1afca..49d0fa6ba129f4a23ff548111fd2d6b1d82b8b79 100644 --- a/src/lib_scoru_wasm/wasm_encoding.mli +++ b/src/lib_scoru_wasm/wasm_encoding.mli @@ -98,3 +98,5 @@ val frame_encoding : Eval.frame Tree_encoding.t val config_encoding : host_funcs:Host_funcs.registry -> Eval.config Tree_encoding.t + +val buffers_encoding : Eval.buffers Tree_encoding.t diff --git a/src/lib_scoru_wasm/wasm_pvm.ml b/src/lib_scoru_wasm/wasm_pvm.ml index fa283b84c755a2489e04671cbf573fe55d155956..30b0a5cabc88f22cdfb0d6f98bfd1a87f51d9c29 100644 --- a/src/lib_scoru_wasm/wasm_pvm.ml +++ b/src/lib_scoru_wasm/wasm_pvm.ml @@ -50,6 +50,8 @@ type pvm_state = { durable : Durable.t; (** The durable storage of the PVM. *) module_reg : Wasm.Instance.module_reg; (** Module registry of the loaded kernel. *) + buffers : Wasm.Eval.buffers; + (** Input and outut buffers used by the PVM host functions. *) tick_state : tick_state; (** The current tick state. *) input_request : Wasm_pvm_sig.input_request; (** Signals whether or not the PVM needs input. *) @@ -123,6 +125,9 @@ struct | Wasm_pvm_sig.No_input_required -> false) (Tree_encoding.value ~default:false [] Data_encoding.bool) + let durable_buffers_encoding = + Tree_encoding.(scope ["pvm"; "buffers"] Wasm_encoding.buffers_encoding) + let pvm_state_encoding = let open Tree_encoding in conv @@ -130,6 +135,7 @@ struct current_tick, durable, module_reg, + buffers, tick_state, input_request ) -> { @@ -137,6 +143,12 @@ struct current_tick; durable; module_reg; + buffers = + (*`Gather_floppies` uses `get_info`, that decodes the state of the + PVM, which at the start of the rollup doesn't exist. *) + Option.value_f + ~default:Tezos_webassembly_interpreter.Eval.buffers + buffers; tick_state; input_request; }) @@ -145,6 +157,7 @@ struct current_tick; durable; module_reg; + buffers; tick_state; input_request; } -> @@ -152,20 +165,22 @@ struct current_tick, durable, module_reg, + Some buffers, tick_state, input_request )) - (tup6 + (tup7 ~flatten:true (value_option ["wasm"; "input"] Wasm_pvm_sig.input_info_encoding) (value ~default:Z.zero ["wasm"; "current_tick"] Data_encoding.n) (scope ["durable"] Durable.encoding) (scope ["modules"] Wasm_encoding.module_instances_encoding) + (option durable_buffers_encoding) (scope ["wasm"] tick_state_encoding) (scope ["input"; "consuming"] input_request_encoding)) let kernel_key = Durable.key_of_string_exn "/kernel/boot.wasm" - let unsafe_next_tick_state {module_reg; durable; tick_state; _} = + let unsafe_next_tick_state {module_reg; buffers; durable; tick_state; _} = let open Lwt_syntax in match tick_state with | Decode {module_kont = MKStop ast_module; _} -> @@ -243,6 +258,7 @@ struct ~check_module_exports:Exports_memory_0 ~module_reg ~self + buffers host_funcs ast_module externs @@ -252,7 +268,7 @@ struct | Eval eval_config -> let store = Durable.to_storage durable in let+ store', eval_config = - Wasm.Eval.step ~durable:store module_reg eval_config + Wasm.Eval.step ~durable:store module_reg eval_config buffers in let durable' = Durable.of_storage ~default:durable store' in (durable', Eval eval_config) @@ -355,20 +371,15 @@ struct let compute_step tree = compute_step_many ~max_steps:1L tree - let out_encoding = - Tree_encoding.scope - ["wasm"; "value"; "output"] - Wasm_encoding.output_buffer_encoding - let get_output output_info tree = let open Lwt_syntax in let open Wasm_pvm_sig in let {outbox_level; message_index} = output_info in let outbox_level = Bounded.Non_negative_int32.to_value outbox_level in - let* output_buffer = Tree_encoding_runner.decode out_encoding tree in - let+ payload = - Wasm.Output_buffer.get output_buffer outbox_level message_index + let* {output; _} = + Tree_encoding_runner.decode durable_buffers_encoding tree in + let+ payload = Wasm.Output_buffer.get output outbox_level message_index in Bytes.to_string payload let get_info tree = @@ -390,11 +401,11 @@ struct let* pvm_state = Tree_encoding_runner.decode pvm_state_encoding tree in let* tick_state = match pvm_state.tick_state with - | Eval {input; _} -> + | Eval _ -> let+ () = Wasm.Input_buffer.( enqueue - input + pvm_state.buffers.input { (* This is to distinguish (0) Inbox inputs from (1) DAL/Slot_header inputs. *) diff --git a/src/lib_webassembly/bin/script/run.ml b/src/lib_webassembly/bin/script/run.ml index e08e26fee9a1a0a2dc5e539506f064c04894a9f5..bd5b9708cb314fa45ea7ade911074fcee15a3bc2 100644 --- a/src/lib_webassembly/bin/script/run.ml +++ b/src/lib_webassembly/bin/script/run.ml @@ -325,7 +325,8 @@ let instantiate_module x_opt m imports = Instance.Module_key (Printf.sprintf "__unnamed_%i" index) | Some name -> Instance.Module_key name.it in - Eval.init ~module_reg:instances ~self host_funcs_registry m imports + let buffers = Eval.buffers () in + Eval.init ~module_reg:instances ~self buffers host_funcs_registry m imports let bind_lazy module_reg name instance = Option.iter diff --git a/src/lib_webassembly/exec/eval.ml b/src/lib_webassembly/exec/eval.ml index a412cb0c0a9b2ddc7c2615173c4a9c2f281b1bfc..9419dff1b73b0c0f539478a07ab3d38639d7dc7b 100644 --- a/src/lib_webassembly/exec/eval.ml +++ b/src/lib_webassembly/exec/eval.ml @@ -226,9 +226,9 @@ type step_kont = | SK_Result of value Vector.t | SK_Trapped of string phrase +type buffers = {input : input_inst; output : output_inst} + type config = { - input : input_inst; - output : output_inst; step_kont : step_kont; host_funcs : Host_funcs.registry; stack_size_limit : int; @@ -236,8 +236,11 @@ type config = { let frame inst locals = {inst; locals} -let config ?(input = Input_buffer.alloc ()) ?(output = Output_buffer.alloc ()) - host_funcs ?frame_arity inst vs es = +let buffers ?(input = Input_buffer.alloc ()) ?(output = Output_buffer.alloc ()) + () = + {input; output} + +let config host_funcs ?frame_arity inst vs es = let frame = frame inst (Vector.empty ()) in let label_kont = label_kont @@ -252,8 +255,6 @@ let config ?(input = Input_buffer.alloc ()) ?(output = Output_buffer.alloc ()) {frame_arity; frame_specs = frame; frame_label_kont = label_kont} in { - input; - output; step_kont = SK_Start (frame_stack, Vector.empty ()); host_funcs; stack_size_limit = 300; @@ -321,7 +322,7 @@ let block_type inst bt = let vmtake n vs = match n with Some n -> Vector.split vs n |> fst | None -> vs let invoke_step ?(durable = Durable_storage.empty) (module_reg : module_reg) c - frame at = function + buffers frame at = function | Inv_stop _ -> assert false | Inv_start {func; code = vs, es} -> ( let (FuncType (ins, out)) = func_type_of func in @@ -352,7 +353,12 @@ let invoke_step ?(durable = Durable_storage.empty) (module_reg : module_reg) c let* inst = resolve_module_ref module_reg frame.inst in let* args = Vector.to_list args in let+ durable, res = - f c.input c.output durable inst.memories (List.rev args) + f + buffers.input + buffers.output + durable + inst.memories + (List.rev args) in let vs' = Vector.prepend_list res vs' in (durable, Inv_stop {code = (vs', es); fresh_frame = None})) @@ -1235,10 +1241,11 @@ let label_step : Durable_storage.t -> module_reg -> config -> + buffers -> frame -> label_step_kont -> (Durable_storage.t * label_step_kont) Lwt.t = - fun durable module_reg c frame label_kont -> + fun durable module_reg c buffers frame label_kont -> match label_kont with | LS_Push_frame _ | LS_Modify_top _ -> assert false | LS_Start (Label_stack (label, stack)) -> @@ -1345,11 +1352,11 @@ let label_step : | None -> LS_Modify_top label_kont ) | LS_Craft_frame (label, istep) -> let+ durable, istep = - invoke_step ~durable module_reg c frame no_region istep + invoke_step ~durable module_reg c buffers frame no_region istep in (durable, LS_Craft_frame (label, istep)) -let frame_step durable module_reg c = function +let frame_step durable module_reg c buffers = function | SK_Result _ | SK_Trapped _ -> assert false | SK_Start (frame, stack) -> let+ kont = @@ -1394,18 +1401,18 @@ let frame_step durable module_reg c = function Lwt.return (durable, SK_Start (frame', Vector.cons frame stack)) | SK_Next (frame, stack, istep) -> let+ durable, istep = - label_step durable module_reg c frame.frame_specs istep + label_step durable module_reg c buffers frame.frame_specs istep in (durable, SK_Next (frame, stack, istep)) -let step ?(durable = Durable_storage.empty) module_reg c = +let step ?(durable = Durable_storage.empty) module_reg c buffers = match c.step_kont with | SK_Result _ | SK_Trapped _ -> assert false | kont -> - let+ durable, step_kont = frame_step durable module_reg c kont in + let+ durable, step_kont = frame_step durable module_reg c buffers kont in (durable, {c with step_kont}) -let rec eval durable module_reg (c : config) : +let rec eval durable module_reg (c : config) buffers : (Durable_storage.t * value list) Lwt.t = match c.step_kont with | SK_Result vs -> @@ -1413,8 +1420,8 @@ let rec eval durable module_reg (c : config) : (durable, values) | SK_Trapped {it = msg; at} -> Trap.error at msg | _ -> - let* durable, c = step ~durable module_reg c in - eval durable module_reg c + let* durable, c = step ~durable module_reg c buffers in + eval durable module_reg c buffers (* Functions & Constants *) @@ -1440,17 +1447,16 @@ let invoke ~module_reg ~caller ?(input = Input_buffer.alloc ()) let n = Vector.num_elements out in let c = config - ~input - ~output host_funcs ~frame_arity:n inst (Vector.of_list (List.rev vs)) (Vector.singleton (Invoke func @@ at)) in + let buffers = buffers ~input ~output () in Lwt.catch (fun () -> - let+ durable, values = eval durable module_reg c in + let+ durable, values = eval durable module_reg c buffers in (durable, List.rev values)) (function | Stack_overflow -> Exhaustion.error at "call stack exhausted" @@ -1470,14 +1476,14 @@ let eval_const_kont inst (const : const) = let eval_const_completed = function EC_Stop v -> Some v | _ -> None -let eval_const_step module_reg = function +let eval_const_step module_reg buffers = function | EC_Next {step_kont = SK_Result vs; _} -> if Vector.num_elements vs = 1l then let+ v, _ = Vector.pop vs in EC_Stop v else Crash.error Source.no_region "wrong number of results on stack" | EC_Next c -> - let+ _, c = step module_reg c in + let+ _, c = step module_reg c buffers in EC_Next c | EC_Stop _ -> assert false @@ -1508,11 +1514,11 @@ let create_global_completed (gtype, kont) = | Some v -> Some (Global.alloc gtype v) | None -> None -let create_global_step module_reg ((gtype, ekont) as kont) = +let create_global_step module_reg buffers ((gtype, ekont) as kont) = match create_global_completed kont with | Some _ -> assert false | None -> - let+ ekont = eval_const_step module_reg ekont in + let+ ekont = eval_const_step module_reg buffers ekont in (gtype, ekont) let create_export (inst : module_inst) (ex : export) : export_inst Lwt.t = @@ -1763,7 +1769,7 @@ let create_elem_completed : create_elem_kont -> elem_inst option = fun kont -> if tick_map_completed kont then Some (ref kont.map.destination) else None -let create_elem_step ~module_reg inst : +let create_elem_step ~module_reg buffers inst : create_elem_kont -> create_elem_kont Lwt.t = fun tick -> tick_map_step @@ -1772,7 +1778,7 @@ let create_elem_step ~module_reg inst : match eval_const_completed x with | Some x -> Some (as_ref x) | None -> None) - (eval_const_step module_reg) + (eval_const_step module_reg buffers) tick type exports_acc = {exports : extern NameMap.t; exports_memory_0 : bool} @@ -1839,10 +1845,11 @@ let section_inner_step : type kont a b. module_inst ModuleMap.t -> module_key -> + buffers -> (kont, a, b) init_section -> kont -> kont Lwt.t = - fun module_reg self -> + fun module_reg self buffers -> let lift_either f = let open Either in function @@ -1853,7 +1860,7 @@ let section_inner_step : in function | Func -> lift_either (create_func module_reg self) - | Global -> create_global_step module_reg + | Global -> create_global_step module_reg buffers | Table -> lift_either (fun x -> Lwt.return (create_table x)) | Memory -> lift_either (fun x -> Lwt.return (create_memory x)) @@ -1877,7 +1884,7 @@ type memory_export_rules = Exports_memory_0 | No_memory_export_rules exception Missing_memory_0_export let init_step ?(check_module_exports = No_memory_export_rules) ~module_reg ~self - host_funcs (m : module_) (exts : extern Vector.t) = function + buffers host_funcs (m : module_) (exts : extern Vector.t) = function | IK_Start -> (* Initialize as empty module. *) update_module_ref module_reg self empty_module_inst ; @@ -1916,7 +1923,7 @@ let init_step ?(check_module_exports = No_memory_export_rules) ~module_reg ~self tick_map_step (section_inner_kont self sec) (section_inner_completed sec) - (section_inner_step module_reg self sec) + (section_inner_step module_reg self buffers sec) tick in IK_Aggregate (inst0, sec, tick) @@ -1955,7 +1962,7 @@ let init_step ?(check_module_exports = No_memory_export_rules) ~module_reg ~self tick_map_step create_elem_kont create_elem_completed - (create_elem_step ~module_reg self) + (create_elem_step ~module_reg buffers self) tick in IK_Elems (inst0, tick) @@ -2013,18 +2020,25 @@ let init_step ?(check_module_exports = No_memory_export_rules) ~module_reg ~self Lwt.return (IK_Stop inst) | IK_Eval (_, {step_kont = SK_Trapped {it = msg; at}; _}) -> Trap.error at msg | IK_Eval (inst, config) -> - let+ _, config = step module_reg config in + let+ _, config = step module_reg config buffers in IK_Eval (inst, config) | IK_Stop _ -> raise (Init_step_error Init_step) -let init ~module_reg ~self host_funcs (m : module_) (exts : extern list) : - module_inst Lwt.t = +let init ~module_reg ~self buffers host_funcs (m : module_) (exts : extern list) + : module_inst Lwt.t = let open Lwt.Syntax in let rec go = function | IK_Stop inst -> Lwt.return inst | kont -> let* kont = - init_step ~module_reg ~self host_funcs m (Vector.of_list exts) kont + init_step + ~module_reg + ~self + buffers + host_funcs + m + (Vector.of_list exts) + kont in go kont in diff --git a/src/lib_webassembly/exec/eval.mli b/src/lib_webassembly/exec/eval.mli index 0f8888dd4c8cb3034a396a0037c942ef4dab4f16..473c9ffde0c368f8a6aebf31d999c40f96ec1a0f 100644 --- a/src/lib_webassembly/exec/eval.mli +++ b/src/lib_webassembly/exec/eval.mli @@ -126,9 +126,9 @@ type step_kont = | SK_Result of value Vector.t | SK_Trapped of string Source.phrase +type buffers = {input : input_inst; output : output_inst} + type config = { - input : input_inst; - output : output_inst; step_kont : step_kont; host_funcs : Host_funcs.registry; stack_size_limit : int; @@ -216,6 +216,7 @@ val init_step : ?check_module_exports:memory_export_rules -> module_reg:module_reg -> self:module_key -> + buffers -> Host_funcs.registry -> Ast.module_ -> extern Vector.t -> @@ -225,6 +226,7 @@ val init_step : val init : module_reg:module_reg -> self:module_key -> + buffers -> Host_funcs.registry -> Ast.module_ -> extern list -> @@ -245,14 +247,15 @@ val step : ?durable:Durable_storage.t -> module_reg -> config -> + buffers -> (Durable_storage.t * config) Lwt.t val config : - ?input:input_inst -> - ?output:output_inst -> Host_funcs.registry -> ?frame_arity:int32 (* The number of values returned by the computation *) -> module_key -> value Vector.t -> admin_instr Vector.t -> config + +val buffers : ?input:input_inst -> ?output:output_inst -> unit -> buffers diff --git a/src/proto_alpha/lib_protocol/test/integration/test_sc_rollup_wasm.ml b/src/proto_alpha/lib_protocol/test/integration/test_sc_rollup_wasm.ml index a56433f603b7b0e5650fff85882aa084acb227a8..7bcb0f61f788735de9fb83c60dc7247f57b588df 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_sc_rollup_wasm.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_sc_rollup_wasm.ml @@ -124,7 +124,7 @@ module Prover = Alpha_context.Sc_rollup.Wasm_2_0_0PVM.Make (WASM_P) pass. It should be updated to [16 * 1024] once the small ticks milestone is completed. *) -let proof_size_limit = 21_488 +let proof_size_limit = 21_550 let check_proof_size ~loc context input_opt s = let open Lwt_result_syntax in