diff --git a/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml b/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml index 01d9cdef9edd213790fb644ea75c6b32cf8f2c9c..caed520fed6ad4fa63340735fe773999eac93ee0 100644 --- a/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml +++ b/src/proto_alpha/bin_sc_rollup_node/RPC_server.ml @@ -136,6 +136,32 @@ module Make (PVM : Pvm.S) = struct let*! hash = PVM.state_hash state in return hash) + let register_last_stored_commitment store dir = + RPC_directory.register0 + dir + (Sc_rollup_services.last_stored_commitment ()) + (fun () () -> + let open Lwt_result_syntax in + let*! commitment = + Commitment.last_commitment + (module Store.Last_stored_commitment_level) + store + in + return commitment) + + let register_last_published_commitment store dir = + RPC_directory.register0 + dir + (Sc_rollup_services.last_published_commitment ()) + (fun () () -> + let open Lwt_result_syntax in + let*! commitment = + Commitment.last_commitment + (module Store.Last_published_commitment_level) + store + in + return commitment) + let register_current_status store dir = RPC_directory.register0 dir @@ -156,6 +182,8 @@ module Make (PVM : Pvm.S) = struct |> register_current_num_messages store |> register_current_state_hash store |> register_current_status store + |> register_last_stored_commitment store + |> register_last_published_commitment store let start node_ctxt store configuration = Common.start configuration (register node_ctxt store configuration) diff --git a/src/proto_alpha/bin_sc_rollup_node/commitment.ml b/src/proto_alpha/bin_sc_rollup_node/commitment.ml new file mode 100644 index 0000000000000000000000000000000000000000..fd369abc6a8a37ebf04bb47759aa271d4b45c063 --- /dev/null +++ b/src/proto_alpha/bin_sc_rollup_node/commitment.ml @@ -0,0 +1,272 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 TriliTech *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +(** The rollup node stores and publishes commitments for the PVM + every 20 levels. + + Every time a finalized block is processed by the rollup node, + the latter determines whether the last commitment that the node + has produced referred to 20 blocks earlier. In this case, it + computes and stores a new commitment in a level-indexed map. + + Stored commitments are signed by the rollup node operator + and published on the layer1 chain. To ensure that commitments + produced by the rollup node are eventually published, + storing and publishing commitments are decoupled. Every time + a new head is processed, the node tries to publish the oldest + commitment that was not published already. +*) + +open Protocol +open Alpha_context + +module type Mutable_level_store = + Store.Mutable_value with type value = Raw_level.t + +(* We keep the number of messages and ticks to be included in the + next commitment in memory. Note that we do not risk to increase + these counters when the wrong branch is tracked by the rollup + node, as only finalized heads are processed to build commitments. +*) + +module Mutable_counter = struct + module Make () = struct + let x = ref Z.zero + + let add z = x := Z.add !x z + + let reset () = x := Z.zero + + let get () = !x + end +end + +module Number_of_messages = Mutable_counter.Make () + +module Number_of_ticks = Mutable_counter.Make () + +let sc_rollup_commitment_frequency = Int32.of_int 20 + +let last_commitment (module Last_commitment_level : Mutable_level_store) store = + let open Lwt_syntax in + let* last_commitment_level = Last_commitment_level.find store in + match last_commitment_level with + | Some level -> + let+ commitment = Store.Commitments.get store level in + Some commitment + | None -> return None + +let last_commitment_level (module Last_commitment_level : Mutable_level_store) + ~origination_level store = + let open Lwt_syntax in + let+ last_commitment_level = Last_commitment_level.find store in + match last_commitment_level with + | None -> origination_level + | Some level -> level + +let next_commitment_level (module Last_commitment_level : Mutable_level_store) + ~origination_level store = + let open Lwt_syntax in + let+ last_commitment_level = + last_commitment_level + (module Last_commitment_level) + ~origination_level + store + in + Raw_level.of_int32 + @@ Int32.add + (Raw_level.to_int32 last_commitment_level) + sc_rollup_commitment_frequency + +let last_commitment_hash (module Last_commitment_level : Mutable_level_store) + store = + let open Lwt_syntax in + let+ last_commitment = last_commitment (module Last_commitment_level) store in + match last_commitment with + | Some commitment -> Sc_rollup.Commitment.hash commitment + | None -> Sc_rollup.Commitment_hash.zero + +let must_store_commitment ~origination_level current_level store = + let open Lwt_result_syntax in + let+ next_commitment_level = + next_commitment_level + (module Store.Last_stored_commitment_level) + ~origination_level + store + in + Raw_level.equal current_level next_commitment_level + +let update_last_stored_commitment store (commitment : Sc_rollup.Commitment.t) = + let open Lwt_syntax in + let inbox_level = commitment.inbox_level in + (* Do not change the order of these two operations. This guarantees that + whenever `Store.Last_stored_commitment_level.get` returns `Some hash`, + then the call to `Store.Commitments.get hash` will succeed. + *) + let* () = Store.Commitments.add store inbox_level commitment in + let* () = Store.Last_stored_commitment_level.set store inbox_level in + Commitment_event.commitment_stored commitment + +let build_commitment (module PVM : Pvm.S) ~origination_level store block_hash = + let open Lwt_result_syntax in + let lsc = (module Store.Last_stored_commitment_level : Mutable_level_store) in + let*! predecessor = last_commitment_hash lsc store in + let* inbox_level = + Lwt.map Environment.wrap_tzresult + @@ next_commitment_level ~origination_level lsc store + in + let*! pvm_state = Store.PVMState.find store block_hash in + let* compressed_state = + match pvm_state with + | Some pvm_state -> + let*! hash = PVM.state_hash pvm_state in + return hash + | None -> + failwith + "PVM state for block hash not available %s" + (Block_hash.to_string block_hash) + in + let number_of_messages = Number_of_messages.get () in + let* number_of_messages = + match + Sc_rollup.Number_of_messages.of_int32 @@ Z.to_int32 number_of_messages + with + | Some number_of_messages -> return number_of_messages + | None -> + failwith + "Invalid number of messages %s" + (Z.to_string number_of_messages) + in + let number_of_ticks = Number_of_ticks.get () in + let+ number_of_ticks = + match Sc_rollup.Number_of_ticks.of_int32 @@ Z.to_int32 number_of_ticks with + | Some number_of_ticks -> return number_of_ticks + | None -> + failwith "Invalid number of ticks %s" (Z.to_string number_of_ticks) + in + (* Reset counters for messages as the commitment to be published + has been built. + *) + let () = Number_of_messages.reset () in + let () = Number_of_ticks.reset () in + Sc_rollup.Commitment. + { + predecessor; + inbox_level; + number_of_messages; + number_of_ticks; + compressed_state; + } + +let store_commitment_if_necessary (module PVM : Pvm.S) ~origination_level store + current_level block_hash = + let open Lwt_result_syntax in + let* must_store_commitment = + Lwt.map Environment.wrap_tzresult + @@ must_store_commitment ~origination_level current_level store + in + if must_store_commitment then + let*! () = Commitment_event.compute_commitment block_hash current_level in + let* commitment = + build_commitment (module PVM) ~origination_level store block_hash + in + let*! () = update_last_stored_commitment store commitment in + return_unit + else return_unit + +let update_ticks_and_messages (module PVM : Pvm.S) store block_hash = + let open Lwt_result_syntax in + let*! {num_messages; num_ticks} = Store.StateInfo.get store block_hash in + let () = Number_of_messages.add num_messages in + return @@ Number_of_ticks.add num_ticks + +let process_head (module PVM : Pvm.S) (node_ctxt : Node_context.t) store + Layer1.(Head {level; hash}) = + let open Lwt_result_syntax in + let current_level = Raw_level.of_int32_exn level in + let origination_level = node_ctxt.initial_level in + let* () = update_ticks_and_messages (module PVM) store hash in + store_commitment_if_necessary + (module PVM) + ~origination_level + store + current_level + hash + +(* TODO: https://gitlab.com/tezos/tezos/-/issues/2869 + use the Injector to publish commitments. *) +let publish_commitment (node_ctxt : Node_context.t) store = + let origination_level = node_ctxt.initial_level in + let open Lwt_result_syntax in + let* next_level_to_publish = + Lwt.map Environment.wrap_tzresult + @@ next_commitment_level + (module Store.Last_published_commitment_level) + ~origination_level + store + in + let*! is_commitment_available = + Store.Commitments.mem store next_level_to_publish + in + if is_commitment_available then + let*! commitment = Store.Commitments.get store next_level_to_publish in + let cctxt = node_ctxt.cctxt in + let sc_rollup_address = node_ctxt.rollup_address in + let* (source, src_pk, src_sk) = Node_context.get_operator_keys node_ctxt in + let* (_, _, Manager_operation_result {operation_result; _}) = + Client_proto_context.sc_rollup_publish + cctxt + ~chain:cctxt#chain + ~block:cctxt#block + ~commitment + ~source + ~rollup:sc_rollup_address + ~src_pk + ~src_sk + ~fee_parameter:Configuration.default_fee_parameter + () + in + let open Apply_results in + let*! () = + match operation_result with + | Applied (Sc_rollup_publish_result _) -> + let open Lwt_syntax in + let* () = + Store.Last_published_commitment_level.set + store + commitment.inbox_level + in + Commitment_event.commitment_published commitment + | Failed (Sc_rollup_publish_manager_kind, _errors) -> + Commitment_event.commitment_failed commitment + | Backtracked (Sc_rollup_publish_result _, _errors) -> + Commitment_event.commitment_backtracked commitment + | Skipped Sc_rollup_publish_manager_kind -> + Commitment_event.commitment_skipped commitment + in + return_unit + else return_unit + +let start () = Commitment_event.starting () diff --git a/src/proto_alpha/bin_sc_rollup_node/commitment.mli b/src/proto_alpha/bin_sc_rollup_node/commitment.mli new file mode 100644 index 0000000000000000000000000000000000000000..8f7d98b14c4ea15942b68d6bfc39042e4442bd4b --- /dev/null +++ b/src/proto_alpha/bin_sc_rollup_node/commitment.mli @@ -0,0 +1,80 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 TriliTech *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +(** The rollup node stores and publishes commitments for the PVM + every 20 levels. + + Every time a finalized block is processed by the rollup node, + the latter determines whether the last commitment that the node + has produced referred to 20 blocks earlier. In this case, it + computes and stores a new commitment in a level-indexed map. + + Stored commitments are signed by the rollup node operator + and published on the layer1 chain. To ensure that commitments + produced by the rollup node are eventually published, + storing and publishing commitments are decoupled. Every time + a new head is processed, the node tries to publish the oldest + commitment that was not published already. +*) + +open Protocol.Alpha_context + +module type Mutable_level_store = + Store.Mutable_value with type value = Raw_level.t + +(** [process_head (module PVM) node_ctxt store head] checks whether a new + commitment needs to be computed and stored, by looking at the level of + [head] and checking whether it is a multiple of 20 levels away from + [node_ctxt.initial_level]. It uses the functionalities of [PVM] to + compute the hash of to be included in the commitment. +*) + +val process_head : + (module Pvm.S) -> + Node_context.t -> + Store.t -> + Layer1.head -> + unit tzresult Lwt.t + +(** [publish_commitment node_ctxt store] publishes the earliest + commitment stored in [store] that has not been published yet. + It uses [node_ctxt.cctxt] to make the RPC call to the Layer1 node. +*) + +val publish_commitment : Node_context.t -> Store.t -> unit tzresult Lwt.t + +(** [start ()] only emits the event that the commitment manager + for the rollup node has started. *) +val start : unit -> unit Lwt.t + +(** [last_commitment (module Last_level_module: Mutable_level_store) store] + returns the last commitment (if any) stored according to the value of + level indicated by [module Last_level_module]. Two possible implementations + for the latter are [Store.Last_published_commitment_level] and + [Store.Last_stored_commitment_level]. +*) + +val last_commitment : + (module Mutable_level_store) -> Store.t -> Sc_rollup.Commitment.t option Lwt.t diff --git a/src/proto_alpha/bin_sc_rollup_node/commitment_event.ml b/src/proto_alpha/bin_sc_rollup_node/commitment_event.ml new file mode 100644 index 0000000000000000000000000000000000000000..e5dfda80717f256555e5593aa4309f7c347c65c7 --- /dev/null +++ b/src/proto_alpha/bin_sc_rollup_node/commitment_event.ml @@ -0,0 +1,236 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 TriliTech *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +(* TODO: https://gitlab.com/tezos/tezos/-/issues/2880 + Add corresponding .mli file. *) + +open Protocol +open Alpha_context + +module Simple = struct + include Internal_event.Simple + + let section = ["sc_rollup_node"; "commitment"] + + let starting = + declare_0 + ~section + ~name:"sc_rollup_commitment_publisher_starting" + ~msg:"Starting commitment publisher for the smart contract rollup node" + ~level:Notice + () + + let stopping = + declare_0 + ~section + ~name:"sc_rollup_node_commitment_publisher_stopping" + ~msg:"Stopping commitment publisher for the smart contract rollup node" + ~level:Notice + () + + let commitment_stored = + declare_5 + ~section + ~name:"sc_rollup_node_commitment_stored" + ~msg: + "Commitment was stored - predecessor: {predecessor}, inbox_level: \ + {inbox_level}, compressed_state: {compressed_state}, \ + number_of_messages: {number_of_messages}, number_of_ticks: \ + {number_of_ticks}" + ~level:Notice + ("predecessor", Sc_rollup.Commitment_hash.encoding) + ("inbox_level", Raw_level.encoding) + ("compressed_state", Sc_rollup.State_hash.encoding) + ("number_of_messages", Sc_rollup.Number_of_messages.encoding) + ("number_of_ticks", Sc_rollup.Number_of_ticks.encoding) + + let commitment_published = + declare_5 + ~section + ~name:"sc_rollup_node_commitment_published" + ~msg: + "Commitment was published - predecessor: {predecessor}, inbox_level: \ + {inbox_level}, compressed_state: {compressed_state}, \ + number_of_messages: {number_of_messages}, number_of_ticks: \ + {number_of_ticks}" + ~level:Notice + ("predecessor", Sc_rollup.Commitment_hash.encoding) + ("inbox_level", Raw_level.encoding) + ("compressed_state", Sc_rollup.State_hash.encoding) + ("number_of_messages", Sc_rollup.Number_of_messages.encoding) + ("number_of_ticks", Sc_rollup.Number_of_ticks.encoding) + + let commitment_skipped = + declare_5 + ~section + ~name:"sc_rollup_node_commitment_skipped" + ~msg: + "Publishing commitment was skipped - predecessor: {predecessor}, \ + inbox_level: {inbox_level}, compressed_state: {compressed_state}, \ + number_of_messages: {number_of_messages}, number_of_ticks: \ + {number_of_ticks}" + ~level:Notice + ("predecessor", Sc_rollup.Commitment_hash.encoding) + ("inbox_level", Raw_level.encoding) + ("compressed_state", Sc_rollup.State_hash.encoding) + ("number_of_messages", Sc_rollup.Number_of_messages.encoding) + ("number_of_ticks", Sc_rollup.Number_of_ticks.encoding) + + let commitment_backtracked = + declare_5 + ~section + ~name:"sc_rollup_node_commitment_backtracked" + ~msg: + "Publishing commitment was backtracked - predecessor: {predecessor}, \ + inbox_level: {inbox_level}, compressed_state: {compressed_state}, \ + number_of_messages: {number_of_messages}, number_of_ticks: \ + {number_of_ticks}" + ~level:Notice + ("predecessor", Sc_rollup.Commitment_hash.encoding) + ("inbox_level", Raw_level.encoding) + ("compressed_state", Sc_rollup.State_hash.encoding) + ("number_of_messages", Sc_rollup.Number_of_messages.encoding) + ("number_of_ticks", Sc_rollup.Number_of_ticks.encoding) + + let commitment_failed = + declare_5 + ~section + ~name:"sc_rollup_node_commitment_failed" + ~msg: + "Publishing commitment has failed - predecessor: {predecessor}, \ + inbox_level: {inbox_level}, compressed_state: {compressed_state}, \ + number_of_messages: {number_of_messages}, number_of_ticks: \ + {number_of_ticks}" + ~level:Notice + ("predecessor", Sc_rollup.Commitment_hash.encoding) + ("inbox_level", Raw_level.encoding) + ("compressed_state", Sc_rollup.State_hash.encoding) + ("number_of_messages", Sc_rollup.Number_of_messages.encoding) + ("number_of_ticks", Sc_rollup.Number_of_ticks.encoding) + + let compute_commitment = + declare_2 + ~section + ~name:"sc_rollup_node_commitment_process_head" + ~msg: + "Computing and storing new commitment for head {head} at level {level}" + ~level:Notice + ("head", Block_hash.encoding) + ("level", Raw_level.encoding) +end + +let starting = Simple.(emit starting) + +let stopping = Simple.(emit stopping) + +open Sc_rollup.Commitment + +let commitment_stored + { + predecessor; + inbox_level; + compressed_state; + number_of_messages; + number_of_ticks; + } = + Simple.( + emit + commitment_stored + ( predecessor, + inbox_level, + compressed_state, + number_of_messages, + number_of_ticks )) + +let commitment_published + { + predecessor; + inbox_level; + compressed_state; + number_of_messages; + number_of_ticks; + } = + Simple.( + emit + commitment_published + ( predecessor, + inbox_level, + compressed_state, + number_of_messages, + number_of_ticks )) + +let commitment_skipped + { + predecessor; + inbox_level; + compressed_state; + number_of_messages; + number_of_ticks; + } = + Simple.( + emit + commitment_skipped + ( predecessor, + inbox_level, + compressed_state, + number_of_messages, + number_of_ticks )) + +let commitment_backtracked + { + predecessor; + inbox_level; + compressed_state; + number_of_messages; + number_of_ticks; + } = + Simple.( + emit + commitment_backtracked + ( predecessor, + inbox_level, + compressed_state, + number_of_messages, + number_of_ticks )) + +let commitment_failed + { + predecessor; + inbox_level; + compressed_state; + number_of_messages; + number_of_ticks; + } = + Simple.( + emit + commitment_failed + ( predecessor, + inbox_level, + compressed_state, + number_of_messages, + number_of_ticks )) + +let compute_commitment head level = + Simple.(emit compute_commitment (head, level)) diff --git a/src/proto_alpha/bin_sc_rollup_node/daemon.ml b/src/proto_alpha/bin_sc_rollup_node/daemon.ml index 60e29daffa64f6444b02270b17378bece1355767..8c07ed1807ab26a325f3f4295eb77f15279abb30 100644 --- a/src/proto_alpha/bin_sc_rollup_node/daemon.ml +++ b/src/proto_alpha/bin_sc_rollup_node/daemon.ml @@ -2,6 +2,7 @@ (* *) (* Open Source License *) (* Copyright (c) 2021 Nomadic Labs, *) +(* Copyright (c) 2022 TriliTech *) (* *) (* Permission is hereby granted, free of charge, to any person obtaining a *) (* copy of this software and associated documentation files (the "Software"),*) @@ -23,21 +24,144 @@ (* *) (*****************************************************************************) -let on_layer_1_chain_event node_ctxt store chain_event = +type head_state = {head : Layer1.head; finalized : bool; seen_before : bool} + +let emit_head_processing_event + {head = Head {hash; level}; finalized; seen_before} = + Daemon_event.head_processing hash level finalized seen_before + +let emit_heads_not_processed_event head_states = + Lwt_list.iter_s + (fun {head = Head {hash; level}; _} -> + Daemon_event.not_finalized_head hash level) + head_states + +let categorise_heads (node_ctxt : Node_context.t) old_heads new_heads = + (* For each head, determine if it has already been seen before and if it has + been finalized, using the block finality time (for Tenderbake, this + is 2). + *) + + (* TODO: https://gitlab.com/tezos/tezos/-/issues/2868 + Handle protocols with non-deterministic finality. *) + let all_heads = old_heads @ new_heads in + let number_of_temporary_heads = + min node_ctxt.block_finality_time (List.length all_heads) + in + + let number_of_new_heads = List.length new_heads in + + let (head_states, _, _) = + List.fold_right + (fun head (heads, n, m) -> + ({head; finalized = n <= 0; seen_before = m <= 0} :: heads, n - 1, m - 1)) + all_heads + ([], number_of_temporary_heads, number_of_new_heads) + in + head_states + +let process_head node_ctxt store head_state = + (* Because we keep track of finalized heads using transaction finality time, + rather than block finality time, it is possible that heads with the same + level are processed as finalized. Individual modules that process heads + when finalized, such as Commitment, need to take this into account. + *) let open Lwt_result_syntax in - let* () = Inbox.update node_ctxt store chain_event in - let* () = Interpreter.Arith.update store chain_event in + let {finalized; seen_before; head} = head_state in + let* () = + if seen_before then return_unit + else + let*! () = emit_head_processing_event head_state in + (* Avoid processing inbox again if it has been processed before for this head *) + let* () = Inbox.process_head node_ctxt store head in + (* Avoid storing and publishing commitments if the head is not final *) + (* Avoid triggering the pvm execution if this has been done before for this head *) + Interpreter.Arith.process_head store head + in + let* () = + if finalized then + Commitment.process_head (module Arith_pvm) node_ctxt store head + else return_unit + in + (* Publishing a commitment when one is available does not depend on the state of + the current head, but we still need to ensure that the node only published + one commitment per block. *) + Commitment.publish_commitment node_ctxt store + +(* [on_layer_1_chain_event node_ctxt store chain_event old_heads] processes a + list of heads, coming from either a list of [old_heads] or from the current + [chain_event]. [old_heads] is the list of heads returned by the previous + iteration of [on_layer_1_chain_event] in the [daemonize function]. These are + heads included in the branch currently tracked by the rollup node, and that + have only been partially processed, due to the rollup node not being able + to establish their finality. The function returns a list of heads from the + current branch tracked by the rollup node, whose finality cannot be + established at the time the function is invoked. Those heads will be + processed again at the next iteration of [on_layer_1_chain_event] in the + [daemonize] function. If [chain_event] is a rollback event, then no head + needs to be returned to be included as the rollup node started tracking a + new branch. + *) +let on_layer_1_chain_event node_ctxt store chain_event old_heads = + let open Lwt_result_syntax in + let open Layer1 in + let* non_final_heads = + match chain_event with + | SameBranch {new_head; intermediate_heads} -> + let head_states = + categorise_heads node_ctxt old_heads (intermediate_heads @ [new_head]) + in + let* () = List.iter_es (process_head node_ctxt store) head_states in + (* Return new_head to be processed as finalized head if the + next chain event is of type SameBranch. + *) + let non_final_head_states = + List.filter (fun head_state -> not head_state.finalized) head_states + in + let*! () = emit_heads_not_processed_event non_final_head_states in + let non_final_heads = + List.map (fun head_state -> head_state.head) non_final_head_states + in + return non_final_heads + | Rollback {new_head = Layer1.Head {level = new_level; _}} -> + (* The new_head of the rollback event corresponds to a head that + was previously finalized. Heads in `old_heads` that have a level + preceding or equal to `new_level` can now be considered final, + and will be processed as such. `new_level` can now be considered + as such. Heads in `old_heads` whose level is greater than + `new_level` can be safely discarded. + *) + let (final_heads, _non_final_heads) = + List.partition + (fun head -> + let (Layer1.Head {level; _}) = head in + level <= new_level) + old_heads + in + let+ () = + List.iter_es + (fun head -> + process_head + node_ctxt + store + {head; finalized = true; seen_before = true}) + final_heads + in + [] + in let*! () = Layer1.processed chain_event in - return () + return non_final_heads +(* TODO: https://gitlab.com/tezos/tezos/-/issues/2895 + Use Lwt_stream.fold_es once it is exposed. *) let iter_stream stream handle = - let rec go () = + let rec go heads = Lwt.bind (Lwt_stream.get stream) @@ fun tok -> match tok with | None -> return_unit - | Some element -> Lwt_result.bind (handle element) go + | Some element -> Lwt_result.bind (handle element heads) go in - go () + go [] let daemonize node_ctxt store layer_1_chain_events = Lwt.no_cancel @@ -68,13 +192,10 @@ let run ~data_dir (cctxt : Protocol_client_context.full) = let* rpc_server = RPC_server.Arith.start node_ctxt store configuration in (* Check that the public key hash is valid *) let* (_pkh, _pk, _skh) = Node_context.get_operator_keys node_ctxt in - (* Do not reorder the operations above this one, as - State depends on the RPC server to fetch the initial - rollup level, and modules below depend on State - to fetch in-memory variables - *) let* tezos_heads = Layer1.start configuration node_ctxt.cctxt store in let*! () = Inbox.start () in + let*! () = Commitment.start () in + let _ = install_finalizer store rpc_server in let*! () = Event.node_is_ready ~rpc_addr ~rpc_port in daemonize node_ctxt store tezos_heads diff --git a/src/proto_alpha/bin_sc_rollup_node/daemon_event.ml b/src/proto_alpha/bin_sc_rollup_node/daemon_event.ml new file mode 100644 index 0000000000000000000000000000000000000000..658d2c28fe9c4b20ba2f522d4239a29ff1dbea1c --- /dev/null +++ b/src/proto_alpha/bin_sc_rollup_node/daemon_event.ml @@ -0,0 +1,63 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 TriliTech *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +(* TODO: https://gitlab.com/tezos/tezos/-/issues/2880 + Add corresponding .mli file. *) + +module Simple = struct + include Internal_event.Simple + + let section = ["sc_rollup_node"; "daemon"] + + let head_processing = + declare_4 + ~section + ~name:"sc_rollup_daemon_process_head" + ~msg: + "Processing: head {hash} at level {level}: finalized? {finalized}, \ + partially processed? {seen_before}" + ~level:Notice + ("hash", Block_hash.encoding) + ("level", Data_encoding.int32) + ("finalized", Data_encoding.bool) + ("seen_before", Data_encoding.bool) + + let not_finalized_head = + declare_2 + ~section + ~name:"sc_rollup_daemon_not_finalized" + ~msg: + "The following head has only be partially processed - commitments have \ + not been computed: Head {hash} at level {level}" + ~level:Notice + ("hash", Block_hash.encoding) + ("level", Data_encoding.int32) +end + +let head_processing hash level finalized seen_before = + Simple.(emit head_processing (hash, level, finalized, seen_before)) + +let not_finalized_head hash level = + Simple.(emit not_finalized_head (hash, level)) diff --git a/src/proto_alpha/bin_sc_rollup_node/event.ml b/src/proto_alpha/bin_sc_rollup_node/event.ml index 83bc8e55805412bd75c4a7d7ea5f6d2a02cb8a46..12511fa90e9731fef389fbbb1b2e291367bf87ba 100644 --- a/src/proto_alpha/bin_sc_rollup_node/event.ml +++ b/src/proto_alpha/bin_sc_rollup_node/event.ml @@ -23,6 +23,8 @@ (* *) (*****************************************************************************) +(* TODO: https://gitlab.com/tezos/tezos/-/issues/2880 + Add corresponding .mli file. *) module Simple = struct include Internal_event.Simple diff --git a/src/proto_alpha/bin_sc_rollup_node/inbox.ml b/src/proto_alpha/bin_sc_rollup_node/inbox.ml index 837693e469ab733ef062e270e914f4f03df70e23..2518f3272cacf32c1d325dda555afe9b7d56a7e3 100644 --- a/src/proto_alpha/bin_sc_rollup_node/inbox.ml +++ b/src/proto_alpha/bin_sc_rollup_node/inbox.ml @@ -123,24 +123,6 @@ let process_head Node_context.({cctxt; rollup_address; _} as node_ctxt) store let*! () = State.add_history store head_hash history in return_unit -let update node_ctxt store chain_event = - let open Lwt_result_syntax in - let open Layer1 in - match chain_event with - | SameBranch {new_head; intermediate_heads} -> - let* () = - List.iter_es (process_head node_ctxt store) intermediate_heads - in - process_head node_ctxt store new_head - | Rollback {new_head = _} -> - (* - - Since [process_head] is robust to chain reorganizations, we do - need a specific treatment of [Rollback] events. - - *) - return_unit - let inbox_of_hash = State.inbox_of_hash let start () = Inbox_event.starting () diff --git a/src/proto_alpha/bin_sc_rollup_node/inbox.mli b/src/proto_alpha/bin_sc_rollup_node/inbox.mli index f2fe35e8738bc989875d9041f9f6fdd2f069a24b..162ebf02e44fbb422b2fecd88e187637ea2ffced 100644 --- a/src/proto_alpha/bin_sc_rollup_node/inbox.mli +++ b/src/proto_alpha/bin_sc_rollup_node/inbox.mli @@ -34,12 +34,13 @@ *) open Protocol -(** [update node_ctxt store chain_event] changes the state of the inbox to react to - the [chain_event]. In particular, this process requests the tezos node - through the context client [cctxt] to retrieve the messages published - during this [chain_event]. *) -val update : - Node_context.t -> Store.t -> Layer1.chain_event -> unit tzresult Lwt.t +(** [process_head node_ctxt store head] changes the state of the inbox to react to + [head]. In particular, this process requests the tezos node + through the context client [node_ctxt.cctxt] to retrieve the messages published + at the level indicated by [head]. *) + +val process_head : + Node_context.t -> Store.t -> Layer1.head -> unit tzresult Lwt.t (** [inbox_of_hash node_ctxt store block_hash] returns the rollup inbox at the end of the given validation of [block_hash]. *) diff --git a/src/proto_alpha/bin_sc_rollup_node/inbox_event.ml b/src/proto_alpha/bin_sc_rollup_node/inbox_event.ml index 36464fa0453fc72de9d72ddbba770f2ff4f39937..bd284969d7a65bcd2b6bfd5b38a3031bb891174f 100644 --- a/src/proto_alpha/bin_sc_rollup_node/inbox_event.ml +++ b/src/proto_alpha/bin_sc_rollup_node/inbox_event.ml @@ -23,6 +23,8 @@ (* *) (*****************************************************************************) +(* TODO: https://gitlab.com/tezos/tezos/-/issues/2880 + Add corresponding .mli file. *) module Simple = struct include Internal_event.Simple diff --git a/src/proto_alpha/bin_sc_rollup_node/interpreter.ml b/src/proto_alpha/bin_sc_rollup_node/interpreter.ml index 207a7076306354e1f7f039f32df4b1201d8ffb8e..57b2e2d34c97a30785ee584bb351449c6e7558da 100644 --- a/src/proto_alpha/bin_sc_rollup_node/interpreter.ml +++ b/src/proto_alpha/bin_sc_rollup_node/interpreter.ml @@ -28,9 +28,12 @@ open Alpha_context module Inbox = Store.Inbox module type S = sig - (** [update store event] interprets the messages associated with a chain [event]. - This requires the inbox to be updated beforehand. *) - val update : Store.t -> Layer1.chain_event -> unit tzresult Lwt.t + (** [process_head store head] interprets the messages associated with a [head] + from a chain [event]. This requires the inbox to be updated beforehand. *) + + val process_head : Store.t -> Layer1.head -> unit tzresult Lwt.t + + (** [start store] sets up the initial state for the PVM interpreter to work. *) end module Make (PVM : Pvm.S) : S = struct @@ -124,15 +127,6 @@ module Make (PVM : Pvm.S) : S = struct let open Lwt_result_syntax in let*! predecessor_hash = Layer1.predecessor store head in transition_pvm store predecessor_hash hash - - (** [update store chain_event] reacts to an event on the chain. *) - let update store chain_event = - let open Lwt_result_syntax in - match chain_event with - | Layer1.SameBranch {intermediate_heads; new_head} -> - let* () = List.iter_es (process_head store) intermediate_heads in - process_head store new_head - | Layer1.Rollback _new_head -> return_unit end module Arith = Make (Arith_pvm) diff --git a/src/proto_alpha/bin_sc_rollup_node/interpreter_event.ml b/src/proto_alpha/bin_sc_rollup_node/interpreter_event.ml index eecc453fd03e8b711b24556aad19cd78c96a8cef..bbabf0172a8aeeca9af93a11a52b4e5c4ae6f5a1 100644 --- a/src/proto_alpha/bin_sc_rollup_node/interpreter_event.ml +++ b/src/proto_alpha/bin_sc_rollup_node/interpreter_event.ml @@ -23,6 +23,9 @@ (* *) (*****************************************************************************) +(* TODO: https://gitlab.com/tezos/tezos/-/issues/2880 + Add corresponding .mli file. *) + open Protocol.Alpha_context.Sc_rollup module Simple = struct diff --git a/src/proto_alpha/bin_sc_rollup_node/layer1_event.ml b/src/proto_alpha/bin_sc_rollup_node/layer1_event.ml index 3559bfd6ad38c0e4388361fee299e67d216d18a6..3f88318a5ec3898214a1db94cd9d87cd392afd83 100644 --- a/src/proto_alpha/bin_sc_rollup_node/layer1_event.ml +++ b/src/proto_alpha/bin_sc_rollup_node/layer1_event.ml @@ -23,6 +23,9 @@ (* *) (*****************************************************************************) +(* TODO: https://gitlab.com/tezos/tezos/-/issues/2880 + Add corresponding .mli file. *) + module Simple = struct include Internal_event.Simple diff --git a/src/proto_alpha/bin_sc_rollup_node/node_context.ml b/src/proto_alpha/bin_sc_rollup_node/node_context.ml index f0d50a0f7ada891dc646d6d8db9f09071010ffbf..db77d919f4ca25b650875c280f3c4ccef9df8cd5 100644 --- a/src/proto_alpha/bin_sc_rollup_node/node_context.ml +++ b/src/proto_alpha/bin_sc_rollup_node/node_context.ml @@ -31,12 +31,13 @@ type t = { rollup_address : Sc_rollup.t; operator : Signature.Public_key_hash.t; initial_level : Raw_level.t; + block_finality_time : int; } -let get_operator_keys ctxt = +let get_operator_keys node_ctxt = let open Lwt_result_syntax in - let+ (_, pk, sk) = Client_keys.get_key ctxt.cctxt ctxt.operator in - (ctxt.operator, pk, sk) + let+ (_, pk, sk) = Client_keys.get_key node_ctxt.cctxt node_ctxt.operator in + (node_ctxt.operator, pk, sk) let init (cctxt : Protocol_client_context.full) rollup_address operator = let open Lwt_result_syntax in @@ -46,4 +47,4 @@ let init (cctxt : Protocol_client_context.full) rollup_address operator = (cctxt#chain, cctxt#block) rollup_address in - {cctxt; rollup_address; operator; initial_level} + {cctxt; rollup_address; operator; initial_level; block_finality_time = 2} diff --git a/src/proto_alpha/bin_sc_rollup_node/node_context.mli b/src/proto_alpha/bin_sc_rollup_node/node_context.mli index bb2205a84f99c738dbf235004d55d851223f231f..a67f8c8712fc4c07cc295c0c24636a12dd777644 100644 --- a/src/proto_alpha/bin_sc_rollup_node/node_context.mli +++ b/src/proto_alpha/bin_sc_rollup_node/node_context.mli @@ -37,6 +37,8 @@ type t = { (** Address of the rollup node operator. *) initial_level : Raw_level.t; (** Origination level of the smart contract rollup. *) + block_finality_time : int; + (** Deterministic block finality time for the layer 1 protocol. *) } (** [get_operator_keys cctxt] returns a triple [(pkh, pk, sk)] corresponding diff --git a/src/proto_alpha/bin_sc_rollup_node/store.ml b/src/proto_alpha/bin_sc_rollup_node/store.ml index 2873525d123f6600a6cd0120f8d967d5af35d9be..0b1635b0d92d0d87370ddde203f479a82c37d184 100644 --- a/src/proto_alpha/bin_sc_rollup_node/store.ml +++ b/src/proto_alpha/bin_sc_rollup_node/store.ml @@ -49,6 +49,20 @@ let info message = let date = Unix.gettimeofday () |> int_of_float |> Int64.of_int in Irmin.Info.Default.v ~author:"Tezos smart-contract rollup node" ~message date +module type Mutable_value = sig + type value + + val path_key : path + + val decode_value : bytes -> value Lwt.t + + val set : t -> value -> unit Lwt.t + + val get : t -> value Lwt.t + + val find : t -> value option Lwt.t +end + module Make_append_only_map (P : sig val path : path @@ -112,6 +126,8 @@ module Make_mutable_value (P : sig val value_encoding : value Data_encoding.t end) = struct + type value = P.value + let path_key = P.path let decode_value encoded_value = @@ -271,3 +287,33 @@ module Histories = Make_append_only_map (struct let value_encoding = Inbox.history_encoding end) + +module Commitments = Make_append_only_map (struct + let path = ["commitments"; "computed"] + + let keep_last_n_entries_in_memory = 10 + + type key = Raw_level.t + + let string_of_key l = Int32.to_string @@ Raw_level.to_int32 l + + type value = Sc_rollup.Commitment.t + + let value_encoding = Sc_rollup.Commitment.encoding +end) + +module Last_stored_commitment_level = Make_mutable_value (struct + let path = ["commitments"; "last_stored_level"] + + type value = Raw_level.t + + let value_encoding = Raw_level.encoding +end) + +module Last_published_commitment_level = Make_mutable_value (struct + let path = ["commitments"; "last_published_level"] + + type value = Raw_level.t + + let value_encoding = Raw_level.encoding +end) diff --git a/src/proto_alpha/lib_protocol/sc_rollup_repr.ml b/src/proto_alpha/lib_protocol/sc_rollup_repr.ml index 82174159d3208489412ee4228d1c170a63e19c2f..57d9d97de6d1aacd05e2085fef8d8cc8abbca7c8 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_repr.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_repr.ml @@ -222,7 +222,7 @@ module Commitment_hash_index = struct end module Number_of_messages = Bounded.Int32.Make (struct - let min_int = 1l + let min_int = 0l let max_int = 4096l (* TODO: check this is reasonable. @@ -231,7 +231,7 @@ module Number_of_messages = Bounded.Int32.Make (struct end) module Number_of_ticks = Bounded.Int32.Make (struct - let min_int = 1l + let min_int = 0l let max_int = Int32.max_int end) diff --git a/src/proto_alpha/lib_sc_rollup/sc_rollup_services.ml b/src/proto_alpha/lib_sc_rollup/sc_rollup_services.ml index e3888340130c3e1ee78dc08fd808a88261ac971d..9057cb7434e9f0ace5f194735975f541b2d518f0 100644 --- a/src/proto_alpha/lib_sc_rollup/sc_rollup_services.ml +++ b/src/proto_alpha/lib_sc_rollup/sc_rollup_services.ml @@ -83,6 +83,20 @@ let current_state_hash () = ~output:Sc_rollup.State_hash.encoding RPC_path.(open_root / "state_hash") +let last_stored_commitment () = + RPC_service.get_service + ~description:"Last commitment computed by the node" + ~query:RPC_query.empty + ~output:(Data_encoding.option Sc_rollup.Commitment.encoding) + RPC_path.(open_root / "last_stored_commitment") + +let last_published_commitment () = + RPC_service.get_service + ~description:"Last commitment published by the node" + ~query:RPC_query.empty + ~output:(Data_encoding.option Sc_rollup.Commitment.encoding) + RPC_path.(open_root / "last_published_commitment") + let current_status () = RPC_service.get_service ~description:"Current PVM status" diff --git a/tezt/_regressions/sc_rollup_commitment_of_rollup_node_commitment_is_stored.out b/tezt/_regressions/sc_rollup_commitment_of_rollup_node_commitment_is_stored.out new file mode 100644 index 0000000000000000000000000000000000000000..846a5b25d80a807b5cef173943e3a1d7c7cad52b --- /dev/null +++ b/tezt/_regressions/sc_rollup_commitment_of_rollup_node_commitment_is_stored.out @@ -0,0 +1,842 @@ +sc_rollup_commitment_of_rollup_node_commitment_is_stored.out + +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith booting with --burn-cap 9999999 +Node is bootstrapped. +Estimated gas: 1600.648 units (will add 100 for safety) +Estimated storage: 6522 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.000402 + Expected counter: 1 + Gas limit: 1701 + Storage limit: 6542 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000402 + payload fees(the block proposer) ....... +ꜩ0.000402 + Originate smart contract rollup of kind arith with boot sector '' + This smart contract rollup origination was successfully applied + Consumed gas: 1600.648 + Storage size: 6522 bytes + Address: [SC_ROLLUP_HASH] + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ1.6305 + storage fees ........................... +ꜩ1.6305 + + +./tezos-client rpc get '/chains/main/blocks/head/context/sc_rollup/[SC_ROLLUP_HASH]/initial_level' +2 + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.024 units (will add 100 for safety) +Estimated storage: no bytes added +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.000457 + Expected counter: 2 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000457 + payload fees(the block proposer) ....... +ꜩ0.000457 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.152 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 3 + current messages hash = CoWCiKBE7uyrqCwVM1ZRQEXatHvkqQU9GPf94ktpjasEgkRgKst3 + nb_available_messages = 1 + message_counter = 1 + old_levels_messages = + content = CoUkdBQ53N7FWav8LuTvrcp3jyoxnpqk3xnEo3gSCgNwia4fq44j + index = 1 + back_pointers = CoVawGHT9AxoKnd7hDBCii5PEcM2U3WbtL4L5HGD6PC9BWcLnzqD + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.216 units (will add 100 for safety) +Estimated storage: no bytes added +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.000469 + Expected counter: 3 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000469 + payload fees(the block proposer) ....... +ꜩ0.000469 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.344 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 4 + current messages hash = CoV5g92qvZ6GAh1Y44pMkB7B1RQzLyzpDDWMvVJzGFvbGhamRgag + nb_available_messages = 3 + message_counter = 2 + old_levels_messages = + content = CoWCiKBE7uyrqCwVM1ZRQEXatHvkqQU9GPf94ktpjasEgkRgKst3 + index = 2 + back_pointers = CoUmDifn9cHq3g1wRc8ft64oMz7Jha8f4mcUWZd2YRseVae6MQAN + CoUmDifn9cHq3g1wRc8ft64oMz7Jha8f4mcUWZd2YRseVae6MQAN + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.408 units (will add 100 for safety) +Estimated storage: no bytes added +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.000481 + Expected counter: 4 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000481 + payload fees(the block proposer) ....... +ꜩ0.000481 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.408 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 5 + current messages hash = CoUwCB8jyBHvPAUwbmFQN3zVJ8ncrGgx6bpVxpPjzHvuDzmjDNmW + nb_available_messages = 6 + message_counter = 3 + old_levels_messages = + content = CoV5g92qvZ6GAh1Y44pMkB7B1RQzLyzpDDWMvVJzGFvbGhamRgag + index = 3 + back_pointers = CoUybFZtfeEftCQTTS5AM8bvPtyikzL1HUdACbgxd9BrKNJboubL + CoUmDifn9cHq3g1wRc8ft64oMz7Jha8f4mcUWZd2YRseVae6MQAN + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.408 units (will add 100 for safety) +Estimated storage: no bytes added +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.000493 + Expected counter: 5 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000493 + payload fees(the block proposer) ....... +ꜩ0.000493 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.536 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 6 + current messages hash = CoW1rzZ87zYcazvNhJHqjcLQdKU5sxfKBbEfr2x6yYqWboXmqQ6Y + nb_available_messages = 10 + message_counter = 4 + old_levels_messages = + content = CoUwCB8jyBHvPAUwbmFQN3zVJ8ncrGgx6bpVxpPjzHvuDzmjDNmW + index = 4 + back_pointers = CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.600 units (will add 100 for safety) +Estimated storage: no bytes added +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.000505 + Expected counter: 6 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000505 + payload fees(the block proposer) ....... +ꜩ0.000505 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.600 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 7 + current messages hash = CoV1yU3Bv7dHwqGQQJ5UHwUrHPQrQcT6rHCEnArna31PpznNktdS + nb_available_messages = 15 + message_counter = 5 + old_levels_messages = + content = CoW1rzZ87zYcazvNhJHqjcLQdKU5sxfKBbEfr2x6yYqWboXmqQ6Y + index = 5 + back_pointers = CoUuHJY6aHn2xcYEkZw6p5REF5pucf43F9bd7Bf94ja92c1C6L6T + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.600 units (will add 100 for safety) +Estimated storage: no bytes added +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.000517 + Expected counter: 7 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000517 + payload fees(the block proposer) ....... +ꜩ0.000517 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.600 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 8 + current messages hash = CoW1wNosr2Cv2LXpM7RDT6Rrm26rSt2sfUgiE67iHyZZUPdhUPgu + nb_available_messages = 21 + message_counter = 6 + old_levels_messages = + content = CoV1yU3Bv7dHwqGQQJ5UHwUrHPQrQcT6rHCEnArna31PpznNktdS + index = 6 + back_pointers = CoWEpdWzAJArD6BJnSEXNxv9A9Ck59Yqa45fzWv39RnFyDko5CnC + CoWEpdWzAJArD6BJnSEXNxv9A9Ck59Yqa45fzWv39RnFyDko5CnC + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.600 units (will add 100 for safety) +Estimated storage: no bytes added +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.000529 + Expected counter: 8 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000529 + payload fees(the block proposer) ....... +ꜩ0.000529 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.600 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 9 + current messages hash = CoWPdmE2pHruLLyHifwtNAFU3UkuVyWV4ag1xF2ZGKdXF9A5oZ31 + nb_available_messages = 28 + message_counter = 7 + old_levels_messages = + content = CoW1wNosr2Cv2LXpM7RDT6Rrm26rSt2sfUgiE67iHyZZUPdhUPgu + index = 7 + back_pointers = CoWYUEaqJLtQbZMUGX8QJqyJATfmRTTrMrq5s6yetcXL2xdKD8XS + CoWEpdWzAJArD6BJnSEXNxv9A9Ck59Yqa45fzWv39RnFyDko5CnC + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.600 units (will add 100 for safety) +Estimated storage: no bytes added +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.000541 + Expected counter: 9 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000541 + payload fees(the block proposer) ....... +ꜩ0.000541 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.728 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 10 + current messages hash = CoWa9W9Xy6UKZqdwPJxxsRYXRBXr9yod6UsczkmxKdS9DLE9BDTg + nb_available_messages = 36 + message_counter = 8 + old_levels_messages = + content = CoWPdmE2pHruLLyHifwtNAFU3UkuVyWV4ag1xF2ZGKdXF9A5oZ31 + index = 8 + back_pointers = CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000553 + Expected counter: 10 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000553 + payload fees(the block proposer) ....... +ꜩ0.000553 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 11 + current messages hash = CoVCMjGs1K6zSZf1avuKH8bJD1LjYALaWTeTCSPX3wCcLrWt52J6 + nb_available_messages = 45 + message_counter = 9 + old_levels_messages = + content = CoWa9W9Xy6UKZqdwPJxxsRYXRBXr9yod6UsczkmxKdS9DLE9BDTg + index = 9 + back_pointers = CoVAD6ZY4uQJ1k6CM1x9ti8uZBTQY4ZiureXAhGdrcSB7VzFVmEc + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000565 + Expected counter: 11 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000565 + payload fees(the block proposer) ....... +ꜩ0.000565 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 12 + current messages hash = CoUjjZmHoHC42G5nVapUizgJNgn7MGLGHgFSVC2npyYzuAHpbMtu + nb_available_messages = 55 + message_counter = 10 + old_levels_messages = + content = CoVCMjGs1K6zSZf1avuKH8bJD1LjYALaWTeTCSPX3wCcLrWt52J6 + index = 10 + back_pointers = CoVNwcW6Ttpcn3mTA7nu7hAQCq8D9e6WCf8gxNqAq8bxy9NmbmgT + CoVNwcW6Ttpcn3mTA7nu7hAQCq8D9e6WCf8gxNqAq8bxy9NmbmgT + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000577 + Expected counter: 12 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000577 + payload fees(the block proposer) ....... +ꜩ0.000577 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 13 + current messages hash = CoV34A22GW4hw2JVKiWrtDP71pRg66hNG3TZ64ER2TqXQqwkum7t + nb_available_messages = 66 + message_counter = 11 + old_levels_messages = + content = CoUjjZmHoHC42G5nVapUizgJNgn7MGLGHgFSVC2npyYzuAHpbMtu + index = 11 + back_pointers = CoWVnYAm9kaAEzrTmr7V6sb7k3VMEaPF3jkDtc7mNj64yUKPDCo9 + CoVNwcW6Ttpcn3mTA7nu7hAQCq8D9e6WCf8gxNqAq8bxy9NmbmgT + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000589 + Expected counter: 13 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000589 + payload fees(the block proposer) ....... +ꜩ0.000589 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 14 + current messages hash = CoWGbM6CmBMjJFqPXaXVZvAFx87895PZaWU2Zf4TnmNEkComL9yY + nb_available_messages = 78 + message_counter = 12 + old_levels_messages = + content = CoV34A22GW4hw2JVKiWrtDP71pRg66hNG3TZ64ER2TqXQqwkum7t + index = 12 + back_pointers = CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000601 + Expected counter: 14 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000601 + payload fees(the block proposer) ....... +ꜩ0.000601 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 15 + current messages hash = CoWLWX7w2jYY498ZzHaAGVd4qvzcPDor1tgwoeyjnfX1W4pSZ3TP + nb_available_messages = 91 + message_counter = 13 + old_levels_messages = + content = CoWGbM6CmBMjJFqPXaXVZvAFx87895PZaWU2Zf4TnmNEkComL9yY + index = 13 + back_pointers = CoW1vyKLr1yxhgj1wZNMibqvHey2PytJ4o1ZcJ8ZZ3XrewN9YD7z + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000613 + Expected counter: 15 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000613 + payload fees(the block proposer) ....... +ꜩ0.000613 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 16 + current messages hash = CoW6aNmZx6G5pZjFVmFuV7buMW7ESyMVZ6NeGEfodesCrDrjFMjK + nb_available_messages = 105 + message_counter = 14 + old_levels_messages = + content = CoWLWX7w2jYY498ZzHaAGVd4qvzcPDor1tgwoeyjnfX1W4pSZ3TP + index = 14 + back_pointers = CoVzQgcgWcuux7wV7FS52KjunuQFMGBTPtV73my4c5aEydW1hbvC + CoVzQgcgWcuux7wV7FS52KjunuQFMGBTPtV73my4c5aEydW1hbvC + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000625 + Expected counter: 16 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000625 + payload fees(the block proposer) ....... +ꜩ0.000625 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 17 + current messages hash = CoUo1xoKDWmq58cjoFM5Q5mwyHEC6NYXE1LqXBtBG24eNigCStus + nb_available_messages = 120 + message_counter = 15 + old_levels_messages = + content = CoW6aNmZx6G5pZjFVmFuV7buMW7ESyMVZ6NeGEfodesCrDrjFMjK + index = 15 + back_pointers = CoUsYkJFu7gcZy2dLwVqCGpQBTJGeL8qMGzyiVnLXYyaJrjWgtDV + CoVzQgcgWcuux7wV7FS52KjunuQFMGBTPtV73my4c5aEydW1hbvC + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000637 + Expected counter: 17 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000637 + payload fees(the block proposer) ....... +ꜩ0.000637 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.920 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 18 + current messages hash = CoWUsFt7sWtYHXxMTDUQ3NEqiJMMW6V5Kwo2GxeStwstgfesvDsm + nb_available_messages = 136 + message_counter = 16 + old_levels_messages = + content = CoUo1xoKDWmq58cjoFM5Q5mwyHEC6NYXE1LqXBtBG24eNigCStus + index = 16 + back_pointers = CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.984 units (will add 100 for safety) +Estimated storage: no bytes added +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.000649 + Expected counter: 18 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000649 + payload fees(the block proposer) ....... +ꜩ0.000649 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.984 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 19 + current messages hash = CoVrTUpJJMCKybf2XQJq6TShTZ9grEp8214ZFdcJ7BhDRmS7EJzB + nb_available_messages = 153 + message_counter = 17 + old_levels_messages = + content = CoWUsFt7sWtYHXxMTDUQ3NEqiJMMW6V5Kwo2GxeStwstgfesvDsm + index = 17 + back_pointers = CoUwff6TrVYVha7opCKHDbo3x4VCgtrbWWN6HamTgWGsnxhYsiLV + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.984 units (will add 100 for safety) +Estimated storage: no bytes added +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.000661 + Expected counter: 19 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000661 + payload fees(the block proposer) ....... +ꜩ0.000661 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.984 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 20 + current messages hash = CoWYth5XtxAyDDmpvvDcLY1szc9seaKip1FW4971rUkE16EaUAvH + nb_available_messages = 171 + message_counter = 18 + old_levels_messages = + content = CoVrTUpJJMCKybf2XQJq6TShTZ9grEp8214ZFdcJ7BhDRmS7EJzB + index = 18 + back_pointers = CoW7eGZpdjXdDbsK1Np5Zta4sdKLf2rUFDHorB2gBMiqq9n8Reuo + CoW7eGZpdjXdDbsK1Np5Zta4sdKLf2rUFDHorB2gBMiqq9n8Reuo + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.984 units (will add 100 for safety) +Estimated storage: no bytes added +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.000673 + Expected counter: 20 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000673 + payload fees(the block proposer) ....... +ꜩ0.000673 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.984 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 21 + current messages hash = CoVooDD631U4DniRdMexS8nxVG8UfNwSMgpFzWdyG9MUsjnmWoTu + nb_available_messages = 190 + message_counter = 19 + old_levels_messages = + content = CoWYth5XtxAyDDmpvvDcLY1szc9seaKip1FW4971rUkE16EaUAvH + index = 19 + back_pointers = CoVif3e3s6pXM3mQkQCANwqjNBdDPaFhqTmZJBHZZEWS4xKvQEt4 + CoW7eGZpdjXdDbsK1Np5Zta4sdKLf2rUFDHorB2gBMiqq9n8Reuo + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.984 units (will add 100 for safety) +Estimated storage: no bytes added +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.000685 + Expected counter: 21 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000685 + payload fees(the block proposer) ....... +ꜩ0.000685 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.984 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 22 + current messages hash = CoV4vVmUCgzBS7gSiqLd8V4ec7y6xS3sM6nrUc7vLDmT8SBTCr4i + nb_available_messages = 210 + message_counter = 20 + old_levels_messages = + content = CoVooDD631U4DniRdMexS8nxVG8UfNwSMgpFzWdyG9MUsjnmWoTu + index = 20 + back_pointers = CoWWhYzUa9dzJYM8rkXLFQSGT9sN8pkDai6pfmkQD8UmGPnNvJfK + CoWWhYzUa9dzJYM8rkXLFQSGT9sN8pkDai6pfmkQD8UmGPnNvJfK + CoWWhYzUa9dzJYM8rkXLFQSGT9sN8pkDai6pfmkQD8UmGPnNvJfK + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-sc-rollup-client-alpha rpc get /last_stored_commitment +{ "compressed_state": + "[SC_ROLLUP_STATE_HASH]", + "inbox_level": 22, + "predecessor": "[SC_ROLLUP_COMMITMENT_HASH]", + "number_of_messages": 210, "number_of_ticks": 631 } + +./tezos-sc-rollup-client-alpha rpc get /last_published_commitment +{ "compressed_state": + "[SC_ROLLUP_STATE_HASH]", + "inbox_level": 22, + "predecessor": "[SC_ROLLUP_COMMITMENT_HASH]", + "number_of_messages": 210, "number_of_ticks": 631 } diff --git a/tezt/_regressions/sc_rollup_commitment_of_rollup_node_handles_chain_reorgs.out b/tezt/_regressions/sc_rollup_commitment_of_rollup_node_handles_chain_reorgs.out new file mode 100644 index 0000000000000000000000000000000000000000..2bb08097092a0f292c3367b0e83c74ae8ac1fd6c --- /dev/null +++ b/tezt/_regressions/sc_rollup_commitment_of_rollup_node_handles_chain_reorgs.out @@ -0,0 +1,89 @@ +sc_rollup_commitment_of_rollup_node_handles_chain_reorgs.out + +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith booting with --burn-cap 9999999 +Node is bootstrapped. +Estimated gas: 1600.648 units (will add 100 for safety) +Estimated storage: 6522 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.000402 + Expected counter: 1 + Gas limit: 1701 + Storage limit: 6542 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000402 + payload fees(the block proposer) ....... +ꜩ0.000402 + Originate smart contract rollup of kind arith with boot sector '' + This smart contract rollup origination was successfully applied + Consumed gas: 1600.648 + Storage size: 6522 bytes + Address: [SC_ROLLUP_HASH] + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ1.6305 + storage fees ........................... +ꜩ1.6305 + + +./tezos-client rpc get '/chains/main/blocks/head/context/sc_rollup/[SC_ROLLUP_HASH]/initial_level' +2 + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.664 units (will add 100 for safety) +Estimated storage: no bytes added +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.000457 + Expected counter: 2 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000457 + payload fees(the block proposer) ....... +ꜩ0.000457 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.664 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 22 + current messages hash = CoWCiKBE7uyrqCwVM1ZRQEXatHvkqQU9GPf94ktpjasEgkRgKst3 + nb_available_messages = 1 + message_counter = 1 + old_levels_messages = + content = CoUkdBQ53N7FWav8LuTvrcp3jyoxnpqk3xnEo3gSCgNwia4fq44j + index = 20 + back_pointers = CoUfuC6sQavMbyBDHr6zujymX6D6Wbo14aN69qCUCrc49hxJnPb3 + CoUfuC6sQavMbyBDHr6zujymX6D6Wbo14aN69qCUCrc49hxJnPb3 + CoUfuC6sQavMbyBDHr6zujymX6D6Wbo14aN69qCUCrc49hxJnPb3 + CoVs7qYHAiJBuPs36A7NMDo47y1nhL6mbdb2gEtMQi1zrBbRQzaX + CoVs7qYHAiJBuPs36A7NMDo47y1nhL6mbdb2gEtMQi1zrBbRQzaX + + + + +./tezos-sc-rollup-client-alpha rpc get /last_stored_commitment +{ "compressed_state": + "[SC_ROLLUP_STATE_HASH]", + "inbox_level": 22, + "predecessor": "[SC_ROLLUP_COMMITMENT_HASH]", + "number_of_messages": 0, "number_of_ticks": 0 } + +./tezos-sc-rollup-client-alpha rpc get /last_published_commitment +{ "compressed_state": + "[SC_ROLLUP_STATE_HASH]", + "inbox_level": 22, + "predecessor": "[SC_ROLLUP_COMMITMENT_HASH]", + "number_of_messages": 0, "number_of_ticks": 0 } diff --git a/tezt/_regressions/sc_rollup_commitment_of_rollup_node_messages_reset.out b/tezt/_regressions/sc_rollup_commitment_of_rollup_node_messages_reset.out new file mode 100644 index 0000000000000000000000000000000000000000..30136c3f4b76068d985d105e503b9d2f7bc24456 --- /dev/null +++ b/tezt/_regressions/sc_rollup_commitment_of_rollup_node_messages_reset.out @@ -0,0 +1,842 @@ +sc_rollup_commitment_of_rollup_node_messages_reset.out + +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith booting with --burn-cap 9999999 +Node is bootstrapped. +Estimated gas: 1600.648 units (will add 100 for safety) +Estimated storage: 6522 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.000402 + Expected counter: 1 + Gas limit: 1701 + Storage limit: 6542 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000402 + payload fees(the block proposer) ....... +ꜩ0.000402 + Originate smart contract rollup of kind arith with boot sector '' + This smart contract rollup origination was successfully applied + Consumed gas: 1600.648 + Storage size: 6522 bytes + Address: [SC_ROLLUP_HASH] + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ1.6305 + storage fees ........................... +ꜩ1.6305 + + +./tezos-client rpc get '/chains/main/blocks/head/context/sc_rollup/[SC_ROLLUP_HASH]/initial_level' +2 + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.024 units (will add 100 for safety) +Estimated storage: no bytes added +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.000457 + Expected counter: 2 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000457 + payload fees(the block proposer) ....... +ꜩ0.000457 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.152 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 3 + current messages hash = CoWCiKBE7uyrqCwVM1ZRQEXatHvkqQU9GPf94ktpjasEgkRgKst3 + nb_available_messages = 1 + message_counter = 1 + old_levels_messages = + content = CoUkdBQ53N7FWav8LuTvrcp3jyoxnpqk3xnEo3gSCgNwia4fq44j + index = 1 + back_pointers = CoVawGHT9AxoKnd7hDBCii5PEcM2U3WbtL4L5HGD6PC9BWcLnzqD + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.216 units (will add 100 for safety) +Estimated storage: no bytes added +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.000469 + Expected counter: 3 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000469 + payload fees(the block proposer) ....... +ꜩ0.000469 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.344 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 4 + current messages hash = CoV5g92qvZ6GAh1Y44pMkB7B1RQzLyzpDDWMvVJzGFvbGhamRgag + nb_available_messages = 3 + message_counter = 2 + old_levels_messages = + content = CoWCiKBE7uyrqCwVM1ZRQEXatHvkqQU9GPf94ktpjasEgkRgKst3 + index = 2 + back_pointers = CoUmDifn9cHq3g1wRc8ft64oMz7Jha8f4mcUWZd2YRseVae6MQAN + CoUmDifn9cHq3g1wRc8ft64oMz7Jha8f4mcUWZd2YRseVae6MQAN + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.408 units (will add 100 for safety) +Estimated storage: no bytes added +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.000481 + Expected counter: 4 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000481 + payload fees(the block proposer) ....... +ꜩ0.000481 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.408 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 5 + current messages hash = CoUwCB8jyBHvPAUwbmFQN3zVJ8ncrGgx6bpVxpPjzHvuDzmjDNmW + nb_available_messages = 6 + message_counter = 3 + old_levels_messages = + content = CoV5g92qvZ6GAh1Y44pMkB7B1RQzLyzpDDWMvVJzGFvbGhamRgag + index = 3 + back_pointers = CoUybFZtfeEftCQTTS5AM8bvPtyikzL1HUdACbgxd9BrKNJboubL + CoUmDifn9cHq3g1wRc8ft64oMz7Jha8f4mcUWZd2YRseVae6MQAN + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.408 units (will add 100 for safety) +Estimated storage: no bytes added +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.000493 + Expected counter: 5 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000493 + payload fees(the block proposer) ....... +ꜩ0.000493 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.536 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 6 + current messages hash = CoW1rzZ87zYcazvNhJHqjcLQdKU5sxfKBbEfr2x6yYqWboXmqQ6Y + nb_available_messages = 10 + message_counter = 4 + old_levels_messages = + content = CoUwCB8jyBHvPAUwbmFQN3zVJ8ncrGgx6bpVxpPjzHvuDzmjDNmW + index = 4 + back_pointers = CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.600 units (will add 100 for safety) +Estimated storage: no bytes added +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.000505 + Expected counter: 6 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000505 + payload fees(the block proposer) ....... +ꜩ0.000505 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.600 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 7 + current messages hash = CoV1yU3Bv7dHwqGQQJ5UHwUrHPQrQcT6rHCEnArna31PpznNktdS + nb_available_messages = 15 + message_counter = 5 + old_levels_messages = + content = CoW1rzZ87zYcazvNhJHqjcLQdKU5sxfKBbEfr2x6yYqWboXmqQ6Y + index = 5 + back_pointers = CoUuHJY6aHn2xcYEkZw6p5REF5pucf43F9bd7Bf94ja92c1C6L6T + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.600 units (will add 100 for safety) +Estimated storage: no bytes added +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.000517 + Expected counter: 7 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000517 + payload fees(the block proposer) ....... +ꜩ0.000517 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.600 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 8 + current messages hash = CoW1wNosr2Cv2LXpM7RDT6Rrm26rSt2sfUgiE67iHyZZUPdhUPgu + nb_available_messages = 21 + message_counter = 6 + old_levels_messages = + content = CoV1yU3Bv7dHwqGQQJ5UHwUrHPQrQcT6rHCEnArna31PpznNktdS + index = 6 + back_pointers = CoWEpdWzAJArD6BJnSEXNxv9A9Ck59Yqa45fzWv39RnFyDko5CnC + CoWEpdWzAJArD6BJnSEXNxv9A9Ck59Yqa45fzWv39RnFyDko5CnC + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.600 units (will add 100 for safety) +Estimated storage: no bytes added +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.000529 + Expected counter: 8 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000529 + payload fees(the block proposer) ....... +ꜩ0.000529 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.600 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 9 + current messages hash = CoWPdmE2pHruLLyHifwtNAFU3UkuVyWV4ag1xF2ZGKdXF9A5oZ31 + nb_available_messages = 28 + message_counter = 7 + old_levels_messages = + content = CoW1wNosr2Cv2LXpM7RDT6Rrm26rSt2sfUgiE67iHyZZUPdhUPgu + index = 7 + back_pointers = CoWYUEaqJLtQbZMUGX8QJqyJATfmRTTrMrq5s6yetcXL2xdKD8XS + CoWEpdWzAJArD6BJnSEXNxv9A9Ck59Yqa45fzWv39RnFyDko5CnC + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.600 units (will add 100 for safety) +Estimated storage: no bytes added +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.000541 + Expected counter: 9 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000541 + payload fees(the block proposer) ....... +ꜩ0.000541 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.728 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 10 + current messages hash = CoWa9W9Xy6UKZqdwPJxxsRYXRBXr9yod6UsczkmxKdS9DLE9BDTg + nb_available_messages = 36 + message_counter = 8 + old_levels_messages = + content = CoWPdmE2pHruLLyHifwtNAFU3UkuVyWV4ag1xF2ZGKdXF9A5oZ31 + index = 8 + back_pointers = CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000553 + Expected counter: 10 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000553 + payload fees(the block proposer) ....... +ꜩ0.000553 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 11 + current messages hash = CoVCMjGs1K6zSZf1avuKH8bJD1LjYALaWTeTCSPX3wCcLrWt52J6 + nb_available_messages = 45 + message_counter = 9 + old_levels_messages = + content = CoWa9W9Xy6UKZqdwPJxxsRYXRBXr9yod6UsczkmxKdS9DLE9BDTg + index = 9 + back_pointers = CoVAD6ZY4uQJ1k6CM1x9ti8uZBTQY4ZiureXAhGdrcSB7VzFVmEc + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000565 + Expected counter: 11 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000565 + payload fees(the block proposer) ....... +ꜩ0.000565 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 12 + current messages hash = CoUjjZmHoHC42G5nVapUizgJNgn7MGLGHgFSVC2npyYzuAHpbMtu + nb_available_messages = 55 + message_counter = 10 + old_levels_messages = + content = CoVCMjGs1K6zSZf1avuKH8bJD1LjYALaWTeTCSPX3wCcLrWt52J6 + index = 10 + back_pointers = CoVNwcW6Ttpcn3mTA7nu7hAQCq8D9e6WCf8gxNqAq8bxy9NmbmgT + CoVNwcW6Ttpcn3mTA7nu7hAQCq8D9e6WCf8gxNqAq8bxy9NmbmgT + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000577 + Expected counter: 12 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000577 + payload fees(the block proposer) ....... +ꜩ0.000577 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 13 + current messages hash = CoV34A22GW4hw2JVKiWrtDP71pRg66hNG3TZ64ER2TqXQqwkum7t + nb_available_messages = 66 + message_counter = 11 + old_levels_messages = + content = CoUjjZmHoHC42G5nVapUizgJNgn7MGLGHgFSVC2npyYzuAHpbMtu + index = 11 + back_pointers = CoWVnYAm9kaAEzrTmr7V6sb7k3VMEaPF3jkDtc7mNj64yUKPDCo9 + CoVNwcW6Ttpcn3mTA7nu7hAQCq8D9e6WCf8gxNqAq8bxy9NmbmgT + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000589 + Expected counter: 13 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000589 + payload fees(the block proposer) ....... +ꜩ0.000589 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 14 + current messages hash = CoWGbM6CmBMjJFqPXaXVZvAFx87895PZaWU2Zf4TnmNEkComL9yY + nb_available_messages = 78 + message_counter = 12 + old_levels_messages = + content = CoV34A22GW4hw2JVKiWrtDP71pRg66hNG3TZ64ER2TqXQqwkum7t + index = 12 + back_pointers = CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000601 + Expected counter: 14 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000601 + payload fees(the block proposer) ....... +ꜩ0.000601 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 15 + current messages hash = CoWLWX7w2jYY498ZzHaAGVd4qvzcPDor1tgwoeyjnfX1W4pSZ3TP + nb_available_messages = 91 + message_counter = 13 + old_levels_messages = + content = CoWGbM6CmBMjJFqPXaXVZvAFx87895PZaWU2Zf4TnmNEkComL9yY + index = 13 + back_pointers = CoW1vyKLr1yxhgj1wZNMibqvHey2PytJ4o1ZcJ8ZZ3XrewN9YD7z + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000613 + Expected counter: 15 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000613 + payload fees(the block proposer) ....... +ꜩ0.000613 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 16 + current messages hash = CoW6aNmZx6G5pZjFVmFuV7buMW7ESyMVZ6NeGEfodesCrDrjFMjK + nb_available_messages = 105 + message_counter = 14 + old_levels_messages = + content = CoWLWX7w2jYY498ZzHaAGVd4qvzcPDor1tgwoeyjnfX1W4pSZ3TP + index = 14 + back_pointers = CoVzQgcgWcuux7wV7FS52KjunuQFMGBTPtV73my4c5aEydW1hbvC + CoVzQgcgWcuux7wV7FS52KjunuQFMGBTPtV73my4c5aEydW1hbvC + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000625 + Expected counter: 16 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000625 + payload fees(the block proposer) ....... +ꜩ0.000625 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 17 + current messages hash = CoUo1xoKDWmq58cjoFM5Q5mwyHEC6NYXE1LqXBtBG24eNigCStus + nb_available_messages = 120 + message_counter = 15 + old_levels_messages = + content = CoW6aNmZx6G5pZjFVmFuV7buMW7ESyMVZ6NeGEfodesCrDrjFMjK + index = 15 + back_pointers = CoUsYkJFu7gcZy2dLwVqCGpQBTJGeL8qMGzyiVnLXYyaJrjWgtDV + CoVzQgcgWcuux7wV7FS52KjunuQFMGBTPtV73my4c5aEydW1hbvC + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000637 + Expected counter: 17 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000637 + payload fees(the block proposer) ....... +ꜩ0.000637 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.920 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 18 + current messages hash = CoWUsFt7sWtYHXxMTDUQ3NEqiJMMW6V5Kwo2GxeStwstgfesvDsm + nb_available_messages = 136 + message_counter = 16 + old_levels_messages = + content = CoUo1xoKDWmq58cjoFM5Q5mwyHEC6NYXE1LqXBtBG24eNigCStus + index = 16 + back_pointers = CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.984 units (will add 100 for safety) +Estimated storage: no bytes added +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.000649 + Expected counter: 18 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000649 + payload fees(the block proposer) ....... +ꜩ0.000649 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.984 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 19 + current messages hash = CoVrTUpJJMCKybf2XQJq6TShTZ9grEp8214ZFdcJ7BhDRmS7EJzB + nb_available_messages = 153 + message_counter = 17 + old_levels_messages = + content = CoWUsFt7sWtYHXxMTDUQ3NEqiJMMW6V5Kwo2GxeStwstgfesvDsm + index = 17 + back_pointers = CoUwff6TrVYVha7opCKHDbo3x4VCgtrbWWN6HamTgWGsnxhYsiLV + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.984 units (will add 100 for safety) +Estimated storage: no bytes added +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.000661 + Expected counter: 19 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000661 + payload fees(the block proposer) ....... +ꜩ0.000661 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.984 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 20 + current messages hash = CoWYth5XtxAyDDmpvvDcLY1szc9seaKip1FW4971rUkE16EaUAvH + nb_available_messages = 171 + message_counter = 18 + old_levels_messages = + content = CoVrTUpJJMCKybf2XQJq6TShTZ9grEp8214ZFdcJ7BhDRmS7EJzB + index = 18 + back_pointers = CoW7eGZpdjXdDbsK1Np5Zta4sdKLf2rUFDHorB2gBMiqq9n8Reuo + CoW7eGZpdjXdDbsK1Np5Zta4sdKLf2rUFDHorB2gBMiqq9n8Reuo + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.984 units (will add 100 for safety) +Estimated storage: no bytes added +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.000673 + Expected counter: 20 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000673 + payload fees(the block proposer) ....... +ꜩ0.000673 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.984 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 21 + current messages hash = CoVooDD631U4DniRdMexS8nxVG8UfNwSMgpFzWdyG9MUsjnmWoTu + nb_available_messages = 190 + message_counter = 19 + old_levels_messages = + content = CoWYth5XtxAyDDmpvvDcLY1szc9seaKip1FW4971rUkE16EaUAvH + index = 19 + back_pointers = CoVif3e3s6pXM3mQkQCANwqjNBdDPaFhqTmZJBHZZEWS4xKvQEt4 + CoW7eGZpdjXdDbsK1Np5Zta4sdKLf2rUFDHorB2gBMiqq9n8Reuo + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.984 units (will add 100 for safety) +Estimated storage: no bytes added +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.000685 + Expected counter: 21 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000685 + payload fees(the block proposer) ....... +ꜩ0.000685 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.984 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 22 + current messages hash = CoV4vVmUCgzBS7gSiqLd8V4ec7y6xS3sM6nrUc7vLDmT8SBTCr4i + nb_available_messages = 210 + message_counter = 20 + old_levels_messages = + content = CoVooDD631U4DniRdMexS8nxVG8UfNwSMgpFzWdyG9MUsjnmWoTu + index = 20 + back_pointers = CoWWhYzUa9dzJYM8rkXLFQSGT9sN8pkDai6pfmkQD8UmGPnNvJfK + CoWWhYzUa9dzJYM8rkXLFQSGT9sN8pkDai6pfmkQD8UmGPnNvJfK + CoWWhYzUa9dzJYM8rkXLFQSGT9sN8pkDai6pfmkQD8UmGPnNvJfK + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-sc-rollup-client-alpha rpc get /last_stored_commitment +{ "compressed_state": + "[SC_ROLLUP_STATE_HASH]", + "inbox_level": 42, + "predecessor": "[SC_ROLLUP_COMMITMENT_HASH]", + "number_of_messages": 0, "number_of_ticks": 0 } + +./tezos-sc-rollup-client-alpha rpc get /last_published_commitment +{ "compressed_state": + "[SC_ROLLUP_STATE_HASH]", + "inbox_level": 42, + "predecessor": "[SC_ROLLUP_COMMITMENT_HASH]", + "number_of_messages": 0, "number_of_ticks": 0 } diff --git a/tezt/_regressions/sc_rollup_commitment_of_rollup_node_non_final_level.out b/tezt/_regressions/sc_rollup_commitment_of_rollup_node_non_final_level.out new file mode 100644 index 0000000000000000000000000000000000000000..7dd89df2e587e8373d55ea7ed072e536c2f9a257 --- /dev/null +++ b/tezt/_regressions/sc_rollup_commitment_of_rollup_node_non_final_level.out @@ -0,0 +1,834 @@ +sc_rollup_commitment_of_rollup_node_non_final_level.out + +./tezos-client --wait none originate sc rollup from '[PUBLIC_KEY_HASH]' of kind arith booting with --burn-cap 9999999 +Node is bootstrapped. +Estimated gas: 1600.648 units (will add 100 for safety) +Estimated storage: 6522 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.000402 + Expected counter: 1 + Gas limit: 1701 + Storage limit: 6542 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000402 + payload fees(the block proposer) ....... +ꜩ0.000402 + Originate smart contract rollup of kind arith with boot sector '' + This smart contract rollup origination was successfully applied + Consumed gas: 1600.648 + Storage size: 6522 bytes + Address: [SC_ROLLUP_HASH] + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ1.6305 + storage fees ........................... +ꜩ1.6305 + + +./tezos-client rpc get '/chains/main/blocks/head/context/sc_rollup/[SC_ROLLUP_HASH]/initial_level' +2 + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.024 units (will add 100 for safety) +Estimated storage: no bytes added +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.000457 + Expected counter: 2 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000457 + payload fees(the block proposer) ....... +ꜩ0.000457 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.152 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 3 + current messages hash = CoWCiKBE7uyrqCwVM1ZRQEXatHvkqQU9GPf94ktpjasEgkRgKst3 + nb_available_messages = 1 + message_counter = 1 + old_levels_messages = + content = CoUkdBQ53N7FWav8LuTvrcp3jyoxnpqk3xnEo3gSCgNwia4fq44j + index = 1 + back_pointers = CoVawGHT9AxoKnd7hDBCii5PEcM2U3WbtL4L5HGD6PC9BWcLnzqD + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.216 units (will add 100 for safety) +Estimated storage: no bytes added +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.000469 + Expected counter: 3 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000469 + payload fees(the block proposer) ....... +ꜩ0.000469 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.344 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 4 + current messages hash = CoV5g92qvZ6GAh1Y44pMkB7B1RQzLyzpDDWMvVJzGFvbGhamRgag + nb_available_messages = 3 + message_counter = 2 + old_levels_messages = + content = CoWCiKBE7uyrqCwVM1ZRQEXatHvkqQU9GPf94ktpjasEgkRgKst3 + index = 2 + back_pointers = CoUmDifn9cHq3g1wRc8ft64oMz7Jha8f4mcUWZd2YRseVae6MQAN + CoUmDifn9cHq3g1wRc8ft64oMz7Jha8f4mcUWZd2YRseVae6MQAN + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.408 units (will add 100 for safety) +Estimated storage: no bytes added +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.000481 + Expected counter: 4 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000481 + payload fees(the block proposer) ....... +ꜩ0.000481 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.408 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 5 + current messages hash = CoUwCB8jyBHvPAUwbmFQN3zVJ8ncrGgx6bpVxpPjzHvuDzmjDNmW + nb_available_messages = 6 + message_counter = 3 + old_levels_messages = + content = CoV5g92qvZ6GAh1Y44pMkB7B1RQzLyzpDDWMvVJzGFvbGhamRgag + index = 3 + back_pointers = CoUybFZtfeEftCQTTS5AM8bvPtyikzL1HUdACbgxd9BrKNJboubL + CoUmDifn9cHq3g1wRc8ft64oMz7Jha8f4mcUWZd2YRseVae6MQAN + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.408 units (will add 100 for safety) +Estimated storage: no bytes added +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.000493 + Expected counter: 5 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000493 + payload fees(the block proposer) ....... +ꜩ0.000493 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.536 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 6 + current messages hash = CoW1rzZ87zYcazvNhJHqjcLQdKU5sxfKBbEfr2x6yYqWboXmqQ6Y + nb_available_messages = 10 + message_counter = 4 + old_levels_messages = + content = CoUwCB8jyBHvPAUwbmFQN3zVJ8ncrGgx6bpVxpPjzHvuDzmjDNmW + index = 4 + back_pointers = CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.600 units (will add 100 for safety) +Estimated storage: no bytes added +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.000505 + Expected counter: 6 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000505 + payload fees(the block proposer) ....... +ꜩ0.000505 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.600 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 7 + current messages hash = CoV1yU3Bv7dHwqGQQJ5UHwUrHPQrQcT6rHCEnArna31PpznNktdS + nb_available_messages = 15 + message_counter = 5 + old_levels_messages = + content = CoW1rzZ87zYcazvNhJHqjcLQdKU5sxfKBbEfr2x6yYqWboXmqQ6Y + index = 5 + back_pointers = CoUuHJY6aHn2xcYEkZw6p5REF5pucf43F9bd7Bf94ja92c1C6L6T + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.600 units (will add 100 for safety) +Estimated storage: no bytes added +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.000517 + Expected counter: 7 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000517 + payload fees(the block proposer) ....... +ꜩ0.000517 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.600 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 8 + current messages hash = CoW1wNosr2Cv2LXpM7RDT6Rrm26rSt2sfUgiE67iHyZZUPdhUPgu + nb_available_messages = 21 + message_counter = 6 + old_levels_messages = + content = CoV1yU3Bv7dHwqGQQJ5UHwUrHPQrQcT6rHCEnArna31PpznNktdS + index = 6 + back_pointers = CoWEpdWzAJArD6BJnSEXNxv9A9Ck59Yqa45fzWv39RnFyDko5CnC + CoWEpdWzAJArD6BJnSEXNxv9A9Ck59Yqa45fzWv39RnFyDko5CnC + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.600 units (will add 100 for safety) +Estimated storage: no bytes added +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.000529 + Expected counter: 8 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000529 + payload fees(the block proposer) ....... +ꜩ0.000529 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.600 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 9 + current messages hash = CoWPdmE2pHruLLyHifwtNAFU3UkuVyWV4ag1xF2ZGKdXF9A5oZ31 + nb_available_messages = 28 + message_counter = 7 + old_levels_messages = + content = CoW1wNosr2Cv2LXpM7RDT6Rrm26rSt2sfUgiE67iHyZZUPdhUPgu + index = 7 + back_pointers = CoWYUEaqJLtQbZMUGX8QJqyJATfmRTTrMrq5s6yetcXL2xdKD8XS + CoWEpdWzAJArD6BJnSEXNxv9A9Ck59Yqa45fzWv39RnFyDko5CnC + CoUuVzgWodPAFfiJbh32Hw5MwBQdxo4fqL5NeLBUkfWuWn2NNYg4 + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.600 units (will add 100 for safety) +Estimated storage: no bytes added +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.000541 + Expected counter: 9 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000541 + payload fees(the block proposer) ....... +ꜩ0.000541 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.728 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 10 + current messages hash = CoWa9W9Xy6UKZqdwPJxxsRYXRBXr9yod6UsczkmxKdS9DLE9BDTg + nb_available_messages = 36 + message_counter = 8 + old_levels_messages = + content = CoWPdmE2pHruLLyHifwtNAFU3UkuVyWV4ag1xF2ZGKdXF9A5oZ31 + index = 8 + back_pointers = CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000553 + Expected counter: 10 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000553 + payload fees(the block proposer) ....... +ꜩ0.000553 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 11 + current messages hash = CoVCMjGs1K6zSZf1avuKH8bJD1LjYALaWTeTCSPX3wCcLrWt52J6 + nb_available_messages = 45 + message_counter = 9 + old_levels_messages = + content = CoWa9W9Xy6UKZqdwPJxxsRYXRBXr9yod6UsczkmxKdS9DLE9BDTg + index = 9 + back_pointers = CoVAD6ZY4uQJ1k6CM1x9ti8uZBTQY4ZiureXAhGdrcSB7VzFVmEc + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000565 + Expected counter: 11 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000565 + payload fees(the block proposer) ....... +ꜩ0.000565 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 12 + current messages hash = CoUjjZmHoHC42G5nVapUizgJNgn7MGLGHgFSVC2npyYzuAHpbMtu + nb_available_messages = 55 + message_counter = 10 + old_levels_messages = + content = CoVCMjGs1K6zSZf1avuKH8bJD1LjYALaWTeTCSPX3wCcLrWt52J6 + index = 10 + back_pointers = CoVNwcW6Ttpcn3mTA7nu7hAQCq8D9e6WCf8gxNqAq8bxy9NmbmgT + CoVNwcW6Ttpcn3mTA7nu7hAQCq8D9e6WCf8gxNqAq8bxy9NmbmgT + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000577 + Expected counter: 12 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000577 + payload fees(the block proposer) ....... +ꜩ0.000577 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 13 + current messages hash = CoV34A22GW4hw2JVKiWrtDP71pRg66hNG3TZ64ER2TqXQqwkum7t + nb_available_messages = 66 + message_counter = 11 + old_levels_messages = + content = CoUjjZmHoHC42G5nVapUizgJNgn7MGLGHgFSVC2npyYzuAHpbMtu + index = 11 + back_pointers = CoWVnYAm9kaAEzrTmr7V6sb7k3VMEaPF3jkDtc7mNj64yUKPDCo9 + CoVNwcW6Ttpcn3mTA7nu7hAQCq8D9e6WCf8gxNqAq8bxy9NmbmgT + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000589 + Expected counter: 13 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000589 + payload fees(the block proposer) ....... +ꜩ0.000589 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 14 + current messages hash = CoWGbM6CmBMjJFqPXaXVZvAFx87895PZaWU2Zf4TnmNEkComL9yY + nb_available_messages = 78 + message_counter = 12 + old_levels_messages = + content = CoV34A22GW4hw2JVKiWrtDP71pRg66hNG3TZ64ER2TqXQqwkum7t + index = 12 + back_pointers = CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000601 + Expected counter: 14 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000601 + payload fees(the block proposer) ....... +ꜩ0.000601 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 15 + current messages hash = CoWLWX7w2jYY498ZzHaAGVd4qvzcPDor1tgwoeyjnfX1W4pSZ3TP + nb_available_messages = 91 + message_counter = 13 + old_levels_messages = + content = CoWGbM6CmBMjJFqPXaXVZvAFx87895PZaWU2Zf4TnmNEkComL9yY + index = 13 + back_pointers = CoW1vyKLr1yxhgj1wZNMibqvHey2PytJ4o1ZcJ8ZZ3XrewN9YD7z + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000613 + Expected counter: 15 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000613 + payload fees(the block proposer) ....... +ꜩ0.000613 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 16 + current messages hash = CoW6aNmZx6G5pZjFVmFuV7buMW7ESyMVZ6NeGEfodesCrDrjFMjK + nb_available_messages = 105 + message_counter = 14 + old_levels_messages = + content = CoWLWX7w2jYY498ZzHaAGVd4qvzcPDor1tgwoeyjnfX1W4pSZ3TP + index = 14 + back_pointers = CoVzQgcgWcuux7wV7FS52KjunuQFMGBTPtV73my4c5aEydW1hbvC + CoVzQgcgWcuux7wV7FS52KjunuQFMGBTPtV73my4c5aEydW1hbvC + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000625 + Expected counter: 16 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000625 + payload fees(the block proposer) ....... +ꜩ0.000625 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.792 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 17 + current messages hash = CoUo1xoKDWmq58cjoFM5Q5mwyHEC6NYXE1LqXBtBG24eNigCStus + nb_available_messages = 120 + message_counter = 15 + old_levels_messages = + content = CoW6aNmZx6G5pZjFVmFuV7buMW7ESyMVZ6NeGEfodesCrDrjFMjK + index = 15 + back_pointers = CoUsYkJFu7gcZy2dLwVqCGpQBTJGeL8qMGzyiVnLXYyaJrjWgtDV + CoVzQgcgWcuux7wV7FS52KjunuQFMGBTPtV73my4c5aEydW1hbvC + CoV5dfXKwzYtM8MZY6uEjAmHSsbJGNHjbEjNwK6nNxeGVumLpU5s + CoWSjMYid5Yv62Ba3LHbU2Pvr1VMsfVnV6rhxWNj7SwwwJhbUdpk + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.792 units (will add 100 for safety) +Estimated storage: no bytes added +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.000637 + Expected counter: 17 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000637 + payload fees(the block proposer) ....... +ꜩ0.000637 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.920 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 18 + current messages hash = CoWUsFt7sWtYHXxMTDUQ3NEqiJMMW6V5Kwo2GxeStwstgfesvDsm + nb_available_messages = 136 + message_counter = 16 + old_levels_messages = + content = CoUo1xoKDWmq58cjoFM5Q5mwyHEC6NYXE1LqXBtBG24eNigCStus + index = 16 + back_pointers = CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.984 units (will add 100 for safety) +Estimated storage: no bytes added +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.000649 + Expected counter: 18 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000649 + payload fees(the block proposer) ....... +ꜩ0.000649 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.984 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 19 + current messages hash = CoVrTUpJJMCKybf2XQJq6TShTZ9grEp8214ZFdcJ7BhDRmS7EJzB + nb_available_messages = 153 + message_counter = 17 + old_levels_messages = + content = CoWUsFt7sWtYHXxMTDUQ3NEqiJMMW6V5Kwo2GxeStwstgfesvDsm + index = 17 + back_pointers = CoUwff6TrVYVha7opCKHDbo3x4VCgtrbWWN6HamTgWGsnxhYsiLV + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.984 units (will add 100 for safety) +Estimated storage: no bytes added +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.000661 + Expected counter: 19 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000661 + payload fees(the block proposer) ....... +ꜩ0.000661 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.984 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 20 + current messages hash = CoWYth5XtxAyDDmpvvDcLY1szc9seaKip1FW4971rUkE16EaUAvH + nb_available_messages = 171 + message_counter = 18 + old_levels_messages = + content = CoVrTUpJJMCKybf2XQJq6TShTZ9grEp8214ZFdcJ7BhDRmS7EJzB + index = 18 + back_pointers = CoW7eGZpdjXdDbsK1Np5Zta4sdKLf2rUFDHorB2gBMiqq9n8Reuo + CoW7eGZpdjXdDbsK1Np5Zta4sdKLf2rUFDHorB2gBMiqq9n8Reuo + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.984 units (will add 100 for safety) +Estimated storage: no bytes added +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.000673 + Expected counter: 20 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000673 + payload fees(the block proposer) ....... +ꜩ0.000673 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.984 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 21 + current messages hash = CoVooDD631U4DniRdMexS8nxVG8UfNwSMgpFzWdyG9MUsjnmWoTu + nb_available_messages = 190 + message_counter = 19 + old_levels_messages = + content = CoWYth5XtxAyDDmpvvDcLY1szc9seaKip1FW4971rUkE16EaUAvH + index = 19 + back_pointers = CoVif3e3s6pXM3mQkQCANwqjNBdDPaFhqTmZJBHZZEWS4xKvQEt4 + CoW7eGZpdjXdDbsK1Np5Zta4sdKLf2rUFDHorB2gBMiqq9n8Reuo + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-client --wait none send sc rollup message 'text:["CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE","CAFEBABE"]' from bootstrap1 to '[SC_ROLLUP_HASH]' +Node is bootstrapped. +Estimated gas: 1651.984 units (will add 100 for safety) +Estimated storage: no bytes added +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.000685 + Expected counter: 21 + Gas limit: 1752 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000685 + payload fees(the block proposer) ....... +ꜩ0.000685 + Add a message to the inbox of the smart contract rollup at address [SC_ROLLUP_HASH] + This operation sending a message to a smart contract rollup was successfully applied + Consumed gas: 1651.984 + Resulting inbox state: + rollup = [SC_ROLLUP_HASH] + level = 22 + current messages hash = CoV4vVmUCgzBS7gSiqLd8V4ec7y6xS3sM6nrUc7vLDmT8SBTCr4i + nb_available_messages = 210 + message_counter = 20 + old_levels_messages = + content = CoVooDD631U4DniRdMexS8nxVG8UfNwSMgpFzWdyG9MUsjnmWoTu + index = 20 + back_pointers = CoWWhYzUa9dzJYM8rkXLFQSGT9sN8pkDai6pfmkQD8UmGPnNvJfK + CoWWhYzUa9dzJYM8rkXLFQSGT9sN8pkDai6pfmkQD8UmGPnNvJfK + CoWWhYzUa9dzJYM8rkXLFQSGT9sN8pkDai6pfmkQD8UmGPnNvJfK + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + CoUp3myZtWe8iG3RMHuyXEdq48ZgDUbJnq2XTVY3VmjhHDCGJ2vZ + + + + +./tezos-sc-rollup-client-alpha rpc get /last_stored_commitment +null + +./tezos-sc-rollup-client-alpha rpc get /last_published_commitment +null diff --git a/tezt/lib_tezos/sc_rollup_client.ml b/tezt/lib_tezos/sc_rollup_client.ml index 5106868e4900dee39ef420775d36946a7505f8f5..2192f53e7c923dcb171ba3be0c03b9ef8049f523 100644 --- a/tezt/lib_tezos/sc_rollup_client.ml +++ b/tezt/lib_tezos/sc_rollup_client.ml @@ -31,6 +31,33 @@ type t = { color : Log.Color.t; } +type commitment = { + compressed_state : string; + inbox_level : int; + predecessor : string; + number_of_messages : int; + number_of_ticks : int; +} + +let commitment_from_json json = + if JSON.is_null json then None + else + let compressed_state = JSON.as_string @@ JSON.get "compressed_state" json in + let inbox_level = JSON.as_int @@ JSON.get "inbox_level" json in + let predecessor = JSON.as_string @@ JSON.get "predecessor" json in + let number_of_messages = + JSON.as_int @@ JSON.get "number_of_messages" json + in + let number_of_ticks = JSON.as_int @@ JSON.get "number_of_ticks" json in + Some + { + compressed_state; + inbox_level; + predecessor; + number_of_messages; + number_of_ticks; + } + let next_name = ref 1 let fresh_name () = @@ -96,3 +123,13 @@ let status ?hooks sc_client = let open Lwt.Syntax in let+ res = rpc_get ?hooks sc_client ["status"] in JSON.as_string res + +let last_stored_commitment ?hooks sc_client = + let open Lwt.Syntax in + let+ res = rpc_get ?hooks sc_client ["last_stored_commitment"] in + commitment_from_json res + +let last_published_commitment ?hooks sc_client = + let open Lwt.Syntax in + let+ res = rpc_get ?hooks sc_client ["last_published_commitment"] in + commitment_from_json res diff --git a/tezt/lib_tezos/sc_rollup_client.mli b/tezt/lib_tezos/sc_rollup_client.mli index f274a9275e595fb69636b29d70fbf45a54db790f..d3c97da0e0eb39268608fe898de62868259f0f1e 100644 --- a/tezt/lib_tezos/sc_rollup_client.mli +++ b/tezt/lib_tezos/sc_rollup_client.mli @@ -26,6 +26,14 @@ (** Smart-Contract Rollup client state *) type t +type commitment = { + compressed_state : string; + inbox_level : int; + predecessor : string; + number_of_messages : int; + number_of_ticks : int; +} + (** [create ?name ?path ?base_dir ?path node] returns a fresh client identified by a specified [name], logging in [color], executing the program at [path], storing local information in [base_dir], and @@ -56,3 +64,11 @@ val state_hash : ?hooks:Process.hooks -> t -> string Lwt.t (** [status client] gets the corresponding PVM status for the current head block. *) val status : ?hooks:Process.hooks -> t -> string Lwt.t + +(** [last_stored_commitment client] gets the last commitment stored by the rollup node. *) +val last_stored_commitment : + ?hooks:Process.hooks -> t -> commitment option Lwt.t + +(** [last_published_commitment client] gets the last commitment published by the rollup node. *) +val last_published_commitment : + ?hooks:Process.hooks -> t -> commitment option Lwt.t diff --git a/tezt/tests/sc_rollup.ml b/tezt/tests/sc_rollup.ml index 4abc1fd1171190348b32ea27c057ca70ebfb4331..de93a3eaa90bdcacd4b644fd147bf404fa8a37df 100644 --- a/tezt/tests/sc_rollup.ml +++ b/tezt/tests/sc_rollup.ml @@ -75,6 +75,70 @@ let sc_rollup_node_rpc sc_node service = let* response = curl ~url in return (Some response) +type test = { + output_file_prefix : string; + variant : string; + tags : string list; + description : string; +} + +let with_fresh_rollup f tezos_node tezos_client bootstrap1_key = + let* rollup_address = + Client.Sc_rollup.originate + ~hooks + ~burn_cap:Tez.(of_int 9999999) + ~src:bootstrap1_key + ~kind:"arith" + ~boot_sector:"" + tezos_client + in + let sc_rollup_node = + Sc_rollup_node.create tezos_node tezos_client ~operator_pkh:bootstrap1_key + in + let* configuration_filename = + Sc_rollup_node.config_init sc_rollup_node rollup_address + in + let* () = Client.bake_for tezos_client in + f rollup_address sc_rollup_node configuration_filename + +let with_fresh_rollups n f node client bootstrap1 = + let rec go n addrs k = + if n < 1 then k addrs + else + with_fresh_rollup + (fun addr _ _ -> go (n - 1) (String_set.add addr addrs) k) + node + client + bootstrap1 + in + go n String_set.empty f + +(* TODO: create and insert issue number. Many tests +can be refactored using test_scenario.*) +let test_scenario {output_file_prefix; variant; tags; description} scenario = + let output_file _ = output_file_prefix ^ "_" ^ variant in + let tags = tags @ [variant] in + test + ~__FILE__ + ~output_file + ~tags + (Printf.sprintf "%s (%s)" description variant) + (fun protocol -> + setup ~protocol @@ fun node client -> + ( with_fresh_rollup @@ fun sc_rollup_address sc_rollup_node _filename -> + scenario protocol sc_rollup_node sc_rollup_address node client ) + node + client) + +let inbox_level (commitment : Sc_rollup_client.commitment) = + commitment.inbox_level + +let number_of_messages (commitment : Sc_rollup_client.commitment) = + commitment.number_of_messages + +let number_of_ticks (commitment : Sc_rollup_client.commitment) = + commitment.number_of_ticks + (* Tests @@ -113,36 +177,6 @@ let test_origination = A rollup node has a configuration file that must be initialized. *) -let with_fresh_rollup f tezos_node tezos_client bootstrap1_key = - let* rollup_address = - Client.Sc_rollup.originate - ~hooks - ~burn_cap:Tez.(of_int 9999999) - ~src:bootstrap1_key - ~kind:"arith" - ~boot_sector:"" - tezos_client - in - let sc_rollup_node = - Sc_rollup_node.create tezos_node tezos_client ~operator_pkh:bootstrap1_key - in - let* configuration_filename = - Sc_rollup_node.config_init sc_rollup_node rollup_address - in - let* () = Client.bake_for tezos_client in - f rollup_address sc_rollup_node configuration_filename - -let with_fresh_rollups n f node client bootstrap1 = - let rec go n addrs k = - if n < 1 then k addrs - else - with_fresh_rollup - (fun addr _ _ -> go (n - 1) (String_set.add addr addrs) k) - node - client - bootstrap1 - in - go n String_set.empty f let test_rollup_node_configuration = let output_file _ = "sc_rollup_node_configuration" in @@ -796,6 +830,362 @@ let test_rollup_node_advances_pvm_state = node client) +(* Ensure that commitments are stored and published properly. + ---------------------------------------------------------- + + Every 20 level, a commitment is computed and stored by the + rollup node. The rollup node will also publish previously + computed commitments on the layer1, in a first in first out + fashion. To ensure that commitments are robust to chain + reorganisations, only finalized block are processed when + trying to publish a commitment. +*) + +let rec bake_levels n client = + if n <= 0 then return () + else + let* () = Client.bake_for client in + bake_levels (n - 1) client + +let check_eq_commitment (c1 : Sc_rollup_client.commitment) + (c2 : Sc_rollup_client.commitment) = + Check.(c1.predecessor = c2.predecessor) + Check.string + ~error_msg:"Commitments differ in inbox_level (%L = %R)" ; + Check.(c1.compressed_state = c2.compressed_state) + Check.string + ~error_msg:"Commitments differ in inbox_level (%L = %R)" ; + Check.(c1.inbox_level = c2.inbox_level) + Check.int + ~error_msg:"Commitments differ in inbox_level (%L = %R)" ; + Check.(c1.number_of_messages = c2.number_of_messages) + Check.int + ~error_msg:"Commitments differ in inbox_level (%L = %R)" ; + Check.(c1.number_of_ticks = c2.number_of_ticks) + Check.int + ~error_msg:"Commitments differ in inbox_level (%L = %R)" + +let test_commitment_scenario variant = + test_scenario + { + output_file_prefix = "sc_rollup_commitment_of_rollup_node"; + tags = ["commitment"; "node"]; + variant; + description = + "observing the correct handling of commitments in the rollup node"; + } + +let commitment_stored _protocol sc_rollup_node sc_rollup_address _node client = + (* We start at level 2, and it requires 20 levels to store a commitment. + Therefore the commitment will be stored and published when the + [Commitment] module processes the block at level 22. + The finality time of Tenderbake is 1, hence an additional block + after level 22 needs to be produced in order for the commitment + to be stored and published. + *) + let* init_level = + RPC.Sc_rollup.get_initial_level ~hooks ~sc_rollup_address client + in + + let init_level = init_level |> JSON.as_int in + let levels_to_commitment = 20 in + let levels_to_finalize = 2 in + let store_commitment_level = + init_level + levels_to_commitment + levels_to_finalize + in + let* () = Sc_rollup_node.run sc_rollup_node in + let sc_rollup_client = Sc_rollup_client.create sc_rollup_node in + let* level = Sc_rollup_node.wait_for_level sc_rollup_node init_level in + Check.(level = init_level) + Check.int + ~error_msg:"Current level has moved past origination level (%L = %R)" ; + let* () = + (* at init_level + i we publish i messages, therefore at level + init_level + 20 a total of 1+..+20 = (20*21)/2 = 210 messages + will have been sent. + *) + send_messages levels_to_commitment sc_rollup_address client + in + let* _ = + Sc_rollup_node.wait_for_level + sc_rollup_node + (init_level + levels_to_commitment) + in + (* Bake two additional level to ensure that block number 22 is + processed by the rollup node as finalized. *) + let* () = bake_levels levels_to_finalize client in + let* _ = + Sc_rollup_node.wait_for_level sc_rollup_node store_commitment_level + in + let* stored_commitment = + Sc_rollup_client.last_stored_commitment ~hooks sc_rollup_client + in + let stored_inbox_level = Option.map inbox_level stored_commitment in + Check.(stored_inbox_level = Some (levels_to_commitment + init_level)) + (Check.option Check.int) + ~error_msg: + "Commitment has been stored at a level different than expected (%L = %R)" ; + let expected_number_of_messages = + Some (levels_to_commitment * (levels_to_commitment + 1) / 2) + in + (let stored_number_of_messages = + Option.map number_of_messages stored_commitment + in + Check.(expected_number_of_messages = stored_number_of_messages) + (Check.option Check.int) + ~error_msg: + "Number of messages processed by commitment is different from the \ + number of messages expected (%L = %R)") ; + let* published_commitment = + Sc_rollup_client.last_published_commitment ~hooks sc_rollup_client + in + Option.iter (fun (c1, c2) -> check_eq_commitment c1 c2) + @@ Option.bind published_commitment (fun c1 -> + Option.map (fun c2 -> (c1, c2)) stored_commitment) ; + Lwt.return_unit + +let commitment_not_stored_if_non_final _protocol sc_rollup_node + sc_rollup_address _node client = + (* We start at level 2, and it requires 20 levels to store a commitment. + Therefore the commitment will be stored and published when the + [Commitment] module processes the block at level 23. However, this + block will be considered as finalized by the rollup node only after + it receives a head at level 24 or later. + Therefore, if we only bake 22 levels, no commitment will be stored + by the rollup node. + *) + let* init_level = + RPC.Sc_rollup.get_initial_level ~hooks ~sc_rollup_address client + in + + let init_level = init_level |> JSON.as_int in + let levels_to_commitment = 20 in + let levels_to_finalize = 1 in + let store_commitment_level = init_level + levels_to_commitment in + let* () = Sc_rollup_node.run sc_rollup_node in + let sc_rollup_client = Sc_rollup_client.create sc_rollup_node in + let* level = Sc_rollup_node.wait_for_level sc_rollup_node init_level in + Check.(level = init_level) + Check.int + ~error_msg:"Current level has moved past origination level (%L = %R)" ; + let* () = send_messages levels_to_commitment sc_rollup_address client in + let* _ = + Sc_rollup_node.wait_for_level sc_rollup_node store_commitment_level + in + let* () = bake_levels levels_to_finalize client in + let* _ = + Sc_rollup_node.wait_for_level + sc_rollup_node + (store_commitment_level + levels_to_finalize) + in + let* commitment = + Sc_rollup_client.last_stored_commitment ~hooks sc_rollup_client + in + let stored_inbox_level = Option.map inbox_level commitment in + Check.(stored_inbox_level = None) + (Check.option Check.int) + ~error_msg: + "Commitment has been stored at a level different than expected (%L = %R)" ; + let* commitment = + Sc_rollup_client.last_published_commitment ~hooks sc_rollup_client + in + let published_inbox_level = Option.map inbox_level commitment in + Check.(published_inbox_level = None) + (Check.option Check.int) + ~error_msg: + "Commitment has been published at a level different than expected (%L = \ + %R)" ; + Lwt.return_unit + +let commitments_messages_reset _protocol sc_rollup_node sc_rollup_address _node + client = + (* At the i-th level after sc rollup origination i messages are sent, for 20 + levels, for a total of 210 messages. Then no message are sent for other 20 + levels, for a total of 0 messages. Finally, 2 empty levels are baked + which ensures that two commitments are stored and published by the rollup + node. In total 210 messages have been sent to the rollup node, but + the second commitment should list records 0 messages and 0 ticks. + *) + let* init_level = + RPC.Sc_rollup.get_initial_level ~hooks ~sc_rollup_address client + in + + let init_level = init_level |> JSON.as_int in + let levels_to_commitment = 20 in + let levels_to_finalize = 2 in + let* () = Sc_rollup_node.run sc_rollup_node in + let sc_rollup_client = Sc_rollup_client.create sc_rollup_node in + let* level = Sc_rollup_node.wait_for_level sc_rollup_node init_level in + Check.(level = init_level) + Check.int + ~error_msg:"Current level has moved past origination level (%L = %R)" ; + let* () = + (* At init_level + i we publish i messages, therefore at level + init_level + 20 a total of 1+..+20 = (20*21)/2 = 210 messages + will have been sent. + *) + send_messages levels_to_commitment sc_rollup_address client + in + (* Bake other 22 levels with no messages. The first 20 levels contribute + to the second commitment stored by the rollup node. The last 2 levels + ensure that the second commitment is stored and published by the + rollup node. + *) + let* () = bake_levels (levels_to_commitment + levels_to_finalize) client in + let* _ = + Sc_rollup_node.wait_for_level + sc_rollup_node + (init_level + (2 * levels_to_commitment) + levels_to_finalize) + in + let* stored_commitment = + Sc_rollup_client.last_stored_commitment ~hooks sc_rollup_client + in + let stored_inbox_level = Option.map inbox_level stored_commitment in + Check.(stored_inbox_level = Some (init_level + (2 * levels_to_commitment))) + (Check.option Check.int) + ~error_msg: + "Commitment has been stored at a level different than expected (%L = %R)" ; + (let stored_number_of_messages = + Option.map number_of_messages stored_commitment + in + Check.(stored_number_of_messages = Some 0) + (Check.option Check.int) + ~error_msg: + "Number of messages processed by commitment is different from the \ + number of messages expected (%L = %R)") ; + (let stored_number_of_ticks = Option.map number_of_ticks stored_commitment in + Check.(stored_number_of_ticks = Some 0) + (Check.option Check.int) + ~error_msg: + "Number of messages processed by commitment is different from the \ + number of messages expected (%L = %R)") ; + let* published_commitment = + Sc_rollup_client.last_published_commitment ~hooks sc_rollup_client + in + Option.iter (fun (c1, c2) -> check_eq_commitment c1 c2) + @@ Option.bind published_commitment (fun c1 -> + Option.map (fun c2 -> (c1, c2)) stored_commitment) ; + Lwt.return_unit + +let commitments_reorgs protocol sc_rollup_node sc_rollup_address node client = + (* No messages are published after origination, for 19 levels. + Then a divergence occurs: in the first branch one message + is published in one block. In the second branch no message are + published for 2 blocks. The second branch is the more attractive + one, and will be chosen when a reorganisation occurs. One + more level is baked to ensure that the rollup node stores and + publishes the commitment. The final commitment should have + no messages and no ticks. + *) + let* init_level = + RPC.Sc_rollup.get_initial_level ~hooks ~sc_rollup_address client + in + + let init_level = init_level |> JSON.as_int in + let levels_to_commitment = 20 in + let num_empty_blocks = 2 in + let num_messages = 1 in + let levels_to_finalize = 2 in + let sc_rollup_client = Sc_rollup_client.create sc_rollup_node in + + setup ~protocol @@ fun node' client' _ -> + let* () = Client.Admin.trust_address client ~peer:node' + and* () = Client.Admin.trust_address client' ~peer:node in + let* () = Client.Admin.connect_address client ~peer:node' in + + let* () = Sc_rollup_node.run sc_rollup_node in + (* We bake 19 levels, which should cause both nodes to observe + level 21. *) + let* () = bake_levels (levels_to_commitment - 1) client in + let* _ = Node.wait_for_level node (init_level + levels_to_commitment - 1) in + let* _ = Node.wait_for_level node' (init_level + levels_to_commitment - 1) in + let* _ = + Sc_rollup_node.wait_for_level + sc_rollup_node + (init_level + levels_to_commitment - 1) + in + Log.info "Nodes are synchronized." ; + + let divergence () = + let* identity' = Node.wait_for_identity node' in + let* () = Client.Admin.kick_peer client ~peer:identity' in + let* () = send_messages num_messages sc_rollup_address client in + (* +1 block with message for [node] *) + let* _ = + Node.wait_for_level + node + (init_level + levels_to_commitment - 1 + num_messages) + in + + let* () = bake_levels num_empty_blocks client' in + (* +2 blocks with no messages for [node'] *) + let* _ = + Node.wait_for_level + node' + (init_level + levels_to_commitment - 1 + num_empty_blocks) + in + Log.info "Nodes are following distinct branches." ; + return () + in + + let trigger_reorg () = + let* () = Client.Admin.connect_address client ~peer:node' in + let* _ = + Node.wait_for_level + node + (init_level + levels_to_commitment - 1 + num_empty_blocks) + in + Log.info "Nodes are synchronized again." ; + return () + in + + let* () = divergence () in + let* () = trigger_reorg () in + (* After triggering a reorganisation the node should see that there + is a more attractive head at level 21 + *) + let* _ = + Sc_rollup_node.wait_for_level + sc_rollup_node + (init_level + levels_to_commitment - 1 + num_empty_blocks) + in + (* exactly one level left to finalize the commitment in the node *) + let* () = bake_levels (levels_to_finalize - num_empty_blocks + 1) client in + let* _ = + Sc_rollup_node.wait_for_level + sc_rollup_node + (init_level + levels_to_commitment + levels_to_finalize) + in + let* stored_commitment = + Sc_rollup_client.last_stored_commitment ~hooks sc_rollup_client + in + let stored_inbox_level = Option.map inbox_level stored_commitment in + Check.(stored_inbox_level = Some (init_level + levels_to_commitment)) + (Check.option Check.int) + ~error_msg: + "Commitment has been stored at a level different than expected (%L = %R)" ; + (let stored_number_of_messages = + Option.map number_of_messages stored_commitment + in + Check.(stored_number_of_messages = Some 0) + (Check.option Check.int) + ~error_msg: + "Number of messages processed by commitment is different from the \ + number of messages expected (%L = %R)") ; + (let stored_number_of_ticks = Option.map number_of_ticks stored_commitment in + Check.(stored_number_of_ticks = Some 0) + (Check.option Check.int) + ~error_msg: + "Number of messages processed by commitment is different from the \ + number of messages expected (%L = %R)") ; + let* published_commitment = + Sc_rollup_client.last_published_commitment ~hooks sc_rollup_client + in + Option.iter (fun (c1, c2) -> check_eq_commitment c1 c2) + @@ Option.bind published_commitment (fun c1 -> + Option.map (fun c2 -> (c1, c2)) stored_commitment) ; + Lwt.return_unit + let register ~protocols = test_origination protocols ; test_rollup_node_configuration protocols ; @@ -815,4 +1205,11 @@ let register ~protocols = sc_rollup_node_handles_chain_reorg protocols ; test_rollup_node_boots_into_initial_state protocols ; - test_rollup_node_advances_pvm_state protocols + test_rollup_node_advances_pvm_state protocols ; + test_commitment_scenario "commitment_is_stored" commitment_stored protocols ; + test_commitment_scenario + "non_final_level" + commitment_not_stored_if_non_final + protocols ; + test_commitment_scenario "messages_reset" commitments_messages_reset protocols ; + test_commitment_scenario "handles_chain_reorgs" commitments_reorgs protocols