From 0985dbaa8c8f9feebf2f8e541faa9a38be5e3b75 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Thu, 23 Jun 2022 16:42:11 +0200 Subject: [PATCH 1/7] SCORU/Node: minor simplification in inbox processing --- src/proto_alpha/bin_sc_rollup_node/inbox.ml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/proto_alpha/bin_sc_rollup_node/inbox.ml b/src/proto_alpha/bin_sc_rollup_node/inbox.ml index 6c587b880992..67264afdf985 100644 --- a/src/proto_alpha/bin_sc_rollup_node/inbox.ml +++ b/src/proto_alpha/bin_sc_rollup_node/inbox.ml @@ -73,14 +73,14 @@ end (* FIXME: https://gitlab.com/tezos/tezos/-/issues/3199 For the moment, the rollup node ignores L1 to L2 messages. *) -let get_messages l1_ctxt head rollup = +let get_messages Node_context.{l1_ctxt; rollup_address; _} head = let open Lwt_result_syntax in let* block = Layer1.fetch_tezos_block l1_ctxt head in let apply (type kind) accu ~source:_ (operation : kind manager_operation) _result = match operation with - | Sc_rollup_add_messages {rollup = rollup'; messages} - when Sc_rollup.Address.(rollup' = rollup) -> + | Sc_rollup_add_messages {rollup; messages} + when Sc_rollup.Address.(rollup = rollup_address) -> List.rev_append messages accu | _ -> accu in @@ -99,10 +99,10 @@ let get_messages l1_ctxt head rollup = in return (List.rev messages) -let process_head Node_context.({l1_ctxt; rollup_address; _} as node_ctxt) store - Layer1.(Head {level; hash = head_hash} as head) = +let process_head node_ctxt store Layer1.(Head {level; hash = head_hash} as head) + = let open Lwt_result_syntax in - let*! res = get_messages l1_ctxt head_hash rollup_address in + let*! res = get_messages node_ctxt head_hash in match res with | Error e -> head_processing_failure e | Ok [] -> return_unit -- GitLab From 48f12b9dc3a7a3cb62b34855ce072b1640a7d66b Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Tue, 28 Jun 2022 10:35:39 +0200 Subject: [PATCH 2/7] Proto/SCORU: expose message encoding --- src/proto_alpha/lib_protocol/alpha_context.mli | 2 ++ src/proto_alpha/lib_protocol/sc_rollup_inbox_message_repr.mli | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index b4aa6f4b162c..7235ef6faae8 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -2787,6 +2787,8 @@ module Sc_rollup : sig type serialized = private string + val encoding : t Data_encoding.t + val unsafe_of_string : string -> serialized val serialize : t -> serialized tzresult diff --git a/src/proto_alpha/lib_protocol/sc_rollup_inbox_message_repr.mli b/src/proto_alpha/lib_protocol/sc_rollup_inbox_message_repr.mli index 987b57e60b0a..7611afd6220a 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_inbox_message_repr.mli +++ b/src/proto_alpha/lib_protocol/sc_rollup_inbox_message_repr.mli @@ -63,6 +63,9 @@ type t = Internal of internal_inbox_message | External of string type serialized = private string +(** Encoding for messages from Layer 1 to Layer 2 *) +val encoding : t Data_encoding.t + (** [serialize msg] encodes the inbox message [msg] in binary format. *) val serialize : t -> serialized tzresult -- GitLab From 053cc3f793336df78cd1ce188f7d0eff6fe17814 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Thu, 23 Jun 2022 17:34:52 +0200 Subject: [PATCH 3/7] SCORU/Node: store structured inbox messages --- src/proto_alpha/bin_sc_rollup_node/inbox.ml | 12 ++++++------ src/proto_alpha/bin_sc_rollup_node/interpreter.ml | 5 +---- src/proto_alpha/bin_sc_rollup_node/store.ml | 13 +++++-------- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/proto_alpha/bin_sc_rollup_node/inbox.ml b/src/proto_alpha/bin_sc_rollup_node/inbox.ml index 67264afdf985..81f9270f20de 100644 --- a/src/proto_alpha/bin_sc_rollup_node/inbox.ml +++ b/src/proto_alpha/bin_sc_rollup_node/inbox.ml @@ -81,6 +81,11 @@ let get_messages Node_context.{l1_ctxt; rollup_address; _} head = match operation with | Sc_rollup_add_messages {rollup; messages} when Sc_rollup.Address.(rollup = rollup_address) -> + let messages = + List.map + (fun message -> Store.Inbox.Message.External message) + messages + in List.rev_append messages accu | _ -> accu in @@ -124,12 +129,7 @@ let process_head node_ctxt store Layer1.(Head {level; hash = head_hash} as head) @@ let*! history = State.history_of_hash store predecessor in let*! messages_tree = State.find_message_tree store predecessor in let*? level = Raw_level.of_int32 level in - let*? messages = - List.map_e - (fun message -> - Sc_rollup.Inbox.Message.(serialize @@ External message)) - messages - in + let*? messages = List.map_e Store.Inbox.Message.serialize messages in let* messages_tree, history, inbox = Store.Inbox.add_messages store diff --git a/src/proto_alpha/bin_sc_rollup_node/interpreter.ml b/src/proto_alpha/bin_sc_rollup_node/interpreter.ml index 38c15746e6a6..093a3c34b00b 100644 --- a/src/proto_alpha/bin_sc_rollup_node/interpreter.ml +++ b/src/proto_alpha/bin_sc_rollup_node/interpreter.ml @@ -98,10 +98,7 @@ module Make (PVM : Pvm.S) : S = struct let*! messages = Store.Messages.get store hash in let* state = List.fold_left_i_es - (fun message_counter state external_message -> - let message = - Sc_rollup.Inbox.Message.External external_message - in + (fun message_counter state message -> let*? payload = Environment.wrap_tzresult (Sc_rollup.Inbox.Message.serialize message) diff --git a/src/proto_alpha/bin_sc_rollup_node/store.ml b/src/proto_alpha/bin_sc_rollup_node/store.ml index 7ec698f4a639..d465aee1983e 100644 --- a/src/proto_alpha/bin_sc_rollup_node/store.ml +++ b/src/proto_alpha/bin_sc_rollup_node/store.ml @@ -23,7 +23,8 @@ (* *) (*****************************************************************************) -open Protocol.Alpha_context +open Protocol +open Alpha_context module Maker = Irmin_pack_unix.Maker (Tezos_context_encoding.Context.Conf) module IStore = struct @@ -410,14 +411,10 @@ module Messages = Make_append_only_map (struct let string_of_key = Block_hash.to_b58check - (* FIXME: https://gitlab.com/tezos/tezos/-/issues/3199 - For the moment, the rollup node ignores L1 to L2 messages. - When internal messages will also be considered, the following - should probably be changed into [Sc_rollup.Inbox.message list]. - *) - type value = string list + type value = Inbox.Message.t list - let value_encoding = Data_encoding.(list string) + let value_encoding = + Data_encoding.(list @@ dynamic_size Inbox.Message.encoding) end) (** Inbox state for each block *) -- GitLab From 36bcfcc25d892f0c558b58ef412d31bbea91ab33 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Thu, 23 Jun 2022 21:25:54 +0200 Subject: [PATCH 4/7] SCORU/Node: handle internal L1 to L2 messages Fixes #3199 --- src/proto_alpha/bin_sc_rollup_node/inbox.ml | 32 +++++++++++++------ .../bin_sc_rollup_node/layer1_services.ml | 4 +-- .../bin_sc_rollup_node/layer1_services.mli | 4 +-- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/src/proto_alpha/bin_sc_rollup_node/inbox.ml b/src/proto_alpha/bin_sc_rollup_node/inbox.ml index 81f9270f20de..9c99c15c1090 100644 --- a/src/proto_alpha/bin_sc_rollup_node/inbox.ml +++ b/src/proto_alpha/bin_sc_rollup_node/inbox.ml @@ -70,14 +70,13 @@ module State = struct let set_message_tree = Store.MessageTrees.set end -(* FIXME: https://gitlab.com/tezos/tezos/-/issues/3199 - For the moment, the rollup node ignores L1 to L2 messages. -*) let get_messages Node_context.{l1_ctxt; rollup_address; _} head = let open Lwt_result_syntax in let* block = Layer1.fetch_tezos_block l1_ctxt head in let apply (type kind) accu ~source:_ (operation : kind manager_operation) _result = + let open Result_syntax in + let+ accu = accu in match operation with | Sc_rollup_add_messages {rollup; messages} when Sc_rollup.Address.(rollup = rollup_address) -> @@ -89,16 +88,31 @@ let get_messages Node_context.{l1_ctxt; rollup_address; _} head = List.rev_append messages accu | _ -> accu in - let apply_internal (type kind) accu ~source:_ - (_operation : kind Apply_internal_results.internal_operation_contents) - (_result : + let apply_internal (type kind) accu ~source + (operation : kind Apply_internal_results.internal_operation) + (result : kind Apply_internal_results.successful_internal_operation_result) = - accu + let open Result_syntax in + let* accu = accu in + match (operation, result) with + | ( { + operation = Transaction {destination = Sc_rollup rollup; parameters; _}; + source = Originated sender; + _; + }, + ITransaction_result (Transaction_to_sc_rollup_result _) ) + when Sc_rollup.Address.(rollup = rollup_address) -> + let+ payload = + Environment.wrap_tzresult @@ Script_repr.force_decode parameters + in + let message = Store.Inbox.Message.{payload; sender; source} in + Store.Inbox.Message.Internal message :: accu + | _ -> return accu in - let messages = + let*? messages = Layer1_services.( process_applied_manager_operations - [] + (Ok []) block.operations {apply; apply_internal}) in diff --git a/src/proto_alpha/bin_sc_rollup_node/layer1_services.ml b/src/proto_alpha/bin_sc_rollup_node/layer1_services.ml index 6dcd12d01413..922c75ab8afe 100644 --- a/src/proto_alpha/bin_sc_rollup_node/layer1_services.ml +++ b/src/proto_alpha/bin_sc_rollup_node/layer1_services.ml @@ -40,7 +40,7 @@ type 'accu operation_processor = { 'kind. 'accu -> source:public_key_hash -> - 'kind Apply_internal_results.internal_operation_contents -> + 'kind Apply_internal_results.internal_operation -> 'kind Apply_internal_results.successful_internal_operation_result -> 'accu; } @@ -78,7 +78,7 @@ let process_applied_manager_operations operations accu f = and on_applied_internal_operations accu source internal_operation_results = let open Apply_internal_results in List.fold_left - (fun accu (Internal_operation_result ({operation; _}, result)) -> + (fun accu (Internal_operation_result (operation, result)) -> match result with | Applied result -> f.apply_internal accu ~source operation result | _ -> accu) diff --git a/src/proto_alpha/bin_sc_rollup_node/layer1_services.mli b/src/proto_alpha/bin_sc_rollup_node/layer1_services.mli index f6e5a10afecf..669cacbe8495 100644 --- a/src/proto_alpha/bin_sc_rollup_node/layer1_services.mli +++ b/src/proto_alpha/bin_sc_rollup_node/layer1_services.mli @@ -39,7 +39,7 @@ type 'accu operation_processor = { 'kind. 'accu -> source:public_key_hash -> - 'kind Apply_internal_results.internal_operation_contents -> + 'kind Apply_internal_results.internal_operation -> 'kind Apply_internal_results.successful_internal_operation_result -> 'accu; } @@ -48,4 +48,4 @@ type 'accu operation_processor = { folds over the list of [operations] applying [operator] to transform [accu] along the way. *) val process_applied_manager_operations : - 'a -> operation trace trace -> 'a operation_processor -> 'a + 'a -> operation list list -> 'a operation_processor -> 'a -- GitLab From 6436b9a3e06602b1afbe5db071ad06b21dd6824a Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Wed, 6 Jul 2022 23:25:15 +0200 Subject: [PATCH 5/7] Proto,SCORU,Arith_pvm: interpret internal messages --- src/proto_alpha/lib_protocol/sc_rollup_arith.ml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/proto_alpha/lib_protocol/sc_rollup_arith.ml b/src/proto_alpha/lib_protocol/sc_rollup_arith.ml index fe11af685a2c..6df3ffac0caa 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_arith.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_arith.ml @@ -837,15 +837,24 @@ module Make (Context : P) : let set_input_monadic {PS.inbox_level; message_counter; payload} = let open Monad.Syntax in - match Sc_rollup_inbox_message_repr.deserialize payload with - | Ok (External payload) -> + let payload = + match Sc_rollup_inbox_message_repr.deserialize payload with + | Error _ -> None + | Ok (External payload) -> Some payload + | Ok (Internal {payload; _}) -> ( + match Micheline.root payload with + | String (_, payload) -> Some payload + | _ -> None) + in + match payload with + | Some payload -> let* boot_sector = Boot_sector.get in let msg = boot_sector ^ payload in let* () = CurrentLevel.set inbox_level in let* () = MessageCounter.set (Some message_counter) in let* () = NextMessage.set (Some msg) in return () - | Error _ | Ok (Internal _) -> + | None -> let* () = CurrentLevel.set inbox_level in let* () = MessageCounter.set (Some message_counter) in let* () = Status.set WaitingForInputMessage in -- GitLab From 4a0c9a1f160b3bbc03e1b7307ad6ceeaabdbac95 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Wed, 6 Jul 2022 23:27:15 +0200 Subject: [PATCH 6/7] Test/Tezt: interpretation of inboxes with internal messages --- .../proto_alpha/sc_rollup_forward.tz | 12 ++ ...ances PVM state with internal messages.out | 185 ++++++++++++++++++ tezt/tests/sc_rollup.ml | 71 +++++-- 3 files changed, 255 insertions(+), 13 deletions(-) create mode 100644 tezt/tests/contracts/proto_alpha/sc_rollup_forward.tz create mode 100644 tezt/tests/expected/sc_rollup.ml/Alpha- node advances PVM state with internal messages.out diff --git a/tezt/tests/contracts/proto_alpha/sc_rollup_forward.tz b/tezt/tests/contracts/proto_alpha/sc_rollup_forward.tz new file mode 100644 index 000000000000..22789dbc3e16 --- /dev/null +++ b/tezt/tests/contracts/proto_alpha/sc_rollup_forward.tz @@ -0,0 +1,12 @@ +parameter (pair address string) ; +storage unit ; +code { UNPAIR ; + DIP { NIL operation }; + UNPAIR ; + CONTRACT string ; + ASSERT_SOME; + SWAP; + DIP { PUSH mutez 0 }; + TRANSFER_TOKENS; + CONS; + PAIR; } \ No newline at end of file diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- node advances PVM state with internal messages.out b/tezt/tests/expected/sc_rollup.ml/Alpha- node advances PVM state with internal messages.out new file mode 100644 index 000000000000..4a842d17f5f7 --- /dev/null +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- node advances PVM state with internal messages.out @@ -0,0 +1,185 @@ + +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 +Node is bootstrapped. +Estimated gas: 2509.092 units (will add 100 for safety) +Estimated storage: 6614 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000614 + Expected counter: 1 + Gas limit: 2610 + Storage limit: 6634 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000614 + payload fees(the block proposer) ....... +ꜩ0.000614 + Originate smart contract rollup of kind arith and type string with boot sector '' + This smart contract rollup origination was successfully applied + Consumed gas: 2509.092 + Storage size: 6614 bytes + Address: [SC_ROLLUP_HASH] + Genesis commitment hash: [SC_ROLLUP_COMMITMENT_HASH] + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ1.6535 + storage fees ........................... +ꜩ1.6535 + + +./tezos-client rpc get '/chains/main/blocks/head/context/sc_rollup/[SC_ROLLUP_HASH]/genesis_info' +{ "level": 2, + "commitment_hash": "[SC_ROLLUP_COMMITMENT_HASH]" } + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs139rUcWoTB9MbNUEaWYn5RswKF7G2uENnRPq7Q9ByQRMahtB2NA" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"0" + +./tezos-sc-rollup-client-alpha get state value for vars/value +"\000\000\000\007" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs139EB5Ny4fma7o6nS9mGauvHFbwpfvsJijBU4tNjEr9QZ8ZJWQd" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"19" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs139EB5Ny4fma7o6nS9mGauvHFbwpfvsJijBU4tNjEr9QZ8ZJWQd" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"19" + +./tezos-sc-rollup-client-alpha get state value for vars/value +"\000\000\000\n" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs12UMx1ykNkh7mGwph7oc47aPAYSZfSdx6E6gqHdNuD3fWoY5z7V" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"37" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs12UMx1ykNkh7mGwph7oc47aPAYSZfSdx6E6gqHdNuD3fWoY5z7V" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"37" + +./tezos-sc-rollup-client-alpha get state value for vars/value +"\000\000\000\r" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs12ssnuPLi7HmVNDsZmAn38HQHQ3Yy7M8iqxALseKWEZjhetGdQj" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"56" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs12ssnuPLi7HmVNDsZmAn38HQHQ3Yy7M8iqxALseKWEZjhetGdQj" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"56" + +./tezos-sc-rollup-client-alpha get state value for vars/value +"\000\000\000\016" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs11bU88Xg7RJhWwcd6xjATkP9KxurEXizBzGm99Y7f1AuwHSwMFr" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"75" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs11bU88Xg7RJhWwcd6xjATkP9KxurEXizBzGm99Y7f1AuwHSwMFr" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"75" + +./tezos-sc-rollup-client-alpha get state value for vars/value +"\000\000\000\019" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs11deEDoFvXGQjSLah1h2N13p1PJTVQNqm1qxaSHUhX9HnZGK3wZ" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"94" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs11deEDoFvXGQjSLah1h2N13p1PJTVQNqm1qxaSHUhX9HnZGK3wZ" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"94" + +./tezos-sc-rollup-client-alpha get state value for vars/value +"\000\000\000\022" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs13DumkywYF7EtycrHEqToSzBFnYBvJeTA2XUZySvttgXzWWP14d" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"113" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs13DumkywYF7EtycrHEqToSzBFnYBvJeTA2XUZySvttgXzWWP14d" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"113" + +./tezos-sc-rollup-client-alpha get state value for vars/value +"\000\000\000\025" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs13RfGYbA1saxvGJMLCySU3tja9MNaqG4CRiWofbCuFiwNofAFCt" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"132" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs13RfGYbA1saxvGJMLCySU3tja9MNaqG4CRiWofbCuFiwNofAFCt" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"132" + +./tezos-sc-rollup-client-alpha get state value for vars/value +"\000\000\000\028" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs11vJrzpmNeM3aydKLFC8LN2qzEiLPDW1hYUAWb9aFXKyveoZHGM" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"151" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs11vJrzpmNeM3aydKLFC8LN2qzEiLPDW1hYUAWb9aFXKyveoZHGM" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"151" + +./tezos-sc-rollup-client-alpha get state value for vars/value +"\000\000\000\031" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs11daEh8MqwPhDawd8n5frMeRhoASh46rnJYNvFz2eSWiVeUfYwS" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"170" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs11daEh8MqwPhDawd8n5frMeRhoASh46rnJYNvFz2eSWiVeUfYwS" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"170" + +./tezos-sc-rollup-client-alpha get state value for vars/value +"\000\000\000\"" + +./tezos-sc-rollup-client-alpha rpc get /global/state_hash +"scs12P2MF8NUnH7BrSuRCuSjpBcYpL3ZGJwwm6N3WYkBxvbbwGhdtz" + +./tezos-sc-rollup-client-alpha rpc get /global/total_ticks +"190" diff --git a/tezt/tests/sc_rollup.ml b/tezt/tests/sc_rollup.ml index a15007f5d26c..88eb31b37057 100644 --- a/tezt/tests/sc_rollup.ml +++ b/tezt/tests/sc_rollup.ml @@ -153,7 +153,7 @@ let with_fresh_rollup f tezos_node tezos_client bootstrap1_key = ~src:bootstrap1_key ~kind:"arith" ~boot_sector:"" - ~parameters_ty:"unit" + ~parameters_ty:"string" tezos_client in let sc_rollup_node = @@ -263,7 +263,7 @@ let test_origination = ~burn_cap:Tez.(of_int 9999999) ~src:bootstrap1_key ~kind:"arith" - ~parameters_ty:"unit" + ~parameters_ty:"string" ~boot_sector:"" client in @@ -282,7 +282,7 @@ let with_fresh_rollup ?(boot_sector = "") f tezos_node tezos_client ~burn_cap:Tez.(of_int 9999999) ~src:bootstrap1_key ~kind:"arith" - ~parameters_ty:"unit" + ~parameters_ty:"string" ~boot_sector tezos_client in @@ -923,8 +923,8 @@ let test_rollup_node_boots_into_initial_state = When the rollup node receives messages, we like to see evidence that the PVM has advanced. *) -let test_rollup_node_advances_pvm_state = - let go client sc_rollup sc_rollup_node = +let test_rollup_node_advances_pvm_state protocols = + let go ~internal client sc_rollup sc_rollup_node = let* genesis_info = RPC.Client.call ~hooks client @@ RPC.Sc_rollup.get_genesis_info sc_rollup in @@ -937,17 +937,48 @@ let test_rollup_node_advances_pvm_state = Check.(level = init_level) Check.int ~error_msg:"Current level has moved past origination level (%L = %R)" ; - + let* level, forwarder = + if not internal then return (level, None) + else + (* Originate forwarder contract to send internal messages to rollup *) + let* contract_id = + Client.originate_contract + ~alias:"rollup_deposit" + ~amount:Tez.zero + ~src:Constant.bootstrap1.alias + ~prg:"file:./tezt/tests/contracts/proto_alpha/sc_rollup_forward.tz" + ~init:"Unit" + ~burn_cap:Tez.(of_int 1) + client + in + let* () = Client.bake_for_and_wait client in + Log.info + "The forwarder %s contract was successfully originated" + contract_id ; + return (level + 1, Some contract_id) + in let test_message i = let* prev_state_hash = Sc_rollup_client.state_hash ~hooks sc_rollup_client in let* prev_ticks = Sc_rollup_client.total_ticks ~hooks sc_rollup_client in + let message = sf "%d %d + value" i ((i + 2) * 2) in let* () = - send_message - client - sc_rollup - (Printf.sprintf "[\"%d %d + value\"]" i ((i + 2) * 2)) + match forwarder with + | None -> + (* External message *) + send_message client sc_rollup (sf "[%S]" message) + | Some forwarder -> + (* Internal message through forwarder *) + let* () = + Client.transfer + client + ~amount:Tez.zero + ~giver:Constant.bootstrap1.alias + ~receiver:forwarder + ~arg:(sf "Pair %S %S" sc_rollup message) + in + Client.bake_for_and_wait client in let* _ = Sc_rollup_node.wait_for_level sc_rollup_node (level + i) in let* encoded_value = @@ -990,10 +1021,24 @@ let test_rollup_node_advances_pvm_state = (fun protocol -> setup ~protocol @@ fun node client -> with_fresh_rollup - (fun sc_rollup sc_rollup_node _filename -> - go client sc_rollup sc_rollup_node) + (fun sc_rollup_address sc_rollup_node _filename -> + go ~internal:false client sc_rollup_address sc_rollup_node) + node + client) + protocols ; + + regression_test + ~__FILE__ + ~tags:["run"; "node"; "internal"] + "node advances PVM state with internal messages" + (fun protocol -> + setup ~protocol @@ fun node client -> + with_fresh_rollup + (fun sc_rollup_address sc_rollup_node _filename -> + go ~internal:true client sc_rollup_address sc_rollup_node) node client) + protocols (* Ensure that commitments are stored and published properly. ---------------------------------------------------------- @@ -1887,7 +1932,7 @@ let test_consecutive_commitments = ~burn_cap:Tez.(of_int 9999999) ~src:bootstrap1_key ~kind:"arith" - ~parameters_ty:"unit" + ~parameters_ty:"string" ~boot_sector:"" client in -- GitLab From 027c864c982aec5a8d9907e30cf84c139a41ef89 Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Fri, 8 Jul 2022 16:13:55 +0200 Subject: [PATCH 7/7] Test/Tezt: reset regressions because sc rollups are "string" --- ... smart contract optimistic rollup node.out | 4 +- .../Alpha- consecutive commitments.out | 4 +- .../Alpha- ensure boot sector is used.out | 8 ++-- ...Alpha- get genesis info of a sc rollup.out | 4 +- ...nt hash and inbox level of a sc rollup.out | 4 +- ...ract rollup address through the client.out | 4 +- .../Alpha- list originated rollups.out | 40 +++++++++---------- ... node advances PVM state with messages.out | 4 +- ...pha- node boots into the initial state.out | 4 +- ...ommitments in the rollup node (commitm.out | 4 +- ...ommitments in the rollup node (first_p.out | 4 +- ...ommitments in the rollup node (handles.out | 4 +- ...ommitments in the rollup node (message.out | 4 +- ...ommitments in the rollup node (no_comm.out | 4 +- ...ommitments in the rollup node (node_us.out | 4 +- ...ommitments in the rollup node (non_fin.out | 4 +- ...ce of inbox in the rollup node (basic).out | 4 +- ...f inbox in the rollup node (handles_ch.out | 4 +- ...ce of inbox in the rollup node (stops).out | 4 +- .../Alpha- originate with boot sector.out | 4 +- ...tion of a SCORU executes without error.out | 4 +- ...ssages in the inbox - check inbox size.out | 4 +- ...s in the inbox - current messages hash.out | 4 +- 23 files changed, 66 insertions(+), 66 deletions(-) diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- configuration of a smart contract optimistic rollup node.out b/tezt/tests/expected/sc_rollup.ml/Alpha- configuration of a smart contract optimistic rollup node.out index 84c2be78f628..de9331f43ea1 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- configuration of a smart contract optimistic rollup node.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- configuration of a smart contract optimistic rollup node.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- consecutive commitments.out b/tezt/tests/expected/sc_rollup.ml/Alpha- consecutive commitments.out index 53b1f4bce04a..c9116db63b86 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- consecutive commitments.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- consecutive commitments.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- ensure boot sector is used.out b/tezt/tests/expected/sc_rollup.ml/Alpha- ensure boot sector is used.out index 1221615d6f31..8b48c5f5d815 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- ensure boot sector is used.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- ensure boot sector is used.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with '10 10 10 + +' --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with '10 10 10 + +' --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6626 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000626 payload fees(the block proposer) ....... +ꜩ0.000626 - Originate smart contract rollup of kind arith and type unit with boot sector '10 10 10 + +' + Originate smart contract rollup of kind arith and type string with boot sector '10 10 10 + +' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6626 bytes @@ -75,7 +75,7 @@ This sequence of operations was run: ./tezos-sc-rollup-client-alpha rpc get /global/state_hash "scs11h9A7VAzxxEkEW6ufnfbPnu717o4mc6hagzqvPLhLvHcXyRQVA" -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with 31 --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with 31 --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6616 bytes added (will add 20 for safety) @@ -95,7 +95,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000616 payload fees(the block proposer) ....... +ꜩ0.000616 - Originate smart contract rollup of kind arith and type unit with boot sector '31' + Originate smart contract rollup of kind arith and type string with boot sector '31' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6616 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- get genesis info of a sc rollup.out b/tezt/tests/expected/sc_rollup.ml/Alpha- get genesis info of a sc rollup.out index 84c2be78f628..de9331f43ea1 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- get genesis info of a sc rollup.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- get genesis info of a sc rollup.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- get last cemented commitment hash and inbox level of a sc rollup.out b/tezt/tests/expected/sc_rollup.ml/Alpha- get last cemented commitment hash and inbox level of a sc rollup.out index 84c2be78f628..de9331f43ea1 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- get last cemented commitment hash and inbox level of a sc rollup.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- get last cemented commitment hash and inbox level of a sc rollup.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- getting a smart-contract rollup address through the client.out b/tezt/tests/expected/sc_rollup.ml/Alpha- getting a smart-contract rollup address through the client.out index 84c2be78f628..de9331f43ea1 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- getting a smart-contract rollup address through the client.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- getting a smart-contract rollup address through the client.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- list originated rollups.out b/tezt/tests/expected/sc_rollup.ml/Alpha- list originated rollups.out index fa66c2b7a713..dec06cb9fe3b 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- list originated rollups.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- list originated rollups.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes @@ -30,7 +30,7 @@ This sequence of operations was run: storage fees ........................... +ꜩ1.6535 -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -50,7 +50,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes @@ -61,7 +61,7 @@ This sequence of operations was run: storage fees ........................... +ꜩ1.6535 -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -81,7 +81,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes @@ -92,7 +92,7 @@ This sequence of operations was run: storage fees ........................... +ꜩ1.6535 -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -112,7 +112,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes @@ -123,7 +123,7 @@ This sequence of operations was run: storage fees ........................... +ꜩ1.6535 -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -143,7 +143,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes @@ -154,7 +154,7 @@ This sequence of operations was run: storage fees ........................... +ꜩ1.6535 -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -174,7 +174,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes @@ -185,7 +185,7 @@ This sequence of operations was run: storage fees ........................... +ꜩ1.6535 -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -205,7 +205,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes @@ -216,7 +216,7 @@ This sequence of operations was run: storage fees ........................... +ꜩ1.6535 -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -236,7 +236,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes @@ -247,7 +247,7 @@ This sequence of operations was run: storage fees ........................... +ꜩ1.6535 -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -267,7 +267,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes @@ -278,7 +278,7 @@ This sequence of operations was run: storage fees ........................... +ꜩ1.6535 -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -298,7 +298,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- node advances PVM state with messages.out b/tezt/tests/expected/sc_rollup.ml/Alpha- node advances PVM state with messages.out index f100b69f970b..6acafae0a4da 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- node advances PVM state with messages.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- node advances PVM state with messages.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- node boots into the initial state.out b/tezt/tests/expected/sc_rollup.ml/Alpha- node boots into the initial state.out index 77e1fedd0efc..13564d8816a0 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- node boots into the initial state.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- node boots into the initial state.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (commitm.out b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (commitm.out index 521d45d24c56..58a2928ed662 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (commitm.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (commitm.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (first_p.out b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (first_p.out index 97123c74b886..97ff8a99a105 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (first_p.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (first_p.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (handles.out b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (handles.out index a1d68e90b5ab..f62b3c5b741a 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (handles.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (handles.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (message.out b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (message.out index a43f2ad94eae..d25ce26b3564 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (message.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (message.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (no_comm.out b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (no_comm.out index 18695bb7f3bc..e9640807e794 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (no_comm.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (no_comm.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (node_us.out b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (node_us.out index 925fe7c72e47..b20cc1155cb0 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (node_us.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (node_us.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (non_fin.out b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (non_fin.out index 1fbe5d1cfbe1..cba6a64c700c 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (non_fin.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (non_fin.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct maintenance of inbox in the rollup node (basic).out b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct maintenance of inbox in the rollup node (basic).out index 31462e9d1542..c388500287a6 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct maintenance of inbox in the rollup node (basic).out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct maintenance of inbox in the rollup node (basic).out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct maintenance of inbox in the rollup node (handles_ch.out b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct maintenance of inbox in the rollup node (handles_ch.out index 679799b3f2df..baee5739d0e5 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct maintenance of inbox in the rollup node (handles_ch.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct maintenance of inbox in the rollup node (handles_ch.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct maintenance of inbox in the rollup node (stops).out b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct maintenance of inbox in the rollup node (stops).out index 30b726333f4b..3170d2c2a685 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct maintenance of inbox in the rollup node (stops).out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct maintenance of inbox in the rollup node (stops).out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- originate with boot sector.out b/tezt/tests/expected/sc_rollup.ml/Alpha- originate with boot sector.out index eea1e76a3d19..bc4abe91fc0d 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- originate with boot sector.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- originate with boot sector.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with '10 10 10 + +' --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with '10 10 10 + +' --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6626 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000626 payload fees(the block proposer) ....... +ꜩ0.000626 - Originate smart contract rollup of kind arith and type unit with boot sector '10 10 10 + +' + Originate smart contract rollup of kind arith and type string with boot sector '10 10 10 + +' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6626 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- origination of a SCORU executes without error.out b/tezt/tests/expected/sc_rollup.ml/Alpha- origination of a SCORU executes without error.out index 84c2be78f628..de9331f43ea1 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- origination of a SCORU executes without error.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- origination of a SCORU executes without error.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- pushing messages in the inbox - check inbox size.out b/tezt/tests/expected/sc_rollup.ml/Alpha- pushing messages in the inbox - check inbox size.out index 63fb8c7e4902..f5cacfba21b8 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- pushing messages in the inbox - check inbox size.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- pushing messages in the inbox - check inbox size.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- pushing messages in the inbox - current messages hash.out b/tezt/tests/expected/sc_rollup.ml/Alpha- pushing messages in the inbox - current messages hash.out index d09b3b1c5699..28bd204f8482 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- pushing messages in the inbox - current messages hash.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- pushing messages in the inbox - current messages hash.out @@ -1,5 +1,5 @@ -./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type unit booting with --burn-cap 9999999 +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith of type string booting with --burn-cap 9999999 Node is bootstrapped. Estimated gas: 2509.092 units (will add 100 for safety) Estimated storage: 6614 bytes added (will add 20 for safety) @@ -19,7 +19,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000614 payload fees(the block proposer) ....... +ꜩ0.000614 - Originate smart contract rollup of kind arith and type unit with boot sector '' + Originate smart contract rollup of kind arith and type string with boot sector '' This smart contract rollup origination was successfully applied Consumed gas: 2509.092 Storage size: 6614 bytes -- GitLab